/* =====================================================================
   TOP DÉFI — Design System Light Mode
   Typo : Outfit — Palette : rouge #DC2626 / orange #F97316 / vert #16A34A
   Or #D97706 — Fond #F8FAFC — Cartes #FFFFFF — Interdit : dark + bleu
   ===================================================================== */

/* ---------- Variables ---------- */
:root {
  /* Palette */
  --red:        #DC2626;
  --red-dark:   #B91C1C;
  --red-soft:   #FEF2F2;
  --orange:     #F97316;
  --orange-soft:#FFF7ED;
  --green:      #16A34A;
  --green-soft: #F0FDF4;
  --gold:       #D97706;
  --gold-soft:  #FFFBEB;
  --gold-line:  #FDE68A;

  /* Surfaces */
  --bg:         #F8FAFC;
  --card:       #FFFFFF;
  --border:     #E2E8F0;
  --shadow:     0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md:  0 4px 14px rgba(15, 23, 42, .10);
  --shadow-lg:  0 12px 32px rgba(15, 23, 42, .14);

  /* Textes */
  --text:       #0F172A;
  --muted:      #475569;
  --muted-2:    #94A3B8;

  /* Divers */
  --radius:     16px;
  --radius-sm:  10px;
  --radius-lg:  22px;
  --grad-flame: linear-gradient(135deg, #F97316 0%, #DC2626 100%);
  --grad-soft:  linear-gradient(180deg, #FFF7ED 0%, #F8FAFC 70%);
  --header-h:   60px;
  --bottomnav-h: 62px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, svg, video { max-width: 100%; }
img { display: block; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
p  { margin: 0 0 1em; }

/* Accessibilité : focus visible net */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Wrapper / structure ---------- */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
  padding-bottom: calc(var(--bottomnav-h) + 12px); /* place pour la bottom-nav mobile */
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container { padding: 0 24px; }
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none !important;
  flex: 0 0 auto;
}

.brand-logo { border-radius: 8px; }

.brand-name {
  background: var(--grad-flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Nav desktop (cachée en mobile) */
.main-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex: 1 1 auto;
}

.main-nav a {
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none !important;
  transition: background .2s, color .2s;
}

.main-nav a:hover { color: var(--red); background: var(--red-soft); }

.main-nav a[aria-current="page"],
.main-nav a.active { color: var(--red); background: var(--red-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.user-chip { gap: 8px; }

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grad-flame);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .site-header-inner { padding: 0 24px; }
}

/* =====================================================================
   BANNIÈRES (Happy Hour / Impersonation / Flash)
   ===================================================================== */
.happy-banner {
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  font-size: .95rem;
}

.pulse-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite;
}

.impersonate-bar {
  background: var(--red);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 8px 16px;
  font-size: .92rem;
  text-align: center;
}

.impersonate-bar form { display: inline-flex; margin: 0; }

/* Flash toasts — position fixe au-dessus de la bottom-nav */
.flash-toast {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  bottom: calc(var(--bottomnav-h) + 16px);
  z-index: 90;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slide-up .35s ease both;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .flash-toast { bottom: 24px; }
}

.flash-success { background: var(--card); color: var(--green); border-left: 5px solid var(--green); }
.flash-error   { background: var(--card); color: var(--red);   border-left: 5px solid var(--red); }
.flash-info    { background: var(--card); color: var(--gold);  border-left: 5px solid var(--gold); }

/* =====================================================================
   BOTTOM NAV (mobile < 768px)
   ===================================================================== */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  height: var(--bottomnav-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(15, 23, 42, .06);
  display: flex;
}

.bottom-nav a {
  flex: 1;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  text-decoration: none !important;
  padding: 6px 2px;
}

.bottom-nav a.active { color: var(--red); }

.bottom-nav a svg { transition: transform .2s; }
.bottom-nav a:active svg { transform: scale(.85); }

@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  margin-top: auto; /* mt-auto */
  background: var(--card);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px 16px calc(var(--bottomnav-h) + 20px);
  color: var(--muted);
  font-size: .9rem;
}

@media (min-width: 768px) {
  .site-footer { padding-bottom: 24px; }
}

.site-footer p { margin: 0; }
.footer-credit { font-size: .8rem; color: var(--muted-2); margin-top: 2px !important; }

/* =====================================================================
   CARTES & BOUTONS
   ===================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
  -webkit-user-select: none; user-select: none;
}

.btn:active { transform: scale(.96); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 6px 18px rgba(220, 38, 38, .30); }

.btn-accent {
  background: var(--orange);
  color: #fff;
}
.btn-accent:hover { background: #EA580C; box-shadow: 0 6px 18px rgba(249, 115, 22, .30); }

.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover { background: #15803D; box-shadow: 0 6px 18px rgba(22, 163, 74, .30); }

.btn-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-outline:hover { background: var(--red-soft); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-light {
  background: #fff;
  color: var(--red);
}
.btn-light:hover { box-shadow: var(--shadow-md); }

.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* =====================================================================
   BADGES & CHIPS
   ===================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-success { background: var(--green-soft); color: var(--green); border-color: #BBF7D0; }
.badge-warning { background: var(--gold-soft);  color: var(--gold);  border-color: var(--gold-line); }
.badge-danger  { background: var(--red-soft);   color: var(--red);   border-color: #FECACA; }
.badge-neutral { background: var(--bg);         color: var(--muted); border-color: var(--border); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}

.chip:active { transform: scale(.94); }

.chip-personal { background: var(--red-soft);   color: var(--red);   border-color: #FECACA; }
.chip-duel     { background: var(--orange-soft); color: #C2410C;     border-color: #FED7AA; }
.chip-live     { background: var(--green-soft); color: var(--green); border-color: #BBF7D0; }

/* Chip verrouillée : catégorie non disponible pour ce cadeau */
.chip-locked {
  background: var(--bg);
  color: var(--muted-2);
  border: 2px dashed var(--border);
  cursor: not-allowed;
  filter: grayscale(.3);
}
.chip-locked:active { transform: none; }

/* =====================================================================
   HERO & SECTIONS
   ===================================================================== */
.hero {
  background: var(--grad-soft);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 56px;
  text-align: center;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .3em;
}

.hero-title .accent {
  background: var(--grad-flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(1.02rem, 3.4vw, 1.25rem);
  font-weight: 500;
  max-width: 620px;
  margin: 0 auto 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Petites stats de confiance */
.trust-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 720px;
  margin: 36px auto 0;
}

@media (min-width: 640px) {
  .trust-stats { grid-template-columns: repeat(3, 1fr); }
}

.trust-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.trust-stat svg { color: var(--orange); }
.trust-stat strong { font-size: 1rem; }
.trust-stat span { font-size: .82rem; color: var(--muted); }

.section {
  padding: 40px 0;
  scroll-margin-top: calc(var(--header-h) + 16px); /* ancres sous le header sticky */
}

.section-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 28px;
  border-radius: 4px;
  background: var(--orange);
  flex: 0 0 auto;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* =====================================================================
   CARROUSEL DE CADEAUX
   ===================================================================== */
.gift-carousel-wrap { position: relative; }

.gift-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 14px 4px 22px;
  scrollbar-width: none;
}

.gift-carousel::-webkit-scrollbar { display: none; }

/* Masque de défilement (fondu sur les bords) */
.gift-carousel-wrap::before,
.gift-carousel-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 8px;
  z-index: 2;
  pointer-events: none;
}

.gift-carousel-wrap::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.gift-carousel-wrap::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

/* Carte cadeau */
.gift-card {
  scroll-snap-align: start;
  flex: 0 0 78%;
  max-width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: float 5.5s ease-in-out infinite;
  transition: box-shadow .25s, transform .25s;
}

@media (min-width: 640px) {
  .gift-card { flex: 0 0 46%; }
}

@media (min-width: 992px) {
  .gift-card { flex: 0 0 31%; }
}

.gift-card:hover { box-shadow: var(--shadow-md); }

/* Décale l'animation d'une carte à l'autre pour un effet organique */
.gift-card:nth-child(2n) { animation-delay: -1.8s; }
.gift-card:nth-child(3n) { animation-delay: -3.4s; }

.gift-card.featured {
  border: 2px solid var(--gold-line);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .12), var(--shadow-md);
  animation: float-featured 4.5s ease-in-out infinite;
}

