@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-700-SNsywT4.woff2") format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url("../fonts/inter-400-poxsSdI.woff2") format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url("../fonts/inter-700-_eucScQ.woff2") format('woff2'); }

:root {
  --bg: #0B0B0B;
  --surface: #1A1A1D;
  --surface-2: #26262B;
  --text: #F4F1EA;
  --muted: #9A978F;
  --accent: #F5A623;
  --accent-ink: #0B0B0B;
  --ok: #3DDC84;
  --ko: #FF5A5F;
  --radius: 16px;
  --tap: 48px;
  --font-title: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* La carte swipe est lancée hors écran : pas de défilement horizontal sur mobile */
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 1rem/1.5 var(--font-body);
  display: flex; flex-direction: column;
}
h1, h2, h3 { font-family: var(--font-title); line-height: 1.1; margin: 0; }
h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
a { color: var(--accent); }
img { max-width: 100%; }

.page { width: 100%; max-width: 480px; margin: 0 auto; padding: 16px; flex: 1; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.center { text-align: center; }

/* En-tête : le logo reste noir sur blanc, posé comme une étiquette de prix */
.site-header { display: flex; justify-content: center; padding: 20px 16px 8px; }
.price-tag {
  display: inline-block; background: #fff; padding: 10px 18px 8px; border-radius: 12px;
  transform: rotate(-3deg); box-shadow: 0 6px 0 var(--accent), 0 12px 24px rgb(0 0 0 / .5);
  position: relative;
}
.price-tag::before {
  content: ''; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--bg);
}
.price-tag img { display: block; height: 56px; width: auto; margin-left: 10px; }
.price-tag--big img { height: 120px; }

.site-footer { padding: 24px 16px; text-align: center; font-size: .85rem; color: var(--muted); }
.site-footer a { color: var(--muted); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); width: 100%; padding: 12px 20px; border: 0; border-radius: 999px;
  font: 700 1.05rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border: 2px solid var(--surface-2); }
.btn[disabled] { opacity: .5; }

.card { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 700; }
.badge--accent { background: var(--accent); color: var(--accent-ink); }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; }
.field input[type=email], .field input[type=text] {
  min-height: var(--tap); padding: 10px 14px; border-radius: 12px; border: 2px solid var(--surface-2);
  background: var(--surface); color: var(--text); font: inherit;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field__options { display: flex; flex-wrap: wrap; gap: 8px; }
.field__options label { font-weight: 400; display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border-radius: 12px; background: var(--surface); }
.field__check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field__check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 2px; }
.field__check label { font-weight: 400; }
.field__error, .field ul { color: var(--ko); font-size: .9rem; margin: 0; padding: 0; list-style: none; }

.flash { padding: 12px 16px; border-radius: 12px; font-weight: 700; }
.flash--success { background: var(--ok); color: var(--accent-ink); }
.flash--error { background: var(--ko); color: #fff; }

/* Mascotte */
.mascot { display: block; margin: 0 auto; overflow: visible; }
.mascot__body { transform-origin: 50% 90%; }
.mascot--happy .mascot__body { animation: hop .6s ease-in-out infinite alternate; }
.mascot--party .mascot__body { animation: hop .3s ease-in-out infinite alternate; }
.mascot--sad .mascot__body { transform: rotate(-8deg) translateY(4px); }
.mascot--thinking .mascot__pupil { transform: translate(-2px, -3px); }
.mascot--sad .mascot__pupil { transform: translateY(3px); }
@keyframes hop { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* Suivi de colis (progression de la partie) */
.tracking { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.tracking__step { height: 8px; border-radius: 4px; background: var(--surface-2); }
.tracking__step--done { background: var(--accent); }
.tracking__step--current { background: var(--text); }
.tracking__label { font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; }

.timer { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.timer__bar { height: 100%; background: var(--accent); transform-origin: left; }

/* Quiz */
.choices { display: grid; gap: 10px; }
.choice {
  min-height: 56px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--surface-2);
  background: var(--surface); color: var(--text); font: 700 1rem var(--font-body); text-align: left; cursor: pointer;
}
.choice--correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 20%, var(--surface)); }
.choice--wrong { border-color: var(--ko); background: color-mix(in srgb, var(--ko) 20%, var(--surface)); }

/* Swipe */
.swipe-zone { position: relative; height: 280px; touch-action: pan-y; user-select: none; }
.swipe-card {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--surface); border-radius: 20px; border: 2px solid var(--surface-2);
  font: 700 1.2rem/1.35 var(--font-title); text-align: center; will-change: transform;
}
.swipe-card img { max-height: 120px; border-radius: 12px; margin-bottom: 12px; }
.swipe-hint { display: flex; justify-content: space-between; font-weight: 700; }
.swipe-hint__left { color: var(--ko); }
.swipe-hint__right { color: var(--ok); }
.swipe-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Estimation */
.slider { width: 100%; accent-color: var(--accent); height: var(--tap); }
.slider-value { font: 700 2.4rem var(--font-title); text-align: center; color: var(--accent); }

/* Feedback */
.feedback { text-align: center; }
.feedback__points { font: 700 2rem var(--font-title); }
.feedback--ok .feedback__points { color: var(--ok); }
.feedback--ko .feedback__points { color: var(--ko); }

/* Classement */
.leaderboard { width: 100%; border-collapse: collapse; }
.leaderboard td, .leaderboard th { padding: 10px 8px; text-align: left; }
.leaderboard th { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.leaderboard tr + tr td { border-top: 1px solid var(--surface-2); }
.leaderboard td:last-child, .leaderboard th:last-child { text-align: right; font-weight: 700; }
.leaderboard__rank { font: 700 1.1rem var(--font-title); width: 3ch; }
.leaderboard__row--prize .leaderboard__rank { color: var(--accent); }
.leaderboard__row--me td { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* Écran de stand */
.screen { max-width: none; padding: 32px 48px; font-size: 1.6rem; }
.screen h1 { font-size: 3.5rem; }
.screen .leaderboard td { padding: 16px; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.screen-mode .page { max-width: none; }
