/* EduPlus : « Cahier ligné ». Une seule audace : la marge rouge, porteuse de notes utiles. Le reste est sobre.
   Polices servies par le site (Fonts API Astro) : Schibsted Grotesk (--f-titre), Newsreader (--f-texte). */
:root {
  --papier: #F6F8FA;
  --encre: #1F2B5C;
  --ligne: #B7CCE6;   /* filets et réglure : jamais du texte */
  --marge: #C42F3A;
  --ardoise: #4A5563;
  --bouleau: #E9EDF1;
  --blanc: #FFFFFF;
  --note-w: 8.75rem;
  --gouttiere: 1.5rem;
  --pad-marge: calc(var(--note-w) + var(--gouttiere));
  --colonne: 38rem;
  --reglure: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font-family: var(--f-texte, Georgia, serif); font-size: 1.1875rem; line-height: 1.68;
}
/* REGLE 14 : anti-distorsion */
img { max-width: 100%; height: auto; display: block; }
.img-hero, .img-card, .img-body, .img-portrait { overflow: hidden; display: block; }
.img-hero img, .img-card img, .img-body img, .img-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.img-hero { aspect-ratio: 16 / 9; max-height: min(75vh, 44vw); width: 100%; }
.img-card, .img-body { aspect-ratio: 3 / 2; }
.img-portrait { aspect-ratio: 1 / 1; border-radius: 50%; }

h1, h2, h3, h4, .logo__nom, .lang, .menu, .fil, .meta, .filtre, .fiche__onglet, .article-sommaire__titre, .encadre__titre, .retenir__titre, summary, th, button {
  font-family: var(--f-titre, Arial, sans-serif);
}
h1, h2, h3, h4 { color: var(--encre); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem); margin: 2.4rem 0 .7rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
p, ul, ol { margin: 0 0 1.1rem; }
a { color: var(--encre); text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--ardoise); }
a:hover { color: var(--marge); text-decoration-color: var(--marge); }
:focus-visible { outline: 2px solid var(--marge); outline-offset: 2px; }
strong { font-weight: 600; }
.skip { position: absolute; left: -999px; top: 0; background: var(--encre); color: var(--papier); padding: .6rem 1rem; z-index: 10; font-family: var(--f-titre, Arial, sans-serif); }
.skip:focus { left: 0; }

/* ---------- En-tête ---------- */
.site-header { background: var(--papier); border-bottom: 1px solid var(--ligne); }
.site-header__top { display: flex; align-items: center; gap: 1.25rem; max-width: 70rem; margin: 0 auto; padding: .8rem 1.25rem .5rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--encre); }
.logo:hover { color: var(--encre); }
.logo__mark { flex: none; }
.logo__nom { font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }
.site-header__tagline { margin: 0; flex: 1; font-size: .95rem; line-height: 1.3; color: var(--ardoise); font-style: italic; }
.lang { display: flex; align-items: center; gap: .45rem; font-size: .95rem; font-weight: 500; margin-left: auto; }
.lang a, .lang [aria-current] { padding: .2rem .15rem; }
.lang [aria-current] { font-weight: 700; border-bottom: 2px solid var(--marge); }
.lang__sep { color: var(--ligne); }
.menu { max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }
.menu summary { cursor: pointer; list-style: none; padding: .55rem 0 .7rem; font-weight: 500; font-size: 1rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: '+'; color: var(--marge); font-weight: 700; margin-left: .5rem; }
.menu[open] summary::after { content: '\2212'; }
.menu ul { list-style: none; margin: 0; padding: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .1rem 1.3rem; }
.menu a { display: inline-block; padding: .3rem 0; text-decoration: none; font-weight: 500; font-size: .98rem; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--marge); }
.menu a[aria-current] { border-bottom-color: var(--marge); }
@media (min-width: 900px) {
  .menu summary { display: none; }
  .menu ul { padding-top: .1rem; padding-bottom: .55rem; }
}
@media (max-width: 899px) {
  .site-header__top { flex-wrap: wrap; row-gap: .3rem; }
  .site-header__tagline { order: 3; flex-basis: 100%; font-size: .9rem; }
  .menu ul { flex-direction: column; gap: 0; }
  .menu a { padding: .55rem 0; width: 100%; }
}

/* ---------- Bandeau pleine largeur, titre dessous ---------- */
.hero-band { margin: 0; background: var(--bouleau); }
.hero-band .credit { max-width: 70rem; margin: 0 auto; padding: .4rem 1.25rem; font-size: .85rem; }
.credit { color: var(--ardoise); font-size: .85rem; font-style: italic; margin: 0; }