/* Compte à rebours < 1h : passage en rouge */
[data-countdown] { font-variant-numeric: tabular-nums; font-weight: 700; }
.countdown-soon { color: var(--red) !important; }

/* Retour visuel « Copié ! » des boutons [data-copy] */
.copied {
  background: var(--green) !important;
  color: #fff !important;
  border-color: var(--green) !important;
}

.gift-media {
  background: var(--grad-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
}

.gift-media img { max-height: 140px; width: auto; }

.gift-card h3 { font-size: 1.1rem; margin: 0; }

.gift-desc {
  color: var(--muted);
  font-size: .88rem;
  margin: 0;
  flex: 1 0 auto;
}

.gift-duration {
  align-self: flex-start;
}

.gift-goal {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}

.gift-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Boutons flèches du carrousel (desktop) */
.carousel-arrows {
  display: none;
  gap: 10px;
}

@media (min-width: 768px) {
  .carousel-arrows { display: flex; }
}

.carousel-arrow {
  width: 46px; height: 46px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--red);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}

.carousel-arrow:hover { background: var(--red-soft); }
.carousel-arrow:active { transform: scale(.9); }

/* =====================================================================
   CARTES CATÉGORIES
   ===================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform .25s, box-shadow .25s;
}

.category-card:hover,
.category-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  width: 74px; height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.category-icon.red    { background: var(--red-soft);    color: var(--red); }
.category-icon.orange { background: var(--orange-soft); color: var(--orange); }
.category-icon.green  { background: var(--green-soft);  color: var(--green); }
.category-icon.gold   { background: var(--gold-soft);   color: var(--gold); }

.category-card h3 { margin: 0; font-size: 1.15rem; }
.category-card p  { margin: 0; color: var(--muted); font-size: .9rem; flex: 1 0 auto; }

/* =====================================================================
   MODALS
   ===================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, .45);
  display: none;                /* activé par .is-open (via app.js) */
  align-items: flex-end;        /* mobile : carte en bas, au pouce */
  justify-content: center;
  padding: 0;
}

