/* ===========================
   CTPV – Feuille de style principale
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Open+Sans:wght@300;400;600&display=swap');

:root {
  --gold:      #C9A84C;
  --gold-dark: #a07830;
  --dark:      #0d0f14;
  --dark2:     #161a22;
  --dark3:     #1e2330;
  --card:      #1a1f2b;
  --border:    #2a3040;
  --text:      #e2e6f0;
  --muted:     #8895aa;
  --white:     #ffffff;
  --danger:    #c94c4c;
  --nav-h:     72px;
  --nav-bg:    rgba(13,15,20,0.95);
  --hero-overlay: rgba(13,15,20,0.82);
  --hero-overlay2: rgba(13,15,20,0.6);
  --hero-bottom: rgba(13,15,20,1);
}

/* ── Thème clair ────────────────────────────── */
[data-theme="light"] {
  --gold:       #9a6f1e;
  --gold-dark:  #7a5515;
  --dark:       #f2f4f8;
  --dark2:      #e5e8f0;
  --dark3:      #d8dce8;
  --card:       #ffffff;
  --border:     #c2c8d8;
  --text:       #1e2330;
  --muted:      #525e78;
  --white:      #0d0f18;
  --nav-bg:     rgba(242,244,248,0.97);
  --hero-overlay:  rgba(242,244,248,0.78);
  --hero-overlay2: rgba(242,244,248,0.55);
  --hero-bottom:   rgba(242,244,248,1);
}
[data-theme="light"] .navbar {
  background: var(--nav-bg);
  border-bottom-color: var(--border);
}
[data-theme="light"] .hero-bg {
  background:
    linear-gradient(160deg, var(--hero-overlay) 0%, var(--hero-overlay2) 50%, var(--hero-overlay) 100%),
    url('https://images.unsplash.com/photo-1595590424283-b8f17842773f?w=1600&q=80') center/cover no-repeat;
}
[data-theme="light"] .hero-bg::after {
  background: linear-gradient(to bottom, transparent 60%, var(--dark) 100%);
}
[data-theme="light"] .page-hero {
  background:
    linear-gradient(160deg, var(--hero-overlay) 0%, var(--hero-overlay2) 100%),
    url('https://images.unsplash.com/photo-1595590424283-b8f17842773f?w=1200&q=70') center/cover no-repeat;
}
[data-theme="light"] .hero h1,
[data-theme="light"] .hero p {
  text-shadow: 0 1px 8px rgba(255,255,255,0.3);
}
[data-theme="light"] .btn-outline {
  border-color: rgba(0,0,0,0.25);
  color: var(--white);
}
[data-theme="light"] .btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
[data-theme="light"] .affil-badge {
  color: var(--gold);
  border-color: rgba(154,111,30,0.4);
}
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--dark2); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--gold-dark); }

/* ── Bouton toggle thème ────────────────────── */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold-dark);
  background: rgba(201,168,76,0.08);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--white); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.04em;
  color: var(--white);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

/* ── Navigation ─────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.navbar-brand .logo-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}
.navbar-brand .brand-text { font-family: 'Rajdhani', sans-serif; }
.navbar-brand .brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.navbar-brand .brand-sub {
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  color: var(--muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Page content offset ────────────────────── */
.page-content { padding-top: var(--nav-h); }

/* ── Hero ───────────────────────────────────── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(13,15,20,0.85) 0%, rgba(13,15,20,0.6) 50%, rgba(13,15,20,0.9) 100%),
    url('https://images.unsplash.com/photo-1595590424283-b8f17842773f?w=1600&q=80') center/cover no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--dark) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--gold);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero-badge::before { content: '⬡'; font-size: 0.75rem; }
.hero h1 {
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--dark);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--white); color: var(--dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ── Stat bar ───────────────────────────────── */
.stat-bar {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  divide: var(--border);
}
.stat-item {
  padding: 1.8rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* ── Sections ───────────────────────────────── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-label {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--muted); max-width: 520px; margin: 0 auto; }

.section-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ── News cards ─────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.news-card:hover { transform: translateY(-4px); border-color: var(--gold-dark); }
.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--dark3);
}
.news-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--dark3) 0%, var(--dark2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.news-card-body { padding: 1.5rem; }
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.news-tag {
  font-size: 0.7rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}
.news-date { font-size: 0.78rem; color: var(--muted); }
.news-card-body h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.news-card-body p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.news-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.83rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-transform: uppercase;
}
.news-link:hover { color: var(--white); }
.news-link::after { content: '→'; }

