/* ---------- accueil repensé (ADR-022) : barre de statut, "Continuer",
   raccourcis carte/progrès -- la gamification devient visible au lieu
   d'être 4 petits liens gris empilés. ---------- */
.accueil-hero{ width:min(560px, 100%); display:flex; align-items:center; gap:4px; }
.accueil-mascotte{ flex:0 0 auto; width:112px; height:auto; filter:drop-shadow(0 6px 5px rgba(0,0,0,.18)); transform-origin:50% 100%; animation:mascotteArrive 700ms cubic-bezier(.3,1.5,.5,1) both, alifRespire 2.4s ease-in-out 700ms infinite; }
.accueil-bulle{ position:relative; flex:1 1 auto; min-width:0; background:#fff; border:3px solid var(--rail-bord); border-radius:22px; padding:10px 14px; box-shadow:0 5px 0 rgba(0,0,0,.08); display:flex; flex-direction:column; gap:4px; }
.accueil-bulle::before{ content:""; position:absolute; left:-14px; top:50%; margin-top:-10px; border:10px solid transparent; border-right:14px solid var(--rail-bord); border-left:0; }
.accueil-bulle::after{ content:""; position:absolute; left:-9px; top:50%; margin-top:-7px; border:7px solid transparent; border-right:10px solid #fff; border-left:0; }
.accueil-marque{ font-size:12px; font-weight:800; color:var(--attention-texte); text-transform:uppercase; letter-spacing:.04em; }
.accueil-marque .ar{ display:inline-block; text-transform:none; letter-spacing:0; font-size:1.1em; }
.accueil-bulle-texte{ font-size:17px; font-weight:800; color:var(--encre); line-height:1.3; }
.accueil-bulle-texte .ar{ display:block; font-size:.95em; font-weight:700; color:#5b4d7a; }
@media (min-width:900px){ .accueil-mascotte{ width:140px; } }
/* réaction d'Alif pendant les exercices */
.mascotte-reaction{ position:fixed; left:10px; bottom:calc(96px + env(safe-area-inset-bottom)); z-index:62; display:flex; align-items:flex-end; gap:2px; pointer-events:none; max-width:calc(100% - 20px); animation:reactionEntre 380ms cubic-bezier(.3,1.5,.5,1) both; }
.mascotte-reaction.sort{ animation:reactionSort 300ms ease-in both; }
.mascotte-reaction img{ width:84px; height:auto; flex:0 0 auto; filter:drop-shadow(0 5px 4px rgba(0,0,0,.2)); }
.mascotte-reaction-bulle{ margin-bottom:46px; background:#fff; border:3px solid var(--rail-bord); border-radius:18px 18px 18px 4px; padding:7px 12px; font-size:15px; font-weight:800; color:var(--encre); box-shadow:0 4px 0 rgba(0,0,0,.08); line-height:1.3; }
.mascotte-reaction-bulle .ar{ display:block; font-size:.95em; color:#5b4d7a; font-weight:700; }
@keyframes reactionEntre{ from{ transform:translateX(-120%) rotate(-12deg); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes reactionSort{ to{ transform:translateY(30px); opacity:0; } }
@media (prefers-reduced-motion: reduce){ .accueil-mascotte, .mascotte-reaction, .mascotte-reaction.sort{ animation:none; } }
.hud{ display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.hud-chip{ font-family:inherit; display:inline-flex; align-items:center; gap:5px; font-size:16px; font-weight:700; color:var(--encre); background:#fff; border:3px solid var(--rail-bord); border-radius:999px; padding:6px 14px; box-shadow:0 4px 0 rgba(0,0,0,.08); line-height:1.2; }
button.hud-chip{ cursor:pointer; }
button.hud-chip:active{ transform:translateY(3px); box-shadow:0 1px 0 rgba(0,0,0,.08); }
.hud-chip strong{ font-weight:800; font-size:17px; }
.hud-etoiles{ border-color:var(--attention); }
.hud-badges{ border-color:var(--copain-3); }
.hud-serie{ border-color:var(--copain-1); }
.hud-serie.eteinte{ opacity:.6; }
.hud-sur{ font-size:12px; color:#5b4d7a; font-weight:700; }
.hud-chip.pop{ animation:hudPop 500ms ease; }
@keyframes hudPop{ 0%{ transform:scale(1); } 40%{ transform:scale(1.18); } 100%{ transform:scale(1); } }
.continuer-carte{ position:relative; width:min(560px, 100%); display:flex; align-items:center; gap:14px; border:none; border-radius:28px; background:var(--tc, var(--accent)); color:#fff; padding:14px 16px; box-shadow:0 8px 0 rgba(0,0,0,.18); cursor:pointer; text-align:left; overflow:hidden; transition:transform .12s ease, box-shadow .12s ease; }
.continuer-carte::after{ content:""; position:absolute; inset:0; background:linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 45%, transparent 60%); transform:translateX(-100%); animation:brille 3.2s ease-in-out 1s infinite; pointer-events:none; }
@keyframes brille{ 0%{ transform:translateX(-100%); } 45%,100%{ transform:translateX(100%); } }
.continuer-carte:active{ transform:translateY(5px); box-shadow:0 3px 0 rgba(0,0,0,.18); }
.continuer-lettre{ flex:0 0 auto; width:76px; height:76px; border-radius:50%; background:rgba(255,255,255,.95); color:var(--tc, var(--accent)); font-size:46px; line-height:1; display:flex; align-items:center; justify-content:center; box-shadow:inset 0 -4px 0 rgba(0,0,0,.1); padding-bottom:6px; }
.continuer-corps{ flex:1 1 auto; display:flex; flex-direction:column; gap:3px; min-width:0; }
.continuer-titre{ font-size:20px; font-weight:800; line-height:1.2; }
.continuer-titre .ar{ display:block; font-size:.8em; opacity:.9; font-weight:700; }
.continuer-sous{ font-size:14px; font-weight:700; opacity:.92; }
.continuer-sous .ar{ font-size:1.3em; }
.continuer-play{ flex:0 0 auto; width:52px; height:52px; border-radius:50%; background:rgba(255,255,255,.25); display:flex; align-items:center; justify-content:center; font-size:22px; animation:playPulse 1.6s ease-in-out infinite; }
@keyframes playPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.1); } }
.raccourcis{ width:min(560px, 100%); display:flex; gap:12px; }
.raccourci{ flex:1 1 0; min-width:0; display:flex; align-items:center; gap:10px; background:#fff; border:3px solid var(--c); border-radius:20px; padding:10px 12px; color:var(--encre); box-shadow:0 5px 0 rgba(0,0,0,.08); cursor:pointer; text-align:left; }
.raccourci:active{ transform:translateY(3px); box-shadow:0 2px 0 rgba(0,0,0,.08); }
.raccourci-icone{ flex:0 0 auto; width:44px; height:44px; border-radius:14px; background:var(--c); display:flex; align-items:center; justify-content:center; font-size:24px; }
.raccourci-texte{ font-size:14px; font-weight:800; line-height:1.25; }
.raccourci-ar{ display:block; font-size:1em; font-weight:700; opacity:.7; }
.ta-emoji{ font-size:44px; line-height:1; }
.ta-new{ position:absolute; top:10px; left:12px; font-size:11px; font-weight:800; background:#fff; color:var(--c, var(--accent)); padding:2px 8px; border-radius:999px; text-transform:uppercase; letter-spacing:.04em; }
#ecran-demarrage .profil-lien{ margin-top:6px; }
/* entrée en cascade des tuiles : petite vie à l'ouverture, jamais bloquante */
/* flex-shrink:0 : l'accueil est une colonne flex défilante -- sans ça, la
   carte Continuer (overflow:hidden) se faisait écraser au lieu de défiler. */
#ecran-demarrage > *{ flex-shrink:0; animation:entreeAccueil 420ms ease both; }
#ecran-demarrage > :nth-child(2){ animation-delay:40ms; }
#ecran-demarrage > :nth-child(3){ animation-delay:80ms; }
#ecran-demarrage > :nth-child(4){ animation-delay:120ms; }
#ecran-demarrage > :nth-child(5){ animation-delay:160ms; }
#ecran-demarrage > :nth-child(6){ animation-delay:200ms; }
#ecran-demarrage > :nth-child(7){ animation-delay:240ms; }
@keyframes entreeAccueil{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }


/* ---------- Alif interactif sur l'accueil (js/mascotte-accueil.js) : toucher, saut, fou rire, étincelles, bulle qui change ---------- */
.accueil-mascotte-cadre{ position:relative; flex:0 0 auto; display:block; line-height:0; cursor:pointer; border-radius:24px; -webkit-tap-highlight-color:transparent; }
.accueil-mascotte-cadre:focus-visible{ outline:4px solid var(--attention); outline-offset:3px; }
.accueil-bulle{ cursor:pointer; }
.accueil-mascotte-cadre.hop{ animation:alifHop .7s ease; }
.accueil-mascotte-cadre.tourne{ animation:alifTourne .9s ease; }
@keyframes alifHop{ 0%{ transform:translateY(0) scale(1,1); } 20%{ transform:translateY(0) scale(1.08,.9); } 50%{ transform:translateY(-22px) scale(.96,1.06) rotate(-4deg); } 80%{ transform:translateY(0) scale(1.06,.94); } 100%{ transform:translateY(0) scale(1,1); } }
@keyframes alifTourne{ 0%{ transform:rotate(0) scale(1); } 40%{ transform:rotate(200deg) scale(1.15); } 100%{ transform:rotate(360deg) scale(1); } }
.accueil-bulle.change{ animation:alifBulle .4s ease; }
@keyframes alifBulle{ 0%{ transform:scale(.93); opacity:.35; } 60%{ transform:scale(1.03); opacity:1; } 100%{ transform:scale(1); } }
.particule{ position:absolute; left:50%; top:25%; font-size:20px; line-height:1; pointer-events:none; opacity:0; animation:alifParticule .95s ease-out forwards; }
@keyframes alifParticule{ 0%{ transform:translate(-50%,0) scale(.5); opacity:0; } 20%{ opacity:1; } 100%{ transform:translate(calc(-50% + var(--dx)), var(--dy)) scale(1.1); opacity:0; } }
@media (prefers-reduced-motion: reduce){ .accueil-mascotte-cadre.hop, .accueil-mascotte-cadre.tourne, .accueil-bulle.change, .particule{ animation:none; } .particule{ display:none; } }

/* bouton de la proposition d'Alif (js/mascotte-accueil.js) : mène au jeu / à la carte / au son proposé */
.accueil-bulle-action{ font-family:inherit; align-self:flex-start; max-width:100%; margin-top:4px; display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:6px 16px 6px 12px; border:0; border-radius:999px; background:var(--accent); color:#fff; font-size:14px; font-weight:800; line-height:1.2; white-space:nowrap; cursor:pointer; box-shadow:0 3px 0 rgba(0,0,0,.2); transition:transform .12s ease, box-shadow .12s ease; animation:alifActionEntre .35s ease .1s both; }
.accueil-bulle-action .ab-ic{ font-size:18px; line-height:1; }
.accueil-bulle-action .ab-fr{ overflow:hidden; text-overflow:ellipsis; }
.accueil-bulle-action .ab-ar{ font-size:1em; font-weight:700; opacity:.85; padding-left:7px; border-left:2px solid rgba(255,255,255,.35); }
.accueil-bulle-action:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(0,0,0,.2); }
.accueil-bulle-action:focus-visible{ outline:4px solid var(--attention); outline-offset:2px; }
.accueil-bulle-action.joue{ animation:alifActionJoue .6s ease; }
@keyframes alifActionEntre{ from{ opacity:0; transform:translateY(6px) scale(.92); } to{ opacity:1; transform:none; } }
@keyframes alifActionJoue{ 0%,100%{ transform:scale(1); } 40%{ transform:scale(1.1); box-shadow:0 0 0 6px rgba(59,47,158,.25), 0 4px 0 rgba(0,0,0,.2); } }
@media (min-width:900px){ .accueil-bulle-action{ align-self:center; } }
@media (prefers-reduced-motion: reduce){ .accueil-bulle-action, .accueil-bulle-action.joue{ animation:none; transition:none; } }

/* 3e ligne de la bulle d'Alif : le même message en tounsi (si l'admin en a écrit un, différent de l'arabe standard) */
.accueil-bulle-texte .tn{ font-size:.88em; font-weight:600; color:#7a6b99; }


/* Mission du jour (ADR-065) : même gabarit que « Continuer l'aventure », en accent doré ; faite = vert + coche. */
.mission-carte{ position:relative; width:min(560px, 100%); display:flex; align-items:center; gap:14px; border:none; border-radius:28px; background:var(--attention-fond); color:#fff; padding:12px 16px; margin-bottom:12px; box-shadow:0 8px 0 rgba(0,0,0,.18); cursor:pointer; text-align:left; transition:transform .12s ease, box-shadow .12s ease; }
.mission-carte:active{ transform:translateY(5px); box-shadow:0 3px 0 rgba(0,0,0,.18); }
.mission-carte.faite{ background:var(--reussite); color:#fff; }
.mission-carte-alif{ width:56px; height:auto; flex:none; }
.mission-points{ display:flex; gap:8px; justify-content:center; margin:6px 0 2px; }
.mission-point{ width:14px; height:14px; border-radius:50%; background:rgba(0,0,0,.15); }
.mission-point.fait{ background:var(--reussite); }
.mission-point.courant{ background:var(--attention-fond); transform:scale(1.3); }
