/* ==========================================================================
   jecorrige.com — Design system « la copie corrigée »
   Papier chaud + encre marine + accents stylo rouge / surligneur.
   Cible : RGAA / WCAG 2.2 AA+ (contrastes AAA quand possible).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    --papier: #F7F2E9;
    --papier-clair: #FBF8F1;
    --surface: #FFFFFF;
    --encre: #17203A;
    --encre-2: #414D68;
    --encre-3: #5D6880; /* ≥ 4.5:1 sur papier, papier-clair, action-fond et blanc */
    --bordure: #E4DCCA;
    --bordure-forte: #C9BFA6;
    --action: #1E40AF;
    --action-hover: #172F86;
    --action-fond: #E9EEFB;
    --stylo-rouge: #B42318;
    --surligneur: #FFE066;
    --surligneur-hover: #FFD83B;
    --succes: #067647;
    --succes-fond: #DFF1E7;
    --succes-bord: #9AD1B4;
    --alerte: #92400E;
    --alerte-fond: #FEF0D8;
    --alerte-bord: #EBCB90;
    --erreur: #B42318;
    --erreur-fond: #FBEAE8;
    --erreur-bord: #E5A9A2;
    --papier-hover: #F3EDDE;
    --encre-claire: #F1ECDF;
    --encre-texte-2: #C8C0AC;

    /* Taille de texte pilotée par la barre d'affichage (A / A+ / A++). */
    font-size: 100%;
}

html[data-taille="grande"] { font-size: 115%; }
html[data-taille="tres-grande"] { font-size: 130%; }

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--papier);
    color: var(--encre);
    font-family: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
    font-size: 1.125rem; /* 18px */
    line-height: 1.55;
}

main { flex: 1; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: 2.25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; }

a { color: var(--action); font-weight: 700; }
a:hover { color: var(--stylo-rouge); }

::selection { background: var(--surligneur); color: var(--encre); }

:focus-visible {
    outline: 3px solid var(--stylo-rouge);
    outline-offset: 3px;
    border-radius: 4px;
}
/* Sur fonds sombres, le rouge ne contraste pas assez : focus jaune. */
.fond-encre :focus-visible,
.btn-lancer:focus-visible,
thead :focus-visible {
    outline-color: var(--surligneur);
}

img { max-width: 100%; height: auto; }

/* Lecteur d'écran uniquement */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Skip-link : premier élément focusable */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 100;
    background: var(--encre);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus {
    left: 16px;
    color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.conteneur { max-width: 1080px; margin: 0 auto; padding: 48px 32px 80px; }
.conteneur-etroit { max-width: 880px; margin: 0 auto; padding: 48px 32px 80px; }
.conteneur-mini { max-width: 480px; margin: 0 auto; padding: 72px 32px; }
.conteneur-large { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* --------------------------------------------------------------------------
   4. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--surface);
    border-bottom: 2px solid var(--bordure);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 16px 24px;
    flex-wrap: wrap;
}

.marque {
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--encre);
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
}
.marque:hover { color: var(--encre); }
.marque .marque-corrige {
    font-weight: 800;
    border-bottom: 4px solid var(--stylo-rouge);
    line-height: 1.05;
}
.marque .marque-tld { color: var(--encre-3); font-size: 1.1rem; }

.nav-liens { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-lien {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--encre);
    text-decoration: none;
}
.nav-lien:hover { background: var(--papier-hover); color: var(--encre); }
.nav-lien[aria-current="page"] { border-color: var(--encre); }

.header-droite { margin-left: auto; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }

.utilisateur { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--encre);
    color: var(--surligneur);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

/* Barre d'affichage : A / A+ / A++ / contraste */
.barre-affichage {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--papier-hover);
    border: 2px solid var(--bordure);
    border-radius: 12px;
    padding: 4px;
}
.barre-affichage .separateur { width: 2px; height: 24px; background: var(--bordure); margin: 0 2px; }
.btn-affichage {
    min-height: 44px;
    min-width: 44px;
    padding: 0 10px;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    background: transparent;
    color: var(--encre);
    border: 2px solid transparent;
}
.btn-affichage:hover { border-color: var(--encre); }
.btn-affichage[aria-pressed="true"] {
    background: var(--encre);
    color: var(--surligneur);
    border-color: var(--encre);
}