/* Ouverture : fondu de l'overlay (keyframes, car le passage
   display:none -> flex ne déclenche pas les transitions CSS) */
.modal-overlay.is-open {
  display: flex;
  animation: fade-in .25s ease both;
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 24px; }
}

.modal-card {
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

/* Montée de la feuille mobile (venant du bas) */
.modal-overlay.is-open .modal-card { animation: modal-sheet .3s cubic-bezier(.22, 1.1, .36, 1) both; }

@media (min-width: 640px) {
  .modal-card {
    border-radius: var(--radius-lg);
    padding: 28px;
  }
  .modal-overlay.is-open .modal-card { animation: modal-pop .3s cubic-bezier(.22, 1.1, .36, 1) both; }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h3 { margin: 0; font-size: 1.25rem; flex: 1; }

.modal-close {
  width: 40px; height: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.modal-close:hover { background: var(--red-soft); color: var(--red); }

.modal-body p { color: var(--muted); font-size: .95rem; }
.modal-body strong { color: var(--text); }

/* Bloc pédagogique « Comment voter » */
.vote-help {
  background: var(--gold-soft);
  border: 1px dashed var(--gold-line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
}

.vote-help h4 {
  color: var(--gold);
  font-size: .95rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-help ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .88rem; }
.vote-help li { margin-bottom: 6px; }

.modal-cta { display: flex; justify-content: center; margin-top: 18px; }

/* =====================================================================
   OTP (6 cases)
   ===================================================================== */
.otp-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 14px 0;
}

.otp-input input {
  width: 46px; height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  caret-color: var(--red);
}

.otp-input input:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

/* =====================================================================
   JAUGES DE PROGRESSION
   ===================================================================== */
.gauge {
  background: var(--border);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width .6s cubic-bezier(.22, 1, .36, 1);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 6px;
}

/* Jauge deux camps face-à-face */
.duel-gauge {
  position: relative;
  background: var(--border);
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
}

.duel-gauge-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width .8s cubic-bezier(.22, 1, .36, 1);
}

/* Aiguille centrale */
.duel-gauge-needle {
  position: absolute;
  top: -4px; bottom: -4px;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(15, 23, 42, .35);
  transition: left .8s cubic-bezier(.22, 1, .36, 1);
  z-index: 2;
}

.duel-gauge.shake { animation: bounce-soft .5s ease; }

.duel-gauge-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: .85rem;
  font-weight: 700;
}

.duel-gauge-legend .me     { color: var(--red); }
.duel-gauge-legend .opp    { color: var(--gold); }

/* =====================================================================
   TABLEAUX & LISTES
   ===================================================================== */
.votes-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.votes-table th, .votes-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}

