/* Programmes 2027 : papier blanc, encre, et un seul accent, le surligneur (recherche, réponses, sélection).
   Les couleurs de verdict ne servent qu'en petits carrés, toujours avec leur libellé. Polices du système : aucune ressource tierce. */
:root {
  --papier: #ffffff; --fond: #f4f5f7; --encre: #1e222a; --gris: #5b636f; --filet: #e2e5ea;
  --surligneur: #ffe14d; --trait: #ffe14d;
  --rouge: #c23b22; --orange: #d97a1e; --ocre: #b08a1a; --vert: #2f8553; --violet: #7457b0; --neutre: #8a919c;
  --texte: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #15171c; --fond: #1c1f26; --encre: #e7e9ed; --gris: #a3aab5; --filet: #2c3039;
    --surligneur: #f0d23f; --trait: rgba(240, 210, 63, .38);
    --rouge: #ec6b55; --orange: #f0a050; --ocre: #d8b84a; --vert: #5cc08a; --violet: #a68ce6; --neutre: #8f97a3;
  }
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--papier); color: var(--encre); font: 1.0625rem/1.55 var(--texte); font-variant-numeric: tabular-nums }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em }
a:hover { text-decoration-thickness: 2px }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; border-radius: 2px }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.saut { position: absolute; left: -9999px; top: 0 }
.saut:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surligneur); color: #1e222a; padding: .5rem .8rem }
.cadre { max-width: 72rem; margin: 0 auto; padding-inline: max(1.25rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right)) }
h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; margin: 0 }
h1 { font-size: clamp(1.9rem, 1.15rem + 2.6vw, 2.9rem); font-weight: 750; letter-spacing: -.022em; max-width: 24ch; margin: .9rem 0 .5rem }
h1.question { max-width: 30ch }
h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; margin: 2.75rem 0 .8rem }
h3 { font-size: 1.05rem; font-weight: 650 }
h4 { font-size: .98rem; font-weight: 650; margin: 1.2rem 0 .3rem }
p { margin: .5rem 0; max-width: 70ch }
.chapo { font-size: 1.2rem; line-height: 1.45; color: var(--gris); max-width: 60ch; margin-bottom: 1.25rem }
.meta { font-size: .875rem; color: var(--gris); font-weight: 400 }
.sous-titre { display: block; font-size: .55em; font-weight: 600; color: var(--gris); letter-spacing: -.01em; margin-top: .3rem }
blockquote { margin: .6rem 0; padding-left: .9rem; border-left: 3px solid var(--filet); max-width: 70ch }
q { quotes: "« " " »" "“" "”" }

/* Surligneur : la marque du site */
mark, .valeur { color: inherit; background: linear-gradient(to top, var(--trait) 0 46%, transparent 46%); padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone }

/* En-tête et pied */
.tete { border-bottom: 1px solid var(--filet) }
.tete .cadre { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; padding-block: .8rem }
.nom-site { font-weight: 750; letter-spacing: -.01em; text-decoration: none; font-size: 1.05rem }
.menu { display: flex; gap: 1.25rem; font-size: .95rem }
.menu a { text-decoration: none; color: var(--gris) }
.menu a:hover { color: var(--encre); text-decoration: underline }
.cherche-mini { margin-left: auto }
.cherche-mini input { font: inherit; font-size: .95rem; width: 15rem; padding: .4rem .7rem; border: 1px solid var(--filet); border-radius: 6px; background: var(--fond); color: var(--encre) }
.accueil .cherche-mini { display: none }
.pied { margin-top: 5rem; border-top: 1px solid var(--filet); padding: 1.75rem 0 3rem; font-size: .875rem; color: var(--gris) }
.pied a + a { margin-left: 1.1rem }

/* Fil d'Ariane et navigation interne */
.fil ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 1.5rem 0 0; font-size: .875rem; color: var(--gris) }
.fil li + li::before { content: "›"; margin: 0 .4rem 0 .15rem }
.sommaire ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; padding: 0; margin: 1rem 0 0; font-size: .95rem }
.voisins { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--filet) }
.voisins a { text-decoration: none; font-weight: 600 }
.voisins a:hover { text-decoration: underline }
.voisins a[rel=next] { grid-column: 2; text-align: right }
.voisins .meta { display: block; margin-bottom: .2rem }
.note { font-size: .875rem; color: var(--gris); margin-top: 2rem }

