:root {
  --blue: #003087;
  --blue-dark: #001f5b;
  --blue-light: #0044c8;
  --yellow: #FFD700;
  --yellow-dark: #e6c200;
  --white: #ffffff;
  --gray-light: #f4f6f9;
  --gray: #6b7280;
  --gray-dark: #1f2937;
  --shadow: 0 2px 12px rgba(0, 48, 135, 0.12);
  --radius: 8px;
  --transition: 0.2s ease;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.6;
}

/* ── Navigation ─────────────────────────────────────────── */
nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.12);
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.06);
}

.hero-logo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--yellow);
  box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.25), 0 8px 40px rgba(0, 0, 0, 0.4);
  margin: 0 auto 1.5rem;
  display: block;
  animation: hero-logo-glow 3s ease-in-out infinite alternate;
}

@keyframes hero-logo-glow {
  from { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.2), 0 8px 40px rgba(0, 0, 0, 0.4); }
  to   { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0.35), 0 8px 40px rgba(255, 215, 0, 0.15); }
}

.hero-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--yellow); }

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--yellow);
  color: var(--blue-dark);
}

.btn-primary:hover {
  background: var(--yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* ── Sections communes ──────────────────────────────────── */
section {
  padding: 4rem 1.5rem;
}

section:nth-child(even) { background: var(--gray-light); }

.container { max-width: 1200px; margin: 0 auto; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue-dark);
  position: relative;
  padding-left: 1rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 4px;
  background: var(--yellow);
  border-radius: 2px;
}

.see-all {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.see-all:hover { color: var(--blue-light); gap: 0.6rem; }

/* ── Actualités ─────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,48,135,0.18); }

.news-card-img {
  position: relative;
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.news-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-body { padding: 1.25rem; }

.news-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.news-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.news-card p {
  font-size: 0.87rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.news-date {
  font-size: 0.8rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Prochain match ─────────────────────────────────────── */
.next-match-banner {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.match-info-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
}

.match-team {
  text-align: center;
}

.match-team-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.match-vs {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--yellow);
  padding: 0.5rem 0;
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  min-width: 4.5rem;
  text-align: center;
}

.match-meta { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* ── Calendrier ─────────────────────────────────────────── */
.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-row {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: 100px 1fr auto 1fr 100px;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  transition: var(--transition);
}

.match-row:hover { border-left-color: var(--yellow); }
.match-row.win { border-left-color: #22c55e; }
.match-row.loss { border-left-color: #ef4444; }
.match-row.draw { border-left-color: var(--gray); }

.match-row-date {
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 700;
  background: #eff6ff;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  text-align: center;
  white-space: nowrap;
}

.match-row-team {
  font-weight: 700;
  font-size: 0.95rem;
}

.match-row-team.home { text-align: right; }

.match-row-score {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--blue-dark);
  min-width: 70px;
}

.match-row.win  .match-row-score { color: #16a34a; }
.match-row.loss .match-row-score { color: #dc2626; }
.match-row.draw .match-row-score { color: #6b7280; }

.match-row-score.upcoming {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
  background: #eff6ff;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

.match-row-competition {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--yellow);
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  text-align: center;
  line-height: 1.35;
}
.match-row-competition:empty { background: none; }

/* ── Équipes ────────────────────────────────────────────── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border-top: 4px solid var(--blue);
}

.team-card:hover {
  transform: translateY(-3px);
  border-top-color: var(--yellow);
  box-shadow: 0 8px 24px rgba(0,48,135,0.18);
}

.team-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.team-card h3 { font-size: 1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 0.25rem; }
.team-card p { font-size: 0.82rem; color: var(--gray); }

/* ── Galerie ────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 48, 135, 0.6);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  margin-bottom: 1rem;
  display: block;
}

.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col ul a:hover { color: var(--yellow); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-link:hover { background: var(--yellow); color: var(--blue-dark); }

/* ── Loader CMS ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 280px;
  border-radius: var(--radius);
}

/* ── Toast ──────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--blue-dark);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: 0.3s ease;
  z-index: 200;
  border-left: 4px solid var(--yellow);
}

#toast.show { transform: translateY(0); opacity: 1; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; border-radius: 6px; }
  .nav-burger { display: flex; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

  .match-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .match-row-team.home { text-align: center; }
  .match-row-competition { text-align: center; }

  .next-match-banner { flex-direction: column; text-align: center; padding: 1.25rem 1rem; }
}
