/* KOMPA-197 : les trois écrans de la première ouverture, après la page qui défile : adulte (#accueil), enfant (#hello), adoption (#choose).
   Même langage que la page qui défile (css/landing.css) : fond de couleur franche en dégradé doux qui couvre toute la fenêtre (.ob-fond,
   même formule que .lp-fond), cartes blanches arrondies, nuages de pensée (classe .lp-bulle reprise telle quelle), paillettes (lpGlitter),
   animaux habillés sauf celui qu'on adopte (un nouvel animal n'a aucun habit). La colonne reste celle du téléphone (.app, 480 px au plus).
   Texte >= 15 px et >= 4.5:1 sur le fond réel, boutons et champs >= 44 px. Mouvement : transform et opacity seulement ;
   prefers-reduced-motion : rien ne bouge, rien n'est caché. Mesuré par tools/tests/mise-en-page-onboarding.js. */

/* ---------- commun ---------- */
.ob{--btn:#C93463;--btn-sh:#A92F57;color:var(--t1)}
.ob-a{--b:#FF9EC4;--b1:#FFD1E3;--b2:#FFB86B;--t1:#3B1430;--t2:#5A1F48}
.ob-h{--b:#FFC796;--b1:#FFE3A3;--b2:#FFAE8A;--t1:#4A2414;--t2:#6B3420}
.ob-c{--b:#8EE6B8;--b1:#C8F7DA;--b2:#5FD6A4;--t1:#0E3A28;--t2:#144A33}
/* le fond : fixe, toute la fenêtre (même sur grand écran, autour de la colonne), derrière le contenu (.app est un contexte d'empilement) */
.ob-fond{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;
  background:radial-gradient(115% 62% at 8% 100%,var(--b1),transparent 72%),radial-gradient(85% 55% at 100% 28%,var(--b2),transparent 70%),var(--b)}
.ob-fond b{position:absolute;border-radius:50%;opacity:.4;background:radial-gradient(circle at 36% 32%,#fff,rgba(255,255,255,.55) 45%,rgba(255,255,255,0) 70%);animation:lpDrift 12s ease-in-out infinite alternate}
.ob-fond b:nth-child(1){left:-10%;top:2%;width:44vmin;height:44vmin}
.ob-fond b:nth-child(2){right:-8%;top:34%;width:30vmin;height:30vmin;animation-delay:-5s;animation-duration:14s}
.ob-fond b:nth-child(3){left:6%;bottom:4%;width:22vmin;height:22vmin;animation-delay:-8s}
.ob-fond b:nth-child(n+4){width:12px;height:12px;border-radius:2px;background:#fff;opacity:1;animation:lpGlitter 3s ease-in-out infinite}
.ob-fond b:nth-child(4){left:90%;top:9%}
.ob-fond b:nth-child(5){left:3%;top:52%;animation-delay:-1s;animation-duration:2.6s}
.ob-fond b:nth-child(6){left:93%;top:80%;animation-delay:-2s;animation-duration:3.4s}
.ob-fond b:nth-child(7){left:46%;top:3%;width:9px;height:9px;animation-delay:-.6s}
.ob-side{display:none}
.ob h1{color:var(--t1);text-shadow:0 3px 0 rgba(255,255,255,.7)}
.ob p,.ob li,.ob label,.ob h1{text-wrap:balance}
.ob .note{color:var(--t2)}
.ob .primary{flex:none;min-height:52px;font-size:20px;background:var(--btn);box-shadow:0 0 0 3px #fff,0 6px 14px rgba(40,20,60,.22)}
.ob .primary:active{transform:translateY(2px);box-shadow:0 0 0 3px #fff,0 2px 6px rgba(40,20,60,.22)}
.ob .acc-steps{display:flex;gap:6px;flex:none}
.ob .acc-steps span{font-family:var(--font-display);font-weight:600;font-size:15px;padding:3px 12px;border-radius:99px;background:#fff;color:var(--t2);box-shadow:0 2px 0 rgba(40,20,60,.1)}
.ob .acc-steps span.on{background:var(--btn);color:#fff}
/* entrée en cascade (backwards : plus rien d'actif une fois finie) ; les boutons du bas apparaissent sans glisser */
.ob>:not(.ob-fond){animation:obIn .4s cubic-bezier(.25,1.3,.5,1) backwards}
.ob>:nth-child(3){animation-delay:.05s}.ob>:nth-child(4){animation-delay:.1s}.ob>:nth-child(5){animation-delay:.15s}
.ob>:nth-child(6){animation-delay:.2s}.ob>:nth-child(7){animation-delay:.25s}.ob>:nth-child(n+8){animation-delay:.3s}
.ob>.primary,.ob>.ghost,.ob>.adoptbar{animation-name:obFade}
@keyframes obIn{from{opacity:0;transform:translateY(12px) scale(.97)}}
@keyframes obFade{from{opacity:0}}
@keyframes heroCycle{0%{opacity:0;transform:scale(.85)}3%{opacity:1;transform:scale(1)}18%{opacity:1;transform:scale(1)}21%,100%{opacity:0;transform:scale(1)}}
@keyframes earL{0%,40%,100%{transform:none}55%{transform:skewX(-12deg)}70%{transform:skewX(6deg)}}
@keyframes earR{0%,40%,100%{transform:none}55%{transform:skewX(12deg)}70%{transform:skewX(-6deg)}}
@keyframes hmouth{0%{opacity:0}55%{opacity:1}65%{opacity:0}72%{opacity:1}82%,100%{opacity:0}}

/* ---------- écran adulte : rose, comme l'ouverture de la page qui défile ---------- */
.ob-a{gap:7px;justify-content:flex-start}
.ob-a>.acc-top{margin-top:auto}
.ob-a>#accGo{margin-bottom:auto}
.acc-top{display:flex;align-items:center;gap:12px}
.acc-tt{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.ob-a h1{font-size:36px;line-height:1}
.acc-hero{width:86px;height:86px;flex:none;border-radius:50%;background:var(--tint,#FFD3E0);padding:6px;box-shadow:0 0 0 4px #fff,0 8px 14px rgba(40,20,60,.16)}
.acc-hero svg{width:100%;height:100%;display:block;animation:bob 1.2s ease-in-out infinite}
.acc-hero .earL,.acc-hero .earR{transform-box:fill-box;transform-origin:50% 100%;animation:earL 2.6s ease-in-out infinite}
.acc-hero .earR{animation-name:earR;animation-delay:.3s}
.acc-hero .hmouth{opacity:0;animation:hmouth 3.2s steps(1) infinite}
.forParents{list-style:none;margin:0;padding:9px 14px;border-radius:20px;background:#fff;color:var(--ink);display:flex;flex-direction:column;gap:3px;font-size:15px;line-height:1.3;box-shadow:0 4px 0 rgba(40,20,60,.1)}
.forParents li{position:relative;padding-left:18px}
.forParents li::before{content:"";position:absolute;left:0;top:.42em;width:9px;height:9px;border-radius:50%;background:#FF7FA3}
.forParents li:nth-child(2)::before{background:#FFC93C}
.forParents li:nth-child(3)::before{background:#5FD6A4}
.ob .acc-h{margin:2px 0 0;font-family:var(--font-display);font-weight:600;font-size:17px;line-height:1.2;color:var(--t1)}
.acc-cl{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.acc-cl button{grid-column:span 2;min-width:0;min-height:48px;white-space:nowrap;border-radius:18px;background:#fff;color:var(--ink);font-family:var(--font-display);font-weight:600;font-size:22px;box-shadow:0 4px 0 rgba(40,20,60,.12);transition:transform .15s,background-color .15s}
.acc-cl button.mix2{grid-column:span 3;font-size:20px}
.acc-cl button[aria-checked="true"]{background:var(--btn);color:#fff;box-shadow:0 0 0 3px #fff,0 4px 0 var(--btn-sh);transform:translateY(-2px)}
.acc-pin{display:flex;gap:8px}
.acc-pin input{flex:1;min-width:0;height:50px;border-radius:18px;border:3px solid #fff;background:#fff;color:var(--ink);padding:0 12px;font-family:var(--font-display);font-weight:600;font-size:22px;letter-spacing:4px;text-align:center;box-shadow:0 4px 0 rgba(40,20,60,.12)}
.acc-pin input::placeholder{letter-spacing:0;font-size:16px;color:#7E6E88}
/* le petit nuage : l'explication ; un message d'erreur prend sa place (même nuage, texte rouge doux) */
.ob .acc-nuage{display:block;max-width:none;margin:12px 4px 4px;padding:6px 16px;font-size:15px;line-height:1.3;text-align:center}
.ob .acc-nuage::after{bottom:auto;top:-14px;left:30px;width:10px;height:10px;box-shadow:-9px -7px 0 -2px #fff}
.ob .acc-nuage p{margin:0;font-family:var(--font-body);font-weight:700}
.ob .acc-expl{color:var(--ink)}
.ob .acc-err{color:#A8204F}
.acc-err:empty{display:none}
.acc-err:not(:empty)+.acc-expl{display:none}

/* ---------- écran enfant : orangé, un animal habillé qui demande le prénom dans un nuage ---------- */
.ob-h{justify-content:center;gap:10px}
.ob-h .acc-steps{justify-content:center}
.ob-h h1{font-size:40px;line-height:1;text-align:center}
.ob .hello-q.lp-bulle{align-self:center;max-width:100%;margin:6px 0 14px;padding:8px 22px;font-size:21px;text-align:center}
.ob .hello-q.lp-bulle::after{left:calc(50% - 2px);bottom:-15px}
.helloPets{position:relative;width:min(44vw,176px);aspect-ratio:1;margin:0 auto;flex:none}
.helloPets .hp{position:absolute;inset:0;background:var(--tint);border-radius:50%;padding:12px;box-shadow:0 0 0 5px #fff,0 10px 18px rgba(60,30,10,.16);opacity:0;animation:heroCycle 10s linear infinite}
.helloPets .hp svg{width:100%;height:100%;display:block;animation:bob 1.2s ease-in-out infinite}
.ob-h .field{gap:4px}
#kidName{height:60px;border-radius:20px;border:3px solid #fff;text-align:center;font-size:26px;font-weight:600;box-shadow:0 4px 0 rgba(60,30,10,.14)}
#kidName::placeholder{color:#8A7466}
.ob .kid-hint{margin:0;min-height:20px;font-size:15px;font-weight:700;color:var(--t2);text-align:center}
.ob .kid-hint.bad{color:#9E1640}
.ob-h .ghost{min-height:48px;padding:10px 16px;border:0;border-radius:99px;background:#fff;color:var(--t1);text-align:center;font-size:17px;box-shadow:0 4px 0 rgba(60,30,10,.12)}

/* ---------- adoption : vert d'eau ; l'animal à adopter reste nu (on l'habille ensuite dans la boutique) ---------- */
.ob-c{gap:10px}
.ob-c h1{font-size:34px;line-height:1.05;text-align:center}
.ch-top{display:flex;flex-direction:column;align-items:center;gap:2px}
.ob-c .ghost.back{align-self:stretch;background:#fff;border-color:#fff;color:var(--t1);text-align:center;border-radius:99px}
.ch-head{display:flex;align-items:center;justify-content:center;gap:16px;flex:none}
.ch-pv{position:relative;flex:none}
.ob-c .preview{width:150px;margin:0;border-radius:30px;box-shadow:0 0 0 4px #fff,0 10px 18px rgba(14,58,40,.18)}
.ob-c .preview svg{animation:bob 1.3s ease-in-out infinite}
.ch-sp{position:absolute;width:14px;height:14px;border-radius:2px;background:#FFF4B8;box-shadow:0 0 8px 2px rgba(255,255,255,.8);animation:lpGlitter 2.4s ease-in-out infinite;transform:rotate(45deg)}
.ch-sp:nth-of-type(1){left:-14px;top:12%}
.ch-sp:nth-of-type(2){right:-12px;top:-8px;width:10px;height:10px;animation-delay:-.8s}
.ch-sp:nth-of-type(3){right:-16px;bottom:16%;animation-delay:-1.6s}
.ob .ch-nuage.lp-bulle{margin:6px 0 6px 8px;max-width:170px;font-size:19px;text-align:center;color:#3A2440}
.ob .ch-nuage.lp-bulle::after{left:-14px;bottom:auto;top:calc(50% - 4px);box-shadow:-8px 7px 0 -2px #fff}
.pick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.ob-c .card{border:3px solid #fff;box-shadow:0 4px 0 rgba(14,58,40,.14)}
.ob-c .card[aria-checked="true"]{border-color:var(--btn);box-shadow:0 0 0 3px #fff,0 6px 10px rgba(14,58,40,.2)}
.adoptbar{display:flex;flex-direction:column;gap:10px}
/* prénom + « Adopter » : une carte blanche collée en bas, à toutes les tailles */
.ob-c .adoptbar{position:sticky;bottom:-4px;z-index:2;background:#fff;border-radius:24px;padding:10px 12px 12px;box-shadow:0 -4px 16px rgba(14,58,40,.16)}
.ob-c .adoptbar label{color:var(--ink);font-family:var(--font-display);font-weight:600;font-size:16px}
.ob-c .adoptbar .primary{box-shadow:0 4px 0 var(--btn-sh)}
.ob-c .ch-fin{text-align:center;padding:0 6px}

/* ---------- petits écrans ---------- */
@media (max-height:760px){.ob-c .preview{width:110px}.ob-c h1{font-size:30px}}
@media (max-height:600px){
  .ob-a{gap:4px}
  .ob-a h1{font-size:30px}
  .acc-tt{gap:4px}
  .acc-hero{width:56px;height:56px;padding:4px;box-shadow:0 0 0 3px #fff,0 6px 10px rgba(40,20,60,.16)}
  .forParents{padding:6px 14px;gap:1px;line-height:1.25}
  .ob .acc-h{margin:0}
  .acc-cl{gap:6px}
  .acc-cl button,.acc-pin input{min-height:44px;height:44px}
  .ob .acc-nuage{margin:10px 4px 2px;padding:4px 14px}
  .ob .acc-nuage::after{top:-11px;width:8px;height:8px;box-shadow:-7px -5px 0 -1px #fff}
  .ob-a .primary{min-height:48px}
  .ob-h{gap:6px}.ob-h h1{font-size:34px}.helloPets{width:min(36vw,140px)}
}

/* ---------- grand écran : la colonne reste au milieu, le fond et deux animaux habillés (décor) l'entourent ---------- */
@media (min-width:768px){
  .ob-side{display:block;position:absolute;--w:clamp(110px,calc((100vw - 600px) / 2),230px);width:var(--w);aspect-ratio:1;object-fit:contain;bottom:12vh;
    padding:calc(var(--w) * .1);border-radius:50%;background:var(--tint);box-shadow:0 0 0 5px #fff,0 14px 24px rgba(40,20,60,.16);image-rendering:pixelated;
    left:calc((100vw - 480px) / 4 - var(--w) / 2);animation:lpFloat 5s ease-in-out infinite}
  .ob-side+.ob-side{left:auto;right:calc((100vw - 480px) / 4 - var(--w) / 2);bottom:auto;top:14vh;animation-delay:-2.5s}
  .ob-fond b:nth-child(4){left:14%;top:14%}.ob-fond b:nth-child(6){left:84%;top:72%}
  .ob-fond b:nth-child(n+4){width:16px;height:16px}
}

@media (prefers-reduced-motion:reduce){
  .ob *,.ob *::before,.ob *::after{animation:none!important;transition:none!important}
  .ob .helloPets .hp:first-child{opacity:1}
  .ob .helloPets .hp:not(:first-child){display:none}
}
