/* CapÉcole v2 — design « carnet d'aventures » : fond vivant, cartes autocollantes,
   typo arrondie, animations douces. Enfant d'abord, iPad first. */
:root{
  --bg:#FFF6EA; --ink:#2D3142; --soft:#6B7280; --card:#FFFFFF;
  --ok:#22A06B; --ko:#E05656; --accent:#EF476F; --accent-d:#D92B57;
  --sun:#FFD166; --sun-d:#E8B23C; --sky:#4EA8DE; --sky-d:#2F88C2; --leaf:#7AC74F; --leaf-d:#57A931;
  --grape:#9B5DE5; --tang:#FF9F1C;
  --line:#EFE3CF;
  --r:26px; --shadow:0 8px 22px rgba(45,49,66,.10);
  --sticker:0 6px 0 var(--line), 0 14px 26px rgba(45,49,66,.12);
  --sp:env(safe-area-inset-top,0px); --sb:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent; touch-action:manipulation}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);
  font-family:ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  height:100%; overscroll-behavior:none; user-select:none; -webkit-user-select:none}
/* --- décor de fond : ciel doux + collines + pois de cahier --- */
body::before{content:''; position:fixed; inset:0; z-index:-2; pointer-events:none;
  background:
    radial-gradient(1100px 480px at 85% -8%, rgba(255,209,102,.35) 0%, rgba(255,209,102,0) 60%),
    radial-gradient(1000px 520px at -15% -5%, rgba(78,168,222,.18) 0%, rgba(78,168,222,0) 55%),
    radial-gradient(1300px 600px at 50% 118%, rgba(122,199,79,.22) 0%, rgba(122,199,79,0) 60%);}
body::after{content:''; position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.5;
  background-image:radial-gradient(rgba(45,49,66,.05) 1.6px, transparent 1.7px);
  background-size:26px 26px;}
#app{min-height:100dvh; padding:max(18px,var(--sp)) 22px calc(26px + var(--sb));
  max-width:1100px; margin:0 auto; display:flex; flex-direction:column}
#app.lesson-mode{height:100dvh; min-height:0; overflow:hidden}   /* la leçon gère son défilement */
/* barres de deroulement « carnet » : rail discret, pastille sable, partout ou ca defile */
*{scrollbar-width:thin; scrollbar-color:#E8D6BB transparent}
::-webkit-scrollbar{width:12px; height:12px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#E8D6BB; border:3px solid transparent; background-clip:padding-box;
  border-radius:999px}
::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background:#D9BE95}
button{font:inherit; color:inherit; border:0; background:none; cursor:pointer}

/* ---------- titre & textes ---------- */
.h1{font-size:clamp(28px,4.8vw,44px); font-weight:900; margin:6px 0 2px; letter-spacing:-.5px}
.h2{font-size:clamp(21px,3.4vw,29px); font-weight:900; margin:4px 0}
.sub{color:var(--soft); font-size:17px; font-weight:700}
.logo-t{background:linear-gradient(0deg, rgba(255,209,102,.7) 42%, transparent 42%); padding:0 .12em; border-radius:4px}

/* ---------- grille & cartes autocollantes ---------- */
.grid{display:grid; gap:18px; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); margin-top:16px}
.card{position:relative; background:var(--card); border-radius:var(--r); border:3px solid var(--line);
  box-shadow:var(--sticker); padding:20px; min-height:130px; display:flex; flex-direction:column; gap:8px;
  align-items:flex-start; transition:transform .12s, box-shadow .12s; animation:cardin .4s backwards}
