/* ==========================================================================
   Devine-moi — styles
   Direction : papier crème, encre violette, couleurs franches, contours épais
   et ombres « autocollant ». Chaque thème a sa couleur (--accent).
   ========================================================================== */

:root {
  --bg: #FFF3E4;
  --ink: #1D1530;
  --ink-2: #5B5070;
  --paper: #FFFFFF;
  --paper-2: #FFF8EE;
  --yellow: #FFD23F;
  --pink: #FF7EB0;
  --mint: #6EE0B0;
  --orange: #FF9F5A;
  --lilac: #B9A4FF;
  --sky: #7CCBFF;
  --good: #22B573;
  --good-ink: #0E7445;
  --good-bg: #D2F7E4;
  --bad: #FF4D6D;
  --bad-ink: #B8173A;
  --bad-bg: #FFDCE3;
  --accent: var(--yellow);

  --bw: 2.5px;
  --r: 22px;
  --r-sm: 14px;
  --sh-sm: 3px 3px 0 var(--ink);
  --sh: 5px 5px 0 var(--ink);
  --sh-lg: 8px 8px 0 var(--ink);
  --font: 'Bricolage Grotesque', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bounce: cubic-bezier(.2, 1.4, .4, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(29, 21, 48, .1) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
mark { background: none; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
.noscript { padding: 24px; text-align: center; font-weight: 700; }

/* ---------- Mise en page ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.screen {
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.screen.narrow { max-width: 580px; min-height: 100vh; min-height: 100dvh; }
.screen.home { max-width: 1140px; gap: 0; }
.center-screen { display: grid; place-items: center; }

/* ---------- En-tête ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; padding-top: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; text-decoration: none; }
.logo-mark { width: 38px; height: 38px; flex: none; transform: rotate(-7deg); transition: transform .25s var(--bounce); }
a.brand:hover .logo-mark { transform: rotate(5deg) scale(1.08); }

/* ---------- Typo ---------- */
.display { font-size: clamp(2.65rem, 10.5vw, 5.1rem); font-weight: 800; line-height: .98; letter-spacing: -.04em; }
.display mark {
  display: inline-block;
  padding: 0 .14em .04em;
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: .2em;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2.5deg);
  line-height: 1.04;
}
.h1 { font-size: clamp(1.75rem, 6.5vw, 2.3rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; }
.h2 { font-size: clamp(1.9rem, 6.5vw, 2.8rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; }
.h3 { font-size: 1.22rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.lead { font-size: clamp(1.06rem, 3.6vw, 1.28rem); color: var(--ink-2); max-width: 36ch; font-weight: 500; }
.muted { color: var(--ink-2); }
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--ink-2); }
.center { text-align: center; }

/* ---------- Étiquettes ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 700; font-size: .9rem; line-height: 1.1; white-space: nowrap;
}
.tag-sm { padding: 4px 10px; font-size: .8rem; }
.tag-white { background: var(--paper); }
.tilt { transform: rotate(-3deg); }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--paper);
  --btn-sh: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  box-shadow: 4px 4px 0 var(--btn-sh);
  color: var(--ink);
  font-weight: 700; font-size: 1.02rem; line-height: 1.15;
  text-align: center; text-decoration: none;
  user-select: none;
  transition: transform .1s ease, box-shadow .1s ease, background-color .15s, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--btn-sh); }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--btn-sh); }
.btn:disabled { background: #F3ECE2; color: #7D7290; border-style: dashed; box-shadow: none; }
.btn-primary { --btn-bg: var(--accent); }
.btn-dark { --btn-bg: var(--ink); color: #fff; }
.btn-danger { --btn-bg: var(--bad); }
.btn-sm { padding: 9px 14px; font-size: .92rem; box-shadow: 3px 3px 0 var(--btn-sh); }
.btn-big { width: 100%; padding: 17px 22px; font-size: 1.16rem; font-weight: 800; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; padding: 8px 10px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.btn-ghost:hover:not(:disabled), .btn-ghost:active:not(:disabled) { transform: none; box-shadow: none; background: rgba(29, 21, 48, .06); }
.link-btn { align-self: center; padding: 8px 12px; font-weight: 700; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* ---------- Cartes ---------- */
.card {
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 22px;
}

/* ---------- Avatars ---------- */
.av {
  display: inline-grid; place-items: center; flex: none;
  border: var(--bw) solid var(--ink); border-radius: 50%;
  background: #FFE0EC;
  line-height: 1;
}
.av.p1 { background: #DCF0FF; }
.av-sm { width: 30px; height: 30px; font-size: 1rem; border-width: 2px; }
.av-md { width: 40px; height: 40px; font-size: 1.3rem; }
.av-lg { width: 54px; height: 54px; font-size: 1.8rem; }
.av-xl { width: 86px; height: 86px; font-size: 2.9rem; box-shadow: var(--sh-sm); }
.av.ghost { background: var(--paper-2); border-style: dashed; color: var(--ink-2); font-weight: 800; font-size: 2rem; animation: pulse 1.8s ease-in-out infinite; }

/* ---------- Formulaire joueur ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 700; font-size: .95rem; }
.input {
  width: 100%;
  padding: 14px 16px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-size: 1.12rem; font-weight: 600;
  transition: box-shadow .12s, transform .12s, background-color .12s;
}
.input::placeholder { color: #A499B5; font-weight: 500; }
.input:focus { outline: none; background: #fff; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-opt {
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-size: 1.55rem; line-height: 1;
  border: 2px solid transparent; border-radius: 14px;
  background: var(--paper-2);
  transition: transform .15s var(--bounce), background-color .15s;
}
.av-opt:hover { transform: scale(1.08) rotate(-5deg); }
.av-opt.on { border-color: var(--ink); background: var(--accent); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-5deg); }
.form-theme {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 8px 8px 14px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: var(--accent);
  font-weight: 600;
}
.form-theme:empty { display: none; }
.form-theme .x { width: 30px; height: 30px; border-radius: 9px; font-weight: 800; }
.form-theme .x:hover { background: rgba(255, 255, 255, .55); }
.fine { text-align: center; font-size: .88rem; color: var(--ink-2); font-weight: 600; margin-top: -4px; }

/* ---------- Accueil ---------- */
.hero { display: grid; gap: 34px; padding: 14px 0 44px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero-copy .form { width: 100%; max-width: 470px; margin-top: 4px; }
.hero-art { position: relative; width: 100%; max-width: 470px; height: 400px; margin: 0 auto; }

.mock { position: absolute; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-lg); }
.mock-q { left: 1%; top: 30px; width: min(330px, 87%); padding: 18px; transform: rotate(-3.5deg); animation: bob 6s ease-in-out infinite; }
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mock-n { font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.mock-role { display: inline-block; margin-bottom: 10px; padding: 5px 10px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700; font-size: .8rem; }
.mock-text { margin-bottom: 12px; font-weight: 800; font-size: 1.38rem; line-height: 1.1; letter-spacing: -.02em; }
.mock-opt { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-weight: 700; }
.mock-opt b { width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper-2); font-size: .78rem; }
.mock-opt.on { background: var(--accent); box-shadow: 2px 2px 0 var(--ink); }
.mock-opt.on b { background: var(--ink); color: #fff; }
.mock-stamp {
  position: absolute; z-index: 2; right: 0; top: 0;
  padding: 9px 16px;
  border: 3px solid var(--good-ink); border-radius: 12px;
  background: var(--good-bg); color: var(--good-ink);
  box-shadow: 4px 4px 0 var(--good-ink);
  font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em;
  transform: rotate(9deg);
  animation: bob 5s ease-in-out -1.5s infinite;
}
.mock-score { z-index: 1; right: 0; bottom: 16px; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--yellow); transform: rotate(4deg); animation: bob 7s ease-in-out -3s infinite; }
.mock-score b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.mock-score small { font-weight: 700; font-size: .85rem; }
.mock-avs { display: flex; }
.mock-avs .av + .av { margin-left: -10px; }
.float-emoji { position: absolute; font-size: 2.3rem; animation: bob 4.5s ease-in-out infinite; }
.float-emoji.e1 { left: 2%; bottom: 34px; rotate: -12deg; }
.float-emoji.e2 { right: 22%; top: 44%; animation-delay: -2s; rotate: 10deg; }

.section { display: flex; flex-direction: column; gap: 26px; padding: 44px 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head .lead { max-width: 46ch; }

.steps { display: grid; gap: 26px; padding-top: 10px; }
.step { position: relative; display: flex; flex-direction: column; gap: 8px; padding-top: 28px; }
.step-n {
  position: absolute; top: -18px; left: 18px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: var(--bw) solid var(--ink); border-radius: 50%;
  background: var(--accent); box-shadow: var(--sh-sm);
  font-weight: 800; font-size: 1.1rem;
}
.step-emoji { font-size: 2.3rem; line-height: 1.1; }
.step h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.step p { color: var(--ink-2); }

.theme-cards {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 4px 16px 18px;
}
.theme-cards::-webkit-scrollbar { display: none; }
.theme-card {
  flex: 0 0 min(80%, 300px);
  scroll-snap-align: center;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; text-align: left;
  border: var(--bw) solid var(--ink); border-radius: var(--r);
  background: var(--accent); box-shadow: var(--sh);
  transition: transform .15s var(--bounce), box-shadow .15s;
}
.theme-card:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: var(--sh-lg); }
.theme-card:active { transform: translate(3px, 3px); box-shadow: var(--sh-sm); }
.tc-top { display: flex; align-items: center; justify-content: space-between; }
.tc-emoji { font-size: 2.5rem; line-height: 1; }
.tc-count { padding: 4px 10px; border: 2px solid var(--ink); border-radius: 999px; background: rgba(255, 255, 255, .75); font-weight: 700; font-size: .8rem; }
.theme-card h3 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.theme-card p { font-weight: 600; }
.bubble { margin-top: 4px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px 14px 14px 4px; background: #fff; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.tc-cta { margin-top: auto; padding-top: 6px; font-weight: 800; font-size: .92rem; }

.final-card {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 40px 22px; text-align: center;
  background: var(--ink); color: #fff;
  box-shadow: 8px 8px 0 var(--pink);
}
.final-card .h2 { max-width: 16ch; }
.final-card .btn { max-width: 360px; border-color: #fff; --btn-sh: #fff; }
.foot { padding: 26px 0 6px; text-align: center; color: var(--ink-2); font-weight: 600; font-size: .9rem; }

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
}
@media (min-width: 940px) {
  .hero { grid-template-columns: 1.08fr .92fr; gap: 40px; min-height: min(calc(100dvh - 76px), 820px); padding: 4px 0 56px; }
  .hero-copy { gap: 18px; }
  .display { font-size: 4.5rem; }
  .av-opt { aspect-ratio: auto; height: 50px; }
  .hero-art { height: 480px; max-width: 500px; }
  .mock-q { top: 64px; width: 370px; padding: 22px; }
  .mock-text { font-size: 1.7rem; }
  .mock-stamp { top: 22px; font-size: 1.6rem; }
  .mock-score { bottom: 34px; }
  .float-emoji.e1 { bottom: 26px; }
  .section { padding: 64px 0; }
}

/* ---------- Invitation ---------- */
.invite-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 22px 26px; text-align: center; background: #fff; background: color-mix(in srgb, var(--accent) 22%, white); }
.inv-av { width: 96px; height: 96px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--accent); box-shadow: var(--sh); font-size: 3.3rem; line-height: 1; animation: wiggle 2.6s ease-in-out infinite; }
.invite-card .muted { max-width: 38ch; }
.gone { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 22px; text-align: center; }
.gone .btn { margin-top: 10px; }
.big-emoji { font-size: 4rem; line-height: 1.1; }

/* ---------- Salon ---------- */
.lobby-head { display: flex; flex-direction: column; gap: 6px; }
.players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 24px 12px 20px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.slot b { font-size: 1.12rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.slot small { color: var(--ink-2); font-weight: 600; }
.slot.off { opacity: .55; }
.slot-av { position: relative; margin-bottom: 4px; }
.crown { position: absolute; top: -16px; right: -10px; font-size: 1.5rem; transform: rotate(18deg); }
.vs { width: 46px; height: 46px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--accent); box-shadow: var(--sh-sm); font-weight: 800; transform: rotate(-8deg); }

.invite { display: flex; flex-direction: column; gap: 14px; }
.code { display: flex; justify-content: center; gap: 8px; margin: 4px 0; }
.code span { width: 48px; height: 58px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--accent); box-shadow: var(--sh-sm); font-weight: 800; font-size: 1.7rem; }
.code span:nth-child(odd) { transform: rotate(-3deg); }
.code span:nth-child(even) { transform: rotate(3deg); }
.link-row { display: flex; gap: 8px; }
.link-input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.share-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }

.settings { display: flex; flex-direction: column; gap: 14px; }
.settings-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.settings-head small { color: var(--ink-2); font-weight: 600; }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.theme-opt {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px; text-align: left;
  border: var(--bw) solid var(--ink); border-radius: 16px;
  background: #fff; box-shadow: var(--sh-sm);
  transition: transform .1s, box-shadow .1s, background-color .15s, opacity .2s;
}
.theme-opt:hover:not(:disabled) { background: #fff; background: color-mix(in srgb, var(--accent) 28%, white); }
.theme-opt:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.theme-opt.on, .theme-opt.on:hover:not(:disabled) { background: var(--accent); }
.theme-opt.on::after {
  content: '✓';
  position: absolute; top: 8px; right: 9px;
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: #fff;
  font-size: .72rem; font-weight: 800;
}
.theme-opt:disabled:not(.on) { opacity: .42; box-shadow: none; }
.to-emoji { font-size: 1.6rem; line-height: 1.15; }
.to-label { font-weight: 800; font-size: 1.04rem; }
.to-desc { font-size: .8rem; color: var(--ink-2); font-weight: 600; line-height: 1.25; }
.theme-opt.on .to-desc { color: var(--ink); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: var(--bw) solid var(--ink); border-radius: 14px; background: #fff; box-shadow: var(--sh-sm); }
.seg-opt { padding: 11px 0; border-left: 2px solid var(--ink); font-weight: 800; font-size: 1.05rem; transition: background-color .15s; }
.seg-opt:first-child { border-left: 0; }
.seg-opt:hover:not(:disabled) { background: var(--paper-2); }
.seg-opt.on, .seg-opt.on:hover:not(:disabled) { background: var(--accent); }
.seg-opt:disabled:not(.on) { color: #B2A8C2; }

.sticky-cta {
  position: sticky; bottom: 0; z-index: 5;
  margin-top: auto;
  padding: 14px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 62%, rgba(255, 243, 228, 0));
}
.wait-pill { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 18px; border: var(--bw) dashed var(--ink); border-radius: var(--r-sm); background: var(--paper-2); font-weight: 700; text-align: center; }
.notice { padding: 12px 14px; border: 2px dashed var(--ink); border-radius: 14px; background: #FFF6CF; font-weight: 700; }

/* ---------- En-tête de partie ---------- */
.game-top { display: flex; flex-direction: column; gap: 12px; }
.gt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qcount { font-weight: 800; font-size: .98rem; }
.qcount span { color: var(--ink-2); font-weight: 600; }
.dots-row { display: flex; gap: 5px; }
.dot { flex: 1; height: 10px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; transition: background-color .3s; }
.dot.ok { background: var(--good); }
.dot.ko { background: var(--bad); }
.dot.cur { background: var(--accent); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px 8px 8px; border: var(--bw) solid var(--ink); border-radius: 16px; background: #fff; box-shadow: var(--sh-sm); }
.pl.me { background: #fff; background: color-mix(in srgb, var(--accent) 24%, white); }
.pl-av { position: relative; flex: none; }
.pl-score {
  position: absolute; right: -8px; bottom: -6px;
  min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 99px;
  background: var(--yellow);
  font-weight: 800; font-size: .74rem; line-height: 1;
}
.pl-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pl-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.st { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; color: var(--ink-2); font-size: .78rem; font-weight: 700; }
.st.ok { color: var(--good-ink); }
.st.me { color: var(--ink); }
.st.off { color: var(--bad-ink); }

/* ---------- Question ---------- */
.qcard { overflow: hidden; padding: 0; }
.role { padding: 12px 18px; border-bottom: var(--bw) solid var(--ink); font-weight: 800; font-size: .96rem; }
.role.self { background: var(--ink); color: #fff; }
.role.guess { background: var(--accent); }
.qbody { display: flex; flex-direction: column; gap: 18px; padding: 22px 18px 20px; }
.qtext { font-size: clamp(1.55rem, 6.2vw, 2rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; overflow-wrap: anywhere; }
.opts { display: flex; flex-direction: column; gap: 11px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 14px; text-align: left;
  border: var(--bw) solid var(--ink); border-radius: 14px;
  background: #fff; box-shadow: var(--sh-sm);
  font-weight: 700; font-size: 1.08rem; line-height: 1.2;
  transition: transform .1s, box-shadow .1s, background-color .15s, opacity .25s;
}
.opt:hover:not(:disabled) { background: #fff; background: color-mix(in srgb, var(--accent) 24%, white); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.opt:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.opt.picked { background: var(--accent); transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.opt:disabled:not(.picked) { opacity: .4; box-shadow: none; }
.opt-key { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-2); font-weight: 800; font-size: .9rem; }
.opt.picked .opt-key { background: var(--ink); color: #fff; }
.qfoot { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 24px; color: var(--ink-2); font-weight: 700; text-align: center; }
.qfoot.ok { color: var(--good-ink); }

/* ---------- Révélation ---------- */
.reveal { position: relative; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; padding: 22px 18px; }
.reveal .qprompt { padding-right: 110px; color: var(--ink-2); font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.answers { display: grid; gap: 10px; perspective: 900px; }
.ans { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--paper-2); }
.ans-who { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 700; font-size: .88rem; }
.ans-val { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; font-size: 1.32rem; line-height: 1.15; overflow-wrap: anywhere; }
.ans.good { background: var(--good-bg); }
.ans.bad { background: var(--bad-bg); }
.mark { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; color: #fff; font-size: .95rem; font-weight: 800; }
.good .mark, .ok .mark { background: var(--good); }
.bad .mark, .ko .mark { background: var(--bad); }
.stamp {
  position: absolute; top: -18px; right: -8px;
  padding: 8px 14px;
  border: 3px solid currentColor; border-radius: 12px;
  box-shadow: 4px 4px 0 currentColor;
  font-weight: 800; font-size: 1.32rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
  transform: rotate(8deg);
}
.stamp.good { color: var(--good-ink); background: var(--good-bg); }
.stamp.bad { color: var(--bad-ink); background: var(--bad-bg); }
.verdict-sub { text-align: center; font-weight: 800; font-size: 1.1rem; }
.reactions { display: flex; justify-content: center; gap: 10px; }
.react {
  width: 52px; height: 52px; display: grid; place-items: center;
  border: var(--bw) solid var(--ink); border-radius: 50%;
  background: #fff; box-shadow: var(--sh-sm);
  font-size: 1.55rem; line-height: 1;
  transition: transform .12s var(--bounce), box-shadow .1s;
}
.react:hover { transform: translate(-1px, -1px) scale(1.07); }
.react:active { transform: translate(2px, 2px) scale(.92); box-shadow: 1px 1px 0 var(--ink); }
.react-hint { margin-top: -8px; text-align: center; color: var(--ink-2); font-weight: 600; font-size: .85rem; }

/* ---------- Résultats ---------- */
.result { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 20px 22px; text-align: center; }
.gauge { position: relative; width: 214px; height: 214px; margin: 2px 0 4px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.g-track { fill: none; stroke: #F1E6D6; stroke-width: 22; }
.g-bar { fill: none; stroke: var(--accent); stroke-width: 22; stroke-dasharray: 100; }
.g-line { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.g-num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 3.5rem; letter-spacing: -.05em; }
.g-num small { font-size: .5em; letter-spacing: 0; }
.duo-stats { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.ds { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-2); text-align: left; }
.ds-txt { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.ds-txt span { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.ds-txt span b { color: var(--ink); font-weight: 800; }
.bar { height: 10px; overflow: hidden; border: 2px solid var(--ink); border-radius: 99px; background: #fff; }
.bar i { display: block; height: 100%; background: var(--accent); }
.ds-score { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.end-actions { display: grid; gap: 12px; }
.recap { display: flex; flex-direction: column; gap: 14px; }
.recap ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.recap li { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 2px solid var(--ink); border-radius: 14px; }
.recap li.ok { background: var(--good-bg); }
.recap li.ko { background: var(--bad-bg); }
.recap .mark { margin-top: 1px; }
.recap p { font-weight: 800; line-height: 1.25; }
.recap small { display: block; margin-top: 3px; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.recap small b { color: var(--ink); }

@media (min-width: 560px) {
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
  .end-actions { grid-template-columns: 1fr 1fr; }
  .answers { grid-template-columns: 1fr 1fr; }
}

/* ---------- Éléments flottants ---------- */
.banner {
  position: fixed; top: 10px; left: 50%; z-index: 50;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: var(--bw) solid var(--ink); border-radius: 999px;
  background: var(--yellow); box-shadow: var(--sh-sm);
  font-weight: 700; font-size: .92rem; white-space: nowrap;
}
.banner[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: var(--bw) solid var(--ink); border-radius: 14px;
  background: var(--ink); color: #fff;
  box-shadow: 4px 4px 0 var(--yellow);
  font-weight: 700; text-align: center;
  transform: translate(-50%, 180%);
  transition: transform .35s var(--bounce);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }
.fx { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
.fx .float { position: absolute; bottom: 90px; font-size: 2.7rem; line-height: 1; animation: floatUp 2.3s ease-out forwards; }
.fx .confetto { position: absolute; top: -20px; width: 11px; height: 15px; border: 1.5px solid var(--ink); border-radius: 3px; animation: fall linear forwards; }
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal-wrap[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(29, 21, 48, .5); animation: fadeIn .2s ease; }
.modal { position: relative; display: flex; flex-direction: column; gap: 18px; width: min(100%, 380px); animation: pop .3s var(--bounce); }
.modal p { font-weight: 800; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.modal small { display: block; margin-top: 6px; color: var(--ink-2); font-weight: 600; font-size: .95rem; letter-spacing: 0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.spinner { width: 46px; height: 46px; border: var(--bw) solid var(--ink); border-radius: 13px; background: var(--yellow); box-shadow: var(--sh-sm); animation: spin 1.1s cubic-bezier(.6, 0, .4, 1) infinite; }
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: bounce 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.dots.sm i { width: 4px; height: 4px; }

/* ---------- Animations (seulement quand l'écran vient d'apparaître) ---------- */
.is-new .is-pop { animation: pop .45s var(--bounce) both; }
.is-new .hero-copy > * { animation: fadeUp .55s ease both; }
.is-new .hero-copy > :nth-child(2) { animation-delay: .06s; }
.is-new .hero-copy > :nth-child(3) { animation-delay: .12s; }
.is-new .hero-copy > :nth-child(4) { animation-delay: .18s; }
.is-new .hero-art { animation: fadeIn .8s ease .25s both; }
.is-new .opt { animation: fadeUp .35s ease both; }
.is-new .opt:nth-child(2) { animation-delay: .05s; }
.is-new .opt:nth-child(3) { animation-delay: .1s; }
.is-new .opt:nth-child(4) { animation-delay: .15s; }
.is-new .ans { animation: flipIn .55s var(--bounce) both; }
.is-new .ans.a2 { animation-delay: .5s; }
.is-new .stamp { animation: stampIn .5s cubic-bezier(.2, 1.7, .4, 1) 1s both; }
.is-new .verdict-sub { animation: fadeUp .4s ease 1.15s both; }
.is-new .g-bar { animation: gauge 1.5s cubic-bezier(.3, .8, .3, 1) .2s both; }

@keyframes pop { from { opacity: 0; scale: .94; translate: 0 8px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes fadeUp { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes flipIn { from { opacity: 0; transform: rotateX(-90deg); } to { opacity: 1; transform: none; } }
@keyframes stampIn { from { opacity: 0; transform: rotate(8deg) scale(2.6); } to { opacity: 1; transform: rotate(8deg) scale(1); } }
@keyframes gauge { from { stroke-dashoffset: 100; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes wiggle { 0%, 60%, 100% { rotate: 0deg; } 10% { rotate: -9deg; } 20% { rotate: 7deg; } 30% { rotate: -4deg; } 40% { rotate: 2deg; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  15% { opacity: 1; transform: translate(0, -30px) scale(1.2); }
  100% { opacity: 0; transform: translate(var(--dx, 0), -58vh) scale(1); }
}
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fx { display: none; }
}
