
  :root {
    --fond: #FAF7F2; --surface: #FFFFFF; --creux: #F3EEE5;
    --encre: #232826; --gris: #6b716e; --trait: #E6E0D5;
    --emeraude: #0F9D8C; --vert-fonce: #0B6F63; --vert-clair: #E4F2EF;
    --fil: #D9553F; --fil-texte: #A8371F; --fil-clair: #FBE9E5;
    --sur-vert: #FAF7F2;
    --ombre: 0 1px 2px rgba(35,40,38,.05), 0 10px 30px rgba(35,40,38,.06);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --fond: #131816; --surface: #1B2220; --creux: #171D1B;
      --encre: #ECEFEA; --gris: #9BA5A0; --trait: #2C3531;
      --emeraude: #36C3B0; --vert-fonce: #86DED2; --vert-clair: #1A2F2B;
      --fil: #F08A76; --fil-texte: #F08A76; --fil-clair: #3A211C; --sur-vert: #0E1513;
      --ombre: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.3);
    }
  }
  :root[data-theme="dark"] {
    --fond: #131816; --surface: #1B2220; --creux: #171D1B;
    --encre: #ECEFEA; --gris: #9BA5A0; --trait: #2C3531;
    --emeraude: #36C3B0; --vert-fonce: #86DED2; --vert-clair: #1A2F2B;
    --fil: #F08A76; --fil-texte: #F08A76; --fil-clair: #3A211C; --sur-vert: #0E1513;
    --ombre: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.3);
  }

  * { box-sizing: border-box; }
  body { background: var(--fond); color: var(--encre); font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; }
  h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
  p { margin: 0; }
  button { font: inherit; color: inherit; cursor: pointer; }
  button:focus-visible, a:focus-visible { outline: 3px solid var(--emeraude); outline-offset: 3px; border-radius: 8px; }
  .petit { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
  .num { font-variant-numeric: tabular-nums; }

  .note-maquette { background: var(--encre); color: var(--fond); font-size: .88rem; padding: 8px clamp(16px, 4vw, 40px); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; }
  .note-maquette button { background: transparent; border: 1px solid currentColor; border-radius: 999px; padding: 3px 14px; color: inherit; font-weight: 600; }

  .barre { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--trait); background: var(--fond); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
  .marque { display: flex; align-items: baseline; gap: 10px; background: none; border: 0; padding: 0; }
  .marque b { font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; font-weight: 600; color: var(--vert-fonce); letter-spacing: .01em; }
  .marque span { color: var(--gris); font-size: .95rem; }
  .moi { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--gris); }
  .pastille-moi { width: 34px; height: 34px; border-radius: 50%; background: var(--vert-clair); color: var(--vert-fonce); display: grid; place-items: center; font-weight: 700; }

  .vue { max-width: 1120px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); padding-block: 40px 80px; }
  [hidden] { display: none !important; }
  .evitement { position: absolute; left: 16px; top: -60px; background: var(--encre); color: var(--fond); padding: 10px 16px; border-radius: 8px; z-index: 30; font-weight: 600; }
  .evitement:focus { top: 12px; }

  /* ---------- Vue parcours ---------- */
  .accueil { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
  @media (max-width: 820px) { .accueil { grid-template-columns: 1fr; } }
  .reprendre { background: var(--vert-fonce); color: var(--sur-vert); border-radius: 22px; padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; gap: 14px; }
  .reprendre .petit { color: inherit; }
  .reprendre h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; }
  .reprendre p { max-width: 46ch; }
  .bouton { align-self: flex-start; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 700; background: var(--sur-vert); color: var(--vert-fonce); margin-top: 6px; }
  .bouton.plein { background: var(--vert-fonce); color: var(--sur-vert); }
  .jauge { height: 8px; border-radius: 999px; background: color-mix(in srgb, currentColor 22%, transparent); overflow: hidden; }
  .jauge i { display: block; height: 100%; border-radius: inherit; background: currentColor; }

  .filrouge { background: var(--surface); border: 1px solid var(--trait); border-radius: 22px; padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; gap: 12px; }
  .filrouge .petit { color: var(--fil-texte); }
  .filrouge h2 { font-size: 1.3rem; line-height: 1.25; }
  .filrouge p { color: var(--gris); font-size: .95rem; }
  .briques { display: flex; gap: 6px; margin-top: auto; }
  .briques i { flex: 1; height: 10px; border-radius: 3px; background: var(--fil-clair); }
  .briques i.pose { background: var(--fil); }

  .titre-section { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 8px; flex-wrap: wrap; }
  .titre-section h2 { font-size: 1.6rem; }
  .titre-section span { color: var(--gris); font-size: .95rem; }

  .chemin { list-style: none; margin: 0; padding: 0; position: relative; }
  .chemin::before { content: ""; position: absolute; left: 19px; top: 28px; bottom: 28px; width: 2px; background: var(--fil); opacity: .55; }
  .bloc { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 18px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--trait); padding: 20px 0; position: relative; }
  .chemin li:last-child .bloc { border-bottom: 0; }
  .noeud { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--fond); border: 2px solid var(--fil); color: var(--fil-texte); z-index: 1; }
  .bloc.fait .noeud { background: var(--fil-texte); border-color: var(--fil-texte); color: var(--fond); }
  .bloc.encours .noeud { box-shadow: 0 0 0 5px var(--fil-clair); }
  .bloc h3 { font-family: "Figtree", system-ui, sans-serif; font-size: 1.08rem; font-weight: 700; letter-spacing: 0; }
  .bloc p { color: var(--gris); font-size: .93rem; }
  .bloc .brique { color: var(--fil-texte); font-size: .88rem; font-weight: 600; }
  .bloc .cote { text-align: right; color: var(--gris); font-size: .9rem; white-space: nowrap; }
  .bloc .cote b { display: block; color: var(--encre); font-size: 1rem; }
  .bloc:hover h3 { color: var(--vert-fonce); }
  @media (max-width: 560px) { .bloc { grid-template-columns: 40px minmax(0, 1fr); } .bloc .cote { grid-column: 2; text-align: left; } .bloc .cote b { display: inline; margin-right: 8px; } }

  /* ---------- Vue leçon ---------- */
  .fil-ariane { color: var(--gris); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 20px; }
  .fil-ariane button { background: none; border: 0; padding: 6px 0; min-height: 24px; color: var(--vert-fonce); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
  .lecon { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
  @media (max-width: 920px) { .lecon { grid-template-columns: 1fr; gap: 40px; } }
  .corps { max-width: 680px; display: flex; flex-direction: column; gap: 22px; }
  .corps h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.12; }
  .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--gris); font-size: .93rem; }
  .verifie { border-left: 3px solid var(--emeraude); background: var(--vert-clair); border-radius: 0 12px 12px 0; padding: 12px 16px; font-size: .93rem; }
  .verifie summary { cursor: pointer; font-weight: 600; color: var(--vert-fonce); }
  .verifie p { margin-top: 8px; color: var(--encre); }
  .verifie button { background: none; border: 0; padding: 6px 0; min-height: 24px; margin-top: 8px; color: var(--vert-fonce); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

  .etapes { display: flex; gap: 4px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); background: var(--fond); padding-block: 10px; z-index: 3; overflow-x: auto; }
  .etapes a { flex: 1; min-width: max-content; text-align: center; text-decoration: none; color: var(--gris); font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: 999px; }
  .etapes a.ici { background: var(--encre); color: var(--fond); }

  .partie { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; scroll-margin-top: 140px; }
  .partie h2 { font-size: 1.45rem; display: flex; align-items: baseline; gap: 12px; }
  .partie h2 small { font-family: "Figtree", system-ui, sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vert-fonce); }
  .partie ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
  .video { aspect-ratio: 16 / 9; max-width: 100%; border-radius: 18px; border: 2px dashed var(--trait); background: var(--creux); display: grid; place-items: center; text-align: center; padding: 24px; }
  .video div { max-width: 44ch; display: flex; flex-direction: column; gap: 8px; color: var(--gris); font-size: .95rem; }
  .video b { color: var(--encre); font-size: 1.05rem; }
  .encadre { border-radius: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--trait); display: flex; flex-direction: column; gap: 6px; }
  .encadre .petit { color: var(--vert-fonce); }
  .encadre.piege .petit { color: var(--fil-texte); }
  .enseigner { background: var(--surface); border-radius: 20px; padding: clamp(20px, 3vw, 30px); box-shadow: var(--ombre); }
  .enseigner dl { margin: 0; display: grid; gap: 14px; }
  .enseigner dt { font-weight: 700; }
  .enseigner dd { margin: 2px 0 0; color: var(--gris); }

  .question { display: flex; flex-direction: column; gap: 10px; }
  .choix { display: flex; flex-direction: column; gap: 8px; }
  .choix button { text-align: left; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 16px; }
  .choix button:hover { border-color: var(--emeraude); }
  .choix button.bon { border-color: var(--emeraude); background: var(--vert-clair); }
  .choix button.faux { border-color: var(--fil); background: var(--fil-clair); }
  .retour { font-size: .95rem; color: var(--gris); min-height: 1.6em; }

  .pied-lecon { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--trait); padding-top: 24px; margin-top: 12px; }
  .lien { background: none; border: 0; padding: 8px 0; min-height: 24px; color: var(--gris); font-weight: 600; }

  .plan { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); display: flex; flex-direction: column; gap: 14px; }
  @media (max-width: 920px) { .plan { position: static; } }
  .plan h2 { font-family: "Figtree", system-ui, sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
  .plan ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .plan li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--trait); font-size: .94rem; color: var(--gris); }
  .plan li.actuelle { color: var(--encre); font-weight: 600; }
  .plan li .rond { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--trait); align-self: center; }
  .plan li.vue .rond { background: var(--emeraude); border-color: var(--emeraude); }
  .plan li.actuelle .rond { border-color: var(--emeraude); }
  .plan .brique-module { background: var(--fil-clair); color: var(--fil-texte); border-radius: 12px; padding: 12px 14px; font-size: .9rem; font-weight: 600; }

  .toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); background: var(--encre); color: var(--fond); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem; z-index: 20; }