/* ---------- Page et trait de marge ---------- */
.page { position: relative; max-width: calc(var(--pad-marge) + var(--colonne) + 2.5rem); margin: 0 auto; padding: 2rem 1.25rem 3.5rem calc(var(--pad-marge) + 1.25rem); }
.page--simple { padding-left: 1.25rem; max-width: 46rem; margin-left: auto; }
.page:not(.page--simple)::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--pad-marge) + 1.25rem - var(--gouttiere) / 2);
  width: 2px; background: var(--marge); transform-origin: top;
}
/* Une seule animation : le trait de marge se trace au chargement de l'article (300 ms). */
.trace-marge .page::before { animation: trace 300ms ease-out both; }
@keyframes trace { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .trace-marge .page::before { animation: none; } }

.page-tete { margin-bottom: 1.2rem; }
.meta { margin: 0 0 1rem; font-size: .95rem; color: var(--ardoise); font-weight: 500; }
.fil { font-size: .9rem; margin-bottom: .9rem; }
.fil ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem .4rem; color: var(--ardoise); }
.fil li + li::before { content: '/'; margin-right: .4rem; color: var(--ardoise); }
.fil a { color: var(--ardoise); }
.fil a:hover { color: var(--marge); }

/* Chapeau : réglure bleue (lignes à 32 px) sous le texte, seulement ici et dans « À retenir ». */
.prose > p:first-child, .prose > .avec-note:first-child > p {
  font-size: 1.25rem; line-height: var(--reglure);
  background-image: linear-gradient(to bottom, transparent calc(var(--reglure) - 1px), var(--ligne) calc(var(--reglure) - 1px));
  background-size: 100% var(--reglure); padding-bottom: 1px; margin-bottom: 1.6rem;
}
.prose { max-width: var(--colonne); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--ardoise); }
.prose blockquote:not(.avec-note) { margin: 1.4rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--ligne); color: var(--ardoise); font-style: italic; }

/* ---------- Notes de marge ---------- */
.avec-note { display: grid; grid-template-columns: var(--note-w) minmax(0, 1fr); column-gap: var(--gouttiere); margin-left: calc(-1 * var(--pad-marge)); margin-bottom: 1.1rem; align-items: start; }
.avec-note > :not(.note-marge) { grid-column: 2; grid-row: 1; margin-bottom: 0; }
.avec-note > .note-marge { grid-column: 1; grid-row: 1; }
.note-marge { font-family: var(--f-texte, Georgia, serif); font-style: italic; color: var(--marge); font-size: .95rem; line-height: 1.4; padding-top: .25rem; margin: 0; }
.note-marge a { color: var(--marge); }
@media (max-width: 899px) {
  :root { --pad-marge: 0px; }
  .page { padding-left: 1.75rem; padding-right: 1.25rem; }
  .page:not(.page--simple)::before { left: .7rem; width: 2px; }
  .avec-note { display: block; margin-left: 0; }
  .note-marge { margin: -.4rem 0 1.1rem; padding: .1rem 0 .1rem .8rem; border-left: 2px solid var(--marge); }
  .prose > .avec-note:first-child > p { margin-bottom: 1.2rem; }
}

/* ---------- Sommaire ---------- */
.article-sommaire { margin: 0 0 1.8rem; padding: .9rem 1.1rem; background: var(--bouleau); border-left: 3px solid var(--encre); max-width: var(--colonne); }
.article-sommaire__titre { margin: 0 0 .4rem; font-weight: 700; font-size: 1rem; }
.article-sommaire ul { margin: 0; padding-left: 1.1rem; font-size: 1rem; line-height: 1.5; }
.article-sommaire li { margin-bottom: .25rem; }

/* ---------- À retenir (réglure) ---------- */
.retenir { margin: 2.2rem 0; padding: .9rem 1.2rem 1rem; background: var(--blanc); border: 1px solid var(--ligne); border-left: 3px solid var(--marge); }
.retenir__titre { margin: 0 0 .2rem; font-size: 1.25rem; line-height: var(--reglure); }
.retenir ul { margin: 0; padding-left: 1.2rem; font-size: 1.1rem; line-height: var(--reglure);
  background-image: linear-gradient(to bottom, transparent calc(var(--reglure) - 1px), var(--ligne) calc(var(--reglure) - 1px)); background-size: 100% var(--reglure); }
.retenir li { margin: 0; }

