/* =====================================================================
   Ma 5e — une appli d'entraînement à la Duolingo, pensée pour Mathias :
   dyslexie, dyspraxie, troubles visuo-spatiaux. Une colonne, une chose
   par écran, gros boutons en relief, le bouton principal toujours en bas.
   ===================================================================== */
:root {
  --fond: #FFFFFF;
  --fond-2: #F3F5F8;
  --carte: #FFFFFF;
  --texte: #2B2D33;
  --doux: #5E6370;
  --bord: #E3E5EA;
  --bord-fort: #CDD1D8;

  --vert: #22850F;          /* action principale (blanc dessus : 4,7:1) */
  --vert-levre: #175F08;
  --vert-clair: #DDF6CC;
  --vert-texte: #1D6A0B;
  --orange: #FF8A00;        /* flamme */
  --or: #FFB800;            /* étoiles, couronnes */
  --or-levre: #D99800;
  --bleu: #1A9FE0;
  --ko: #B35500;            /* erreur = orange, jamais rouge : on ne punit pas, et le rouge
                               reste aux terminaisons du code couleur du professeur */
  --ko-levre: #7F3C00;
  --ko-clair: #FFF0DC;
  --ko-texte: #8A4300;
  --jaune: #FFF1A8;

  --rayon: 18px;
  --levre: 4px;
  --taille: 20px;
  --interligne: 1.7;
  --lettres: .03em;
  --mots: .14em;
  --police: "Lexend", "Verdana", "Arial", sans-serif;
  --mat: #2F6FD6;
  --mat-txt: #FFFFFF;
  --colonne: 680px;
  --haut-barre: 64px;
  --haut-nav: 72px;
  color-scheme: light;
}
:root[data-theme="creme"] { --fond:#FBF6EA; --fond-2:#F2EBDA; --carte:#FFFDF7; --bord:#E6DDC8; --bord-fort:#D3C8AE; }
:root[data-theme="bleu"]  { --fond:#EEF5FC; --fond-2:#E0ECF8; --carte:#FAFCFF; --bord:#CFE0F0; --bord-fort:#B5CDE5; }
:root[data-theme="vert"]  { --fond:#EFF8EE; --fond-2:#E2F0E0; --carte:#FAFDF9; --bord:#D3E8D0; --bord-fort:#B8D8B3; }
:root[data-theme="sombre"] {
  --fond:#16181D; --fond-2:#20232A; --carte:#20232A; --texte:#ECEBE6; --doux:#B1B6C1; --bord:#343944; --bord-fort:#474D5A;
  --vert:#2A8A12; --vert-levre:#1A5E09; --vert-clair:#1B3314; --vert-texte:#8BE36B;
  --ko:#C26A1A; --ko-levre:#7F3C00; --ko-clair:#3A2A18; --ko-texte:#FFC58A; --jaune:#5C5220;
  color-scheme: dark;
}
:root[data-police="atkinson"] { --police: "Atkinson Hyperlegible", "Verdana", sans-serif; }
:root[data-police="verdana"]  { --police: "Verdana", "Arial", sans-serif; }
:root[data-police="comic"]    { --police: "Comic Sans MS", "Comic Neue", "Verdana", sans-serif; }
:root[data-espace="normal"]     { --interligne: 1.5; --lettres: 0; --mots: .04em; }
:root[data-espace="tres-large"] { --interligne: 2;   --lettres: .07em; --mots: .25em; }

* { box-sizing: border-box; }
/* Règles de texte de Rémi : titres équilibrés, pas de mot seul en fin de paragraphe (espaces insécables : app/lib/insecable.min.js) */
h1, h2, h3, h4, .titre-chapitre, .lecon-titre, .bloc-titre, .carte-titre, .rangee-nom, .question, .bulle, .etiquette, figcaption { text-wrap: balance; }
p, li, .encadre, .expl, .lexique div { text-wrap: pretty; }
html { font-size: var(--taille); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: var(--police); line-height: var(--interligne);
  letter-spacing: var(--lettres); word-spacing: var(--mots);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--haut-nav) + env(safe-area-inset-bottom));
}
body.immersif { padding-bottom: 0; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; word-spacing: inherit; color: inherit; }
a { color: var(--bleu); text-underline-offset: .2em; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; text-wrap: balance; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 12px; }
::selection { background: #FFE58A; color: #2B2D33; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* pictos Phosphor (MIT), les mêmes que Miaou : des formes pleines */
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; fill: currentColor; stroke: none; }
.petit-texte { font-size: .8rem; color: var(--doux); line-height: 1.45; }
.vide-msg { padding: 24px; text-align: center; color: var(--doux); }

/* ---------------------------------------------------------------- barre du haut */
.barre {
  position: sticky; top: 0; z-index: 20; height: var(--haut-barre);
  display: flex; align-items: center; gap: 10px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--carte); border-bottom: 2px solid var(--bord);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texte); font-weight: 800; font-size: 1.1rem; margin-right: auto; }