/* Compléments à la feuille de style de la maquette : connexion, texte des leçons, états « à venir ». */
html { color-scheme: light dark; }
body { margin: 0; min-height: 100%; }
.marque { text-decoration: none; }
.chargement { color: var(--gris); padding-block: 40px; }
#contenu:focus { outline: none; }
.toast[hidden] { display: none; }

/* Connexion */
.connexion { max-width: 420px; margin: clamp(24px, 8vh, 96px) auto 0; display: flex; flex-direction: column; gap: 20px; }
.connexion h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); line-height: 1.15; }
.connexion p { color: var(--gris); }
.connexion form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--trait); border-radius: 20px; padding: clamp(20px, 4vw, 32px); box-shadow: var(--ombre); }
.champ { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.champ input { font: inherit; color: var(--encre); background: var(--fond); border: 1.5px solid var(--gris); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.champ input:focus-visible { outline: 3px solid var(--emeraude); outline-offset: 2px; }
.erreur { color: var(--fil-texte); font-weight: 600; min-height: 1.6em; }
.connexion .bouton { align-self: stretch; text-align: center; margin-top: 0; min-height: 48px; }

/* Parcours : modules dépliés sous un bloc */
.bloc-detail { margin: 0 0 8px 58px; padding: 4px 0 20px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 560px) { .bloc-detail { margin-left: 0; } }
.module h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.module h4 span { color: var(--gris); font-weight: 500; font-size: .9rem; }
.module ol { list-style: none; margin: 0; padding: 0; }
.module li { border-top: 1px solid var(--trait); }
.module li:last-child { border-bottom: 1px solid var(--trait); }
.module a, .module .avenir { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 4px; min-height: 44px; text-decoration: none; color: var(--encre); }
.module a:hover { color: var(--vert-fonce); background: var(--vert-clair); }
.module .avenir { color: var(--gris); }
.etat { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gris); justify-self: center; }
.etat.fait { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.avenir .etat { border-style: dashed; }
.mention { font-size: .85rem; color: var(--gris); white-space: nowrap; }
.bloc[aria-expanded="true"] h3 { color: var(--vert-fonce); }
.bloc .fleche { display: inline-block; transition: transform .15s; margin-left: 6px; color: var(--gris); }
.bloc[aria-expanded="true"] .fleche { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .bloc .fleche { transition: none; } }

/* Texte des leçons */
.partie p, .partie li { max-width: 68ch; }
.partie ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.partie h3 { font-family: "Figtree", system-ui, sans-serif; font-size: 1.08rem; font-weight: 700; letter-spacing: 0; margin-top: 6px; }
.partie a { color: var(--vert-fonce); text-underline-offset: 3px; }
.defile { overflow-x: auto; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); }
.defile table { border-collapse: collapse; width: 100%; font-size: .96rem; }
.defile th, .defile td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.defile thead th { background: var(--creux); font-weight: 700; }
.defile tr:last-child td { border-bottom: 0; }
blockquote { margin: 0; }
blockquote.encadre { border-radius: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--vert-fonce); }
blockquote.encadre.piege { border-left-color: var(--fil-texte); }
blockquote.encadre.plus { border-left-color: var(--gris); }
blockquote.encadre.video { border: 2px dashed var(--gris); background: var(--creux); border-radius: 18px; padding: clamp(18px, 3vw, 28px); }
blockquote:not(.encadre) { border-left: 3px solid var(--trait); padding-left: 16px; color: var(--gris); }
.intro-lecon { background: var(--vert-clair); border-radius: 14px; padding: 14px 18px; }
.verifie p { margin-top: 8px; }
.pied-lecon .suivante { text-decoration: none; }
.bouton[disabled] { opacity: .6; cursor: default; }
.fait-badge { color: var(--vert-fonce); font-weight: 700; }

