/* =========================================================
   Resto Match — direction "bistrot editorial"
   Papier creme chaud · accents persimmon/safran · Fraunces + Hanken Grotesk
   ========================================================= */

:root {
  --paper: #fbf4e9;
  --paper-card: #fffdf8;
  --ink: #23190f;
  --ink-soft: #7a6a58;
  --line: #e7d9c4;
  --line-strong: #d8c4a6;

  --primary: #e4502a; /* persimmon — couleur dominante */
  --primary-deep: #c23c1b;
  --amber: #f2a516; /* accent franc */
  --yes: #1fa85a;
  --yes-deep: #178a49;
  --no: #3a322b;

  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 0 rgba(70, 40, 12, 0.05), 0 2px 8px -4px rgba(70, 40, 12, 0.25);
  --shadow: 0 2px 0 rgba(70, 40, 12, 0.04), 0 24px 44px -22px rgba(80, 40, 12, 0.45);
  --shadow-pop: 0 30px 60px -24px rgba(80, 35, 10, 0.55);

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* L'attribut hidden doit toujours l'emporter (sinon .overlay{display:flex} le masque). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 600px at 84% -12%, rgba(242, 165, 22, 0.22), transparent 60%),
    radial-gradient(900px 680px at -12% 112%, rgba(228, 80, 42, 0.16), transparent 60%);
  background-attachment: fixed;
}

/* Grain atmospherique (SVG fractal noise) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.screen {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

/* ---- Typographie ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0 0 8px;
}
.logo {
  font-size: clamp(2.6rem, 9vw, 3.8rem);
  text-align: center;
  font-weight: 900;
}
.tagline {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.tagline em, .accent-ital {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.foot-note { text-align: center; color: var(--ink-soft); font-size: 0.85rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }

/* ---- Panneaux ---- */
.card-panel {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.center-panel { display: flex; flex-direction: column; gap: 14px; }
.home-screen { justify-content: center; }
.btn-back {
  align-self: flex-start;
  padding: 8px 16px;
  font-family: var(--font-body);
}

.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.row .input { flex: 1; }

/* ---- Champs ---- */
.input, textarea.input {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #b6a48c; }
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(228, 80, 42, 0.14);
}
textarea.input { resize: vertical; }
.label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 12px 0 6px;
}

