:root {
  --bg:         #0d0d0d;
  --surface:    #161616;
  --surface-2:  #1e1e1e;
  --border:     #282828;
  --bleu:       #1e4fbf;
  --bleu-clair: #4a7fd4;
  --or:         #f4c20d;
  --rouge:      #e63946;
  --gris:       #161616;
  --texte:      #f0f0f0;
  --texte-muted:#888;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--texte);
  line-height: 1.6;
}

/* ── HEADER ─────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #060e1f 0%, #0c1e3d 100%);
  color: #fff;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 2px 14px rgba(0,0,0,.5);
  border-bottom: 1px solid #1a2a4a;
}

header .logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.4rem;
  font-weight: 700;
}
header .logo span { color: var(--or); }

nav > ul { display: flex; gap: .5rem; list-style: none; flex-wrap: wrap; align-items: center; }

nav a {
  color: #b0bcd8;
  text-decoration: none;
  font-weight: 600;
  padding: .4rem .65rem;
  border-radius: 6px;
  transition: background .18s, color .18s;
}
nav a:hover, nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.has-dropdown.active-parent > a {
  background: rgba(244,194,13,.1);
  color: var(--or);
}

/* ── HERO ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #060e1f 0%, #9b1a20 60%, #6b0000 100%);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero h1 { font-size: 2.8rem; margin-bottom: .6rem; text-shadow: 0 2px 12px rgba(0,0,0,.5); position: relative; }
.hero p  { font-size: 1.2rem; opacity: .9; position: relative; }

/* ── MAIN / SECTION ─────────────────────────────── */
main { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; }
section { margin-bottom: 3rem; }

h2 {
  color: #fff;
  border-bottom: 3px solid var(--or);
  padding-bottom: .4rem;
  margin-bottom: 1.2rem;
  font-size: 1.6rem;
}