/* --------------------------------------------------------------------------
   5. Boutons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primaire {
    background: var(--action);
    color: #FFFFFF;
    border: 2px solid var(--action);
}
.btn-primaire:hover:not(:disabled) { background: var(--action-hover); border-color: var(--action-hover); color: #FFFFFF; }

.btn-secondaire {
    background: var(--surface);
    color: var(--encre);
    border: 2px solid var(--encre);
    font-weight: 700;
}
.btn-secondaire:hover:not(:disabled) { background: var(--papier-hover); color: var(--encre); }

.btn-contour {
    background: none;
    color: var(--action);
    border: 2px solid var(--action);
}
.btn-contour:hover:not(:disabled) { background: var(--action-fond); color: var(--action); }

.btn-lancer {
    background: var(--surligneur);
    color: var(--encre);
    border: 2px solid var(--surligneur);
    min-height: 58px;
    padding: 0 36px;
    font-size: 1.1rem;
}
.btn-lancer:hover:not(:disabled) { background: var(--surligneur-hover); border-color: var(--surligneur-hover); color: var(--encre); }

.btn-grand { min-height: 56px; padding: 0 32px; font-size: 1.1rem; }
.btn-compact { min-height: 44px; padding: 0 16px; font-size: 0.9rem; border-radius: 8px; }

.btn-danger {
    background: none;
    color: var(--stylo-rouge);
    border: 2px solid var(--stylo-rouge);
}
.btn-danger:hover:not(:disabled) { background: var(--erreur-fond); color: var(--stylo-rouge); }

.lien-bouton {
    background: none;
    border: none;
    padding: 6px 2px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    color: var(--action);
    cursor: pointer;
    text-decoration: underline;
}
.lien-bouton:hover { color: var(--stylo-rouge); }

/* --------------------------------------------------------------------------
   6. Cartes, sections, bandeaux
   -------------------------------------------------------------------------- */
.carte {
    background: var(--surface);
    border: 2px solid var(--bordure);
    border-radius: 16px;
    padding: 32px;
}
.carte-compacte { padding: 20px 28px; border-radius: 14px; }

.fond-encre {
    background: var(--encre);
    color: var(--encre-claire);
    border-radius: 16px;
}
.fond-encre h2, .fond-encre h3 { color: #FFFFFF; }
.fond-encre a { color: var(--surligneur); }

.bandeau-lancer {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 28px;
}
.bandeau-lancer p { margin: 0; color: #E8E3D6; font-weight: 700; flex: 1; min-width: 240px; }

/* Numéro d'étape : cercle plein encre, chiffre surligneur */
.num-etape {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--encre);
    color: var(--surligneur);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
}
.num-etape-grand { width: 52px; height: 52px; font-size: 1.3rem; }

.titre-etape {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.35rem;
    margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   7. Pastilles de statut & badge IA
   -------------------------------------------------------------------------- */
.pastille {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
    background: var(--papier-hover);
    color: var(--encre-2);
    border: 1.5px solid var(--bordure);
}
.pastille-succes { background: var(--succes-fond); color: var(--succes); border-color: var(--succes-bord); }
.pastille-alerte { background: var(--alerte-fond); color: var(--alerte); border-color: var(--alerte-bord); }
.pastille-erreur { background: var(--erreur-fond); color: var(--erreur); border-color: var(--erreur-bord); }
.pastille-action { background: var(--action-fond); color: var(--action); border-color: var(--action); }
.pastille-validee { background: var(--succes); color: #FFFFFF; border-color: var(--succes); }
.pastille-surligneur { background: var(--surligneur); color: var(--encre); border-color: var(--surligneur); }

/* Badge IA : marque TOUT contenu généré par l'IA */
.badge-ia {
    display: inline-block;
    flex-shrink: 0;
    background: var(--stylo-rouge);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 6px;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   8. Formulaires
   -------------------------------------------------------------------------- */
label { font-weight: 700; }

.champ { display: grid; gap: 8px; margin-bottom: 20px; }
.champ > .aide { margin: 0; font-size: 0.9rem; color: var(--encre-2); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    min-height: 54px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--encre);
    background: var(--papier-clair);
    border: 2px solid var(--bordure-forte);
    border-radius: 10px;
    width: 100%;
}
textarea { padding: 14px 16px; min-height: 0; resize: vertical; line-height: 1.6; }

input[type="radio"], input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--action);
    flex-shrink: 0;
}

fieldset { border: none; margin: 0; padding: 0; }
legend { font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }

/* Choix radio « carte » : toute l'étiquette est cliquable */
.choix-liste { display: grid; gap: 10px; }
.choix {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--bordure);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    background: var(--surface);
    font-weight: 400;
}
.choix:hover { border-color: var(--action); }
.choix:has(input:checked) { border-color: var(--action); background: var(--action-fond); }
.choix:has(input:focus-visible) { outline: 3px solid var(--stylo-rouge); outline-offset: 3px; }
.choix .detail { color: var(--encre-3); }

