/* Phare Facture — charte commune de la gamme Phare : bleu nuit (confiance), turquoise lagon (accent de Phare Facture),
   blanc cassé (respiration). Turquoise vif (--facture) = décor seulement, jamais de texte blanc dessus ;
   --facture-action (plus foncé) = boutons, repères et texte, contraste 5,7:1 avec du blanc.
   Élément signature : le feu tricolore du rapport. */
:root {
  --navy: oklch(0.26 0.063 266);
  --navy-soft: oklch(0.42 0.06 264);
  --facture: oklch(0.72 0.108 190);
  --facture-soft: oklch(0.955 0.03 192);
  --facture-action: oklch(0.5 0.09 195);
  --lagon: oklch(0.42 0.06 264);
  --lagon-soft: oklch(0.955 0.015 260);
  --sable: oklch(0.975 0.011 85);
  --ok: oklch(0.63 0.13 155);
  --ok-soft: oklch(0.955 0.04 155);
  --warn: oklch(0.76 0.14 75);
  --warn-soft: oklch(0.96 0.05 80);
  --alert: oklch(0.6 0.2 25);
  --alert-soft: oklch(0.955 0.035 25);
  --fond: oklch(0.99 0.005 85);
  --encre: oklch(0.26 0.063 266);
  --carte: #fff;
  --muted: oklch(0.96 0.008 85);
  --discret: oklch(0.49 0.03 265);
  --trait: oklch(0.915 0.012 260);
  --ombre: 0 2px 8px -2px oklch(0.25 0.06 266 / 0.08), 0 12px 32px -12px oklch(0.25 0.06 266 / 0.14);
  --lueur: 0 18px 40px -18px oklch(0.5 0.09 195 / 0.5);
  --rayon: 1rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
       font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--navy-soft); outline-offset: 2px; border-radius: 6px; }
.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 16px; background: var(--carte); padding: 8px 12px; z-index: 10; }
.discret { color: var(--discret); }
.petit { font-size: .875rem; }
.tres-petit { font-size: .75rem; }

.int { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .int { padding: 0 24px; } }
main { min-height: 50vh; }

.entete-site { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--fond) 92%, transparent);
               backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait); }
.entete-site .int { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--encre); font-weight: 800; font-size: 1.12rem; }
.logo { display: inline-flex; width: 36px; height: 36px; flex: none; }
.logo img { width: 36px; height: 36px; border-radius: 16px; }
.marque .service { color: var(--facture-action); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; font-size: .93rem; font-weight: 600; }
.nav a { text-decoration: none; color: var(--discret); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--facture-action); }

.flash { max-width: 72rem; margin: 16px auto 0; padding: 12px 16px; border-left: 5px solid var(--navy); background: var(--carte); border-radius: 8px; }
.flash.ok { border-color: var(--ok); } .flash.erreur { border-color: var(--alert); }

.section { max-width: 72rem; margin: 0 auto; padding: 56px 16px; }
@media (min-width: 640px) { .section { padding-left: 24px; padding-right: 24px; } }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: calc(var(--rayon) + 12px); box-shadow: var(--ombre); }
.carte.pad { padding: 24px; }
.hero { overflow: hidden; background-image: radial-gradient(1100px 520px at 80% -10%, color-mix(in oklab, var(--lagon) 10%, transparent), transparent),
                          radial-gradient(820px 420px at 5% 5%, color-mix(in oklab, var(--facture) 16%, transparent), transparent); }
.hero .section { display: grid; gap: 40px; align-items: center; }
@media (min-width: 768px) { .hero .section { grid-template-columns: 1.15fr .85fr; padding-top: 80px; padding-bottom: 80px; } }
.pastille { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--trait); background: var(--carte); border-radius: 999px;
            padding: 6px 12px; font-size: .75rem; font-weight: 600; color: var(--discret); }
