/* css/style.css — Design Coupe du Monde 2026 */
/* Palette : fond sombre + accent vert FIFA + rouge live */

:root {
  --bg:          #0d1117;
  --bg-card:     #161b22;
  --bg-card-2:   #1e242e;
  --accent:      #00a651;   /* vert FIFA */
  --accent-2:    #004e25;
  --live:        #e5383b;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --border:      #30363d;
  --gold:        #f0b429;
  --radius:      12px;
  --font:        'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Navigation ── */
nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: .95rem;
  transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0d1117 0%, #001a0a 50%, #0d1117 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.countdown {
  display: inline-flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 2rem;
}

.countdown-unit { text-align: center; }
.countdown-unit span { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); }
.countdown-unit small { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }

/* ── Layout principal ── */
main { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Filtres ── */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filters select,
.filters input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .5rem 1rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}

.filters select:focus,
.filters input:focus { border-color: var(--accent); }

/* ── Calendrier ── */
.day-block { margin-bottom: 2.5rem; }

.day-title {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* ── Match Card ── */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 166, 81, .15);
}

.match-card.match-live {
  border-color: var(--live);
  box-shadow: 0 0 0 1px var(--live), 0 4px 20px rgba(229, 56, 59, .2);
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 1px var(--live), 0 4px 20px rgba(229, 56, 59, .2); }
  50%       { box-shadow: 0 0 0 3px var(--live), 0 4px 30px rgba(229, 56, 59, .4); }
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
}

.match-round {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Badges statut ── */
.badge {
  font-size: .75rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-weight: 600;
}

.badge-live { background: rgba(229,56,59,.2); color: var(--live); }
.badge-ht   { background: rgba(240,180,41,.2); color: var(--gold); }
.badge-ft   { background: rgba(0,166,81,.15);  color: var(--accent); }
.badge-ns   { background: var(--bg-card-2);     color: var(--text-muted); }

/* ── Teams dans la card ── */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: .8rem 0;
  gap: .5rem;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  flex: 1;
  text-align: center;
  font-size: .9rem;
  font-weight: 500;
}

.team img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.match-score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  min-width: 70px;
  text-align: center;
}

.score-vs {
  font-size: 1rem;
  color: var(--text-muted);
}

.match-info {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
}

.time-paris { color: var(--accent); font-weight: 600; }
.separator  { color: var(--border); }

.match-venue {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .4rem;
  border-top: 1px solid var(--border);
  padding-top: .5rem;
}

/* ── Groupes ── */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.group-title {
  background: var(--accent-2);
  color: var(--accent);
  padding: .7rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.standings-table th {
  padding: .5rem .6rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  font-size: .78rem;
  background: var(--bg-card-2);
}

.standings-table th:nth-child(2) { text-align: left; }

.standings-table td {
  padding: .55rem .6rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.standings-table td:nth-child(2) { text-align: left; }

.team-cell {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.team-cell img { width: 22px; height: 22px; object-fit: contain; }

.qualified   { background: rgba(0, 166, 81, .08); }
.qualified td:first-child { border-left: 3px solid var(--accent); }

.potential   { background: rgba(240, 180, 41, .06); }
.potential td:first-child { border-left: 3px solid var(--gold); }

.standings-table tr:hover { background: var(--bg-card-2); }

/* ── Utilitaires ── */
.loading { color: var(--text-muted); padding: 2rem; text-align: center; font-size: 1.1rem; }
.error   { color: var(--live);       padding: 2rem; text-align: center; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .countdown { gap: 1rem; padding: .8rem 1rem; }
  .countdown-unit span { font-size: 1.5rem; }
  .matches-grid { grid-template-columns: 1fr; }
  .groups-grid  { grid-template-columns: 1fr; }
  nav { padding: 0 1rem; }
  .nav-links a { margin-left: .8rem; font-size: .85rem; }
}
