/*
Theme Name: Coupe du Monde
Theme URI: https://coupedumonde.info
Author: coupedumonde.info
Author URI: https://coupedumonde.info
Description: Thème WordPress officiel pour coupedumonde.info — résultats, classements, calendrier, galerie et live scores. Inspiré du style FIFA. v2.0 : multilingue FR/EN/ES, intégration API live score, SEO schema.org, optimisations performance.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coupedumonde
Tags: sport, football, world-cup, responsive, dark, multilingual
*/

/* =========================================================
   TOKENS — Palette FIFA-inspired
   =========================================================
   #001F5B  Navy primaire (FIFA deep blue)
   #006644  Vert terrain (FIFA green)
   #C8A84B  Or/trophée (FIFA gold)
   #E8192C  Rouge accent (score live / alerte)
   #F5F7FA  Gris clair fond
   #0A0E1A  Noir profond (backgrounds sombres)
   ========================================================= */

:root {
  --navy:    #001F5B;
  --green:   #006644;
  --gold:    #C8A84B;
  --red:     #E8192C;
  --light:   #F5F7FA;
  --dark:    #0A0E1A;
  --white:   #FFFFFF;
  --gray:    #8A9BB5;
  --border:  #1E3A6B;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-data:    'Roboto Mono', 'Courier New', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--light);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===================== TYPOGRAPHY ===================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

/* ===================== LAYOUT ===================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--dark  { background: var(--dark); }
.section--navy  { background: var(--navy); }
.section--green { background: var(--green); }

/* ===================== HEADER ===================== */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 48px;
  height: 48px;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-text .main {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.logo-text .sub {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ===================== NAV ===================== */
.main-nav ul {
  display: flex;
  gap: 8px;
  align-items: center;
}
.main-nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  color: rgba(255,255,255,0.85);
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--gold);
  color: var(--dark);
}
.nav-live {
  background: var(--red) !important;
  color: var(--white) !important;
  animation: pulse-nav 2s infinite;
}
@keyframes pulse-nav {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,25,44,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(232,25,44,0); }
}

/* ===================== HERO ===================== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #003080 50%, var(--green) 100%);
  padding: 80px 24px;
  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='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%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/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-label {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
}
.hero h1 { color: var(--white); margin-bottom: 16px; }
.hero-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  max-width: 460px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 40px;
}
.stat-block {
  background: rgba(0,0,0,0.3);
  padding: 24px;
  text-align: center;
}
.stat-block .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  display: block;
}
.stat-block .lbl {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===================== LIVE SCORES TICKER ===================== */
.live-ticker {
  background: var(--red);
  padding: 12px 0;
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
}
.ticker-label {
  background: rgba(0,0,0,0.3);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  padding: 4px 20px;
  white-space: nowrap;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.ticker-scroll {
  display: flex;
  animation: scroll-left 30s linear infinite;
  gap: 48px;
  padding-left: 48px;
}
.ticker-scroll:hover { animation-play-state: paused; }
@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
}
.ticker-score {
  background: rgba(0,0,0,0.3);
  padding: 2px 10px;
  border-radius: 4px;
  font-family: var(--font-data);
  font-size: 1rem;
}
.ticker-min {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-data);
}

/* ===================== SECTION HEADERS ===================== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-eyebrow {
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-header h2 { color: var(--white); }
.see-all {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.see-all:hover { gap: 10px; }

/* ===================== LIVE SCORES CARDS ===================== */
.live-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.match-card {
  background: linear-gradient(135deg, #0D2654, #0A1E45);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.match-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
}
.match-card.live::before { background: var(--red); }
.match-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}
.match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.match-group {
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
}
.match-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.match-status.live   { background: var(--red);   color: var(--white); }
.match-status.ft     { background: var(--border); color: var(--gray);  }
.match-status.coming { background: var(--green);  color: var(--white); }

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.team-flag {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.team-flag-placeholder {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--border);
}
.team-name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--white);
}
.match-score {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-align: center;
  min-width: 80px;
}
.match-score.no-score {
  font-size: 1.2rem;
  color: var(--gray);
}
.match-time {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--gray);
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===================== GROUP STANDINGS ===================== */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}
.group-card {
  background: #0D2654;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.group-header {
  background: var(--navy);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--gold);
}
.group-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}
.group-qualified { font-size: 0.7rem; color: var(--gray); }