/* Retouches après premier essai en ligne */
.fil-ariane a { color: var(--vert-fonce); font-weight: 600; text-underline-offset: 3px; padding: 6px 0; }
blockquote.encadre.video { aspect-ratio: auto; display: block; text-align: left; min-height: 0; }
blockquote.encadre.video p { max-width: 62ch; }
.plan li a { text-underline-offset: 3px; }

/* Page Production (formateurs) */
.compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-block: 24px; }
.compteur { background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; }
.compteur .petit { grid-column: 1 / -1; color: var(--vert-fonce); }
.compteur b { font-size: 1.3rem; }
.compteur span { color: var(--gris); }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filtre { border: 1.5px solid var(--gris); background: var(--fond); border-radius: 999px; padding: 8px 18px; font-weight: 600; min-height: 40px; }
.filtre[aria-pressed="true"] { background: var(--encre); color: var(--fond); border-color: var(--encre); }
.puce { display: inline-block; border: 1px solid var(--trait); border-radius: 999px; padding: 2px 10px; font-size: .85rem; font-weight: 600; white-space: nowrap; background: var(--creux); }
.puce.s-ecrite, .puce.s-script-pret { background: var(--vert-clair); color: var(--vert-fonce); border-color: transparent; }
.puce.s-relue, .puce.s-en-ligne, .puce.s-tournee, .puce.s-montee { background: var(--vert-fonce); color: var(--sur-vert); border-color: transparent; }
.puce.s-sans-video { color: var(--gris); }
#lien-production { text-decoration: underline; text-underline-offset: 3px; color: var(--vert-fonce); }

