/*
Theme Name: Coproxima
Theme URI: https://www.coproxima.com/
Author: Coproxima
Description: Thème bloc éditorial pour Coproxima — guides de fiscalité du particulier. Titres en serif, filet bleu, mise en page pensée pour les articles structurés (En bref, tableaux, FAQ).
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coproxima
Tags: blog, one-column, block-patterns, full-site-editing, editor-style
*/

/* ---------------------------------------------------------------
   1. Base de lecture
   --------------------------------------------------------------- */
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

.entry-content > * + * { margin-block-start: 1.35em; }

.entry-content p { max-width: 68ch; }
.entry-content ul, .entry-content ol { max-width: 66ch; padding-left: 1.25rem; }
.entry-content li { margin-block: 0.45em; }
.entry-content li::marker { color: var(--wp--preset--color--primary); font-weight: 600; }

/* ---------------------------------------------------------------
   2. Signature du thème : le filet bleu des h2
   --------------------------------------------------------------- */
.entry-content h2 {
  position: relative;
  margin-block-start: 2.4em;
  padding-block-end: 0.45rem;
  border-block-end: 1px solid var(--wp--preset--color--line);
}
.entry-content h2::before {
  content: "";
  position: absolute;
  inset-block-end: -1px;
  inset-inline-start: 0;
  width: 3.5rem;
  height: 3px;
  background: var(--wp--preset--color--primary);
}
.entry-content h3 { margin-block-start: 1.9em; color: var(--wp--preset--color--muted); }

/* ---------------------------------------------------------------
   3. Chapô « En bref » — premier paragraphe de chaque guide
   --------------------------------------------------------------- */
.entry-content > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--wp--preset--color--contrast);
  background: var(--wp--preset--color--surface);
  border-inline-start: 3px solid var(--wp--preset--color--accent);
  padding: 1.15rem 1.35rem;
  max-width: none;
}
.entry-content > p:first-of-type strong:first-child { color: var(--wp--preset--color--accent); }

/* ---------------------------------------------------------------
   4. Tableaux
   --------------------------------------------------------------- */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
  margin-block: 1.6em;
  display: block;
  overflow-x: auto;
}
.entry-content table thead th {
  background: var(--wp--preset--color--contrast);
  color: #fff;
  font-family: var(--wp--preset--font-family--sans);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: start;
  padding: 0.7rem 0.85rem;
}
.entry-content table td { padding: 0.7rem 0.85rem; border-block-end: 1px solid var(--wp--preset--color--line); vertical-align: top; }
.entry-content table tbody tr:nth-child(even) { background: var(--wp--preset--color--surface); }

/* ---------------------------------------------------------------
   5. FAQ (<details>)
   --------------------------------------------------------------- */
.entry-content details {
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 3px;
  margin-block: 0.6em;
  background: #fff;
}
.entry-content details + details { margin-block-start: -1px; }
.entry-content details summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 2.6rem 0.85rem 1rem;
  font-weight: 600;
  position: relative;
}
.entry-content details summary::-webkit-details-marker { display: none; }
.entry-content details summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 1rem;
  inset-block-start: 0.7rem;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--wp--preset--color--primary);
}
.entry-content details[open] summary::after { content: "\2212"; }
.entry-content details[open] summary { border-block-end: 1px solid var(--wp--preset--color--line); }
.entry-content details p { margin: 0; padding: 0.9rem 1rem 1rem; color: var(--wp--preset--color--muted); max-width: none; }

/* ---------------------------------------------------------------
   6. En-tête / navigation
   --------------------------------------------------------------- */
.cx-header { border-block-end: 1px solid var(--wp--preset--color--line); }
.cx-header .wp-block-site-title a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-inline-start: 4px;
  border-radius: 50%;
  background: var(--wp--preset--color--accent);
  vertical-align: 0.35em;
}
.cx-header .wp-block-navigation a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--wp--preset--color--muted);
}
.cx-header .wp-block-navigation a:hover,
.cx-header .wp-block-navigation .current-menu-item a { color: var(--wp--preset--color--contrast); }

/* ---------------------------------------------------------------
   7. Listes d'articles
   --------------------------------------------------------------- */
.cx-card { border-block-end: 1px solid var(--wp--preset--color--line); padding-block-end: 1.6rem; }
.cx-card .wp-block-post-title { font-size: 1.3rem; line-height: 1.3; }
.cx-card .wp-block-post-title a { text-decoration: none; }
.cx-card .wp-block-post-title a:hover { text-decoration: underline; }
.cx-card .wp-block-post-excerpt__excerpt { color: var(--wp--preset--color--muted); font-size: 0.97rem; }
.cx-card .wp-block-post-featured-image img { border-radius: 3px; }

/* ---------------------------------------------------------------
   8. Pied de page
   --------------------------------------------------------------- */
.cx-footer { background: var(--wp--preset--color--contrast); color: #C7D3DC; font-size: 0.92rem; }
.cx-footer a { color: #fff; text-decoration: none; }
.cx-footer a:hover { text-decoration: underline; }
.cx-footer h2, .cx-footer h3 { color: #fff; font-size: 0.85rem; letter-spacing: 0.09em; text-transform: uppercase; font-family: var(--wp--preset--font-family--sans); }

/* ---------------------------------------------------------------
   9. Encart d'avertissement éditorial
   --------------------------------------------------------------- */
.cx-note {
  border: 1px solid var(--wp--preset--color--line);
  border-inline-start: 3px solid var(--wp--preset--color--primary);
  background: var(--wp--preset--color--surface);
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  color: var(--wp--preset--color--muted);
}
.cx-note strong { color: var(--wp--preset--color--contrast); }

/* ---------------------------------------------------------------
   10. Impression
   --------------------------------------------------------------- */
@media print {
  .cx-header, .cx-footer, .wp-block-navigation { display: none !important; }
  .entry-content details { break-inside: avoid; }
  .entry-content details[open] summary::after { content: ""; }
}