/* ---- Boutons ---- */
.btn {
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.06s ease, box-shadow 0.18s, background 0.18s, filter 0.18s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-lg { padding: 16px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(228, 80, 42, 0.8);
}
.btn-primary:hover { background: var(--primary-deep); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper-card); }
.btn-ghost {
  background: rgba(35, 25, 15, 0.06);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(35, 25, 15, 0.12); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* ---- Topbar ---- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.room-code {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 3px;
  font-size: 1.3rem;
  color: var(--primary);
}

/* ---- Lobby ---- */
.lobby-grid { display: grid; gap: 16px; }
.participants { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.participant {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
}
.participant .pp-name { font-weight: 700; }
.participant.offline { opacity: 0.5; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); margin-top: 7px; flex: none; }
.dot.on { background: var(--yes); box-shadow: 0 0 0 3px rgba(31, 168, 90, 0.18); }
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(35, 25, 15, 0.06);
  border: 1px solid var(--line);
  margin-left: 6px;
  vertical-align: middle;
}
.badge.ready { background: rgba(31, 168, 90, 0.14); border-color: rgba(31, 168, 90, 0.4); color: var(--yes-deep); }
.badge.open { background: rgba(31, 168, 90, 0.15); border-color: rgba(31, 168, 90, 0.45); color: var(--yes-deep); }
.badge.closed { background: rgba(228, 80, 42, 0.12); border-color: rgba(228, 80, 42, 0.4); color: var(--primary-deep); }
.hours-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.badge.rate { background: rgba(242, 165, 22, 0.16); border-color: rgba(242, 165, 22, 0.5); color: #a86b04; }

/* Turnstile */
.turnstile-box { display: flex; justify-content: center; margin: 4px 0; min-height: 0; }

/* Roue (égalité) */
.wheel-section { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wheel-wrap { position: relative; width: min(78vw, 320px); height: min(78vw, 320px); }
.wheel-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid var(--paper-card);
  box-shadow: var(--shadow-pop);
  transform: rotate(0deg);
}
.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 24px solid var(--ink);
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
/* Étiquette : barre du centre vers l'extérieur, texte radial centré dans le secteur. */
.wheel-label {
  position: absolute;
  left: 50%;
  bottom: 50%;
  height: 46%;
  width: 110px;
  margin-left: -55px;
  transform-origin: bottom center;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.wheel-label > span {
  display: inline-block;
  transform: rotate(-90deg); /* texte le long du rayon (centre -> extérieur) */
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.wheel-section .btn { margin-top: 6px; }
.top-progress { font-weight: 700; color: var(--primary); font-size: 0.85rem; }

/* Bouton mute flottant */
.mute-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1300;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-card);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.mute-btn:hover { opacity: 1; }

/* Podium */
.podium { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.podium-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.podium-1 { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(242, 165, 22, 0.35), var(--shadow); }
.medal { font-size: 1.7rem; flex: none; }
.podium-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.podium-name { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.podium-meta { color: var(--ink-soft); font-size: 0.82rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rank-details { margin-bottom: 14px; }
.rank-details summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 8px; }
.note { color: var(--ink-soft); font-size: 0.85rem; margin: 4px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.slider { width: 100%; accent-color: var(--primary); }
.radius-controls { display: flex; align-items: center; gap: 12px; }
.radius-controls .slider { flex: 1; }
.radius-input { width: 104px; flex: none; text-align: center; font-weight: 600; padding: 11px 10px; }
.warn-banner {
  background: rgba(242, 165, 22, 0.14);
  border: 1px solid rgba(242, 165, 22, 0.5);
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 0.85rem;
  color: #8a5a06;
}

/* ---- Carte (Leaflet) ---- */
.map { width: 100%; height: 210px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 0.8rem; color: var(--ink-soft); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.rm-pin span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
  background: var(--c, var(--ink));
  border: 2px solid #fff;
  box-shadow: 0 3px 7px rgba(60, 25, 5, 0.5);
}
.rm-pin.big span { width: 24px; height: 24px; }

/* Panneau carte plein ecran dans le swipe */
.map-panel { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.map-panel .map { height: 60vh; min-height: 320px; }
.icon-btn {
  border: 1.5px solid var(--line-strong);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }

/* ---- Deck / swipe ---- */
#screen-swipe { justify-content: space-between; }
.deck { position: relative; flex: 1; min-height: 300px; display: flex; align-items: stretch; }
.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  animation: cardIn 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes cardIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: none; } }
.card-photo {
  height: 46%;
  background: linear-gradient(135deg, #f3e7d3, #efd9bd) center/cover no-repeat;
  position: relative;
  flex: none;
}
.card-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 3.2rem; opacity: 0.6; }
.card-body { padding: 18px; overflow-y: auto; flex: 1; }
.card-title { font-size: 1.7rem; line-height: 1.05; margin: 0; }
.card-sub { color: var(--ink-soft); margin: 6px 0 12px; font-size: 0.95rem; }
.rating { color: #c98a06; font-weight: 700; font-family: var(--font-display); }
.reviews { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font-size: 0.86rem; }
.review .rv-meta { color: var(--ink-soft); font-size: 0.74rem; margin-top: 5px; }
.no-data { color: var(--ink-soft); font-style: italic; font-size: 0.85rem; }

.stamp {
  position: absolute;
  top: 26px;
  padding: 6px 16px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  border: 4px solid;
  opacity: 0;
  transition: opacity 0.1s;
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(2px);
}
.stamp.yes { left: 22px; color: var(--yes); border-color: var(--yes); transform: rotate(-13deg); }
.stamp.no { right: 22px; color: var(--primary); border-color: var(--primary); transform: rotate(13deg); }

.counter-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(35, 25, 15, 0.82);
  color: #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 10px 0 4px; }
.fab {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.7rem;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.08s, filter 0.15s;
}
.fab:hover { filter: brightness(1.05); }
.fab:active { transform: scale(0.9); }
.fab-no { background: var(--no); }
.fab-yes { background: var(--yes); }

.warn-chip { display: inline-block; font-size: 0.74rem; color: #8a5a06; margin-top: 10px; }

/* ---- Attente / match / classement ---- */
.waiting { text-align: center; color: var(--ink-soft); padding: 44px 0; }
.spinner {
  width: 42px; height: 42px;
  border: 4px solid var(--line-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#screen-match { justify-content: center; text-align: center; }
.match-burst h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: 18px; animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.4) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
.match-fiche {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.match-fiche .card-photo { height: 200px; }
.match-fiche .card-body a { color: var(--primary); font-weight: 700; }

.ranking { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rank-item { background: var(--paper-card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.rank-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rank-head strong { font-family: var(--font-display); font-size: 1.15rem; }
.rank-pct { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--primary); }
.bar { height: 9px; background: #efe2cd; border-radius: 999px; margin-top: 10px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--primary)); border-radius: inherit; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper-card);
  padding: 13px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  z-index: 1200;
  max-width: 90%;
  font-weight: 500;
  animation: toastIn 0.25s ease both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- Reveal en cascade au chargement ---- */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.home-screen .center-panel > *,
.lobby-grid > * {
  animation: riseIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.home-screen .center-panel > *:nth-child(1) { animation-delay: 0.04s; }
.home-screen .center-panel > *:nth-child(2) { animation-delay: 0.1s; }
.home-screen .center-panel > *:nth-child(3) { animation-delay: 0.16s; }
.home-screen .center-panel > *:nth-child(4) { animation-delay: 0.22s; }
.home-screen .center-panel > *:nth-child(5) { animation-delay: 0.28s; }
.lobby-grid > *:nth-child(1) { animation-delay: 0.04s; }
.lobby-grid > *:nth-child(2) { animation-delay: 0.12s; }
.lobby-grid > *:nth-child(3) { animation-delay: 0.2s; }
.lobby-grid > *:nth-child(4) { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 700px) {
  .lobby-grid { grid-template-columns: 1fr 1fr; }
  .lobby-grid .card-panel.full { grid-column: 1 / -1; }
}

/* =========================================================
   Multi-pages : aperçu carte (swipe) + overlays match / classement
   ========================================================= */

/* Aperçu carte façon "mini Google Maps" sous le swipe */
.map-preview {
  position: relative;
  height: 152px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  flex: none;
}
.map-preview .map { height: 100%; border: none; border-radius: 0; }
.map-preview.expanded {
  position: fixed;
  inset: 0;
  height: auto;
  z-index: 1000;
  border-radius: 0;
  border: none;
}
.map-expand, .map-collapse {
  position: absolute;
  z-index: 1001;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-body);
}
.map-expand {
  top: 8px;
  right: 8px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 0.85rem;
}
.map-collapse {
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: 10px 15px;
}

/* Overlays plein écran (sur la page swipe) */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--paper);
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.overlay .screen-inner { max-width: 780px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

/* Overlay de chargement (construction du deck) */
.loading-overlay {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(242, 165, 22, 0.32), transparent 60%),
    radial-gradient(720px 520px at 50% 118%, rgba(228, 80, 42, 0.26), transparent 60%),
    var(--paper);
  animation: overlayIn 0.3s ease both;
}
.loading-box { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 340px; }
.loading-box h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); margin: 4px 0 0; }
.plate-spinner {
  font-size: 3.6rem;
  line-height: 1;
  animation: plateSpin 1.5s ease-in-out infinite;
}
@keyframes plateSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}
.load-bar {
  width: 240px;
  max-width: 72vw;
  height: 8px;
  margin-top: 10px;
  background: #efe2cd;
  border-radius: 999px;
  overflow: hidden;
}
.load-bar > span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--primary));
  animation: loadSlide 1.2s ease-in-out infinite;
}
@keyframes loadSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* Fiche du gagnant : cliquable vers le site du restaurant */
.match-fiche-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, box-shadow 0.18s;
}
.match-fiche-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.open-cta {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  font-family: var(--font-body);
}

/* Match : ambiance festive + animation */
.match-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(242, 165, 22, 0.4), transparent 60%),
    radial-gradient(720px 520px at 50% 118%, rgba(228, 80, 42, 0.34), transparent 60%),
    var(--paper);
  animation: overlayIn 0.35s ease both;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.match-overlay .burst-title {
  font-size: clamp(1.7rem, 7vw, 2.8rem);
  margin-bottom: 14px;
  animation: pop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1.5) both;
}
.match-overlay .match-fiche {
  width: 100%;
  max-width: 460px;
  animation: riseIn 0.5s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.match-overlay #match-map {
  width: 100%;
  max-width: 460px;
  height: 190px;
  animation: riseIn 0.5s 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.match-overlay .replay { margin-top: 16px; animation: riseIn 0.5s 0.32s both; }

/* Confettis (générés en JS, CSS pur pour le mouvement) */
.confetti {
  position: absolute;
  top: -8vh;
  font-size: 1.4rem;
  pointer-events: none;
  will-change: transform;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(118vh) rotate(720deg); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}

/* Ajustements mobile */
@media (max-width: 480px) {
  .screen { padding: 16px; gap: 14px; }
  .fab { width: 60px; height: 60px; font-size: 1.5rem; }
  .map-preview { height: 132px; }
  .card-title { font-size: 1.45rem; }
}