.defile a { color: var(--vert-fonce); text-underline-offset: 3px; }

/* ============================================================
   Téléphone et tablette
   Mesuré sur l'instance en ligne : le bloc utilisateur de l'en-tête
   et la colonne de la leçon débordaient de 18 px à 390 px de large.
   ============================================================ */

/* En-tête : il passe sur deux lignes plutôt que de déborder */
.barre { flex-wrap: wrap; row-gap: 10px; }
.marque { min-width: 0; }
.moi { min-width: 0; flex-wrap: wrap; row-gap: 4px; }
#moi-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }

/* Leçon : la colonne de texte doit pouvoir rétrécir (1fr seul garde la largeur du contenu) */
@media (max-width: 920px) {
  .lecon { grid-template-columns: minmax(0, 1fr); }
  .corps { min-width: 0; max-width: 100%; }
  .plan { border-top: 1px solid var(--trait); padding-top: 24px; }
}

@media (max-width: 620px) {
  .vue { padding-block: 24px 56px; }
  .barre { padding-block: 12px; }
  .marque b { font-size: 1.2rem; }
  .reprendre, .filrouge { border-radius: 18px; }
  .corps { gap: 18px; }
  .corps h1 { font-size: 1.6rem; }
  .partie h2 { font-size: 1.25rem; }
  /* La barre des étapes glisse horizontalement, avec un repère de défilement */
  .etapes { margin-inline: -16px; padding-inline: 16px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .etapes a { scroll-snap-align: start; padding: 10px 14px; }
  .pied-lecon { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .pied-lecon .bouton, .pied-lecon .suivante { text-align: center; }
  .pied-lecon .lien { text-align: center; }
  .bloc-detail { margin-left: 0; }
  .module a, .module .avenir { grid-template-columns: 18px minmax(0, 1fr); row-gap: 2px; align-items: start; padding-block: 12px; }
  .module a > span:last-child, .module .avenir > span:last-child { grid-column: 2; }
  .mention { white-space: normal; }
  .connexion { margin-top: 16px; }
}

/* Tableau de production : en cartes sur petit écran, illisible en colonnes */
@media (max-width: 760px) {
  .production .defile { border: 0; background: transparent; overflow: visible; }
  .production table, .production tbody, .production tr, .production td { display: block; width: 100%; }
  .production thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .production tr { background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
  .production td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .production td::before { content: attr(data-libelle); font-size: .82rem; font-weight: 700; color: var(--gris); }
  .production td:empty { display: none; }
  .production td[data-libelle="Module"] { grid-template-columns: 1fr; font-weight: 700; padding-bottom: 8px; }
  .production td[data-libelle="Module"]::before { display: none; }
  .production td[data-libelle="Leçon"]:nth-child(2) { grid-template-columns: 1fr; font-size: 1.05rem; padding-bottom: 8px; }
  .production td[data-libelle="Leçon"]:nth-child(2)::before { display: none; }
  .compteurs { grid-template-columns: 1fr; gap: 12px; }
}

/* Écran large : on respire un peu plus */
@media (min-width: 1200px) {
  .lecon { gap: 72px; }
}

/* Retouches après lecture de la capture sur téléphone (21/09/2026) */
@media (max-width: 620px) {
  /* Un tableau doit GLISSER, pas s'écraser en colonnes illisibles */
  .partie .defile table { width: auto; min-width: 520px; }
  .partie .defile { position: relative; }
  .partie .defile th, .partie .defile td { padding: 10px 12px; }
  /* Les cinq étapes tiennent sans être coupées */
  .etapes a { font-size: .84rem; padding: 9px 10px; }
}

/* Repère de défilement : une ombre à droite tant qu'il reste du tableau à voir */
.defile {
  background-image:
    linear-gradient(to right, var(--surface), var(--surface)),
    linear-gradient(to right, rgba(35, 40, 38, .14), rgba(35, 40, 38, 0));
  background-position: right center, right center;
  background-repeat: no-repeat;
  background-size: 24px 100%, 14px 100%;
  background-attachment: local, scroll;
}

/* ============================================================
   Quiz de la partie « Vérifier »
   L'état d'une réponse ne se lit jamais dans la seule couleur :
   le bouton écrit « Bonne réponse » ou « Réponse incorrecte »,
   et l'explication part dans une zone annoncée (aria-live).
   ============================================================ */
.quiz { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; counter-reset: q; }
.quiz .question { counter-increment: q; border-top: 1px solid var(--trait); padding-top: 18px; }
.quiz .question:first-child { border-top: 0; padding-top: 0; }
.quiz .enonce { font-weight: 600; max-width: 68ch; }
.quiz .enonce::before { content: counter(q) ". "; color: var(--gris); font-variant-numeric: tabular-nums; }
.propositions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-width: 68ch; }
.proposition { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start;
  text-align: left; background: var(--surface); border: 1.5px solid var(--trait); border-radius: 14px;
  padding: 12px 14px; min-height: 48px; }
.proposition:hover { border-color: var(--gris); }
.proposition .coche { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gris); margin-top: 3px; }
.proposition .verdict { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.proposition.juste { border-color: var(--vert-fonce); background: var(--vert-clair); }
.proposition.juste .coche { border-color: var(--vert-fonce); background: var(--vert-fonce); }
.proposition.juste .verdict { color: var(--vert-fonce); }
.proposition.faux { border-color: var(--fil-texte); background: var(--fil-clair); }
.proposition.faux .coche { border-color: var(--fil-texte); border-style: dashed; }
.proposition.faux .verdict { color: var(--fil-texte); }
.retour { margin-top: 10px; max-width: 68ch; }
.retour:empty { margin: 0; height: 0; overflow: hidden; }
.retour.juste { color: var(--vert-fonce); }
.retour.faux { color: var(--fil-texte); }
.attendue { margin-top: 10px; max-width: 68ch; }
.attendue summary { cursor: pointer; font-weight: 600; color: var(--vert-fonce); padding: 6px 0; min-height: 32px; }
.attendue p { margin-top: 6px; padding-left: 14px; border-left: 3px solid var(--trait); color: var(--gris); }

/* ============================================================
   Encadré « Votre livrable » : dépôt du devoir
   ============================================================ */
.devoir { background: var(--creux); border: 1px solid var(--trait); border-radius: 20px; padding: clamp(18px, 3vw, 28px); }
.devoir h2 small { color: var(--vert-fonce); }
.devoir .consigne { font-weight: 600; max-width: 62ch; }
.devoir .preuve { color: var(--encre); max-width: 62ch; }
.depot { display: flex; flex-direction: column; gap: 14px; }
.depot .chargement { padding-block: 0; }
.choix-fichier { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.choix-fichier .bouton { cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; margin: 0; }
/* Le champ natif reste dans le parcours clavier, mais invisible : son libellé serait en anglais */
.fichier-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.choix-fichier:focus-within .bouton { outline: 3px solid var(--emeraude); outline-offset: 3px; }
.nom-choisi { color: var(--encre); font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.formats { color: var(--encre); font-size: .9rem; }
.actions-devoir { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-devoir .bouton { min-height: 48px; display: inline-flex; align-items: center; }
.devoir .fichier { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.devoir .fichier a { color: var(--vert-fonce); text-underline-offset: 3px; }
.devoir .fichier .num { color: var(--encre); font-size: .9rem; }
.rendu-ok { background: var(--vert-clair); color: var(--vert-fonce); border-radius: 12px; padding: 12px 16px; max-width: 62ch; }
.note-devoir { font-size: 1.05rem; }
.commentaire { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 14px 18px; }
.commentaire p { margin-top: 6px; white-space: pre-wrap; max-width: 62ch; }
.hors-ligne { color: var(--encre); max-width: 62ch; }
.hors-ligne a { color: var(--vert-fonce); }

@media (max-width: 620px) {
  .proposition { grid-template-columns: 22px minmax(0, 1fr); row-gap: 6px; }
  .choix-fichier { flex-direction: column; align-items: stretch; }
  .choix-fichier .bouton { justify-content: center; }
  .proposition .verdict { grid-column: 2; }
  .actions-devoir { flex-direction: column; align-items: stretch; }
  .actions-devoir .bouton { justify-content: center; }
}

/* ============================================================
   Schémas faits maison et icônes des encadrés
   Source : dossier visuels/ à la racine du dépôt, copié par build.py
   dans site/visuels/ et servi sous /optia/visuels/.
   Insertion dans une leçon :
     ![texte de remplacement](/optia/visuels/nom-du-schema.svg "légende visible")
   Mode d'emploi complet et inventaire : visuels/README.md
   ============================================================ */

figure.schema { margin: 6px 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
figure.schema img { display: block; width: 100%; max-width: 520px; height: auto; }
figure.schema figcaption { color: var(--gris); font-size: .9rem; max-width: 62ch; border-left: 3px solid var(--trait); padding-left: 12px; }

/* Icônes au trait des encadrés. Le mot (« À retenir », « Erreur classique »…) reste
   toujours écrit : l'icône ne porte jamais l'information toute seule. */
blockquote.encadre { position: relative; }
blockquote.encadre.retenir, blockquote.encadre.piege, blockquote.encadre.plus { padding-left: 50px; }
blockquote.encadre.retenir::before, blockquote.encadre.piege::before, blockquote.encadre.plus::before,
blockquote.encadre.video::before {
  content: ""; position: absolute; left: 18px; top: 16px; width: 22px; height: 22px;
  background-repeat: no-repeat; background-position: center; background-size: 22px 22px;
}
blockquote.encadre.retenir::before { background-image: url("/optia/visuels/icone-a-retenir.svg"); }
blockquote.encadre.piege::before { background-image: url("/optia/visuels/icone-erreur-classique.svg"); }
blockquote.encadre.plus::before { background-image: url("/optia/visuels/icone-pour-aller-plus-loin.svg"); }
blockquote.encadre.video { padding-left: 56px; }
blockquote.encadre.video::before { left: 22px; top: 20px; width: 24px; height: 24px; background-size: 24px 24px;
  background-image: url("/optia/visuels/icone-emplacement-video.svg"); }

/* Encadré « Rappel » : un cadre sobre, qui ne se fond pas dans l'introduction */
blockquote.encadre.rappel { border-left-color: var(--gris); background: var(--creux); }
.intro-lecon > blockquote.encadre { margin-block: 10px; background: var(--surface); }
.intro-lecon { display: flex; flex-direction: column; gap: 4px; }

/* Page Production : section « À revérifier » */
.titre-veille { margin-top: 48px; font-size: 1.5rem; }
.titre-lot { font-family: "Figtree", system-ui, sans-serif; font-size: 1rem; font-weight: 700; margin: 26px 0 8px; }
.veille-vide { background: var(--vert-clair); color: var(--vert-fonce); border-radius: 14px; padding: 14px 18px; font-weight: 600; max-width: 70ch; }
.liste-veille { list-style: none; margin: 0; padding: 0; }
.liste-veille > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: baseline; padding: 12px 4px; border-bottom: 1px solid var(--trait); }
.liste-veille > li.en-retard { border-left: 3px solid var(--fil-texte); padding-left: 12px; }
.liste-veille .titre-ligne a { color: var(--encre); text-underline-offset: 3px; }
.liste-veille .qui { color: var(--gris); font-size: .9rem; }
.liste-veille .delai { color: var(--gris); font-size: .9rem; white-space: nowrap; }
.liste-veille .fragile { grid-column: 2 / -1; margin: 4px 0 0; padding-left: 1.1em; color: var(--gris); font-size: .9rem; }
@media (max-width: 620px) {
  .liste-veille > li { grid-template-columns: auto minmax(0, 1fr); }
  .liste-veille .delai, .liste-veille .qui { grid-column: 2; }
  .liste-veille .fragile { grid-column: 1 / -1; }
}

/* ============================================================
   Les outils emportables : liste et page d'un outil
   Contenu : outils/*.md, fabriqué en JSON par build.py.
   ============================================================ */
#lien-outils { text-decoration: underline; text-underline-offset: 3px; color: var(--vert-fonce); }
.intro-outils { color: var(--gris); max-width: 70ch; margin: 4px 0 8px; }
.outils { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.outil-carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.outil-carte h2 { font-size: 1.15rem; line-height: 1.25; margin: 0; }
.outil-carte h2 a { color: var(--encre); text-decoration: none; }
.outil-carte h2 a:hover { color: var(--vert-fonce); text-decoration: underline; text-underline-offset: 3px; }
.outil-carte p { margin: 0; max-width: 60ch; }
.outil-carte .quand { color: var(--gris); font-size: .93rem; }
.outil-carte .source { color: var(--gris); font-size: .86rem; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--trait); }
.partie.outil h2 { font-size: 1.3rem; margin-top: 10px; }
.partie.outil blockquote:not(.encadre) { background: var(--creux); border-left: 3px solid var(--vert-fonce); padding: 14px 18px; border-radius: 0 12px 12px 0; color: var(--encre); }
.partie.outil blockquote p { max-width: 62ch; }
/* Cases à cocher : le texte [ ] ou [x] porte l'information, la puce ferait doublon */
.partie.outil li.case { list-style: none; margin-left: -1.2em; }
.partie.outil li.case.faite { color: var(--gris); }
.venu-de { background: var(--vert-clair); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.venu-de p { margin: 0; font-size: .9rem; color: var(--encre); }
.venu-de a { color: var(--vert-fonce); font-weight: 600; font-size: .9rem; text-underline-offset: 3px; }
@media (max-width: 620px) {
  .outils { grid-template-columns: minmax(0, 1fr); }
  .outil-carte { border-radius: 16px; padding: 16px 18px; }
}