.accroche { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.3; }
.chapo { font-size: 1.12rem; color: var(--discret); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.bouton { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 12px 24px; border-radius: 16px; font-weight: 700;
          font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.bouton.principal { background: var(--facture-action); color: #fff; box-shadow: var(--lueur); }
.bouton.principal:hover { background: color-mix(in oklab, var(--facture-action) 88%, black); }
.bouton.secondaire { background: var(--carte); color: var(--encre); border: 1px solid var(--trait); }
.bouton.secondaire:hover { background: var(--muted); }
.bouton.compact { min-height: 44px; padding: 8px 16px; border-radius: 12px; }

.grille3 { display: grid; gap: 20px; }
@media (min-width: 768px) { .grille3 { grid-template-columns: repeat(3, 1fr); } }
.grille2 { display: grid; gap: 20px; }
@media (min-width: 768px) { .grille2 { grid-template-columns: repeat(2, 1fr); } }
.icone { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 16px; background: var(--lagon-soft); }
.icone svg { width: 24px; height: 24px; color: var(--navy); }
.etape { margin-top: 20px; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--facture-action); }

.bandeau-navy { color: #fff; border-radius: calc(var(--rayon) + 12px); padding: 40px 24px;
                background-image: linear-gradient(140deg, var(--navy), color-mix(in oklab, var(--navy) 70%, var(--lagon))); }
.bandeau-navy p { color: rgb(255 255 255 / .8); }
.garanties { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 640px) { .garanties { grid-template-columns: repeat(3, 1fr); } }
.garanties div { background: rgb(255 255 255 / .1); border-radius: 16px; padding: 16px; font-size: .9rem; font-weight: 500; }

.avertissement { background: var(--warn-soft); border-radius: 16px; padding: 16px 20px; font-size: .9rem; margin-top: 20px; }
ul.puces { padding-left: 20px; margin: 12px 0 0; font-size: .92rem; }
ul.puces li { margin-bottom: 6px; }

/* Exemple de rapport */
.exemple .tete { padding: 20px 24px; color: rgb(255 255 255 / .9);
                 background-image: linear-gradient(140deg, var(--navy), color-mix(in oklab, var(--navy) 70%, var(--lagon)));
                 border-radius: calc(var(--rayon) + 12px) calc(var(--rayon) + 12px) 0 0; }
.exemple .tete .surtitre { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .7); margin: 0; }
.exemple .niveau { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.exemple .niveau .signe { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 16px;
                          background: var(--warn); color: var(--navy); font-weight: 800; font-size: 1.1rem; }
.exemple .niveau p { margin: 0; }
.exemple .corps { padding: 24px; }
.pilule { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 3px 12px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pilule::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.pilule.ROUGE { background: var(--alert-soft); } .pilule.ROUGE::before { background: var(--alert); }
.pilule.ORANGE { background: var(--warn-soft); } .pilule.ORANGE::before { background: var(--warn); }
.pilule.VERT { background: var(--ok-soft); } .pilule.VERT::before { background: var(--ok); }
.source { display: inline-block; margin-top: 4px; border-radius: 6px; padding: 1px 8px; font-size: .7rem; font-weight: 700; background: var(--muted); }
.source.observe { background: var(--lagon-soft); } .source.averifier { background: var(--warn-soft); }
.theme { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; font-size: .9rem; font-weight: 600; }
ol.numeros { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: n; font-size: .9rem; color: var(--discret); }
ol.numeros li { counter-increment: n; display: flex; gap: 12px; margin-bottom: 8px; }
ol.numeros li::before { content: counter(n); flex: none; display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center;
                        border-radius: 50%; background: var(--facture-action); color: #fff; font-size: .7rem; font-weight: 800; margin-top: 2px; }
.boite { background: color-mix(in oklab, var(--muted) 70%, transparent); border-radius: 16px; padding: 16px; }
.encart { margin-top: 16px; background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 12px; font-size: .78rem; }
.encart p { margin: 2px 0; }

.fondateur { display: grid; gap: 24px; }
@media (min-width: 640px) { .fondateur { grid-template-columns: 160px 1fr; } }
.fondateur img { width: 160px; height: 160px; border-radius: 16px; object-fit: cover; background: var(--muted); }

details.faq { border-top: 1px solid var(--trait); padding: 0 16px; }
details.faq:first-child { border-top: 0; }
details.faq summary { cursor: pointer; padding: 20px 0; font-weight: 700; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; font-weight: 800; color: var(--discret); }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--discret); font-size: .92rem; padding-bottom: 16px; }

.lagon { background: var(--lagon-soft); }
.final { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Pages de texte */
.article { max-width: 56rem; margin: 0 auto; padding: 48px 16px 64px; }
@media (min-width: 640px) { .article { padding-left: 24px; padding-right: 24px; } }
.article section { margin-top: 40px; }
.article ol { padding-left: 24px; }
.article ol li { margin-bottom: 10px; }
.article a { text-decoration: underline; }
.reflexes { border-left: 4px solid var(--facture); background: var(--lagon-soft); padding: 24px; border-radius: 0 24px 24px 0; }
.liens-ancres { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: .9rem; margin-top: 32px; }
table.contacts { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.contacts th, table.contacts td { text-align: left; padding: 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
table.contacts thead th { background: var(--muted); }
.tableau-defilant { overflow-x: auto; }

/* Formulaires */
.formulaire { max-width: 28rem; margin: 48px auto; padding: 32px 24px; }
.formulaire label { display: block; font-weight: 700; margin-bottom: 6px; }
.formulaire input[type=email], .formulaire input[type=text] { width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px;
       border: 1px solid var(--trait); border-radius: 12px; background: var(--carte); color: var(--encre); }
.formulaire input.code { font-size: 1.8rem; letter-spacing: .4em; text-align: center; font-weight: 800; }
.formulaire .bouton { width: 100%; justify-content: center; margin-top: 16px; }
.erreur-champ { color: var(--alert); font-weight: 600; font-size: .92rem; }

.pied { margin-top: 80px; border-top: 1px solid var(--trait); background: var(--sable); padding-top: 48px; }
.pied-marque { font-weight: 800; font-size: 1.12rem; margin-bottom: 8px; }
.pied-titre { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); margin-bottom: 12px; }
.pied-liens { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.pied-liens li { margin-bottom: 8px; }
.pied-liens a { text-decoration: none; }
.pied-liens a:hover { color: var(--facture-action); }
.copyright { text-align: center; font-size: .75rem; color: var(--discret); border-top: 1px solid var(--trait); padding: 20px 16px; margin: 40px 0 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; } }

/* ---------- Parcours : démarrage, vérification, questionnaire ---------- */
.parcours { max-width: 42rem; margin: 0 auto; padding: 40px 16px 64px; }
.parcours.large { max-width: 48rem; }
.etapes { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 32px; }
.etapes li { flex: 1; font-size: .72rem; font-weight: 600; color: var(--discret); }
.etapes li span { display: block; height: 6px; border-radius: 99px; background: var(--trait); margin-bottom: 8px; }
.etapes li.faite span { background: var(--facture-action); }
.etapes li[aria-current] { color: var(--encre); }
.titre-etape { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; }
.label, .formulaire-large label { display: block; font-weight: 700; font-size: .92rem; margin: 18px 0 6px; }
.formulaire-large input, .formulaire-large textarea, .parcours input[type=email], .parcours input[type=text], .parcours textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 12px; background: var(--carte); color: var(--encre); }
.parcours input[aria-invalid=true], .parcours textarea[aria-invalid=true] { border-color: var(--alert); }
.parcours input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-weight: 800; }
.deux-colonnes { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .deux-colonnes { grid-template-columns: 1fr 1fr; } }
.choix { display: grid; gap: 12px; margin-top: 20px; }
.choix.trois { margin-top: 6px; }
@media (min-width: 640px) { .choix.trois { grid-template-columns: repeat(3, 1fr); } }
.carte-choix { position: relative; display: block; cursor: pointer; padding: 18px 20px; border: 2px solid var(--trait); border-radius: 16px;
               background: var(--carte); box-shadow: var(--ombre); transition: border-color .15s, transform .15s; }
.carte-choix:hover { transform: translateY(-2px); }
.carte-choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.carte-choix:has(input:checked) { border-color: var(--facture-action); }
.carte-choix:has(input:focus-visible) { outline: 3px solid var(--navy-soft); outline-offset: 2px; }
.titre-choix { display: block; font-weight: 700; }
.detail-choix { display: block; font-size: .88rem; color: var(--discret); margin-top: 2px; }
details.pourquoi { margin-top: 10px; font-size: .9rem; }
details.pourquoi summary { cursor: pointer; color: color-mix(in oklab, var(--lagon) 70%, black); font-weight: 600; }
details.pourquoi p { background: var(--lagon-soft); border-radius: 16px; padding: 14px 16px; margin-top: 8px; }
.bouton.plein { width: 100%; justify-content: center; margin-top: 28px; }
.boutons { display: flex; gap: 12px; margin-top: 28px; }
.boutons .bouton.principal { flex: 1; justify-content: center; }
.bandeau { border-radius: 14px; padding: 12px 16px; font-size: .9rem; margin: 16px 0 0; }
.bandeau.ok { background: var(--ok-soft); } .bandeau.attention { background: var(--warn-soft); } .bandeau.lagon { background: var(--lagon-soft); }
label.case { display: flex; gap: 14px; align-items: flex-start; padding: 18px; margin-top: 14px; border: 1px solid var(--trait);
             border-radius: 16px; background: var(--carte); box-shadow: var(--ombre); cursor: pointer; font-size: .92rem; }
label.case input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--facture-action); }
dl.recap { margin: 20px 0 0; font-size: .92rem; }
dl.recap div { display: flex; justify-content: space-between; margin-bottom: 8px; }
dl.recap dt { color: var(--discret); } dl.recap dd { margin: 0; font-weight: 700; }
dl.recap .total { border-top: 1px solid var(--trait); padding-top: 12px; font-size: 1.05rem; }
dl.recap .total dt { color: var(--encre); font-weight: 700; } dl.recap .total dd { font-weight: 800; }
.jeton { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--muted); border-radius: 16px; padding: 14px; margin-top: 16px; }
.jeton code { flex: 1; word-break: break-all; font-weight: 700; font-size: .88rem; }
.onglets { margin-top: 16px; display: grid; gap: 8px; }
.onglets details { border: 1px solid var(--trait); border-radius: 12px; padding: 10px 14px; }
.onglets summary { cursor: pointer; font-weight: 700; }
pre.message { white-space: pre-wrap; font-family: inherit; font-size: .85rem; background: var(--muted); border-radius: 12px; padding: 14px; }

