/* ==========================================================================
   Vote — Réaménagement des commerces & Kebab RP
   Design mobile-first, thème sombre "Obsidian premium" : noir violet profond,
   cartes vitrées, accents indigo, typographie sobre.
   ========================================================================== */

:root {
  --bg: #0d0c13;
  --bg-soft: #14131c;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-bg-soft: rgba(255, 255, 255, 0.015);
  --card-border: rgba(167, 139, 250, 0.16);

  --text: #eae8f2;
  --text-muted: #9d99ac;

  --accent-1: #7c3aed;
  --accent-2: #a78bfa;
  --accent-3: #c9bdfb;

  --pour: #34d399;
  --pour-2: #0fa572;
  --contre: #fb7185;
  --contre-2: #d9294f;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Halos violets, façon lueur d'obsidienne */
.glow-top {
  position: fixed;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  max-width: 200vw;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.32), rgba(167, 139, 250, 0.12) 45%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.glow-bottom {
  position: fixed;
  bottom: -280px;
  right: -160px;
  width: 700px;
  height: 500px;
  max-width: 160vw;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.16), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* ---------- En-tête ---------- */

.hero {
  text-align: center;
  padding: 12px 4px 32px;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
}

.hero__title {
  font-weight: 800;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  background: linear-gradient(100deg, #fff 15%, var(--accent-3) 60%, var(--accent-1) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  margin: 0 auto;
  max-width: 42ch;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---------- Cartes ---------- */

.layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.content-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.card {
  background: linear-gradient(180deg, var(--card-bg), var(--card-bg-soft));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card--accent {
  border-color: rgba(167, 139, 250, 0.32);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.12), var(--card-bg-soft) 60%);
}

.card__title {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: #fff;
}

.card p {
  margin: 0 0 14px;
  color: var(--text);
}

.card p:last-child {
  margin-bottom: 0;
}

.card strong {
  color: #fff;
}

/* Listes */

.list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.list__badge {
  flex: none;
  min-width: 40px;
  text-align: center;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: 999px;
}

.list--check li::before {
  content: '✓';
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-weight: 800;
  color: #04241a;
  background: linear-gradient(135deg, var(--pour), var(--pour-2));
  border-radius: 50%;
}

.lead {
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
}

.subheading {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  color: var(--accent-2);
  margin: 20px 0 12px;
}

.flow {
  margin: 4px 0 20px;
}

.flow__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.flow__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #16072e;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
  border-radius: 50%;
}

.list--feature li {
  align-items: flex-start;
}

.list__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.16);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
}

/* ---------- Vidéos ---------- */

.videos__caption {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 8px !important;
}

.videos-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--card-border);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Vote ---------- */

.vote-card {
  text-align: center;
}

.live-counter {
  margin: 0 0 16px;
  padding: 12px 16px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 999px;
}

.live-counter strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-3);
}

.live-counter__pour {
  color: var(--pour);
  font-weight: 800;
}

.vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  min-height: 60px;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  border-radius: var(--radius-md);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  touch-action: manipulation;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--pour {
  background: linear-gradient(135deg, var(--pour), var(--pour-2));
  box-shadow: 0 8px 22px rgba(15, 165, 114, 0.35);
}

.btn--contre {
  background: linear-gradient(135deg, var(--contre), var(--contre-2));
  box-shadow: 0 8px 22px rgba(217, 41, 79, 0.35);
}

.vote-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(217, 41, 79, 0.12);
  border: 1px solid rgba(217, 41, 79, 0.35);
  color: #ffb3c2;
  font-size: 0.95rem;
}

.vote-message {
  margin-top: 6px;
}

.vote-message p {
  margin: 0;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pour);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-sm);
}

/* Résultats */

.results {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.result-row__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-weight: 700;
}

#pour-percent,
#contre-percent {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-fill--pour {
  background: linear-gradient(90deg, var(--pour-2), var(--pour));
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.5);
}

.progress-fill--contre {
  background: linear-gradient(90deg, var(--contre-2), var(--contre));
  box-shadow: 0 0 14px rgba(251, 113, 133, 0.5);
}

.result-row__count {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.results__total {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.87rem;
  padding: 0 8px;
}

.footer__credit {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ---------- Utilitaires ---------- */

.hidden {
  display: none !important;
}

/* ---------- Écrans plus larges ---------- */

@media (min-width: 640px) {
  .page {
    padding: 48px 24px 64px;
  }

  .card {
    padding: 32px 36px;
  }

  .vote-buttons {
    flex-direction: row;
  }

  .btn {
    flex: 1;
  }
}

/* ---------- Version PC : mise en page dédiée, pas juste une colonne mobile étirée ---------- */

@media (min-width: 1024px) {
  .page {
    max-width: 1120px;
    padding: 56px 32px 72px;
  }

  .hero {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 40px;
  }

  .hero__title {
    font-size: clamp(2.2rem, 3vw, 3rem);
  }

  .card {
    padding: 36px 40px;
  }

  .card__title {
    font-size: 1.65rem;
  }

  /* Colonne de lecture + sidebar de vote qui reste visible pendant le scroll */
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
  }

  .content-col {
    gap: 24px;
  }

  .vote-sidebar {
    position: sticky;
    top: 28px;
  }

  .vote-sidebar .card {
    padding: 30px 28px;
  }

  /* Dans la sidebar, les boutons restent empilés (colonne trop étroite pour être côte à côte) */
  .vote-sidebar .vote-buttons {
    flex-direction: column;
  }

  /* Les vidéos et les listes profitent de la largeur disponible au lieu de rester en une colonne */
  .videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .flow__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .btn {
    transition: none;
  }
}