/* ---------- Encadrés ---------- */
.encadre { margin: 1.8rem 0; padding: .8rem 1.1rem .5rem; max-width: var(--colonne); background: var(--bouleau); border-left: 3px solid var(--encre); }
.encadre__titre { margin: 0 0 .25rem; font-weight: 700; font-size: 1rem; }
.encadre p:last-child { margin-bottom: .5rem; }
.encadre--attention { background: var(--blanc); border: 1px solid var(--ligne); border-left: 3px solid var(--marge); }
.encadre--cric { background: transparent; border: 1px dashed var(--ardoise); border-left: 3px solid var(--marge); font-size: 1rem; line-height: 1.55; }

/* ---------- Tableaux datés ---------- */
.tableau-date { margin: 1.8rem 0; max-width: 100%; }
.tableau-date__scroll { overflow-x: auto; border: 1px solid var(--ligne); background: var(--blanc); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.45; }
caption { text-align: left; font-family: var(--f-titre, Arial, sans-serif); font-weight: 700; padding: .5rem .8rem; background: var(--bouleau); }
th, td { padding: .55rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ligne); }
thead th { background: var(--encre); color: var(--papier); font-weight: 500; white-space: nowrap; }
tbody th { font-weight: 600; font-family: var(--f-texte, Georgia, serif); }
tbody tr:nth-child(even) { background: var(--bouleau); }
.tableau-date__source { margin: .4rem 0 0; font-size: .9rem; color: var(--ardoise); font-style: italic; }
.prose table { min-width: 26rem; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--colonne); margin-top: 2.4rem; }
.faq__item { border-bottom: 1px solid var(--ligne); }
.faq__item:first-of-type { border-top: 1px solid var(--ligne); }
.faq summary { cursor: pointer; padding: .8rem 1.6rem .8rem 0; font-weight: 500; font-size: 1.05rem; line-height: 1.35; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: .2rem; top: .7rem; color: var(--marge); font-weight: 700; font-size: 1.2rem; }
.faq details[open] summary::after { content: '\2212'; }
.faq__item p { margin: 0 0 1rem; }

/* ---------- Étapes réelles ---------- */
.howto { max-width: var(--colonne); margin-top: 2.4rem; }
.howto__liste { list-style: none; counter-reset: etape; padding: 0; margin: 0; }
.howto__liste li { counter-increment: etape; position: relative; padding: 0 0 1.1rem 3rem; }
.howto__liste li::before { content: counter(etape); position: absolute; left: 0; top: -.05rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; font-family: var(--f-titre, Arial, sans-serif); font-weight: 700; color: var(--encre); border: 2px solid var(--encre); border-radius: 50%; }
.howto__liste strong { display: block; }

/* ---------- Images dans le corps ---------- */
.fig { margin: 1.8rem 0; }
.fig figcaption { font-size: .9rem; color: var(--ardoise); font-style: italic; margin-top: .4rem; }