/* Accueil */
.une { padding-block: 2.5rem 1rem }
.une h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); max-width: 17ch; margin-top: 0 }
.cherche { margin-top: 2rem; max-width: 46rem }
.cherche label { display: block; font-size: .95rem; color: var(--gris); margin-bottom: .45rem }
.cherche input { font: inherit; font-size: 1.25rem; width: 100%; padding: .85rem 1.05rem; border: 2px solid var(--encre); border-radius: 10px; background: var(--papier); color: var(--encre) }
.cherche input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--surligneur) }
.exemples { font-size: .95rem; color: var(--gris) }
.exemples a { margin-right: .8rem }
.cherche-en-cours .bloc-accueil { display: none }
.cherche-en-cours .une { padding-top: 1rem }
.cherche-en-cours .une h1 { font-size: 1.5rem; max-width: none }
.cherche-en-cours .une .chapo, .cherche-en-cours .exemples { display: none }
.cherche-en-cours .cherche { margin-top: 1rem }
.themes { list-style: none; padding: 0; margin: 0; columns: 3 15rem; column-gap: 2.5rem }
.themes li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid var(--filet) }
.themes a { font-weight: 600; text-decoration: none }
.themes a:hover { text-decoration: underline }
.themes .meta { display: block }

/* Résultats de recherche */
#resultats:empty { display: none }
.res-groupe ul { list-style: none; padding: 0; margin: 0 }
.res-groupe li { padding: .55rem 0; border-bottom: 1px solid var(--filet) }
.res-groupe li a { font-weight: 550; text-decoration: none }
.res-groupe li a:hover { text-decoration: underline }
.res-groupe .sous { display: block; font-size: .875rem; color: var(--gris) }
.res-groupe h2 { margin-top: 2rem }
.plus, .bascule button, .raccourcis button, .choix-liste button { font: inherit; font-size: .9rem; color: var(--encre); background: none; border: 1px solid var(--filet); border-radius: 6px; padding: .35rem .75rem; cursor: pointer }
.plus { margin-top: .8rem }
.vide { font-size: 1.05rem }

/* Tableaux */
.tableau { overflow-x: auto }
.liste { border-collapse: collapse; width: 100%; font-size: .95rem }
.liste th, .liste td { text-align: left; padding: .55rem .9rem .55rem 0; border-bottom: 1px solid var(--filet); vertical-align: top }
.liste thead th { font-size: .8rem; font-weight: 600; color: var(--gris) }
.liste tbody th { font-weight: 600 }
.liste tbody th a { text-decoration: none }
.liste tbody th a:hover { text-decoration: underline }
.num { text-align: right !important; white-space: nowrap }

/* Choix des candidats comparés */
.vue { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem 1.25rem; margin: 1.25rem 0 .5rem }
.bascule { display: inline-flex; margin: 0 }
.bascule button { border-radius: 0 }
.bascule button:first-child { border-radius: 6px 0 0 6px }
.bascule button + button { border-left: 0; border-radius: 0 6px 6px 0 }
.bascule button[aria-pressed=true] { background: var(--encre); color: var(--papier); border-color: var(--encre) }
.choix { margin: 1rem 0 .25rem }
.vue .choix { margin: 0; flex: 1 1 20rem }
.choix summary { cursor: pointer; font-size: .95rem; padding: .35rem 0; width: fit-content }
.choix-n { font-weight: 700 }
.raccourcis { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 }
.choix-liste { display: flex; flex-wrap: wrap; gap: .4rem }
.choix-liste button { border-radius: 999px }
.choix-liste button[aria-pressed=true] { background: var(--surligneur); border-color: var(--surligneur); color: #1e222a }

/* Tableau de comparaison d'un thème */
.legende { margin-top: .75rem }
.mx-cadre { overflow-x: auto; margin-top: .5rem; border-top: 2px solid var(--encre) }
.mx { border-collapse: separate; border-spacing: 0; font-size: .92rem }
.mx th, .mx td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid var(--filet) }
.mx thead th { font-size: .9rem; font-weight: 700; white-space: nowrap; background: var(--papier) }
.mx thead th a { text-decoration: none }
.mx tbody th { font-weight: 550; min-width: 16rem; max-width: 26rem }
.mx th:first-child { position: sticky; left: 0; background: var(--papier); z-index: 1; box-shadow: 1px 0 0 var(--filet) }
.mx tbody th a { text-decoration: none }
.mx tbody th a:hover { text-decoration: underline }
.mx td { min-width: 9rem; max-width: 15rem }
.mx td a { text-decoration: none }
.mx td a:hover { background: linear-gradient(to top, var(--trait) 0 46%, transparent 46%) }
.mx tbody tr:hover > * { background: var(--fond) }
.mx [data-d]:not(.on) { display: none }
.rien { color: var(--gris) }