.barre-parcours { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.carte-escales { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.carte-escales li { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
                    border: 2px solid var(--trait); background: var(--carte); opacity: .6; font-size: 1rem; }
.carte-escales li.fait { border-color: var(--ok); background: var(--ok-soft); opacity: 1; }
.carte-escales li.actif { border-color: var(--facture-action); background: var(--facture-soft); opacity: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.entete-question { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.titre-question { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; line-height: 1.25; }
.lien-externe { display: inline-block; margin-top: 16px; padding: 12px 16px; border: 2px dashed var(--lagon); border-radius: 16px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.reponses { display: grid; gap: 12px; margin-top: 24px; }
.reponse { display: flex; align-items: center; gap: 16px; min-height: 60px; width: 100%; text-align: left; font: inherit; font-weight: 600;
           padding: 14px 18px; border: 2px solid var(--trait); border-radius: 16px; background: var(--carte); color: var(--encre); cursor: pointer; }
.reponse:hover { border-color: var(--lagon); background: color-mix(in oklab, var(--lagon-soft) 50%, white); }
.reponse.choisie { border-color: var(--facture-action); background: var(--facture-soft); }
.reponse .numero { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
                   background: var(--muted); color: var(--discret); font-size: .85rem; }
.reponse.choisie .numero { background: var(--facture-action); color: #fff; }
.retour { border-radius: 16px; padding: 12px 16px; font-size: .9rem; font-weight: 500; background: var(--sable); margin: 0 0 16px; }
.retour.bon { background: var(--ok-soft); }
.navigation { display: flex; justify-content: space-between; margin-top: 20px; font-weight: 600; font-size: .92rem; }
.navigation a { text-decoration: none; }
.astuce { text-align: center; margin-top: 24px; }
@media (max-width: 640px) { .astuce { display: none; } }
.medaille { margin: 16px auto 0; width: 96px; height: 96px; border-radius: 50%; background: var(--ok-soft); display: flex; align-items: center;
            justify-content: center; font-size: 3rem; box-shadow: var(--ombre); }
.forts { background: var(--ok-soft); }
.entete-espace { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.liste-dossiers { display: grid; gap: 16px; margin-top: 24px; }
.dossier { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.actions-dossier { display: flex; gap: 8px; flex-wrap: wrap; }

/* Codes de gratuité */
.nouveau-code { margin-top: 24px; border: 2px solid var(--ok); background: var(--ok-soft); }
.code-affiche { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.code-affiche code { font-size: 1.6rem; font-weight: 800; letter-spacing: .08em; }

/* ---------- Administration : relecture (session 6) ---------- */
.surtitre { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--discret); margin: 0; }
.section.large { max-width: 84rem; }
.onglets-relecture { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.onglets-relecture a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--trait);
  background: var(--carte); color: var(--encre); text-decoration: none; font-weight: 700; font-size: .9rem; }
.onglets-relecture a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.compteur { background: var(--muted); color: var(--encre); border-radius: 999px; padding: 0 8px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.etiquette { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 700; background: var(--muted); white-space: nowrap; }
.etiquette.ok { background: var(--ok-soft); } .etiquette.attention { background: var(--warn-soft); } .etiquette.lagon { background: var(--lagon-soft); }
td.en-retard { color: var(--alert); font-weight: 700; }
.relecture { display: grid; gap: 32px; margin-top: 24px; }
@media (min-width: 1024px) { .relecture { grid-template-columns: 1fr 1fr; align-items: start; } }
.titre-bloc { font-size: 1.15rem; margin: 0 0 12px; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.constat { margin-top: 12px; } .constat h3 { font-size: 1rem; margin: 0; }
.preuve { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--discret); margin: 8px 0 0; overflow-wrap: anywhere; }
.bloc-facture, .bloc-technique { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem; background: var(--muted); border-radius: 12px; padding: 12px 14px; margin: 12px 0 0; }
.bouton.rouge { color: var(--alert); }
.formulaire-large textarea, .formulaire-large select { width: 100%; font: inherit; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; background: #fff; }

/* ---------- Rapport (repris de ReportView.tsx) ---------- */
.rapport { display: grid; gap: 24px; }
.rapport > *, .feu-ligne > div { min-width: 0; }  /* le tableau des flux défile dans sa carte au lieu d'élargir la page */
.rapport .sources-ligne { overflow-wrap: anywhere; }
/* Carte des factures sur téléphone : une fiche par flux au lieu d'un tableau à trois colonnes. */
@media (max-width: 640px) {
  .rapport table.admin thead { display: none; }
  .rapport table.admin, .rapport table.admin tbody, .rapport table.admin tr, .rapport table.admin td { display: block; }
  .rapport table.admin tr { padding: 14px 0; border-bottom: 1px solid var(--trait); }
  .rapport table.admin td { padding: 4px 0; border: 0; }
}
.rapport .titre-rapport { font-size: 1.15rem; margin: 0 0 12px; }
.rapport h3 { font-size: 1rem; margin: 4px 0 0; }
.surtitre.clair { color: rgb(255 255 255 / .7); }
.note-relecteur { border-left: 4px solid var(--facture); }
.niveau-risque { overflow: hidden; color: #fff; padding: 32px 24px; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); }
.niveau-valeur { display: flex; align-items: center; gap: 12px; font-size: 2.25rem; font-weight: 800; margin: 8px 0 0; }
.pastille-niveau { width: 16px; height: 16px; border-radius: 999px; background: var(--warn); }
.pastille-niveau.vert { background: var(--ok); } .pastille-niveau.rouge { background: var(--alert); }
.niveau-risque .raison { margin: 8px 0 0; max-width: 36rem; }
.niveau-risque .texte-niveau { margin: 8px 0 0; max-width: 36rem; color: rgb(255 255 255 / .8); }
.liste-forces, .liste-themes, .liste-constats { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; font-size: .9rem; }
.liste-forces li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.liste-forces .coche { color: var(--ok); font-weight: 700; } .liste-forces .libelle { flex: 1; min-width: 0; }
.source { display: inline-flex; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 600; background: var(--muted); }
.source.constate { background: var(--lagon-soft); color: var(--navy-soft); }
.pilule-risque { border-radius: 999px; padding: 3px 12px; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--warn-soft); color: oklch(0.45 0.1 70); }
.pilule-risque.vert { background: var(--ok-soft); color: oklch(0.42 0.1 155); } .pilule-risque.rouge { background: var(--alert-soft); color: oklch(0.48 0.17 25); }
.liste-constats li { display: flex; gap: 12px; background: var(--muted); border-radius: 16px; padding: 14px 16px; }
.point { flex-shrink: 0; width: 12px; height: 12px; border-radius: 999px; margin-top: 6px; background: var(--discret); }
.point.ok { background: var(--ok); } .point.info { background: var(--lagon); } .point.warn { background: var(--warn); } .point.alert { background: var(--alert); }
.encadre-gris { background: var(--muted); border-radius: 16px; padding: 14px 16px; margin: 12px 0 0; }
.action-rapport { display: flex; gap: 16px; margin-top: 12px; }
.action-rapport .numero { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 999px; background: var(--facture-action); color: #fff; font-weight: 700; font-size: .9rem; }
.jetons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; font-size: .75rem; }
.jetons span { background: var(--muted); border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.comment-faire { padding: 8px 16px; }
.comment-faire details { border-bottom: 1px solid var(--trait); padding: 14px 0; }
.comment-faire details:last-child { border-bottom: 0; }
.comment-faire summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.bloc-copie .cadre { border: 1px solid var(--trait); background: var(--muted); border-radius: 10px; padding: 10px 12px; }
.bloc-copie .cadre button { float: right; margin: 0 0 8px 8px; }
.bloc-copie pre { white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem;
  color: var(--encre); margin: 0; clear: both; }
.grille-plan { display: grid; gap: 16px; margin-top: 4px; }
@media (min-width: 640px) { .grille-plan { grid-template-columns: 1fr 1fr; } }
.grille-plan .encadre-gris { margin: 0; }
pre.message-prestataire { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: .9rem; line-height: 1.6; margin: 12px 0; }
.rapport table.contacts th { width: 40%; }


/* ---------- Phare Facture : feu tricolore (élément signature) ---------- */
.feu { display: inline-flex; flex-direction: column; gap: 6px; padding: 8px; flex: none; background: var(--navy); border-radius: 14px;
       box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--navy) 80%, white); }
.feu span { width: 18px; height: 18px; border-radius: 50%; background: color-mix(in oklab, white 12%, var(--navy)); }
.feu.rouge span:nth-child(1) { background: var(--alert); box-shadow: 0 0 14px var(--alert); }
.feu.orange span:nth-child(2) { background: var(--warn); box-shadow: 0 0 14px var(--warn); }
.feu.vert span:nth-child(3) { background: var(--ok); box-shadow: 0 0 14px var(--ok); }
.feu.grand { gap: 10px; padding: 14px; border-radius: 22px; }
.feu.grand span { width: 40px; height: 40px; }
.feux { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 900px) { .feux { grid-template-columns: repeat(3, 1fr); } }
.feu-ligne { display: flex; gap: 16px; align-items: flex-start; background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; padding: 16px; }
.feu-ligne h3 { font-size: 1rem; margin: 0; }
.feu-ligne p { margin: 6px 0 0; font-size: .9rem; color: var(--discret); }
.verdict { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 800;
           letter-spacing: .02em; background: var(--muted); }
.verdict.vert { background: var(--ok-soft); color: oklch(0.42 0.1 155); }
.verdict.orange { background: var(--warn-soft); color: oklch(0.45 0.1 70); }
.verdict.rouge { background: var(--alert-soft); color: oklch(0.48 0.17 25); }

/* Accueil : illustration feu + extrait de rapport */
.vitrine { position: relative; max-width: 26rem; margin: 0 auto; }
.vitrine .carte { padding: 24px; }
.vitrine .entete-vitrine { display: flex; gap: 20px; align-items: center; }
.vitrine .entete-vitrine p { margin: 0; }
.vitrine ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: .9rem; }
.vitrine li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--trait); padding-top: 10px; }
.compte-a-rebours { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--facture-action); }
.dom { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 768px) { .dom { grid-template-columns: repeat(3, 1fr); } }
.dom .carte { border-top: 4px solid var(--facture); }

/* Questionnaire : progression par blocs et cases à cocher */
.blocs { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.blocs li { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; font-size: .85rem;
            border: 2px solid var(--trait); background: var(--carte); color: var(--discret); }
.blocs li.fait { border-color: var(--ok); background: var(--ok-soft); color: var(--encre); }
.blocs li.actif { border-color: var(--facture-action); background: var(--facture-soft); color: var(--encre); }
.pastille.bloc { background: var(--facture-soft); border-color: transparent; color: var(--encre); }
.reponse.case { cursor: pointer; }
.reponse.case input { width: 22px; height: 22px; flex: none; accent-color: var(--facture-action); }
.reponse.case:has(input:checked) { border-color: var(--facture-action); background: var(--facture-soft); }
.reponse.case:has(input:focus-visible) { outline: 3px solid var(--navy-soft); outline-offset: 2px; }
.balise-bloc { margin: 16px auto 0; width: 96px; height: 96px; border-radius: 28px; background: var(--facture-soft); display: flex; align-items: center;
               justify-content: center; font-size: 2.4rem; font-weight: 800; color: var(--facture-action); box-shadow: var(--ombre); }

/* Rapport */
.frise { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0; position: relative; }
@media (min-width: 720px) { .frise { grid-template-columns: repeat(3, 1fr); } }
.frise li { position: relative; padding: 18px 16px 0 0; border-top: 4px solid var(--trait); }
.frise li.passee { border-top-color: var(--navy-soft); }
.frise li.aujourdhui { border-top-color: var(--facture-action); }
.frise li::before { content: ""; position: absolute; top: -11px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--carte);
                    border: 4px solid var(--trait); }
.frise li.passee::before { border-color: var(--navy-soft); } .frise li.aujourdhui::before { border-color: var(--facture-action); background: var(--facture); }
.frise .quand { font-weight: 800; } .frise .quoi { font-size: .9rem; color: var(--discret); }
table.flux { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 12px; }
table.flux th, table.flux td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
table.flux thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); }
.circuit { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 800; white-space: nowrap; background: var(--muted); }
.circuit.fe, .circuit.recue_fe { background: var(--facture-soft); color: oklch(0.38 0.07 195); }
.circuit.ereporting { background: var(--warn-soft); color: oklch(0.45 0.1 70); }
.circuit.chorus { background: var(--lagon-soft); color: var(--navy-soft); }
.fiabilite { display: inline-block; margin-top: 6px; font-size: .75rem; font-weight: 700; color: oklch(0.45 0.1 70); }
.sources-ligne { font-size: .75rem; margin: 4px 0 0; } .sources-ligne a { color: var(--discret); }
.piege { border-left: 4px solid var(--facture); background: var(--facture-soft); border-radius: 0 16px 16px 0; padding: 14px 16px; margin-top: 12px; }
.piege h3 { font-size: 1rem; margin: 0 0 4px; } .piege p { margin: 0; font-size: .92rem; }
.statut-outil { display: inline-block; border-radius: 12px; padding: 6px 14px; font-weight: 800; background: var(--warn-soft); }
.statut-outil.a_remplacer { background: var(--alert-soft); color: oklch(0.48 0.17 25); }
.statut-outil.a_faire_evoluer, .statut-outil.a_organiser { background: var(--warn-soft); color: oklch(0.45 0.1 70); }
.statut-outil.non_concerne { background: var(--muted); }
ol.plan { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: p; display: grid; gap: 12px; }
ol.plan li { counter-increment: p; display: grid; grid-template-columns: 36px 1fr; gap: 4px 14px; background: var(--muted); border-radius: 16px; padding: 14px 16px; }
ol.plan li::before { content: counter(p); grid-row: span 3; width: 32px; height: 32px; border-radius: 50%; background: var(--facture-action); color: #fff;
                     display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
ol.plan .quand { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--facture-action); }
ol.plan strong { display: block; } ol.plan span.texte { font-size: .9rem; color: var(--discret); }
.case-a-cocher { list-style: none; padding: 0; } .case-a-cocher li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.case-a-cocher li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border: 2px solid var(--navy-soft); border-radius: 4px; }
.partenaire { border: 1px solid var(--trait); border-radius: 18px; padding: 18px; background: var(--carte); margin-top: 12px; }
.partenaire h4 { margin: 0; font-size: 1.05rem; }
.partenaire form { margin-top: 12px; }
.partenaire textarea { width: 100%; font: inherit; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; }
.mention-payante { font-size: .78rem; color: var(--discret); background: var(--muted); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.mention-rapport { font-size: .82rem; color: var(--discret); border: 1px dashed var(--trait); border-radius: 14px; padding: 12px 14px; }
.autres-phare { display: grid; gap: 12px; } @media (min-width: 640px) { .autres-phare { grid-template-columns: 1fr 1fr; } }
.autres-phare a { display: block; text-decoration: none; border: 1px solid var(--trait); border-radius: 16px; padding: 14px 16px; background: var(--carte); }
.autres-phare a strong { display: block; }
.autres-phare a span { font-size: .85rem; color: var(--discret); }

/* Guide public */
table.calendrier { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 16px; }
table.calendrier th, table.calendrier td { text-align: left; padding: 12px; border-bottom: 1px solid var(--trait); }
table.calendrier thead th { background: var(--facture-soft); }
.en-bref { background: var(--facture-soft); border-radius: 24px; padding: 24px; }
.en-bref ul { margin: 8px 0 0; padding-left: 20px; } .en-bref li { margin-bottom: 6px; }

/* Administration : partenaires */
table.admin { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 16px; }
table.admin th, table.admin td { text-align: left; padding: 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
table.admin thead th { background: var(--muted); }
.cases-territoires { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.cases-territoires label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