/* ---------- Fiches (cards du blog) ---------- */
.filtre { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.filtre[hidden] { display: none; }
.filtre__btn { font-size: .95rem; font-weight: 500; padding: .45rem .8rem; background: transparent; color: var(--encre); border: 1px solid var(--ligne); border-radius: 0; cursor: pointer; }
.filtre__btn:hover { border-color: var(--marge); color: var(--marge); }
.filtre__btn[aria-pressed="true"] { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 2rem 1.4rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.fiche { position: relative; padding-top: 1.9rem; }
[hidden].fiche, .fiche[hidden] { display: none; }
.fiche__onglet { position: absolute; left: 0; top: 0; margin: 0; padding: .3rem .8rem .35rem; font-size: .82rem; font-weight: 500; line-height: 1.2; color: var(--ardoise); background: var(--bouleau); border: 1px solid var(--ligne); border-bottom: 0; border-radius: 2px 2px 0 0; }
.fiche .img-card { border: 1px solid var(--ligne); border-radius: 0 2px 0 0; }
.fiche__corps { background: var(--blanc); border: 1px solid var(--ligne); border-top: 0; border-radius: 0 0 2px 2px; padding: .8rem 1rem 1rem; }
.fiche:not(:has(.img-card)) .fiche__corps { border-top: 1px solid var(--ligne); border-radius: 0 2px 2px 2px; }
.fiche time { display: block; font-size: .85rem; color: var(--ardoise); font-family: var(--f-titre, Arial, sans-serif); font-weight: 500; }
.fiche__titre { margin: .25rem 0 .3rem; font-size: 1.15rem; line-height: 1.25; }
.fiche__titre a { text-decoration: none; }
.fiche__titre a:hover { text-decoration: underline; }
.fiche__resume { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ardoise); }
.zone-fiches { max-width: 70rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }

/* ---------- Boutons ---------- */
.btn { display: inline-block; font-family: var(--f-titre, Arial, sans-serif); font-weight: 500; font-size: 1rem; padding: .65rem 1.2rem; background: var(--encre); color: var(--papier); text-decoration: none; border: 0; border-radius: 0; cursor: pointer; }
.btn:hover { background: #151e45; color: var(--blanc); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--encre); color: var(--papier); }
.site-footer__in { max-width: 70rem; margin: 0 auto; padding: 2rem 1.25rem 2.4rem; }
.site-footer__nom { margin: 0 0 .3rem; font-family: var(--f-titre, Arial, sans-serif); font-weight: 700; font-size: 1.3rem; }
.site-footer__mention { margin: 0 0 1rem; max-width: 40rem; font-size: 1rem; line-height: 1.5; }
.site-footer__liens { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; list-style: none; margin: 0; padding: 0; font-family: var(--f-titre, Arial, sans-serif); font-size: .95rem; }
.site-footer a { color: var(--papier); text-decoration-color: var(--ligne); }
.site-footer a:hover { color: var(--blanc); text-decoration-color: var(--blanc); }
.site-footer :focus-visible { outline-color: var(--blanc); }

@media print { .site-header, .site-footer, .filtre { display: none; } .page::before { display: none; } body { background: #fff; } }

@media (max-width: 599px) {
  .prose table { min-width: 0; }
  th, td { padding: .45rem .55rem; font-size: .95rem; }
  thead th { white-space: normal; }
}

/* ---------- Formulaire de contact ---------- */
.contact-form { max-width: 34rem; margin: 1.6rem 0 2rem; }
.contact-form__ligne { margin: 0 0 1rem; display: flex; flex-direction: column; gap: .3rem; }
.contact-form label { font-family: var(--f-titre, Arial, sans-serif); font-weight: 500; font-size: 1rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
  width: 100%; padding: .6rem .75rem; font: inherit; font-size: 1.05rem; color: var(--encre); background: var(--blanc); border: 1px solid var(--ardoise); border-radius: 0; }
.contact-form textarea { resize: vertical; }
.contact-form__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#contact-status { margin: .9rem 0 0; font-family: var(--f-titre, Arial, sans-serif); font-weight: 500; min-height: 1.5rem; }
#contact-status.ok { color: #1d5a2f; }
#contact-status.erreur { color: #9b1c27; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Accueil ---------- */
.accueil-tete { max-width: 70rem; margin: 0 auto; padding: 2rem 1.25rem 1rem; }
.accueil-tete h1 { max-width: 40rem; }
.accueil-tete .chapeau { max-width: 44rem; font-size: 1.25rem; line-height: var(--reglure);
  background-image: linear-gradient(to bottom, transparent calc(var(--reglure) - 1px), var(--ligne) calc(var(--reglure) - 1px)); background-size: 100% var(--reglure); padding-bottom: 1px; }
.section-fiches { max-width: 70rem; margin: 0 auto; padding: 1.2rem 1.25rem 1rem; }
.section-fiches h2 { margin-top: 1.4rem; }
.section-fiches .retenir { max-width: 44rem; }
.section-fiches__plus { margin: -.6rem 0 2rem; }
.blog-vide { margin: 1rem 0; color: var(--ardoise); font-style: italic; }
.prose--util > p:first-child { font-size: inherit; line-height: inherit; background: none; padding-bottom: 0; margin-bottom: 1.1rem; }
.page--simple .prose { max-width: 42rem; }

/* Interviews V6.5 : questions de la rédaction et réponses de l'experte (pas de citation italique) */
.prose blockquote.expert-question { margin: 2rem 0 .6rem; padding: 0 0 0 1rem; border-left: 3px solid var(--marge); color: var(--encre); font-family: "Schibsted Grotesk", system-ui, sans-serif; font-style: normal; font-weight: 700; font-size: 1.02rem; line-height: 1.45; }
.prose blockquote.expert-answer { margin: 0 0 1.2rem; padding: 0 0 0 1rem; border-left: 3px solid var(--ligne); color: var(--encre); font-style: normal; }
.prose blockquote.expert-question p, .prose blockquote.expert-answer p { margin: 0 0 .7rem; }
blockquote.journalist-question, blockquote.expert-answer, blockquote.expert-question { font-size: 1rem !important; font-style: normal !important; font-family: inherit !important; line-height: 1.7 !important; }