/* Question : réponses groupées */
.reponse { margin-top: 2.5rem }
.reponse > h2 { margin: 0 0 .25rem; font-size: 1.3rem }
.reponse > h2 .meta { margin-left: .5rem }
.pos { padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--filet) }
.pos h3 a { text-decoration: none }
.pos h3 a:hover { text-decoration: underline }
.pos h3 .meta { margin-left: .4rem }
.sans { margin-top: 3rem }
.sans h2 { font-size: 1.05rem; margin-bottom: .3rem }
details { margin-top: .5rem }
details > summary { cursor: pointer; font-size: .92rem; color: var(--gris); width: fit-content }
details > summary:hover { color: var(--encre) }
details[open] > summary { margin-bottom: .5rem }
.mesures { list-style: none; padding: 0; margin: 0 }
.mesures li { margin: .9rem 0 }
.mesures a { font-weight: 550 }
.src { font-size: .85rem; color: var(--gris); margin-left: .3rem; white-space: nowrap }
.faisa { border-left: 3px solid var(--surligneur); padding-left: 1rem; margin-top: 1rem }
.sources { list-style: none; padding: 0; margin: .3rem 0 .6rem; font-size: .85rem; color: var(--gris) }
.sources li { margin: .25rem 0; max-width: 75ch }
.sources q { font-style: italic }
.ctl { font-weight: 700; color: var(--encre); margin-left: .2rem }
.precedents { padding-left: 1.1rem; margin: .4rem 0 }
.precedents li { margin: .6rem 0; max-width: 72ch }
.res { display: block; margin-top: .2rem }

/* Marques (verdicts, faisabilité) */
.badges { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .5rem 0 }
.b { display: inline-flex; align-items: center; gap: .4em; font-size: .85rem; font-weight: 600; white-space: nowrap }
.b::before { content: ""; width: .65em; height: .65em; border-radius: 2px; background: var(--c, var(--neutre)) }
.b-sans { font-weight: 400; color: var(--gris) }
.b-sans::before { display: none }
.b-rouge { --c: var(--rouge) } .b-orange { --c: var(--orange) } .b-ocre { --c: var(--ocre) }
.b-vert { --c: var(--vert) } .b-violet { --c: var(--violet) } .b-neutre { --c: var(--neutre) }

/* Candidat */
.fiche { margin: 1.5rem 0 0; max-width: 60rem }
.fiche > div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--filet) }
.fiche dt { color: var(--gris); font-size: .95rem }
.fiche dd { margin: 0 }
.volet h2 { margin-top: 2.5rem }
.barre { display: flex; gap: 2px; height: .75rem; max-width: 42rem; margin: .8rem 0 .5rem; border-radius: 3px; overflow: hidden }
.barre span { background: var(--neutre) }
.s-rouge { background: var(--rouge) !important } .s-orange { background: var(--orange) !important } .s-ocre { background: var(--ocre) !important }
.s-vert { background: var(--vert) !important } .s-violet { background: var(--violet) !important } .s-neutre { background: var(--neutre) !important }
.legende-barre { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding: 0; margin: 0 0 .5rem; font-size: .9rem }
.legende-barre .b { font-weight: 400 }
.docs { padding-left: 1.1rem; font-size: .95rem }
.docs li { margin: .3rem 0 }

/* Candidat × thème */
.verif, .mesure, .cout { padding: 1rem 0; border-bottom: 1px solid var(--filet) }
.verif blockquote { font-size: 1.05rem; border-left-color: var(--encre) }
.mesure h3, .cout h3 { font-size: 1rem }
.cout h3 a { text-decoration: none }
.id { font-size: .8rem; color: var(--gris); margin-left: .4rem }
.incoh { padding: 0; list-style: none }
.incoh li { padding: .7rem 0; border-bottom: 1px solid var(--filet); max-width: 75ch }
:target { scroll-margin-top: 1rem; animation: repere 2.4s ease-out }
@keyframes repere { from { background: var(--trait) } to { background: transparent } }

@media (max-width: 40rem) {
  body { font-size: 1rem }
  .cherche-mini { margin-left: 0; width: 100% }
  .cherche-mini input { width: 100% }
  .fiche > div { grid-template-columns: 1fr; gap: .1rem }
  .voisins { grid-template-columns: 1fr }
  .voisins a[rel=next] { grid-column: 1; text-align: left }
  .mx tbody th { min-width: 11rem }
}
@media (prefers-reduced-motion: reduce) { :target { animation: none } }
@media print { .tete, .pied, .vue, .choix, .cherche, .exemples { display: none } details > *:not(summary) { display: block } }
