:root {
  --fond: #0b0b11;
  --fond-2: #13131b;
  --carte: #17171f;
  --trait: rgba(255,255,255,.08);
  --texte: #f4f1ea;
  --doux: rgba(244,241,234,.62);
  --scrub: #5cb8ad;
  --scrub-fonce: #3f978d;
  --rose: #f4a6b8;
  --encre: #1b1b22;
  --police: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(60vmax 50vmax at 85% 110%, rgba(92,184,173,.16), transparent 60%),
    radial-gradient(50vmax 40vmax at 10% -10%, rgba(244,166,184,.12), transparent 60%),
    var(--fond);
  color: var(--texte);
  font-family: var(--police);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Quiz : Boubou pose les questions dans sa bulle, comme dans l'app ---------- */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
.quiz .scene {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px 24px; gap: 6px;
}
.quiz .scene.sort { opacity: 0; transform: scale(.98); filter: blur(6px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), filter .45s var(--ease-out); }

.points { list-style: none; display: flex; gap: 8px; margin: 0 0 14px; padding: 0; min-height: 8px; transition: opacity .3s ease; }
.points.vide { opacity: 0; }
.points li { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.16);
  transition: width .45s var(--ease-in-out), background-color .3s ease; }
.points li.ici { width: 22px; background: var(--texte); }
.points li.fait { background: var(--scrub); }

.bulle {
  position: relative; width: min(100%, 400px);
  background: #fff; color: var(--encre);
  border-radius: 26px; padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.contenu.anime { overflow: hidden; }
.bulle::after { /* la petite queue vers Boubou */
  content: ""; position: absolute; bottom: -13px; left: 50%; margin-left: 36px;
  border: 14px solid transparent; border-top-color: #fff; border-bottom: 0;
  transform: skewX(-24deg);
}
.entre { animation: entre .6s var(--ease-out) backwards; }
.perso.entre { animation-delay: .12s; }
@keyframes entre { from { opacity: 0; transform: translateY(14px) scale(.97); filter: blur(4px); } }

.sur { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--scrub-fonce); }
.bulle h1 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.texte { margin: 8px 0 0; font-size: 16px; line-height: 1.45; color: rgba(27,27,34,.72); }
.texte strong { color: var(--encre); }
#zone:empty { display: none; }
#zone { margin-top: 16px; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 18px; width: 100%; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 99px; background: var(--encre); color: #fff;
  font-size: 16px; font-weight: 700; text-decoration: none;
  transition: transform .16s var(--ease-out), opacity .2s ease, background-color .2s ease;
}
.bouton:active { transform: scale(.97); }
.bouton:disabled { opacity: .28; cursor: default; transform: none; }
.bouton:focus-visible, .choix button:focus-visible, .cal button:focus-visible { outline: 3px solid var(--scrub); outline-offset: 2px; }

