/* =========================================================================
   « Le jeu qu'il est bath ! » — maquette jouable
   Style ludique & coloré, ancré sur le bleu pétrole des tuiles.
   Vanilla CSS, aucune dépendance externe.
   ========================================================================= */

@font-face {
  font-family: 'Fredoka';
  src: url('assets/fonts/fredoka.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette */
  --bg:          #e9f0f4;
  --surface:     #ffffff;
  --ink:         #173746;
  --ink-soft:    #5c7686;
  --petrol:      #1c5a7a;
  --petrol-deep: #0f3d56;
  --petrol-light:#2f80aa;
  --petrol-soft: #e2eef4;
  --accent:      #ff8a3d;   /* CTA / énergie */
  --accent-deep: #f56a1c;
  --gold:        #ffd23f;   /* crédits, logo */
  --green:       #1fa971;   /* don, victoire */
  --green-soft:  #e2f6ed;
  --pink:        #ff5d8f;   /* confettis / fun */
  --danger:      #e5484d;

  /* Rayons & ombres */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --shadow:    0 12px 30px -14px rgba(15,61,86,.45);
  --shadow-sm: 0 6px 16px -10px rgba(15,61,86,.5);

  --font: 'Fredoka', ui-rounded, 'Segoe UI Rounded', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -8%, #d8eaf0 0%, transparent 60%),
    radial-gradient(1000px 700px at 108% 110%, #ffe7d3 0%, transparent 55%),
    var(--bg);
  min-height: 100dvh;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input  { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }   /* prime sur les display:grid/flex des overlays */
svg.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.icon--sm { width: 1em; height: 1em; }
.svg-sprite { position: absolute; width: 0; height: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =========================================================================
   Barre supérieure (hors téléphone)
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(12px, 4vw, 28px);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,61,86,.08);
}
.topbar__title { font-weight: 600; letter-spacing: .2px; }
.badge-demo {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent-deep);
  background: #fff2e8; border: 1px solid #ffd9bf;
  padding: 4px 10px; border-radius: 999px;
}
.badge-demo::first-letter { color: var(--accent); }
.topbar .btn-ghost { margin-left: auto; }
.btn-ghost {
  font-weight: 600; color: var(--petrol);
  padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid var(--petrol-soft);
  background: #fff; transition: background .15s, border-color .15s;
}
.btn-ghost[aria-pressed="true"] { background: var(--petrol-soft); border-color: #c4ddea; }
.btn-ghost:hover { border-color: var(--petrol-light); }

/* =========================================================================
   Coquille : notes | téléphone | notes
   ========================================================================= */
.shell {
  display: block;                /* mobile : pleine page */
  min-height: calc(100dvh - 0px);
  padding: 0;
}
.notes { display: none; }        /* colonnes masquées sur petit écran */

/* =========================================================================
   Le téléphone
   ========================================================================= */
.device {
  position: relative;
  width: 100%;
  height: calc(100dvh - 48px);   /* laisse la topbar visible au-dessus */
  background: #0c1116;
  overflow: hidden;
}
.device__notch { display: none; }
.device__viewport {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--bg);
}

/* Barre d'état factice */
.statusbar {
  position: relative; z-index: 2;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 18px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.statusbar__icons { display: inline-flex; gap: 6px; align-items: center; }
.sb-signal, .sb-wifi, .sb-batt { display: inline-block; background: currentColor; opacity: .85; }
.sb-signal { width: 16px; height: 10px; clip-path: polygon(0 100%,18% 100%,18% 60%,0 60%,0 100%, 28% 100%,46% 100%,46% 40%,28% 40%, 56% 100%,74% 100%,74% 20%,56% 20%, 84% 100%,100% 100%,100% 0,84% 0); }
.sb-wifi { width: 15px; height: 11px; -webkit-mask: radial-gradient(circle at 50% 100%, #000 32%, transparent 33%) bottom/100% 100% no-repeat; mask: radial-gradient(circle at 50% 100%, #000 32%, transparent 33%); }
.sb-batt { width: 22px; height: 11px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px currentColor; position: relative; background: none; }
.sb-batt::before { content:""; position:absolute; inset:2px; width: 70%; background: currentColor; border-radius: 1px; }
.sb-batt::after  { content:""; position:absolute; right:-3px; top:3px; width:2px; height:5px; background: currentColor; border-radius: 0 1px 1px 0; }

/* App = colonne flex à l'intérieur du viewport */
.app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% -10%, #f3f8fb 0%, var(--bg) 60%);
}

/* =========================================================================
   Écrans empilés + transitions
   ========================================================================= */
.screens { position: relative; flex: 1 1 auto; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
  opacity: 0; transform: translateX(7%);
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .32s var(--ease);
}
.screen--active { opacity: 1; transform: none; pointer-events: auto; }
.screen--out { transform: translateX(-7%); }
.screen__body { display: flex; flex-direction: column; flex: 1 1 auto; }

/* =========================================================================
   Boutons & champs
   ========================================================================= */
.btn {
  --bg: var(--petrol);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 16px; color: #fff;
  padding: 13px 20px; border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), filter .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.97); }
.btn[disabled] { filter: grayscale(.4) opacity(.55); cursor: not-allowed; box-shadow: none; }
.btn--block { width: 100%; }
.btn--primary { --bg: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%); color: #fff; }
.btn--primary { box-shadow: 0 10px 22px -10px rgba(245,106,28,.7); }
.btn--watch {
  --bg: #111; width: 100%; letter-spacing: .5px; font-size: 14px;
  border-radius: var(--r-sm); padding: 11px;
}
.btn--send { --bg: var(--petrol); border-radius: var(--r-sm); padding: 0 18px; letter-spacing: .5px; font-size: 14px; }
.btn--ghost { --bg: #fff; color: var(--petrol); box-shadow: inset 0 0 0 1.5px var(--petrol-soft); }
.btn--extra { margin-top: 10px; font-size: 14px; padding: 10px 16px; }
.btn--extra span { color: var(--ink-soft); font-weight: 600; }

.link { color: var(--petrol); text-decoration: none; font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }

.field { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--ink-soft); letter-spacing: .5px; }
.field input {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm);
  border: 1.5px solid #d7e4ec; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--petrol-light); box-shadow: 0 0 0 3px rgba(47,128,170,.18); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--petrol); }

/* =========================================================================
   #1 — Login
   ========================================================================= */
.login { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; flex: 1 1 auto; padding: 18px 0; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-soft); }
.brand {
  font-size: clamp(30px, 9vw, 38px); font-weight: 700; line-height: 1.05;
  color: var(--petrol); letter-spacing: -.5px; margin: 2px 0 6px;
}
.login__title { font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.login__form { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; }
.login__forgot { align-self: flex-end; font-size: 13px; }
.check { align-self: center; margin-top: 2px; }
.faceid {
  align-self: center; margin: 8px 0;
  width: 64px; height: 64px; border-radius: 20px;
  display: grid; place-items: center;
  background: var(--petrol-soft); color: var(--petrol);
  box-shadow: inset 0 0 0 2px #cfe3ee; transition: transform .15s var(--ease), background .15s;
}
.faceid .icon { width: 34px; height: 34px; stroke-width: 1.6; }
.faceid:hover { background: #d6e9f2; }
.faceid:active { transform: scale(.93); }
.login__cta { margin-top: 2px; }
.login__create { margin-top: 6px; font-size: 16px; }

/* =========================================================================
   Barre d'application (avatar + titre)
   ========================================================================= */
.appbar { display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; }
.avatar {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--petrol-soft); color: var(--petrol);
}
.avatar .icon { width: 22px; height: 22px; }
.appbar__status { font-weight: 600; color: var(--ink); }
.appbar__title { font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--ink); }
.players { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--green); white-space: nowrap; }
.players__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(31,169,113,.5); animation: live-dot 2s var(--ease) infinite; }