.case-a-cocher {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 400;
}

/* Dropzone : vrai bouton + input file natif à côté */
.dropzone {
    width: 100%;
    min-height: 110px;
    background: var(--papier-clair);
    border: 2.5px dashed var(--bordure-forte);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--encre-2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    text-align: center;
}
.dropzone:has(input:focus-visible) {
    outline: 3px solid var(--stylo-rouge);
    outline-offset: 3px;
}
.dropzone:hover, .dropzone.survol {
    border-color: var(--action);
    color: var(--action);
    background: #F5F7FE;
}
.dropzone .dropzone-icone { font-size: 1.7rem; line-height: 1; }
.dropzone .dropzone-aide { font-weight: 400; font-size: 0.9rem; color: var(--encre-3); }

/* Confirmation d'ajout de fichier */
.fichier-ok {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    background: var(--succes-fond);
    border: 1.5px solid var(--succes-bord);
    border-radius: 10px;
    padding: 14px 18px;
    font-weight: 700;
}
.fichier-ok .coche { color: var(--succes); font-size: 1.2rem; }
.fichier-ok .meta { color: var(--encre-3); font-weight: 400; }

/* Messages de flash */
.message-erreur {
    background: var(--erreur-fond);
    border: 2px solid var(--erreur-bord);
    color: var(--erreur);
    font-weight: 700;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.message-succes {
    background: var(--succes-fond);
    border: 2px solid var(--succes-bord);
    color: var(--succes);
    font-weight: 700;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   9. Progression
   -------------------------------------------------------------------------- */
.progression {
    height: 22px;
    background: #EDE7D6;
    border-radius: 999px;
    overflow: hidden;
}
.progression-fine { height: 14px; }
.progression > .progression-barre {
    height: 100%;
    background: var(--action);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Pipeline 3 étapes du suivi */
.pipeline {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.pipeline li {
    border: 2px solid var(--bordure);
    border-radius: 12px;
    padding: 14px 18px;
    background: var(--papier-clair);
    color: var(--encre-2);
}
.pipeline li .pipeline-badge {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}
.pipeline li .pipeline-label { font-weight: 700; font-size: 1rem; }
.pipeline li.etape-faite { border-color: var(--succes-bord); background: var(--succes-fond); color: var(--succes); }
.pipeline li.etape-en-cours { border-color: var(--action); background: var(--action-fond); color: var(--action); }

/* --------------------------------------------------------------------------
   10. Tableaux
   -------------------------------------------------------------------------- */
.carte-table {
    background: var(--surface);
    border: 2px solid var(--bordure);
    border-radius: 16px;
    overflow: hidden;
}
.carte-table > .table-defilement { overflow-x: auto; }

table.table-resultats {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}
.table-resultats thead tr { background: var(--encre); color: #FFFFFF; text-align: left; }
.table-resultats th { font-weight: 800; }
.table-resultats thead th { padding: 14px 16px; }
.table-resultats thead th:first-child { padding-left: 24px; }
.table-resultats tbody tr { border-top: 1.5px solid #EDE7D6; }
.table-resultats tbody th[scope="row"] { padding: 12px 24px; font-weight: 700; text-align: left; }
.table-resultats tbody td { padding: 12px 16px; }
.table-resultats .note { font-weight: 800; font-size: 1.05rem; }

/* Répartition des notes (barres accessibles) */
.repartition { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.repartition li {
    display: grid;
    grid-template-columns: 90px 1fr 44px;
    align-items: center;
    gap: 14px;
}
.repartition .tranche { font-weight: 700; font-size: 0.9rem; color: var(--encre-2); }
.repartition .barre { display: block; height: 18px; background: #EDE7D6; border-radius: 6px; overflow: hidden; }
.repartition .barre > span { display: block; height: 100%; background: var(--action); border-radius: 6px; }
.repartition .compte { font-weight: 800; text-align: right; }

/* Statistiques (dl) */
.stats {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 14px;
}
.stats > div {
    background: var(--surface);
    border: 2px solid var(--bordure);
    border-radius: 14px;
    padding: 18px 22px;
}
.stats dt {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--encre-3);
}
.stats dd { margin: 4px 0 0; font-size: 1.9rem; font-weight: 800; }

/* --------------------------------------------------------------------------
   11. Steppers de points (copie détaillée)
   -------------------------------------------------------------------------- */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .stepper-btn {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: var(--surface);
    border: 2px solid var(--encre);
    color: var(--encre);
    font-size: 1.35rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}
.stepper .stepper-btn:hover { background: var(--papier-hover); }
.stepper input[type="number"] {
    width: 90px;
    min-height: 46px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--stylo-rouge);
    padding: 0 4px;
}
.stepper .stepper-max { color: var(--encre-3); font-weight: 700; white-space: nowrap; }

blockquote.extrait-copie {
    margin: 0 0 14px;
    background: var(--papier-clair);
    border-left: 4px solid var(--bordure-forte);
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    font-style: italic;
    color: var(--encre-2);
    font-size: 0.97rem;
}

.commentaire-ia {
    margin: 0;
    display: flex;
    gap: 12px;
    align-items: baseline;
}

/* Note totale (colonne sticky) */
.note-totale {
    padding: 28px;
    text-align: center;
}
.note-totale .note-libelle {
    margin: 0 0 4px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--encre-texte-2);
}
.note-totale .note-valeur {
    margin: 0;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--surligneur);
}
.note-totale .note-sur { font-size: 1.4rem; color: var(--encre-texte-2); }
.note-totale .note-aide { margin: 10px 0 0; font-size: 0.85rem; color: var(--encre-texte-2); }

.colonne-sticky { position: sticky; top: 24px; display: grid; gap: 18px; align-content: start; }

/* --------------------------------------------------------------------------
   12. Annotations « stylo rouge » (décoratif uniquement)
   -------------------------------------------------------------------------- */
.annotation-stylo {
    font-family: "Caveat", cursive;
    font-weight: 700;
    color: var(--stylo-rouge);
}

/* --------------------------------------------------------------------------
   13. Accueil (hero) & pages publiques
   -------------------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
    padding: 72px 0 64px;
}
.hero h1 { font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1.12; margin: 0 0 20px; text-wrap: balance; }
.hero .hero-intro { font-size: 1.15rem; color: var(--encre-2); max-width: 34em; margin: 0 0 32px; text-wrap: pretty; }

.copie-illustration {
    background: var(--surface);
    border: 1.5px solid #E0D8C4;
    border-radius: 6px;
    box-shadow: 0 24px 48px -20px rgba(23, 32, 58, 0.35);
    transform: rotate(1.6deg);
    padding: 34px 34px 30px;
    position: relative;
}

.bande-pleine {
    background: var(--surface);
    border-top: 2px solid var(--bordure);
    border-bottom: 2px solid var(--bordure);
    padding: 64px 32px;
}
.bande-encre { background: var(--encre); color: var(--encre-claire); padding: 64px 32px; }
.bande-encre h2 { color: #FFFFFF; }

.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* FAQ */
details.faq-item {
    background: var(--surface);
    border: 2px solid var(--bordure);
    border-radius: 14px;
}
details.faq-item summary {
    font-weight: 800;
    font-size: 1.05rem;
    padding: 18px 24px;
    cursor: pointer;
    color: var(--encre);
    border-radius: 12px;
}
details.faq-item summary:hover { color: var(--action); }
details.faq-item > p { margin: 0; padding: 2px 24px 20px; color: var(--encre-2); }

/* Mentions : champs à compléter */
mark {
    background: var(--surligneur);
    color: var(--encre);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.titre-section {
    margin: 0 0 12px;
    font-size: 1.4rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bordure);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 2px solid var(--bordure);
    padding: 26px 32px;
    margin-top: auto;
}
.site-footer .footer-contenu {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px 26px;
    flex-wrap: wrap;
    color: var(--encre-3);
    font-size: 0.9rem;
}
.site-footer nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.site-footer a { font-size: 0.9rem; padding: 8px 4px; }
.site-footer .copyright { margin-left: auto; }

/* --------------------------------------------------------------------------
   15. Toasts (jamais porteurs de la seule information)
   -------------------------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--encre);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 28px;
    border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(23, 32, 58, 0.5);
    z-index: 50;
    margin: 0;
    max-width: 90vw;
}

/* --------------------------------------------------------------------------
   16. HTMX
   -------------------------------------------------------------------------- */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: block; }
.htmx-request.htmx-indicator { display: block; }

/* --------------------------------------------------------------------------
   17. Contraste renforcé (bascule + prefers-contrast)
   Noir sur blanc pur, bordures épaissies.
   -------------------------------------------------------------------------- */
html[data-contraste="renforce"] {
    --papier: #FFFFFF;
    --papier-clair: #FFFFFF;
    --surface: #FFFFFF;
    --encre: #000000;
    --encre-2: #1A1A1A;
    --encre-3: #333333;
    --bordure: #000000;
    --bordure-forte: #000000;
    --action: #0000C7;
    --action-hover: #000080;
    --action-fond: #FFFFFF;
    --stylo-rouge: #A00000;
    --succes: #004D26;
    --succes-fond: #FFFFFF;
    --succes-bord: #004D26;
    --alerte: #5C2800;
    --alerte-fond: #FFFFFF;
    --alerte-bord: #5C2800;
    --erreur: #A00000;
    --erreur-fond: #FFFFFF;
    --erreur-bord: #A00000;
    --papier-hover: #E8E8E8;
    --encre-claire: #FFFFFF;
    --encre-texte-2: #E8E8E8;
}
html[data-contraste="renforce"] .carte,
html[data-contraste="renforce"] .carte-table,
html[data-contraste="renforce"] .choix,
html[data-contraste="renforce"] input,
html[data-contraste="renforce"] select,
html[data-contraste="renforce"] textarea,
html[data-contraste="renforce"] .btn,
html[data-contraste="renforce"] .pastille { border-width: 3px; }
html[data-contraste="renforce"] .progression { border: 2px solid #000000; }
html[data-contraste="renforce"] .note-totale .note-valeur { color: #FFE066; }

@media (prefers-contrast: more) {
    html:not([data-contraste]) {
        --bordure: #8A7F60;
        --bordure-forte: #5C543E;
        --encre-3: #414D68;
    }
}

/* --------------------------------------------------------------------------
   18. Mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }
    .grille-3, .grille-2 { grid-template-columns: 1fr; }
    .pipeline { grid-template-columns: 1fr; }
    .colonne-sticky { position: static; }
    .conteneur, .conteneur-etroit { padding: 32px 20px 64px; }
    .site-header { padding: 12px 20px; }
}
@media (max-width: 600px) {
    .stats { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 1.8rem; }
}
