/* =============================================
   CAMPSABRIA — Style CSS Complet & Optimisé
   Version : 2.1 | Fix overflow, harmonie globale
   ============================================= */

:root {
  /* 🎨 Palette */
  --bg: #faf8f4;
  --bg-alt: #f3f0ea;
  --card: #ffffff;
  --text: #1a1207;
  --text-muted: #6b7280;
  --border: rgba(0,0,0,.08);
  --gold: #f4b942;
  --gold-light: #f6c56f;
  --gold-dark: #b3852a;
  --gold-bg: rgba(244,185,66,.12);
  --gold-border: rgba(244,185,66,.35);
  
  /* 📏 Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  
  /* 📐 Layout & Formes */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --max-width: 1200px;
  --nav-height: 70px;
  
  /* 🌫️ Ombres & Transitions */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.05);
  --shadow: 0 6px 20px rgba(0,0,0,.07);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.1);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🔧 Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color var(--transition); }
img, video, svg { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* 🔤 Typographie Fluide */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--space-sm); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
p { margin-bottom: var(--space-sm); max-width: 65ch; }
p:last-child { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* 📐 Layout & Conteneurs */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-sm); }
section { padding: var(--space-lg) 0; }
.grid-2 { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* 🧭 Navigation */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,244,.95);
  border-bottom: 1px solid var(--border);
  will-change: transform;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; height: var(--nav-height); gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.logo-img { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: var(--card); border: 1px solid var(--border); padding: 4px; }
.nav-links { display: flex; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--text-muted); transition: all var(--transition); }
.nav-links a:hover, .nav-links a.active { background: var(--gold-bg); color: var(--text); }
.nav-cta { display: flex; gap: 8px; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; z-index: 101; }
.nav-burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

/* 📱 Menu Mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: var(--space-xl);
  transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all 0.3s ease;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a { font-size: 1.4rem; font-weight: 700; padding: 12px 24px; border-radius: 12px; width: 100%; text-align: center; }
.mobile-menu a:hover { background: var(--gold-bg); }
.mobile-menu-close {
  position: absolute; top: 20px; right: 20px; font-size: 1.8rem;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-bg); color: var(--gold-dark); border: 1px solid var(--gold-border);
}

/* 🔘 Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--card);
  color: var(--text); font-size: 0.9rem; font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); border: none; color: #1a1207; }
.btn-wa { background: #25d366; border: none; color: #fff; }
.btn-wa:hover { background: #20bd5c; }
.btn-outline { background: var(--gold-bg); border-color: var(--gold-border); color: var(--gold-dark); }
.btn-outline:hover { background: rgba(244,185,66,.2); }
.btn-lg { padding: 13px 22px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* 🏷️ Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--gold-bg); border: 1px solid var(--gold-border);
  color: var(--gold-dark); font-size: 0.75rem; font-weight: 700;
}

/* 🃏 Cartes & Composants */
.card, .feature-card, .circuit-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover, .circuit-card:hover, .feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* ✅ FIX GLOBAL : Info cards must allow text/buttons to flow */
.info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: visible; /* Empêche la coupure de texte */
  box-shadow: var(--shadow-sm); padding: var(--space-md);
}

.card-img, .circuit-card-img { position: relative; aspect-ratio: 3/2; overflow: hidden; }
.circuit-card-img { aspect-ratio: 16/9; }
.card-img img, .circuit-card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.35s ease;
}
.card:hover .card-img img, .circuit-card:hover .circuit-card-img img { transform: scale(1.03); }
.card-body { padding: var(--space-md); }

/* 🌅 Hero / Banner & Side Layout */
.page-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16/7; min-height: 200px; margin: 16px 0;
}
.page-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}
.page-banner-content {
  position: absolute; top: 50%; left: 32px; transform: translateY(-50%);
  color: #fff; max-width: 65ch;
}
.page-banner-content h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 8px; color: #fff; }
.page-banner-content p { font-size: 1rem; line-height: 1.6; opacity: 0.95; color: #fff; max-width: 100%; }

.side-col { display: flex; flex-direction: column; gap: var(--space-md); }
.info-card-title { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.facts { display: grid; gap: 8px; }
.fact { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 0.9rem; }
.fact-label { color: var(--text-muted); font-weight: 600; }
.fact-value { font-weight: 700; }
.fact-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 14px; line-height: 1.6; max-width: 100%; }

/* 🌟 Features */
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--gold-bg); border: 1px solid var(--gold-border); margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

