/* Leçons futées — Démo sans compte (/essai/, 2026-11-24) : animation d'ouverture, bandeau et carte de fin.
   Couleurs du mode enfant « Nuit étoilée » (enfant-v2.css) : nuit #120F38 → #3A2A7E, jaune #FFCC3F. */
html.de-ouverte, html.de-ouverte body{overflow:hidden}
.de-anim{position:fixed;inset:0;z-index:1000;overflow:auto;background:radial-gradient(120% 90% at 20% 0%,#3A2A7E 0%,#1C1650 55%,#120F38 100%);color:#fff;font-family:'Andika',system-ui,sans-serif;padding:16px}
.de-boite{max-width:760px;margin:0 auto;min-height:calc(100vh - 32px);display:flex;flex-direction:column;gap:6px}
.de-haut{display:flex;justify-content:space-between;align-items:center;gap:12px}
.de-haut-btns{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.de-marque{font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;color:#FFE69A;letter-spacing:.02em}
.de-passer,.de-lien{background:none;border:0;color:#fff;font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:44px;padding:8px 6px}
.de-passer:focus-visible,.de-lien:focus-visible,.de-btn:focus-visible{outline:3px solid #FFCC3F;outline-offset:3px}
.de-etape{margin:12px 0 0;color:#FFE69A;font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:.85rem}
.de-titre{margin:0;font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;font-size:clamp(1.7rem,5vw,2.6rem);line-height:1.1;outline:none}
.de-sous{margin:4px 0 8px;font-size:1.1rem;line-height:1.45;color:#E6E2FF;max-width:42em}
.de-scene{flex:1;display:flex;align-items:center;justify-content:center;min-height:330px}
.de-bas{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;padding:12px 0 4px}
.de-points{display:flex;gap:8px;margin-right:auto}
.de-points span{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.3)}
.de-points span.vu{background:rgba(255,204,63,.6)}
.de-points span.on{background:#FFCC3F;width:26px;border-radius:6px}
.de-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:12px 26px;border-radius:999px;border:0;background:#FFCC3F;color:#171A33;font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;font-size:1.1rem;text-decoration:none;cursor:pointer;box-shadow:0 6px 0 #C9971B}
.de-btn:active{transform:translateY(3px);box-shadow:0 3px 0 #C9971B}
.de-btn-petit{min-height:44px;padding:8px 18px;font-size:1rem;box-shadow:none}

/* Visuels des scènes : une carte blanche, les éléments arrivent quand .on est posé. */
.de-v{position:relative;width:100%;max-width:560px;min-height:310px;background:#fff;color:#171A33;border-radius:22px;padding:22px;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.de-v *{box-sizing:border-box}
.de-curseur{position:absolute;width:26px;height:26px;left:85%;top:95%;opacity:0;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 10-7 1.5L8.5 21z' fill='%23171A33' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");z-index:3}
/* 1. Dépôt */
.de-cahier{position:absolute;left:22px;right:22px;top:20px;display:flex;flex-direction:column;gap:3px;padding:14px 16px 14px 26px;border-radius:10px;background:repeating-linear-gradient(#FDFBF2 0 25px,#D9E4F5 25px 26px);border-left:4px solid #F28B8B;font-size:.95rem;transform:translateX(120%) rotate(6deg);opacity:0;z-index:2}
.de-cahier b{font-family:'Baloo 2',system-ui,sans-serif;font-size:1.15rem}
/* 2026-11-25 : la photo de la vraie leçon (« Se repérer en France ») arrive dans la zone de dépôt. */
.de-photo{position:absolute;left:50%;top:26px;width:auto;height:142px;margin-left:-100px;border-radius:8px;box-shadow:0 8px 20px rgba(23,26,51,.28);background:#fff;transform:translateX(130%) rotate(8deg);opacity:0;z-index:2}
.de-v1.on .de-photo{animation:dePhoto 1.6s .5s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes dePhoto{to{transform:rotate(-2deg);opacity:1}}
.de-depot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;border:3px dashed #B9B2E6;border-radius:16px;color:#5B54A0;font-weight:700}
.de-depot-ic{font-size:1.6rem}
.de-niveaux{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.de-niveaux span{padding:6px 14px;border-radius:999px;border:2px solid #DAD6F3;font-weight:700}
.de-btn-creer{box-shadow:none;min-height:46px}
.de-v1.on .de-cahier{animation:deCahier 1.6s .5s cubic-bezier(.2,.8,.2,1) forwards}
.de-v1.on .de-depot{animation:deDepot .6s 2s forwards}
.de-v1.on .de-niv-ok{animation:deNiveau .4s 3.4s forwards}
.de-v1.on .de-curseur{animation:deCurseur1 5s .3s forwards}
.de-v1.on .de-btn-creer{animation:deClic .5s 5.2s}
@keyframes deCahier{to{transform:translateY(16px) scale(.9);opacity:1}}
@keyframes deDepot{to{border-color:#2DBE8C;background:#EFFBF6}}
@keyframes deNiveau{to{background:#5B47D6;border-color:#5B47D6;color:#fff}}
@keyframes deCurseur1{0%{opacity:0;left:85%;top:95%}15%{opacity:1}45%{left:60%;top:70%}62%{left:22%;top:72%}72%{left:22%;top:72%}100%{opacity:1;left:18%;top:88%}}
@keyframes deClic{50%{transform:scale(.94)}}
/* 2. Préparation */
.de-barre{height:12px;border-radius:999px;background:#ECEAF8;overflow:hidden;margin:6px 0 22px}
.de-barre span{display:block;height:100%;width:0;background:linear-gradient(90deg,#5B47D6,#2DBE8C);border-radius:inherit}
.de-v2.on .de-barre span{animation:deBarre 5.5s .3s ease-out forwards}
@keyframes deBarre{to{width:100%}}
.de-coches{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px;font-size:1.15rem;font-weight:700}
.de-coches li{display:flex;align-items:center;gap:12px;opacity:0;transform:translateY(8px)}
.de-v2.on .de-coches li{animation:deApparait .5s forwards;animation-delay:calc(.8s + var(--i) * 1.3s)}
.de-coche{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:#2DBE8C;color:#fff;font-size:1rem;flex:none}
@keyframes deApparait{to{opacity:1;transform:none}}
/* 3. Modifier */
.de-carte-tete{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.de-btn-mod{padding:6px 16px;border-radius:999px;border:2px solid #5B47D6;color:#5B47D6;font-weight:700}
.de-champ{display:flex;flex-direction:column;gap:2px;border:2px solid #E4E1F5;border-radius:12px;padding:8px 12px;margin-bottom:10px}
.de-champ small{color:#5E5A7A;font-weight:700}
.de-champ-ecrit{opacity:.35}
.de-frappe{display:inline-block;overflow:hidden;white-space:nowrap;width:0;border-right:2px solid #5B47D6;max-width:100%}
.de-ok{display:inline-block;margin-top:4px;color:#1F8F66;font-weight:700;opacity:0}
.de-v3 .de-curseur{left:88%;top:90%}
.de-v3.on .de-curseur{animation:deCurseur3 3s .3s forwards}
.de-v3.on .de-btn-mod{animation:deMod .5s 2.4s forwards}
.de-v3.on .de-champ-ecrit{animation:deChamp .4s 2.9s forwards}
.de-v3.on .de-frappe{animation:deFrappe 2.4s 3.3s steps(22) forwards}
.de-v3.on .de-ok{animation:deApparait .5s 6.2s forwards}
@keyframes deCurseur3{0%{opacity:0}20%{opacity:1}100%{opacity:1;left:82%;top:12%}}
@keyframes deMod{to{background:#5B47D6;color:#fff}}
@keyframes deChamp{to{opacity:1;border-color:#5B47D6}}
@keyframes deFrappe{to{width:12.5em}}
/* 4. Le parcours */
.de-etapes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.de-etapes li{display:flex;align-items:center;gap:14px;padding:10px 14px;border-radius:14px;border:2px solid #E4E1F5;font-weight:700;opacity:0;transform:translateX(-10px)}
.de-etapes li small{display:block;font-weight:400;color:#5E5A7A}
.de-v4.on .de-etapes li{animation:deApparait .45s forwards;animation-delay:calc(.2s + var(--i) * .45s)}
.de-num{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#5B47D6;color:#fff;font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;flex:none}
.de-test{border-style:dashed !important}
.de-test .de-num{background:#171A33;color:#FFCC3F}

/* Moins d'animations : tout est montré tout de suite, sans mouvement. */
@media (prefers-reduced-motion: reduce){
  .de-v *, .de-v{animation:none !important;transition:none !important}
  .de-cahier{transform:translateY(16px) scale(.9);opacity:1}
  .de-photo{transform:rotate(-2deg);opacity:1}
  .de-coches li,.de-etapes li,.de-ok{opacity:1;transform:none}
  .de-champ-ecrit{opacity:1}
  .de-frappe{width:auto;border-right:0}
  .de-curseur{display:none}
}

/* Bandeau du bas pendant le jeu */
.de-bandeau{position:fixed;left:0;right:0;bottom:0;z-index:900;display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:center;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#120F38;color:#fff;font-family:'Andika',system-ui,sans-serif;box-shadow:0 -6px 20px rgba(0,0,0,.25)}
.de-band-txt{margin-right:auto}
.de-band-txt b{color:#FFE69A}
@media (max-width:560px){ .de-bandeau{gap:6px;padding:8px 12px calc(8px + env(safe-area-inset-bottom))} .de-band-txt{display:none} .de-bandeau .de-lien{min-height:40px;font-size:.95rem} .de-btn-petit{min-height:40px;padding:6px 14px;font-size:.95rem} }

/* Carte de fin du test */
.de-fin{position:fixed;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(18,15,56,.72)}
.de-fin-boite{max-width:480px;background:#fff;color:#171A33;border-radius:22px;padding:26px 24px;text-align:center;font-family:'Andika',system-ui,sans-serif;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.de-fin-boite h2{margin:0 0 10px;font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;font-size:1.7rem;line-height:1.15;outline:none}
.de-fin-boite p{line-height:1.5}
.de-fin-boite .de-lien{display:block;margin:8px auto 0;color:#5B47D6}
.de-fin-petit a{color:#5B47D6}
/* Téléphone : la page de cahier tient dans la zone de dépôt. */
@media (max-width:560px){
  .de-v{padding:16px}
  .de-cahier{left:16px;right:16px;font-size:.82rem;padding:10px 10px 10px 18px}
  .de-depot{height:200px}
  .de-photo{height:auto;width:calc(100% - 80px);max-width:280px;left:40px;margin-left:0;top:26px}
  .de-niveaux span{padding:5px 11px}
}