.votes-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.votes-table tr:last-child td { border-bottom: 0; }

/* Mobile : le tableau devient des cartes empilées */
@media (max-width: 767px) {
  .votes-table thead { display: none; }

  .votes-table,
  .votes-table tbody,
  .votes-table tr,
  .votes-table td {
    display: block;
    width: 100%;
  }

  .votes-table tr {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  .votes-table td {
    border: 0;
    padding: 5px 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .votes-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted-2);
    font-size: .78rem;
    text-transform: uppercase;
  }
}

/* Liste déroulante fine */
.scroll-list {
  max-height: 24rem;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--orange) transparent;
}

.scroll-list::-webkit-scrollbar { width: 6px; }
.scroll-list::-webkit-scrollbar-track { background: transparent; }
.scroll-list::-webkit-scrollbar-thumb {
  background: var(--orange);
  border-radius: 999px;
}

.scroll-list li {
  list-style: none;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.scroll-list li:last-child { border-bottom: 0; }

/* =====================================================================
   MATCHMAKING (recherche d'adversaire)
   ===================================================================== */
.matchmaking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 30px 16px;
}

.matchmaking-rings {
  position: relative;
  width: 120px; height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matchmaking-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--orange);
  opacity: 0;
  animation: ring-pulse 2s ease-out infinite;
}

.matchmaking-ring:nth-child(2) { animation-delay: .55s; }
.matchmaking-ring:nth-child(3) { animation-delay: 1.1s; }

.matchmaking-avatars {
  display: flex;
  gap: 10px;
  align-items: center;
}

.matchmaking .avatar { width: 44px; height: 44px; font-size: 1.05rem; }

.matchmaking-vs {
  font-weight: 800;
  color: var(--gold);
  font-size: .9rem;
  animation: pulse 1.4s ease-in-out infinite;
}

.matchmaking-text {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

/* =====================================================================
   VIDÉOS & PUBLICITÉ
   ===================================================================== */
.video-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0F172A; /* uniquement le cadre vidéo, pas la page */
  display: block;
}

.video-card-body { padding: 14px 16px; }
.video-card-body h4 { margin: 0 0 4px; font-size: 1rem; }
.video-card-body p  { margin: 0; color: var(--muted); font-size: .85rem; }

.ad-box {
  background: var(--gold-soft);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.ad-box h4 { color: var(--gold); margin-bottom: 6px; }
.ad-box p  { color: var(--muted); font-size: .9rem; }

/* =====================================================================
   FORMULAIRES (utilisé par register/login/vote…)
   ===================================================================== */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

.hint { font-size: .8rem; color: var(--muted-2); margin-top: 4px; }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@keyframes float-featured {
  0%, 100% { transform: scale(1.04) translateY(0); }
  50%      { transform: scale(1.04) translateY(-7px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .45; transform: scale(1.18); }
}

@keyframes ring-pulse {
  0%   { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce-soft {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  50%      { transform: translateX(5px); }
  75%      { transform: translateX(-3px); }
}

/* Montée de la modal mobile (feuille venant du bas) */
@keyframes modal-sheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Apparition de la modal desktop (centrée) */
@keyframes modal-pop {
  from { transform: translateY(30px) scale(.96); opacity: .5; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.anim-fade-in  { animation: fade-in .5s ease both; }
.anim-slide-up { animation: slide-up .5s ease both; }
.anim-spin     { animation: spin 1s linear infinite; }

/* Respect des préférences d'accessibilité */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   UTILITAIRES & BREAKPOINTS
   ===================================================================== */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* sm : ≥ 640px */
@media (min-width: 640px) {
  .section { padding: 48px 0; }
}

/* md : ≥ 768px */
@media (min-width: 768px) {
  .hero { padding: 64px 0 72px; }
  .section { padding: 56px 0; }
}

/* lg : ≥ 992px */
@media (min-width: 992px) {
  .section { padding: 64px 0; }
}