/* 🗺️ Circuits */
.circuit-card-badges { position: absolute; bottom: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.duration-badge { background: var(--gold); color: #1a1207; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 700; }
.diff-badge { color: #fff; font-size: 0.8rem; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.circuit-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.circuit-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; flex: 1; max-width: 100%; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full); background: rgba(14,165,233,.1); color: #0b4a64; border: 1px solid rgba(14,165,233,.2); }
.tag-gold { background: var(--gold-bg); color: var(--gold-dark); border-color: var(--gold-border); }

/* 📷 Galerie */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4/3; border: 1px solid var(--border); box-shadow: var(--shadow-sm); cursor: pointer; }
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-hover-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.5) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .gallery-hover-overlay { opacity: 1; }
.gallery-cap { position: absolute; bottom: 10px; left: 12px; right: 12px; color: #fff; font-size: 0.85rem; font-weight: 700; opacity: 0; transition: opacity 0.3s; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.gallery-item:hover .gallery-cap { opacity: 1; }

/* 📊 Stats & CTA */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); text-align: center; }
.stat-num { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--gold); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-top: 6px; }
.cta-block {
  background: linear-gradient(135deg, rgba(246,197,111,.15), rgba(244,185,66,.08));
  border: 1px solid var(--gold-border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-block-text h3 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-block-text p { color: var(--text-muted); font-size: 1rem; margin-bottom: 0; max-width: 65ch; }

/* 📝 FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-q {
  padding: 14px 16px; font-weight: 600; font-size: 1rem; width: 100%; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; transition: background var(--transition);
}
.faq-q:hover { background: var(--bg-alt); }
.faq-q svg { flex-shrink: 0; width: 18px; height: 18px; transition: transform 0.2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 16px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 300px; padding: 0 16px 16px; }

/* 🧭 Breadcrumb & Footer */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { opacity: 0.5; }
footer { background: var(--card); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; max-width: 100%; }
.footer-col h4 { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.9rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--gold-dark); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap; gap: 12px; }

/* 💬 WhatsApp Flottant */
.wa-float { position: fixed; bottom: 24px; right: 24px; z-index: 200; }
.wa-float-btn {
  display: flex; align-items: center; gap: 10px; background: #25d366; color: #fff;
  padding: 12px 20px; border-radius: 50px; font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.3); transition: all var(--transition);
}
.wa-float-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.4); }
.wa-float-btn svg { width: 20px; height: 20px; }

/* 🛠️ Utilitaires & Sections */
.section-head { margin-bottom: var(--space-md); text-align: center; }
.section-label { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); background: var(--gold-bg); border: 1px solid var(--gold-border); font-size: 0.75rem; font-weight: 700; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.section-desc { color: var(--text-muted); font-size: 1rem; line-height: 1.7; max-width: 75ch; margin: 0 auto; }

/* 📱 Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .cta-block { flex-direction: column; text-align: center; }
  .btn-row { justify-content: center; }
  .hero { padding: var(--space-md) 0; }
}
@media (max-width: 640px) {
  :root { --space-lg: 2rem; }
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4, .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  h1 { font-size: 1.8rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.25rem; }
  .page-banner-content { left: 20px; right: 20px; max-width: calc(100% - 40px); }
  .page-banner-content h1 { font-size: 1.6rem; }
  .wa-float-btn span { display: none; }
  .wa-float-btn { padding: 12px; }
  .stats-bar { gap: 12px; padding: 16px; }
}

/* ♿ Accessibilité & Performance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
img[loading="lazy"] { opacity: 0; transition: opacity 0.3s ease; }
img[loading="lazy"].loaded, img[loading="eager"] { opacity: 1; }