/* ---------- récompense (ADR-018) ---------- */
.recompense-overlay{ position:fixed; inset:0; z-index:70; display:flex; align-items:center; justify-content:center; background:rgba(20,30,40,.55); padding:20px; }
.recompense-carte{ position:relative; z-index:2; background:#fff; border-radius:28px; padding:28px 26px 24px; max-width:360px; width:100%; text-align:center; box-shadow:0 14px 0 rgba(0,0,0,.18); display:flex; flex-direction:column; align-items:center; gap:10px; animation:recompensePop 360ms ease; }
@keyframes recompensePop{ 0%{ transform:scale(.7); opacity:0; } 60%{ transform:scale(1.05); opacity:1; } 100%{ transform:scale(1); } }
.recompense-mascotte{ margin:-70px 0 0; }
.mascotte-img{ display:block; width:120px; height:auto; filter:drop-shadow(0 8px 6px rgba(0,0,0,.2)); }
.mascotte-saute{ animation:mascotteArrive 700ms cubic-bezier(.3,1.5,.5,1) both, alifRespire 2.2s ease-in-out 700ms infinite; transform-origin:50% 100%; }
@keyframes mascotteArrive{ 0%{ transform:translateY(40px) scale(.4); opacity:0; } 100%{ transform:none; opacity:1; } }
@media (prefers-reduced-motion: reduce){ .mascotte-saute{ animation:none; } }
.recompense-message{ font-size:19px; font-weight:800; color:var(--accent); margin:0; }
.recompense-etoiles{ font-size:46px; line-height:1; display:flex; gap:6px; }
.r-etoile{ color:#d8d8d8; transition:color .15s; display:inline-block; }
.r-etoile.allumee{ color:var(--attention); animation:etoilePop 420ms ease; }
@keyframes etoilePop{ 0%{ transform:scale(.3) rotate(-15deg); } 60%{ transform:scale(1.3) rotate(8deg); } 100%{ transform:scale(1) rotate(0); } }
.recompense-total{ font-size:14px; font-weight:700; color:var(--neutre); margin:0; }
.recompense-confettis{ position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.confetti{ position:absolute; top:-10px; width:9px; height:14px; opacity:.9; animation:confettiTombe linear forwards; }
@keyframes confettiTombe{
  0%{ transform:translateY(0) rotate(0); opacity:1; }
  100%{ transform:translateY(120vh) rotate(540deg); opacity:.3; }
}

/* ---------- badges (ADR-019, icônes illustrées ADR-027) ---------- */
.badges-grille{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:16px; padding:4px 4px 24px; max-width:760px; margin:0 auto; }
.badge-carte{ display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; background:#fff; border-radius:22px; padding:14px 10px 16px; box-shadow:0 5px 0 rgba(0,0,0,.08); }
.badge-nom{ font-size:15px; font-weight:800; color:var(--accent); }
.badge-desc{ font-size:12px; color:#5b4d7a; }
.badge-date{ font-size:11px; font-weight:700; color:var(--reussite); }
.badge-progres{ font-size:12px; font-weight:700; color:var(--neutre); }
.badge-piste{ display:block; width:100%; height:8px; }
/* médaillon : icône illustrée sur un disque doré (obtenu) ou gris (à gagner) */
.badge-medaillon{ position:relative; width:84px; height:84px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:radial-gradient(circle at 35% 30%, #FFF6D8, #F5D27A 70%, #E2B04A); box-shadow:inset 0 -5px 0 rgba(0,0,0,.08), 0 4px 0 rgba(0,0,0,.08); margin-bottom:4px; }
.badge-medaillon img{ width:64px; height:64px; filter:drop-shadow(0 3px 3px rgba(0,0,0,.18)); }
.badge-carte.verrouille .badge-medaillon{ background:#E9ECEF; box-shadow:inset 0 -5px 0 rgba(0,0,0,.05); }
.badge-carte.verrouille .badge-medaillon img{ filter:grayscale(1); opacity:.35; }
.badge-carte.verrouille .badge-nom{ color:#7d8790; }
.badge-cadenas{ position:absolute; right:-2px; bottom:-2px; width:28px; height:28px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; font-size:14px; box-shadow:0 2px 0 rgba(0,0,0,.12); }
.badge-carte.obtenu .badge-medaillon{ animation:badgeBrille 3s ease-in-out infinite; }
@keyframes badgeBrille{ 0%,100%{ box-shadow:inset 0 -5px 0 rgba(0,0,0,.08), 0 4px 0 rgba(0,0,0,.08); } 50%{ box-shadow:inset 0 -5px 0 rgba(0,0,0,.08), 0 0 0 6px rgba(245,210,122,.35); } }
/* bandeau de déblocage -- même famille visuelle que #maj-dispo, couleur
   "attention" (celle des étoiles) pour le distinguer au premier coup d'oeil. */
/* ---------- toast d'Alif (ADR-028) ---------- */
.toast-alif{ position:fixed; left:0; right:0; top:calc(26px + env(safe-area-inset-top)); z-index:66; display:flex; justify-content:center; padding:0 12px; pointer-events:none; }
.toast-alif-carte{ position:relative; pointer-events:auto; cursor:pointer; width:min(440px, 100%); display:flex; align-items:center; gap:10px; background:#fff; border:4px solid var(--tc, var(--attention)); border-radius:24px; padding:10px 14px 10px 76px; min-height:80px; box-shadow:0 10px 24px rgba(20,30,40,.25), 0 6px 0 rgba(0,0,0,.08); overflow:visible; }
.toast-alif.entre .toast-alif-carte{ animation:toastTombe 650ms cubic-bezier(.3,1.6,.5,1) both; }
.toast-alif.sort .toast-alif-carte{ animation:toastRemonte 320ms ease-in both; }
@keyframes toastTombe{ 0%{ transform:translateY(-140%) scale(.8); opacity:0; } 60%{ opacity:1; } 100%{ transform:none; } }
@keyframes toastRemonte{ to{ transform:translateY(-140%) scale(.9); opacity:0; } }
.toast-alif-mascotte{ position:absolute; left:-2px; bottom:-8px; width:76px; height:auto; filter:drop-shadow(0 5px 4px rgba(0,0,0,.22)); transform-origin:50% 100%; }
.toast-alif.entre .toast-alif-mascotte{ animation:toastMascotte 900ms cubic-bezier(.3,1.6,.5,1) 150ms both, alifRespire 2.2s ease-in-out 1.1s infinite; }
@keyframes toastMascotte{ 0%{ transform:translateY(30px) rotate(-18deg) scale(.4); opacity:0; } 100%{ transform:none; opacity:1; } }
.toast-alif-visuel{ flex:0 0 auto; width:54px; height:54px; border-radius:50%; background:var(--tc, var(--attention)); color:#fff; display:flex; align-items:center; justify-content:center; font-size:32px; line-height:1; padding-bottom:5px; box-shadow:inset 0 -4px 0 rgba(0,0,0,.12); }
.toast-alif-visuel img{ width:46px; height:46px; }
.toast-alif-visuel.icone{ background:radial-gradient(circle at 35% 30%, #FFF6D8, #F5D27A 70%, #E2B04A); padding:0; }
.toast-alif.entre .toast-alif-visuel{ animation:toastVisuel 700ms cubic-bezier(.3,1.8,.5,1) 300ms both; }
@keyframes toastVisuel{ 0%{ transform:scale(0) rotate(-90deg); } 100%{ transform:none; } }
.toast-alif-textes{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.toast-alif-titre{ font-size:16px; font-weight:800; color:var(--encre); line-height:1.25; }
.toast-alif-titre .ar{ display:block; font-size:.95em; color:#5b4d7a; font-weight:700; }
.toast-alif-sous{ font-size:13px; font-weight:700; color:var(--attention-texte); }
.toast-alif-eclats{ position:absolute; inset:0; pointer-events:none; }
.toast-alif-eclats i{ position:absolute; font-style:normal; color:var(--attention); font-size:14px; opacity:0; }
.toast-alif.entre .toast-alif-eclats i{ animation:toastEclat 1.1s ease-out both; }
.toast-alif-eclats i:nth-child(1){ left:30%; top:-8px; animation-delay:.45s !important; }
.toast-alif-eclats i:nth-child(2){ left:55%; top:-12px; animation-delay:.55s !important; font-size:18px; }
.toast-alif-eclats i:nth-child(3){ right:14%; top:-6px; animation-delay:.65s !important; }
.toast-alif-eclats i:nth-child(4){ right:6%; bottom:-8px; animation-delay:.6s !important; }
.toast-alif-eclats i:nth-child(5){ left:45%; bottom:-10px; animation-delay:.7s !important; }
@keyframes toastEclat{ 0%{ opacity:0; transform:scale(.2) translateY(6px); } 40%{ opacity:1; transform:scale(1.3); } 100%{ opacity:0; transform:scale(.8) translateY(-14px); } }
.toast-alif-etoiles{ letter-spacing:2px; }
.toast-alif-etoiles .vide{ color:var(--rail-bord); }
@media (prefers-reduced-motion: reduce){
  .toast-alif.entre .toast-alif-carte, .toast-alif.sort .toast-alif-carte, .toast-alif.entre .toast-alif-mascotte, .toast-alif.entre .toast-alif-visuel, .toast-alif.entre .toast-alif-eclats i{ animation:none; }
}
@keyframes badgeToastEntre{ 0%{ transform:translateY(-12px); opacity:0; } 100%{ transform:translateY(0); opacity:1; } }

/* ---------- Mes progrès (refonte ADR-027) ---------- */
.progres-soustitre{ font-size:17px; font-weight:800; color:var(--accent); text-align:center; margin:18px 0 10px; }
.pg-corps{ flex:1 1 auto; overflow-y:auto; display:flex; flex-direction:column; align-items:center; gap:16px; padding:4px 16px 32px; }
.pg-stats{ width:min(560px, 100%); display:grid; grid-template-columns:repeat(2, 1fr); gap:10px; }
@media (min-width:600px){ .pg-stats{ grid-template-columns:repeat(4, 1fr); } }
.pg-stat{ display:flex; align-items:center; gap:8px; background:#fff; border-radius:20px; padding:10px 12px; box-shadow:0 4px 0 rgba(0,0,0,.08); }
.pg-stat img{ width:46px; height:46px; flex:0 0 auto; }
.pg-stat-txt{ display:flex; flex-direction:column; min-width:0; }
.pg-stat-valeur{ font-size:22px; font-weight:800; color:var(--encre); line-height:1.1; }
.pg-stat-valeur small{ font-size:13px; color:var(--neutre); font-weight:700; }
.pg-stat-label{ font-size:12px; font-weight:700; color:#5b4d7a; line-height:1.2; }
.pg-section{ width:min(560px, 100%); background:rgba(255,255,255,.55); border-radius:26px; padding:12px 12px 16px; }
.pg-titre{ display:flex; align-items:center; gap:8px; font-size:17px; font-weight:800; color:var(--accent); margin:0 0 12px; }
.pg-titre img{ width:34px; height:34px; }
.pg-titre .ar{ font-size:.9em; opacity:.7; font-weight:700; }
.pg-lettres{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.pg-lettre{ position:relative; width:68px; display:flex; flex-direction:column; align-items:center; gap:4px; background:none; border:none; padding:0; cursor:pointer; }
.pg-lettre-rond{ width:62px; height:62px; border-radius:50%; background:var(--tc); color:#fff; font-size:34px; line-height:1; display:flex; align-items:center; justify-content:center; padding-bottom:6px; box-shadow:0 5px 0 rgba(0,0,0,.15); }
.pg-lettre:active .pg-lettre-rond{ transform:translateY(3px); box-shadow:0 2px 0 rgba(0,0,0,.15); }
.pg-lettre-etoiles{ font-size:12px; letter-spacing:1px; color:var(--attention-texte); }
.pg-lettre-etoiles .vide{ color:var(--rail-bord); }
.pg-lettre-revoir{ position:absolute; right:0; top:-4px; width:24px; height:24px; border-radius:50%; background:#fff; font-size:13px; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 0 rgba(0,0,0,.12); }
.pg-vide{ text-align:center; color:#5b4d7a; font-size:15px; font-weight:700; padding:6px 10px; display:flex; flex-direction:column; align-items:center; gap:10px; }
.pg-badges{ display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:12px 8px; }
.pg-badges .badge-carte{ background:none; box-shadow:none; padding:0; gap:2px; }
.pg-badges .badge-medaillon{ width:72px; height:72px; }
.pg-badges .badge-medaillon img{ width:54px; height:54px; }
.pg-badges .badge-nom{ font-size:12px; line-height:1.2; }
.pg-badges .badge-piste{ width:70%; height:6px; margin-top:2px; }


/* « Répète après moi » (ADR-066) : voile à une carte de mot ; l'oreille (écoute) puis le halo « à toi » (répète). */
.repete-carte-fond{ position:relative; }
.repete-quitter{ position:absolute; top:10px; right:10px; border:none; background:rgba(0,0,0,.08); color:inherit; font-size:18px; cursor:pointer; }
.repete-mot{ margin:6px auto 4px; width:min(280px, 100%); border-radius:24px; background:#fff; border:5px solid var(--accent); box-shadow:0 8px 0 rgba(0,0,0,.12); padding:12px 10px; text-align:center; }
.repete-emoji{ font-size:56px; line-height:1.1; }
.repete-emoji .img-mot{ height:1em; width:1em; }
.repete-arabe{ font-size:40px; font-weight:700; line-height:1.4; }
.repete-francais{ font-size:16px; opacity:.8; }
.repete-ecoute .repete-mot{ animation:repete-pulse 1s ease-in-out infinite; }
.repete-atoi .repete-mot{ border-color:var(--reussite); box-shadow:0 0 0 8px rgba(27,132,81,.22), 0 8px 0 rgba(0,0,0,.12); }
.repete-bravo{ animation:repete-bravo .6s ease; }
.recompense-carte button:disabled{ opacity:.45; }
@keyframes repete-pulse{ 50%{ transform:scale(1.04); } }
@keyframes repete-bravo{ 40%{ transform:scale(1.12) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce){ .repete-ecoute .repete-mot, .repete-bravo{ animation:none; } }

/* « Répète après moi » : choix de la langue, note de repli, et « Je l'ai dit » qui se débloque (barre qui se remplit pendant le délai). */
.repete-modes{ padding:2px 0 6px; }
.repete-modes .nombre-onglet{ font-size:17px; padding:6px 16px; display:flex; flex-direction:column; align-items:center; line-height:1.15; }
.repete-modes .nombre-onglet small{ font-size:11px; font-weight:600; opacity:.85; }
.repete-note{ min-height:0; margin:0 0 4px; font-size:13px; opacity:.8; text-align:center; }
#repete-fait{ position:relative; overflow:hidden; }
#repete-fait.attente::after{ content:""; position:absolute; left:0; bottom:0; height:5px; background:rgba(255,255,255,.75); width:0; animation:repete-attente 2s linear forwards; }
@keyframes repete-attente{ to{ width:100%; } }
@media (prefers-reduced-motion: reduce){ #repete-fait.attente::after{ animation-duration:2s; } }