/* =========================================================================
   #2 — Pré-partie
   ========================================================================= */
.charity-line { text-align: center; font-size: 15px; color: var(--ink); margin: 4px 0 10px; }
.chip-charity {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--green-soft); color: var(--green);
  font-weight: 600; padding: 3px 11px; border-radius: 999px; font-size: 14px;
}
.chip-charity .icon { color: var(--green); }
.q { text-align: center; font-size: 18px; font-weight: 600; color: var(--petrol); margin-bottom: 4px; }
.hint { text-align: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.tiers { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 14px; }
.tier {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 2px; border-radius: var(--r-sm);
  background: #fff; box-shadow: inset 0 0 0 1.5px #dceaf1;
  transition: transform .12s var(--ease), box-shadow .15s, background .15s;
}
.tier b { font-size: 15px; color: var(--petrol); }
.tier small { font-size: 10.5px; color: var(--ink-soft); line-height: 1.1; text-align: center; }
.tier:hover { box-shadow: inset 0 0 0 1.5px var(--petrol-light); }
.tier:active { transform: scale(.95); }
.tier.is-selected { background: var(--petrol); box-shadow: 0 8px 16px -8px rgba(28,90,122,.7); }
.tier.is-selected b, .tier.is-selected small { color: #fff; }

.ad-card {
  display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto; gap: 4px 12px;
  align-items: center; padding: 10px; border-radius: var(--r);
  background: #fff; box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.ad-card__poster {
  grid-row: 1 / span 2; position: relative; width: 76px; height: 76px;
  border-radius: var(--r-sm); overflow: hidden; background: #111;
  display: grid; place-items: center;
}
.ad-card__poster img { width: 100%; height: 100%; object-fit: cover; }
.ad-card__poster.is-empty { background: linear-gradient(135deg,#2a2a35,#11111a); }
.ad-card__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.ad-card__play .icon { width: 26px; height: 26px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.ad-card__meta { align-self: end; }
.ad-card__meta strong { display: block; font-size: 14px; }
.ad-card__meta small { color: var(--ink-soft); font-size: 12px; }
.ad-card .btn--watch { grid-column: 2; }
.pre-credits { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 2px 0 10px; }
.pre-credits strong { color: var(--gold); font-size: 18px; -webkit-text-stroke: .4px #d9a800; }
.pregame .btn--primary { margin-top: auto; }

/* =========================================================================
   #3 / #4 — Partie (HUD + grille)
   ========================================================================= */
.hud {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; font-weight: 600; font-size: 14px;
}
.hud__credits { color: var(--ink); }
.hud__credits strong { color: var(--gold); -webkit-text-stroke: .4px #d9a800; }
.hud .players { font-size: 12px; }
.hud__timer {
  margin-left: auto; color: var(--petrol); font-variant-numeric: tabular-nums;
  background: var(--petrol-soft); padding: 3px 10px; border-radius: 999px;
}
.hud__timer.is-urgent { color: #fff; background: var(--danger); animation: pulse 1s var(--ease) infinite; }

.stage {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  border-radius: var(--r); overflow: hidden;
  background: var(--petrol-deep); box-shadow: var(--shadow);
  touch-action: manipulation; user-select: none;
}
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.stage.is-empty { background: linear-gradient(135deg,#16557a,#0c2f42); }

.cover {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, 1fr);
}
.zone {
  position: relative; display: grid;
  grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
  box-shadow: inset 0 0 0 1.5px rgba(11,46,66,.55);
  cursor: pointer;
}
.zone:disabled { cursor: default; }
.cell {
  background: var(--petrol);
  transform-origin: center;
  transition: opacity .4s ease, transform .45s var(--ease);
  will-change: transform, opacity;
}
.cell.is-rev { opacity: 0; transform: scale(.12); }

/* Ripple au toucher d'une zone */
.ripple {
  position: absolute; z-index: 3; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none;
  animation: ripple .5s var(--ease) forwards;
}
/* « −1 crédit » flottant */
.float-credit {
  position: absolute; z-index: 4; transform: translate(-50%,-50%);
  font-weight: 700; font-size: 15px; color: #fff; pointer-events: none;
  text-shadow: 0 2px 5px rgba(0,0,0,.5); animation: floatUp .9s var(--ease) forwards;
}

/* Décompte 3·2·1·GO */
.countdown {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: rgba(12,47,66,.82); color: #fff; backdrop-filter: blur(1px);
}
.countdown__num { font-size: clamp(54px, 22vw, 104px); font-weight: 700; line-height: 1; }
.countdown__num.pop { animation: pop .55s var(--ease); }
.countdown__num.go { color: var(--gold); }

.instruction { text-align: center; font-size: 13.5px; color: var(--ink); margin: 12px 0 10px; }
.instruction b { color: var(--petrol); }
.guess { display: flex; gap: 8px; }
.guess input {
  flex: 1 1 auto; min-width: 0; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1.5px solid #d7e4ec; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.guess input:focus { outline: none; border-color: var(--petrol-light); box-shadow: 0 0 0 3px rgba(47,128,170,.18); }
.guess.is-wrong input { border-color: var(--danger); animation: shake .4s; }
.feedback { text-align: center; font-weight: 600; min-height: 22px; margin-top: 10px; }
.feedback.is-ok { color: var(--green); }
.feedback.is-bad { color: var(--danger); }

/* =========================================================================
   #5 — Révélation
   ========================================================================= */
.reveal { align-items: center; text-align: center; gap: 8px; }
.reveal__photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%;
  border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 6px;
  animation: bloom .6s var(--ease);
}
.reveal__label { font-size: 15px; color: var(--ink-soft); }
.reveal__name {
  font-size: clamp(22px, 7vw, 28px); font-weight: 700; letter-spacing: .5px;
  color: var(--petrol); padding: 6px 16px; border: 2px solid var(--petrol-soft);
  border-radius: var(--r-sm); margin: 2px 0 14px;
}
.reveal .btn--primary { margin-top: auto; }

/* =========================================================================
   #6 — Résultats
   ========================================================================= */
.results { align-items: center; text-align: center; gap: 6px; }
.results__thumb {
  width: 120px; height: 150px; object-fit: cover; object-position: 50% 40%;
  border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 4px;
}
.results__name {
  font-size: 20px; font-weight: 700; color: var(--petrol);
  padding: 4px 14px; border: 2px solid var(--petrol-soft); border-radius: var(--r-sm); margin-bottom: 8px;
}
.results__winner { font-size: 14px; color: var(--ink); max-width: 280px; }
.results__winner strong { color: var(--petrol); }
.results__line {
  width: 100%; max-width: 300px; font-size: 14px; color: var(--ink);
  padding: 9px 14px; border-radius: var(--r-sm); margin-top: 6px;
}
.results__line strong { font-size: 17px; }
.results__line--prize { background: #fff6e9; }
.results__line--prize strong { color: var(--accent-deep); }
.results__line--don { background: var(--green-soft); }
.results__line--don strong { color: var(--green); }
.results__total { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
.results__total strong { display: inline-block; font-size: 20px; color: var(--petrol); margin-top: 2px; }
.results__bye { font-size: 13px; color: var(--ink-soft); margin: 8px 0 14px; font-style: italic; }
.results .btn--primary { margin-top: auto; }

/* =========================================================================
   Overlay publicité
   ========================================================================= */
.ad-modal {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center; padding: 24px;
  background: rgba(8,28,40,.7); backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}
.ad-player {
  width: 100%; max-width: 300px; background: #14141c; color: #fff;
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
}
.ad-player__screen { position: relative; aspect-ratio: 16/10; background: #000; display: grid; place-items: center; overflow: hidden; }
.ad-player__screen img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.ad-player__screen::after { content: ""; position: absolute; inset: auto 0 0 0; height: 52px; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.ad-player__tag { position: absolute; z-index: 2; top: 8px; left: 8px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: rgba(255,255,255,.18); padding: 2px 7px; border-radius: 5px; }
.ad-player__brand { position: absolute; z-index: 2; bottom: 8px; left: 10px; right: 10px; font-size: 12px; opacity: .95; }
.ad-progress { height: 5px; background: rgba(255,255,255,.16); }
.ad-progress__bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--accent)); }
.ad-player__time { text-align: center; font-size: 13px; padding: 9px; font-variant-numeric: tabular-nums; }
.ad-player__done { text-align: center; font-weight: 600; color: #6ee7b0; padding-bottom: 10px; animation: pop .5s var(--ease); }

/* =========================================================================
   Notes de conception — colonnes (desktop) + feuille (mobile)
   ========================================================================= */
.notes--left  { text-align: right; }
.note {
  position: relative; max-width: 280px; margin: 0 0 18px;
  background: #fffdf4; color: #4a4233;
  padding: 13px 15px; border-radius: 4px 14px 14px 14px;
  box-shadow: 0 8px 20px -12px rgba(70,60,30,.6);
  border: 1px solid #f0e6c8;
  font-size: 13.5px; line-height: 1.45;
}
.notes--right .note { margin-left: 14px; }
.notes--left  .note { margin-left: auto; margin-right: 14px; border-radius: 14px 4px 14px 14px; }
.note::before {
  content: attr(data-tag); position: absolute; top: -9px; left: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 999px;
}
.note--q { background: #fdf3f6; border-color: #f3d6e0; }
.note--q::before { content: "à décider"; background: var(--pink); }
.note__title { display: block; font-weight: 600; color: var(--ink); margin-bottom: 3px; }

/* FAB + feuille mobile (la bascule topbar les remplace sur desktop) */
.notes-fab { display: none; }
.notes-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: grid; align-items: end;
  background: rgba(8,28,40,.45); animation: fade .2s var(--ease);
}
.notes-sheet[hidden] { display: none; }
.notes-sheet__panel {
  background: #fffdf7; border-radius: 20px 20px 0 0; padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 75dvh; overflow-y: auto; box-shadow: 0 -10px 30px -10px rgba(0,0,0,.4);
  animation: sheet-up .3s var(--ease);
}
.notes-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.notes-sheet__head h3 { font-size: 17px; color: var(--petrol); }
.notes-sheet__close { font-size: 18px; color: var(--ink-soft); width: 32px; height: 32px; border-radius: 50%; }
.notes-sheet__close:hover { background: rgba(0,0,0,.05); }
.notes-sheet__body .note { max-width: none; margin: 0 0 12px; }

/* Confettis (victoire) */
.confetti { position: absolute; inset: 0; z-index: 20; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: confetti-fall linear forwards; }

/* Marqueur d'écran (colonne gauche, clin d'œil aux « #1..#6 » des maquettes) */
.screen-marker { text-align: right; }
.screen-marker__n { display: block; font-size: 56px; font-weight: 700; line-height: 1; color: var(--petrol); opacity: .22; letter-spacing: -1px; }
.screen-marker__label { display: block; font-weight: 600; color: var(--ink-soft); font-size: 14px; margin-top: 2px; }

/* =========================================================================
   Desktop : cadre téléphone + colonnes de notes
   ========================================================================= */
@media (min-width: 820px) {
  .shell {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: clamp(10px, 3vw, 40px); padding: 26px clamp(16px, 4vw, 48px) 36px;
    min-height: calc(100dvh - 52px);
  }
  .device {
    width: auto; height: min(844px, calc(100dvh - 120px)); aspect-ratio: 390 / 844;
    border-radius: 46px; padding: 12px;
    box-shadow: 0 40px 80px -30px rgba(15,61,86,.6), 0 0 0 2px #232a31;
    justify-self: center;
  }
  .device__viewport { inset: 12px; border-radius: 36px; }
  .device__notch {
    display: block; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 150px; height: 26px; background: #0c1116; border-radius: 0 0 16px 16px; z-index: 3;
  }
  .notes--right { display: block; justify-self: start; align-self: center; max-width: 300px; }
  .notes { align-self: center; }
  body.notes-off .notes { display: none; }
}
@media (min-width: 1180px) {
  .notes--left { display: block; justify-self: end; max-width: 300px; }
  body.notes-off .notes--left { display: none; }
}
/* Sous 820px : la bascule topbar ouvre la feuille ; pas de colonnes */
@media (max-width: 819.98px) {
  .topbar__title { display: none; }
  .topbar { justify-content: space-between; }
  .topbar .btn-ghost { margin-left: 0; }
}

/* =========================================================================
   Accessibilité
   ========================================================================= */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.zone:focus-visible { outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .cell.is-rev { transform: none; }
}

/* =========================================================================
   Keyframes
   ========================================================================= */
@keyframes live-dot { 0%,100% { box-shadow: 0 0 0 0 rgba(31,169,113,.5); } 50% { box-shadow: 0 0 0 5px rgba(31,169,113,0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 55% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes ripple { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(7); opacity: 0; } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%,-30%); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-160%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes bloom { 0% { transform: scale(.96); opacity: .4; filter: blur(4px); } 100% { transform: scale(1); opacity: 1; filter: none; } }
@keyframes confetti-fall { to { transform: translateY(115%) rotate(540deg); } }