.card:active{transform:translateY(5px); box-shadow:0 1px 0 var(--line), 0 6px 14px rgba(45,49,66,.12)}
.grid .card:nth-child(2){animation-delay:.06s}.grid .card:nth-child(3){animation-delay:.12s}
.grid .card:nth-child(4){animation-delay:.18s}.grid .card:nth-child(5){animation-delay:.24s}
.grid .card:nth-child(6){animation-delay:.30s}.grid .card:nth-child(7){animation-delay:.36s}
.grid .card:nth-child(8){animation-delay:.42s}
.card .big{font-size:54px; line-height:1}
.card .name{font-weight:900; font-size:20px}
.card .meta{color:var(--soft); font-weight:700; font-size:15px}
/* carte teintée par matière (variable --dc posée en style) */
.card.tint{border-color:color-mix(in srgb, var(--dc,#EFE3CF) 45%, white);
  background:linear-gradient(160deg, #fff 55%, color-mix(in srgb, var(--dc,#fff) 10%, #fff));}
.card .medal{width:74px; height:74px; border-radius:50%; display:grid; place-items:center; font-size:40px;
  background:color-mix(in srgb, var(--dc,#FFD166) 16%, #fff);
  border:3px solid color-mix(in srgb, var(--dc,#FFD166) 55%, #fff)}
.stars{font-size:24px; letter-spacing:2px; color:#F2B705}
.stars .off{color:#E4C98C; opacity:1}
.chip.white{background:#fff; border:2px solid var(--line)}
.card .name{line-height:1.25; overflow-wrap:anywhere}

/* ---------- boutons façon gommettes ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:10px;
  min-height:66px; min-width:66px; padding:0 28px; border-radius:22px;
  background:var(--accent); color:#fff; font-weight:900; font-size:20px;
  box-shadow:0 7px 0 var(--accent-d), 0 14px 22px rgba(45,49,66,.15); transition:transform .1s, box-shadow .1s}
.btn:active{transform:translateY(6px); box-shadow:0 1px 0 var(--accent-d), 0 6px 12px rgba(45,49,66,.14)}
.btn.sec{background:#fff; color:var(--ink); border:3px solid var(--line); box-shadow:0 7px 0 var(--line), 0 14px 22px rgba(45,49,66,.10)}
.btn.sec:active{box-shadow:0 1px 0 var(--line), 0 6px 12px rgba(45,49,66,.10)}
.btn.ok{background:var(--ok); box-shadow:0 7px 0 var(--leaf-d), 0 14px 22px rgba(45,49,66,.15)}
.btn.ok:active{box-shadow:0 1px 0 var(--leaf-d), 0 6px 12px rgba(45,49,66,.14)}
.btn.sky{background:var(--sky); box-shadow:0 7px 0 var(--sky-d), 0 14px 22px rgba(45,49,66,.15)}
.btn.sky:active{box-shadow:0 1px 0 var(--sky-d), 0 6px 12px rgba(45,49,66,.14)}
.btn.sun{background:var(--sun); color:var(--ink); box-shadow:0 7px 0 var(--sun-d), 0 14px 22px rgba(45,49,66,.15)}
.btn.sun:active{box-shadow:0 1px 0 var(--sun-d), 0 6px 12px rgba(45,49,66,.14)}
.btn.ghost{background:transparent; box-shadow:none}
.btn:disabled{opacity:.45}
.row{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.spacer{flex:1}
.back{min-height:58px; border-radius:18px; background:#fff; border:3px solid var(--line);
  box-shadow:0 5px 0 var(--line); font-size:20px; font-weight:800; padding:0 20px; transition:transform .1s}
.back:active{transform:translateY(4px); box-shadow:none}
.chip{background:#F6EDDC; border-radius:999px; padding:9px 17px; font-weight:800; font-size:16px; border:2px solid var(--line)}
.chip.xp{background:var(--sun); border-color:var(--sun-d)}
.chip.fire{background:#FFE3D1; border-color:#F5B895}

/* ---------- en-tête enfant ---------- */
.homebar{display:flex; align-items:center; gap:16px; margin-bottom:6px}
.avatar{width:78px; height:78px; border-radius:50%; background:#fff; border:4px solid var(--sun);
  box-shadow:0 5px 0 var(--sun-d), var(--shadow); display:grid; place-items:center; font-size:42px;
  animation:pop .45s}
.hud{display:flex; flex-direction:column; gap:7px}
.hud .lvlrow{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.lvlbadge{background:var(--ink); color:#fff; border-radius:999px; font-size:13px; font-weight:900; padding:4px 12px}
.lvlbar{height:16px; border-radius:99px; background:#EEE3CF; border:2px solid #E4D7BF; overflow:hidden; width:200px; position:relative}
.lvlbar i{display:block; height:100%; background:linear-gradient(90deg,var(--sun),#FFB03B); border-radius:99px; transition:width .5s}
.lvlbar::after{content:'⭐'; position:absolute; right:4px; top:50%; transform:translateY(-52%); font-size:11px}

/* ---------- carte mission du jour ---------- */
.mission{position:relative; display:flex; align-items:center; gap:18px; margin-top:10px;
  background:linear-gradient(150deg, #FFF3D9 0%, #FFE9B8 100%);
  border:3px solid var(--sun-d); border-radius:var(--r); box-shadow:0 8px 0 var(--sun-d), var(--shadow);
  padding:20px 22px; transition:transform .12s, box-shadow .12s; animation:cardin .4s backwards}
.mission:active{transform:translateY(6px); box-shadow:0 2px 0 var(--sun-d), 0 8px 16px rgba(45,49,66,.12)}
.mission.done{background:linear-gradient(150deg,#E9F7EF,#D5F0E1); border-color:#3DBB84; box-shadow:0 8px 0 #3DBB84, var(--shadow)}
.mission .mtitle{font-size:23px; font-weight:900}
.mission .msub{font-weight:700; color:#6B5B3E; font-size:16px}
.mission .mascotwrap{flex:none; animation:bob 3s ease-in-out infinite}
.mission .target{width:74px; height:74px; border-radius:50%; background:#fff; display:grid; place-items:center;
  font-size:38px; border:3px solid var(--sun-d)}

/* ---------- session ---------- */
.sess{display:flex; flex-direction:column; flex:1}
.sess-top{display:flex; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap}
.dots{display:flex; gap:9px; flex-wrap:wrap}
.dot{width:20px; height:20px; border-radius:50%; background:#E8DCC8; border:2px solid #D6C4A8; transition:transform .25s}
.dot.now{background:var(--sky); border-color:var(--sky-d); transform:scale(1.25); animation:pulse 1.6s infinite}
.dot.ok{background:var(--ok); border-color:var(--leaf-d)} .dot.ko{background:var(--ko); border-color:#C24141}
/* bulle de question avec Houlu à côté — centrée verticalement dans l'écran */
.ask{display:flex; gap:20px; align-items:flex-end; margin:auto 0; padding:8px 0}
.ask .mascotwrap{flex:none; margin-bottom:10px; animation:bob 3.5s ease-in-out infinite}
.qbox{flex:1; background:var(--card); border-radius:var(--r); border:3px solid var(--line);
  box-shadow:var(--sticker); padding:22px; display:flex; flex-direction:column; gap:18px; position:relative;
  animation:cardin .35s backwards}
.qbox::before{content:''; position:absolute; left:-15px; bottom:96px; width:22px; height:22px;
  background:#fff; border-left:3px solid var(--line); border-bottom:3px solid var(--line);
  transform:rotate(45deg); border-bottom-left-radius:8px}
.qtext{font-size:clamp(22px,3.4vw,30px); font-weight:900; line-height:1.35}
.speak{min-height:62px; min-width:62px; border-radius:50%; background:var(--sky); color:#fff; font-size:26px;
  box-shadow:0 5px 0 var(--sky-d); transition:transform .1s}
.speak:active{transform:translateY(4px); box-shadow:none}
.answers{display:flex; flex-direction:column; gap:15px}
.opt{min-height:74px; border-radius:20px; background:#F4F9FE; border:3px solid #C9DFEE;
  box-shadow:0 5px 0 #BAD4E8; font-size:clamp(21px,3.2vw,28px); font-weight:800; padding:8px 20px;
  text-align:center; transition:transform .1s, box-shadow .1s}
.opt:active{transform:translateY(4px); box-shadow:none}
.opt.sel{border-color:var(--sky); background:#EAF5FC; box-shadow:0 5px 0 var(--sky-d)}
.opt.good{border-color:var(--ok); background:#E9F7EF; box-shadow:0 5px 0 var(--leaf-d); animation:pop .35s}
.opt.bad{border-color:var(--ko); background:#FBECEC; box-shadow:0 5px 0 #C24141; animation:shake .4s}
.cmpbtns{display:flex; gap:14px; justify-content:center}
.cmpbtns .opt{flex:1; max-width:170px; font-size:36px}
.tfbtns{display:flex; gap:14px}
.tfbtns .opt{flex:1}
.pairs{display:grid; grid-template-columns:1fr 1fr; gap:12px 26px}
.pairs .opt{font-size:clamp(18px,2.6vw,23px)}
.pairs .opt.done{opacity:.35; border-color:var(--ok); box-shadow:none}
.emojibox{display:flex; flex-wrap:wrap; gap:8px; justify-content:center; font-size:42px;
  background:#FDF8EF; border:3px dashed var(--line); border-radius:20px; padding:20px; min-height:96px}
.chipline{display:flex; flex-wrap:wrap; gap:10px; min-height:78px; background:#FDF8EF;
  border-radius:20px; padding:13px; align-items:center; border:3px dashed var(--line)}
.word{min-height:62px; padding:6px 18px; border-radius:16px; background:#fff; border:2px solid var(--line);
  box-shadow:0 4px 0 var(--line); font-size:22px; font-weight:800; transition:transform .1s}
.word:active{transform:translateY(3px); box-shadow:none}
.word.pool{background:#fff} .word.used{background:var(--sun); border-color:var(--sun-d)}
.pad{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; max-width:430px; margin:0 auto; width:100%}
.pad button{min-height:74px; border-radius:20px; background:#fff; border:3px solid var(--line);
  box-shadow:0 5px 0 var(--line); font-size:30px; font-weight:900; transition:transform .1s}
.pad button:active{transform:translateY(4px); box-shadow:none}
.pad .act{background:var(--sun); border-color:var(--sun-d)}
.numdisp{font-size:46px; font-weight:900; text-align:center; background:#FDF8EF;
  border:3px dashed var(--line); border-radius:20px; padding:12px; min-height:76px}

/* ---------- bandeau retour ---------- */
.fb{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(26px + var(--sb));
  padding:17px 28px; border-radius:999px; font-weight:900; font-size:20px; color:#fff;
  box-shadow:0 10px 26px rgba(0,0,0,.20); z-index:30; max-width:92vw; animation:rise .35s cubic-bezier(.34,1.56,.64,1)}
.fb.ok{background:linear-gradient(150deg,#2FB87C,#22A06B)} .fb.ko{background:var(--ko)}

/* ---------- récompense ---------- */
.reward{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; text-align:center}
.reward .mascotwrap{animation:jump .7s cubic-bezier(.34,1.56,.64,1)}
.reward .starrow{font-size:60px; letter-spacing:8px; color:#F2B705}
.reward .starrow span{display:inline-block; animation:starin .55s backwards; transform-origin:50% 60%}
.reward .starrow span:nth-child(2){animation-delay:.22s}
.reward .starrow span:nth-child(3){animation-delay:.44s}
.reward .xpbadge{display:inline-block; background:var(--sun); border:3px solid var(--sun-d); color:var(--ink);
  border-radius:999px; font-weight:900; font-size:24px; padding:10px 26px; box-shadow:0 6px 0 var(--sun-d); animation:pop .5s .15s backwards}

/* ---------- parents ---------- */
.pin{display:flex; gap:14px; justify-content:center; margin:22px 0}
.pin i{width:24px; height:24px; border-radius:50%; background:#EDE3D6; border:2px solid #E0D2BC}
.pin i.on{background:var(--ink); border-color:var(--ink); animation:pop .25s}
.ptable{width:100%; border-collapse:separate; border-spacing:0; background:#fff; border:3px solid var(--line);
  border-radius:var(--r); overflow:hidden; box-shadow:var(--sticker)}
.ptable th,.ptable td{padding:13px 15px; text-align:left; font-size:16px; border-bottom:1px solid #F0E7DA}
.ptable th{background:#F7F1E6; font-size:14px; text-transform:uppercase; letter-spacing:.5px; color:#4B5563}
.badge{border-radius:999px; padding:5px 13px; font-weight:800; font-size:14px}
.b-ok{background:#DFF3E7; color:#166534} .b-mid{background:#FDF0D5; color:#92400E} .b-low{background:#FBE2E2; color:#991B1B}
input.field{min-height:66px; border-radius:18px; border:3px solid var(--line); padding:0 18px;
  font-size:22px; font-weight:800; background:#fff; width:100%; max-width:420px; user-select:text; -webkit-user-select:text}

#confetti{position:fixed; inset:0; pointer-events:none; z-index:40}
.toast{position:fixed; top:calc(16px + var(--sp)); left:50%; transform:translateX(-50%);
  background:var(--ink); color:#fff; padding:13px 24px; border-radius:999px; font-weight:800; z-index:50;
  box-shadow:0 10px 26px rgba(0,0,0,.25)}

/* ---------- leçon ---------- */
.lesson{display:flex; flex-direction:column; gap:14px; width:100%; max-width:780px; margin:0 auto; height:100%}
.lbar{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.lwrap{position:relative; flex:1 1 auto; min-height:0; display:flex}
/* La leçon est un « carnet » : la zone qui défile a sa propre feuille, donc la barre de
   défilement est collée à son bord droit intérieur au lieu de flotter dans la marge. */
.lscroll{flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable;
  display:flex; flex-direction:column; gap:14px;
  background:#FFFCF6; border:2px solid #F0E4D2; border-radius:24px; padding:16px 18px;
  scrollbar-width:auto; scrollbar-color:auto}        /* sinon Chrome ignore nos ::-webkit-scrollbar */
.lscroll::-webkit-scrollbar{width:16px}
.lscroll::-webkit-scrollbar-track{background:#F4EADB; border-radius:999px; margin:16px 2px}  /* rogne la piste avant les coins arrondis */
.lscroll::-webkit-scrollbar-thumb{background:var(--sun-d); border:4px solid #F4EADB; background-clip:padding-box;
  border-radius:999px; min-height:44px}
.lscroll::-webkit-scrollbar-thumb:hover,.lscroll::-webkit-scrollbar-thumb:active{background:#C2913F}
.lscroll:focus-visible{outline:3px solid var(--sky); outline-offset:4px; border-radius:24px}
/* Témoin « il reste de la suite » : pastille ambre bien visible, dans la feuille. */
.lmore{position:absolute; right:30px; bottom:22px; width:38px; height:38px; border-radius:50%;
  background:var(--sun); border:3px solid #fff; box-shadow:0 4px 0 var(--sun-d), 0 10px 18px rgba(45,49,66,.18);
  display:flex; align-items:center; justify-content:center; color:#4A3A1E; font-weight:900; font-size:18px;
  pointer-events:none; animation:bob 1.5s infinite; transition:opacity .3s, transform .3s}
.lmore.hide{opacity:0; transform:translateY(10px) scale(.7)}
.lsent{height:2px; flex:none}   /* sentinelle de fin de leçon (IntersectionObserver) */
.lfoot{padding-top:2px}
.praise{font-size:clamp(19px,2.8vw,25px); font-weight:900; color:var(--ink)}
.praise.off{color:var(--soft)}
.lhead{display:flex; align-items:center; gap:16px}
.ltitle{font-size:clamp(22px,3.4vw,32px); font-weight:900}
.lcard{background:var(--card); border-radius:var(--r); border:3px solid var(--line);
  box-shadow:var(--sticker); padding:22px; display:flex; flex-direction:column; gap:16px;
  animation:cardin .35s backwards}
.lpt{display:flex; gap:14px; align-items:flex-start; font-size:clamp(18px,2.7vw,23px);
  font-weight:700; line-height:1.4}
.lnum{flex:none; width:40px; height:40px; border-radius:50%; background:var(--sky); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:900; font-size:20px;
  box-shadow:0 3px 0 var(--sky-d)}
.lexrow{display:flex; flex-direction:column; gap:12px}
.lex{background:#F4F9FE; border:3px solid #C9DFEE; border-radius:20px; padding:16px 18px;
  font-size:clamp(17px,2.5vw,21px); font-weight:700; animation:cardin .4s backwards}
.lexq{font-weight:900; margin-bottom:6px}
.lexr{color:#3A4157}
.lastuce{background:color-mix(in srgb, var(--sun) 26%, #fff);
  border:3px solid color-mix(in srgb, var(--sun) 60%, #fff);
  border-radius:20px; padding:16px 18px; font-size:clamp(17px,2.5vw,21px); font-weight:800}
.lastt{margin-bottom:4px}
.lbtn{position:absolute; top:14px; right:14px; min-width:50px; min-height:50px; border-radius:16px;
  background:#fff; border:3px solid #E2D2B6; box-shadow:0 4px 0 #E2D2B6; font-size:23px; z-index:2}
.lbtn:active{transform:translateY(3px); box-shadow:none}
.overlay{position:fixed; inset:0; background:rgba(45,49,66,.55); z-index:60;
  display:flex; align-items:center; justify-content:center; padding:16px}
.overlay .lesson{background:var(--bg); border-radius:30px; padding:18px 18px 14px;
  max-height:calc(100dvh - 32px); max-width:820px; overflow:hidden}
.overlay .lmore{right:-4px}

/* ---------- contrôles de lecture vocale (leçon + session) ---------- */
.spkrow{display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.spkbtn,.spkstop{display:inline-flex; align-items:center; justify-content:center; gap:12px;
  transition:transform .1s, box-shadow .1s}
.spkbtn svg,.spkstop svg{flex:none}
.spkbtn{flex:1 1 260px; min-height:74px; border-radius:22px; background:var(--sky); color:#fff;
  border:3px solid var(--sky-d); box-shadow:0 5px 0 var(--sky-d); font-size:clamp(20px,3vw,27px);
  font-weight:900; padding:10px 20px}
.spkbtn:active{transform:translateY(4px); box-shadow:none}
.spkrow.on .spkbtn{background:var(--ok); border-color:#177A50; box-shadow:0 5px 0 #177A50;
  animation:pulse 1.8s infinite}
.spkstop{flex:0 0 auto; min-height:74px; min-width:160px; border-radius:22px; background:#fff; color:#B23A3A;
  border:3px solid var(--ko); box-shadow:0 5px 0 #C24141; font-size:clamp(18px,2.6vw,23px); font-weight:900;
  padding:10px 18px}
.spkstop:active{transform:translateY(4px); box-shadow:none}
.spkstop[hidden]{display:none}
.mmrow{display:flex; gap:10px}
.mmrow[hidden]{display:none}
.speak.mm{min-width:56px; min-height:56px; display:inline-flex; align-items:center; justify-content:center}
.speak.mm.stop{background:var(--ko); box-shadow:0 5px 0 #A93C3C}

/* ---------- animations ---------- */
@keyframes pop{0%{transform:scale(.3)}70%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes cardin{from{opacity:0; transform:translateY(16px) scale(.97)}to{opacity:1; transform:none}}
@keyframes jump{0%{transform:translateY(40px) scale(.8)}60%{transform:translateY(-14px) scale(1.08)}100%{transform:none}}
@keyframes starin{0%{transform:scale(0) rotate(-120deg)}70%{transform:scale(1.35) rotate(8deg)}100%{transform:scale(1)}}
@keyframes shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-10px)}40%,80%{transform:translateX(10px)}}
@keyframes rise{from{transform:translate(-50%,40px); opacity:0}to{transform:translate(-50%,0); opacity:1}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(78,168,222,.45)}50%{box-shadow:0 0 0 7px rgba(78,168,222,0)}}
@media (prefers-reduced-motion: reduce){*{animation:none!important; transition:none!important}}
@media (max-width:640px){.grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
  .ask .mascotwrap{display:none}.qbox::before{display:none}}

/* Espace parents : onglets + synthèse + accordéon domaines */
.ptabs{display:flex; gap:10px; margin:14px 0 12px}
.ptab{flex:1; min-height:56px; border-radius:16px; border:3px solid var(--line); background:#fff;
  font-weight:900; font-size:17px; cursor:pointer; box-shadow:0 3px 0 var(--line)}
.ptab.on{background:var(--ink); color:#fff; border-color:var(--ink)}
.ptab:active{transform:translateY(3px); box-shadow:none}
.psum{background:#fff; border:3px solid var(--line); border-radius:16px; padding:14px 16px; margin-bottom:12px}
.pbar{height:14px; border-radius:999px; background:#F0E7DA; overflow:hidden}
.pfill{height:100%; background:linear-gradient(90deg,#8BC34A,#4CAF50); border-radius:999px; transition:width .3s}
.domcard{background:#fff; border:3px solid var(--line); border-radius:16px; margin-bottom:10px; overflow:hidden}
.domhead{display:flex; align-items:center; gap:12px; width:100%; min-height:60px; padding:10px 16px;
  background:none; border:none; font-weight:900; font-size:17px; cursor:pointer; text-align:left; color:inherit}
.domhead:active{background:#FBF5EA}
.domlbl{overflow-wrap:anywhere}
.domstat{margin-left:auto; font-weight:800; color:var(--soft); font-size:15px; white-space:nowrap}
.domarrow{color:var(--soft); font-size:12px}
.domcard .ptable{border:none; border-radius:0; border-top:2px solid #F0E7DA}
