/* ========================================
   PKL — Passion Karting Loisir
   Palette : noir / jaune / blanc
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');

:root {
  --bg:         #0f0f0f;
  --bg-card:    #1a1a1a;
  --bg-card-2:  #222222;
  --yellow:     #FFD700;
  --yellow-dk:  #e6c200;
  --text:       #eeeeee;
  --text-muted: #cbcbcb;
  --border:     #2a2a2a;
  --radius:     6px;
  --nav-h:      64px;
  --max-w:      1140px;
  --transition: 0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--yellow); text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section    { padding: 72px 0; }
.section-title {
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -8px;
  width: 48px; height: 3px;
  background: var(--yellow);
}
.section-cta { margin-top: 40px; text-align: center; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}
.btn-primary:hover { background: var(--yellow-dk); border-color: var(--yellow-dk); }
.btn-outline {
  background: transparent;
  color: var(--yellow);
  border-color: var(--yellow);
}
.btn-outline:hover { background: var(--yellow); color: #000; }

/* ── Header / Nav ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.logo-pkl {
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--yellow);
}
.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 480px) {
  .logo-sub { display: none; }
}
.nav-links {
  display: flex;
  gap: 8px;
}
.nav-links a {
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--yellow); background: rgba(255,215,0,0.08); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
  background-image: url('../photos/course-duo.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
/* Overlay sombre pour lisibilité du texte */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.3) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 30%, rgba(0,0,0,0.5) 100%);
}
/* Bande jaune diagonale décorative */
.hero::after {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 45%;
  height: 120%;
  background: linear-gradient(135deg, rgba(255,215,0,0.05) 0%, transparent 60%);
  transform: skewX(-8deg);
  pointer-events: none;
}
/* Motif damier en fond */
.hero-checker {
  position: absolute;
  bottom: 0; right: 0;
  width: 320px; height: 120px;
  opacity: 0.07;
  background-image:
    linear-gradient(45deg, #FFD700 25%, transparent 25%),
    linear-gradient(-45deg, #FFD700 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #FFD700 75%),
    linear-gradient(-45deg, transparent 75%, #FFD700 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  align-items: center;
  gap: 56px;
}
.hero-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.hero-text {
  flex: 1;
  min-width: 0;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 20px;
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.hero-logo {
  height: clamp(160px, 24vw, 260px);
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(255,215,0,0.35));
}
.hero-title-sub {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.04em;
}
.hero-desc {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Cards événements ── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.event-card:hover { border-color: var(--yellow); transform: translateY(-2px); }
.event-card-top {
  background: var(--yellow);
  color: #000;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.event-date {
  font-weight: 700;
  font-size: 0.9rem;
}
.event-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.15);
  padding: 3px 8px;
  border-radius: 3px;
}
.event-body { padding: 20px; }
.event-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.event-lieu {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.event-lieu::before { content: '📍'; font-size: 0.85em; }
.event-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.event-heure {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--yellow);
  font-weight: 600;
}

/* Événement passé */
.event-card.past { opacity: 0.5; }
.event-card.past .event-card-top { background: #444; }

/* Message vide */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}
.loading {
  grid-column: 1/-1;
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Section about ── */
.about { background: var(--bg-card); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }
.about-values { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.about-values li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}
.about-values li::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  flex-shrink: 0;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.stat-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Albums ── */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.album-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
}
.album-card:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}
.album-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.album-card-body { flex: 1; min-width: 0; }
.album-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.album-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.album-card-arrow {
  font-size: 1.2rem;
  color: var(--yellow);
  flex-shrink: 0;
}
.album-link-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 680px;
}
.album-link-icon { font-size: 3rem; flex-shrink: 0; }
.album-link-body { flex: 1; min-width: 0; }
.album-link-title { font-size: 1.1rem; font-weight: 700; color: var(--yellow); }
.album-link-desc { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; }
.album-link-btn { flex-shrink: 0; white-space: nowrap; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--yellow); }

/* ── Galerie ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gallery-grid-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,215,0,0);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .gallery-item-overlay { background: rgba(255,215,0,0.15); }

.gallery-placeholder {
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 2rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,215,0,0.15);
  border: 1px solid rgba(255,215,0,0.3);
  color: var(--yellow);
  font-size: 1.5rem;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,215,0,0.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%; transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-block h3 {
  color: var(--yellow);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.contact-block p, .contact-block a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-block a:hover { color: var(--yellow); }
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 360px;
}
.map-container iframe { width: 100%; height: 100%; border: none; }

/* ── Footer ── */
.site-footer {
  background: #080808;
  background-image: url('../images/saturnin.png');
  background-position: right;
  background-repeat: no-repeat;
  border-top: 1px solid var(--border);
  padding-top: 48px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8,8,8,0.82);
  pointer-events: none;
}
/* Bande damier déco footer */
.footer-checker,
.footer-grid,
.footer-bottom { position: relative; z-index: 1; }

.footer-checker {
  height: 6px;
  background-image:
    linear-gradient(45deg, #FFD700 25%, transparent 25%),
    linear-gradient(-45deg, #FFD700 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #FFD700 75%),
    linear-gradient(-45deg, transparent 75%, #FFD700 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #222;
  margin-bottom: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-logo {
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 12px;
}
.footer-grid p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.footer-grid h4 { color: var(--text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 8px; }
.footer-grid ul a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-grid ul a:hover { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.82rem; }

/* ── Page header (inner pages) ── */
.page-header {
  padding: calc(var(--nav-h) + 56px) 0 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  top: 0; right: -10%;
  width: 40%; height: 100%;
  background: linear-gradient(135deg, rgba(255,215,0,0.04) 0%, transparent 60%);
  transform: skewX(-10deg);
}
.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.page-header p { color: var(--text-muted); margin-top: 8px; font-size: 1rem; }

/* Filtre événements */
.events-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active { border-color: var(--yellow); color: var(--yellow); background: rgba(255,215,0,0.08); }

/* ── Presse ── */
.press-list { display: flex; flex-direction: column; gap: 16px; }
.press-card {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}
.press-card:hover { border-color: var(--yellow); transform: translateX(4px); }
.press-card-stripe {
  width: 5px;
  background: var(--yellow);
  flex-shrink: 0;
}
.press-card-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.press-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.press-source {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
}
.press-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.press-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.press-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.press-card-arrow {
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: color var(--transition);
}
.press-card:hover .press-card-arrow { color: var(--yellow); }

/* ── Responsive ── */
/* ── Classement ── */
.ranking-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
.ranking-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.ranking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.ranking-table tr:last-child td { border-bottom: none; }
.ranking-table tr:hover td { background: rgba(255,255,255,0.03); }

.col-pos    { width: 48px; text-align: center; }
.col-pilote { font-weight: 600; }
.col-manche { text-align: center; color: var(--text-muted); }
.col-total  { text-align: center; font-weight: 900; color: var(--yellow); font-size: 1.05rem; }

.rank-1 td { background: rgba(255,215,0,0.07); }
.rank-2 td { background: rgba(192,192,192,0.05); }
.rank-3 td { background: rgba(205,127,50,0.05); }
.rank-1 .col-pilote,
.rank-2 .col-pilote,
.rank-3 .col-pilote { color: var(--text); }

.medal { font-size: 1.3rem; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid-preview { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(15,15,15,0.98);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-toggle { display: flex; }
  .logo-sub { display: none; }

  .hero-content { flex-direction: column; gap: 32px; text-align: center; }
  .hero-logo { height: 160px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; }

  .about-stats { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .gallery-grid-preview { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .lightbox-nav { display: none; }
}