/* ── Disciplines ────────────────────────────── */
.disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.disc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
}
.disc-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.disc-icon { font-size: 2.2rem; margin-bottom: 1rem; color: var(--gold); line-height: 1; display: flex; justify-content: center; align-items: center; }
.disc-icon .bi { font-size: 2.2rem; color: var(--gold); }
.disc-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.disc-card p { font-size: 0.83rem; color: var(--muted); }

/* ── Info band ──────────────────────────────── */
.info-band {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.info-band-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.info-list { margin-top: 1.5rem; }
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; }
.info-list .icon {
  font-size: 1.15rem;
  min-width: 28px;
  color: var(--gold);
  padding-top: 0.1rem;
}
.info-list .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.info-list .value { font-size: 0.95rem; color: var(--text); }

/* ── Page hero (sub-pages) ──────────────────── */
.page-hero {
  background:
    linear-gradient(160deg, rgba(13,15,20,0.9) 0%, rgba(13,15,20,0.7) 100%),
    url('https://images.unsplash.com/photo-1595590424283-b8f17842773f?w=1200&q=70') center/cover no-repeat;
  padding: 6rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero .page-hero-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
.page-hero p { color: var(--muted); margin-top: 0.75rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* ── Presentation ───────────────────────────── */
.pres-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.pres-text p { color: var(--muted); margin-bottom: 1rem; line-height: 1.8; }
.pres-text h2 { margin-bottom: 1.5rem; }
.pres-img {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--dark3);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}
.highlight-box {
  background: rgba(201, 168, 76, 0.06);
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.badge {
  background: var(--dark3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
}
.badge.gold { border-color: var(--gold-dark); color: var(--gold); background: rgba(201,168,76,0.08); }

.timeline { margin-top: 2rem; }
.timeline-item {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 2rem;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-dot {
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}
.timeline-body h4 { color: var(--gold); font-size: 0.95rem; margin-bottom: 0.25rem; }
.timeline-body p { font-size: 0.85rem; color: var(--muted); }

/* ── Maps ───────────────────────────────────── */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2rem;
}
.map-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.map-frame { width: 100%; height: 300px; border: none; }
.map-info {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}
.map-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}
.map-info h3 { margin-bottom: 0.25rem; }
.map-info address {
  font-style: normal;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.map-details {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.map-detail-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.83rem;
  color: var(--muted);
}
.map-detail-row span:first-child { color: var(--gold); }

/* ── Contact ────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.contact-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.contact-info-card h3 { margin-bottom: 1.5rem; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-icon {
  width: 40px;
  height: 40px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
}
.contact-info-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-info-value { font-size: 0.95rem; color: var(--text); margin-top: 0.15rem; }
.contact-info-value a { color: var(--text); }
.contact-info-value a:hover { color: var(--gold); }

.contact-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.contact-form-card h3 { margin-bottom: 1.5rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select option { background: var(--dark3); }

.btn-submit {
  width: 100%;
  background: var(--gold);
  color: var(--dark);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-submit:hover { background: var(--white); transform: translateY(-2px); }

.form-success {
  display: none;
  background: rgba(76, 201, 100, 0.1);
  border: 1px solid rgba(76, 201, 100, 0.3);
  color: #6de08a;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ── Gallery ────────────────────────────────── */
.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--dark3);
  border: 1px solid var(--border);
  transition: transform 0.25s;
}
.gallery-item:hover { transform: scale(1.02); z-index: 2; }
.gallery-item:nth-child(3n+1) { grid-row: span 1; }
.gallery-item.tall { grid-row: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,15,20,0.85) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption {
  font-size: 0.8rem;
  color: var(--white);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── Footer ─────────────────────────────────── */
.footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand .brand-title { font-size: 1.3rem; margin-bottom: 0.3rem; }
.footer-brand .brand-sub { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; }
.footer-brand p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul a { color: var(--muted); font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: var(--muted); }
.footer-affiliations {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.affil-badge {
  font-size: 0.68rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

/* ── Page transitions ───────────────────────── */
body {
  animation: pageIn 0.35s ease both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.page-out {
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 0 !important;
  transform: translateY(-7px) !important;
  animation: none !important;
}

/* ── Animations ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .stat-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .pres-layout { grid-template-columns: 1fr; }
  .pres-img { min-height: 220px; }
  .contact-layout { grid-template-columns: 1fr; }
  .info-band-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .maps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13,15,20,0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    gap: 0.25rem;
    overflow: hidden;
  }
  .nav-links.open a {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    /* Empêche le fond actif de déborder */
    display: block;
    position: static;
  }
  /* Supprime le trait souligné en mobile (il déborderait sur l'item suivant) */
  .nav-links.open a.active::after { display: none; }
  .hamburger { display: flex; }
  .stat-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Notice Banner ───────────────────────────── */
.ctpv-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.7rem 3rem 0.7rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 99;
  line-height: 1.5;
}
.ctpv-notice--warning {
  background: rgba(201,168,76,0.13);
  border-bottom: 1px solid rgba(201,168,76,0.4);
  color: #d4b055;
}
.ctpv-notice--info {
  background: rgba(66,133,244,0.1);
  border-bottom: 1px solid rgba(66,133,244,0.35);
  color: #7baaf7;
}
.ctpv-notice--danger {
  background: rgba(220,60,60,0.12);
  border-bottom: 1px solid rgba(220,60,60,0.35);
  color: #e08888;
}
.ctpv-notice-close {
  position: absolute; right: 1rem;
  background: none; border: none; color: inherit;
  cursor: pointer; opacity: 0.65; font-size: 1rem; padding: 0.3rem;
  transition: opacity 0.2s;
}
.ctpv-notice-close:hover { opacity: 1; }

/* ── Loading spinner (site.js) ───────────────── */
.ctpv-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; padding: 3rem; color: var(--muted);
  font-size: 0.9rem; grid-column: 1 / -1;
}
.ctpv-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer Logos (affiliations) ─────────────── */
.footer-logos {
  border-top: 1px solid var(--border);
  padding: 1.75rem var(--section-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.footer-logos-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.footer-logos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
}
.footer-logo-img {
  height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(20%) opacity(0.85);
  transition: filter 0.25s;
}
.footer-logo-img:hover { filter: grayscale(0%) opacity(1); }
[data-theme="light"] .footer-logo-img { filter: grayscale(10%) opacity(0.9); }

/* ── Palmarès page ───────────────────────────── */
.palmares-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.palmares-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.palmares-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.palmares-card-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}
.palmares-medal {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.medal-or   { background: rgba(201,168,76,0.15); border: 2px solid #C9A84C; }
.medal-argent { background: rgba(180,180,180,0.12); border: 2px solid #c0c0c0; }
.medal-bronze { background: rgba(180,100,50,0.12); border: 2px solid #cd7f32; }
.palmares-card-body { padding: 1.25rem 1.5rem; }
.palmares-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.palmares-tireur { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--white); margin: 0 0 0.25rem; }
.palmares-event  { font-size: 0.83rem; color: var(--muted); margin: 0; }

/* ── Agenda page ─────────────────────────────── */
.agenda-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
.agenda-list { display: flex; flex-direction: column; gap: 1.25rem; }
.agenda-event {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.25rem;
  align-items: start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.agenda-event:hover { transform: translateX(4px); box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.agenda-event.past { opacity: 0.55; }
.agenda-date-box {
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  text-align: center;
}
.agenda-date-day   { font-family: 'Rajdhani', sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--gold); line-height: 1; }
.agenda-date-month { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 2px; }
.agenda-event-title { font-family: 'Rajdhani', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--white); margin: 0 0 0.3rem; }
.agenda-event-desc  { font-size: 0.83rem; color: var(--muted); margin: 0 0 0.6rem; line-height: 1.6; }
.agenda-event-tags  { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.agenda-files { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.agenda-file-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; color: var(--gold); text-decoration: none;
  background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.25);
  border-radius: 5px; padding: 0.25rem 0.6rem;
  transition: background 0.2s, border-color 0.2s;
}
.agenda-file-link:hover { background: rgba(201,168,76,0.18); border-color: var(--gold); }
.agenda-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.agenda-sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.agenda-sidebar-card h3 { font-size: 1rem; margin: 0 0 1rem; color: var(--white); display: flex; align-items: center; gap: 0.5rem; }

@media (max-width: 900px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .agenda-sidebar { position: static; }
}
@media (max-width: 620px) {
  .palmares-grid { grid-template-columns: 1fr; }
  .agenda-event { grid-template-columns: 60px 1fr; gap: 1rem; }
}
