/* =====================================================================
   Ami des mots — « La nuit des mots »
   Un hibou vit la nuit : l'accueil et la fin de partie sont un ciel violet
   étoilé avec une lune dorée (le moment fort). Partout ailleurs, un fond
   lilas très clair, des cartes blanches et des boutons épais « en relief »
   qui s'enfoncent sous le doigt. Chaque thème a sa couleur (--th).
   Police : Nunito (libre, OFL), embarquée — hors connexion, Kabyle compris.
   ===================================================================== */
@font-face{ font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000; src:url(../fonts/nunito-latin-wght-normal.woff2) format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face{ font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000; src:url(../fonts/nunito-latin-ext-wght-normal.woff2) format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
/* Andika (SIL, OFL) : police conçue pour apprendre à lire — a, g, l, I bien distincts. Lecture facile. */
@font-face{ font-family:"Andika"; font-display:swap; font-weight:400; src:url(../fonts/andika-latin-400-normal.woff2) format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face{ font-family:"Andika"; font-display:swap; font-weight:700; src:url(../fonts/andika-latin-700-normal.woff2) format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face{ font-family:"Andika"; font-display:swap; font-weight:400; src:url(../fonts/andika-latin-ext-400-normal.woff2) format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face{ font-family:"Andika"; font-display:swap; font-weight:700; src:url(../fonts/andika-latin-ext-700-normal.woff2) format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face{ font-family:"Andika"; font-display:swap; font-weight:400; src:url(../fonts/andika-cyrillic-400-normal.woff2) format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face{ font-family:"Andika"; font-display:swap; font-weight:700; src:url(../fonts/andika-cyrillic-700-normal.woff2) format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face{ font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000; src:url(../fonts/nunito-cyrillic-wght-normal.woff2) format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

/* =====================================================================
   v4 — « Nuit des mots », édition 2026
   Tout le jeu vit la nuit : une aurore qui respire lentement derrière des
   panneaux de verre dépoli. Les images sont posées sur des « autocollants »
   blancs qui brillent. Un seul geste fort par écran : le paysage vivant de
   l'accueil, les étincelles d'une bonne réponse, le ciel de la victoire.
   ===================================================================== */
:root{
  --bg0:#100A33; --bg1:#1C1460; --bg2:#2C2196; --nuit:#1C1460; --nuit-2:#2C2196; --nuit-3:#5B47C9;
  --lune:#FFC93C; --lune-f:#C98E00;
  --menthe:#22D8A8; --menthe-f:#0B8E6E;
  --corail:#FF5D7A; --corail-f:#B92D4A;
  --rose:#FF7AD9; --cyan:#4FD8FF; --bleu:#6E9BFF;
  --texte:#F5F2FF; --doux:#B8B0E8; --encre:#1B1446;
  --verre:linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.05));
  --verre-plein:rgba(40,30,110,.72);
  --bord:rgba(255,255,255,.17);
  --reflet:inset 0 1px 0 rgba(255,255,255,.28);
  --th:#8B6CFF; --rayon:24px; --relief:0 5px 0;
}
*{ box-sizing:border-box; }
html{ background:var(--bg0); }
body{ margin:0; min-height:100vh; color:var(--texte); font-family:"Nunito",system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Noto Sans Arabic",sans-serif; font-size:18px; line-height:1.4; -webkit-tap-highlight-color:transparent; background:var(--bg0); overflow-x:hidden; }
/* L'aurore : trois nappes de couleur floues qui dérivent lentement. */
body::before{ content:""; position:fixed; inset:-20%; z-index:-1; pointer-events:none;
  background:
    radial-gradient(40% 35% at 20% 15%, rgba(123,92,255,.55), transparent 70%),
    radial-gradient(35% 30% at 85% 30%, rgba(34,216,168,.28), transparent 70%),
    radial-gradient(45% 40% at 60% 95%, rgba(255,122,217,.25), transparent 70%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 70%);
  animation:aurore 28s ease-in-out infinite alternate; }
@keyframes aurore{ to{ transform:translate3d(4%, -3%, 0) rotate(6deg) scale(1.06); } }
button,select,input{ font:inherit; color:inherit; }
button{ cursor:pointer; }
button:focus-visible, select:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible{ outline:3px solid var(--cyan); outline-offset:3px; }
h1:focus,h2:focus{ outline:none; }
h2{ font-weight:900; letter-spacing:-.01em; }
a{ color:var(--cyan); }
main{ max-width:760px; margin:0 auto; padding:8px 16px 56px; }
.centre{ text-align:center; }
.petit{ font-size:.85rem; color:var(--doux); }
.aide{ margin:2px 0 0; color:var(--doux); font-weight:600; }
#app.entree > main, #app.entree > section{ animation:entree .32s cubic-bezier(.2,.9,.3,1); }
@keyframes entree{ from{ opacity:0; transform:translateY(10px) scale(.99); } }

/* Verre dépoli : la matière de base des panneaux */
.verre, .jeu-ligne, .ligne-carnet, .joueur-carte, .accs .acc, .reglage-facile, .plus .avantages li, .moyen, .raccourcis button, .choix-mot, .rel, .tuile, .compteur, .bouton-rond, .entete-theme, .progres, .lire-consigne{
  background:var(--verre); border:1px solid var(--bord); box-shadow:var(--reflet), 0 10px 30px rgba(5,2,30,.28);
  -webkit-backdrop-filter:blur(14px) saturate(150%); backdrop-filter:blur(14px) saturate(150%); color:var(--texte); }

/* ── Barre du haut ─────────────────────────────────────────────── */
.barre{ display:flex; justify-content:space-between; align-items:center; padding:12px 16px; max-width:760px; margin:0 auto; position:relative; z-index:2; }
.bouton-rond{ width:50px; height:50px; border-radius:50%; font-size:1.4rem; font-weight:900; transition:transform .1s; }
.bouton-rond:active{ transform:scale(.92); }
.compteur{ border-radius:999px; padding:7px 16px; font-weight:900; }

/* ── Boutons ──────────────────────────────────────────────────── */
.gros,.moyen{ font-weight:900; text-decoration:none; display:inline-block; transition:transform .09s, box-shadow .09s, filter .2s; position:relative; }
.gros{ border:0; background:linear-gradient(180deg, #3BF0C0, var(--menthe)); color:#06372B; font-size:1.35rem; padding:17px 40px; margin:10px 0; border-radius:22px;
  box-shadow:var(--relief) var(--menthe-f), 0 0 32px rgba(34,216,168,.35), inset 0 1px 0 rgba(255,255,255,.6); }
.moyen{ padding:13px 20px; border-radius:18px; }
.moyen.plein{ border:0; background:linear-gradient(180deg, #3BF0C0, var(--menthe)); color:#06372B; box-shadow:var(--relief) var(--menthe-f), 0 0 24px rgba(34,216,168,.28), inset 0 1px 0 rgba(255,255,255,.6); }
.gros:active,.moyen.plein:active{ transform:translateY(4px); box-shadow:0 1px 0 var(--menthe-f), 0 0 18px rgba(34,216,168,.3); }
.moyen:not(.plein):active{ transform:scale(.97); }
.desactive{ background:rgba(255,255,255,.08)!important; color:var(--doux)!important; box-shadow:none!important; border:1px dashed var(--bord)!important; }
.lien{ background:none; border:0; color:var(--lune); text-decoration:underline; text-underline-offset:3px; padding:4px; font-weight:800; }
.actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:20px; }
.actions .moyen{ flex:1 1 150px; max-width:280px; }

/* ── Ami ───────────────────────────────────────────────────────── */
.ami{ width:100%; height:auto; display:block; overflow:visible; filter:drop-shadow(0 8px 14px rgba(0,0,0,.35)); }
.ami-bouge{ animation:flotte 3.6s ease-in-out infinite; transform-origin:50% 90%; }
.ami-fete{ animation:saute .6s cubic-bezier(.3,1.6,.6,1) 2; }
@keyframes flotte{ 50%{ transform:translateY(-4px) rotate(-2deg); } }
@keyframes saute{ 50%{ transform:translateY(-14px) scale(1.05); } }
.pupilles{ transform:translate(var(--ox, 0), var(--oy, 0)); transition:transform .25s ease-out; }
.paupieres ellipse{ transform-box:fill-box; transform-origin:50% 0; transform:scaleY(0); animation:cligne 5.5s infinite; }
.paupieres ellipse:last-child{ animation-delay:.02s; }
@keyframes cligne{ 0%, 93%, 100%{ transform:scaleY(0); } 96%{ transform:scaleY(1); } }
.ami-grand{ width:150px; margin:0 auto; background:none; border:0; padding:0; display:block; position:relative; z-index:1; }
.ami-moyen{ width:120px; margin:0 auto; }
.ami-petit{ width:64px; flex:0 0 64px; }
.ami-mini{ width:70px; margin:0 auto 4px; }
.ami-icone{ width:46px; flex:none; }

/* =====================================================================
   L'ACCUEIL — un paysage de nuit vivant
   ===================================================================== */
.ciel{ position:relative; overflow:hidden; text-align:center; padding-bottom:56px; border-radius:0 0 40px 40px;
  background:radial-gradient(90% 60% at 50% 18%, rgba(123,92,255,.55), transparent 70%), linear-gradient(180deg, #160E48 0%, #2A1F8A 100%);
  box-shadow:0 20px 60px rgba(5,2,30,.5); }
/* Étoiles (deux couches ; l'une scintille) */
.ciel::before,.ciel::after{ content:""; position:absolute; inset:0; pointer-events:none;
  background-image:
    radial-gradient(1.6px 1.6px at 8% 22%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 21% 61%, #fff 99%, transparent),
    radial-gradient(2px 2px at 33% 12%, #FFE8A3 99%, transparent), radial-gradient(1.2px 1.2px at 46% 44%, #fff 99%, transparent),
    radial-gradient(1.6px 1.6px at 64% 9%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 77% 52%, #fff 99%, transparent),
    radial-gradient(2px 2px at 89% 26%, #FFE8A3 99%, transparent), radial-gradient(1.2px 1.2px at 95% 70%, #fff 99%, transparent),
    radial-gradient(1.4px 1.4px at 4% 43%, #fff 99%, transparent), radial-gradient(1.4px 1.4px at 58% 30%, #fff 99%, transparent); }
.ciel::after{ transform:translate(37px, 23px) scale(1.1); opacity:.6; animation:scintille 3.5s ease-in-out infinite alternate; }
@keyframes scintille{ from{ opacity:.1; } to{ opacity:.8; } }
.decor{ position:absolute; inset:0; pointer-events:none; }
.aurore{ position:absolute; left:-20%; right:-20%; top:8%; height:120px; filter:blur(28px); opacity:.55;
  background:linear-gradient(90deg, transparent, rgba(34,216,168,.7), rgba(79,216,255,.6), rgba(255,122,217,.5), transparent);
  transform:skewY(-8deg); animation:ondule 12s ease-in-out infinite alternate; }
@keyframes ondule{ to{ transform:skewY(-3deg) translateX(6%); opacity:.35; } }
.filante{ position:absolute; top:14%; left:-10%; width:110px; height:2px; border-radius:2px; background:linear-gradient(90deg, transparent, #fff); opacity:0;
  transform:rotate(-18deg); animation:filante 9s ease-in 2s infinite; }
@keyframes filante{ 0%{ opacity:0; transform:translate(0,0) rotate(-18deg); } 2%{ opacity:1; } 9%{ opacity:0; transform:translate(140vw, 46vw) rotate(-18deg); } 100%{ opacity:0; } }
.collines{ position:absolute; left:0; right:0; bottom:0; width:100%; height:120px; }
.luciole{ position:absolute; left:var(--x); top:var(--y); width:5px; height:5px; border-radius:50%; background:#FFF3A0; box-shadow:0 0 10px 3px rgba(255,230,120,.75);
  animation:luciole 6s ease-in-out var(--d) infinite; z-index:1; }
@keyframes luciole{ 0%,100%{ transform:translate(0,0); opacity:.2; } 30%{ opacity:1; } 50%{ transform:translate(14px,-18px); opacity:.9; } 80%{ opacity:.3; } }
.ciel .barre .compteur{ background:rgba(255,255,255,.12); }
.ciel-in{ position:relative; z-index:2; max-width:560px; margin:0 auto; padding:0 18px; }
.perchoir{ position:relative; width:230px; height:190px; margin:-4px auto 0; }
.perchoir .ami-grand{ position:absolute; left:40px; top:14px; }
.lune{ position:absolute; left:50%; top:0; width:176px; height:176px; margin-left:-88px; border-radius:50%;
  background:radial-gradient(circle at 36% 32%, #FFF7D6 0%, #FFD45A 45%, #F2A900 100%);
  box-shadow:0 0 0 16px rgba(255,201,60,.10), 0 0 0 40px rgba(255,201,60,.05), 0 0 90px rgba(255,201,60,.55);
  animation:halo 5s ease-in-out infinite alternate; }
@keyframes halo{ to{ box-shadow:0 0 0 22px rgba(255,201,60,.12), 0 0 0 52px rgba(255,201,60,.05), 0 0 120px rgba(255,201,60,.7); } }
.lune::before,.lune::after{ content:""; position:absolute; border-radius:50%; background:rgba(201,142,0,.22); }
.lune::before{ width:28px; height:28px; left:26px; top:100px; }
.lune::after{ width:16px; height:16px; left:124px; top:40px; }
.branche{ position:absolute; left:-10px; right:-30px; top:160px; height:12px; border-radius:10px; background:linear-gradient(180deg, #6B4A2B, #3E2A17); transform:rotate(-4deg); box-shadow:0 6px 12px rgba(0,0,0,.4); z-index:0; }
.branche::after{ content:""; position:absolute; right:30px; top:-16px; width:22px; height:14px; border-radius:0 70% 0 70%; background:#3FBF7F; transform:rotate(-20deg); }
.ciel h1{ font-size:clamp(2.7rem, 11.5vw, 3.8rem); font-weight:1000; line-height:.95; margin:16px 0 8px; letter-spacing:-.035em;
  background:linear-gradient(180deg, #FFFFFF 30%, #CFC4FF 100%); -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 4px 0 rgba(10,5,40,.45)); }
.ciel .accroche,.ciel .joueur{ color:#D9D1FF; font-weight:700; margin:0 0 18px; }
.choix-langues{ display:grid; grid-template-columns:1fr 1fr; gap:10px; max-width:440px; margin:0 auto; }
.choix-langues label{ display:flex; flex-direction:column; gap:6px; font-size:.85rem; font-weight:800; color:#C9BFFF; text-align:start; }
.choix-langues select{ width:100%; min-width:0; font-size:1rem; font-weight:800; padding:12px 36px 12px 14px; border-radius:16px; border:1px solid var(--bord); background-color:rgba(255,255,255,.1); color:#fff; appearance:none; -webkit-appearance:none;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); box-shadow:var(--reflet);
  background-image:linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position:calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size:6px 6px; background-repeat:no-repeat; }
[dir=rtl] .choix-langues select{ padding:12px 14px 12px 36px; background-position:20px 52%, 14px 52%; }
.choix-langues option{ color:var(--encre); background:#fff; }

/* Sous le ciel */
.accueil{ text-align:center; padding-top:0; }
.gros.defi{ display:block; width:100%; max-width:440px; margin:-30px auto 0; position:relative; z-index:3; font-size:1.5rem; padding:21px 24px;
  background:linear-gradient(180deg, #FFE27A, var(--lune)); color:#3A2600; box-shadow:var(--relief) var(--lune-f), 0 0 44px rgba(255,201,60,.5), inset 0 1px 0 rgba(255,255,255,.7); overflow:hidden; }
.gros.defi::after{ content:""; position:absolute; top:0; bottom:0; width:40%; left:-50%; background:linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); transform:skewX(-20deg); animation:brille 4.5s ease-in-out 1.2s infinite; }
@keyframes brille{ 0%{ left:-50%; } 30%,100%{ left:130%; } }
.gros.defi:active{ box-shadow:0 1px 0 var(--lune-f), 0 0 30px rgba(255,201,60,.4); }
.gros.defi.fait{ background:linear-gradient(180deg, #FFF2C2, #FFE08A); }
.gros.defi.fait::after{ display:none; }
.actions.serrees{ gap:12px; max-width:440px; margin:16px auto 0; }
.actions.serrees .moyen{ flex:1 1 0; font-size:1.1rem; padding:15px 12px; }
.pastille{ display:inline-block; min-width:1.6em; padding:0 .45em; border-radius:999px; background:var(--corail); color:#fff; font-size:.85rem; line-height:1.6; margin-inline-start:4px; box-shadow:0 0 12px rgba(255,93,122,.6); }
.objectif{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; color:var(--doux); font-weight:700; margin:18px 0 0; }
.objectif .serie{ background:linear-gradient(90deg, #FF8A3D, #FF5D7A); color:#fff; border-radius:999px; padding:0 12px; box-shadow:0 0 16px rgba(255,120,80,.45); }
.bandeau-plus{ display:block; width:100%; max-width:440px; margin:16px auto 0; border:1px solid rgba(255,201,60,.4); border-radius:20px; padding:14px 16px; text-align:center; color:#fff;
  background:linear-gradient(110deg, rgba(255,201,60,.18), rgba(255,122,217,.16) 50%, rgba(79,216,255,.16)); box-shadow:var(--reflet), 0 0 30px rgba(255,201,60,.15); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
.bandeau-plus strong{ color:var(--lune); }
.raccourcis{ display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin:22px auto 0; max-width:440px; }
.raccourcis button{ display:flex; flex-direction:column; align-items:center; gap:4px; border-radius:20px; padding:12px 4px 10px; font-size:.8rem; font-weight:800; transition:transform .1s; }
.raccourcis button:active{ transform:scale(.95); }
.raccourcis button span{ font-size:1.9rem; line-height:1.1; filter:drop-shadow(0 4px 6px rgba(0,0,0,.35)); }

/* ── Thèmes : des autocollants dont l'image dépasse ─────────────── */
.grille{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:16px; }
main > h2{ font-size:1.7rem; margin:10px 0 16px; }
.theme{ position:relative; border:0; border-radius:26px; padding:66px 10px 14px; margin-top:30px; display:flex; flex-direction:column; align-items:center; gap:6px; color:#fff;
  background:linear-gradient(160deg, color-mix(in srgb, var(--th) 80%, #fff) 0%, var(--th) 45%, color-mix(in srgb, var(--th) 70%, #000) 100%);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.4), inset 0 -6px 0 rgba(0,0,0,.18), 0 14px 30px color-mix(in srgb, var(--th) 40%, transparent);
  transform:perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition:transform .15s ease-out; }
.theme:active{ transform:perspective(700px) scale(.96); }
.theme .disque{ position:absolute; top:-30px; left:50%; margin-left:-48px; width:96px; height:96px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 5px rgba(255,255,255,.3), 0 10px 18px rgba(0,0,0,.3); overflow:hidden; }
.pic-theme{ width:74px; height:74px; object-fit:contain; }
.theme .nom{ font-weight:1000; font-size:1.12rem; text-shadow:0 2px 0 rgba(0,0,0,.2); }
.theme .petit{ color:rgba(255,255,255,.92); font-weight:800; }
.jauge{ display:block; width:80%; height:9px; background:rgba(0,0,0,.2); border-radius:99px; overflow:hidden; }
.jauge span{ display:block; height:100%; background:#fff; border-radius:99px; box-shadow:0 0 10px rgba(255,255,255,.8); }
.theme.verrou{ filter:saturate(.45) brightness(.85); }
.badge-plus{ display:inline-block; background:linear-gradient(180deg, #FFE27A, var(--lune)); color:#3A2600; font-size:.75rem; font-weight:900; border-radius:999px; padding:2px 10px; box-shadow:0 0 12px rgba(255,201,60,.5); }

/* ── Liste des 50 jeux d'un thème ──────────────────────────────── */
.entete-theme{ display:flex; align-items:center; gap:14px; border-radius:26px; padding:16px 18px; margin:6px 0 4px;
  background:linear-gradient(120deg, var(--th), color-mix(in srgb, var(--th) 55%, #1C1460)); border:1px solid rgba(255,255,255,.25); box-shadow:var(--reflet), 0 16px 40px color-mix(in srgb, var(--th) 35%, transparent); }
.entete-theme h2{ margin:0; font-size:1.7rem; }
.entete-theme .aide{ color:rgba(255,255,255,.9); font-weight:700; margin:0; }
.pic-entete{ width:70px; height:70px; object-fit:contain; background:#fff; border-radius:50%; padding:6px; flex:none; box-shadow:0 8px 16px rgba(0,0,0,.3); }
.famille{ margin:26px 4px 10px; font-size:1.15rem; font-weight:900; display:flex; align-items:center; gap:10px; }
.famille::after{ content:""; flex:1; height:2px; border-radius:2px; background:linear-gradient(90deg, var(--th), transparent); }
.liste-jeux{ display:flex; flex-direction:column; gap:12px; }
.jeu-ligne{ display:grid; grid-template-columns:50px 1fr; gap:6px 12px; align-items:center; border-radius:var(--rayon); padding:12px 14px 14px; }
.jeu-ligne .ic{ font-size:2rem; width:50px; height:50px; display:flex; align-items:center; justify-content:center; border-radius:16px; background:color-mix(in srgb, var(--th) 35%, transparent); box-shadow:inset 0 1px 0 rgba(255,255,255,.3); }
.jeu-ligne .txt{ display:flex; flex-direction:column; }
.jeu-ligne .txt strong{ font-weight:900; font-size:1.05rem; }
.jeu-ligne .niveaux{ grid-column:1 / -1; display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
.niv{ flex:1; min-width:90px; min-height:56px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; border:0; border-radius:16px; font-weight:900; padding:6px; color:#fff;
  background:linear-gradient(180deg, color-mix(in srgb, var(--th) 80%, #fff), var(--th)); box-shadow:0 4px 0 color-mix(in srgb, var(--th) 60%, #000), inset 0 1px 0 rgba(255,255,255,.45); transition:transform .08s, box-shadow .08s; text-shadow:0 1px 0 rgba(0,0,0,.2); }
.niv:active{ transform:translateY(3px); box-shadow:0 1px 0 color-mix(in srgb, var(--th) 60%, #000); }
.niv .etoiles{ font-size:.85rem; color:var(--lune); letter-spacing:1px; }
.niv .etoiles .vide{ color:rgba(255,255,255,.35); }
.niv.verrou{ background:rgba(255,255,255,.06); color:var(--doux); box-shadow:inset 0 0 0 1px var(--bord); text-shadow:none; }

/* ── Une partie ────────────────────────────────────────────────── */
.partie{ padding-bottom:130px; }
.tete{ display:flex; gap:12px; align-items:center; position:relative; }
.tete h2{ margin:0; font-size:1.25rem; }
.combo{ position:absolute; bottom:-12px; inset-inline-start:2px; font-weight:1000; font-size:.95rem; padding:2px 10px; border-radius:999px; color:#fff; opacity:0; transform:scale(.6);
  background:linear-gradient(90deg, #FF8A3D, #FF3D7A); box-shadow:0 0 18px rgba(255,90,90,.6); transition:opacity .2s, transform .2s; z-index:2; }
.combo.vu{ opacity:1; transform:scale(1); }
.combo.pop{ animation:combo .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes combo{ 0%{ transform:scale(.6); } 60%{ transform:scale(1.35); } 100%{ transform:scale(1); } }
.progres{ height:16px; border-radius:999px; overflow:hidden; margin:14px 0 18px; padding:2px; }
.progres span{ display:block; height:100%; border-radius:999px; transition:width .45s cubic-bezier(.3,1.4,.6,1); min-width:12px;
  background:linear-gradient(90deg, color-mix(in srgb, var(--th) 70%, #fff), var(--th)); box-shadow:0 0 14px var(--th), inset 0 1px 0 rgba(255,255,255,.5); }
.chrono{ text-align:center; font-size:1.4rem; font-weight:1000; margin:8px auto 10px; background:linear-gradient(90deg, #FF8A3D, #FF3D7A); color:#fff; border-radius:999px; padding:6px 18px; width:max-content; box-shadow:0 0 22px rgba(255,90,90,.5); }
.note{ min-height:1.2em; text-align:center; color:var(--doux); font-size:.9rem; margin:6px 0 0; }

/* Les images : des autocollants blancs qui brillent */
.pic{ width:100%; height:100%; object-fit:contain; display:block; }
.pic-grande{ width:min(250px,66vw); height:190px; object-fit:contain; }
.pic-moyenne{ width:min(200px,58vw); height:140px; object-fit:contain; }
.pic-carte{ width:82%; height:82%; object-fit:contain; }
.pic-m{ width:88%; height:88%; object-fit:contain; }
.pic-mini{ width:46px; height:46px; object-fit:contain; background:#fff; border-radius:12px; padding:3px; }
.partie .pic-grande,.partie .pic-moyenne,.cadre-image{ background:#fff; border-radius:30px; padding:12px;
  box-shadow:0 0 0 4px color-mix(in srgb, var(--th) 55%, transparent), 0 0 50px color-mix(in srgb, var(--th) 45%, transparent), 0 18px 30px rgba(0,0,0,.35); }
.cadre-image{ display:inline-block; overflow:hidden; }
.partie .cadre-image .pic-grande{ background:none; padding:0; box-shadow:none; border-radius:0; display:block; }
.mot-source,.mot-vf{ font-size:2.3rem; font-weight:1000; margin:16px 0 2px; color:#fff; text-shadow:0 0 24px color-mix(in srgb, var(--th) 70%, transparent); }
.ombre{ transition:filter .5s, opacity .3s; background:radial-gradient(circle at 50% 45%, #fff8e6 0%, #e9e2ff 70%); border-radius:12px; }
/* Photo sans fond blanc : « lampe torche », la scène sort de la nuit petit à petit. */
.ombre.nuit{ background:none; animation:nuit var(--duree, 10s) ease-in forwards; }
@keyframes nuit{ 0%{ filter:brightness(.12) saturate(.2); } 100%{ filter:brightness(.85) saturate(.8); } }
.flou{ animation:deflou var(--duree, 10s) linear forwards; }
@keyframes deflou{ from{ filter:blur(26px); } to{ filter:blur(0); } }
.ombre.revele,.flou.revele{ filter:none; animation:none; }

/* Les réponses */
.choix-images,.choix-mots,.choix-vf{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:20px; }
.choix-images.six,.choix-mots.six{ grid-template-columns:1fr 1fr 1fr; }
.choix-img{ background:#fff; border:0; border-radius:var(--rayon); padding:10px; aspect-ratio:4/3; box-shadow:0 5px 0 #BDB2EE, 0 12px 26px rgba(0,0,0,.3); transition:transform .09s, box-shadow .09s; }
.choix-img:active{ transform:translateY(4px); box-shadow:0 1px 0 #BDB2EE; }
.choix-images.six img{ max-height:90px; }
.choix-mot{ border-radius:var(--rayon); padding:19px 8px; font-size:1.3rem; font-weight:900; word-break:break-word; transition:transform .09s, background .15s; }
.choix-mot:active,.rel:active,.tuile:active{ transform:scale(.96); }
.choix-mots.six .choix-mot{ font-size:1.05rem; padding:14px 6px; }
.vf-oui{ color:#7CF5D2; } .vf-non{ color:#FF9AAE; }
.juste{ background:linear-gradient(180deg, #3BF0C0, var(--menthe))!important; color:#04332A!important; border-color:transparent!important; box-shadow:0 0 0 3px rgba(255,255,255,.5), 0 0 40px rgba(34,216,168,.7)!important; animation:pop .4s cubic-bezier(.3,1.7,.5,1); }
.choix-img.juste{ background:#fff!important; box-shadow:0 0 0 5px var(--menthe), 0 0 44px rgba(34,216,168,.8)!important; }
.faux{ background:rgba(255,93,122,.22)!important; color:#FFC2CE!important; border-color:var(--corail)!important; box-shadow:0 0 0 2px var(--corail), 0 0 24px rgba(255,93,122,.45)!important; animation:non .35s; }
.choix-img.faux{ opacity:.45; }
@keyframes pop{ 50%{ transform:scale(1.08); } }
@keyframes non{ 25%{ transform:translateX(-7px); } 75%{ transform:translateX(7px); } }
.etincelle{ position:fixed; z-index:20; pointer-events:none; font-size:24px; text-shadow:0 0 8px currentColor; }

/* Le verdict : un bandeau de verre en bas d'écran */
.bulle{ position:fixed; left:10px; right:10px; bottom:10px; margin:0; padding:18px 20px calc(18px + env(safe-area-inset-bottom)); text-align:center; font-weight:1000; font-size:1.3rem;
  transform:translateY(130%); transition:transform .24s cubic-bezier(.3,1.3,.6,1); z-index:5; border-radius:26px; -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px); }
.bulle.ok{ transform:none; background:rgba(16,120,95,.82); color:#fff; border:1px solid rgba(124,245,210,.6); box-shadow:0 0 40px rgba(34,216,168,.45), var(--reflet); }
.bulle.ko{ transform:none; background:rgba(150,30,60,.82); color:#fff; border:1px solid rgba(255,154,174,.6); box-shadow:0 0 40px rgba(255,93,122,.45), var(--reflet); }
.bulle:empty{ transform:translateY(130%); }

/* Cartes qui se retournent */
.carte,.mcarte{ perspective:900px; border:0; background:none; padding:0; display:block; }
.carte{ width:min(320px,82vw); aspect-ratio:1/1; margin:0 auto; }
.carte-in{ position:relative; display:block; width:100%; height:100%; transform-style:preserve-3d; transition:transform .55s cubic-bezier(.3,1.3,.6,1); }
.retournee .carte-in,.ouverte .carte-in{ transform:rotateY(180deg); }
.face{ position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; border-radius:28px; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:10px;
  box-shadow:0 0 0 4px color-mix(in srgb, var(--th) 55%, transparent), 0 0 50px color-mix(in srgb, var(--th) 40%, transparent); color:var(--encre); }
.verso{ transform:rotateY(180deg); }
.carte .verso{ background:linear-gradient(160deg, color-mix(in srgb, var(--th) 80%, #fff), var(--th) 50%, color-mix(in srgb, var(--th) 70%, #000)); }
.carte .mot{ font-size:2.5rem; font-weight:1000; color:#fff; text-align:center; word-break:break-word; text-shadow:0 3px 0 rgba(0,0,0,.18); }
.carte .trad{ margin-top:8px; color:rgba(255,255,255,.92); font-size:1.15rem; font-weight:800; }
.memoire{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
@media (min-width:600px){ .memoire{ grid-template-columns:repeat(4,1fr); } }
.memoire.quatre,.memoire.huit{ grid-template-columns:repeat(4,1fr); }
.memoire.huit{ gap:8px; }
.mcarte{ aspect-ratio:1/1; width:100%; }
.mcarte .face{ border-radius:18px; box-shadow:0 6px 16px rgba(0,0,0,.3); }
.mcarte .recto{ color:var(--lune); font-size:2rem; font-weight:1000; border:1px solid var(--bord);
  background:radial-gradient(1.4px 1.4px at 25% 30%, #fff 99%, transparent), radial-gradient(1.4px 1.4px at 72% 22%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 60% 78%, #fff 99%, transparent), linear-gradient(160deg, #3A2BA8, #1C1460);
  text-shadow:0 0 14px rgba(255,201,60,.8); }
.mot-m{ font-weight:900; font-size:1.02rem; text-align:center; word-break:break-word; color:var(--encre); }
.trad-m{ color:#5A528C; font-style:italic; }
.trouvee .verso{ box-shadow:0 0 0 4px var(--menthe), 0 0 28px rgba(34,216,168,.7); }

/* Lettres */
.reponse{ display:flex; gap:6px; justify-content:center; flex-wrap:nowrap; margin:18px 0; padding:8px; border-radius:18px; }
.case{ min-width:0; flex:0 1 44px; height:58px; border-bottom:5px solid var(--th); font-size:1.9rem; font-weight:1000; display:flex; align-items:center; justify-content:center; color:#fff; text-shadow:0 0 16px color-mix(in srgb, var(--th) 70%, transparent); }
.case.trou{ color:var(--corail); border-bottom-color:var(--corail); }
.case.trou.juste{ background:none!important; color:#7CF5D2!important; border-bottom-color:var(--menthe); box-shadow:none!important; }
.reponse.juste{ background:rgba(34,216,168,.18)!important; color:inherit!important; box-shadow:0 0 30px rgba(34,216,168,.35)!important; }
.reponse.juste .case{ color:#7CF5D2; border-bottom-color:var(--menthe); }
.reponse.faux{ background:rgba(255,93,122,.18)!important; box-shadow:none!important; }
.tuiles{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.tuile{ min-width:56px; height:60px; border-radius:18px; font-size:1.8rem; font-weight:1000; transition:transform .08s; }
.tuile:disabled{ opacity:.2; transform:scale(.9); }
.tuiles.grandes{ margin-top:20px; gap:12px; }
.tuiles.grandes .tuile{ min-width:72px; height:72px; font-size:2.2rem; }

/* Relier */
.relier{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.relier .col{ display:flex; flex-direction:column; gap:12px; }
.rel{ min-height:80px; font-size:1.15rem; font-weight:900; display:flex; align-items:center; justify-content:center; padding:6px; border-radius:20px; }
.rel-g{ background:#fff; color:var(--encre); }
.rel .pic-m{ max-height:64px; }
.rel.choisi{ box-shadow:0 0 0 3px var(--cyan), 0 0 26px rgba(79,216,255,.6); }
.rel.trouvee{ box-shadow:0 0 0 3px var(--menthe), 0 0 22px rgba(34,216,168,.6); opacity:.75; }

/* =====================================================================
   VICTOIRE
   ===================================================================== */
#app[data-ecran=fin]{ min-height:100vh; background:radial-gradient(70% 45% at 50% 22%, rgba(255,201,60,.28), transparent 70%); }
.fin{ padding-top:10px; }
.fin .ami-moyen{ width:160px; position:relative; }
.fin .ami-moyen::before{ content:""; position:absolute; inset:-30px; border-radius:50%; z-index:-1;
  background:repeating-conic-gradient(from 0deg, rgba(255,201,60,.22) 0 10deg, transparent 10deg 24deg); animation:rayons 14s linear infinite; mask:radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask:radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes rayons{ to{ transform:rotate(360deg); } }
.fin h2{ font-size:2.3rem; margin:8px 0 4px; font-weight:1000; }
.grosses-etoiles{ font-size:3.8rem; color:var(--lune); margin:0; letter-spacing:8px; text-shadow:0 0 26px rgba(255,201,60,.8), 0 4px 0 var(--lune-f); }
.grosses-etoiles .vide{ color:rgba(255,255,255,.14); text-shadow:none; }
.gain{ font-size:1.5rem; font-weight:1000; margin:10px 0; font-variant-numeric:tabular-nums; }
.nouveau{ display:inline-block; background:rgba(255,255,255,.1); border:1px solid var(--bord); border-radius:999px; padding:7px 16px; font-weight:800; margin:4px; -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }
.fin .moyen.plein{ background:linear-gradient(180deg, #FFE27A, var(--lune)); color:#3A2600; box-shadow:var(--relief) var(--lune-f), 0 0 30px rgba(255,201,60,.45), inset 0 1px 0 rgba(255,255,255,.7); }
.confettis{ position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:4; }
.confettis i{ position:absolute; top:-14px; left:var(--x); width:10px; height:16px; background:var(--c); border-radius:3px; animation:tombe 2.6s ease-in var(--d) forwards; box-shadow:0 0 8px var(--c); }
@keyframes tombe{ to{ transform:translateY(105vh) rotate(560deg); } }

/* ── Joueurs, carnet, trophées, vestiaire, réglages, Plus ───────── */
.joueurs{ grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); }
.joueur-carte,.accs .acc{ position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; border-radius:var(--rayon); padding:14px 12px; }
.joueur-carte strong{ font-weight:900; }
.joueur-carte .plus{ font-size:3rem; line-height:1.4; color:var(--menthe); }
.joueur-carte .badge-plus{ position:absolute; top:8px; inset-inline-end:8px; }
.grille.accs{ gap:14px; }
.acc.verrou .ami-mini{ filter:grayscale(1); opacity:.45; }
.acc .coupe{ font-size:2.6rem; filter:drop-shadow(0 0 12px rgba(255,201,60,.6)); }
.acc.verrou .coupe{ opacity:.4; filter:none; }
.seuil{ color:var(--doux); font-size:.9rem; font-weight:700; }
.form{ display:flex; flex-direction:column; gap:14px; align-items:stretch; max-width:380px; margin:0 auto; text-align:start; }
.form label{ display:flex; flex-direction:column; gap:6px; font-weight:800; }
.form input:not([type=radio]){ padding:13px; border-radius:14px; border:1px solid var(--bord); background:rgba(255,255,255,.1); color:#fff; font-weight:700; box-shadow:var(--reflet); }
.form fieldset{ border:0; padding:0; margin:0; }
.form legend{ font-weight:800; margin-bottom:6px; }
.couleurs{ display:flex; gap:12px; flex-wrap:wrap; }
.pastille-couleur input{ position:absolute; opacity:0; }
.pastille-couleur span{ display:block; width:46px; height:46px; border-radius:50%; background:var(--c); border:3px solid rgba(255,255,255,.8); }
.pastille-couleur input:checked + span{ box-shadow:0 0 0 4px var(--lune), 0 0 18px rgba(255,201,60,.6); }
.pastille-couleur input:focus-visible + span{ outline:3px solid var(--cyan); outline-offset:3px; }
.carnet{ list-style:none; padding:0; margin:0 0 10px; display:flex; flex-direction:column; gap:8px; }
.ligne-carnet{ width:100%; display:flex; align-items:center; gap:12px; border-radius:18px; padding:9px 14px; text-align:start; }
.ligne-carnet .txt{ flex:1; display:flex; flex-direction:column; }
.ligne-carnet .txt strong{ font-weight:900; }
.ligne-carnet .txt span{ color:var(--doux); font-size:.9rem; }
.points{ color:var(--menthe); letter-spacing:2px; text-shadow:0 0 8px rgba(34,216,168,.6); }
.points .vide{ color:rgba(255,255,255,.2); text-shadow:none; }
.etoiles{ color:var(--lune); font-weight:900; }
.etoiles .vide{ color:rgba(255,255,255,.2); }
.texte h3, main > h3{ font-weight:900; margin-top:26px; }
.texte p{ max-width:34em; margin-inline:auto; }
.reglage{ display:flex; justify-content:space-between; align-items:center; gap:12px; font-weight:800; }
.toast{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:rgba(40,30,110,.9); border:1px solid var(--bord); color:#fff; padding:13px 22px; border-radius:999px; font-weight:900; z-index:10; box-shadow:0 0 30px rgba(123,92,255,.5); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
code{ font-size:1rem; background:rgba(255,255,255,.1); border:1px solid var(--bord); padding:2px 8px; border-radius:8px; user-select:all; color:var(--lune); }
.plus h2{ font-size:2rem; margin:8px 0 4px; background:linear-gradient(90deg, #FFE27A, #FF9AD8, #8FE9FF); -webkit-background-clip:text; background-clip:text; color:transparent; }
.plus .ami-moyen{ filter:drop-shadow(0 0 30px rgba(255,201,60,.45)); }
.plus .avantages{ text-align:start; max-width:420px; margin:14px auto; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.plus .avantages li{ border-radius:16px; padding:11px 14px 11px 46px; position:relative; font-weight:800; }
.plus .avantages li::before{ content:"✓"; position:absolute; inset-inline-start:14px; top:10px; width:22px; height:22px; border-radius:50%; background:var(--menthe); color:#04332A; font-size:.8rem; font-weight:1000; display:flex; align-items:center; justify-content:center; box-shadow:0 0 12px rgba(34,216,168,.6); }
[dir=rtl] .plus .avantages li{ padding:11px 46px 11px 14px; }
.prix strong{ font-size:1.8rem; font-weight:1000; color:var(--lune); text-shadow:0 0 20px rgba(255,201,60,.5); }
.deja{ margin:18px auto 0; text-align:start; max-width:380px; }
.deja summary{ cursor:pointer; color:var(--cyan); font-weight:800; text-align:center; }
.deja .form{ margin-top:12px; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation:none!important; transition:none!important; }
  .flou{ filter:blur(6px); }
  .paupieres ellipse{ transform:scaleY(0)!important; }
}
@media (max-width:340px){ .choix-langues{ grid-template-columns:1fr; } }
@media (max-width:400px){
  .raccourcis{ grid-template-columns:repeat(2, 1fr); }
  .gros{ padding:15px 26px; }
}

/* ── Lecture facile (personnes dys) ────────────────────────────────
   Ce qui aide vraiment : de l'espace (lettres, mots, lignes), une police
   aux lettres bien distinctes, pas d'italique, du contraste, moins de
   mouvement. Les consignes sont aussi lues à voix haute. */
html[data-facile] body{ font-family:"Andika","Nunito",system-ui,sans-serif; letter-spacing:.06em; word-spacing:.16em; line-height:1.7; }
html[data-facile] body::before{ animation:none; }
html[data-facile] button, html[data-facile] select, html[data-facile] input{ letter-spacing:.06em; word-spacing:.16em; }
html[data-facile] h1, html[data-facile] h2, html[data-facile] .choix-mot, html[data-facile] .mot-source, html[data-facile] .mot-vf, html[data-facile] .carte .mot, html[data-facile] .rel, html[data-facile] .mot-m{ font-weight:700; letter-spacing:.08em; }
html[data-facile] .choix-mot{ font-size:1.45rem; padding:20px 10px; background:rgba(255,255,255,.16); }
html[data-facile] .aide, html[data-facile] .petit{ font-size:1.05rem; color:var(--texte); }
html[data-facile] .trad-m, html[data-facile] em, html[data-facile] i{ font-style:normal; }
html[data-facile] .ciel::after, html[data-facile] .ami-bouge, html[data-facile] .ami-fete, html[data-facile] .aurore, html[data-facile] .filante, html[data-facile] .luciole, html[data-facile] .lune, html[data-facile] .gros.defi::after, html[data-facile] .paupieres ellipse{ animation:none; }
html[data-facile] .case{ letter-spacing:0; }
html[data-facile] .reponse{ gap:4px; }
.lire-consigne{ border-radius:999px; width:38px; height:38px; font-size:1rem; vertical-align:middle; padding:0; }
.lire-consigne:active{ transform:scale(.92); }
html[data-facile] .lire-consigne{ width:46px; height:46px; font-size:1.2rem; background:linear-gradient(180deg, #FFE27A, var(--lune)); border:0; box-shadow:0 3px 0 var(--lune-f), 0 0 18px rgba(255,201,60,.5); }
.reglage-facile{ border-radius:20px; padding:12px 14px; margin-bottom:12px; }
.reglage-facile > span{ display:flex; flex-direction:column; gap:2px; }

/* =====================================================================
   GRAND ÉCRAN (ordinateur, tablette à l'horizontale)
   La question à gauche, les réponses à droite : tout tient sans défiler.
   ===================================================================== */
@media (min-width:900px){
  body{ font-size:19px; }
  .barre{ max-width:1180px; padding:18px 32px; }
  main{ max-width:1180px; padding:8px 32px 64px; }
  /* Accueil : le ciel prend toute la largeur, le reste reste centré */
  .ciel{ border-radius:0 0 56px 56px; padding-bottom:70px; }
  .ciel-in{ max-width:720px; }
  .perchoir{ transform:scale(1.25); transform-origin:50% 100%; margin-top:24px; margin-bottom:24px; }
  .ciel h1{ font-size:4.6rem; }
  .accueil{ max-width:760px; }
  .gros.defi, .actions.serrees, .bandeau-plus, .raccourcis{ max-width:620px; }
  .raccourcis{ grid-template-columns:repeat(4, 1fr); }
  /* Thèmes : 4 par ligne */
  .grille{ grid-template-columns:repeat(4, 1fr); gap:22px; }
  .grille.accs, .joueurs{ grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); }
  /* Liste des jeux : 2 colonnes */
  .liste-jeux{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  /* Une partie : question à gauche, réponses à droite */
  .partie{ max-width:1180px; }
  .scene{ display:grid; grid-template-columns:1fr; gap:0 48px; align-items:start; }
  .scene > *{ grid-column:1 / -1; }
  .scene:has(> .centre:first-child + *){ grid-template-columns:minmax(0, 1fr) minmax(0, 1.1fr); }
  .scene > .centre:first-child{ grid-column:1; grid-row:1 / span 6; position:sticky; top:20px; padding-top:8px; }
  .scene > .centre:first-child ~ *{ grid-column:2; }
  .scene > .centre:first-child + *{ margin-top:8px; }
  .partie .pic-grande{ width:min(420px, 100%); height:320px; }
  .partie .pic-moyenne{ width:min(340px, 100%); height:240px; }
  .choix-img{ aspect-ratio:1 / 1; max-height:240px; }
  .choix-images.six .choix-img{ max-height:170px; }
  .choix-mot{ font-size:1.45rem; padding:24px 10px; }
  .scene > .centre:first-child .gros{ font-size:1.6rem; padding:26px 54px; margin-top:80px; }
  .mot-source, .mot-vf{ font-size:3rem; }
  /* Jeux sans question à gauche : centrés, à une taille raisonnable */
  .memoire{ max-width:760px; margin:0 auto; grid-template-columns:repeat(4, 1fr)!important; }
  .relier{ max-width:820px; margin:14px auto 0; }
  .choix-images:only-child, .scene > .choix-images:first-child{ max-width:820px; margin-inline:auto; grid-template-columns:repeat(4, 1fr); }
  .carte{ width:380px; }
  .bulle{ left:50%; right:auto; width:min(640px, 90vw); transform:translate(-50%, 130%); bottom:24px; }
  .bulle.ok, .bulle.ko{ transform:translate(-50%, 0); }
  .bulle:empty{ transform:translate(-50%, 130%); }
  .partie{ padding-bottom:140px; }
  .fin{ max-width:720px; margin:0 auto; }
}

/* ── Apprendre avant de jouer ──────────────────────────────────── */
.gros.apprendre{ display:block; width:100%; max-width:440px; margin:14px auto 0; font-size:1.3rem; }
.nouveau-mot .mot-source{ margin-top:18px; }
.trad-nouveau{ font-size:1.3rem; font-weight:800; color:var(--doux); margin:0 0 14px; }
.mots-appris{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:14px auto; max-width:620px; }
.mot-appris{ display:flex; flex-direction:column; align-items:center; gap:2px; min-width:96px; padding:10px; border-radius:18px; border:1px solid var(--bord); background:var(--verre); color:#fff; box-shadow:var(--reflet); }
.mot-appris span{ color:var(--doux); font-size:.85rem; }
@media (min-width:900px){
  .gros.apprendre{ max-width:620px; }
  .memoire, .relier{ width:100%; }
  .scene > .choix-images:first-child{ width:100%; }
}
@media (min-width:900px){
  .scene:has(> .nouveau-mot){ grid-template-columns:1fr; }
  .scene > .nouveau-mot{ grid-column:1 / -1!important; grid-row:auto!important; position:static!important; }
  .scene > .nouveau-mot ~ .actions{ grid-column:1 / -1!important; max-width:620px; margin:20px auto 0; }
}

/* =====================================================================
   v5 — prononciation, mot du jour, astuces, fenêtre « À toi ! »
   ===================================================================== */
.ecoutes{ display:inline-flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:center; }
.lent{ width:52px; height:52px; border-radius:50%; font-size:1.5rem; border:1px solid var(--bord); background:var(--verre); box-shadow:var(--reflet); color:#fff; transition:transform .1s; }
.lent:active{ transform:scale(.9); }
.gros + .lent{ width:62px; height:62px; font-size:1.8rem; }
.prononcer{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:12px; }
.carte-jour{ text-align:start; margin:18px auto 0; max-width:440px; border-radius:24px; padding:16px 18px; border:1px solid var(--bord); background:var(--verre); box-shadow:var(--reflet), 0 14px 30px rgba(5,2,30,.3); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
.carte-jour h2{ font-size:1rem; margin:0 0 10px; color:var(--lune); }
.mot-jour-in{ display:flex; gap:14px; align-items:center; }
.pic-jour{ width:96px; height:96px; object-fit:contain; background:#fff; border-radius:22px; padding:6px; flex:none; box-shadow:0 0 30px rgba(255,201,60,.25); }
.mot-jour-mot{ font-size:1.8rem; font-weight:1000; margin:0; line-height:1.1; }
.mot-jour-trad{ margin:2px 0 8px; color:var(--doux); font-weight:700; }
.mot-jour-actions{ display:flex; gap:6px; flex-wrap:wrap; }
.mot-jour-actions .moyen{ padding:8px 12px; font-size:1.1rem; }
.astuce-jour p{ margin:0 0 6px; color:var(--texte); }
.astuce-jour strong{ color:#fff; }
.astuces{ max-width:860px; text-align:center; }
.liste-astuces{ list-style:none; padding:0; margin:20px 0; display:grid; gap:12px; text-align:start; }
.liste-astuces li{ display:flex; gap:14px; align-items:flex-start; border-radius:20px; padding:14px 16px; border:1px solid var(--bord); background:var(--verre); box-shadow:var(--reflet); }
.liste-astuces .num{ font-size:1.8rem; line-height:1; flex:none; width:52px; height:52px; border-radius:16px; display:flex; align-items:center; justify-content:center; background:rgba(255,201,60,.14); }
.liste-astuces strong{ font-size:1.1rem; }
.liste-astuces p{ margin:4px 0 0; color:var(--doux); }
/* Fenêtre « À toi ! » */
.fenetre-fond{ position:fixed; inset:0; z-index:30; background:rgba(8,4,30,.7); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; padding:16px; animation:entree .2s ease-out; }
.fenetre{ position:relative; width:min(560px, 100%); max-height:94vh; overflow:auto; border-radius:30px; padding:26px 20px 20px; text-align:center;
  background:linear-gradient(180deg, #2A1F8A, #1C1460); border:1px solid var(--bord); box-shadow:var(--reflet), 0 30px 80px rgba(0,0,0,.5); }
.fermer-fenetre{ position:absolute; top:12px; inset-inline-end:12px; width:44px; height:44px; border-radius:50%; border:1px solid var(--bord); background:var(--verre); color:#fff; font-size:1.1rem; }
.a-toi .pic-moyenne{ background:#fff; border-radius:26px; padding:10px; }
.micro.enregistre{ background:linear-gradient(180deg, #FF7A93, var(--corail)); color:#fff; box-shadow:var(--relief) var(--corail-f), 0 0 0 0 rgba(255,93,122,.6); animation:pulse 1s ease-out infinite; }
@keyframes pulse{ to{ box-shadow:var(--relief) var(--corail-f), 0 0 0 22px rgba(255,93,122,0); } }
/* Le module « bouche » de ReParole, habillé pour la nuit */
.art-fond{ background:rgba(8,4,30,.7)!important; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); z-index:40!important; }
.art-boite{ background:linear-gradient(180deg, #2A1F8A, #1C1460)!important; color:#fff!important; border:1px solid var(--bord); border-radius:30px!important; }
.art-boite .art-schema{ background:#fff; border-radius:20px; margin:0 auto; }
.art-boite .btn-primary,.art-boite .btn-ghost{ border:0; border-radius:16px; padding:12px 18px; font-weight:900; margin:4px; }
.art-boite .btn-primary{ background:linear-gradient(180deg, #3BF0C0, var(--menthe)); color:#06372B; }
.art-boite .btn-ghost{ background:var(--verre); color:#fff; border:1px solid var(--bord); }
.art-note{ color:var(--doux); font-size:.85rem; }

/* =====================================================================
   PC : le jeu prend toute la page
   ===================================================================== */
@media (min-width:1100px){
  .barre, main, .partie{ max-width:1440px; }
  /* Accueil en deux moitiés : le ciel d'Ami à gauche, le tableau de bord à droite */
  #app[data-ecran=accueil]{ display:grid; grid-template-columns:minmax(0, 1.05fr) minmax(0, 1fr); min-height:100vh; }
  #app[data-ecran=accueil] .ciel{ min-height:100vh; border-radius:0 64px 64px 0; padding-bottom:0; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
  #app[data-ecran=accueil] .ciel .barre{ width:100%; max-width:none; }
  #app[data-ecran=accueil] .ciel-in{ margin:auto; padding-bottom:110px; }
  #app[data-ecran=accueil] .perchoir{ transform:scale(1.45); margin:60px auto 50px; }
  #app[data-ecran=accueil] .ciel h1{ font-size:clamp(4rem, 6vw, 6rem); }
  #app[data-ecran=accueil] .collines{ height:180px; }
  #app[data-ecran=accueil] .accueil{ max-width:none; width:100%; margin:0; padding:56px clamp(32px, 4vw, 72px); display:grid; grid-template-columns:1fr 1fr; gap:16px 18px; align-content:center; }
  #app[data-ecran=accueil] .accueil > *{ grid-column:1 / -1; max-width:none; margin:0; }
  #app[data-ecran=accueil] .gros.defi{ font-size:1.8rem; padding:28px; }
  #app[data-ecran=accueil] .gros.apprendre{ font-size:1.5rem; padding:22px; }
  #app[data-ecran=accueil] .actions.serrees .moyen{ font-size:1.25rem; padding:18px; max-width:none; }
  #app[data-ecran=accueil] .objectif{ justify-content:flex-start; }
  #app[data-ecran=accueil] .carte-jour{ grid-column:auto; margin:0; }
  #app[data-ecran=accueil] .raccourcis{ grid-template-columns:repeat(5, 1fr); }
  .raccourcis{ grid-template-columns:repeat(5, 1fr); max-width:760px; }
  /* Thèmes : grandes cartes */
  .grille{ grid-template-columns:repeat(4, 1fr); gap:28px; }
  .theme{ min-height:230px; padding-top:86px; }
  .theme .disque{ width:120px; height:120px; margin-left:-60px; top:-38px; }
  .pic-theme{ width:94px; height:94px; }
  .theme .nom{ font-size:1.35rem; }
  /* Une partie : tout l'écran, image grande à gauche */
  .partie{ min-height:calc(100vh - 90px); display:flex; flex-direction:column; }
  .scene{ flex:1; align-content:center; }
  .scene:has(> .centre:first-child + *){ grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr); gap:0 72px; }
  .partie .pic-grande{ width:min(560px, 100%); height:min(46vh, 460px); }
  .partie .pic-moyenne{ width:min(460px, 100%); height:min(36vh, 340px); }
  .choix-img{ max-height:min(26vh, 280px); }
  .choix-mot{ font-size:1.7rem; padding:30px 12px; }
  .mot-source, .mot-vf{ font-size:3.6rem; }
  .memoire{ max-width:min(1000px, 120vh); }
  .carte{ width:min(460px, 52vh); }
  .tuiles.grandes .tuile{ min-width:86px; height:86px; font-size:2.6rem; }
  .tete h2{ font-size:1.5rem; }
  .ami-petit{ width:84px; flex-basis:84px; }
  .liste-jeux{ grid-template-columns:repeat(3, 1fr); }
  .astuces .liste-astuces{ grid-template-columns:1fr 1fr; }
}
[hidden]{ display:none!important; }
.actions .ecoutes{ flex-wrap:nowrap; }
.art-legende, .art-legende span{ color:#D9D1FF!important; }


/* ── v5.2 : espace PC, relief doux et atelier des phrases ───────── */
.phrases-accueil{
  display:block;width:100%;max-width:620px;margin:12px auto 0;
  background:linear-gradient(145deg,#8B78FF,#5B47C9);color:#fff;
  box-shadow:0 5px 0 #382A91,0 14px 32px rgba(91,71,201,.32),inset 0 1px 0 rgba(255,255,255,.4);
}
.phrases-accueil span{display:inline-block;animation:etoile-phrase 2.2s ease-in-out infinite}
@keyframes etoile-phrase{50%{transform:translateY(-5px) rotate(15deg) scale(1.15)}}
.ami-3d{perspective:700px;transform-style:preserve-3d}
.ami-3d .ami{filter:drop-shadow(0 12px 12px rgba(5,2,30,.38));animation:hibou-3d 4s ease-in-out infinite;transform-origin:50% 85%}
@keyframes hibou-3d{0%,100%{transform:rotateY(-7deg) rotateX(2deg) translateY(0)}50%{transform:rotateY(8deg) rotateX(-2deg) translateY(-7px)}}
.ami-raté{animation:hibou-rate .45s ease-in-out 2}
@keyframes hibou-rate{0%,100%{transform:rotate(0)}25%{transform:rotate(-9deg) translateX(-4px)}75%{transform:rotate(9deg) translateX(4px)}}
.atelier-phrases{max-width:920px;margin:0 auto;padding:28px clamp(16px,3vw,42px) 64px}
.atelier-entete{display:flex;align-items:center;justify-content:center;gap:24px;text-align:left;margin:0 auto 18px;max-width:760px}
.ami-phrase{width:132px;flex:0 0 132px}
.sur-titre-phrases{color:var(--lune);font-weight:1000;letter-spacing:.06em;text-transform:uppercase;font-size:.82rem;margin:0 0 4px}
.atelier-phrases h2{font-size:clamp(1.7rem,4vw,2.5rem);margin:0;line-height:1.1}
.aide-phrases{color:var(--doux);margin:8px 0}
.langue-phrase{display:inline-block;border:1px solid var(--bord);border-radius:999px;padding:4px 12px;color:#fff;background:rgba(255,255,255,.09);font-weight:800;font-size:.85rem}
.progress-phrases{height:10px;background:rgba(255,255,255,.12);border-radius:99px;overflow:hidden;margin:22px 0 6px}
.progress-phrases span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--menthe),#A4F5DB);transition:width .35s}
.compteur-phrases{color:var(--doux);font-weight:800;text-align:center;margin:8px 0 14px}
.phrase-construite{min-height:100px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px;padding:18px;border:2px dashed rgba(255,255,255,.28);border-radius:24px;background:rgba(255,255,255,.07);font-size:clamp(1.25rem,3vw,1.9rem);font-weight:900;text-align:center}
.mot-place{display:inline-block;padding:7px 12px;border-radius:14px;background:linear-gradient(180deg,#FFF1B9,#FFD96A);color:#382600;box-shadow:0 4px 0 #B98518;animation:mot-pop .18s ease-out}
@keyframes mot-pop{from{transform:translateY(8px) scale(.85);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
.placeholder-phrase{color:var(--doux);font-size:1rem;font-weight:700}
.tuiles-phrases{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:24px auto;max-width:780px}
.tuile-phrase{border:1px solid rgba(255,255,255,.25);border-radius:16px;padding:13px 17px;background:linear-gradient(180deg,rgba(255,255,255,.19),rgba(255,255,255,.09));color:#fff;font:900 1.08rem "Nunito",sans-serif;box-shadow:0 4px 0 rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.25);cursor:pointer;transition:transform .15s,background .15s}
.tuile-phrase:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(0,0,0,.2)}
.tuile-phrase:disabled{opacity:.35;cursor:default}
.retour-phrase{min-height:32px;text-align:center;font-weight:900;color:#FFE58B;margin:12px 0}
.actions-phrases{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
.actions-phrases .moyen{flex:1 1 150px;max-width:240px}
.note-phrases{text-align:center;color:var(--doux);font-size:.9rem}
.fin-phrases{text-align:center;padding-top:50px}
.fin-phrases .ami-moyen{width:180px;margin:0 auto 18px}
.gain-phrases{font-size:1.7rem;color:var(--lune);font-weight:1000}
@media(min-width:900px){
  .ciel-in{max-width:900px}
  .accueil{max-width:1120px}
  .carte-jour,.astuce-jour{max-width:none}
}
@media(min-width:1100px){
  #app[data-ecran=accueil] .accueil{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:18px 24px;padding:clamp(38px,5vh,72px) clamp(30px,3.2vw,64px)}
  #app[data-ecran=accueil] .accueil > .gros.defi,
  #app[data-ecran=accueil] .accueil > .gros.apprendre,
  #app[data-ecran=accueil] .accueil > .phrases-accueil,
  #app[data-ecran=accueil] .accueil > .actions,
  #app[data-ecran=accueil] .accueil > .objectif,
  #app[data-ecran=accueil] .accueil > .bandeau-plus,
  #app[data-ecran=accueil] .accueil > .raccourcis{grid-column:1 / -1}
  #app[data-ecran=accueil] .accueil > .carte-jour{grid-column:1}
  #app[data-ecran=accueil] .accueil > .astuce-jour{grid-column:2}
  #app[data-ecran=accueil] .accueil > .gros.defi,
  #app[data-ecran=accueil] .accueil > .gros.apprendre,
  #app[data-ecran=accueil] .accueil > .phrases-accueil{max-width:none}
}
@media(max-width:560px){
  .atelier-entete{gap:12px}
  .ami-phrase{width:88px;flex-basis:88px}
  .atelier-phrases{padding-top:18px}
  .tuile-phrase{padding:11px 13px;font-size:1rem}
}
@media(prefers-reduced-motion:reduce){
  .ami-3d .ami,.ami-raté,.phrases-accueil span,.mot-place{animation:none!important}
}

/* ── v5.3 : le village d'Ami ───────────────────────────────────── */
.village-accueil{display:block;width:100%;max-width:620px;margin:12px auto 0;background:linear-gradient(145deg,#54DDBB,#159B83);color:#06372B;box-shadow:0 5px 0 #08735F,0 14px 30px rgba(34,216,168,.22),inset 0 1px 0 rgba(255,255,255,.55)}
.village-page{max-width:1160px;margin:0 auto;padding:16px clamp(16px,3vw,38px) 60px}
.village-ciel{position:relative;overflow:hidden;text-align:center;border-radius:30px;padding:26px 22px 32px;background:radial-gradient(ellipse at 50% 0%,rgba(255,201,60,.18),transparent 58%),linear-gradient(145deg,rgba(91,71,201,.38),rgba(16,10,51,.3));border:1px solid var(--bord);box-shadow:var(--reflet),0 18px 38px rgba(5,2,30,.22)}
.village-ami{width:118px;margin:0 auto 4px;filter:drop-shadow(0 12px 15px rgba(0,0,0,.3))}
.village-parole{display:inline-block;max-width:650px;margin:8px auto 20px;padding:12px 18px;border-radius:18px;background:#FFF3C4;color:#392900;font-weight:900;box-shadow:0 4px 0 #C99A35;position:relative}
.village-parole:after{content:"";position:absolute;top:-8px;left:50%;width:16px;height:16px;background:#FFF3C4;transform:translateX(-50%) rotate(45deg)}
.village-ciel h2{font-size:clamp(2rem,4vw,3rem);margin:2px 0 8px}
.village-intro{color:var(--doux);font-weight:700;margin:0 auto;max-width:650px}
.village-carte{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px 0}
.lieu-village{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:18px 12px;border:1px solid var(--bord);border-radius:24px;background:linear-gradient(155deg,rgba(255,255,255,.16),rgba(255,255,255,.055));color:var(--texte);box-shadow:0 5px 0 rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.18);cursor:pointer;transition:transform .18s,filter .18s}
.lieu-village:active{transform:translateY(4px)}
.lieu-village.visite{border-color:rgba(34,216,168,.65);background:linear-gradient(155deg,rgba(34,216,168,.2),rgba(255,255,255,.06))}
.lieu-icone{font-size:clamp(2.5rem,5vw,4rem);filter:drop-shadow(0 7px 6px rgba(0,0,0,.28));transition:transform .3s}
.lieu-village:hover .lieu-icone{transform:translateY(-5px) rotate(-5deg) scale(1.08)}
.lieu-titre{font-size:1.06rem;font-weight:1000}
.lieu-theme{font-size:.88rem;color:var(--doux);font-weight:800}
.lieu-bas{font-size:.8rem;font-weight:900;color:var(--lune);margin-top:3px}
.lieu-village.verrou{opacity:.65}
.village-aide{text-align:center;color:var(--doux);font-weight:800}
@media(min-width:700px){.village-carte{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.lieu-village{min-height:190px}}
@media(min-width:1100px){.village-carte{grid-template-columns:repeat(4,minmax(0,1fr))}.lieu-village{min-height:210px}}
@media(max-width:360px){.village-carte{gap:9px}.lieu-village{padding:14px 8px}.lieu-titre{font-size:.94rem}}


/* ── v5.4 : retour d'erreur lisible, voix et bouton de reprise ── */
.continuer-erreur[hidden]{display:none!important}
.continuer-erreur:not([hidden]){
  position:fixed;z-index:7;left:50%;bottom:calc(112px + env(safe-area-inset-bottom));
  transform:translateX(-50%);width:min(92vw,390px);min-height:54px;
  color:#241400;background:linear-gradient(180deg,#FFE69A,#FFD15C);
  border:2px solid rgba(255,255,255,.75);box-shadow:0 5px 0 #B77B20,0 12px 28px rgba(0,0,0,.35);
  font-weight:1000;animation:erreur-arrive .25s ease-out
}
@keyframes erreur-arrive{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
.reglage-humour{margin:22px 0;padding:18px;border:1px solid var(--bord);border-radius:22px;background:rgba(255,255,255,.055)}
.reglage-humour h3{margin:0 0 8px}
.choix-humour{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}
.choix-humour .moyen{min-width:0;white-space:normal}
.choix-humour .moyen.plein{outline:2px solid var(--lune);outline-offset:2px}
@media(min-width:760px){.choix-humour{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:560px){.continuer-erreur:not([hidden]){bottom:calc(118px + env(safe-area-inset-bottom));font-size:1rem}}
@media(prefers-reduced-motion:reduce){.continuer-erreur:not([hidden]){animation:none}}


/* ── v5.6 : le retour d'erreur ne masque plus sa propre explication ──
   La bulle est remontée et limitée en hauteur ; le bouton de reprise
   occupe une zone distincte en bas de l'écran, sans recouvrir le texte. */
.bulle.ko{
  bottom:calc(92px + env(safe-area-inset-bottom))!important;
  max-height:min(44svh, 390px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  padding:16px 18px;
  font-size:clamp(1rem, 4.2vw, 1.3rem);
  line-height:1.35;
}
.continuer-erreur:not([hidden]){
  position:fixed;
  z-index:8;
  left:50%;
  bottom:calc(12px + env(safe-area-inset-bottom))!important;
  transform:translateX(-50%);
  width:min(92vw, 520px);
  min-height:54px;
  padding:12px 18px;
  white-space:normal;
}
@media(min-width:760px){
  .bulle.ko{
    bottom:calc(92px + env(safe-area-inset-bottom))!important;
    max-height:min(38svh, 300px);
  }
  .continuer-erreur:not([hidden]){
    bottom:calc(18px + env(safe-area-inset-bottom))!important;
  }
}
@media(max-width:560px){
  .bulle.ko{
    left:10px;right:10px;width:auto;
    bottom:calc(88px + env(safe-area-inset-bottom))!important;
    max-height:42svh;
    font-size:clamp(.98rem, 4.1vw, 1.18rem);
  }
  .continuer-erreur:not([hidden]){
    bottom:calc(10px + env(safe-area-inset-bottom))!important;
    min-height:52px;
  }
}

/* v5.7 — sélecteur indépendant de langue des blagues */
.langue-blagues-titre{margin-top:20px!important}
.choix-langue-blagues{grid-template-columns:repeat(2,minmax(0,1fr))}
.choix-langue-blagues .moyen{font-weight:1000}


/* =====================================================================
   v5.8 — direction artistique « Le grand livre des mots »
   Plus de profondeur, de lisibilité et de personnalité, sans modifier
   les écrans fonctionnels ni réduire l'espace sur mobile.
   ===================================================================== */
:root{
  --bg0:#090821;
  --bg1:#171044;
  --bg2:#292078;
  --lune:#FFD66E;
  --menthe:#35E0B5;
  --corail:#FF718C;
  --cyan:#76DFFF;
  --texte:#FFFDFE;
  --doux:#C9C2EE;
  --encre:#17113D;
  --bord:rgba(221,214,255,.22);
  --verre:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.055));
  --verre-plein:rgba(35,27,91,.88);
  --rayon:26px;
}
body{
  background:
    radial-gradient(ellipse at 12% 7%,rgba(99,80,222,.24),transparent 32%),
    radial-gradient(ellipse at 92% 28%,rgba(36,209,177,.12),transparent 27%),
    linear-gradient(155deg,#171044 0%,#0C0929 58%,#120C36 100%);
  letter-spacing:.005em;
}
body::before{
  background:
    radial-gradient(2px 2px at 12% 18%,rgba(255,255,255,.8),transparent 70%),
    radial-gradient(2px 2px at 78% 12%,rgba(255,255,255,.65),transparent 70%),
    radial-gradient(2px 2px at 62% 72%,rgba(255,255,255,.55),transparent 70%),
    radial-gradient(3px 3px at 88% 65%,rgba(255,214,110,.7),transparent 70%),
    radial-gradient(35% 30% at 15% 10%,rgba(123,92,255,.27),transparent 70%),
    radial-gradient(30% 28% at 88% 24%,rgba(34,216,168,.15),transparent 70%),
    linear-gradient(180deg,#171044,#090821 78%);
  animation:aurore 34s ease-in-out infinite alternate;
}
main{max-width:900px;padding:12px clamp(14px,2.4vw,28px) 64px}
.barre{max-width:1180px;padding:14px clamp(16px,3vw,32px)}
h1,h2,h3{ text-wrap:balance; }
h2{letter-spacing:-.025em;line-height:1.12}
.aide{line-height:1.5;font-size:clamp(1rem,2.2vw,1.16rem)}
.petit{line-height:1.5}
.verre,.jeu-ligne,.ligne-carnet,.joueur-carte,.accs .acc,.reglage-facile,
.plus .avantages li,.moyen,.raccourcis button,.choix-mot,.rel,.tuile,
.compteur,.bouton-rond,.entete-theme,.progres,.lire-consigne{
  border-color:rgba(222,216,255,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 12px 28px rgba(3,2,24,.28);
  -webkit-backdrop-filter:blur(16px) saturate(145%);
  backdrop-filter:blur(16px) saturate(145%);
}
.bouton-rond{width:54px;height:54px;border-color:rgba(255,255,255,.25);transition:transform .18s,background .18s,box-shadow .18s}
.bouton-rond:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(4,2,25,.4),0 0 0 3px rgba(255,255,255,.06)}
.gros{
  border-radius:23px;padding:18px clamp(22px,3vw,42px);
  background:linear-gradient(180deg,#53F2CB 0%,#25D7AC 100%);
  box-shadow:0 6px 0 #087C68,0 13px 28px rgba(34,216,168,.2),inset 0 1px 0 rgba(255,255,255,.75);
  transition:transform .16s cubic-bezier(.2,.8,.2,1),filter .16s,box-shadow .16s;
}
.gros:hover{filter:brightness(1.055);transform:translateY(-2px)}
.moyen{border-radius:17px;transition:transform .16s,filter .16s,box-shadow .16s}
.moyen:hover{filter:brightness(1.09);transform:translateY(-1px)}
.moyen.plein{
  background:linear-gradient(180deg,#4CEBC4,#23CDA5);
  box-shadow:0 4px 0 #087C68,0 9px 22px rgba(34,216,168,.18),inset 0 1px 0 rgba(255,255,255,.7);
}
.entete-theme{
  border-radius:28px;padding:clamp(17px,2.5vw,26px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 18px 38px rgba(4,2,28,.25);
}
.progres{height:17px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);padding:2px}
.progres > *{border-radius:999px}
.choix-images,.choix-mots,.choix-vf{gap:clamp(10px,1.8vw,18px);margin-top:clamp(16px,2.4vw,24px)}
.choix-img{
  border-radius:26px;padding:clamp(8px,1.4vw,13px);
  border:2px solid rgba(255,255,255,.88);
  box-shadow:0 5px 0 #A89BDA,0 12px 24px rgba(3,2,24,.28);
  transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s,border-color .18s;
  overflow:hidden;
}
.choix-img:hover{transform:translateY(-4px) scale(1.015);box-shadow:0 8px 0 #A89BDA,0 18px 30px rgba(3,2,24,.35)}
.choix-img img{transition:transform .22s}
.choix-img:hover img{transform:scale(1.045)}
.choix-img.faux{border:3px solid var(--corail)!important;box-shadow:0 0 0 3px rgba(255,113,140,.15),0 5px 0 #9E3654,0 12px 26px rgba(255,60,100,.16)!important}
.choix-img.juste{border:3px solid var(--menthe)!important;box-shadow:0 0 0 4px rgba(53,224,181,.18),0 6px 0 #087C68,0 0 28px rgba(53,224,181,.28)!important}
.choix-mot{
  border:1px solid rgba(255,255,255,.2);border-radius:21px;
  background:linear-gradient(150deg,rgba(255,255,255,.17),rgba(255,255,255,.075));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 6px 0 rgba(4,2,25,.28),0 12px 24px rgba(3,2,24,.2);
  padding:clamp(16px,2.4vw,23px) 12px;
  transition:transform .16s,background .16s,box-shadow .16s;
}
.choix-mot:hover{transform:translateY(-3px);background:linear-gradient(150deg,rgba(255,255,255,.23),rgba(255,255,255,.1))}
.choix-mot.faux{background:linear-gradient(145deg,rgba(255,113,140,.32),rgba(150,30,60,.22))!important;border:2px solid #FF829B!important}
.choix-mot.juste{background:linear-gradient(145deg,#53F2CB,#25D7AC)!important}
.cadre-image,.partie .pic-grande,.partie .pic-moyenne{
  border-radius:30px;
  box-shadow:0 0 0 3px rgba(255,255,255,.14),0 16px 34px rgba(3,2,24,.34),0 0 42px color-mix(in srgb,var(--th) 25%,transparent);
}
.bulle{
  border-radius:28px!important;
  padding:clamp(17px,3vw,25px)!important;
  font-size:clamp(1.05rem,2.5vw,1.4rem)!important;
  line-height:1.42!important;
  box-shadow:0 16px 38px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.24)!important;
}
.bulle.ko{
  background:linear-gradient(145deg,rgba(150,35,76,.97),rgba(92,18,57,.97))!important;
  border:1px solid rgba(255,173,190,.6)!important;
}
.bulle.ok{
  background:linear-gradient(145deg,rgba(14,137,107,.97),rgba(7,83,76,.97))!important;
  border:1px solid rgba(138,255,222,.55)!important;
}
.accueil .gros,.accueil .moyen{filter:drop-shadow(0 5px 10px rgba(0,0,0,.12))}
.theme{transition:transform .2s,filter .2s}
.theme:hover{filter:brightness(1.08) saturate(1.08)}
.lieu-village{background:linear-gradient(150deg,rgba(255,255,255,.19),rgba(255,255,255,.06));border-radius:27px;box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 7px 0 rgba(3,2,24,.24),0 16px 28px rgba(3,2,24,.18)}
.lieu-village:hover{transform:translateY(-4px);filter:brightness(1.08)}
.reglage-humour{background:linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.045));border-radius:24px;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 12px 28px rgba(3,2,24,.16)}
.choix-humour .moyen.plein{outline:2px solid var(--lune);outline-offset:2px}
.continuer-erreur:not([hidden]){
  border-radius:22px!important;
  box-shadow:0 5px 0 #B77B20,0 13px 28px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.8)!important;
  transition:transform .15s,filter .15s;
}
.continuer-erreur:not([hidden]):active{transform:translate(-50%,3px);filter:brightness(.97)}
@media(min-width:900px){
  main{max-width:1060px}
  .partie{max-width:1480px;padding-left:clamp(28px,4vw,70px);padding-right:clamp(28px,4vw,70px)}
  .choix-images,.choix-mots{max-width:1080px;margin-left:auto;margin-right:auto}
  .choix-img{max-height:280px}
  .accueil{gap:20px 24px}
}
@media(max-width:560px){
  body{font-size:17px}
  main{padding-left:14px;padding-right:14px}
  .barre{padding:10px 14px}
  .choix-images,.choix-mots,.choix-vf{gap:11px}
  .choix-img{border-radius:22px;padding:7px}
  .choix-mot{font-size:1.08rem;padding:15px 8px}
  .bulle{left:12px!important;right:12px!important}
}
@media(hover:none){
  .choix-img:hover,.choix-mot:hover,.lieu-village:hover,.moyen:hover{transform:none;filter:none}
}
@media(prefers-reduced-motion:reduce){
  body::before{animation:none!important}
  .choix-img,.choix-img img,.choix-mot,.lieu-village,.moyen,.gros{transition:none!important}
}


/* ================================================================
   v5.13 — univers 3D d'Ami : profondeur, matières et mascotte
   Effets CSS 3D légers, locaux et compatibles hors connexion.
   ================================================================ */
:root{
  --or-3d:#FFD77A;
  --cyan-3d:#73E9F4;
  --violet-3d:#7B68F7;
  --ombre-3d:0 24px 55px rgba(3,2,25,.42);
}
html{background:#08071f}
body{
  background:
    radial-gradient(ellipse at 50% -10%,rgba(111,84,255,.26),transparent 45%),
    radial-gradient(ellipse at 95% 48%,rgba(35,216,188,.12),transparent 32%),
    radial-gradient(ellipse at 0% 78%,rgba(255,139,95,.10),transparent 34%),
    linear-gradient(155deg,#171044 0%,#0B0828 56%,#100B35 100%);
  /* Pas de « perspective » ici : sur <body>, elle fait de la page entière le repère des
     éléments position:fixed (fenêtres, bulles), qui s'ouvraient alors décalés après défilement.
     Les éléments 3D ont chacun leur propre perspective. */
}
body::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.35;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%,#fff 98%,transparent),
    radial-gradient(1px 1px at 71% 18%,#fff 98%,transparent),
    radial-gradient(2px 2px at 83% 69%,#ffe7a3 98%,transparent),
    radial-gradient(1.4px 1.4px at 38% 82%,#b9c5ff 98%,transparent),
    radial-gradient(1px 1px at 55% 43%,#fff 98%,transparent);
  background-size:360px 320px,420px 380px,510px 470px,390px 430px,620px 540px;
  animation:poussiere3d 42s linear infinite;
}
@keyframes poussiere3d{to{background-position:360px 320px,-420px 380px,510px -470px,-390px 430px,620px -540px}}
/* v5.75 : « preserve-3d » sur #app faisait de #app le repère des éléments « fixes » : la bulle d’erreur et le bouton « J’ai compris » se retrouvaient sous l’écran ou les uns sur les autres. */
#app{transform-style:flat}
.ciel{
  isolation:isolate;
  background:
    radial-gradient(ellipse at 50% 20%,rgba(255,216,130,.24),transparent 25%),
    radial-gradient(ellipse at 50% 0%,rgba(111,91,255,.54),transparent 60%),
    linear-gradient(180deg,#1D155B 0%,#2B217B 58%,#100B35 100%);
  box-shadow:0 28px 80px rgba(2,1,18,.52),inset 0 -1px 0 rgba(255,255,255,.18);
}
.ciel::after{
  content:"";position:absolute;z-index:0;pointer-events:none;left:-12%;right:-12%;bottom:-90px;height:190px;
  background:radial-gradient(ellipse at 50% 0%,rgba(111,93,255,.34),transparent 68%);
  filter:blur(18px);
}
.ciel-in,.ciel .barre,.ciel .paysage{position:relative;z-index:1}
.ciel .lune{
  box-shadow:0 0 30px rgba(255,219,137,.8),0 0 90px rgba(255,202,102,.42),inset -12px -10px 20px rgba(177,111,28,.16);
  transform:translateZ(24px);
}
.ciel .perchoir{perspective:800px;transform-style:preserve-3d}
.ami-3d-wrap{
  display:block;position:relative;width:100%;height:100%;line-height:0;
  transform-style:preserve-3d;perspective:900px;
  filter:drop-shadow(0 18px 16px rgba(0,0,0,.28));
  animation:ami3d-flotte 6s ease-in-out infinite;
}
.ami-3d-wrap::before{
  content:"";position:absolute;z-index:-1;left:12%;right:12%;bottom:4%;height:18%;
  border-radius:50%;background:rgba(0,0,0,.28);filter:blur(13px);
  transform:rotateX(68deg) translateZ(-18px);animation:ami3d-ombre 6s ease-in-out infinite;
}
.ami-3d{
  display:block;width:100%;height:auto;max-width:100%;object-fit:contain;
  transform:none;
  transform-origin:50% 82%;
  filter:drop-shadow(0 8px 14px rgba(255,205,115,.12));
  user-select:none;-webkit-user-drag:none;
}
.ami-grand .ami-3d-wrap{width:100%;max-width:210px;margin:0 auto}
.ami-moyen .ami-3d-wrap{width:100%;max-width:150px;margin:0 auto}
.ami-petit .ami-3d-wrap{width:100%;max-width:68px}
.ami-mini .ami-3d-wrap{width:100%;max-width:76px;margin:0 auto}
.ami-icone .ami-3d-wrap{width:100%;max-width:48px}
.ami-3d-fete{animation:ami3d-fete .8s ease-in-out 1}
.ami-3d-fete .ami-3d{filter:drop-shadow(0 0 22px rgba(255,218,116,.55))}
.ami-3d-surpris{animation:ami3d-surpris .7s ease-in-out 1}
.ami-3d-triste{animation:ami3d-triste .9s ease-in-out 1}
/* v5.93 : Plumo respire au lieu de flotter (mouvements doux, lents) */
@keyframes ami3d-flotte{
  0%,100%{transform:translateY(0) scale(1)}
  50%{transform:translateY(-2px) scale(1.012)}
}
@keyframes ami3d-ombre{0%,100%{transform:rotateX(68deg) scale(1);opacity:.45}50%{transform:rotateX(68deg) scale(.96);opacity:.38}}
@keyframes ami3d-fete{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-7px) scale(1.03)}}
@keyframes ami3d-surpris{0%,100%{transform:rotateZ(0) scale(1)}40%{transform:rotateZ(-3deg) scale(1.03)}}
@keyframes ami3d-triste{0%,100%{transform:rotateZ(0)}50%{transform:rotateZ(-3deg) translateY(2px)}}
.ami-3d-corps{position:relative;display:block;line-height:0}
.ami-acc{position:absolute;pointer-events:none;overflow:visible}
.ami-acc-echarpe{left:0;top:0;width:100%;height:100%}
.ami-acc-noeud{left:45%;top:49%;width:17%}
.ami-acc-lunettes{left:0;top:0;width:100%;height:100%}
.ami-acc-chapeau{left:30%;top:-4%;width:38%;transform:rotate(-6deg)}
.ami-acc-couronne{left:35%;top:-2%;width:30%;transform:rotate(-6deg)}
.partie{
  max-width:1120px;margin:0 auto;padding:clamp(14px,3vw,34px) clamp(14px,3vw,32px) 150px;
  transform-style:preserve-3d;
}
.partie .tete{transform:translateZ(18px)}
.partie .progres{
  height:18px;border:1px solid rgba(255,255,255,.28);
  background:linear-gradient(180deg,rgba(5,3,35,.72),rgba(76,61,150,.55));
  box-shadow:inset 0 3px 8px rgba(0,0,0,.35),0 5px 14px rgba(0,0,0,.16);
}
.partie .progres span{
  box-shadow:0 0 15px currentColor, inset 0 1px 0 rgba(255,255,255,.7);
}
.verre,.jeu-ligne,.ligne-carnet,.joueur-carte,.reglage-facile,.moyen,.raccourcis button,.choix-mot,.rel,.tuile,.compteur,.bouton-rond,.entete-theme,.lire-consigne{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 0 -2px 0 rgba(0,0,0,.13),0 12px 24px rgba(2,1,20,.25);
}
.theme{
  transform-style:preserve-3d;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.48),inset 0 -8px 0 rgba(0,0,0,.18),0 17px 0 rgba(0,0,0,.12),0 27px 42px color-mix(in srgb,var(--th) 36%,transparent);
}
.theme .disque{transform:translateZ(24px);box-shadow:0 12px 20px rgba(0,0,0,.25)}
.choix-img{
  transform:perspective(900px) translateZ(0) rotateX(0deg);
  box-shadow:inset 0 1px 0 #fff,0 6px 0 #a99bdc,0 17px 28px rgba(0,0,0,.28);
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s,border-color .22s;
}
.choix-img:active{transform:perspective(900px) translateY(4px) rotateX(3deg);box-shadow:0 2px 0 #a99bdc,0 7px 12px rgba(0,0,0,.22)}
.choix-mot{
  background:linear-gradient(155deg,rgba(95,80,169,.68),rgba(31,23,83,.94));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),inset 0 -3px 0 rgba(0,0,0,.18),0 8px 0 rgba(5,3,30,.34),0 18px 28px rgba(0,0,0,.22);
  transition:transform .2s,box-shadow .2s,background .2s;
}
.choix-mot:active{transform:translateY(5px) rotateX(4deg);box-shadow:0 2px 0 rgba(5,3,30,.34)}
.gros,.bouton-principal,.continuer-erreur{
  transform-style:preserve-3d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65),inset 0 -4px 0 rgba(0,0,0,.15),0 7px 0 rgba(5,75,67,.72),0 18px 30px rgba(0,0,0,.25);
}
.toast,.bulle{box-shadow:0 18px 45px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.28)}
@media(min-width:900px){
  .partie{max-width:1320px}
  .partie .choix-images,.partie .choix-mots{max-width:1050px;margin-inline:auto}
  .ami-grand .ami-3d-wrap{max-width:250px}
}
@media(max-width:600px){
  .partie{padding:12px 14px 135px}
  .ami-grand .ami-3d-wrap{max-width:175px}
  .ami-petit .ami-3d-wrap{max-width:64px}
}
@media(prefers-reduced-motion:reduce){
  body::after,.ami-3d-wrap,.ami-3d-wrap::before,.ami-3d-fete,.ami-3d-surpris,.ami-3d-triste{animation:none!important}
  .ami-3d{transform:none}
}


/* v5.17 — garde-fou d'affichage des réponses illustrées. */
.choix-images{
  display:grid !important;
  width:100%;
  min-width:0;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  align-items:stretch;
}
.choix-images.six{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.choix-images > .choix-img{
  display:flex !important;
  align-items:center;
  justify-content:center;
  width:100% !important;
  min-width:0;
  min-height:clamp(132px,18vw,250px);
  aspect-ratio:4 / 3;
  height:auto;
  padding:10px;
  overflow:hidden;
}
.choix-images > .choix-img > img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-width:0;
  min-height:0;
  max-width:100%;
  max-height:100%;
  object-fit:contain !important;
  flex:1 1 auto;
}
.choix-images.six > .choix-img{ min-height:clamp(105px,14vw,185px); }
.picto-secours{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  min-height:100px;
  font-size:clamp(3rem,7vw,6rem);
  line-height:1;
}
@media(max-width:600px){
  .choix-images > .choix-img{ min-height:clamp(118px,34vw,190px); }
  .choix-images.six > .choix-img{ min-height:clamp(96px,26vw,145px); }
}


/* ================================================================
   v5.18 — AMI ARCADE : refonte visuelle vivante et comique
   2.5D CSS légère : profondeur, lumière, réactions et mouvement.
   Aucun moteur lourd ajouté : priorité à la fluidité mobile/offline.
   ================================================================ */
:root{
  --arcade-violet:#30208f;
  --arcade-rose:#ff78bd;
  --arcade-cyan:#5cecff;
  --arcade-gold:#ffe27a;
  --arcade-glass:rgba(42,31,112,.66);
}

/* Un ciel plus profond, avec des halos colorés qui respirent. */
body{
  background:
    radial-gradient(ellipse at 12% 18%,rgba(116,82,255,.22),transparent 32%),
    radial-gradient(ellipse at 88% 62%,rgba(31,218,190,.13),transparent 30%),
    linear-gradient(145deg,#10092f 0%,#171044 48%,#0c1233 100%);
}
body::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.42;
  background-image:
    radial-gradient(2px 2px at 7% 18%,#fff 98%,transparent),
    radial-gradient(2px 2px at 19% 74%,#ffe69a 98%,transparent),
    radial-gradient(1.5px 1.5px at 37% 31%,#fff 98%,transparent),
    radial-gradient(2px 2px at 61% 13%,#8ff5ff 98%,transparent),
    radial-gradient(1.5px 1.5px at 83% 39%,#fff 98%,transparent),
    radial-gradient(2px 2px at 92% 82%,#ffe69a 98%,transparent);
  background-size:310px 260px;
  animation:arcade-etoiles 18s linear infinite;
}
@keyframes arcade-etoiles{to{background-position:155px -260px}}

/* Accueil : boutons façon jeu d'arcade, avec ressort au survol. */
.gros,.moyen,.bouton-rond,.choix-mot,.choix-img,.tuile,.rel{
  transform-style:preserve-3d;
  transition:transform .22s cubic-bezier(.2,.9,.25,1.25),filter .22s,box-shadow .22s;
}
@media(hover:hover){
  .gros:hover,.moyen:hover,.choix-mot:hover,.tuile:hover,.rel:hover{
    transform:translateY(-4px) scale(1.025);
    filter:brightness(1.12) saturate(1.12);
  }
  .choix-img:hover{
    transform:translateY(-7px) rotateX(3deg) rotateY(-2deg) scale(1.025);
    box-shadow:inset 0 1px 0 #fff,0 9px 0 #a99bdc,0 24px 34px rgba(0,0,0,.34),0 0 28px rgba(112,151,255,.2);
  }
}
.gros.apprendre,.gros.phrases-accueil,.gros.village-accueil{
  position:relative;overflow:hidden;
  background:linear-gradient(120deg,#35e7c0 0%,#19cfae 48%,#20b8c7 100%);
  color:#062e37;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -5px 0 rgba(0,0,0,.12),0 7px 0 #087e78,0 16px 28px rgba(0,0,0,.25);
}
.gros.phrases-accueil{background:linear-gradient(120deg,#ff9ad5,#d98bff);color:#35104e;box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -5px 0 rgba(0,0,0,.12),0 7px 0 #8545a7,0 16px 28px rgba(0,0,0,.25)}
.gros.village-accueil{background:linear-gradient(120deg,#8bdcff,#7f9dff);color:#101d55;box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -5px 0 rgba(0,0,0,.12),0 7px 0 #4054a8,0 16px 28px rgba(0,0,0,.25)}
.gros.apprendre::after,.gros.phrases-accueil::after,.gros.village-accueil::after{
  content:"";position:absolute;top:-80%;left:-35%;width:24%;height:260%;
  transform:rotate(25deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.48),transparent);
  animation:arcade-reflet 5.8s ease-in-out infinite;
}
@keyframes arcade-reflet{0%,55%{left:-35%}85%,100%{left:125%}}

/* Le plateau de jeu devient une scène lumineuse, pas un grand vide noir. */
.partie{
  position:relative;isolation:isolate;
  width:min(100% - 28px,1480px);max-width:1480px;
  margin:12px auto 34px;padding:clamp(18px,2.6vw,34px);
  border:1px solid rgba(195,183,255,.2);
  border-radius:34px;
  background:
    radial-gradient(ellipse at 8% 4%,rgba(113,83,255,.22),transparent 36%),
    radial-gradient(ellipse at 96% 88%,rgba(31,211,188,.12),transparent 32%),
    linear-gradient(145deg,rgba(31,23,83,.84),rgba(10,8,39,.94));
  box-shadow:0 24px 70px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.16);
  overflow:hidden;
}
.partie::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  width:clamp(180px,28vw,420px);aspect-ratio:1;right:-9%;top:8%;
  border-radius:50%;
  background:radial-gradient(circle,rgba(101,221,255,.12),rgba(137,95,255,.06) 48%,transparent 70%);
  animation:arcade-orbe 12s ease-in-out infinite alternate;
}
.partie::after{
  content:"✦";position:absolute;z-index:-1;pointer-events:none;
  right:4%;bottom:8%;font-size:clamp(3rem,8vw,7rem);color:rgba(255,226,122,.10);
  text-shadow:0 0 35px rgba(255,226,122,.2);
  animation:arcade-etoile 4s ease-in-out infinite;
}
@keyframes arcade-orbe{to{transform:translate(-30px,24px) scale(1.18)}}
@keyframes arcade-etoile{0%,100%{transform:rotate(-12deg) scale(.9);opacity:.35}50%{transform:rotate(12deg) scale(1.12);opacity:.8}}

/* En-tête : une petite carte de mission. */
.partie .tete{
  position:relative;z-index:1;gap:16px;
  padding:10px 16px;margin:0 0 16px;
  border:1px solid rgba(255,255,255,.13);border-radius:24px;
  background:linear-gradient(110deg,rgba(255,255,255,.095),rgba(255,255,255,.025));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 10px 26px rgba(0,0,0,.12);
}
.partie .tete h2{font-size:clamp(1.25rem,2.4vw,1.85rem);letter-spacing:-.025em}
.partie .aide{font-size:clamp(.95rem,1.5vw,1.15rem)}
.partie .progres{
  height:18px;margin:18px 0 26px;padding:3px;
  background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2);
  box-shadow:inset 0 3px 8px rgba(0,0,0,.35),0 4px 12px rgba(0,0,0,.16);
}
.partie .progres span{position:relative;overflow:hidden}
.partie .progres span::after{
  content:"";position:absolute;inset:0;width:45%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);
  animation:arcade-reflet 3.8s ease-in-out infinite;
}

/* Scène et cartes : les réponses prennent enfin leur place. */
.partie .scene{position:relative;z-index:1;gap:clamp(18px,3vw,42px);align-items:center}
.partie .choix-images{
  width:min(100%,1000px);max-width:1000px;margin:clamp(10px,2vw,26px) auto;
  gap:clamp(14px,2vw,24px);
}
.partie .choix-images > .choix-img{
  position:relative;isolation:isolate;
  border:3px solid rgba(255,255,255,.86);border-radius:clamp(18px,2.2vw,30px);
  background:linear-gradient(145deg,#fff,#edf1ff);
  min-height:clamp(150px,20vw,270px);
  box-shadow:inset 0 2px 0 #fff,0 7px 0 #9585d5,0 18px 32px rgba(0,0,0,.26);
  animation:carte-arrivee .55s both cubic-bezier(.2,1.25,.35,1);
}
.partie .choix-img:nth-child(2){animation-delay:.07s}
.partie .choix-img:nth-child(3){animation-delay:.14s}
.partie .choix-img:nth-child(4){animation-delay:.21s}
@keyframes carte-arrivee{from{opacity:0;transform:translateY(18px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
.partie .choix-images > .choix-img > img{
  width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;
  filter:drop-shadow(0 7px 7px rgba(35,25,70,.12));
  transition:transform .25s cubic-bezier(.2,.9,.3,1.2);
}
@media(hover:hover){.partie .choix-img:hover img{transform:scale(1.07) rotate(-1.5deg)}}
.partie .choix-mots{width:min(100%,900px);margin:16px auto;gap:14px}
.partie .choix-mot{
  min-height:76px;border-radius:22px;padding:18px 16px;
  background:linear-gradient(145deg,rgba(104,87,191,.72),rgba(39,29,103,.96));
  border:1px solid rgba(255,255,255,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24),inset 0 -4px 0 rgba(0,0,0,.18),0 7px 0 rgba(5,3,30,.35),0 14px 24px rgba(0,0,0,.2);
  font-size:clamp(1.05rem,2vw,1.45rem);
}
.partie .choix-mot:active{transform:translateY(5px) scale(.98)}
.partie .choix-img.juste,.partie .choix-mot.juste{animation:bonne-reponse .65s cubic-bezier(.2,1.6,.3,1)}
@keyframes bonne-reponse{0%{transform:scale(1)}35%{transform:scale(1.09) rotate(1deg)}65%{transform:scale(.98) rotate(-1deg)}100%{transform:scale(1)}}
.partie .choix-img.faux,.partie .choix-mot.faux{animation:mauvaise-reponse .42s ease-in-out}
@keyframes mauvaise-reponse{0%,100%{transform:translateX(0) rotate(0)}20%{transform:translateX(-7px) rotate(-1deg)}45%{transform:translateX(7px) rotate(1deg)}70%{transform:translateX(-4px)}}

/* Le hibou réagit physiquement : petit bond, roulade ou danse. */
.ami-3d-wrap{will-change:transform;animation:ami-arcade-flotte 3.1s ease-in-out infinite}
@keyframes ami-arcade-flotte{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-9px) rotate(1.5deg)}}
.ami-3d-surpris{animation:ami-arcade-choc .58s ease-in-out 2!important}
.ami-3d-surpris .ami-3d{animation:ami-arcade-yeux .58s ease-in-out 2}
@keyframes ami-arcade-choc{0%,100%{transform:translateX(0) rotate(0)}18%{transform:translateX(-8px) rotate(-8deg)}38%{transform:translateX(8px) rotate(8deg)}58%{transform:translateX(-5px) rotate(-4deg)}78%{transform:translateX(4px) rotate(4deg)}}
@keyframes ami-arcade-yeux{0%,100%{filter:drop-shadow(0 8px 14px rgba(255,205,115,.12))}50%{filter:drop-shadow(0 0 22px rgba(255,112,145,.85))}}
.ami-3d-fete{animation:ami-arcade-victoire .85s cubic-bezier(.2,1.5,.4,1) 2!important}
@keyframes ami-arcade-victoire{0%{transform:translateY(0) rotate(0) scale(1)}28%{transform:translateY(-24px) rotate(-12deg) scale(1.1)}55%{transform:translateY(-5px) rotate(12deg) scale(1.08)}78%{transform:translateY(-17px) rotate(-7deg) scale(1.12)}100%{transform:translateY(0) rotate(0) scale(1)}}
.ami-petit,.ami-mini,.ami-moyen{position:relative}
.ami-petit::after{
  content:"✦";position:absolute;right:-4px;top:-8px;color:#ffe27a;
  font-size:18px;text-shadow:0 0 12px rgba(255,226,122,.9);
  animation:ami-etincelle 2.2s ease-in-out infinite;
}
@keyframes ami-etincelle{0%,100%{transform:scale(.65) rotate(0);opacity:.3}50%{transform:scale(1.25) rotate(70deg);opacity:1}}

/* La bulle de correction devient une vraie bulle de BD. */
.partie .bulle{
  max-width:min(760px,calc(100vw - 28px));left:50%;right:auto;
  width:max-content;min-width:min(280px,calc(100vw - 28px));
  transform:translate(-50%,140%) scale(.94);
  border-radius:26px 26px 26px 8px;
  font-size:clamp(1rem,1.7vw,1.28rem);
  line-height:1.45;padding:18px 24px calc(18px + env(safe-area-inset-bottom));
  box-shadow:0 18px 42px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.22);
}
.partie .bulle.ok,.partie .bulle.ko{transform:translate(-50%,0) scale(1);animation:bulle-bd .38s cubic-bezier(.2,1.45,.35,1)}
@keyframes bulle-bd{from{opacity:0;transform:translate(-50%,18px) scale(.78) rotate(-2deg)}to{opacity:1;transform:translate(-50%,0) scale(1) rotate(0)}}
.partie .continuer-erreur{border-radius:20px;box-shadow:inset 0 2px 0 rgba(255,255,255,.65),inset 0 -4px 0 rgba(0,0,0,.12),0 6px 0 #b78000,0 14px 24px rgba(0,0,0,.24)}

/* Récompenses et petites réactions */
.partie .combo.vu{animation:combo-arcade .6s cubic-bezier(.2,1.7,.3,1)}
@keyframes combo-arcade{0%{transform:scale(.5) rotate(-12deg)}65%{transform:scale(1.3) rotate(7deg)}100%{transform:scale(1) rotate(0)}}

/* Tablette et téléphone : on garde le spectacle sans écraser les contenus. */
@media(min-width:900px){
  .partie{min-height:calc(100vh - 110px)}
  .partie .scene{min-height:clamp(420px,58vh,760px)}
  .partie .choix-images{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .partie .choix-images.six{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:899px){
  .partie{width:calc(100% - 16px);margin:8px auto 20px;border-radius:26px;padding:14px 12px 150px}
  .partie .scene{gap:14px}
  .partie .choix-images{gap:12px;margin:10px auto}
  .partie .choix-images > .choix-img{min-height:clamp(125px,34vw,205px);border-radius:20px;padding:8px}
  .partie .choix-mots{gap:10px}
  .partie .choix-mot{min-height:62px;padding:14px 10px;border-radius:18px}
  .partie .tete{padding:8px 10px;gap:10px}
  .partie .ami-petit{flex-basis:58px;width:58px}
  .partie .bulle{bottom:8px}
}
@media(max-width:420px){
  .partie .choix-images{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .partie .choix-images.six{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .partie .choix-images > .choix-img{min-height:clamp(112px,37vw,155px)}
}
@media(prefers-reduced-motion:reduce){
  body::after,.partie::before,.partie::after,.gros.apprendre::after,.gros.phrases-accueil::after,.gros.village-accueil::after,
  .partie .choix-img,.ami-3d-wrap,.ami-3d-surpris,.ami-3d-fete,.ami-petit::after{animation:none!important}
  .partie .bulle.ok,.partie .bulle.ko{animation:none!important}
}


/* v5.19 — Ami reprend sa place sur le perchoir : la lune passe derrière lui. */
.perchoir{
  position:relative;
  isolation:isolate;
  width:230px;
  height:190px;
  margin:-4px auto 0;
}
.perchoir .lune{
  z-index:0 !important;
  width:148px;
  height:148px;
  left:50%;
  top:12px;
  margin-left:-74px;
}
.perchoir .branche{
  z-index:2 !important;
  top:148px;
}
.perchoir .ami-grand{
  z-index:4 !important;
  width:142px;
  left:50%;
  top:12px;
  margin:0;
  transform:translateX(-50%);
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
.perchoir .ami-grand .ami-3d-wrap{
  display:block;
  width:100%;
  max-width:142px !important;
  margin:0 auto;
  position:relative;
  z-index:4;
  animation:ami-accueil-bond 3.2s ease-in-out infinite;
  transform-origin:50% 90%;
}
.perchoir .ami-grand .ami-3d{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 9px 10px rgba(12,7,35,.35));
}
@keyframes ami-accueil-bond{
  0%,100%{transform:translateY(0) rotate(-1deg)}
  48%{transform:translateY(-8px) rotate(1deg)}
  72%{transform:translateY(-3px) rotate(-1deg)}
}
.perchoir .ami-grand:focus-visible{
  outline:3px solid #ffe27a;
  outline-offset:8px;
  border-radius:28px;
}
@media(max-width:600px){
  .perchoir{width:210px;height:176px}
  .perchoir .lune{width:132px;height:132px;margin-left:-66px;top:12px}
  .perchoir .branche{top:135px}
  .perchoir .ami-grand{width:128px;top:8px}
  .perchoir .ami-grand .ami-3d-wrap{max-width:128px!important}
}
@media(prefers-reduced-motion:reduce){
  .perchoir .ami-grand .ami-3d-wrap{animation:none!important}
}

/* v5.20 — accès direct au premier quartier 3D */
.monde-3d-accueil{
 display:flex;align-items:center;justify-content:center;gap:10px;text-decoration:none;
 color:#fff!important;background:linear-gradient(110deg,#8265ff,#4d9cff 55%,#31d8c2);
 border:1px solid rgba(255,255,255,.28);border-radius:18px;padding:16px 20px;
 box-shadow:inset 0 2px 0 rgba(255,255,255,.35),0 6px 0 #35459b,0 14px 26px rgba(0,0,0,.2);
 font-weight:900;position:relative;overflow:hidden;
}
.monde-3d-accueil:hover{filter:brightness(1.12);transform:translateY(-3px)}

/* v5.32 — Ami réagit à sa vanne (rien si mouvements réduits) */
.ami-rx-objet{position:absolute;left:50%;top:6%;font-size:2.2rem;line-height:1;pointer-events:none;translate:-50% 0}
.ami-rx-0{animation:amirx-hoche .6s ease-in-out 2}
.ami-rx-0 .ami-rx-objet{animation:amirx-apparait 1.4s ease-out forwards}
.ami-rx-1{animation:amirx-penche .8s ease-in-out 1}
.ami-rx-1 .ami-rx-objet{top:30%;animation:amirx-tombe 1.2s cubic-bezier(.5,0,.9,.6) forwards}
.ami-rx-2{animation:amirx-secoue .45s ease-in-out 3}
.ami-rx-2 .ami-rx-objet{animation:amirx-plumes 1.3s ease-out forwards}
.ami-rx-3{animation:amirx-tourne .9s ease-in-out 1}
.ami-rx-3 .ami-rx-objet{animation:amirx-boum 1s ease-out forwards}
@keyframes amirx-hoche{50%{transform:rotate(-6deg)}}
@keyframes amirx-penche{40%{transform:rotate(12deg) translateY(4px)}}
@keyframes amirx-secoue{25%{transform:translateX(-6px) rotate(-4deg)}75%{transform:translateX(6px) rotate(4deg)}}
@keyframes amirx-tourne{50%{transform:rotateY(180deg) scale(1.08)}100%{transform:rotateY(360deg)}}
@keyframes amirx-apparait{0%{opacity:0;translate:-50% 10px}30%{opacity:1;translate:-50% 0}100%{opacity:0}}
@keyframes amirx-tombe{0%{opacity:1}100%{opacity:0;translate:-50% 90px;rotate:200deg}}
@keyframes amirx-plumes{0%{opacity:1;scale:.6}100%{opacity:0;scale:1.8;translate:-50% -50px;rotate:-40deg}}
@keyframes amirx-boum{0%{opacity:0;scale:.3}25%{opacity:1;scale:1.6}100%{opacity:0;scale:2.2}}
@media(prefers-reduced-motion:reduce){.ami-rx,.ami-rx .ami-rx-objet{animation:none!important}}
html[data-facile="1"] .ami-rx,html[data-facile="1"] .ami-rx .ami-rx-objet{animation:none!important}
.garder-vanne[hidden]{display:none!important}
.garder-vanne:not([hidden]){position:fixed;z-index:8;right:12px;top:calc(84px + env(safe-area-inset-top));
  padding:8px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.6);background:rgba(20,20,40,.85);color:#fff;font-weight:900;font-size:.9rem;max-width:46vw}
.mots-city-accueil{background:linear-gradient(135deg,#ff7a59,#ffb347 55%,#ff5fa2)!important;color:#2a0d00!important}
/* v5.32 — Sur petit écran (≤ 560 px), la bulle est collée aux deux bords : on ne la décale plus de -50%
   (avant, elle sortait à gauche de l'écran et la vanne était coupée). */
@media(max-width:560px){
  .partie .bulle{width:auto!important;min-width:0!important;max-width:none!important}
  .partie .bulle.ok,.partie .bulle.ko{transform:none!important;animation:bulle-bd-mobile .3s ease-out}
  .partie .bulle:empty{transform:translateY(140%)!important}
}
@keyframes bulle-bd-mobile{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.partie .bulle.ok,.partie .bulle.ko{animation:none!important}}

/* ── Les pièges de l'anglais (v5.39) ── */
.pieges-accueil{background:linear-gradient(135deg,#ff8a5b,#ffb347)!important;color:#2b1600!important}
.pieges-accueil-ecran,.piege-ecran{max-width:640px;margin:0 auto;padding:16px}
.pieges-accueil-ecran{text-align:center}
.pieges-intro{font-size:1.05rem;line-height:1.5}
.pieges-score{font-size:1.1rem}
.pieges-cats{list-style:none;padding:0;margin:12px auto 18px;max-width:420px;text-align:left}
.pieges-cats li{display:flex;justify-content:space-between;gap:12px;padding:8px 12px;border-radius:12px;background:rgba(255,255,255,.08);margin:6px 0}
.piege-cat{opacity:.8;font-weight:700;margin:0 0 6px}
.piege-haut{display:flex;align-items:center;gap:14px}
.piege-haut .ami-moyen{flex:0 0 auto;width:90px}
.piege-consigne{margin:0;opacity:.85}
.piege-fr{font-size:1.45rem;font-weight:800;margin:4px 0 0;line-height:1.3}
.piege-options{display:grid;gap:10px;margin:16px 0}
.piege-opt{font-size:1.15rem!important;text-align:left;justify-content:flex-start}
.piege-opt.ok{background:#1f9d6b!important;color:#fff!important;outline:3px solid #7ef0c0}
.piege-opt.ko{background:#c2410c!important;color:#fff!important;text-decoration:line-through}
.piege-retour p{margin:8px 0;line-height:1.45}
.piege-vanne{font-size:1.15rem;font-weight:700}
.piege-bravo{font-size:1.2rem;font-weight:800}
.piege-bon{font-size:1.2rem;font-weight:800;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.piege-regle{background:rgba(255,215,64,.14);border-left:4px solid #ffd740;padding:8px 12px;border-radius:8px}
@media(max-width:560px){.piege-fr{font-size:1.2rem}.piege-haut .ami-moyen{width:64px}}

/* ── Le coin anglais (v5.40) ── */
.coin-anglais{max-width:720px;margin:0 auto;padding:16px;text-align:center}
.cartes-anglais{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-top:14px}
.carte-anglais{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 12px;border-radius:20px;border:2px solid rgba(255,255,255,.14);background:rgba(255,255,255,.07);color:inherit;font:inherit;cursor:pointer;min-height:150px}
.carte-anglais:hover,.carte-anglais:focus-visible{background:rgba(255,255,255,.14);border-color:#ffd740}
.carte-anglais .ic{font-size:2.2rem}
.carte-anglais strong{font-size:1.1rem}
.carte-anglais small{opacity:.85;line-height:1.35}
.carte-anglais em{font-style:normal;font-weight:700;color:#7ef0c0}
.battle-ecran{max-width:640px;margin:0 auto;padding:16px}
.bulle-ami{background:rgba(255,255,255,.08);border-radius:18px;padding:10px 14px}
.bulle-ami .piege-fr{font-size:1.25rem}
.bulle-ami .qui{opacity:.8;font-weight:600}
.trad summary{cursor:pointer;opacity:.85;margin-top:4px}
.trad p{margin:6px 0 0;opacity:.9}
.battle-score{font-size:2rem;font-weight:900}
.situation-intro{background:rgba(126,240,192,.12);border-radius:12px;padding:8px 12px}
.petit{opacity:.85;font-size:.95rem}
.dictee-label{display:block;margin:14px 0 4px;font-weight:700}
#dictee-texte{width:100%;box-sizing:border-box;font:inherit;font-size:1.2rem;padding:12px;border-radius:14px;border:2px solid rgba(255,255,255,.25);background:rgba(0,0,0,.25);color:inherit;margin-bottom:10px}
.dictee-corrige{font-size:1.2rem;line-height:1.8}
.mot-ok{color:#7ef0c0}
.mot-ko{color:#ffb4a2;text-decoration:underline wavy;font-weight:800}

/* ── v5.41 : parcours, révision, histoires, répéter, parents, invente, vannes animées ── */
.carte-parcours,.carte-revision{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;margin:10px 0;padding:14px 16px;border-radius:20px;border:2px solid #ffd740;background:rgba(255,215,64,.12);color:inherit;font:inherit;text-align:left;cursor:pointer;flex-wrap:wrap}
.carte-revision{border-color:#7ef0c0;background:rgba(126,240,192,.12)}
.carte-parcours .ic{font-size:2rem}
.carte-parcours small,.carte-revision small{display:block;opacity:.85}
.barre-prog{flex:1 1 100%;height:8px;border-radius:8px;background:rgba(255,255,255,.15);overflow:hidden}
.barre-prog i{display:block;height:100%;background:linear-gradient(90deg,#7ef0c0,#ffd740)}
.blague-jour{text-align:left;background:rgba(255,138,91,.14);border-radius:18px;padding:10px 16px;margin:10px 0}
.blague-jour p{margin:6px 0}.bj-q,.bj-r{font-size:1.15rem;font-weight:800}.bj-jeu{background:rgba(255,255,255,.08);border-radius:10px;padding:6px 10px}
.parcours .niveau{text-align:left;background:rgba(255,255,255,.06);border-radius:18px;padding:12px 16px;margin:12px 0}
.parcours .niveau.ferme{opacity:.55}.parcours .niveau.valide{border:2px solid #7ef0c0}
.parcours ul{list-style:none;padding:0;margin:8px 0}
.parcours .etape{display:flex;justify-content:space-between;gap:10px;width:100%;padding:8px 12px;margin:4px 0;border-radius:12px;border:0;background:rgba(255,255,255,.08);color:inherit;font:inherit;cursor:pointer;text-align:left}
.parcours li.ok .etape{background:rgba(126,240,192,.16)}
.lecture-image{font-size:5rem;text-align:center;margin:10px 0}
.lecture-texte{font-size:1.5rem;font-weight:800;text-align:center;line-height:1.4}
.puces{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.puce{padding:8px 12px;border-radius:999px;border:2px solid rgba(255,255,255,.2);background:rgba(255,255,255,.06);color:inherit;font:inherit;cursor:pointer}
.puce.choisie{border-color:#ffd740;background:rgba(255,215,64,.2);font-weight:800}
.champ-court{width:6em;font:inherit;font-size:1.2rem;padding:8px;border-radius:10px;border:2px solid rgba(255,255,255,.25);background:rgba(0,0,0,.25);color:inherit}
.pas-drole{position:fixed;top:calc(84px + env(safe-area-inset-top) + 46px);right:12px;z-index:5}
.scene-anim{display:inline-flex;position:relative;width:2.6em;height:2.2em;vertical-align:middle;margin-right:.4em}
.scene-anim span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.scene-anim .pic-mini{width:2em;height:2em}
.scene-anim .de{animation:scene-de 1.6s ease forwards}.scene-anim .vers{opacity:0;animation:scene-vers 1.6s ease forwards}
@keyframes scene-de{0%,35%{opacity:1;transform:scale(1)}60%{opacity:0;transform:scale(.2) rotate(-200deg)}100%{opacity:0}}
@keyframes scene-vers{0%,45%{opacity:0;transform:scale(.2) rotate(200deg)}75%{opacity:1;transform:scale(1.25)}100%{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.scene-anim .de{display:none}.scene-anim .vers{opacity:1;animation:none}}

/* ── v5.42 : jeux pour rire, maison, Avent, bêtisier, battles, rap, salon ── */
.section-anglais{margin:18px 0 4px;text-align:left}
.juste-btn{background:linear-gradient(135deg,#1f9d6b,#7ef0c0)!important;color:#05261a!important}
.buzz-btn{background:linear-gradient(135deg,#e03131,#ff8787)!important;color:#fff!important}
.avent-grille{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;max-width:520px;margin:12px auto}
.avent-case{aspect-ratio:1;border-radius:14px;border:2px solid #f2c230;background:linear-gradient(135deg,#b91c1c,#166534);color:#fff;font:inherit;font-size:1.3rem;font-weight:900;cursor:pointer}
.avent-case.ouverte{background:#fff7e6;color:inherit;font-size:1.8rem}
.avent-case:disabled{opacity:.45;cursor:not-allowed}
.maison-ecran{max-width:720px;margin:0 auto;padding:16px;text-align:center}
.salon-maison{position:relative;border-radius:22px;overflow:hidden;background:linear-gradient(#f6e7c8 0 45%,#c99a6b 45% 100%);padding:14px;color:#2b1d10}
.salon-maison .murs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.salon-maison .sols{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.fente{min-height:86px;border-radius:16px;border:2px dashed rgba(43,29,16,.35);background:rgba(255,255,255,.25);font:inherit;color:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center}
.fente.pleine{border-style:solid;background:rgba(255,255,255,.55)}
.fente .obj{font-size:2.4rem}.fente .vide{font-size:1.6rem;opacity:.5}.fente small{font-weight:700}
.ami-maison{position:absolute;right:8px;bottom:6px;width:64px;pointer-events:none}
.boutique{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.article{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px;border-radius:16px;border:2px solid rgba(255,255,255,.15);background:rgba(255,255,255,.07);color:inherit;font:inherit;cursor:pointer}
.article .obj{font-size:2rem}.article em{font-style:normal;font-weight:800;color:#ffd740}.article.achete{opacity:.55}.article:disabled{cursor:not-allowed}
.tele .ecran-tele{background:linear-gradient(135deg,#1e1b4b,#312e81);border:8px solid #111;border-radius:28px;padding:16px;box-shadow:0 0 40px rgba(99,102,241,.5);margin-bottom:14px}
.tele .numero{font-size:2.4rem;font-weight:900;color:#ffd740;margin:0}
.champ-pseudo,.champ-code,.champ-long{font:inherit;font-size:1.1rem;padding:8px 10px;border-radius:12px;border:2px solid rgba(255,255,255,.25);background:rgba(0,0,0,.25);color:inherit}
.champ-code{width:7em;text-transform:uppercase;letter-spacing:.2em;text-align:center}.champ-long{width:min(100%,520px)}
.podium{list-style:none;padding:0;font-size:1.2rem;font-weight:700;line-height:1.9}
.lien-defi input{width:min(100%,560px);font:inherit;padding:8px;border-radius:10px;border:1px solid rgba(255,255,255,.3);background:rgba(0,0,0,.25);color:inherit}
/* Battle de rap : scène */
.rap-scene{position:relative;min-height:calc(100vh - 80px);background:radial-gradient(ellipse at 50% 0%,#4c1d95 0,#0b0716 70%);overflow:hidden;padding:12px 16px 90px}
.projecteurs{position:absolute;inset:0;background:conic-gradient(from 200deg at 20% -10%,transparent 0 10deg,rgba(255,215,64,.18) 10deg 22deg,transparent 22deg),conic-gradient(from 140deg at 80% -10%,transparent 0 10deg,rgba(236,72,153,.18) 10deg 22deg,transparent 22deg);animation:projo 6s ease-in-out infinite alternate;pointer-events:none}
@keyframes projo{to{filter:hue-rotate(60deg)}}
.applaudimetre{position:relative;max-width:420px;margin:0 auto 10px;height:22px;border-radius:12px;background:rgba(255,255,255,.12);overflow:hidden}
.applaudimetre i{display:block;height:100%;background:linear-gradient(90deg,#60a5fa,#facc15,#ef4444);transition:width .6s}
.applaudimetre span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:800}
.rap-centre{position:relative;max-width:620px;margin:0 auto;text-align:center}
.micro-ami{animation:balance 0.68s ease-in-out infinite alternate}
@keyframes balance{from{transform:rotate(-4deg) translateY(0)}to{transform:rotate(4deg) translateY(-4px)}}
.rap-ligne{font-size:1.35rem;font-weight:900;line-height:1.4;text-shadow:0 2px 10px rgba(0,0,0,.6)}
.trou-mot{display:inline-block;min-width:3.5em;border-bottom:3px solid #facc15;color:#facc15}
.foule{position:absolute;left:0;right:0;bottom:6px;text-align:center;font-size:2rem;letter-spacing:.15em;animation:foule .45s ease-in-out infinite alternate}
@keyframes foule{to{transform:translateY(-4px)}}
@media(prefers-reduced-motion:reduce){.projecteurs,.micro-ami,.foule{animation:none}}
/* Salon en direct */
.salle{max-width:760px;margin:0 auto;padding:16px;text-align:center}
.code-salon{font-family:monospace;letter-spacing:.25em;background:#ffd740;color:#2b1600;padding:2px 10px;border-radius:10px}
.vaisseau{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;padding:18px;border-radius:40px;background:radial-gradient(ellipse at center,#1f2a5a,#0d1330);border:3px solid #5b6bbf;min-height:150px;margin:12px 0}
.joueur-salon{position:relative;display:flex;flex-direction:column;align-items:center;border:0;background:none;color:inherit;font:inherit;cursor:pointer;animation:flotte 2.4s ease-in-out infinite alternate;animation-delay:var(--d)}
@keyframes flotte{to{transform:translateY(-8px)}}
.joueur-salon .avatar{width:72px}.joueur-salon .nom{font-weight:800;font-size:.9rem}.joueur-salon.muet{opacity:.4}
.bulle-reaction{position:absolute;top:-18px;white-space:nowrap;background:#fff;color:#111;border-radius:12px;padding:2px 8px;font-size:.8rem;opacity:0}
.bulle-reaction.vue{animation:bulleR 2.2s ease forwards}
@keyframes bulleR{0%{opacity:0;transform:translateY(6px)}10%,80%{opacity:1;transform:none}100%{opacity:0}}
.reactions{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:10px 0}
.reaction{padding:6px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit;font:inherit;cursor:pointer}
.chat-salon ul{list-style:none;padding:8px;max-height:150px;overflow:auto;text-align:left;background:rgba(0,0,0,.25);border-radius:12px}
.chrono{height:8px;border-radius:8px;background:rgba(255,255,255,.12);overflow:hidden;margin:6px 0 10px}.chrono i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#ef4444,#facc15,#22c55e)}
.scores-salon{text-align:left;max-width:360px;margin:10px auto}
@media(prefers-reduced-motion:reduce){.joueur-salon{animation:none}}

/* v5.44 — Coin maths (Prof Pi) et labo des sciences */
.prof-pi{ width:100%; height:100%; }
.prof-entete{ display:flex; gap:14px; align-items:center; }
.prof-entete .ami-moyen{ flex:0 0 96px; height:96px; }
.onglets-niveaux{ display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.onglet{ font:inherit; font-weight:900; border:2px solid rgba(255,255,255,.25); background:transparent; color:inherit; border-radius:999px; padding:6px 14px; cursor:pointer; }
.onglet.actif{ background:var(--lune, #FFC93C); color:#3A2600; border-color:transparent; }
.ton-prof .petit-bouton.actif{ outline:2px solid var(--lune, #FFC93C); }
.carte-anglais.bientot{ opacity:.55; }
.coin-maths h3{ margin:16px 0 6px; }
.gros-score{ font-size:2.2rem; font-weight:900; margin:.2em 0; }


/* ═══════════════════════════════════════════════════════════════════════
   v5.46 — refonte visuelle premium : pièges, battles et écrans de réponse
   ═══════════════════════════════════════════════════════════════════════ */
:root{
  --ami-cyan:#6ee7f9;--ami-violet:#a78bfa;--ami-pink:#fb8acb;
  --ami-gold:#ffd166;--ami-glass:rgba(255,255,255,.085);
  --ami-line:rgba(255,255,255,.17);
}
.pieges-accueil-ecran,.piege-ecran,.coin-anglais,.battle-ecran{
  width:min(calc(100% - 32px),1180px);
  max-width:1180px;min-height:calc(100vh - 88px);margin:0 auto;
  padding:clamp(22px,4vw,54px);box-sizing:border-box;position:relative;
  isolation:isolate;border:1px solid rgba(255,255,255,.13);border-radius:30px;
  background:
    radial-gradient(ellipse at 8% 8%,rgba(120,94,240,.20),transparent 34%),
    radial-gradient(ellipse at 92% 85%,rgba(40,205,190,.13),transparent 36%),
    linear-gradient(145deg,rgba(30,22,76,.72),rgba(8,18,48,.66));
  box-shadow:0 26px 80px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter:blur(16px);
}
.pieges-accueil-ecran:before,.piege-ecran:before,.coin-anglais:before,.battle-ecran:before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;
  background-image:radial-gradient(rgba(255,255,255,.48) .8px,transparent .9px);
  background-size:42px 42px;opacity:.10;mask-image:linear-gradient(135deg,#000,transparent 70%);
}
.piege-ecran{display:grid;grid-template-columns:minmax(0,.9fr) minmax(380px,1.1fr);grid-template-areas:"cat cat" "head opts" "retour retour";align-content:center;gap:22px 34px}
.piege-cat{grid-area:cat;display:inline-flex;align-items:center;gap:9px;width:max-content;max-width:100%;padding:9px 15px;margin:0;border:1px solid rgba(255,255,255,.16);border-radius:999px;background:linear-gradient(90deg,rgba(167,139,250,.22),rgba(110,231,249,.10));color:#e8e5ff;font-weight:900;letter-spacing:.035em;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.piege-haut{grid-area:head;align-self:center;gap:clamp(16px,2.5vw,30px);padding:clamp(18px,2.5vw,30px);border-radius:26px;border:1px solid var(--ami-line);background:linear-gradient(145deg,rgba(255,255,255,.105),rgba(255,255,255,.035));box-shadow:inset 0 1px rgba(255,255,255,.13),0 16px 36px rgba(0,0,0,.14)}
.piege-haut .ami-moyen{width:clamp(88px,10vw,132px);filter:drop-shadow(0 12px 20px rgba(255,190,90,.22));animation:ami-bob-v546 3.2s ease-in-out infinite}
@keyframes ami-bob-v546{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-9px) rotate(2deg)}}
.piege-consigne{font-size:clamp(1rem,1.3vw,1.2rem);font-weight:750;color:#c9c5ee;letter-spacing:.02em}
.piege-fr{font-size:clamp(1.55rem,2.5vw,2.45rem);line-height:1.18;font-weight:950;letter-spacing:-.035em;margin:9px 0 0;text-wrap:balance;text-shadow:0 5px 22px rgba(0,0,0,.25)}
.piege-options{grid-area:opts;display:grid;grid-template-columns:1fr;gap:14px;align-content:center;margin:0}
.piege-opt{min-height:78px;padding:18px 22px!important;border:1px solid rgba(255,255,255,.20)!important;border-radius:19px!important;background:linear-gradient(135deg,rgba(255,255,255,.13),rgba(255,255,255,.055))!important;color:#fff!important;font-size:clamp(1.05rem,1.45vw,1.32rem)!important;font-weight:850!important;box-shadow:0 10px 24px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.10);transition:transform .18s ease,border-color .18s ease,filter .18s ease,box-shadow .18s ease!important}
.piege-opt:not(:disabled):hover{transform:translateY(-4px) scale(1.012);border-color:rgba(110,231,249,.75)!important;box-shadow:0 16px 32px rgba(36,190,210,.16),inset 0 1px rgba(255,255,255,.16);filter:brightness(1.12)}
.piege-opt:focus-visible{outline:3px solid var(--ami-gold)!important;outline-offset:4px}
.piege-opt.ok{background:linear-gradient(115deg,#059669,#34d399)!important;border-color:#8af3d2!important;box-shadow:0 0 0 4px rgba(52,211,153,.18),0 14px 30px rgba(16,185,129,.22)!important;animation:pop-v546 .35s ease-out}
.piege-opt.ko{background:linear-gradient(115deg,#b93824,#f05b38)!important;border-color:#ff9a7d!important;box-shadow:0 0 0 4px rgba(240,91,56,.15)!important;opacity:1!important}
@keyframes pop-v546{0%{transform:scale(.96)}65%{transform:scale(1.025)}100%{transform:scale(1)}}
.piege-retour{grid-area:retour;min-height:0;padding:0;border-radius:22px;animation:retour-v546 .32s ease-out}
@keyframes retour-v546{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.piege-retour:has(.piege-vanne),.piege-retour:has(.piege-bravo){padding:clamp(16px,2.4vw,26px);border:1px solid rgba(255,255,255,.17);background:linear-gradient(120deg,rgba(255,255,255,.105),rgba(255,255,255,.045));box-shadow:0 14px 34px rgba(0,0,0,.15)}
.piege-vanne{font-size:clamp(1.05rem,1.45vw,1.28rem);line-height:1.55;font-weight:800;color:#fff0b7;text-wrap:pretty}
.piege-bravo{font-size:clamp(1.2rem,1.7vw,1.55rem);font-weight:950;color:#8df5d1}
.piege-bon{font-size:clamp(1.15rem,1.5vw,1.4rem);padding:12px 0;color:#9cefe0}
.piege-regle{padding:14px 18px;border-radius:15px;border:1px solid rgba(255,209,102,.25);border-left:5px solid var(--ami-gold);background:linear-gradient(100deg,rgba(255,209,102,.16),rgba(255,209,102,.055));font-size:1rem;line-height:1.55}
.piege-retour .moyen.plein{min-height:54px;padding:12px 24px!important;border-radius:16px!important;background:linear-gradient(115deg,#38d9bd,#83f0d0)!important;color:#062c32!important;font-weight:950!important;box-shadow:0 12px 28px rgba(56,217,189,.22)}
.pieges-accueil-ecran{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.pieges-accueil-ecran .ami-moyen{width:clamp(90px,12vw,140px);filter:drop-shadow(0 12px 22px rgba(255,190,90,.2));animation:ami-bob-v546 3.2s ease-in-out infinite}
.pieges-accueil-ecran h2,.coin-anglais h2{font-size:clamp(2rem,4vw,3.2rem);font-weight:1000;letter-spacing:-.045em;background:linear-gradient(90deg,#fff,#b9a9ff 50%,#76e9e0);background-clip:text;-webkit-background-clip:text;color:transparent;margin:0}
.pieges-intro{max-width:760px;font-size:clamp(1rem,1.4vw,1.2rem);line-height:1.65;color:#e1def8}
.pieges-cats{max-width:760px;width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
.pieges-cats li{padding:13px 16px;border:1px solid rgba(255,255,255,.14);border-radius:15px;background:rgba(255,255,255,.065);box-shadow:inset 0 1px rgba(255,255,255,.07)}
.pieges-accueil-ecran .gros{min-height:58px;padding:14px 30px;border-radius:18px;background:linear-gradient(110deg,#38d9bd,#9bf0d5)!important;color:#062c32!important;font-size:1.1rem;font-weight:950;box-shadow:0 12px 30px rgba(56,217,189,.22)}
.coin-anglais{display:block;text-align:center}
.cartes-anglais{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.carte-anglais{border-radius:23px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.045));box-shadow:0 14px 30px rgba(0,0,0,.16);transition:transform .2s ease,border-color .2s ease}
.carte-anglais:hover{transform:translateY(-5px);border-color:rgba(110,231,249,.7);box-shadow:0 18px 36px rgba(40,180,200,.14)}
.bulle-ami{border:1px solid rgba(255,255,255,.15);background:linear-gradient(130deg,rgba(167,139,250,.18),rgba(255,255,255,.06));box-shadow:0 12px 26px rgba(0,0,0,.14)}
@media(max-width:760px){
 .pieges-accueil-ecran,.piege-ecran,.coin-anglais,.battle-ecran{width:calc(100% - 18px);min-height:calc(100vh - 76px);padding:16px;border-radius:22px}
 .piege-ecran{grid-template-columns:1fr;grid-template-areas:"cat" "head" "opts" "retour";gap:14px}
 .piege-haut{padding:16px;gap:12px}.piege-haut .ami-moyen{width:68px}
 .piege-opt{min-height:64px;padding:14px 16px!important}
}
@media(prefers-reduced-motion:reduce){.piege-haut .ami-moyen,.pieges-accueil-ecran .ami-moyen{animation:none!important}.piege-opt,.carte-anglais{transition:none!important}}


/* V6 — résumé d'apprentissage adaptatif sur l'accueil */
.carte-apprentissage{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:.45rem .9rem; width:min(100%, 680px); margin:0 auto 1rem;
  padding:.8rem 1rem; border:1px solid rgba(255,255,255,.22);
  border-radius:18px; color:var(--texte);
  background:linear-gradient(135deg,rgba(79,216,255,.15),rgba(139,108,255,.19));
  box-shadow:0 8px 24px rgba(8,4,35,.16),inset 0 1px 0 rgba(255,255,255,.16);
  text-align:left;
}
.carte-apprentissage strong{font-weight:900}
.carte-apprentissage span{font-size:.9rem;color:var(--doux)}
@media(max-width:520px){
  .carte-apprentissage{border-radius:14px;padding:.7rem .8rem}
  .carte-apprentissage span{width:100%}
}


/* v5.58 — finition transversale : cohérence, lisibilité et confort tactile */
:root{--ami-focus:#78e8ff;--ami-card-border:rgba(255,255,255,.19)}
html{scroll-behavior:smooth;scroll-padding-top:18px}
body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
button,a,select,input{touch-action:manipulation}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--ami-focus)!important;outline-offset:3px!important}
#app{isolation:isolate}
#app>main,#app>section{width:min(100%,1000px);margin-left:auto;margin-right:auto}
#app .verre,#app .jeu-ligne,#app .ligne-carnet,#app .joueur-carte,#app .tuile,#app .carte-anglais{border-color:var(--ami-card-border)}
#app button:not(.lien):not(.bouton-rond){min-height:44px}
#app img{max-width:100%;height:auto}
#app p{text-wrap:pretty}
#app h1,#app h2,#app h3{text-wrap:balance}
#app .question,#app .consigne,#app .mot-a-trouver{max-width:900px;margin-left:auto;margin-right:auto}
#app .choix-mot,#app .piege-opt{min-height:52px}
@media(min-width:1100px){#app>main{max-width:1000px}#app .grille,#app .cartes-anglais{gap:20px}}
@media(min-width:1600px){body{font-size:19px}#app>main{max-width:1120px}}
@media(max-width:600px){body{font-size:16px}#app .actions{gap:9px}#app .actions .moyen{flex:1 1 100%;max-width:none}#app .barre{padding:10px 12px}#app .bouton-rond{width:46px;height:46px}#app .gros{width:min(100%,420px);padding:15px 20px;font-size:1.12rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{scroll-behavior:auto!important}}

/* =====================================================================
   v5.60 — ORDINATEUR : tout l'écran est utilisé
   Les écrans s'élargissent jusqu'à ~1760 px (au-delà, les lignes deviendraient trop longues à lire),
   les cartes se rangent sur plus de colonnes, les questions occupent la hauteur de l'écran.
   ===================================================================== */
.petit-bouton{ font:inherit; font-size:.92rem; font-weight:800; color:inherit; cursor:pointer; padding:7px 13px; border-radius:999px;
  border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.08); transition:background .15s, transform .15s; }
.petit-bouton:hover{ background:rgba(255,255,255,.16); transform:translateY(-1px); }
.petit-bouton.actif, .petit-bouton[aria-pressed="true"]{ background:linear-gradient(90deg, #ffd45c, #ffb347); color:#3a2600; border-color:transparent; }
@media (min-width:1100px){
  #app > main:not(.accueil), #app > .barre, #app .barre{ max-width:min(1760px, 94vw); }
  #app > main:not(.accueil){ width:min(1760px, 94vw); }
  #app .cartes-anglais{ grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:20px; }
  #app .carte-anglais{ padding:22px 18px; font-size:1.05rem; }
  #app .grille{ grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
  /* Questions : la question à gauche, grande ; les réponses à droite, en grosses touches ; toute la hauteur. */
  #app .piege-ecran{ min-height:calc(100vh - 120px); grid-template-columns:minmax(0, 1.15fr) minmax(460px, 1fr); gap:28px 48px; padding:clamp(28px, 3vw, 56px); }
  #app .piege-haut{ padding:clamp(28px, 3vw, 48px); }
  #app .piege-haut .ami-moyen{ width:clamp(120px, 11vw, 190px); }
  #app .piege-fr{ font-size:clamp(2rem, 2.6vw, 3.1rem); }
  #app .piege-options{ gap:18px; }
  #app .piege-opt{ font-size:clamp(1.2rem, 1.35vw, 1.6rem)!important; padding:24px 28px!important; min-height:92px; }
  #app .piege-retour{ font-size:1.15rem; }
  /* Accueil : les grands boutons sur deux colonnes, sans défiler sur un écran 1080p. */
  #app[data-ecran=accueil] .accueil{ grid-template-columns:1fr 1fr; align-content:center; }
  #app[data-ecran=accueil] .accueil > .gros{ grid-column:auto; width:100%; max-width:none; margin:0; min-height:84px; }
  #app[data-ecran=accueil] .accueil > .gros.defi, #app[data-ecran=accueil] .accueil > section, #app[data-ecran=accueil] .accueil > .installer-appli{ grid-column:1 / -1; }
  /* Coins maths, sciences, anglais : en-tête sur toute la largeur, chapitres en grille large. */
  #app .coin-maths .onglets-niveaux{ justify-content:center; }
  #app .coin-maths h3, #app .coin-anglais h3{ text-align:left; font-size:1.25rem; margin-top:26px; }
  #app .partie{ max-width:min(1760px, 94vw); }
}
@media (min-width:1600px){ body{ font-size:20px; } }

/* v5.60 — clashs : public, séries, riposte d'Ami, finale */
.clash-public{ display:flex; align-items:center; gap:10px; justify-content:center; font-weight:900; margin:6px 0 2px; }
.clash-public .jauge{ display:inline-block; width:min(260px, 50vw); height:12px; border-radius:99px; background:rgba(255,255,255,.12); overflow:hidden; }
.clash-public .jauge span{ display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, #ff6b6b, #ffd45c, #6ee7b7); transition:width .5s; }
.clash-foule{ font-size:1.35rem; font-weight:950; letter-spacing:.02em; color:#ffd45c; text-shadow:0 4px 18px rgba(255,180,60,.45); animation:clash-pop .45s cubic-bezier(.2,1.6,.3,1); }
.clash-foule strong{ display:block; font-size:1rem; color:#fff; }
.clash-riposte{ font-weight:850; font-size:1.1rem; color:#ffe2c4; }
.clash-riposte small{ color:#cfc9f5; font-weight:600; }
.battle-ecran.finale{ box-shadow:0 0 0 2px rgba(255,212,92,.55), 0 26px 80px rgba(255,180,60,.18); }
@keyframes clash-pop{ 0%{ transform:scale(.6); opacity:0 } 70%{ transform:scale(1.12) } 100%{ transform:scale(1); opacity:1 } }
@media(prefers-reduced-motion:reduce){ .clash-foule{ animation:none } .clash-public .jauge span{ transition:none } }
/* v5.64 : choix de la voix d'Ami */
.reglage-voix label{ display:flex; gap:.6em; align-items:center; flex:1; flex-wrap:wrap; }
.reglage-voix select{ flex:1; min-width:12em; max-width:100%; padding:.5em; border-radius:10px; font:inherit; background:#1f1b46; color:#fff; border:1px solid var(--bord); }
.reglage-voix select option, select option{ background:#1f1b46; color:#fff; }
/* v5.65 : sur PC, l'image d'une question tient toujours dans l'écran (plus de montre géante qui oblige à défiler). */
@media (min-width:900px){
  .partie .pic-grande, .partie .pic-moyenne{ width:min(520px, 100%)!important; height:min(38vh, 380px)!important; }
  .partie .pic-carte{ max-height:min(36vh, 360px)!important; }
  .partie .carte{ width:min(400px, 44vh)!important; }
  .partie .cadre-image{ width:min(520px, 100%); max-width:100%; }
  .partie .cadre-image .pic-grande{ width:100%!important; }
  .partie{ min-height:0!important; }
  .scene{ align-content:start!important; }
}
/* v5.67 : choix des graphismes */
.choix-graphismes{ display:flex; gap:8px; flex-wrap:wrap; }
.reglage-graphismes .reglage{ flex-wrap:wrap; gap:10px; }
/* v5.68 : Battle entre potes */
.potes-accueil{ background:linear-gradient(135deg, #ff4e6a, #ff9f43 55%, #ffd23f)!important; color:#2a0a12!important; }
.potes .choix-matiere .choisie{ outline:3px solid #ffd23f; box-shadow:0 0 0 6px rgba(255,210,63,.25), 0 0 30px rgba(255,159,67,.45); }
.potes-fin .podium small{ display:block; font-size:.8rem; opacity:.8; }
.potes select{ font:inherit; font-weight:800; padding:8px 30px 8px 12px; border-radius:12px; border:1px solid var(--bord); background:rgba(255,255,255,.12); color:#fff; }
.potes select option{ color:var(--encre); background:#fff; }
/* v5.74 : les boutons 🔊 🐢 🎤 restent (exception voulue : on garde ce qu'il faut écouter). */
/* v5.75 : accueil simplifié — 4 grandes portes */
.portes{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; margin:14px 0; }
.porte{ position:relative; overflow:hidden; display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; text-align:left;
  min-height:96px; padding:16px 18px; border:0; border-radius:22px; color:#1b1240; font:inherit; cursor:pointer; box-shadow:0 7px 0 rgba(0,0,0,.18), 0 14px 30px rgba(6,5,31,.35);
  transition:transform .15s, filter .15s; }
.porte:hover{ transform:translateY(-3px); filter:brightness(1.07); } .porte:active{ transform:translateY(2px); box-shadow:0 3px 0 rgba(0,0,0,.18); }
.porte-ic{ grid-row:1 / span 2; font-size:2.4rem; line-height:1; filter:drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.porte strong{ font-size:1.3rem; font-weight:1000; } .porte small{ font-size:.85rem; font-weight:800; opacity:.8; }
.porte-mots{ background:linear-gradient(135deg, #7ee8fa, #80ff72); } .porte-maths{ background:linear-gradient(135deg, #b69cff, #6ad7ff); }
.porte-sciences{ background:linear-gradient(135deg, #ffd36b, #ff9a8b); } .porte-battle{ background:linear-gradient(135deg, #ff4e6a, #ffb347); }
@media (max-width:520px){ .portes{ gap:10px; } .porte{ grid-template-columns:1fr; text-align:center; justify-items:center; padding:14px 10px; min-height:120px; }
  .porte-ic{ grid-row:auto; font-size:2.1rem; margin-bottom:4px; } .porte strong{ font-size:1.1rem; } .porte small{ font-size:.74rem; } }
/* v5.75 : résumé de la semaine (parents) et avis sur les vannes */
.semaine-barres{ display:grid; grid-template-columns:repeat(7, 1fr); gap:8px; height:90px; align-items:end; margin:6px 0 12px; }
.jour-barre{ display:grid; grid-template-rows:1fr auto; height:100%; text-align:center; }
.jour-barre i{ align-self:end; display:block; min-height:4px; border-radius:8px 8px 3px 3px; background:linear-gradient(180deg, #2BE0B0, #7B5CFF); }
.jour-barre small{ font-weight:900; opacity:.7; margin-top:4px; }
.avis-vanne{ display:flex; gap:8px; flex-wrap:wrap; margin:4px 0 8px; }
.avis-vanne .plein{ background:#ffd36b; color:#2a2156; }
a.carte-anglais{ text-decoration:none; color:inherit; }
.emoji-titre{ display:inline-block; -webkit-text-fill-color:initial; color:#fff; background:none!important; -webkit-background-clip:border-box; background-clip:border-box; letter-spacing:0; }
html.gfx-ultra main h2 .emoji-titre{ -webkit-text-fill-color:initial; }
/* v5.75 : après une erreur, tout se voit — la bulle au-dessus, puis une rangée de boutons en dessous
   (« Je la garde », « J'ai compris — continuer », « Pas drôle »), sans rien qui se chevauche. */
.apres-erreur{ position:fixed; z-index:9; left:50%; bottom:calc(14px + env(safe-area-inset-bottom)); transform:translateX(-50%);
  display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap; width:min(760px, calc(100vw - 24px)); pointer-events:none; }
.apres-erreur > *{ pointer-events:auto; }
.apres-erreur .continuer-erreur:not([hidden]), .apres-erreur .garder-vanne:not([hidden]), .apres-erreur .pas-drole:not([hidden]){
  position:static!important; inset:auto!important; transform:none!important; margin:0!important; animation:none; }
.apres-erreur .continuer-erreur:not([hidden]){ order:2; flex:0 1 auto; }
.apres-erreur .garder-vanne:not([hidden]){ order:1; } .apres-erreur .pas-drole:not([hidden]){ order:3; }
.partie .bulle.ko, .partie .bulle.ok, .bulle.ko, .bulle.ok{ bottom:calc(86px + env(safe-area-inset-bottom))!important; max-height:calc(46vh)!important; overflow:auto; }
@media (max-width:560px){ .apres-erreur{ gap:8px; } .apres-erreur .continuer-erreur:not([hidden]){ order:0; flex:1 1 100%; }
  .partie .bulle.ko, .bulle.ko{ bottom:calc(126px + env(safe-area-inset-bottom))!important; } }
/* La place pour la bulle : on peut toujours faire défiler jusqu'aux réponses. */
.partie:has(.bulle:not(:empty)){ padding-bottom:calc(220px + env(safe-area-inset-bottom)); }
/* v5.75 : même raison pour le plateau de jeu : pas de contexte 3D qui « capture » la bulle et les boutons fixes. */
.partie, main.partie{ transform-style:flat!important; }
@media (min-width:700px){ .apres-erreur{ flex-wrap:nowrap; } }
/* v8.7 : sur grand écran, « J’ai compris — continuer » tient sur une ligne (sinon il montait sur la fin de la bulle). */
@media (min-width:700px){ .apres-erreur .continuer-erreur:not([hidden]){ white-space:nowrap; flex:0 0 auto; width:auto; } }
.apres-erreur .petit-bouton{ white-space:nowrap; }
/* v5.75 : chapitres de maths rangés en blocs par domaine */
/* v6.90 : colonnes en rem (elles grandissent avec le texte) et auto-fit (les colonnes remplies prennent toute la place, sans colonne vide à droite) */
.domaines{ display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap:16px; margin:12px 0 18px; align-items:start; }
.domaine, .liste-chap, .chap-ligne{ min-width:0; }
.chap span{ min-width:0; overflow-wrap:break-word; hyphens:auto; }
.domaine{ background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14); border-radius:20px; padding:12px 12px 14px; }
.domaine h3{ margin:2px 6px 10px; font-size:1.05rem; display:flex; justify-content:space-between; align-items:center; }
.domaine h3 small{ font-size:.75rem; font-weight:900; opacity:.7; background:rgba(255,255,255,.12); border-radius:20px; padding:2px 9px; }
.liste-chap{ display:grid; gap:7px; }
.chap{ display:flex; justify-content:space-between; align-items:center; gap:10px; width:100%; text-align:left; padding:11px 14px; border-radius:14px;
  border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.08); color:inherit; font:inherit; font-weight:800; cursor:pointer; transition:background .15s, transform .15s; }
.chap:hover{ background:rgba(255,255,255,.16); transform:translateX(3px); }
.chap em{ font-style:normal; font-size:.82rem; opacity:.85; white-space:nowrap; }
.chap.bientot{ opacity:.5; cursor:default; }
/* v5.76 : matières, onglets Réviser / Brevet & bac blancs, notes d'examen */
.onglets-matieres{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:4px 0 16px; }
.onglets-matieres .onglet{ padding:10px 18px; border-radius:999px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); color:inherit; font:inherit; font-weight:900; cursor:pointer; }
.onglets-matieres .onglet.actif{ background:#ffd36b; color:#2a2156; border-color:#ffd36b; }
/* v6.89 : un programme = un pays — rangée d’onglets des pays en haut des matières */
.onglets-pays{ margin:6px 0 14px; }
.onglets-pays .onglet{ padding:8px 14px; }
/* v6.33 : « Ma classe » sur l'écran Matières */
.ma-classe{ display:flex; gap:6px; justify-content:center; align-items:center; flex-wrap:wrap; margin:0 auto 16px; max-width:900px; }
.ma-classe-question{ text-align:center; margin:0 auto 8px; }
.ma-classe .petit-bouton{ min-height:40px; min-width:44px; }
.ma-classe .petit-bouton.actif{ background:#ffd36b; color:#2a2156; border-color:#ffd36b; }
.ma-classe .lien-tout{ background:transparent; text-decoration:underline; }
.onglet.vide{ opacity:.45; }
.note-examen{ font-size:clamp(2rem, 6vw, 3.2rem); font-weight:1000; margin:8px 0; background:linear-gradient(90deg, #ffd36b, #2BE0B0); -webkit-background-clip:text; background-clip:text; color:transparent; }
/* v5.78 : énoncés d'exercices (examens blancs, annales) */
.contexte-exo{ text-align:left; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.15); border-radius:14px; padding:10px 14px; margin:6px 0 12px; line-height:1.5; font-size:.95rem; }
.contexte-exo summary{ cursor:pointer; font-weight:900; }
.contexte-exo p{ margin:8px 0 0; }
.carte-annale{ display:flex; flex-direction:column; gap:6px; }
.lien-officiel{ color:#ffd36b; font-weight:800; font-size:.9rem; text-align:center; }
/* v5.78 : l'énoncé d'un exercice passe AVANT la question ; les longs titres d'annales vont à la ligne au lieu de déborder. */
.piege-ecran .contexte-exo{ grid-area:ctx; }
.piege-ecran:has(.contexte-exo){ grid-template-areas:"cat cat" "ctx ctx" "head opts" "retour retour"; }
#app .piege-ecran{ grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr); }
.piege-cat{ white-space:normal; }
@media (max-width: 760px){
  .piege-ecran, #app .piege-ecran{ grid-template-columns:minmax(0, 1fr); }
  .piege-ecran:has(.contexte-exo){ grid-template-areas:"cat" "ctx" "head" "opts" "retour"; }
}
/* v5.83 : liens officiels en cartes */
a.lien-carte{ text-decoration:none; color:inherit; }
/* v5.91 : la bande d'Ami débarque (3 bonnes d'affilée puis la 4e) */
.bande-potes{display:grid;gap:10px;margin:4px 0 12px}
.bande-entree{font-weight:900;font-size:1.1rem;color:#ffd36e;margin:0}
.pote{display:flex;gap:10px;align-items:flex-start;margin:0;padding:10px 14px;border-radius:18px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.16);animation:pote-arrive .45s cubic-bezier(.2,1.4,.4,1) both}
.pote-ic{font-size:2rem;line-height:1;flex:0 0 auto}
.pote strong{color:#8df5d1;margin-right:4px}
.raccroche{font-weight:800;color:#ffd36e;margin:0 0 8px}
@keyframes pote-arrive{from{opacity:0;transform:translateY(14px) scale(.9)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.pote{animation:none}}
.liens-legaux{text-align:center;font-size:.85rem;opacity:.75;margin:18px 0 4px}
.liens-legaux a{color:inherit}
/* v5.93 : la bande dessinée — elle arrive puis rit doucement (pas d'agitation) */
.pote-ic{width:64px;height:64px;font-size:2rem;display:flex;align-items:center;justify-content:center}
.pote-svg,.pote-img{width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 4px 6px rgba(0,0,0,.3));transform-origin:50% 90%;animation:pote-rit 2.4s ease-in-out .6s 2}
@keyframes pote-rit{0%,100%{transform:none}30%{transform:rotate(-3deg) scale(1.03)}60%{transform:rotate(2deg)}}
@media (prefers-reduced-motion:reduce){.pote-svg,.pote-img{animation:none}}
/* v5.94 : les formules de Plus */
.formules{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:14px 0;width:100%;max-width:640px}
.carte-formule{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 12px;border-radius:20px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.22);color:inherit;text-decoration:none;font:inherit;cursor:pointer}
.carte-formule:hover,.carte-formule:focus-visible{background:rgba(255,211,110,.18);border-color:#ffd36e}
.carte-formule strong{font-size:1.1rem}.prix-formule{font-size:1.35rem;font-weight:900;color:#ffd36e}.carte-formule small{opacity:.85}
/* v5.95 : série en danger, rappels */
.serie-danger{ position:relative; z-index:3; max-width:440px; margin:-30px auto 14px; grid-column:1/-1; padding:10px 14px; border-radius:14px; background:rgba(255,120,60,.16); border:1px solid rgba(255,150,90,.55); color:#ffe2d2; font-weight:800; text-align:center; }
.reglage-rappels select{ background:#1f1b46; color:#fff; border:1px solid var(--bord); border-radius:10px; padding:.4em .6em; font:inherit; }
.serie-danger ~ .gros.defi{ margin-top:0; }
/* v5.96 : Plumo ne saute plus au survol (le survol « ultra » des boutons écrasait son centrage → il partait sur le côté, revenait, repartait…). */
.perchoir .ami-grand, .perchoir .ami-grand:hover, html.gfx-ultra .perchoir .ami-grand:hover{ transform:translateX(-50%) !important; filter:none; }
.ami-grand:hover .ami-3d, .ami-grand:focus-visible .ami-3d{ filter:drop-shadow(0 0 14px rgba(255,226,122,.55)) drop-shadow(0 9px 10px rgba(12,7,35,.35)); }
.ami-grand, .ami-moyen{ transition:none; }
.ami-acc{ filter:drop-shadow(0 3px 3px rgba(40,15,5,.35)); }
/* v5.98 : taille du texte réglable (les tailles sont en rem : tout suit) */
html[data-texte="grand"]{ font-size:112.5%; } html[data-texte="grand"] body{ font-size:1.25rem; }
html[data-texte="tres-grand"]{ font-size:125%; } html[data-texte="tres-grand"] body{ font-size:1.25rem; }
/* v6.0 : tenues de saison sur le Plumo 3D (même repère que le chapeau) */
.ami-acc-bonnet{left:30%;top:-11%;width:38%;transform:rotate(-6deg)}
.ami-acc-fleur{left:30%;top:-11%;width:38%;transform:rotate(-6deg)}
.ami-acc-casquette{left:30%;top:-11%;width:48%;transform:rotate(-6deg)}
.ami-acc-sorciere{left:27%;top:-20%;width:43%;transform:rotate(-6deg)}
/* v6.0 : saison du mois, ligue */
.carte-saison{ display:flex; flex-direction:column; gap:6px; width:100%; max-width:560px; margin:0 auto 12px; padding:10px 14px; border-radius:16px; border:1px solid rgba(255,214,102,.45);
  background:linear-gradient(135deg, rgba(255,183,77,.18), rgba(124,77,255,.18)); color:var(--texte); font:inherit; text-align:left; cursor:pointer; grid-column:1/-1; }
.carte-saison.finie{ border-color:rgba(105,219,124,.7); }
.saison-texte{ font-weight:800; }
.saison-barre{ display:block; height:8px; border-radius:6px; background:rgba(255,255,255,.15); overflow:hidden; }
.saison-barre i{ display:block; height:100%; background:linear-gradient(90deg, #ffd43b, #ff922b); }
.acc.saison{ outline:2px dashed rgba(255,214,102,.5); }
.ligue-classement{ list-style:none; padding:0; max-width:460px; margin:0 auto; }
.ligue-classement li{ display:flex; justify-content:space-between; padding:8px 12px; margin:4px 0; border-radius:12px; background:rgba(255,255,255,.07); }
.ligue-classement li.moi{ background:rgba(255,214,102,.2); font-weight:800; }
.ligue-rappel{ text-align:center; margin:0 0 10px; grid-column:1/-1; }
.chrono-veille{ position:sticky; top:0; z-index:5; text-align:center; font-weight:900; font-size:1.2rem; padding:6px; border-radius:12px; background:rgba(255,120,60,.2); margin:0 auto 8px; max-width:320px; }

/* v6.1 : programme anglais — Times tables check */
.mtc-question{font-size:clamp(2.2rem,9vw,3.6rem);font-weight:800;margin:.4em 0;font-variant-numeric:tabular-nums}
.mtc #mtc-rep{color:#1a1440;background:#fff;font-size:2rem;width:5.5ch;text-align:center;padding:.2em .3em;border-radius:12px;border:2px solid currentColor}
/* v6.22 : la langue apprise se choisit dans « Langues ». */
.choix-langue-apprise{ text-align:center; margin:0 0 14px; }
.choix-langue-apprise label{ display:inline-flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; font-weight:800; color:#C9BFFF; }
.choix-langue-apprise select{ font-size:1rem; font-weight:800; padding:10px 14px; border-radius:14px; border:1px solid var(--bord); background:rgba(255,255,255,.1); color:#fff; }
.choix-langue-apprise select option{ color:#111; }
.porte-prof{ background:linear-gradient(135deg, #7af0c8, #5aa9ff); text-decoration:none; }
.ton-aide{ max-width:640px; margin:4px auto 10px; text-align:center; opacity:.85; }

/* v6.23 : programmes (Python, blocs) affichés ligne par ligne, indentation gardée */
.piege-fr.piege-code{white-space:pre-wrap;font-family:ui-monospace,Menlo,Consolas,monospace;text-align:left;font-size:.72em;line-height:1.4}
/* v6.35 : aide aux devoirs — écran sobre, lisible, sans vanne */
.devoirs textarea, .devoirs select, .devoirs input[type="file"]{ width:100%; box-sizing:border-box; font:inherit; }
.devoirs textarea{ border-radius:12px; padding:10px; }
.devoirs-reponse, .devoirs-suite{ text-align:left; max-width:760px; margin:16px auto; padding:16px 18px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14); }
.devoirs-reponse h3, .devoirs-suite h3, #dev-relu h3{ margin:14px 0 6px; font-size:1.05em; }
.devoirs-liste{ margin:0 0 4px; padding-left:1.4em; line-height:1.5; }
.devoirs-liste li{ margin:4px 0; }
.devoirs select{ color:#1d1640; background:#fff; padding:8px 10px; border-radius:10px; border:1px solid rgba(0,0,0,.2); max-width:420px; }
.devoirs label{ display:block; }
#dev-methode{ text-align:left; max-width:760px; margin:12px auto; padding:14px 18px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14); }
.devoirs textarea{ color:#1d1640; background:#fff; }
/* v6.38 : aide aux devoirs mise en avant en tête de la table des matières */
.devoirs-hero{ display:flex; align-items:center; gap:16px; width:100%; max-width:900px; margin:4px auto 18px; padding:18px 22px; border:0; border-radius:20px; cursor:pointer; text-align:left; font:inherit;
  color:#1d1640; background:linear-gradient(120deg, #ffd36b, #7ff0c8); box-shadow:0 6px 0 rgba(0,0,0,.18); }
.devoirs-hero .ic{ font-size:2.4em; }
.devoirs-hero strong{ display:block; font-size:1.25em; font-weight:900; }
.devoirs-hero small{ display:block; margin-top:4px; font-size:.95em; opacity:.85; }
.devoirs-hero:focus-visible{ outline:3px solid #fff; outline-offset:3px; }
.outils-revision{ margin-top:22px; }
.jeux-lien{ text-align:center; margin:26px 0 8px; }

/* v6.44 : la page d'accueil prend toute la largeur de l'écran, liens légaux en bas */
#app[data-ecran=bienvenue] > section{ width:100%; max-width:none; margin:0; }
#app[data-ecran=bienvenue] .ciel{ min-height:calc(100vh - 56px); }
.liens-legaux-accueil{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px 28px; padding:16px 20px; background:#fff; box-shadow:0 -6px 24px rgba(0,0,0,.18); }
.liens-legaux-accueil a{ color:#4B5563; font-weight:800; font-size:.95rem; text-decoration:none; padding:4px 2px; }
.liens-legaux-accueil a:hover,.liens-legaux-accueil a:focus-visible{ color:#1B1446; text-decoration:underline; }
/* v6.40 : page d'accueil en plein écran (Plumo, langue, programme, bouton « Entrer ») — future page du profil et du mot de passe */
#app[data-ecran=bienvenue] .ciel{ border-radius:0; padding-bottom:0; display:flex; flex-direction:column; }
#app[data-ecran=bienvenue] .ciel-in{ margin:auto; padding-bottom:120px; }
#app[data-ecran=bienvenue] .perchoir{ transform:scale(1.2); margin:30px auto 34px; }
#app[data-ecran=bienvenue] .collines{ height:150px; }
.entrer-zone{ margin:26px 0 0; }
.gros.entrer{ display:inline-flex; align-items:center; gap:12px; width:auto; min-width:240px; justify-content:center; font-size:1.5rem; padding:18px 44px; border-radius:999px;
  background:linear-gradient(135deg, #FFD36E, #7EE0B5); color:#1B1446; box-shadow:0 10px 30px rgba(0,0,0,.35); }
.gros.entrer:hover,.gros.entrer:focus-visible{ transform:translateY(-2px); box-shadow:0 14px 36px rgba(0,0,0,.4); }
@media (min-width:1100px){ #app[data-ecran=bienvenue] .perchoir{ transform:scale(1.5); margin:60px auto 56px; } #app[data-ecran=bienvenue] .ciel h1{ font-size:clamp(4rem, 6vw, 6rem); } }
@media (prefers-reduced-motion:reduce){ .gros.entrer:hover,.gros.entrer:focus-visible{ transform:none; } }

/* v6.47 : le défi rétro (années 70) */
.retro-ecran .retro-avert{ opacity:.8; font-style:italic; }
.retro-programme .retro-bloc{ background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:18px; padding:14px 18px; margin:14px 0; text-align:left; }
.retro-programme .retro-bloc h3{ margin:0 0 8px; }
.retro-programme .retro-bloc ul{ margin:0; padding-left:1.2em; }
.retro-programme .retro-bloc li{ margin:6px 0; line-height:1.45; }
.retro-programme .retro-sources a{ color:inherit; text-decoration:underline; }
.retro-fin .gros-score{ font-size:clamp(2.4rem, 8vw, 3.4rem); margin:.2em 0; }

/* v6.54 : écran « 🎮 Jeux et entraînement » (ancien accueil, ouvert depuis la table des matières) */
.accueil.jeux-ecran .jeux-titre{ text-align:center; font-size:clamp(1.6rem, 3vw, 2.2rem); margin:4px 0 14px; }
@media (min-width:900px){
  #app[data-ecran=jeux] .accueil.jeux-ecran{ display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; align-content:start; }
  #app[data-ecran=jeux] .accueil.jeux-ecran > *{ grid-column:1 / -1; margin:0; max-width:none; }
  #app[data-ecran=jeux] .accueil.jeux-ecran > .carte-jour{ grid-column:1; }
  #app[data-ecran=jeux] .accueil.jeux-ecran > .astuce-jour{ grid-column:2; }
  #app[data-ecran=jeux] .raccourcis{ grid-template-columns:repeat(5, 1fr); }
}

/* v6.54 : 📖 « Je n'ai pas compris la leçon » */
.chap-ligne{ display:flex; gap:6px; align-items:stretch; }
.chap-ligne .chap{ flex:1; min-width:0; }
.chap-lecon{ flex:0 0 auto; width:44px; border-radius:12px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.07); color:inherit; font-size:1.15rem; cursor:pointer; }
.chap-lecon:hover, .chap-lecon:focus-visible{ background:rgba(255,255,255,.16); }
.lecon-ecran .lecon-chapitre{ text-align:center; margin:0 0 6px; }
.lecon-bloc{ background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:16px; padding:12px 18px; margin:12px 0; text-align:left; }
.lecon-bloc h3{ margin:4px 0 8px; font-size:1.1rem; }
.lecon-bloc ul{ margin:0; padding-left:20px; }
.lecon-bloc li{ margin:6px 0; line-height:1.45; }
.lecon-bloc textarea{ width:100%; box-sizing:border-box; border-radius:12px; padding:10px; font:inherit; margin-top:6px; }
.lecon-q-eleve{ font-style:italic; opacity:.9; }
.lecon-verif, .lecon-propose{ text-align:center; margin-top:14px; }

/* v6.71 : plus d'espace sur les grands écrans — écrans de fin (trimestre, examen, révision) et correction en cartes. */
/* Les très grands écrans (2 560 px et plus) n'étaient remplis qu'aux deux tiers : la limite de 1 760 px saute, on garde une marge de 2 %. */
@media (min-width:1100px){
  #app > main:not(.accueil), #app > .barre, #app .barre, #app .partie{ max-width:96vw; }
  #app > main:not(.accueil){ width:96vw; }
  #app .pieges-intro{ margin-inline:auto; max-width:min(1100px,100%); }
  #app .devoirs-hero{ max-width:min(1200px,100%); }
  #app .ma-classe{ max-width:none; }
}
@media (min-width:2000px){
  #app .cartes-anglais{ grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:24px; }
  #app .carte-anglais{ font-size:1.15rem; }
}
.trimestre-fin .pieges-cats.bilan-chap{max-width:none;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.trimestre-fin .pieges-cats.bilan-chap li{display:block;line-height:1.4}
.trimestre-fin .pieges-cats.bilan-chap li.rate{border-color:rgba(255,110,110,.45)}
.trimestre-fin .pieges-cats.bilan-chap li.ok{border-color:rgba(110,230,160,.45)}
.correction-controle{list-style:none;counter-reset:corr;padding:0;margin:12px 0 22px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));gap:12px;text-align:left}
.correction-controle li{counter-increment:corr;position:relative;padding:14px 16px 12px 52px;border-radius:15px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.065)}
.correction-controle li::before{content:counter(corr);position:absolute;left:14px;top:13px;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:.9rem;background:rgba(255,255,255,.14)}
.correction-controle li p{margin:4px 0;line-height:1.4}
.correction-controle li p:first-child{font-weight:600;margin-bottom:8px}
.trimestre-fin .liste-chap{max-width:none}
.reponse-libre{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center;margin:14px auto}
.reponse-libre input{flex:1 1 260px;max-width:440px;font:inherit;font-size:1.15rem;padding:12px 14px;border-radius:14px;border:2px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit}
.reponse-libre label{flex-basis:100%;font-weight:600}
.signalements ol{text-align:left}
/* v6.73 : études de documents */
.liste-documents{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:14px;margin:16px 0}
.carte-document{display:flex;flex-direction:column;gap:6px;text-align:left;font:inherit;color:inherit;cursor:pointer;padding:16px 18px;border-radius:18px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.07);transition:transform .15s,background .15s}
.carte-document:hover{transform:translateY(-2px);background:rgba(255,255,255,.12)}
.carte-document small{opacity:.8;line-height:1.35}.carte-document em{font-style:normal;font-weight:800;opacity:.9}
.contexte-exo p{white-space:normal}
/* v6.74 : confiance avant de répondre */
.confiance{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;margin:6px 0 10px;font-size:.95rem}
.confiance span{opacity:.85}
.conf-alerte{font-weight:800;color:#ffd0a0}.conf-doute{font-weight:700;color:#bfe8ff}

/* v6.75 : grands écrans d'ordinateur — tout grandit (textes, cartes, boutons). Rien ne change sous 1 400 px : téléphones et tablettes intacts.
   Seulement si l'élève n'a pas choisi lui-même une taille de texte (Réglages → Taille du texte). */
@media (min-width:1400px){
  html:not([data-texte]){ font-size:112.5%; }
  html:not([data-texte]) body{ font-size:1.25rem; }
  #app .carte-anglais small{ font-size:.92em; line-height:1.4; }
  #app .pieges-intro{ font-size:1.1em; }
}
@media (min-width:1800px){
  html:not([data-texte]){ font-size:125%; }
  html:not([data-texte]) body{ font-size:1.3rem; }
  #app .cartes-anglais{ grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:22px; }
}
@media (min-width:2300px){
  html:not([data-texte]){ font-size:140%; }
  html:not([data-texte]) body{ font-size:1.4rem; }
  #app .cartes-anglais{ grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:26px; }
}
/* v6.78 : section internationale — plan à cocher, grille d'oral */
.si-plan{text-align:left;line-height:1.5;padding-left:1.4em}
.si-plan li{margin:6px 0}
.si-examens progress{width:100%;height:12px}
.si-grille{display:grid;gap:10px;max-width:640px;margin:12px auto;text-align:left}
.si-grille fieldset{border:1px solid rgba(255,255,255,.18);border-radius:12px;padding:8px 12px}
.si-grille label{margin-right:12px;cursor:pointer}
.si-oeuvres{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:8px;text-align:left}
.si-oeuvres input{width:100%;box-sizing:border-box;font:inherit;padding:6px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit}

/* v7.3 : cahier de leçons et contrôle construit par l'élève */
.cahier-ecran textarea, .cahier-ecran input[type="text"], .cahier-ecran input:not([type]){ width:100%; box-sizing:border-box; }
.cahier-choix{ border:1px solid rgba(255,255,255,.18); border-radius:16px; padding:10px 14px; }
.cahier-choix label.cahier-coche{ display:flex; align-items:flex-start; gap:10px; margin:8px 0; font-size:1rem; font-weight:600; line-height:1.35; text-align:left; }
/* v10.62 bis : la classe « case » (cases du jeu de lettres, 1.9rem) donnait des libellés géants qui se chevauchaient. */
.cahier-choix label.cahier-coche input{ width:22px!important; height:22px; flex:0 0 22px; margin:2px 0 0; padding:0; accent-color:var(--menthe, #3ee0b0); }
.cahier-ligne{ display:flex; gap:8px; align-items:stretch; list-style:none; }
.cahier-ligne .chap{ flex:1; min-width:0; }

/* v7.6 : sujet du bac de français — lire, puis choisir commentaire ou dissertation */
.sujet-eaf .sujet-bloc{ text-align:left; }
.sujet-eaf .texte-sujet{ margin:10px 0; padding:12px 16px; border-left:4px solid rgba(110,231,183,.7); background:rgba(255,255,255,.05); border-radius:12px; line-height:1.6; }
.sujet-eaf .sujet-dis{ margin:12px 0; padding:10px 14px; border:1px solid rgba(255,255,255,.15); border-radius:14px; }

/* v7.7 : rédiger sa copie et la faire corriger */
.copie-ecran textarea{ width:100%; box-sizing:border-box; font-size:1rem; line-height:1.55; }
.copie-ecran .copie-verif{ list-style:none; padding:0; }
.copie-ecran .copie-verif li{ margin:10px 0; padding:10px 14px; border-radius:14px; background:rgba(255,255,255,.05); text-align:left; }
.copie-ecran .copie-verif li.ok{ border-left:4px solid rgba(110,231,183,.8); }
.copie-ecran .copie-verif li.ko{ border-left:4px solid rgba(251,191,36,.85); }
.copie-ecran .copie-bareme{ width:100%; border-collapse:collapse; text-align:left; }
.copie-ecran .copie-bareme th, .copie-ecran .copie-bareme td{ padding:6px 8px; vertical-align:top; }

/* v7.9 : conditions réelles d'examen */
.mode-examen{ margin:8px auto; max-width:760px; }
.releve-examen{ text-align:left; }
.releve-examen details{ margin:8px 0; padding:8px 12px; border-radius:12px; background:rgba(255,255,255,.05); }
/* v8.4 : défi rétro étoffé — dictée, récompenses, duel */
.retro-ecran h3{ margin:18px 0 6px; }
.retro-resume{ margin:6px 0 4px; }
.retro-dictee .dictee-copie{ width:100%; box-sizing:border-box; font:inherit; font-size:1.1rem; line-height:1.6; padding:12px; border-radius:14px; border:2px solid rgba(255,255,255,.25); background:rgba(255,255,255,.95); color:#1d1d1d; }
.dictee-correction{ text-align:left; line-height:2; font-size:1.1rem; background:rgba(255,255,255,.06); border-radius:14px; padding:12px 16px; margin:12px 0; }
.dictee-correction span{ padding:1px 3px; border-radius:6px; }
.dictee-correction .d-ok{ color:#9be59b; }
.dictee-correction .d-demi{ background:rgba(255,170,40,.25); }
.dictee-correction .d-faute{ background:rgba(255,80,80,.28); }
.dictee-correction .d-oubli{ text-decoration:underline wavy; text-underline-offset:4px; background:rgba(255,80,80,.18); }
.dictee-correction .d-trop{ opacity:.8; }
.dictee-correction s{ opacity:.75; font-size:.9em; }
.retro-recompense{ margin:10px auto; padding:8px 14px; border-radius:14px; background:rgba(255,215,0,.12); max-width:34rem; }
.retro-images{ display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:10px; }
.retro-image{ text-align:center; padding:10px 6px; border-radius:14px; background:rgba(255,255,255,.08); }
.retro-image .ic{ display:block; font-size:2rem; }
.retro-image.cachee{ opacity:.45; }
.retro-duel input{ font:inherit; padding:6px 10px; border-radius:10px; border:1px solid rgba(255,255,255,.3); }
.duel-scores{ display:flex; gap:24px; justify-content:center; flex-wrap:wrap; font-size:1.2rem; }

/* v9.0 : camp d'entraînement et fiches de cours */
.camp-grade { background: rgba(255,255,255,.08); border: 2px solid var(--bord, rgba(255,255,255,.17)); color: var(--texte, #F5F2FF); border-radius: 14px; padding: .6rem 1rem; margin: .5rem 0 1rem; }
.camp-grade p { margin: .3rem 0; }
.camp-grade .petit { color: var(--doux, #B8B0E8); }
.camp-rebours { font-weight: 700; }
/* Les étapes portent déjà leur numéro et leur case : pas de puces, et la liste reste groupée au centre, alignée à gauche. */
.camp-mission { list-style: none; display: inline-block; text-align: left; margin: .25rem auto; padding: 0; line-height: 1.8; }
.camp-mission li.fait { opacity: .7; }
.fiche-cours h3 { margin: 1rem 0 .3rem; }
.fiche-cours ul, .fiche-cours ol { padding-left: 1.3rem; line-height: 1.55; text-align: left; }
.vanne-fiche { font-style: italic; margin-top: 1rem; }
.liste-notions { list-style: none; padding: 0; }
.liste-notions li { margin: .3rem 0; }

/* v9.2 : corrigé des séries d'examen */
.corrige-examen { padding-left: 1.3rem; text-align: left; }
.corrige-examen li { margin: .8rem 0; }
.corrige-examen p { margin: .15rem 0; }

/* v10.3 : Grand oral blanc */
.grand-oral-ecran textarea { width: 100%; max-width: 40rem; font: inherit; padding: .5rem; border-radius: .5rem; }
.grand-oral-ecran .go-support { white-space: pre-wrap; font: inherit; background: rgba(255,255,255,.08); color: var(--texte, #F5F2FF); text-align: left; padding: .75rem; border-radius: .5rem; max-width: 40rem; margin: .5rem auto; }
.grand-oral-ecran .go-alerte { font-weight: 600; }
.grand-oral-ecran .go-grille fieldset { margin: .5rem 0; border-radius: .5rem; border: 2px solid var(--bord, rgba(255,255,255,.17)); text-align: left; }
.grand-oral-ecran .go-grille label { display: inline-block; margin: .25rem .75rem .25rem 0; }

/* v10.5 : Plumo vivant — respiration plus visible, gestes au repos tirés au hasard (js/plumo-vivant.js), regard qui suit le pointeur. */
@keyframes ami3d-flotte{
  0%,100%{transform:translateY(0) scale(1)}
  30%{transform:translateY(-4px) scale(1.02,1.03)}
  60%{transform:translateY(-1px) scale(1.01)}
}
.ami-3d-corps{transform-origin:50% 88%;will-change:transform}
.ami-3d{transition:transform .35s ease-out}
.ami-vit-regarde{animation:ami-regarde 1.6s ease-in-out}
.ami-vit-penche{animation:ami-penche 1.6s ease-in-out}
.ami-vit-sautille{animation:ami-sautille 1.2s cubic-bezier(.3,1.4,.6,1)}
.ami-vit-dandine{animation:ami-dandine 1.6s ease-in-out}
.ami-vit-gonfle{animation:ami-gonfle 1.4s ease-in-out}
.ami-vit-hoche{animation:ami-hoche 1.2s ease-in-out}
.ami-vit-tourne{animation:ami-tourne 1.6s ease-in-out}
.ami-vit-chatouille{animation:ami-chatouille .9s ease-in-out}
@keyframes ami-regarde{0%,100%{transform:none}25%{transform:rotateY(-24deg) translateX(-3px)}60%{transform:rotateY(22deg) translateX(3px)}}
@keyframes ami-penche{0%,100%{transform:none}35%,65%{transform:rotate(-12deg)}}
@keyframes ami-sautille{0%,100%{transform:none}20%{transform:scale(1.06,.92)}45%{transform:translateY(-16px) scale(.96,1.05)}70%{transform:translateY(0) scale(1.05,.95)}85%{transform:translateY(-4px)}}
@keyframes ami-dandine{0%,100%{transform:none}20%{transform:rotate(-7deg) translateX(-4px)}40%{transform:rotate(6deg) translateX(4px)}60%{transform:rotate(-5deg) translateX(-3px)}80%{transform:rotate(3deg)}}
@keyframes ami-gonfle{0%,100%{transform:none}40%,60%{transform:scale(1.09,1.06)}}
@keyframes ami-hoche{0%,100%{transform:none}20%,60%{transform:rotateX(18deg) translateY(2px)}40%,80%{transform:rotateX(-6deg)}}
@keyframes ami-tourne{0%,100%{transform:none}50%{transform:rotateY(180deg)}}
@keyframes ami-chatouille{0%,100%{transform:none}15%{transform:rotate(-10deg) scale(1.05)}30%{transform:rotate(9deg)}45%{transform:rotate(-7deg) translateY(-6px)}60%{transform:rotate(5deg)}75%{transform:rotate(-3deg)}}
.ami-3d-fete .ami-3d-corps{animation:ami-sautille 1s cubic-bezier(.3,1.4,.6,1) 2}
.ami-3d-triste .ami-3d-corps{animation:ami-penche 1.4s ease-in-out}
@media (prefers-reduced-motion: reduce){
  .ami-3d-wrap,.ami-3d-wrap::before,.ami-3d-corps,[class*="ami-vit-"]{animation:none!important}
  .ami-3d{transform:none!important;transition:none}
}
html[data-facile] .ami-3d-wrap,html[data-facile] .ami-3d-corps,html[data-facile] [class*="ami-vit-"]{animation:none!important}

/* v10.6.1 : écran de question rangé — chrono en haut à droite, « Sûr(e) / Pas sûr(e) » sous la question,
   réponse écrite à la place des choix. Avant, ces trois éléments se plaçaient au hasard dans la grille. */
#app .piege-ecran, .piege-ecran{ grid-template-areas:"cat chrono" "head opts" "conf opts" "aide opts" "retour retour"; }
#app .piege-ecran:has(.contexte-exo), .piege-ecran:has(.contexte-exo){ grid-template-areas:"cat chrono" "ctx ctx" "head opts" "conf opts" "aide opts" "retour retour"; }
.piege-ecran .chrono-veille{ grid-area:chrono; justify-self:end; align-self:center; margin:0; position:static; }
.piege-ecran .confiance{ grid-area:conf; align-self:start; justify-content:flex-start; margin:0; }
.piege-ecran .reponse-libre{ grid-area:opts; align-self:center; justify-content:flex-start; margin:0; width:100%; }
.piege-ecran .reponse-libre label{ font-size:1.15rem; }
.piege-ecran .reponse-libre .libre-aide{ flex-basis:100%; margin:-4px 0 0; font-size:.95rem; opacity:.85; }
@media (max-width: 760px){
  #app .piege-ecran, .piege-ecran{ grid-template-areas:"cat" "chrono" "head" "conf" "aide" "opts" "retour"; }
  #app .piege-ecran:has(.contexte-exo), .piege-ecran:has(.contexte-exo){ grid-template-areas:"cat" "chrono" "ctx" "head" "conf" "aide" "opts" "retour"; }
  .piege-ecran .chrono-veille{ justify-self:center; }
}
.piege-ecran .aide-exo{ grid-area:aide; align-self:start; }
.aide-exo-texte{ margin-top:10px; padding:14px 18px; border-radius:18px; border:1px solid rgba(255,220,120,.35); background:rgba(255,220,120,.08); text-align:left; line-height:1.5; }
.aide-exo-texte ul,.aide-exo-texte ol{ margin:6px 0 8px; padding-left:22px; }
.aide-exo-texte li{ margin:4px 0; }
.aide-exo-titre{ font-weight:800; margin:0 0 6px; }
.piege-ecran .reponse-libre, .piege-ecran .piege-options{ align-self:start; }

/* v10.9 : bandeau « nouvelle version prête » (hors de #app : il reste affiché d'un écran à l'autre). */
.maj-prete{ position:fixed; left:50%; bottom:calc(16px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%); z-index:9999; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px;
  max-width:calc(100% - 24px); padding:10px 16px; border-radius:16px; background:#2b2167; color:#fff; border:1px solid rgba(255,255,255,.25); box-shadow:0 10px 30px rgba(0,0,0,.35); font-weight:600; }
/* v10.10 : corrigé type et barème après la vérification d'une copie. */
.corrige-type{ margin:18px 0; padding:14px 18px; border-radius:18px; border:1px solid rgba(120,220,170,.4); background:rgba(120,220,170,.08); text-align:left; line-height:1.5; }
.corrige-type summary{ font-weight:800; cursor:pointer; }
.corrige-type h3{ margin:14px 0 4px; font-size:1.02rem; }
.corrige-type ul{ margin:4px 0; padding-left:22px; }
/* v10.12 : réécriture corrigée et grille d'auto-évaluation. */
.reecriture mark.reec-faux{ background:rgba(255,90,90,.35); color:inherit; border-radius:4px; padding:0 2px; text-decoration:line-through; }
.reecriture mark.reec-manque{ background:rgba(255,210,90,.4); color:inherit; border-radius:4px; padding:0 2px; font-weight:700; }
.reec-eleve,.reec-attendu{ line-height:1.8; font-size:1.05rem; text-align:left; }
.grille-auto{ margin:18px 0; padding:14px 18px; border-radius:18px; border:1px solid rgba(160,170,255,.4); background:rgba(160,170,255,.08); text-align:left; }
.grille-auto ul{ list-style:none; padding:0; margin:8px 0; }
.grille-auto li{ margin:6px 0; }
.grille-auto summary{ font-weight:800; cursor:pointer; }
/* v10.14 : « Pourquoi pas les autres propositions ? » dans la correction. */
.pourquoi-pas{ margin:10px 0; text-align:left; }
.pourquoi-pas summary{ cursor:pointer; font-weight:700; }
.pourquoi-pas ul{ margin:6px 0; padding-left:22px; }
.pourquoi-pas li{ margin:4px 0; }
/* v10.15 : progression par matière (Espace parents). */
.tableau-progression{ width:100%; border-collapse:collapse; margin:10px 0; text-align:left; font-size:.95rem; }
.tableau-progression th,.tableau-progression td{ padding:8px 10px; border-bottom:1px solid rgba(255,255,255,.12); vertical-align:middle; }
.tableau-progression .detail-prog td{ font-size:.88rem; opacity:.9; padding-top:2px; }
.jauge-prog{ display:inline-block; width:70px; height:8px; border-radius:6px; background:linear-gradient(90deg,#3ddc97 var(--p),rgba(255,255,255,.15) var(--p)); vertical-align:middle; }
/* v10.25 : accueil, bloc « Jeux et entraînement » — la carte de saison et l’alerte de série ne se chevauchent plus
   (l’ancienne marge négative de .serie-danger la faisait remonter sur la carte de saison) ; même largeur, texte plus sobre. */
.jeux-matieres .carte-saison, .jeux-matieres .serie-danger{ max-width:620px; width:100%; box-sizing:border-box; font-size:1rem; line-height:1.35; }
.jeux-matieres .serie-danger{ margin:0 auto 12px; }
.jeux-matieres .carte-saison{ margin:4px auto 10px; }
/* v10.26 : code commenté dans les fiches de cours (NSI) */
.code-fiche{ white-space:pre; overflow-x:auto; text-align:left; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.85em; line-height:1.45; background:rgba(0,0,0,.28); border:1px solid rgba(255,255,255,.14); border-radius:10px; padding:.7rem .9rem; margin:.3rem 0 .8rem; color:#e9e6ff; }

/* v10.53 — coach du jour (moteur adaptatif) en haut de la table des matières */
.coach-du-jour{width:100%;max-width:900px;margin:0 auto 18px;padding:14px 18px;border:1px solid rgba(255,255,255,.22);border-radius:20px;text-align:left;
  background:linear-gradient(135deg,rgba(79,216,255,.14),rgba(139,108,255,.18));box-shadow:0 8px 24px rgba(8,4,35,.16)}
.coach-du-jour h3{margin:0 0 6px}
.coach-ecran{padding-top:12px}
.coach-chiffres{font-weight:800;margin:4px 0}
.coach-plan{list-style:none;margin:8px 0;padding:0;display:grid;gap:8px}
.coach-plan .chap{width:100%;display:flex;justify-content:space-between;gap:12px;text-align:left}
.coach-plan .chap em{font-style:normal;font-size:.9rem;opacity:.9;white-space:nowrap}
@media(max-width:520px){.coach-du-jour{border-radius:14px;padding:12px}.coach-plan .chap{flex-direction:column;gap:2px}.coach-plan .chap em{white-space:normal}}

/* v10.54 — carnet de notes */
.carnet-notes .onglets-periode{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.carnet-notes .onglets-periode .actif{background:var(--accent,#ffd84d);color:#1d1b3a}
.carnet-notes .note-puce{display:inline-flex;align-items:center;gap:4px;margin:2px 4px 2px 0;padding:2px 6px;border-radius:10px;background:rgba(255,255,255,.1)}
.carnet-notes .formulaire-note{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:flex-end}
.carnet-notes .formulaire-note label{display:flex;flex-direction:column;gap:2px}
/* v10.74 : sur téléphone, le carnet ne déborde plus à droite (liste des matières aux noms longs, champ de fichiers, tableau) */
.carnet-notes{max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.carnet-notes .domaine{min-width:0;max-width:100%;box-sizing:border-box}
.carnet-notes .formulaire-note label{min-width:0;max-width:100%}
.carnet-notes .formulaire-note label:has(select),.carnet-notes .formulaire-note label:has(#note-titre){flex:1 1 100%}
.carnet-notes select{width:100%;max-width:100%;box-sizing:border-box;text-overflow:ellipsis}
.carnet-notes input[type=file]{max-width:100%;font-size:.9rem}
.carnet-notes .tableau-progression{table-layout:fixed}
.carnet-notes .tableau-progression th,.carnet-notes .tableau-progression td{overflow-wrap:anywhere}
:where(select){max-width:100%}
/* v10.57 : champs lisibles (avant : fond blanc et texte clair) */
.carnet-notes select,.carnet-notes input:not([type=file]):not(.champ-court){font:inherit;font-size:1.1rem;padding:8px;border-radius:10px;border:2px solid rgba(255,255,255,.25);background:rgba(0,0,0,.25);color:inherit;color-scheme:dark}
.carnet-notes select option{background:#1d1640;color:#fff}
.carnet-notes textarea{width:100%}
/* v10.60 — photos de la leçon (cahier) ; listes et champs lisibles partout (texte clair sur fond sombre) */
:where(select){ background-color:#1f1b46; color:#fff; border:1px solid var(--bord); border-radius:10px; padding:.45em .6em; }
:where(input:not([type]), input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="search"], input[type="tel"]){ background-color:#1f1b46; color:#fff; border:1px solid var(--bord); border-radius:10px; padding:.45em .6em; color-scheme:dark; }
.cahier-ecran select, .cahier-ecran textarea, .cahier-ecran input:not([type="file"]):not([type="checkbox"]):not([type="radio"]){ width:100%; box-sizing:border-box; font:inherit; background:rgba(0,0,0,.25); color:#fff; border:2px solid rgba(255,255,255,.25); border-radius:12px; padding:10px; color-scheme:dark; }
.cahier-ecran select option{ background:#1d1640; color:#fff; }
.bouton-fichier{ position:relative; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.bouton-fichier input[type="file"]{ position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.cahier-photos-liste{ display:grid; grid-template-columns:repeat(auto-fill, minmax(110px, 1fr)); gap:10px; margin:10px 0; }
.cahier-photo{ margin:0; text-align:center; }
.cahier-photo-voir{ padding:0; border:2px solid rgba(255,255,255,.25); border-radius:10px; overflow:hidden; background:none; width:100%; aspect-ratio:3/4; }
.cahier-photo-voir img{ width:100%; height:100%; object-fit:cover; display:block; }
.cahier-pdf{ display:flex; align-items:center; justify-content:center; font-size:2.5rem; aspect-ratio:3/4; border:2px dashed rgba(255,255,255,.3); border-radius:10px; }
.cahier-photo figcaption{ font-size:.85rem; margin-top:4px; }
.cahier-photo-grande{ position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.9); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:12px; }
.cahier-photo-grande img{ max-width:100%; max-height:85vh; object-fit:contain; border-radius:8px; }
/* v10.66 : vanne de Plumo quand on choisit la lecture renforcée. */
.cahier-vanne:not(:empty){ margin:10px 0; padding:10px 14px; border-radius:14px; background:rgba(255,214,102,.12); border:1px solid rgba(255,214,102,.35); color:#ffe8a8; font-weight:700; }
/* v10.76 : en spécialité, les outils de la matière viennent après les chapitres */
.matiere-ecran .outils-matiere{ margin:22px 0 6px; text-align:center; }
/* v10.84 : réglage du chrono avant la 1re question (durée habituelle, temps national, tiers-temps ou sans chrono) */
#app .piege-ecran:has(.chrono-reglage), .piege-ecran:has(.chrono-reglage){ grid-template-areas:"cat chrono" "regl regl" "head opts" "conf opts" "aide opts" "retour retour"; }
#app .piege-ecran:has(.chrono-reglage):has(.contexte-exo), .piege-ecran:has(.chrono-reglage):has(.contexte-exo){ grid-template-areas:"cat chrono" "regl regl" "ctx ctx" "head opts" "conf opts" "aide opts" "retour retour"; }
.piege-ecran .chrono-reglage{ grid-area:regl; display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; }
.piege-ecran .chrono-reglage .petit-bouton[aria-pressed="true"]{ outline:3px solid currentColor; font-weight:700; }
.piege-ecran .chrono-reglage p{ flex-basis:100%; margin:2px 0 0; }
@media (max-width: 760px){
  #app .piege-ecran:has(.chrono-reglage), .piege-ecran:has(.chrono-reglage){ grid-template-areas:"cat" "chrono" "regl" "head" "conf" "aide" "opts" "retour"; }
  #app .piege-ecran:has(.chrono-reglage):has(.contexte-exo), .piege-ecran:has(.chrono-reglage):has(.contexte-exo){ grid-template-areas:"cat" "chrono" "regl" "ctx" "head" "conf" "aide" "opts" "retour"; }
}
/* v10.85 : calculatrice et brouillon à côté de la question */
.aide-exo .calculette,.aide-exo .brouillon-exo{ margin-top:10px; padding:12px 14px; border-radius:18px; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.06); text-align:left; }
.calculette label{ display:flex; gap:8px; align-items:center; font-weight:700; }
.calculette input{ flex:1; min-width:0; font-size:1.15rem; padding:8px 10px; border-radius:12px; }
.calc-touches{ display:grid; grid-template-columns:repeat(4, minmax(44px, 1fr)); gap:6px; margin-top:8px; }
.calc-touches .petit-bouton{ min-height:44px; font-size:1.1rem; }
.calc-touches .plein{ grid-column:span 4; }
.calc-res{ margin:8px 0 0; font-size:1.2rem; font-weight:800; min-height:1.4em; }
.brouillon-exo textarea{ width:100%; box-sizing:border-box; font-size:1rem; line-height:1.5; padding:10px; border-radius:12px; resize:vertical; }
.brouillon-exo .petit{ margin:6px 0 0; }
/* v10.86 : petites figures des exercices (js/figures.js) — sur fond « papier », lisibles en thème clair comme sombre. */
.fig-exo{ margin:10px 0 0; padding:8px; max-width:300px; border-radius:14px; background:#fffdf7; color:#1d2433; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.fig-svg{ display:block; width:100%; height:auto; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; font-size:11px; }
.fig-svg line,.fig-svg path,.fig-svg polyline,.fig-svg circle,.fig-svg ellipse,.fig-svg polygon,.fig-svg rect{ stroke:currentColor; stroke-width:1.5; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.fig-svg text{ fill:currentColor; stroke:none; }
.fig-svg .fig-forme{ fill:rgba(31,111,235,.08); }
.fig-svg .fig-point,.fig-svg .fig-fleche{ fill:currentColor; stroke:none; }
.fig-svg .fig-nom{ font-weight:700; font-size:12px; font-style:italic; }
.fig-svg .fig-mesure{ fill:#1f5fbf; font-size:11px; }
.fig-svg .fig-inconnue{ fill:#c0392b; font-weight:700; font-size:12px; }
.fig-svg .fig-grad{ font-size:9px; opacity:.8; }
.fig-svg .fig-symbole{ font-size:11px; font-weight:700; }
.fig-svg .fig-marque{ stroke-width:1.2; }
.fig-svg .fig-grille{ stroke:rgba(29,36,51,.12); stroke-width:.8; }
.fig-svg .fig-fond{ stroke:none; }
.fig-svg .fig-axe{ stroke-width:1.2; }
.fig-svg .fig-courbe{ stroke:#1f6feb; stroke-width:2.2; }
.fig-svg .fig-tangente{ stroke:#c0392b; stroke-width:1.6; }
.fig-svg .fig-pointille,.fig-svg .fig-cache{ stroke-dasharray:4 3; stroke-width:1.1; }
.fig-svg .fig-droite{ stroke-width:1.2; }
.fig-svg .fig-aire{ fill:rgba(31,111,235,.22); stroke:none; }
.fig-svg .fig-barre{ fill:rgba(31,111,235,.55); stroke:#1f5fbf; }
.fig-svg .fig-vide{ fill:#fffdf7; }
.fig-svg .fig-vecteur{ stroke:#c0392b; stroke-width:2; }
.fig-svg .fig-vecteur + .fig-fleche{ fill:#c0392b; }
@media (prefers-reduced-motion:no-preference){ .fig-exo{ animation:fig-entree .25s ease-out; } }
@keyframes fig-entree{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }
