@font-face { font-family: "Atkinson"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "OpenDyslexic"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/opendyslexic-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "OpenDyslexic"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/opendyslexic-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/caveat-latin-600-normal.woff2") format("woff2"); }

:root {
  --framboise: #B83268; --lavande: #9D8CC8; --aubergine: #3B2D4F; --terracotta: #C66B4E;
  --sauge: #8FA68B; --ocre: #D9A441; --lin: #FAF5EE; --blanc: #ffffff;
  --framboise-fonce: #962754; --ombre: 0 8px 30px rgba(59,45,79,.12); --bordure: #e3d9cc; --texte-doux: #5b4d6e;
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: "Figtree", system-ui, sans-serif; line-height: 1.6; color: var(--aubergine); background: radial-gradient(1200px 500px at 85% -10%, #efe3f3 0%, transparent 60%), var(--lin); display: flex; flex-direction: column; min-height: 100vh; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.25; color: var(--aubergine); }
h1 { font-size: 1.9rem; margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
a { color: var(--framboise-fonce); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--aubergine); }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; }
#app { display: flex; flex-direction: column; flex: 1; }
main { width: 100%; max-width: 62rem; margin: 0 auto; padding: 1.5rem 1.1rem 3rem; flex: 1; }
main:focus { outline: none; }
main.simple { max-width: 28rem; padding-top: 3rem; }
.saut:focus { position: static; width: auto; height: auto; clip: auto; padding: .6rem 1rem; background: var(--ocre); color: var(--aubergine); display: block; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête et navigation */
.entete { background: rgba(59,45,79,.94); backdrop-filter: blur(10px); color: var(--lin); position: sticky; top: 0; z-index: 20; }
.entete-contenu { max-width: 62rem; margin: 0 auto; padding: .6rem 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.5rem; }
.marque { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.4rem; letter-spacing: .08em; color: var(--lin); text-decoration: none; }
.marque-simple { color: var(--framboise); margin: 0 0 1rem; }
.entete nav { flex: 1 1 auto; }
.entete ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .4rem; }
.entete nav a { display: inline-block; padding: .5rem .95rem; color: var(--lin); text-decoration: none; border-radius: 999px; }
.entete nav a:hover { background: rgba(255,255,255,.12); }
.entete nav a[aria-current="page"] { background: var(--framboise); font-weight: 700; }
.entete button.discret { background: transparent; color: var(--lin); border: 1px solid var(--lavande); padding: .5rem .9rem; min-height: 44px; margin: 0; border-radius: 999px; }
.entete button.discret:hover { background: var(--lavande); color: var(--aubergine); }

/* Boutons et formulaires */
button, .bouton { display: inline-block; font: inherit; font-weight: 700; min-height: 48px; padding: .7rem 1.5rem; background: linear-gradient(135deg, var(--framboise), #d2477c); color: var(--blanc); border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; text-align: center; margin-top: .6rem; box-shadow: 0 6px 16px rgba(184,50,104,.3); }
button:hover, .bouton:hover { background: var(--framboise-fonce); color: var(--blanc); }
button:disabled { opacity: .6; cursor: wait; }
.bouton.secondaire { background: transparent; color: var(--framboise-fonce); box-shadow: inset 0 0 0 2px var(--framboise-fonce); }
.bouton.secondaire:hover { background: var(--framboise-fonce); color: var(--blanc); }
.discret-fonce { background: transparent; color: var(--aubergine); box-shadow: inset 0 0 0 2px var(--aubergine); }
label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
label.case { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; margin: 0; }
input[type=email], input[type=password], textarea { width: 100%; font: inherit; padding: .7rem; border: 2px solid var(--aubergine); border-radius: 12px; background: var(--blanc); color: var(--aubergine); }
input[type=checkbox], input[type=radio] { width: 1.3rem; height: 1.3rem; margin-top: .25rem; flex: none; accent-color: var(--framboise); }
fieldset { border: 1px solid var(--bordure); border-radius: 16px; background: var(--blanc); padding: .8rem 1rem; margin: 1rem 0; }
legend { font-weight: 700; padding: 0 .4rem; }
.ico { display: inline-flex; width: 1.5rem; height: 1.5rem; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* Textes */
.chapeau { font-size: 1.1rem; color: var(--texte-doux); margin: 0 0 1rem; }
.aide { font-size: .95rem; color: var(--texte-doux); margin: .2rem 0; }
.aide-claire { font-size: .95rem; color: #eadff2; }
.accent { font-family: "Caveat", cursive; font-size: 1.7rem; color: #f3b9d0; margin: 0; line-height: 1.2; }
.fil { font-size: .95rem; color: var(--texte-doux); margin: 0 0 .6rem; }
.texte { max-width: 42rem; }
.texte p, .texte li { margin: .6rem 0; }
.msg { padding: .8rem 1rem; border-radius: 12px; background: var(--blanc); border-left: 6px solid var(--lavande); }
.msg.erreur { border-left-color: var(--framboise); }
.msg.ok { border-left-color: var(--sauge); }

/* Accueil : bandeau */
.hero { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; color: var(--lin); border-radius: 24px; padding: 1.6rem 1.7rem; background: linear-gradient(135deg, var(--aubergine) 0%, #5a2d6b 55%, var(--framboise) 130%); box-shadow: var(--ombre); }
.hero h1 { color: #fff; font-size: 2.2rem; margin: .1rem 0; }
.hero-formation { margin: 0 0 1rem; color: #eadff2; }
.hero-texte { flex: 1 1 18rem; }
.niveau { max-width: 24rem; }
.niveau-nom { display: inline-block; font-weight: 700; background: var(--ocre); color: var(--aubergine); padding: .15rem .8rem; border-radius: 999px; margin-bottom: .3rem; }
.anneau { position: relative; width: 9.5rem; height: 9.5rem; flex: none; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 10; }
.anneau .fond { stroke: rgba(255,255,255,.2); }
.anneau .val { stroke: var(--ocre); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.anneau-texte { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; color: #fff; }

.tuiles { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.tuiles li { background: var(--blanc); border-radius: 18px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .1rem; box-shadow: var(--ombre); color: var(--framboise-fonce); }
.tuiles strong { font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; color: var(--aubergine); line-height: 1.2; }
.tuiles span:not(.ico) { font-size: .9rem; color: var(--texte-doux); }

.reprendre { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: var(--blanc); border-radius: 20px; padding: 1.1rem 1.4rem; box-shadow: var(--ombre); border-left: 8px solid var(--ocre); }
.reprendre h2 { margin: 0 0 .2rem; }
.reprendre p { margin: 0; }
.reprendre .bouton { margin: 0; animation: pouls 2.4s ease-in-out infinite; }

.grille { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.carte { background: var(--blanc); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ombre); }
.carte .bandeau { height: 5.5rem; display: flex; align-items: center; justify-content: center; gap: .6rem; color: #fff; }
.carte .pastille { font-family: "Fraunces", Georgia, serif; font-size: 2.4rem; }
.carte.c1 .bandeau { background: linear-gradient(135deg, var(--framboise), #e0608f); }
.carte.c2 .bandeau { background: linear-gradient(135deg, var(--lavande), #7f6cb5); }
.carte.c3 .bandeau { background: linear-gradient(135deg, var(--terracotta), #de8b6e); }
.carte.c4 .bandeau { background: linear-gradient(135deg, #6f8c6a, var(--sauge)); }
.carte.c5 .bandeau { background: linear-gradient(135deg, #b9862a, var(--ocre)); color: var(--aubergine); }
.carte.c6 .bandeau { background: linear-gradient(135deg, var(--aubergine), #5a4776); }
.carte.indispo { opacity: .8; }
.carte.indispo .bandeau { filter: saturate(.35); }
.carte-corps { padding: 1rem 1.1rem 1.2rem; }

.barre { height: 12px; background: #eadfe9; border-radius: 6px; overflow: hidden; margin: .6rem 0 .3rem; }
.barre.claire { background: rgba(255,255,255,.22); }
.barre-remplie { height: 100%; background: linear-gradient(90deg, var(--sauge), #b6cfb0); border-radius: 6px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.barre.claire .barre-remplie { background: linear-gradient(90deg, var(--ocre), #f1cf85); }

.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.badge-jeu { display: flex; gap: .8rem; align-items: center; background: var(--blanc); border-radius: 16px; padding: .8rem 1rem; box-shadow: var(--ombre); filter: grayscale(1); opacity: .65; }
.badge-jeu > span:last-child { display: flex; flex-direction: column; }
.badge-jeu.gagne { filter: none; opacity: 1; }
.badge-ico { width: 2.8rem; height: 2.8rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #e6e0ee; color: var(--aubergine); flex: none; }
.badge-jeu.gagne .badge-ico { background: linear-gradient(135deg, var(--ocre), #f1cf85); }

.duo { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 2rem; }
.duo h2 { margin-top: 0; }
.encadre { background: var(--blanc); border-radius: 20px; padding: 1rem 1.3rem 1.3rem; box-shadow: var(--ombre); }

/* Parcours : chemin visuel */
.parcours-module { background: var(--blanc); border-radius: 22px; padding: 1.2rem 1.3rem 1.4rem; box-shadow: var(--ombre); margin-top: 1.2rem; }
.parcours-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; }
.parcours-entete h2 { margin: 0; }
.chemin { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.noeud { position: relative; display: flex; gap: 1rem; padding-bottom: 1rem; }
.noeud::before { content: ""; position: absolute; left: 1.35rem; top: 2.8rem; bottom: -.1rem; width: 3px; background: #e6dfee; border-radius: 2px; }
.noeud:last-child::before { display: none; }
.noeud.fait::before { background: var(--sauge); }
.noeud-rond { position: relative; z-index: 1; width: 2.8rem; height: 2.8rem; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: #efe9f4; color: var(--aubergine); }
.noeud.fait .noeud-rond { background: var(--sauge); color: #fff; }
.noeud.courant .noeud-rond { background: var(--framboise); color: #fff; animation: halo 2s ease-out infinite; }
.etape { flex: 1; display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; border-radius: 16px; background: var(--lin); color: var(--aubergine); text-decoration: none; border: 2px solid transparent; }
.etape:hover { border-color: var(--framboise); background: #fff; }
.noeud.courant .etape { background: #fbeaf1; border-color: var(--framboise); }
.etape-haut { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.etape-titre { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.badge { font-size: .85rem; font-weight: 700; padding: .15rem .7rem; border-radius: 999px; }
.badge.ok { background: #dfeadc; color: #2f4a2b; }
.badge.afaire { background: #ece6f3; color: var(--aubergine); }
.badge.encours { background: var(--framboise); color: #fff; }
.pts { font-size: .85rem; font-weight: 700; color: #7a5a10; background: #f7e7c0; padding: .15rem .7rem; border-radius: 999px; }

/* Activités, ressources, messages */
.media iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 16px; }
.question { margin-bottom: 1.2rem; }
.corrections { padding-left: 1.2rem; }
.corrections li { margin: .8rem 0; }
.liste-ressources { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.liste-ressources li { background: var(--blanc); border-radius: 16px; padding: .9rem 1.1rem; display: flex; flex-direction: column; box-shadow: var(--ombre); }
.liste-ressources a { font-weight: 700; }
.messages { list-style: none; padding: 0; }
.messages li { padding: .8rem 1rem; margin-bottom: .6rem; border-radius: 16px; background: var(--blanc); box-shadow: var(--ombre); }
.messages li.lisa { border-left: 6px solid var(--framboise); }
.messages li.vous { border-left: 6px solid var(--lavande); }

/* Félicitations */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 50; display: flex; gap: .6rem; align-items: center; background: var(--aubergine); color: #fff; font-weight: 700; padding: .8rem 1.4rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(59,45,79,.35); animation: monte .4s ease-out, disparait .5s ease-in 4s forwards; }
.toast .ico { color: var(--ocre); }

footer { background: var(--aubergine); color: var(--lin); padding: 1rem 1.1rem; font-size: .95rem; }
footer p { max-width: 62rem; margin: 0 auto; }

@keyframes monte { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes disparait { to { opacity: 0; } }
@keyframes pouls { 0%,100% { box-shadow: 0 6px 16px rgba(184,50,104,.3); } 50% { box-shadow: 0 6px 26px rgba(184,50,104,.6); } }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(184,50,104,.5); } 100% { box-shadow: 0 0 0 14px rgba(184,50,104,0); } }
@keyframes entree { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
main > * { animation: entree .5s ease-out both; }
main > *:nth-child(2) { animation-delay: .06s; } main > *:nth-child(3) { animation-delay: .12s; } main > *:nth-child(4) { animation-delay: .18s; }

@media (max-width: 40rem) {
  html { font-size: 17px; }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.8rem; }
  .entete-contenu { gap: .3rem; }
  .anneau { width: 7.5rem; height: 7.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Questionnaires */
input[type=text] { width: 100%; font: inherit; padding: .7rem; border: 2px solid var(--aubergine); border-radius: 12px; background: var(--blanc); color: var(--aubergine); }
input[type=file] { font: inherit; max-width: 100%; }
.oblig { font-weight: 400; color: var(--texte-doux); font-size: .9rem; }
.autre-texte { margin-top: .3rem; }
.formulaire fieldset.question legend, .legende-grille { font-weight: 700; padding: 0 .3rem; }
.legende-grille { margin: 1rem 0 .3rem; padding: 0; }
.ligne-grille { margin: .6rem 0; }
.ligne-grille legend { font-weight: 600; font-size: .98rem; }
.echelle { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.echelle-choix { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 2.6rem; padding: .35rem .4rem; border: 2px solid var(--bordure); border-radius: 12px; background: var(--blanc); cursor: pointer; font-weight: 600; }
.echelle-choix input { margin: 0; }
.echelle-bornes { display: flex; justify-content: space-between; margin: .2rem 0 0; }
.formulaire h2 { margin-top: 1.6rem; }

/* Attestation */
.document { background: var(--blanc); border: 1px solid var(--bordure); border-radius: 12px; padding: 2rem 2.2rem; margin: 1.5rem 0; box-shadow: var(--ombre); }
.doc-entete { border-bottom: 2px solid var(--framboise); margin-bottom: 1.2rem; padding-bottom: .8rem; }
.doc-marque { font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 600; color: var(--framboise); margin: 0; }
.doc-orga { margin: 0; font-size: .85rem; color: var(--texte-doux); }
.doc-titre { text-align: center; margin: 1.2rem 0 .3rem; }
.doc-num { text-align: center; color: var(--texte-doux); margin: 0 0 1.2rem; }
.doc-formation { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 600; text-align: center; margin: .8rem 0; }
.doc-liste { display: grid; grid-template-columns: 12rem 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.doc-liste dt { font-weight: 700; }
.doc-liste dd { margin: 0; }
.doc-signature { margin-top: 2rem; text-align: right; }
.doc-signature p { margin: 0; }
@media (max-width: 40rem) { .document { padding: 1.2rem; } .doc-liste { grid-template-columns: 1fr; } }
@media print {
  body { background: #fff; }
  .entete, footer, .pas-impression, .toast { display: none !important; }
  main { padding: 0 !important; max-width: none !important; }
  .document { box-shadow: none; border: 0; border-radius: 0; padding: 0; margin: 0; page-break-after: always; break-after: page; }
  .document:last-of-type { page-break-after: auto; break-after: auto; }
}

/* v0.9 : navigation, lecture, couleurs, questionnaires */
.entete .choix-formation { display: inline-flex; align-items: center; gap: .4rem; }
.saut-vue { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.entete select { font: inherit; min-height: 44px; max-width: 16rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--lavande); background: var(--aubergine); color: var(--lin); }
.barre-lecture { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 2.1rem; background: rgba(59,45,79,.96); color: var(--lin); display: flex; align-items: center; }
.barre-lecture-remplie { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--framboise), var(--ocre)); opacity: .9; transition: width .15s linear; }
.barre-lecture-texte { position: relative; font-size: .9rem; font-weight: 700; padding: 0 1rem; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
body:has(.barre-lecture) { padding-bottom: 2.4rem; }
.texte { max-width: 46rem; }
.texte > p:first-child { font-size: 1.1rem; color: var(--texte-doux); }
.bloc { --c: var(--framboise); --ct: var(--framboise-fonce); background: var(--blanc); border-radius: 20px; border-top: 7px solid var(--c); box-shadow: var(--ombre); padding: .4rem 1.3rem 1rem; margin: 1.4rem 0; }
.bloc.b2 { --c: var(--lavande); --ct: #5e4d99; }
.bloc.b3 { --c: var(--terracotta); --ct: #a4492f; }
.bloc.b4 { --c: var(--sauge); --ct: #43623f; }
.bloc.b5 { --c: var(--ocre); --ct: #7c5a0a; }
.bloc.b6 { --c: var(--aubergine); --ct: var(--aubergine); }
.bloc h3 { color: var(--ct); margin: .9rem 0 .2rem; font-size: 1.35rem; }
.bloc strong { color: var(--ct); }
.bloc li::marker { color: var(--c); font-weight: 700; }
.bloc.retenir { background: #eef4ec; --c: var(--sauge); --ct: #2f4a2c; }
.bloc.retenir li { padding-left: .2rem; }
.texte svg { display: block; width: 100%; max-width: 22rem; height: auto; margin: 1.2rem auto; border-radius: 18px; box-shadow: var(--ombre); }
.suite { margin: 2rem 0 1rem; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; padding: 1.1rem 1.2rem; background: #fff; border-radius: 20px; box-shadow: var(--ombre); border-left: 8px solid var(--sauge); }
.suite .msg, .suite > p { flex: 1 1 100%; margin: 0; }
.question { background: var(--blanc); border-radius: 16px; padding: 1rem 1.1rem; margin: 0 0 1rem; box-shadow: var(--ombre); border-left: 6px solid var(--lavande); }
fieldset.question { border: 0; border-left: 6px solid var(--lavande); min-width: 0; }
fieldset.question legend { float: left; width: 100%; padding: 0; margin: 0 0 .5rem; font-weight: 700; }
fieldset.question legend + * { clear: both; }
.formulaire h2 { color: var(--framboise-fonce); margin: 1.6rem 0 .6rem; }
body:has(.barre-lecture) .toast { bottom: 3.6rem; }
@media (max-width: 40rem) { .entete select { max-width: 100%; } }
.liste-formations { list-style: none; padding: 0; display: grid; gap: 1rem; }
fieldset.criteres { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
fieldset.criteres legend { float: left; width: 100%; padding: 0; margin: 0 0 .6rem; font-weight: 700; font-size: 1.1rem; color: var(--framboise-fonce); }
fieldset.criteres legend + * { clear: both; }
.seq-liste { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .6rem; }
.seq-liste li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
.seq-liste li a { font-weight: 600; }
.seq-liste li::marker { content: ""; }
.parcours-entete h2 a { color: inherit; text-decoration: none; }
.parcours-entete h2 a:hover { text-decoration: underline; }


/* ===== v1.0 : thèmes, réglages de lecture, accueil en cartes, fil ===== */
html { --police-texte: "Figtree", system-ui, sans-serif; --police-titre: "Fraunces", Georgia, serif; --interligne: 1.7; --espace-lettres: 0; --espace-mots: 0; }
html[data-police="lisible"] { --police-texte: "Atkinson", system-ui, sans-serif; --police-titre: "Atkinson", system-ui, sans-serif; }
html[data-police="dys"] { --police-texte: "OpenDyslexic", "Atkinson", sans-serif; --police-titre: "OpenDyslexic", "Atkinson", sans-serif; }
html[data-taille="2"] { font-size: 21px; }
html[data-taille="3"] { font-size: 24px; }
html[data-esp="1"] { --interligne: 2; --espace-lettres: .05em; --espace-mots: .16em; }
body { font-family: var(--police-texte); line-height: var(--interligne); letter-spacing: var(--espace-lettres); word-spacing: var(--espace-mots); text-align: left; }
h1, h2, h3, .marque, .doc-marque { font-family: var(--police-titre); }
.texte, .chapeau, .msg, .question, .bloc p, .bloc li { max-width: 66ch; }
.petit { min-height: 40px; padding: .4rem 1rem; font-size: .95rem; }
.discret-fonce[aria-pressed="true"] { background: var(--framboise); color: #fff; box-shadow: none; }

/* Thèmes sombres (standard et adapté sombre) */
html[data-theme="neon"], html[data-theme="sombre"] {
  --aubergine: #FAF5EE; --blanc: #231833; --texte-doux: #D3C9E3; --bordure: #3e2d58; --framboise-fonce: #F597BE;
  --ombre: 0 8px 30px rgba(0,0,0,.45); --lavande: #BFB2E6; color-scheme: dark;
}
html[data-theme="neon"] body, html[data-theme="sombre"] body { background: #160E1F; color: #FAF5EE; }
html[data-theme="neon"] body { background: radial-gradient(900px 420px at 85% -10%, rgba(224,80,143,.22) 0%, transparent 60%), #160E1F; }
html[data-theme="neon"] .entete, html[data-theme="sombre"] .entete { background: rgba(22,14,31,.96); border-bottom: 1px solid #3e2d58; }
html[data-theme="neon"] footer, html[data-theme="sombre"] footer { background: #0f0816; color: #D3C9E3; }
html[data-theme="neon"] .toast, html[data-theme="sombre"] .toast { background: #3e2d58; }
html[data-theme="neon"] .barre, html[data-theme="sombre"] .barre { background: #3e2d58; }
html[data-theme="neon"] .noeud-rond, html[data-theme="sombre"] .noeud-rond, html[data-theme="neon"] .badge-ico, html[data-theme="sombre"] .badge-ico { background: #3e2d58; color: #FAF5EE; }
html[data-theme="neon"] .etape, html[data-theme="sombre"] .etape { background: #1b1226; color: #FAF5EE; }
html[data-theme="neon"] .etape:hover, html[data-theme="sombre"] .etape:hover { background: #231833; }
html[data-theme="neon"] .noeud.courant .etape, html[data-theme="sombre"] .noeud.courant .etape { background: #3a1a2e; }
html[data-theme="neon"] .badge.afaire, html[data-theme="sombre"] .badge.afaire { background: #3e2d58; color: #FAF5EE; }
html[data-theme="neon"] .badge.ok, html[data-theme="sombre"] .badge.ok { background: #27402a; color: #d8efd5; }
html[data-theme="neon"] .bloc, html[data-theme="sombre"] .bloc { --ct: #FAF5EE; }
html[data-theme="neon"] .bloc.b1, html[data-theme="sombre"] .bloc.b1 { --ct: #F597BE; }
html[data-theme="neon"] .bloc.b2, html[data-theme="sombre"] .bloc.b2 { --ct: #BFB2E6; }
html[data-theme="neon"] .bloc.b3, html[data-theme="sombre"] .bloc.b3 { --ct: #F0A58C; }
html[data-theme="neon"] .bloc.b4, html[data-theme="sombre"] .bloc.b4 { --ct: #B6D3B1; }
html[data-theme="neon"] .bloc.b5, html[data-theme="sombre"] .bloc.b5 { --ct: #E8C46E; }
html[data-theme="neon"] .bloc.retenir, html[data-theme="sombre"] .bloc.retenir { background: #1f2f22; --ct: #B6D3B1; }
html[data-theme="neon"] .pts, html[data-theme="sombre"] .pts { background: #4a3a14; color: #f1d58f; }
html[data-theme="neon"] .echelle-choix, html[data-theme="sombre"] .echelle-choix { background: #231833; }
html[data-theme="neon"] button:hover, html[data-theme="neon"] .bouton:hover, html[data-theme="sombre"] button:hover, html[data-theme="sombre"] .bouton:hover { background: #F597BE; color: #160E1F; }
html[data-theme="neon"] .bouton.secondaire:hover, html[data-theme="sombre"] .bouton.secondaire:hover { background: #F597BE; color: #160E1F; }
html[data-theme="neon"] .suite, html[data-theme="sombre"] .suite { background: #231833; }
html[data-theme="neon"] a:hover, html[data-theme="sombre"] a:hover { color: #fff; }

/* Thème adapté clair : palette lin, aucun effet */
html[data-theme="clair"] body { background: #FAF5EE; }

/* Attestation : toujours claire (lisible et imprimable) */
.document { --blanc: #fff; --aubergine: #3B2D4F; --texte-doux: #5b4d6e; --framboise-fonce: #962754; --bordure: #e3d9cc; background: #fff; color: #3B2D4F; }
@media print { html, body { background: #fff !important; color: #000 !important; } }

/* En-tête : outils, bouton Reprendre, matrice */
.entete { overflow: hidden; }
.entete-contenu { position: relative; z-index: 1; }
.fx-matrice { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.outils { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.entete .bouton.reprise { min-height: 44px; padding: .5rem 1.1rem; margin: 0; }
.entete nav { flex: 1 1 auto; }
.entete-contenu { gap: .4rem 1rem; }
.entete nav a { padding: .45rem .75rem; }
.entete select { max-width: 13rem; }
.panneau-reglages { background: var(--blanc); border-bottom: 2px solid var(--framboise); padding: 1rem 1.1rem 1.4rem; }
.panneau-reglages[hidden] { display: none; }
.panneau-reglages h2 { margin: 0 0 .4rem; }
.reglages-grille { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); max-width: 62rem; margin: .6rem auto; }
.panneau-reglages { padding-left: max(1.1rem, calc((100% - 62rem) / 2)); padding-right: max(1.1rem, calc((100% - 62rem) / 2)); }
.reglage { margin: 0; }

/* Accueil : carte Reprendre et six cartes */
.reprise-carte { background: var(--blanc); border-radius: 24px; padding: 1.6rem 1.7rem; box-shadow: var(--ombre); border: 1px solid var(--bordure); max-width: 46rem; }
.reprise-carte h1 { margin: .1rem 0 .2rem; }
.reprise-formation { margin: 0 0 .6rem; color: var(--texte-doux); }
.reprise-etape { margin: .4rem 0; font-size: 1.1rem; }
.btn-large, .bouton.gros { min-height: 56px; font-size: 1.15rem; padding: .9rem 2rem; margin-top: .8rem; }
.tuiles-nav { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.tuile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .4rem; width: 100%; min-height: 11rem; padding: 1.1rem 1.2rem; text-align: left; text-decoration: none; font: inherit; font-weight: 700; color: var(--aubergine); background: var(--blanc); border: 1px solid var(--bordure); border-radius: 22px; box-shadow: var(--ombre); cursor: pointer; transition: transform .25s, border-color .25s, box-shadow .25s; }
.tuile:hover { color: var(--aubergine); background: var(--blanc); border-color: var(--framboise); transform: translateY(-3px); }
.tuile.inactive { opacity: .7; cursor: default; }
.tuile.inactive:hover { transform: none; border-color: var(--bordure); }
.tuile.courante { border-color: var(--framboise); }
.tuile-titre { font-family: var(--police-titre); font-size: 1.3rem; line-height: 1.25; }
.tuile .aide { font-weight: 400; }
.ico-tuile { position: absolute; top: 1rem; left: 1.2rem; width: 3.4rem; height: 3.4rem; color: #F597BE; }
.ico-tuile svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tuile-fleche { position: absolute; top: 1.2rem; right: 1.2rem; width: 1.6rem; height: 1.6rem; color: var(--lavande); }
.tuile-fleche svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.liste-simple .tuile { min-height: 7.5rem; justify-content: center; }
.liste-simple .tuile-titre { font-size: 1.2rem; }
html[data-theme="neon"] .tuile:hover { box-shadow: 0 0 0 1px #E0508F, 0 0 26px rgba(224,80,143,.45); }
html[data-theme="neon"] .tuiles-nav:not(.liste-simple) .ico-tuile { filter: drop-shadow(0 0 8px rgba(224,80,143,.8)); animation: flotte 5s ease-in-out infinite; }
html[data-theme="neon"] .reprise-carte { box-shadow: 0 0 0 1px rgba(224,80,143,.6), 0 0 32px rgba(224,80,143,.25); }
html[data-theme="neon"] .bouton.reprise { box-shadow: 0 0 18px rgba(224,80,143,.6); }
html[data-theme="sombre"] .ico-tuile, html[data-theme="clair"] .ico-tuile { display: none; }
html[data-theme="sombre"] .tuiles-nav:not(.liste-simple) .tuile, html[data-theme="clair"] .tuiles-nav:not(.liste-simple) .tuile { min-height: 6rem; justify-content: center; }
html[data-theme="clair"] .tuile-fleche { color: var(--framboise-fonce); }
@keyframes flotte { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }

/* Le fil */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip { min-height: 44px; padding: .4rem 1.1rem; background: transparent; color: var(--aubergine); box-shadow: inset 0 0 0 2px var(--bordure); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--framboise); color: #fff; box-shadow: none; }
.postes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.post { background: var(--blanc); border: 1px solid var(--bordure); border-radius: 20px; padding: 1.1rem 1.2rem; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: .3rem; }
.post h3 { margin: 0; font-size: 1.15rem; }
.post-rub { margin: 0; font-family: "JetBrains Mono", monospace; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--framboise-fonce); }
.post-extrait { margin: 0; }
.post-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.post-actions .bouton, .post-actions button { margin: 0; }
html[data-theme="neon"] .post:hover { border-color: #E0508F; }

/* Compte, quiz */
.avatar-zone { margin: .4rem 0 .8rem; }
.avatar { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; border: 3px solid var(--framboise); }
.avatar.vide { background: var(--framboise); color: #fff; font-size: 2.4rem; font-family: var(--police-titre); }
.form-compte { max-width: 28rem; }
.nav-quiz { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.nav-quiz button { margin: 0; }
legend:focus { outline: 3px solid var(--ocre); outline-offset: 3px; }

/* Mode concentration et thèmes adaptés : aucun effet */
html[data-calme="1"] *, html[data-calme="1"] *::before, html[data-calme="1"] *::after,
html[data-theme="sombre"] *, html[data-theme="clair"] *, html[data-theme="sombre"] *::before, html[data-theme="clair"] *::before { animation: none !important; }
html[data-calme="1"] .fx-matrice, html[data-theme="sombre"] .fx-matrice, html[data-theme="clair"] .fx-matrice { display: none; }
html[data-calme="1"] .ico-tuile { display: none; }
html[data-calme="1"] .tuile, html[data-calme="1"] .barre-remplie { transition: none; transform: none !important; }
html[data-calme="1"] main > * { animation: fondu .4s ease-out both !important; }
html[data-calme="1"] .reprise-carte, html[data-calme="1"] .bouton.reprise, html[data-calme="1"] .tuile:hover { box-shadow: var(--ombre) !important; }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fx-matrice, .ico-tuile { display: none !important; } }
@media (max-width: 40rem) { .tuiles-nav { grid-template-columns: 1fr 1fr; } .tuile { min-height: 9.5rem; } .entete .bouton.reprise { flex: 1 1 100%; text-align: center; } }
@media print { .panneau-reglages { display: none !important; } }
.entete select { background: #231833; color: #FAF5EE; border: 1px solid #BFB2E6; }
html[data-theme="clair"] .entete select { background: #3B2D4F; }
@media (max-width: 40rem) { .entete nav a { padding: .35rem .6rem; } .outils { gap: .4rem; } .entete select { max-width: 100%; } }
.tuile.avec-intro { padding-top: 5.4rem; }
.tuile-intro { font-size: .95rem; line-height: 1.4; }
.texte u { text-decoration: underline; text-underline-offset: .15em; }
.texte s { text-decoration: line-through; }
.texte mark { background: #FFE38A; color: #3B2A00; padding: 0 .2em; border-radius: 4px; }
.texte h4 { font-family: var(--police-titre); font-size: 1.15rem; margin: 1rem 0 .2rem; color: var(--ct, inherit); }
.texte h5 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin: .9rem 0 .1rem; color: var(--ct, inherit); }
.texte blockquote { margin: .9rem 0; padding: .4rem 1rem; border-left: 5px solid var(--c, var(--framboise)); background: rgba(127,127,127,.12); border-radius: 0 12px 12px 0; }
.texte .al-c { text-align: center; }
.texte .al-d { text-align: right; }
.texte img { display: block; max-width: 100%; height: auto; margin: 1.2rem auto; border-radius: 18px; box-shadow: var(--ombre); }
.texte img.ill-p { max-width: 14rem; }
.texte img.ill-m { max-width: 26rem; }
.texte img.ill-g { max-width: 100%; }

/* couleurs de texte choisies dans l'administration */
.texte .tc-1, .bloc .tc-1 { color: #A8245A; }
.texte .tc-2, .bloc .tc-2 { color: #5e4d99; }
.texte .tc-3, .bloc .tc-3 { color: #a4492f; }
.texte .tc-4, .bloc .tc-4 { color: #3f6a3a; }
.texte .tc-5, .bloc .tc-5 { color: #7c5a0a; }
.texte .tc-6, .bloc .tc-6 { color: #1F5F8B; }
html[data-theme="neon"] .tc-1, html[data-theme="sombre"] .tc-1 { color: #F597BE; }
html[data-theme="neon"] .tc-2, html[data-theme="sombre"] .tc-2 { color: #BFB2E6; }
html[data-theme="neon"] .tc-3, html[data-theme="sombre"] .tc-3 { color: #F0A58C; }
html[data-theme="neon"] .tc-4, html[data-theme="sombre"] .tc-4 { color: #B6D3B1; }
html[data-theme="neon"] .tc-5, html[data-theme="sombre"] .tc-5 { color: #E8C46E; }
html[data-theme="neon"] .tc-6, html[data-theme="sombre"] .tc-6 { color: #8CC4EA; }
/* v2.0 navigation */
.entete button.petit-reglage { font-size: .82rem; padding: .3rem .7rem; min-height: 36px; opacity: .9; }
.entete .li-reglages { display: flex; align-items: center; }
.entete .bouton.secondaire-nav { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--lavande); background: transparent; color: var(--lin); border-radius: 999px; text-decoration: none; min-height: 44px; box-sizing: border-box; }
.entete .bouton.secondaire-nav:hover { background: var(--lavande); color: var(--aubergine); }
.entete nav a.bulle-messages { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; }
.retour-page { margin: 0 0 .8rem; }
.retour-page .discret { min-height: 40px; }
.haut-page { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; min-height: 44px; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--lavande); background: var(--aubergine, #3B2D4F); color: var(--lin, #FAF5EE); font: inherit; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.haut-page[hidden] { display: none; }
.haut-page:hover { background: var(--lavande); color: var(--aubergine, #3B2D4F); }
details.parcours-module > summary { cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
details.parcours-module > summary::-webkit-details-marker { display: none; }
details.parcours-module > summary::after { content: "\25BE"; position: absolute; right: .2rem; top: .15rem; font-size: 1.3rem; transition: transform .2s; }
details.parcours-module:not([open]) > summary::after { transform: rotate(-90deg); }
details.parcours-module > summary:focus-visible { outline: 3px solid var(--framboise); outline-offset: 4px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { details.parcours-module > summary::after { transition: none; } }
/* v2.0 documents, rappel, avis, victoire, propriété intellectuelle */
.note-pi { margin: 1.6rem 0 .5rem; padding: .8rem 1rem; border-left: 4px solid var(--lavande); background: rgba(191,178,230,.14); border-radius: 0 12px 12px 0; font-size: .9rem; }
.liste-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.doc-pdf { background: var(--blanc); border-radius: 18px; padding: 1rem 1.1rem; box-shadow: var(--ombre); }
.doc-pdf h3 { margin: 0 0 .3rem; }
.attente-doc { margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 12px; background: rgba(232,196,110,.2); font-size: .92rem; }
.rappel-ressources { position: fixed; left: 1rem; bottom: 1rem; z-index: 29; max-width: min(22rem, calc(100vw - 8rem)); padding: .8rem 1rem; border-radius: 16px; background: #231833; color: #FAF5EE; border: 1px solid var(--lavande); box-shadow: 0 8px 22px rgba(0,0,0,.4); font-size: .9rem; }
.rappel-ressources p { margin: 0 0 .5rem; }
.rappel-ressources a { color: #F7C6DA; }
.rappel-ressources.reduit { padding: 0; background: transparent; border: 0; box-shadow: none; }
.rappel-bouton { min-height: 44px; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--lavande); background: #231833; color: #FAF5EE; font: inherit; cursor: pointer; }
.boite-avis { margin-top: 2rem; padding: 1.2rem 1.3rem; background: var(--blanc); border-radius: 22px; box-shadow: var(--ombre); }
.modele-avis textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .6rem .7rem; border-radius: 12px; border: 1px solid var(--lavande); margin-bottom: .5rem; }
dialog.victoire-finale { max-width: 32rem; width: calc(100vw - 2rem); border: 2px solid var(--framboise, #F597BE); border-radius: 24px; padding: 1.6rem 1.5rem; background: #231833; color: #FAF5EE; overflow: hidden; text-align: center; }
dialog.victoire-finale::backdrop { background: rgba(10,5,18,.7); }
dialog.victoire-finale .bouton.secondaire { color: #FAF5EE; border-color: #BFB2E6; }
.victoire-avis { margin: 1rem 0; padding: .8rem; border-radius: 16px; background: rgba(255,255,255,.07); }
.confettis { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confettis span { position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; background: var(--c); transform: rotate(var(--r)); border-radius: 2px; animation: av-chute var(--t) var(--d) ease-in forwards; }
@keyframes av-chute { to { transform: translateY(520px) rotate(calc(var(--r) + 540deg)); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .confettis { display: none; } }
[data-calme="1"] .confettis { display: none; }
@media (max-width: 40rem) { .rappel-ressources { bottom: 4.2rem; max-width: calc(100vw - 2rem); } .haut-page { bottom: 1rem; } }
