:root {
  --pitch-dark: #0E2A1E;
  --pitch: #145C36;
  --gold: #C99A2E;
  --bg: #F6F7F4;
  --card: #FFFFFF;
  --text: #1B2420;
  --text-muted: #5B6660;
  --border: #E2E5DF;
  --radius: 8px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1, h2, h3, .display {
  font-family: 'Oswald', 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pitch-dark);
  margin: 0 0 0.5em;
}
a { color: var(--pitch); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  background: var(--pitch-dark);
  color: #fff;
  padding: 0.9rem 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.logo { font-family: 'Oswald', sans-serif; font-size: 1.3rem; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.03em; }
.logo span { color: var(--gold); }
.main-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.main-nav a { color: #E6E9E3; font-size: 0.92rem; font-weight: 500; }
.main-nav a:hover { color: var(--gold); text-decoration: none; }
.main-nav a.vip { color: var(--gold); font-weight: 700; }
.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #229ED9 !important; /* bleu Telegram */
  color: #fff !important;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.telegram-link i { font-size: 1rem; }
.telegram-link:hover {
  background: #1b8ac0 !important;
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Main */
main.container { padding-top: 1.75rem; padding-bottom: 3rem; min-height: 60vh; }
.page-lead { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 60ch; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

/* Match list */
.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.match-row:last-child { border-bottom: none; }
.match-teams { font-weight: 600; }
.match-time { font-family: 'Oswald', sans-serif; color: var(--gold); font-weight: 600; white-space: nowrap; }
.league-group { margin-bottom: 1.75rem; }
.league-group h2 { font-size: 1.05rem; border-bottom: 2px solid var(--pitch); padding-bottom: 0.4rem; }

/* Nav pills (jours / marchés) */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text);
}
.pill:hover { border-color: var(--pitch); text-decoration: none; }

/* Grid of leagues / markets */
.grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; list-style: none; padding: 0; margin: 0; }
.grid-list li a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  color: var(--text);
}
.grid-list li a:hover { border-color: var(--pitch); text-decoration: none; }
.league-link { display: flex; align-items: center; gap: 0.6rem; }
.league-link .league-logo { width: 32px; height: 32px; flex-shrink: 0; }

/* Predictions table */
.predictions-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.predictions-table th, .predictions-table td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.predictions-table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }

.vip-cta {
  background: var(--pitch-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.vip-cta a {
  background: var(--gold);
  color: var(--pitch-dark);
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  white-space: nowrap;
}
.vip-cta a:hover { text-decoration: none; opacity: 0.9; }

.empty-state { color: var(--text-muted); font-style: italic; padding: 1.5rem 0; }

/* ===== Carrousel de matchs ===== */
.carousel { position: relative; margin-bottom: 1.75rem; }
.carousel-track { overflow: hidden; }
.carousel-slide {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.carousel-slide.active { display: grid; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--pitch);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.carousel-dot.active { background: var(--pitch); }

/* Flèches précédent / suivant (pagination statique contrôlée par l'utilisateur) */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--pitch);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.carousel-arrow:hover {
  background: var(--pitch);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}
.carousel-prev { left: -20px; }
.carousel-next { right: -20px; }
@media (max-width: 860px) {
  .carousel-prev { left: -10px; }
  .carousel-next { right: -10px; }
}

/* Carte match */
.match-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.match-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.match-card-league { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.match-card-league:hover { color: var(--pitch); text-decoration: none; }
.match-card-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.match-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}
.match-card-link { font-size: 0.85rem; font-weight: 600; }

/* Logos */
.league-logo { width: 28px; height: 28px; object-fit: contain; }
.league-logo-lg { width: 44px; height: 44px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; flex: 1; }
.team-logo { width: 42px; height: 42px; object-fit: contain; }
.team-name { font-size: 0.82rem; font-weight: 600; line-height: 1.2; }
.vs { font-family: 'Oswald', sans-serif; color: var(--text-muted); font-weight: 600; }
.score { font-family: 'Oswald', sans-serif; color: var(--pitch-dark); font-weight: 700; font-size: 1.3rem; white-space: nowrap; }

/* Hero page match */
.match-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.match-hero-teams { display: flex; align-items: center; justify-content: center; gap: 1rem; width: 100%; }
.match-hero-teams .team { flex-direction: row; justify-content: center; gap: 0.6rem; }
.match-hero-teams .team-name { font-size: 1rem; }
.match-hero-date { margin: 0; text-align: center; }

/* Fond de stade (gradins + pelouse + projecteurs) derrière le hero du match.
   SVG inline en data-URI : aucune image externe, semi-transparent pour
   garder le contenu (équipes, score, date) parfaitement lisible. */
.match-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.match-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 500'%3E%3Crect width='900' height='500' fill='%23092e1f'/%3E%3Crect x='55' y='8' width='10' height='160' fill='%231d4a35'/%3E%3Cellipse cx='60' cy='172' rx='48' ry='10' fill='%23fff6d8' opacity='0.65'/%3E%3Crect x='835' y='8' width='10' height='160' fill='%231d4a35'/%3E%3Cellipse cx='840' cy='172' rx='48' ry='10' fill='%23fff6d8' opacity='0.65'/%3E%3Cg stroke='%23235c42' stroke-width='6'%3E%3Cline x1='100' y1='55' x2='800' y2='55'/%3E%3Cline x1='80' y1='95' x2='820' y2='95'/%3E%3Cline x1='60' y1='135' x2='840' y2='135'/%3E%3Cline x1='40' y1='175' x2='860' y2='175'/%3E%3C/g%3E%3Crect x='180' y='185' width='540' height='130' rx='8' fill='%23166b3c'/%3E%3Crect x='190' y='195' width='520' height='110' fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='2'/%3E%3Cline x1='450' y1='195' x2='450' y2='305' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='2'/%3E%3Ccircle cx='450' cy='250' r='45' fill='none' stroke='%23ffffff' stroke-opacity='0.4' stroke-width='2'/%3E%3Ccircle cx='450' cy='250' r='12' fill='%23ffffff' fill-opacity='0.35'/%3E%3Crect x='190' y='215' width='45' height='70' fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='2'/%3E%3Crect x='665' y='215' width='45' height='70' fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='2'/%3E%3Cg stroke='%23235c42' stroke-width='6'%3E%3Cline x1='40' y1='325' x2='860' y2='325'/%3E%3Cline x1='60' y1='365' x2='840' y2='365'/%3E%3Cline x1='80' y1='405' x2='820' y2='405'/%3E%3Cline x1='100' y1='445' x2='800' y2='445'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  pointer-events: none;
}
.match-hero > * {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 860px) {
  .carousel-slide { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .match-hero-teams { flex-direction: column; }
}

/* Footer */
.site-footer { background: var(--pitch-dark); color: #C6CCC3; padding: 2rem 0; margin-top: 3rem; font-size: 0.85rem; }
.site-footer a { color: #C6CCC3; }
.site-footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

/* Responsive */
@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .match-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .vip-cta { flex-direction: column; align-items: flex-start; }
}

/* ===== Layout accueil : sites de paris à gauche, contenu à droite ===== */
.home-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.home-sidebar { min-width: 0; }
.home-content { min-width: 0; }

@media (max-width: 980px) {
  .home-layout { grid-template-columns: 1fr; }
}

/* ===== Panneau des sites de paris ===== */
.betting-panel {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
@media (max-width: 980px) {
  .betting-panel { position: static; }
}

/* Bannière promo animée */
.promo-banner {
  position: relative;
  border-radius: 12px;
  padding: 1.4rem 1.25rem;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1f2a 0%, #123b2e 55%, #1d5c3f 100%);
  border: 1px solid rgba(201, 154, 46, 0.45);
  box-shadow: 0 10px 30px rgba(6, 26, 18, 0.35);
}
.promo-banner-inner { position: relative; z-index: 2; }
.promo-tag {
  display: inline-block;
  background: var(--gold);
  color: #0b1f2a;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  animation: tagPulse 2s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.promo-title {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
  line-height: 1.25;
  text-transform: uppercase;
  color: #fff;
}
.promo-highlight { color: var(--gold); }
.promo-sub { margin: 0.2rem 0; font-size: 0.85rem; opacity: 0.9; }
.promo-code {
  display: inline-block;
  margin: 0.6rem auto 0.3rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed var(--gold);
  border-radius: 10px;
  padding: 0.25rem 1.4rem;
  animation: codeBlink 1.6s ease-in-out infinite;
}
@keyframes codeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.promo-note { margin: 0.3rem 0 0; font-size: 0.72rem; opacity: 0.75; }

/* Pluie de billets */
.bills { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.bill {
  position: absolute;
  top: -12%;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 1rem;
  opacity: 0;
  animation: billFall linear infinite;
}
.bill:nth-child(1) { left: 6%;  animation-duration: 5.5s; animation-delay: 0s; }
.bill:nth-child(2) { left: 16%; animation-duration: 7s;   animation-delay: 1.2s; }
.bill:nth-child(3) { left: 27%; animation-duration: 6s;   animation-delay: 0.6s; }
.bill:nth-child(4) { left: 38%; animation-duration: 8s;   animation-delay: 2s; }
.bill:nth-child(5) { left: 49%; animation-duration: 5s;   animation-delay: 0.9s; }
.bill:nth-child(6) { left: 60%; animation-duration: 7.5s; animation-delay: 1.7s; }
.bill:nth-child(7) { left: 70%; animation-duration: 6.5s; animation-delay: 0.3s; }
.bill:nth-child(8) { left: 80%; animation-duration: 5.8s; animation-delay: 2.4s; }
.bill:nth-child(9) { left: 90%; animation-duration: 7.2s; animation-delay: 1s; }
.bill:nth-child(10) { left: 95%; animation-duration: 6.2s; animation-delay: 0.2s; }
.bill:nth-child(11) { left: 44%; animation-duration: 8.5s; animation-delay: 3s; }
.bill:nth-child(12) { left: 22%; animation-duration: 9s;   animation-delay: 2.8s; }

@keyframes billFall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.85; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(70vh) rotate(340deg); opacity: 0; }
}

/* Grille des partenaires */
.partner-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 420px) {
  .partner-list { grid-template-columns: 1fr; }
}
.partner-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand, var(--pitch));
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.partner-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.partner-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
}
.partner-logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--brand, var(--pitch));
}
.partner-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.partner-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partner-bonus { font-size: 0.72rem; color: var(--brand, var(--pitch)); font-weight: 600; }
.partner-arrow { color: var(--text-muted); font-weight: 700; font-size: 1rem; }
.partner-card:hover .partner-arrow { color: var(--brand, var(--pitch)); transform: translateX(2px); }
.partner-arrow { transition: transform 0.15s ease, color 0.15s ease; }

.betting-legal { font-size: 0.7rem; color: var(--text-muted); text-align: center; margin: 0.2rem 0 0; }

/* ===== Carte popup d'inscription bookmaker (bas de page) ===== */
.promo-popup {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 340px;
  width: calc(100% - 2rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 6px solid var(--gold);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 12px 40px rgba(6, 26, 18, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transform: translateY(130%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}
.promo-popup.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.promo-popup-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  border-radius: 50%;
}
.promo-popup-close:hover { color: var(--pitch-dark); background: var(--bg); }
.promo-popup-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 1.6rem; /* laisse la place au bouton de fermeture */
}
.promo-popup-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
}
.promo-popup-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.promo-popup-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pitch-dark);
  line-height: 1.1;
}
.promo-popup-msg {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}
.promo-popup-code {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201, 154, 46, 0.12);
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 0 0.3rem;
}
.promo-popup-btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--brand, var(--pitch));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}
.promo-popup-btn:hover {
  filter: brightness(0.92);
  text-decoration: none;
}
.promo-popup-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .promo-popup {
    left: 0.5rem;
    bottom: 0.5rem;
    width: calc(100% - 1rem);
    max-width: none;
  }
}