/* ---- logo Matou : le mot, la tête en O ; comme Miaou, mauve sur le clair, blanc sur la nuit ---- */
.logo-matou { display: block; height: 26px; width: auto; overflow: visible; color: #7d42f3; }
:root[data-theme="sombre"] .logo-matou { color: #fff; }
.logo-matou .mt-m { transform-box: fill-box; }
.logo-matou .mt-m-g1, .logo-matou .mt-m-g2, .logo-matou .mt-m-g3 { transform-origin: 100% 50%; }
.logo-matou .mt-m-d1, .logo-matou .mt-m-d2, .logo-matou .mt-m-d3 { transform-origin: 0 50%; }
.logo-matou .mt-m-g2, .logo-matou .mt-m-d2 { animation-delay: .18s; }
.logo-matou .mt-m-g3, .logo-matou .mt-m-d3 { animation-delay: .36s; }
.logo:hover .logo-matou .mt-m-g1, .logo:hover .logo-matou .mt-m-g2, .logo:hover .logo-matou .mt-m-g3 { animation: mi-moustache-g 2.8s ease-in-out; --mi-angle: 4.5deg; }
.logo:hover .logo-matou .mt-m-d1, .logo:hover .logo-matou .mt-m-d2, .logo:hover .logo-matou .mt-m-d3 { animation: mi-moustache-d 2.8s ease-in-out; --mi-angle: 4.5deg; }
/* l’écran d’ouverture : le mot lettre par lettre, puis les moustaches (repris de Miaou) */
.ouverture { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--fond); animation: ouverture-fin .4s ease 2.4s forwards; }
.ouverture .logo-matou { height: auto; width: min(64vw, 300px); }
.ouverture .mt-l { opacity: 0; animation: mi-lettre .5s cubic-bezier(.16, 1, .3, 1) forwards; }
.ouverture .mt-l-1 { animation-delay: .1s; } .ouverture .mt-l-2 { animation-delay: .22s; } .ouverture .mt-l-3 { animation-delay: .34s; }
.ouverture .mt-l-4 { animation-delay: .46s; } .ouverture .mt-l-5 { animation-delay: .58s; }
.ouverture .mt-m { animation-duration: 1.15s; animation-timing-function: ease-in-out; animation-iteration-count: 2; }
.ouverture .mt-m-g1, .ouverture .mt-m-g2, .ouverture .mt-m-g3 { animation-name: mi-moustache-g; }
.ouverture .mt-m-d1, .ouverture .mt-m-d2, .ouverture .mt-m-d3 { animation-name: mi-moustache-d; }
.ouverture .mt-m-g1, .ouverture .mt-m-d1 { animation-delay: .85s; --mi-angle: 7deg; }
.ouverture .mt-m-g2, .ouverture .mt-m-d2 { animation-delay: 1.05s; --mi-angle: 5deg; }
.ouverture .mt-m-g3, .ouverture .mt-m-d3 { animation-delay: 1.25s; --mi-angle: 7deg; }
@keyframes mi-lettre { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes ouverture-fin { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ouverture { animation-delay: 1s; } .ouverture .mt-l { opacity: 1; animation: none; } .ouverture .mt-m { animation: none; } }
.stats { display: flex; align-items: center; gap: 6px; }
.stat {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .95rem;
  padding: 6px 10px; border-radius: 12px; font-variant-numeric: tabular-nums;
}
.stat .ico { width: 1.4em; height: 1.4em; }
.stat.flamme { color: #B85A00; }
.stat.flamme .ico { color: var(--orange); }
.stat.flamme.eteinte { color: var(--bord-fort); }
.stat.xp { color: #8A5C00; }
.stat.xp .ico { color: var(--or); }
:root[data-theme="sombre"] .stat.xp { color: var(--or); }
:root[data-theme="sombre"] .stat.flamme { color: var(--orange); }
.btn-rond {
  width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--bord); background: var(--carte);
  display: grid; place-items: center; cursor: pointer; color: var(--doux); box-shadow: 0 3px 0 var(--bord);
}
.btn-rond .ico { width: 26px; height: 26px; }
.btn-rond[aria-pressed="true"] { background: var(--jaune); border-color: var(--or); color: var(--texte); box-shadow: 0 3px 0 var(--or-levre); }
.btn-rond:active { transform: translateY(3px); box-shadow: none; }

/* ---------------------------------------------------------------- navigation basse */
.nav-bas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 8px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: var(--carte); border-top: 2px solid var(--bord);
}
.nav-bas a {
  flex: 0 1 180px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 14px; text-decoration: none; color: var(--doux); font-weight: 700; font-size: .78rem; border: 2px solid transparent;
}
.nav-bas a .ico { width: 30px; height: 30px; }
.nav-bas a[aria-current="page"] { color: var(--vert-texte); background: var(--vert-clair); border-color: color-mix(in srgb, var(--vert) 35%, transparent); }
:root[data-theme="sombre"] .nav-bas a[aria-current="page"] { color: var(--vert-texte); }
body.immersif .barre, body.immersif .nav-bas { display: none; }

main { max-width: var(--colonne); margin: 0 auto; padding: 22px 16px 32px; outline: none; }
main:focus, main:focus-visible { outline: none; }
body.immersif main { max-width: none; padding: 0; }

/* ---------------------------------------------------------------- boutons en relief */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 10px 22px; border-radius: 16px;
  border: 2px solid var(--bord); background: var(--carte); color: var(--texte);
  box-shadow: 0 var(--levre) 0 var(--bord); font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .15s;
}
.btn .ico { width: 1.3em; height: 1.3em; }
.btn:hover { filter: brightness(.98); }
.btn:active:not([disabled]) { transform: translateY(var(--levre)); box-shadow: 0 0 0 transparent; }
.btn.principal { background: var(--vert); border-color: var(--vert); color: #fff; box-shadow: 0 var(--levre) 0 var(--vert-levre); }
.btn.principal:hover { filter: brightness(1.06); }
.btn.danger { background: var(--ko); border-color: var(--ko); color: #fff; box-shadow: 0 var(--levre) 0 var(--ko-levre); }
.btn.large { width: 100%; }
.btn.petit { min-height: 44px; padding: 6px 14px; font-size: .85rem; }
.btn[disabled] { background: var(--fond-2); border-color: var(--bord); color: var(--doux); box-shadow: 0 var(--levre) 0 var(--bord); cursor: not-allowed; }
.ligne-boutons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.ligne-boutons.fin { justify-content: flex-end; }
.lire {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--bord); background: var(--carte);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--bleu); vertical-align: middle;
  box-shadow: 0 3px 0 var(--bord); margin-right: 8px;
}
.lire .ico { width: 24px; height: 24px; }
.lire:active { transform: translateY(3px); box-shadow: none; }

/* ---------------------------------------------------------------- rangées (la brique de base) */
.rangee {
  display: flex; align-items: center; gap: 16px; min-height: 80px; padding: 12px 16px;
  background: var(--carte); border: 2px solid var(--bord); border-radius: var(--rayon);
  box-shadow: 0 var(--levre) 0 var(--bord); text-decoration: none; color: var(--texte);
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.rangee:active { transform: translateY(var(--levre)); box-shadow: 0 0 0 transparent; }
.rangee .rangee-txt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.rangee .rangee-nom { font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
.rangee .rangee-info { font-size: .8rem; color: var(--doux); font-weight: 600; }
.rangee .ico-fin { color: var(--bord-fort); width: 28px; height: 28px; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.titre-section { margin: 30px 0 14px; }

.icone-matiere { width: 60px; height: 60px; flex: none; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--mat) 14%, var(--carte)); font-size: 2rem; }
.icone-matiere svg { width: 48px; height: 48px; }
.jauge { height: 14px; background: var(--fond-2); border-radius: 99px; overflow: hidden; border: 0; }
.jauge > i { display: block; height: 100%; min-width: 14px; border-radius: 99px; background: var(--mat); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), inset 0 3px 0 rgba(255,255,255,.3); }
.jauge > i[style*="width:0%"] { min-width: 0; }

/* ---------------------------------------------------------------- accueil */
.salut { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.salut .chat { width: 128px; flex: none; }
.bulle {
  position: relative; margin-bottom: 34px; padding: 14px 18px; border-radius: 18px;
  background: var(--carte); border: 2px solid var(--bord); font-weight: 700; font-size: 1.1rem; line-height: 1.35;
}
.bulle::before {
  content: ""; position: absolute; left: -12px; bottom: 16px; width: 20px; height: 20px;
  background: var(--carte); border-left: 2px solid var(--bord); border-bottom: 2px solid var(--bord); transform: rotate(45deg);
}
.bulle small { display: block; font-size: .85rem; color: var(--doux); font-weight: 600; margin-top: 2px; }
.continuer { min-height: 84px; justify-content: flex-start; text-align: left; padding: 12px 20px; }
.continuer .ico { width: 36px; height: 36px; }
.continuer span { display: grid; gap: 2px; min-width: 0; }
.continuer b { font-size: 1.15rem; }
.continuer small { font-weight: 600; font-size: .85rem; line-height: 1.35; }
.rangee.revision .icone-matiere { background: color-mix(in srgb, var(--bleu) 14%, var(--carte)); color: var(--bleu); }
.rangee.revision.faite .icone-matiere { background: var(--vert-clair); color: var(--vert); }
.icone-matiere .ico { width: 34px; height: 34px; }

/* ---------------------------------------------------------------- matière : le chemin */
.entete {
  display: flex; align-items: center; gap: 14px; margin: -22px -16px 0; padding: 18px 16px 22px;
  background: var(--mat); color: var(--mat-txt); border-radius: 0 0 22px 22px;
}
.entete h1 { margin: 0; font-size: 1.4rem; }
.entete .entete-info { font-size: .85rem; font-weight: 700; opacity: .92; }
.entete .icone-matiere { background: rgba(255,255,255,.9); }
.entete .btn-rond { flex: none; background: rgba(255,255,255,.95); border-color: transparent; color: #2B2D33; box-shadow: 0 3px 0 color-mix(in srgb, var(--mat) 72%, #000); }
.unite { margin-top: 26px; }
.unite-bandeau {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: var(--rayon); background: var(--mat); color: var(--mat-txt);
  box-shadow: 0 var(--levre) 0 color-mix(in srgb, var(--mat) 72%, #000); font-weight: 800; line-height: 1.3;
}
.unite-bandeau small { font-weight: 700; opacity: .9; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chemin { list-style: none; margin: 0; padding: 22px 0 6px; position: relative; display: grid; gap: 18px; }
.chemin::before {
  content: ""; position: absolute; left: 26px; top: 22px; bottom: 40px; width: 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--mat) 30%, var(--carte));
}
.etape > a { position: relative; display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--texte); min-height: 72px; }
.pastille {
  position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--mat) 16%, var(--carte)); color: var(--mat);
  border: 3px solid color-mix(in srgb, var(--mat) 35%, var(--carte));
  box-shadow: 0 5px 0 color-mix(in srgb, var(--mat) 45%, var(--carte)); transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.pastille .ico { width: 30px; height: 30px; }
.etape > a:active .pastille { transform: translateY(5px); box-shadow: 0 0 0 transparent; }
.etape.commence .pastille { background: var(--mat); border-color: var(--mat); color: var(--mat-txt); box-shadow: 0 5px 0 color-mix(in srgb, var(--mat) 72%, #000); }
.etape.parfait .pastille { background: var(--or); border-color: var(--or); color: #fff; box-shadow: 0 5px 0 var(--or-levre); }
.etape.conseille .pastille {
  width: 76px; height: 76px; margin-left: -6px; background: var(--mat); border: 4px solid var(--carte); color: var(--mat-txt);
  box-shadow: 0 0 0 4px var(--mat), 0 9px 0 color-mix(in srgb, var(--mat) 72%, #000); animation: rebond 1.8s cubic-bezier(.3,.7,.4,1) infinite;
}
.etape.conseille .pastille .ico { width: 36px; height: 36px; }
.etape-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.etape-titre { font-weight: 700; font-size: .98rem; line-height: 1.35; }
.etape.conseille .etape-titre { font-weight: 800; }
.chat-pastille { position: absolute; right: -20px; top: -20px; width: 44px; height: 44px; }
.mini-etoiles { display: inline-flex; gap: 2px; color: var(--bord-fort); }
.mini-etoiles .ico { width: 18px; height: 18px; }
.mini-etoiles .on { color: var(--or); }
@keyframes rebond { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-7px); } 60% { transform: translateY(0); } }

/* ---------------------------------------------------------------- chapitre */
.titre-chapitre { margin: 22px 0 6px; font-size: 1.35rem; }
.lire-fiche { min-height: 84px; margin-top: 18px; }
.lire-fiche .ico { width: 34px; height: 34px; }
.rangee.jeu .icone-matiere { background: color-mix(in srgb, var(--mat) 14%, var(--carte)); color: var(--mat); width: 56px; height: 56px; }
:root[data-theme="sombre"] .rangee.jeu .icone-matiere { color: var(--texte); }
.lien-discret { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 700; font-size: .9rem; color: var(--doux); text-decoration: none; min-height: 44px; }

/* ---------------------------------------------------------------- écran de leçon (fiche pas à pas, jeux) */
.lecon { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--fond); }
.lecon-haut {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  max-width: calc(var(--colonne) + 32px); width: 100%; margin: 0 auto; padding: 14px 16px; background: var(--fond);
}
.lecon-haut .btn-rond { border: 0; box-shadow: none; background: transparent; }
.lecon-haut .btn-rond .ico { width: 30px; height: 30px; }
.chat-lecon { width: 56px; flex: none; margin: -6px 0; }
.lecon-jauge { flex: 1; height: 18px; border-radius: 99px; background: var(--fond-2); overflow: hidden; }
.lecon-jauge > i {
  display: block; height: 100%; min-width: 18px; border-radius: 99px; background: var(--vert);
  box-shadow: inset 0 5px 0 rgba(255,255,255,.28); transition: width .45s cubic-bezier(.2,.8,.2,1);
}
.lecon-corps { flex: 1; width: 100%; max-width: calc(var(--colonne) + 32px); margin: 0 auto; padding: 8px 16px 200px; }
.lecon-titre { font-size: 1.3rem; margin: 6px 0 18px; }
.lecon-pied {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--carte); border-top: 2px solid var(--bord);
  transition: background .2s;
}
.lecon-pied-int { max-width: var(--colonne); margin: 0 auto; display: grid; gap: 12px; }
.lecon-pied:has(.lecon-pied-int:empty) { display: none; }
.lecon-pied .ligne-boutons { margin: 0; flex-wrap: nowrap; }
.lecon-pied .ligne-boutons .btn { flex: 1; }
.lecon-pied.ok { background: var(--vert-clair); border-top-color: transparent; }
.lecon-pied.ko { background: var(--ko-clair); border-top-color: transparent; }
.lecon-pied.ko .btn.principal { background: var(--ko); border-color: var(--ko); box-shadow: 0 var(--levre) 0 var(--ko-levre); }
.verdict { display: flex; align-items: center; gap: 12px; animation: monte .28s cubic-bezier(.2,.8,.2,1); }
.verdict .chat-verdict { width: 68px; flex: none; margin: -12px 0 -6px; }
.lecon-pied.ok .verdict { color: var(--vert-texte); }
.lecon-pied.ko .verdict { color: var(--ko-texte); }
.verdict b { font-size: 1.25rem; display: block; }
.verdict .expl { font-weight: 600; color: var(--texte); font-size: .92rem; line-height: 1.5; }
.verdict .expl ol { margin: 4px 0 0; padding-left: 1.3em; }
@keyframes monte { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.question { font-size: 1.25rem; font-weight: 800; margin: 0 0 20px; display: flex; align-items: flex-start; gap: 4px; line-height: 1.4; }
.consigne { font-size: .88rem; color: var(--doux); font-weight: 600; margin: -10px 0 16px; }
.choix { display: grid; gap: 14px; }
.choix button, .vf button, .relier button {
  display: flex; align-items: center; gap: 14px; text-align: left; min-height: 76px; padding: 14px 18px;
  border-radius: var(--rayon); border: 2px solid var(--bord); background: var(--carte); cursor: pointer;
  box-shadow: 0 var(--levre) 0 var(--bord); font-weight: 600; line-height: 1.4;
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.choix button:active:not([disabled]), .vf button:active:not([disabled]), .relier button:active:not([disabled]) { transform: translateY(var(--levre)); box-shadow: 0 0 0 transparent; }
.choix .lettre {
  flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--bord);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--doux);
}
.choix button.choisi, .vf button.choisi {
  border-color: var(--bleu); background: color-mix(in srgb, var(--bleu) 12%, var(--carte)); box-shadow: 0 var(--levre) 0 var(--bleu);
}
.choix button.choisi .lettre { border-color: var(--bleu); color: var(--bleu); }
.choix button .notes { pointer-events: none; }
.choix button.bon, .vf button.bon { background: var(--vert-clair); border-color: var(--vert); box-shadow: 0 var(--levre) 0 var(--vert); color: var(--vert-texte); }
.choix button.faux, .vf button.faux { background: var(--ko-clair); border-color: var(--ko); box-shadow: 0 var(--levre) 0 var(--ko); color: var(--ko-texte); }
.choix button.bon .lettre { border-color: var(--vert); color: var(--vert); }
.choix button.faux .lettre { border-color: var(--ko); color: var(--ko); }
.choix button[disabled], .vf button[disabled] { cursor: default; }
.choix button[disabled]:not(.bon):not(.faux) { opacity: .55; }
.vf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vf button { flex-direction: column; justify-content: center; min-height: 128px; font-size: 1.2rem; font-weight: 800; text-align: center; }
.vf button .ico { width: 44px; height: 44px; }
.vf button[data-v="1"] .ico { color: var(--vert); }
.vf button[data-v="0"] .ico { color: var(--ko); }

.flashcard { perspective: 1200px; cursor: pointer; margin: 0 auto; max-width: 560px; }
.flashcard .int { position: relative; min-height: 260px; transition: transform .5s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.flashcard.tournee .int { transform: rotateY(180deg); }
.flashcard .face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; text-align: center;
  padding: 26px; border-radius: 22px; border: 2px solid var(--bord); background: var(--carte); box-shadow: 0 6px 0 var(--bord);
  font-size: 1.4rem; font-weight: 800; line-height: 1.35;
}
.flashcard .dos { transform: rotateY(180deg); background: color-mix(in srgb, var(--mat) 14%, var(--carte)); border-color: var(--mat); box-shadow: 0 6px 0 color-mix(in srgb, var(--mat) 72%, #000); }
.flashcard .indice { position: absolute; bottom: 14px; left: 0; right: 0; font-size: .8rem; color: var(--doux); font-weight: 600; display: flex; gap: 6px; justify-content: center; align-items: center; }
.ecouter-carte { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }

.relier { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.relier .col { display: grid; gap: 14px; align-content: start; }
.relier button { min-height: 60px; justify-content: center; text-align: center; }
.relier button.choisi { border-color: var(--bleu); background: color-mix(in srgb, var(--bleu) 12%, var(--carte)); box-shadow: 0 var(--levre) 0 var(--bleu); }
.relier button.trouve { border-color: var(--vert); background: var(--vert-clair); color: var(--vert-texte); box-shadow: 0 var(--levre) 0 var(--vert); opacity: .6; cursor: default; }
.relier button.secoue { animation: secoue .35s; border-color: var(--ko); box-shadow: 0 var(--levre) 0 var(--ko); }
@keyframes secoue { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.ordre { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ordre li {
  display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 12px; border-radius: var(--rayon);
  border: 2px solid var(--bord); background: var(--carte); box-shadow: 0 var(--levre) 0 var(--bord); min-height: 68px;
}
.ordre li .pos { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--fond-2); font-weight: 800; color: var(--doux); }
.ordre li .txt { flex: 1; font-weight: 600; line-height: 1.4; }
.ordre li button {
  flex: none; width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--bord); background: var(--carte);
  box-shadow: 0 3px 0 var(--bord); cursor: pointer; display: grid; place-items: center; color: var(--texte);
}
.ordre li button .ico { width: 26px; height: 26px; }
.ordre li button[disabled] { opacity: .3; cursor: default; }
.ordre li.bon { border-color: var(--vert); background: var(--vert-clair); box-shadow: 0 var(--levre) 0 var(--vert); }
.ordre li.faux { border-color: var(--ko); background: var(--ko-clair); box-shadow: 0 var(--levre) 0 var(--ko); }

.trou-phrase { font-size: 1.3rem; line-height: 2.3; font-weight: 600; }
.trou-phrase input {
  font-size: 1.2rem; padding: 4px 12px; border: 2px solid var(--bord-fort); border-bottom-width: 4px; border-radius: 12px;
  background: var(--carte); min-width: 5em; width: 8em; text-align: center; font-weight: 800; color: var(--texte);
}
.trou-phrase input:focus { border-color: var(--bleu); outline: none; }
.trou-phrase input.bon { border-color: var(--vert); background: var(--vert-clair); }
.trou-phrase input.faux { border-color: var(--ko); background: var(--ko-clair); }
.aide { margin-top: 14px; padding: 12px 16px; background: var(--jaune); border-radius: 14px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.aide .ico { color: var(--or-levre); width: 26px; height: 26px; }

/* ----- résultat ----- */
.resultat { text-align: center; padding-top: 10px; }
.resultat .chat { width: 190px; margin: 0 auto; }
.resultat h1 { font-size: 1.6rem; margin: 10px 0 6px; }
.grosses-etoiles { display: flex; justify-content: center; gap: 10px; margin: 12px 0 22px; color: var(--bord); }
.grosses-etoiles .ico { width: 64px; height: 64px; }
.grosses-etoiles .on { color: var(--or); animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.grosses-etoiles .on:nth-child(2) { animation-delay: .15s; width: 78px; height: 78px; }
.grosses-etoiles .on:nth-child(3) { animation-delay: .3s; }
.grosses-etoiles .ico:nth-child(2) { width: 78px; height: 78px; margin-top: -10px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.tuiles-score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; margin: 0 auto; }
.illus-question { margin: 0 auto 16px; max-width: 260px; padding: 8px; border-radius: 18px; background: #fff; border: 2px solid var(--bord); }
.illus-question svg { width: 100%; height: auto; max-height: 26vh; display: block; margin: 0 auto; }
.tuile-score { border-radius: var(--rayon); border: 2px solid var(--c); overflow: hidden; background: var(--c); }
.tuile-score span { display: block; color: #fff; font-weight: 800; font-size: .78rem; padding: 4px; text-transform: none; }
.tuile-score b { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--carte); border-radius: 14px; padding: 12px 8px; font-size: 1.3rem; color: var(--c); font-variant-numeric: tabular-nums; }
.tuile-score b .ico { width: 1.2em; height: 1.2em; }

/* ---------------------------------------------------------------- fiche */
.fiche-etape > * + * { margin-top: 18px; }
.bloc { position: relative; max-width: 68ch; }
.bloc.large { max-width: none; }
p.bloc, .bloc-titre { display: flex; align-items: flex-start; gap: 4px; }
:where(p.bloc) { margin: 0; }
.bloc-titre { color: var(--texte); font-size: 1.2rem; margin: 0; }
.encadre { border-radius: var(--rayon); padding: 14px 16px 16px; background: var(--fond-2); }
.encadre .etiquette { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.encadre .etiquette > .ico { width: 28px; height: 28px; padding: 4px; border-radius: 9px; color: #fff; background: var(--c); }
.encadre .etiquette .lire { margin: 0 0 0 auto; }
.encadre.essentiel { background: #FFF5CF; --c: #D99800; }
.encadre.exemple   { background: #E5F3FD; --c: #1A86C4; }
.encadre.astuce    { background: #E6F8DC; --c: #2A9A14; }
.encadre.attention { background: #FFE9DC; --c: #E26A00; }
:root[data-theme="sombre"] .encadre.essentiel { background:#3A3320; }
:root[data-theme="sombre"] .encadre.exemple   { background:#1E2A40; }
:root[data-theme="sombre"] .encadre.astuce    { background:#1C3324; }
:root[data-theme="sombre"] .encadre.attention { background:#3D2619; }
.fiche-etape ul, .fiche-etape ol { padding-left: 1.4em; }
:where(.fiche-etape ul, .fiche-etape ol) { margin: 0; }
.fiche-etape li + li { margin-top: 8px; }
.fiche-etape li { display: list-item; }
.fiche-etape li > span + .lire { margin: 0 0 0 8px; width: 36px; height: 36px; }
.etapes { list-style: none; padding: 0 !important; counter-reset: etape; }
.etapes li { counter-increment: etape; display: flex !important; gap: 12px; align-items: flex-start; }
.etapes li::before {
  content: counter(etape); flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--mat); color: var(--mat-txt); font-weight: 800;
}
.lexique { display: grid; gap: 10px; }
.lexique div { padding: 10px 14px; border-radius: 14px; background: var(--fond-2); display: flex; align-items: flex-start; gap: 4px; }
.lexique b { color: var(--texte); }
table.tab { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .92rem; border: 2px solid var(--bord); border-radius: 14px; overflow: hidden; }
.tab-scroll { overflow-x: auto; }
table.tab th, table.tab td { border-bottom: 2px solid var(--bord); padding: 10px 12px; vertical-align: top; text-align: left; }
table.tab tr:last-child td { border-bottom: 0; }
table.tab th { background: var(--mat); color: var(--mat-txt); }
table.tab tr:nth-child(even) td { background: var(--fond-2); }
:root[data-lignes="oui"] .fiche-etape li:nth-child(even), :root[data-lignes="oui"] .poeme .vers:nth-child(even) { background: #EEF4FF; border-radius: 8px; }
:root[data-theme="sombre"][data-lignes="oui"] .fiche-etape li:nth-child(even), :root[data-theme="sombre"][data-lignes="oui"] .poeme .vers:nth-child(even) { background: #2C3446; }

/* Écouter un bloc : le haut-parleur quitte la ligne de lecture et se range dans une
   colonne à droite, toujours au même endroit, discret (gris sans cadre) mais avec
   une grande zone tactile. Le texte recommence au bord, comme un vrai cours. */
.fiche-etape p.bloc, .fiche-etape .bloc-titre, .fiche-etape li, .fiche-etape .lexique > div, .illus-bloc figcaption {
  position: relative; padding-right: 48px;
}
.fiche-etape p.bloc > .lire, .fiche-etape .bloc-titre > .lire, .fiche-etape li > .lire,
.fiche-etape .lexique > div > .lire, .illus-bloc figcaption > .lire {
  position: absolute; right: 0; top: -.2em; margin: 0;
}
.fiche-etape .lire, .illus-bloc .lire, .poeme .lire, .conj .lire {
  width: 44px; height: 44px; border: 0; box-shadow: none; background: transparent; color: #8A919E; border-radius: 12px;
}
.fiche-etape .lire .ico, .illus-bloc .lire .ico { width: 24px; height: 24px; }
.fiche-etape .lire:hover, .fiche-etape .lire:focus-visible, .illus-bloc .lire:hover, .lire.parle { color: var(--bleu); background: color-mix(in srgb, var(--bleu) 12%, transparent); }
.fiche-etape .tab-scroll > .lire, .fiche-etape .bloc.large > .lire:first-child { display: flex; margin: 0 0 4px auto; }
.encadre .etiquette .lire { width: 40px; height: 40px; }
/* Tous les haut-parleurs d’une leçon sur une seule colonne (Rémi, 11 novembre 2026) : les blocs prennent toute la
   largeur, et chaque bouton est à 16 px du bord droit, celui des encadrés comme celui du texte. */
.fiche-etape .bloc { max-width: none; }
.fiche-etape p.bloc, .fiche-etape .bloc-titre, .fiche-etape li, .fiche-etape .lexique > div, .illus-bloc figcaption { padding-right: 64px; }
.fiche-etape p.bloc > .lire, .fiche-etape .bloc-titre > .lire, .fiche-etape li > .lire,
.fiche-etape .lexique > div > .lire, .illus-bloc figcaption > .lire { right: 16px; }
.fiche-etape .tab-scroll > .lire, .fiche-etape .bloc.large > .lire:first-child { margin-right: 16px; }
.encadre .etiquette .lire { width: 44px; height: 44px; margin-right: 0; }
.conj h4 .lire { color: var(--mat-txt); }
.vocab .lire { color: var(--bleu); background: var(--carte); border: 2px solid var(--bord); box-shadow: 0 3px 0 var(--bord); }
/* Ce qui est lu à voix haute est surligné : il voit ce qu’il entend */
.en-lecture { background: color-mix(in srgb, var(--jaune) 70%, transparent) !important; border-radius: 10px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--jaune) 70%, transparent) !important; }

/* Des parties bien séparées : « 1. », « 2. »… respirent */
.fiche-etape > .bloc-titre:not(:first-child) { margin-top: 40px; }
.fiche-etape li + li { margin-top: 12px; }
.fiche-etape .etapes li + li { margin-top: 14px; }

/* illustrations */
.illus-bloc { margin: 0 auto; padding: 16px; border-radius: 20px; background: #fff; border: 2px solid var(--bord); text-align: center; max-width: 600px; }
.fiche-etape > .illus-bloc { margin: 22px auto 0; }
.lecon-titre.bloc-titre { margin: 6px 0 0; }
.illus-bloc .illus { display: block; }
.illus-bloc svg { width: 100%; height: auto; max-height: min(400px, 46vh); display: block; margin: 0 auto; }
.illus-bloc figcaption { margin-top: 10px; font-weight: 700; font-size: .95rem; color: #2B2D33; display: flex; align-items: center; justify-content: center; gap: 6px; }
.illus .lbl { font-family: var(--police); }

/* code couleur du professeur */
.bv   { color: #15803D; font-weight: 700; }
.term { color: #DC2626; font-weight: 700; }
.marq { background: #FDE047; color: #111; font-weight: 700; padding: 0 2px; border-radius: 3px; }
mark  { background: var(--jaune); color: inherit; padding: 0 3px; border-radius: 4px; }
.c1 { color: #2563EB; font-weight: 700; } .c2 { color: #7C3AED; font-weight: 700; }
.c3 { color: #EA580C; font-weight: 700; } .c4 { color: #16A34A; font-weight: 700; }
:root[data-theme="sombre"] .bv { color:#4ADE80; } :root[data-theme="sombre"] .term { color:#F87171; }
:root[data-theme="sombre"] .c1 { color:#93C5FD; } :root[data-theme="sombre"] .c2 { color:#C4B5FD; }
:root[data-theme="sombre"] .c3 { color:#FDBA74; } :root[data-theme="sombre"] .c4 { color:#86EFAC; }

.conjs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.conj { border: 2px solid var(--bord); border-radius: var(--rayon); overflow: hidden; background: var(--carte); }
.conj h4 { margin: 0; padding: 8px 14px; background: var(--mat); color: var(--mat-txt); font-size: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conj h4 .lire { margin: 0; width: 38px; height: 38px; }
.conj .info { padding: 4px 14px; font-size: .8rem; color: var(--doux); background: var(--fond-2); }
.conj ol { list-style: none; margin: 0; padding: 10px 14px; }
.conj li { margin: 0 !important; }
.conj .pron { color: var(--doux); display: inline-block; min-width: 3.4em; }
.legende-conj { font-size: .85rem; margin: 0 0 12px; }

.vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.vocab div { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 14px; background: var(--fond-2); }
.vocab .lire { margin-right: 4px; }
.vocab .etr { font-weight: 800; }
.vocab .fr { color: var(--doux); }

.poeme { background: var(--fond-2); border-radius: var(--rayon); padding: 16px 20px; }
.poeme h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.poeme .auteur { color: var(--doux); font-size: .85rem; margin: 0 0 10px; }
.poeme .vers { display: flex; gap: 14px; padding: 1px 6px; }
.poeme .vers .n { width: 2em; flex: none; text-align: right; color: var(--doux); font-size: .75rem; padding-top: .3em; font-variant-numeric: tabular-nums; }

.frise { display: grid; gap: 0; padding: 4px 0; }
.frise .ev { position: relative; padding: 0 0 18px 34px; }
.frise .ev::before { content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--carte); border: 4px solid var(--mat); }
.frise .ev::after { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 4px; border-radius: 4px; background: var(--bord); }
.frise .ev:last-child::after { display: none; }
.frise .date { display: block; font-weight: 800; color: var(--texte); }
.frise .quoi { font-size: .92rem; line-height: 1.45; }

/* rythmes */
.rythmes { display: grid; gap: 12px; }
.rythme { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--fond-2); border-radius: var(--rayon); flex-wrap: wrap; }
.rythme .nom { font-weight: 800; min-width: 6em; }
.rythme .btn { width: 52px; min-height: 52px; padding: 0; }
.notes { display: flex; gap: 6px; flex-wrap: wrap; }
.note { display: flex; flex-direction: column; align-items: center; min-width: 50px; padding: 6px 6px 4px; border-radius: 12px; border: 2px solid var(--bord); background: var(--carte); color: var(--texte); transition: transform .12s, background .12s; }
.note .sym { height: 46px; display: grid; place-items: center; font-size: 1.8rem; line-height: 1; }
.note .sym svg { height: 46px; width: auto; }
.note .syl { font-size: .72rem; color: var(--doux); font-weight: 700; }
.note.joue { background: var(--jaune); border-color: var(--or); transform: scale(1.08); }

/* oulipo */
.oulipo { background: var(--fond-2); border-radius: var(--rayon); padding: 16px; }
.oulipo .cases { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.oulipo .fixe { font-weight: 800; padding: 8px 12px; background: var(--mat); color: var(--mat-txt); border-radius: 12px; }
.oulipo select, .oulipo input { padding: 8px 10px; border-radius: 12px; border: 2px solid var(--bord); background: var(--carte); min-height: 48px; }
.oulipo input { width: 9em; }
.oulipo .phrase { font-size: 1.2rem; font-weight: 800; margin-top: 14px; }
.oulipo ul { margin: 8px 0 0; }

/* ---------------------------------------------------------------- tous les cours */
.recherche {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 16px; border-radius: 16px;
  border: 2px solid var(--bord); border-bottom-width: 4px; background: var(--fond-2); color: var(--doux);
}
.recherche:focus-within { border-color: var(--bleu); background: var(--carte); }
.recherche .ico { width: 28px; height: 28px; }
.recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.1rem; font-weight: 700; color: var(--texte); min-height: 56px; outline: none; }
.puces { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.puce {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 8px; border-radius: 99px;
  border: 2px solid var(--bord); background: var(--carte); box-shadow: 0 3px 0 var(--bord); font-weight: 700; font-size: .9rem; cursor: pointer;
}
.puce[data-mat=""] { padding-left: 14px; }
.puce .mini-icone { width: 32px; height: 32px; display: grid; place-items: center; font-size: 1.3rem; }
.puce .mini-icone svg { width: 30px; height: 30px; }
.puce[aria-pressed="true"] { background: var(--mat, var(--vert)); border-color: var(--mat, var(--vert)); color: var(--mat-txt, #fff); box-shadow: 0 3px 0 color-mix(in srgb, var(--mat, var(--vert)) 72%, #000); }
.puce[data-mat=""][aria-pressed="true"] { background: var(--vert); border-color: var(--vert); color: #fff; box-shadow: 0 3px 0 var(--vert-levre); }
.puce[aria-pressed="true"] .mini-icone { background: #fff; border-radius: 50%; }
.groupe-cours { margin-top: 26px; }
.groupe-cours h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.groupe-cours h2 .icone-matiere { width: 48px; height: 48px; border-radius: 14px; }
.groupe-cours h2 .icone-matiere svg { width: 38px; height: 38px; }
.groupe-cours h2 small { margin-left: auto; color: var(--doux); font-size: .85rem; font-variant-numeric: tabular-nums; }
.liste-cours { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rangee.cours { min-height: 64px; }
.rangee.cours .rangee-nom { font-weight: 700; font-size: .98rem; }
.rien { text-align: center; padding: 20px 0; font-weight: 700; color: var(--doux); }
.rien .chat { width: 140px; margin: 0 auto; }

/* ---------------------------------------------------------------- devoirs et cahier */
.ajouter-devoir { margin-top: 18px; }
button.lien-discret { border: 0; background: none; cursor: pointer; padding: 0; }
.rangee.devoir.fait { opacity: .75; }
.devoir-fait { color: var(--vert); } .devoir-fait .ico { width: 30px; height: 30px; }
.champ-devoir { display: grid; gap: 6px; margin-top: 18px; font-weight: 800; }
.champ-devoir textarea, .champ-devoir input, .bloc-cahier textarea {
  width: 100%; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--bord); border-bottom-width: 4px;
  background: var(--carte); color: var(--texte); min-height: 60px; resize: none; line-height: var(--interligne);
}
.champ-devoir textarea:focus, .champ-devoir input:focus, .bloc-cahier textarea:focus { outline: none; border-color: var(--bleu); }
.livre-auteur { margin: -6px 0 0; color: var(--doux); font-weight: 700; }
.livre-bientot { opacity: .65; cursor: default; }
.btn-retour { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 800; color: var(--doux); text-decoration: none; }
.btn-retour .ico { width: 24px; height: 24px; }
.defi-message { text-align: center; padding-top: 16px; font-size: 1.05rem; font-weight: 700; }
.defi-message .chat { width: 150px; margin: 0 auto 10px; }
.carnet-duo { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; align-items: end; }
.preuve h3 { margin: 14px 0 4px; font-size: 1rem; }
.impr-texte { white-space: pre-wrap; margin: 0 0 10px; }
.preuve-parent { margin-top: 28px; font-weight: 700; }
.ajouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.ajouts .btn { padding-inline: 8px; } .ajouts .btn b { font-size: 1.15em; }
.bloc-cahier.geo, .bloc-cahier.pose-bloc { padding-top: 44px; }
.geo-zone { min-height: 200px; font-weight: 700; color: var(--doux); overflow: hidden; border-radius: 12px; }
.impr-geo { display: none; }
.geo-mention { margin: 6px 0 0; font-size: .75rem; color: var(--doux); }
.pose-titre { margin: 0 0 12px; font-weight: 800; }
.pose-zone .poser { margin-top: 16px; }
.pose-ops { margin-bottom: 4px; }
.pose { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 40px)); justify-content: start; overflow-x: auto; font-weight: 800; font-size: 1.3rem; }
.pose .fixe, .pose .case { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid transparent; font: inherit; color: var(--texte); background: none; }
.pose .case { border-color: var(--bord); border-radius: 0; cursor: pointer; background: var(--carte); }
.pose .case.sel { outline: 3px solid var(--bleu); outline-offset: -3px; position: relative; }
.pose .petit { font-size: .85rem; color: var(--bleu); }
.pose .fixe, .pose .case { position: relative; }
.pose .virg::after { content: ","; position: absolute; right: -3px; bottom: 2px; z-index: 1; font-size: 1.1em; line-height: 1; pointer-events: none; }
.pose .fixe, .pose .case { box-shadow: var(--trait, 0 0 #0000), var(--pot, 0 0 #0000); }
.pose .trait { --trait: inset 0 -3px 0 var(--texte); }
.pose .trait-doux { --trait: inset 0 -2px 0 var(--doux); }
.pose .pot { --pot: inset 3px 0 0 var(--texte); }
.pave { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
  max-width: 560px; margin: 0 auto; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--fond-2); border-top: 2px solid var(--bord); }
.pave button { min-height: 58px; border: 2px solid var(--bord); border-bottom-width: 4px; border-radius: 12px; background: var(--carte); color: var(--texte); font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.pave .large-2 { grid-column: span 3; background: var(--vert); border-color: var(--vert); color: #fff; }
.dessin { display: block; width: 100%; height: auto; background: #fff; border: 2px solid var(--bord); border-radius: 12px; touch-action: none; }
.dessin-outils { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dessin-outils button { min-width: 48px; min-height: 48px; padding: 0 10px; display: grid; place-items: center; border: 2px solid var(--bord); border-radius: 12px; background: var(--carte); color: var(--texte); font: inherit; font-weight: 800; cursor: pointer; }
.dessin-outils button[aria-pressed="true"] { border-color: var(--bleu); box-shadow: inset 0 0 0 2px var(--bleu); }
.dessin-outils i { display: block; width: 24px; height: 24px; border-radius: 50%; }
.dessin-outils .ico { width: 26px; height: 26px; }
.photo-cahier { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.tableau-defile { overflow-x: auto; }
.tableau-cahier { border-collapse: collapse; }
.tableau-cahier td { padding: 0; border: 2px solid var(--bord-fort); }
.tableau-cahier input { width: 96px; min-height: 48px; padding: 6px 8px; border: 0; background: var(--carte); color: var(--texte); font: inherit; font-weight: 700; }
.tableau-cahier input:focus { outline: 3px solid var(--bleu); outline-offset: -3px; }
.tableau-outils { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.accents { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.accents button { min-width: 44px; min-height: 44px; border: 2px solid var(--bord); border-radius: 10px; background: var(--carte); color: var(--texte); font: inherit; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.videos { margin-top: 26px; }
.videos .titre-section { display: flex; align-items: center; gap: 8px; }
.liste-videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.liste-videos .video .qr { display: none; }
/* ---- parcours simplifié ---- */
.cartes-jour { display: grid; gap: 14px; margin-bottom: 22px; }
.carte-jour { display: grid; gap: 4px; padding: 16px 18px 18px; border: 2px solid var(--bord); border-radius: 18px; background: var(--carte); color: var(--texte); text-decoration: none; box-shadow: 0 var(--levre) 0 var(--bord); }
.carte-etiquette { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); }
.carte-etiquette::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--mat, var(--vert)); }
.carte-titre { font-size: 1.15rem; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.carte-info { font-size: .85rem; font-weight: 700; color: var(--doux); }
.carte-btn { margin-top: 10px; justify-self: start; pointer-events: none; }
.petits-liens { margin-top: 6px; }
.coin-parent { display: inline-flex; margin-top: 26px; }
.num-lecon { flex: none; min-width: 2.2em; font-weight: 800; font-size: 1.05rem; color: var(--mat, var(--doux)); font-variant-numeric: tabular-nums; }
.plus-loin { margin-top: 28px; }
.plus-loin summary, .autres-jeux summary { cursor: pointer; font-weight: 800; padding: 14px 0; min-height: 48px; }
.plus-loin summary small { display: block; font-weight: 600; color: var(--doux); }
.num-titre { margin: 18px 0 0; font-weight: 800; color: var(--doux); }
.etoiles-lecon { margin: 4px 0 0; }
.trois-boutons { display: grid; gap: 14px; margin: 22px 0; }
.lecon-complete { margin-top: 18px; }
.s-entrainer { margin-top: 26px; min-height: 68px; font-size: 1.15rem; }
.resultats-accueil { margin-bottom: 20px; }
.trois-boutons .btn { min-height: 64px; font-size: 1.1rem; }
.autres-jeux { margin-top: 18px; }
.ligne-suivi { margin: 6px 0; }
.cahier-tete { margin: 0 0 6px; font-weight: 700; font-size: .85rem; color: var(--doux); }
.blocs-cahier { display: grid; gap: 14px; margin-top: 6px; }
.bloc-cahier { position: relative; padding-right: 52px; }
.bloc-cahier .impr { display: none; }
.suppr-bloc { position: absolute; right: 0; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: #8A919E; display: grid; place-items: center; cursor: pointer; }
math-field { display: block; width: 100%; min-height: 72px; padding: 10px 14px; font-size: 1.5rem; border-radius: 16px; border: 2px solid var(--bord); border-bottom-width: 4px; background: #fff; color: #2B2D33; --caret-color: var(--bleu); --selection-background-color: #FFE58A; }
math-field:focus-within { outline: none; border-color: var(--bleu); }
math-field::part(menu-toggle), math-field::part(virtual-keyboard-toggle) { display: none; }
body { --keycap-height: 54px; --keycap-font-size: 22px; --keycap-primary-font-size: 22px; }
body.clavier-maths .lecon-pied { display: none; }
body.clavier-maths .lecon-corps { padding-bottom: 420px; }
.lecon-pied .ligne-boutons b { font-size: 1.1em; }

/* ---------------------------------------------------------------- progrès */
.tuiles-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tuile-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--bord); border-radius: var(--rayon); background: var(--carte); }
.tuile-stat .ico { width: 34px; height: 34px; }
.tuile-stat b { display: block; font-size: 1.2rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tuile-stat small { color: var(--doux); font-weight: 600; font-size: .8rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge {
  display: grid; justify-items: center; text-align: center; gap: 6px; padding: 14px 10px; border-radius: var(--rayon);
  border: 2px solid var(--bord); background: var(--carte); box-shadow: 0 var(--levre) 0 var(--bord); font-size: .8rem; font-weight: 700; line-height: 1.3;
}
.badge .e { font-size: 2.1rem; line-height: 1; }
.badge.verrou { background: var(--fond-2); color: var(--doux); box-shadow: none; }
.badge.verrou .e { filter: grayscale(1); opacity: .35; }
.parents { margin-top: 30px; border: 2px solid var(--bord); border-radius: var(--rayon); background: var(--carte); }
.parents summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px; font-weight: 800; min-height: 64px; }
.parents summary::-webkit-details-marker { display: none; }
.parents summary .ico { width: 30px; height: 30px; color: var(--doux); }
.parents summary .ico.fleche { margin-left: auto; transition: transform .2s; }
.parents[open] summary .ico.fleche { transform: rotate(90deg); }
.parents-corps { padding: 0 18px 18px; font-size: .9rem; }
.parents-corps h3 { margin-top: 22px; }
.parents-corps ul { padding-left: 1.2em; }
.detail h4 { margin: 18px 0 8px; }

.liens { display: grid; gap: 14px; }
.lien { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--rayon); background: var(--carte); border: 2px solid var(--bord); box-shadow: 0 var(--levre) 0 var(--bord); text-decoration: none; color: var(--texte); }
.lien b { color: var(--bleu); }
.lien small { color: var(--doux); font-size: .82rem; line-height: 1.45; }

/* ---------------------------------------------------------------- réglages */
dialog { border: none; border-radius: 22px; padding: 0; background: var(--carte); color: var(--texte); max-width: 520px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20,20,30,.5); }
.reglages { padding: 22px 24px; display: grid; gap: 14px; }
.reglages h2 { margin: 0; }
.reglages fieldset { border: 2px solid var(--bord); border-radius: var(--rayon); padding: 10px 14px 14px; margin: 0; display: grid; gap: 10px; }
.reglages legend { font-weight: 800; padding: 0 6px; }
.reglages .champ { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.reglages input[type=text], .reglages select { width: 100%; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--bord); background: var(--fond); min-height: 48px; font-weight: 600; }
.reglages input[type=range] { width: 100%; accent-color: var(--vert); min-height: 36px; }
.reglages .ligne-boutons { margin: 0; }
.reglages .valeur { min-width: 4em; text-align: center; font-weight: 800; }
.reglages .case { display: flex; gap: 12px; align-items: center; font-weight: 700; min-height: 44px; }
.reglages .case input { width: 26px; height: 26px; accent-color: var(--vert); }
.themes { display: flex; gap: 10px; flex-wrap: wrap; }
.pastille-theme { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--bord-fort); font-weight: 800; cursor: pointer; }
.pastille-theme.creme { background: #FBF6EA; color: #23262F; } .pastille-theme.blanc { background: #fff; color: #23262F; }
.pastille-theme.bleu { background: #EEF5FC; color: #23262F; } .pastille-theme.vert { background: #EFF8EE; color: #23262F; }
.pastille-theme.sombre { background: #16181D; color: #ECEBE6; }
.pastille-theme[aria-pressed="true"] { outline: 4px solid var(--vert); outline-offset: 2px; }

/* ---------------------------------------------------------------- règle de lecture, toast, confettis */
.regle-voile { position: fixed; left: 0; right: 0; background: rgba(20,20,30,.42); pointer-events: none; z-index: 40; }
#regle-haut { top: 0; }
#regle-bas { bottom: 0; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--haut-nav) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0;
  background: #2B2D33; color: #fff; padding: 12px 22px; border-radius: 16px; font-weight: 700; z-index: 60; max-width: 90vw;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s; pointer-events: none;
}
body.immersif .toast { bottom: 140px; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.confetti { position: fixed; top: -24px; width: 12px; height: 18px; border-radius: 3px; pointer-events: none; z-index: 50; animation: tombe 2.4s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes tombe { to { transform: translateY(108vh) rotate(720deg); opacity: .8; } }

/* ---------------------------------------------------------------- chat animé (début) */
/* Le picto : la tête de Matou dans un rond au dégradé mauve (l’avatar de Miaou) ;
   seule animation : les moustaches */
.chat-anime { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; line-height: 0; color: #fff;
  background: linear-gradient(140deg, #8650f5, #5f2bd0); }
.chat-anime .chat-svg { width: 74%; height: auto; display: block; overflow: visible; transform: translateY(3%); }
.chat-anime .mt-m { transform-box: fill-box; }
.chat-anime .mt-m-g1, .chat-anime .mt-m-g2, .chat-anime .mt-m-g3 { transform-origin: 100% 50%; }
.chat-anime .mt-m-d1, .chat-anime .mt-m-d2, .chat-anime .mt-m-d3 { transform-origin: 0 50%; }
.chat-anime .mt-m-g2, .chat-anime .mt-m-d2 { animation-delay: .18s; }
.chat-anime .mt-m-g3, .chat-anime .mt-m-d3 { animation-delay: .36s; }
.chat-anime.moustaches .mt-m { animation-duration: 2.8s; animation-timing-function: ease-in-out; animation-iteration-count: 2; }
.chat-anime.moustaches .mt-m-g1, .chat-anime.moustaches .mt-m-g2, .chat-anime.moustaches .mt-m-g3 { animation-name: mi-moustache-g; }
.chat-anime.moustaches .mt-m-d1, .chat-anime.moustaches .mt-m-d2, .chat-anime.moustaches .mt-m-d3 { animation-name: mi-moustache-d; }
@keyframes mi-moustache-d { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(calc(var(--mi-angle, 8deg) * -1)); } 75% { transform: rotate(var(--mi-angle, 8deg)); } }
@keyframes mi-moustache-g { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(var(--mi-angle, 8deg)); } 75% { transform: rotate(calc(var(--mi-angle, 8deg) * -1)); } }
@media (prefers-reduced-motion: reduce) { .chat-anime .mt-m, .logo-matou .mt-m { animation: none !important; } }
/* ---------------------------------------------------------------- chat animé (fin) */

/* ---------------------------------------------------------------- tailles */
@media (max-width: 480px) {
  :root { --taille: 18px; }
  main { padding: 18px 14px 28px; }
  .entete { margin: -18px -14px 0; }
  .salut .chat { width: 104px; }
  .stat { padding: 6px 4px; }
  .vf button { min-height: 108px; }
  .relier { gap: 10px; }
  .relier .col { gap: 10px; }
  .lecon-pied .ligne-boutons { flex-wrap: wrap; }
}
@media (min-width: 1000px) {
  :root { --colonne: 720px; }
  .salut .chat { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- impression des fiches
   Toujours fond blanc et texte noir, quel que soit le thème (sombre compris), et
   aucun aplat de couleur : on n'use pas la cartouche. Seuls restent en couleur
   le code du professeur (base verte, terminaison rouge) et les illustrations. */
@media print {
  :root, :root[data-theme] {
    --fond: #fff; --fond-2: #fff; --carte: #fff; --texte: #111; --doux: #444; --bord: #bbb; --bord-fort: #999;
    --taille: 13pt; color-scheme: light;
  }
  html, body, main, .lecon { background: #fff !important; color: #111 !important; }
  body { padding: 0; }
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; animation: none !important; }
  .barre, .nav-bas, .lecon-haut, .lecon-pied, .ligne-boutons, .lire, .lien-discret, .regle-voile, .toast, .pas-imprimer, .entete .btn-rond { display: none !important; }
  main { max-width: none; padding: 0; }
  .entete { background: none !important; color: #111 !important; margin: 0 0 6px; padding: 0; border-radius: 0; }
  .entete .icone-matiere, .icone-matiere { background: none !important; }
  h1, h2, h3, h4, .bloc-titre { color: #111 !important; }
  .encadre { background: none !important; border: 1.5px solid #999; }
  .encadre .etiquette > .ico { background: none !important; color: #111 !important; padding: 0; }
  table.tab th { background: none !important; color: #111 !important; border-bottom: 2px solid #111; }
  table.tab tr:nth-child(even) td { background: none !important; }
  .conj h4 { background: none !important; color: #111 !important; border-bottom: 1.5px solid #999; }
  .conj .info, .lexique div, .vocab div, .poeme, .oulipo, .rythme, .note, .frise .ev::before { background: none !important; }
  .etapes li::before { background: none !important; color: #111 !important; border: 1.5px solid #111; }
  .oulipo .fixe { background: none !important; color: #111 !important; border: 1.5px solid #111; }
  .illus-bloc, .illus-question { border: 1px solid #ccc; background: #fff !important; }
  mark { background: none !important; color: inherit; text-decoration: underline; text-decoration-thickness: 2px; }
  .vocab .etr, .lexique b { color: #111 !important; }
  /* le code couleur du professeur garde ses couleurs (même si le thème sombre les éclaircit à l'écran) */
  .bv { color: #15803D !important; } .term { color: #DC2626 !important; } .marq { background: #FDE047 !important; color: #111 !important; }
  .c1 { color: #2563EB !important; } .c2 { color: #7C3AED !important; } .c3 { color: #EA580C !important; } .c4 { color: #16A34A !important; }
  .bloc { max-width: none; break-inside: avoid; }
  .bloc-cahier { padding: 0; break-inside: avoid; } .bloc-cahier textarea { display: none; } .bloc-cahier .impr { display: block; white-space: pre-wrap; }
  math-field { border: 0; padding: 0; min-height: 0; }
  .ML__keyboard { display: none !important; }
  .videos { break-inside: avoid; }
  .liste-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .liste-videos .video { display: flex; gap: 10px; align-items: center; border: 1px solid #bbb; border-radius: 8px; padding: 8px; break-inside: avoid; }
  .liste-videos .video .qr { display: block; flex: none; order: -1; width: 26mm; height: 26mm; }
  .liste-videos .video .qr svg { width: 100%; height: 100%; }
  .liste-videos .rangee { border: 0 !important; padding: 0 !important; min-height: 0 !important; }
  .liste-videos .rangee .icone-matiere, .liste-videos .ico-fin { display: none; }
  .pave, .geo-zone { display: none !important; }
  .dessin, .photo-cahier { border: 0; max-height: 240mm; width: auto; max-width: 100%; }
  .tableau-cahier input { background: #fff; color: #111; }
  .tableau-cahier td { border-color: #666; }
  .impr-geo[src] { display: block; max-width: 100%; }
  .bloc-cahier.geo, .bloc-cahier.pose-bloc { padding-top: 0; }
  .pose .trait, .pose .trait-doux { border-bottom: 2px solid #111 !important; } .pose .pot { border-left: 2px solid #111 !important; }
  .pose .case.sel { outline: none; } .pose .case { background: #fff; border-color: #ccc; } .pose .petit { color: #444; }
  .lecon-corps { padding: 0; } .cahier-tete { color: #111; }
  .encadre, .conj, .poeme, table, .illus-bloc { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ===================== Réglages, comme ceux de Miaou : rubriques, groupes arrondis, pictos, interrupteurs ===================== */
#dlg-reglages { max-width: 560px; border-radius: 26px; }
.reglages-miaou { padding: 0 18px 22px; display: block; font-family: "Inter", system-ui, sans-serif; }
.reg-tete { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -18px; padding: 16px 18px 10px; background: var(--carte); }
.reg-tete h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.03em; }
.reg-fermer { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(127, 127, 127, .16); color: var(--texte); cursor: pointer; }
.reg-fermer .ico { width: 20px; height: 20px; }
.reg-fermer:focus-visible { outline: 2px solid var(--accent, #2a6fe8); outline-offset: 2px; }
.reg-rubrique { margin: 20px 0 8px 6px; font-size: 13px; font-weight: 500; color: var(--doux); }
.reg-aide { margin: 8px 6px 0; font-size: 13px; line-height: 1.4; color: var(--doux); text-wrap: balance; }
.reg-groupe { background: rgba(127, 127, 127, .1); border-radius: 18px; overflow: hidden; }
.reg-espace { margin-top: 22px; }
.reg-ligne { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border: 0; background: transparent; color: var(--texte); text-align: left; font: inherit; text-decoration: none; }
label.reg-ligne, button.reg-ligne, a.reg-ligne { cursor: pointer; }
button.reg-ligne:active, a.reg-ligne:active { background: rgba(127, 127, 127, .12); }
.reg-ligne + .reg-ligne::before, .reg-ligne + .reg-themes::before { content: ""; position: absolute; top: 0; right: 0; left: 60px; height: 1px; background: var(--bord); }
.reg-picto { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(127, 127, 127, .14); color: var(--accent, #2a6fe8); }
.reg-picto .ico { width: 19px; height: 19px; }
.reg-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.reg-titre { font-weight: 500; line-height: 1.3; }
.reg-sous { font-size: 13px; line-height: 1.35; color: var(--doux); }
.reg-danger { color: #ff6b6b; }
.reg-danger .reg-picto { background: rgba(255, 90, 90, .14); color: #ff6b6b; }
.reglages-miaou select { flex: none; max-width: 48%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(127, 127, 127, .16); color: var(--texte); font: inherit; font-size: .92rem; }
.reglages-miaou input[type=text] { flex: none; width: 46%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(127, 127, 127, .16); color: var(--texte); font: inherit; text-align: right; }
.reglages-miaou input[type=range] { flex: none; width: 42%; accent-color: var(--accent, #2a6fe8); }
.reg-pas { flex: none; display: flex; align-items: center; gap: 4px; }
.reg-pas button { width: 40px; height: 34px; border: 0; border-radius: 10px; background: rgba(127, 127, 127, .16); color: var(--texte); font: inherit; font-weight: 700; cursor: pointer; }
.reg-pas .valeur { min-width: 3.4em; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.reg-themes { position: relative; display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 14px 14px 60px; }
.interrupteur { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: rgba(127, 127, 127, .35); cursor: pointer; transition: background-color .25s ease; }
.interrupteur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.interrupteur:checked { background: var(--accent, #2a6fe8); }
.interrupteur:checked::after { transform: translateX(20px); }
.interrupteur:focus-visible { outline: 2px solid var(--accent, #2a6fe8); outline-offset: 2px; }
@media (max-width: 480px) { #dlg-reglages { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; } .reglages-miaou select { max-width: 52%; } }