.choix { display: grid; gap: 10px; }
.choix button {
  position: relative; min-height: 52px; border-radius: 16px; border: 2px solid #ececf0; background: #f6f6f8;
  font-size: 17px; font-weight: 700; text-align: left; padding: 0 48px 0 18px;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .16s var(--ease-out);
}
.choix button:active { transform: scale(.98); }
.choix button.choisi { border-color: var(--scrub); background: #eaf6f4; }
.choix button::after { /* la coche */
  content: "✓"; position: absolute; right: 18px; top: 50%; font-size: 18px; color: #fff;
  opacity: 0; transform: translateY(-50%) scale(.5);
  transition: opacity .2s ease, transform .35s var(--ease-out);
}
.choix button.juste { border-color: var(--scrub); background: var(--scrub); color: #fff; }
.choix button.juste::after { opacity: 1; transform: translateY(-50%) scale(1); }
.choix button.faux { border-color: #f1b8b8; background: #fdeeee; color: #a33; }
.choix.fige button:not(.juste):not(.faux) { opacity: .45; transition: opacity .25s ease; }

.mot {
  width: 100%; min-height: 52px; border-radius: 16px; border: 2px solid #ececf0; background: #f6f6f8;
  padding: 0 18px; font: inherit; font-size: 18px; font-weight: 700; color: var(--encre); outline: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.mot:focus { border-color: var(--scrub); background: #fff; }
.mot.juste { border-color: var(--scrub); background: #eaf6f4; }
.mot.faux { border-color: #f1b8b8; background: #fdeeee; color: #a33; }

.cal { user-select: none; }
.cal-tete { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.cal-tete span { flex: 1; text-align: center; font-weight: 800; font-size: 16px; text-transform: capitalize; }
.cal-tete button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #f2f2f5; font-size: 17px; font-weight: 700;
  transition: background-color .15s ease, transform .16s var(--ease-out); }
.cal-tete button:active { transform: scale(.92); }
.cal-fenetre { overflow: hidden; }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-j { text-align: center; font-size: 12px; font-weight: 700; color: rgba(27,27,34,.4); padding-bottom: 4px; }
.cal-grille button { aspect-ratio: 1; border: 0; border-radius: 12px; background: transparent; font-size: 15px; font-weight: 600;
  transition: background-color .15s ease, color .15s ease, transform .16s var(--ease-out); }
.cal-grille button:active { transform: scale(.9); }
.cal-grille button.choisi { background: var(--scrub); color: #fff; animation: pop .35s var(--ease-out); }
.cal-grille button.juste { background: var(--scrub); color: #fff; }
.cal-grille button.faux { background: #f6c9c9; color: #a33; }
@keyframes pop { from { transform: scale(.7); } }
.cal-choisi { margin: 10px 0 0; min-height: 20px; font-size: 14px; font-weight: 700; color: var(--scrub-fonce); text-align: center; }

@media (hover: hover) and (pointer: fine) {
  .bouton:not(:disabled):hover { background: #000; }
  .choix button:not(.choisi):not(.juste):not(.faux):hover { border-color: #d9d9e0; }
  .cal-tete button:hover { background: #e7e7ec; }
  .cal-grille button:not(.choisi):hover { background: #f2f2f5; }
}

/* Boubou : trois couches qui ne se gênent pas (penché vers la souris / saut / respiration) */
.perso { width: 190px; margin: 6px 0 0 120px; transform-origin: 50% 100%; will-change: transform; }
.hop { transform-origin: 50% 100%; }
.souffle { display: grid; transform-origin: 50% 100%; animation: respire 3.6s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.pose { grid-area: 1 / 1; width: 100%; opacity: 0; transform: scale(.94); filter: blur(3px);
  transition: opacity .22s ease, transform .4s var(--ease-out), filter .22s ease; }
.pose.on { opacity: 1; transform: none; filter: none; }

/* pages fixes (porte fermée, bientôt) */
.boubou { width: 190px; margin: 6px 0 0 120px; animation: entre .6s var(--ease-out) .12s backwards; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
@keyframes respire { 0%,100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985) translateY(1px); } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- La maison de Jeanne (après la porte) ---------- */
.maison main { width: min(100% - 32px, 860px); margin: 0 auto; padding: 56px 0 40px; }
.accueil { text-align: center; display: flex; flex-direction: column; align-items: center; }
.accueil > * { animation: entre .7s var(--ease-out) backwards; }
.accueil > :nth-child(2) { animation-delay: .08s; } .accueil > :nth-child(3) { animation-delay: .14s; }
.accueil > :nth-child(4) { animation-delay: .2s; } .accueil > :nth-child(5) { animation-delay: .26s; } .accueil > :nth-child(6) { animation-delay: .32s; }
.revele { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.revele.vu { opacity: 1; transform: none; }
.accueil .boubou { width: 220px; margin: 0 0 10px; }
.flotte { animation: flotte 4.2s ease-in-out infinite; }
@keyframes flotte { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
.accueil .sur { color: var(--rose); font-size: 15px; }
.accueil h1 { margin: 4px 0 0; font-size: clamp(32px, 6vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; max-width: 14ch; }
.chapo { max-width: 34em; margin: 18px 0 0; font-size: 18px; line-height: 1.55; color: var(--doux); }
.bouton.gros { width: auto; margin-top: 28px; min-height: 56px; padding: 0 30px; font-size: 18px; background: var(--scrub); color: #06211e; box-shadow: 0 12px 30px rgba(92,184,173,.28); }
.bouton.gros:hover { background: #6cc6bb; }
.petit { margin: 12px 0 0; font-size: 14px; color: rgba(244,241,234,.45); }

.bloc { margin-top: 72px; }
.bloc h2 { margin: 0 0 18px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.etapes li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: var(--carte); border: 1px solid var(--trait); border-radius: 20px; font-size: 16px; line-height: 1.5; color: var(--doux); }
.etapes li strong { color: var(--texte); }
.etapes span { flex: none; width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; background: rgba(92,184,173,.16); color: var(--scrub); font-weight: 800; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cartes article { padding: 18px 20px 20px; background: var(--carte); border: 1px solid var(--trait); border-radius: 22px; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), border-color .25s ease; }
@media (hover: hover) and (pointer: fine) { .cartes article.vu:hover { transform: translateY(-3px); border-color: rgba(92,184,173,.35); } }
.cartes img { width: 84px; margin: -4px 0 6px -8px; }
.cartes h3 { margin: 0; font-size: 18px; font-weight: 800; }
.cartes p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--doux); }
.fin { display: flex; align-items: center; gap: 18px; padding: 22px 24px; background: linear-gradient(135deg, rgba(244,166,184,.14), rgba(92,184,173,.1)); border: 1px solid var(--trait); border-radius: 24px; }
.fin img { width: 100px; flex: none; }
.fin p { margin: 0; font-size: 17px; line-height: 1.55; }
footer { margin-top: 48px; text-align: center; font-size: 14px; color: rgba(244,241,234,.4); }

@media (max-width: 520px) {
  .boubou, .perso { margin-left: 70px; width: 160px; }
  .fin { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  /* moins de mouvement, mais on garde les fondus qui aident à comprendre */
  *, *::before, *::after { animation: none !important; }
  .perso, .hop, .pose, .revele, .scene.sort { transform: none !important; filter: none !important; }
  .pose { transition: opacity .2s ease; }
  .revele { opacity: 1; }
}