h3 { color: #fff; }

/* ── CARDS ──────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  perspective: 1000px;
}

.card {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  border-left: 4px solid var(--bleu-clair);
  transition: transform .12s ease-out, box-shadow .25s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover { box-shadow: 0 16px 36px rgba(0,0,0,.6); }
.card h3 { color: var(--or); margin-bottom: .4rem; }
.card .meta { font-size: .9rem; color: var(--texte-muted); margin-bottom: .5rem; }
.card a { color: var(--bleu-clair); }

.card.has-image { padding: 0; overflow: hidden; }
.card.has-image .card-img { display: block; width: 100%; height: 170px; object-fit: cover; transform: translateZ(0); }
.card.has-image .card-body { padding: 1.2rem; transform: translateZ(20px); }

/* ── BADGE ──────────────────────────────────────── */
.badge {
  display: inline-block;
  background: var(--or);
  color: #111;
  font-weight: 700;
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  margin-right: .3rem;
}

/* ── TABLE ──────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
th { background: #060e1f; color: #fff; cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { background: var(--bleu); }
tbody tr:hover { background: rgba(255,255,255,.04); }
td { color: var(--texte); }

/* ── FLAGS ──────────────────────────────────────── */
.flag {
  width: 24px; height: 18px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(255,255,255,.1);
  margin-right: .4rem;
  flex-shrink: 0;
}
.team-cell { display: flex; align-items: center; white-space: nowrap; }

/* ── GROUPES ────────────────────────────────────── */
.groupe-section { margin-bottom: 2rem; }
.groupe-section h3 { color: #fff; margin-bottom: .8rem; display: flex; align-items: center; gap: .6rem; }
.groupe-section h3 .badge { margin-right: 0; }

.team-card { display: flex; align-items: center; gap: .8rem; }
.team-card .flag { width: 36px; height: 27px; }
.team-card .infos h4 { color: #fff; margin-bottom: .2rem; }
.team-card .infos .meta { font-size: .85rem; color: var(--texte-muted); margin-bottom: 0; }

.groupes-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .8rem;
}
.groupe-mini-card {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  border-left: 4px solid var(--or);
}
.groupe-mini-card h4 { color: var(--or); margin-bottom: .5rem; }
.groupe-mini-card ul { list-style: none; }
.groupe-mini-card li { display: flex; align-items: center; gap: .5rem; padding: .15rem 0; font-size: .92rem; color: var(--texte); }

/* ── MAP ────────────────────────────────────────── */
#map { width: 100%; height: 420px; border-radius: 10px; margin-bottom: 1.2rem; box-shadow: 0 2px 10px rgba(0,0,0,.5); z-index: 1; }
.map-popup img { width: 100%; border-radius: 6px; margin-bottom: .4rem; }
.map-popup h3 { color: var(--bleu); font-size: 1rem; margin-bottom: .2rem; }

/* ── FILTERS ────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.2rem; }
.filters input, .filters select {
  padding: .55rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface-2);
  color: var(--texte);
}
.filters input::placeholder { color: var(--texte-muted); }
.filters input { flex: 1; min-width: 200px; }

/* ── TIMELINE ───────────────────────────────────── */
.timeline { list-style: none; }
.timeline li {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: .8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  border-left: 3px solid var(--border);
}
.timeline .date { font-weight: 700; color: var(--or); min-width: 160px; }

/* ── MATCHS ─────────────────────────────────────── */
.match-item { flex-direction: column; align-items: stretch; gap: .4rem; }
.match-item .match-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.match-item .teams { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; }
.match-item .teams .vs { color: var(--texte-muted); font-weight: 400; font-size: .9rem; }
.match-item .match-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .88rem; color: var(--texte-muted); }
.match-item .badge.statut { background: var(--bleu-clair); color: #fff; }

#section-direct, #section-resultats, #section-avenir { margin-bottom: 1.8rem; }

.match-item.en-direct { border-left: 4px solid var(--rouge); }
.match-item.en-direct .badge.statut { background: var(--rouge); }

.pronostic { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.pronostic .cote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .8rem;
  color: var(--texte-muted);
}
.pronostic .cote strong { color: var(--or); }

/* ── NOTE ───────────────────────────────────────── */
.note {
  background: #1a1500;
  border: 1px solid #f4c20d33;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-size: .92rem;
  color: var(--texte-muted);
}

/* ── FOOTER ─────────────────────────────────────── */
footer {
  text-align: center;
  padding: 1.5rem;
  color: #555;
  font-size: .85rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
footer a { color: #666; text-decoration: underline; }

.social-links { margin-top: .6rem; display: flex; justify-content: center; gap: 1rem; }
.social-links a { text-decoration: none; color: #666; }
.social-links a:hover { color: var(--bleu-clair); }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.9rem; }
  th, td { padding: .5rem .6rem; font-size: .9rem; }
}

/* ═══════════════════════════════════════════════════
   PAGE ACTUALITÉS — news grid (theScore style)
   ═══════════════════════════════════════════════════ */

.news-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.news-status { color: #555; font-size: .8rem; }

.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: 1.5rem;
}

.news-pills { display: flex; gap: .5rem; flex-wrap: wrap; }

.news-pill {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--texte-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.news-pill:hover { border-color: var(--rouge); color: var(--rouge); }
.news-pill.active { background: var(--rouge); border-color: var(--rouge); color: #fff; }

.news-filters { display: flex; gap: .6rem; flex-wrap: wrap; }
.news-filters input,
.news-filters select {
  padding: .45rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  background: var(--surface-2);
  color: var(--texte);
}
.news-filters input { min-width: 200px; }
.news-filters input::placeholder { color: var(--texte-muted); }

/* Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.news-empty {
  grid-column: 1 / -1;
  color: var(--texte-muted);
  padding: 2rem 0;
  text-align: center;
}

/* Card */
.news-card {
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  border: 1px solid var(--border);
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,.6);
  border-color: #3a3a3a;
}

.news-img-wrap {
  display: block;
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  text-decoration: none;
}
.news-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.news-card:hover .news-img-wrap img { transform: scale(1.05); }

.news-cat-label {
  position: absolute;
  top: 10px; left: 10px;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px 9px;
  border-radius: 4px;
}

.news-content {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.news-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.news-source-name { color: var(--rouge); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.news-dot { color: #444; font-size: .72rem; }
.news-time { color: #555; font-size: .72rem; }

.news-title { font-size: .98rem; font-weight: 700; line-height: 1.4; color: #f0f0f0; margin: 0; }
.news-title a { color: inherit; text-decoration: none; }
.news-title a:hover { color: var(--rouge); }

.news-desc {
  font-size: .82rem;
  color: var(--texte-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-read-more {
  color: var(--rouge);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: auto;
  padding-top: .4rem;
}
.news-read-more:hover { text-decoration: underline; }

/* Featured card — pleine largeur */
.news-card.news-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  min-height: 300px;
}
.news-card.news-featured .news-img-wrap { min-width: 52%; padding-top: 0; }
.news-card.news-featured .news-title { font-size: 1.4rem; }
.news-card.news-featured .news-desc { -webkit-line-clamp: 5; font-size: .9rem; }

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card.news-featured { flex-direction: column; }
  .news-card.news-featured .news-img-wrap { padding-top: 56.25%; }
}

@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-toolbar { flex-direction: column; align-items: flex-start; }
  .news-filters input { min-width: 0; width: 100%; }
}

/* ═══════════════════════════════════════════════════
   NAV DROPDOWN + MOBILE
   ═══════════════════════════════════════════════════ */

.logo a, .nav-logo { color: #fff; text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: .35rem .6rem;
  border-radius: 6px;
  line-height: 1;
  transition: background .15s;
}
.nav-toggle:hover { background: rgba(255,255,255,.1); }

.has-dropdown { position: relative; }

.has-dropdown > a::after {
  content: " ▾";
  font-size: .65rem;
  opacity: .6;
  vertical-align: middle;
}

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #0a1830;
  border: 1px solid #1e304f;
  border-radius: 10px;
  padding: .45rem 0;
  z-index: 400;
  box-shadow: 0 14px 34px rgba(0,0,0,.7);
  list-style: none;
}

.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: .55rem 1.1rem;
  color: #9ab;
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.dropdown li a:hover { background: rgba(255,255,255,.07); color: #fff; }
.dropdown li a.active { color: var(--or); font-weight: 700; }

/* ── MATCHS : pills de période ──────────────────── */
.match-toolbar {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  margin-bottom: 1.2rem;
}

.period-pills { display: flex; gap: .5rem; flex-wrap: wrap; }

.period-pill {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--texte-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.period-pill:hover { border-color: var(--or); color: var(--or); }
.period-pill.active { background: var(--or); border-color: var(--or); color: #111; font-weight: 700; }

/* ── MATCHS : groupement par jour ───────────────── */
.jour-section { margin-bottom: 1.6rem; }

.jour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border-left: 4px solid var(--or);
  padding: .65rem 1.1rem;
  border-radius: 8px 8px 0 0;
}

.jour-header.live-header {
  border-left-color: var(--rouge);
  background: rgba(230,57,70,.1);
}

.jour-label { font-weight: 700; color: #fff; font-size: .95rem; }
.jour-count { color: var(--texte-muted); font-size: .8rem; }

.jour-section > .timeline { border-radius: 0 0 8px 8px; overflow: hidden; }
.jour-section > .timeline li { border-radius: 0; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.jour-section > .timeline li:last-child { border-bottom: none; }

/* ── MOBILE (≤800px) ────────────────────────────── */
@media (max-width: 800px) {
  .nav-toggle { display: block; }

  nav {
    display: none;
    width: 100%;
    background: #060e1f;
    border-top: 1px solid #1a2a4a;
    padding: .3rem 0 .8rem;
  }
  nav.open { display: block; }

  nav ul { flex-direction: column; gap: 0; }
  nav > ul > li > a {
    display: block;
    padding: .75rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid #1a2a4a11;
  }

  .has-dropdown > a::after { float: right; }

  /* Disable hover on mobile — use .open */
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block !important; }

  .dropdown {
    position: static;
    background: rgba(255,255,255,.03);
    border: none;
    border-left: 2px solid var(--bleu-clair);
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    padding: .2rem 0;
    margin-left: 1.8rem;
    margin-bottom: .3rem;
  }
  .dropdown li a { padding: .5rem 1rem; }
}