.standings-table {
  width: 100%;
  border-collapse: collapse;
}
.standings-table th {
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 10px 20px;
  text-align: right;
  background: rgba(0,0,0,0.2);
}
.standings-table th:first-child { text-align: left; }
.standings-table td {
  padding: 12px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: right;
  font-family: var(--font-data);
  color: rgba(255,255,255,0.8);
}
.standings-table td:first-child {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--white);
}
.standings-table tr:last-child td { border-bottom: none; }
.standings-table tr.qualified td:first-child {
  border-left: 3px solid var(--green);
  padding-left: 17px;
}
.standings-table tr:hover td { background: rgba(200,168,75,0.06); }
.pos-num { color: var(--gray); font-size: 0.75rem; margin-right: 10px; }
.pts { font-weight: 700; color: var(--gold) !important; }
.team-flag-sm { font-size: 1rem; margin-right: 8px; }
.form-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  text-align: center;
  line-height: 18px;
  font-size: 0.65rem;
  font-weight: 700;
}
.form-badge.w { background: var(--green); color: #fff; }
.form-badge.d { background: var(--gray);  color: #fff; }
.form-badge.l { background: var(--red);   color: #fff; }

/* ===================== CALENDAR ===================== */
.calendar-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: rgba(255,255,255,0.7);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  text-transform: uppercase;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}
.calendar-day {
  margin-bottom: 32px;
}
.day-header {
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.calendar-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #0D2654;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color var(--transition);
}
.calendar-match:hover { border-color: var(--gold); }
.cal-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.cal-team.away { flex-direction: row-reverse; }
.cal-score-area {
  text-align: center;
  min-width: 80px;
}
.cal-score {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
}
.cal-vs {
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--gray);
}
.cal-info {
  text-align: right;
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ===================== GALLERY ===================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 8px;
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
  position: relative;
  background: var(--border);
  cursor: pointer;
}
.gallery-item:nth-child(1) { grid-column: span 8; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 4; }
.gallery-item:nth-child(3) { grid-column: span 4; }
.gallery-item:nth-child(4) { grid-column: span 4; }
.gallery-item:nth-child(5) { grid-column: span 4; }
.gallery-item:nth-child(6) { grid-column: span 4; }
.gallery-item:nth-child(7) { grid-column: span 4; }

.gallery-thumb {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.85);
}
.gallery-item:hover .gallery-thumb {
  transform: scale(1.06);
  filter: brightness(1);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,31,91,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: #060C1A;
  border-top: 3px solid var(--navy);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col a {
  color: var(--gray);
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--gray);
}
.footer-socials {
  display: flex;
  gap: 12px;
}
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}
.social-btn:hover { background: var(--gold); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.btn-gold   { background: var(--gold);  color: var(--dark); }
.btn-gold:hover { background: #D4A832; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--dark); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner  { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-stats { grid-template-columns: 1fr 1fr 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item { grid-column: span 1 !important; grid-row: span 1 !important; }
  .calendar-match { grid-template-columns: 1fr auto 1fr; }
  .cal-info { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .live-scores-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .stat-block { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===================== LANGUAGE SWITCHER (v2.0) ===================== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  transition: all var(--transition);
}
.lang-item:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.lang-item.active { background: var(--gold); color: var(--dark); }
@media (max-width: 768px) {
  .lang-switcher { margin-left: auto; margin-right: 8px; }
}

/* ===================== TICKER — état vide (v2.0) ===================== */
.live-ticker .ticker-item span:only-child {
  color: rgba(255,255,255,0.6);
  font-style: italic;
}
