/* ============================================================
   GLISS SPEED — Responsive overrides (shared across all pages)
   ============================================================ */

/* ---------- BASE ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe { max-width: 100%; }

/* ---------- BOUTON MARQUE (panneau bleu + vague « S ») — partagé ---------- */
.btn-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #fff;
  text-decoration: none;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  height: 46px;
  padding: 0 18px 0 60px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, #1a9be0 0%, #0a63c4 55%, #064a9e 100%);
  box-shadow: 0 0 0 1px rgba(120,200,255,0.5) inset, 0 6px 16px rgba(6,74,158,0.4), 0 0 12px rgba(26,155,224,0.3);
  text-shadow: 0 1px 5px rgba(0,20,40,0.55);
  transition: transform 0.15s, filter 0.2s;
  white-space: nowrap;
  line-height: 1;
  overflow: visible !important;
  cursor: pointer;
  border: none;
  align-self: flex-start;
  width: 250px;
  flex: 0 0 auto;
  margin-top: 12px;
}
.btn-brand .btn-wave {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(26,155,224,0.55));
  pointer-events: none;
  z-index: 2;
}
.btn-brand:hover { transform: translateY(-2px); filter: brightness(1.1); }
/* Bouton « En savoir plus » (chiffres clés) : centré et abaissé */
.evolution > .btn-brand { align-self: center; display: flex; margin: 32px auto 0; }
@media (max-width: 640px) {
  .btn-brand { font-size: 14px; padding: 0 16px 0 54px; align-self: center; display: flex; margin-left: auto; margin-right: auto; }
  .btn-brand .btn-wave { width: 78px; left: -26px; }
}

/* ---------- NAV : hamburger menu mobile ---------- */
/* Header noir profond partout (le fond noir du logo devient invisible) */
nav { background: #000 !important; border-bottom: none !important; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.2s;
  border-radius: 2px;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  nav {
    padding: 0 16px !important;
    justify-content: space-between !important;
  }
  .nav-logo { position: relative; z-index: 120; flex: 0 0 auto; }
  .nav-logo img { height: 56px !important; }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 120;
    order: 3;
  }

  .nav-links {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: #000;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 18px 20px 28px !important;
    transform: translate(0, calc(-100% - 100px));
    transition: transform 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.08);
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    z-index: 105;
  }
  body.nav-open .nav-links { transform: translateY(0); }
  .nav-links li {
    list-style: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links li:last-child {
    border-bottom: 0;
    padding-top: 14px;
    display: flex;
    justify-content: center;
  }
  .nav-links a {
    display: block;
    padding: 14px 4px !important;
    font-size: 16px !important;
  }

  /* Language switcher: hide from the always-visible mobile header,
     keep it in the open hamburger menu only (footer-lang covers the rest). */
  nav > .nav-lang,
  nav > a.nav-lang,
  nav > button.nav-lang {
    display: none !important;
  }
  .nav-links li:last-child .nav-lang {
    display: inline-flex !important;
  }
}

@media (max-width: 600px) {
  .nav-logo img { height: 48px !important; }
}

/* ---------- HERO (index — full-viewport with video) ---------- */
@media (max-width: 900px) {
  /* Use :has() to target only the index hero (it contains a <video class="hero-video">) */
  .hero:has(.hero-video) {
    min-height: 520px !important;
    height: auto !important;
    padding-top: 96px !important;
    padding-bottom: 40px !important;
    align-items: flex-end !important;
  }
  .hero:has(.hero-video) .hero-content { padding: 0 20px 32px !important; }
  .hero-logo-big { height: clamp(90px, 18vh, 140px) !important; margin-bottom: 18px !important; }
  .hero-ctas { gap: 10px !important; margin-bottom: 22px !important; }
  .btn-primary, .btn-outline { padding: 12px 22px !important; font-size: 14px !important; }
  .hero:has(.hero-video) .hero-title { font-size: clamp(26px, 6vw, 40px) !important; }
  .hero:has(.hero-video) .hero-subtitle { font-size: 15px !important; padding: 0 8px; }
}

/* ---------- INDEX hero video thumbs — petit carrousel en bas sur mobile ---------- */
@media (max-width: 900px) {
  /* Carrousel rétabli, compact, centré tout en bas de la section image, défilable */
  .video-strip {
    display: flex !important;
    bottom: 6px !important;
    max-width: calc(100% - 24px);
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 4px !important;
    padding: 4px !important;
    scrollbar-width: none;
  }
  .video-strip::-webkit-scrollbar { display: none; }
  .video-strip .video-thumb { width: 46px; height: 32px; flex: 0 0 auto; }
  /* Fill the hero frame cleanly on mobile (no letterboxing) */
  .hero:has(.hero-video) .hero-video { object-fit: cover !important; }
  .hero:has(.hero-video) .hero-photo { object-fit: cover !important; }
}
@media (max-width: 600px) {
  .video-strip { gap: 4px !important; padding: 4px !important; }
  .video-strip .video-thumb { width: 42px; height: 30px; }
}

/* ---------- HERO (autres pages : qui-sommes-nous, contact, produits, reseau) ---------- */
@media (max-width: 900px) {
  /* === Uniform hero layout across non-index pages on mobile ===
     All inner-page heros use the same vertical rhythm:
       - 280px minimum height (compact but image-readable)
       - content vertically bottom-aligned, horizontally centered
       - same paddings, gaps, type scale */

  /* CSS-class based heros (consolidated above with .hero — keep this block for content/typography only) */
  .hero {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .hero-content {
    padding: 0 24px 32px !important;
    max-width: 100% !important;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .hero-title {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: clamp(30px, 7vw, 40px) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    text-wrap: balance;
  }
  .hero-subtitle {
    font-family: 'Barlow', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    max-width: 36ch;
  }

  /* Inline-styled hero content blocks (React pages: produits, reseau, contact)
     Note: React serializes padding '0 80px 48px' to '0px 80px 48px' in the DOM. */
  section > div[style*="0px 80px 48px"],
  section > div[style*="padding: 0px 80px"] {
    padding: 0 24px 32px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    align-items: center !important;
    gap: 8px !important;
  }
  section > div[style*="0px 80px 48px"] h1,
  section > div[style*="padding: 0px 80px"] h1 {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: clamp(30px, 7vw, 40px) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    text-align: center !important;
    text-wrap: balance;
  }
  section > div[style*="0px 80px 48px"] p,
  section > div[style*="padding: 0px 80px"] p {
    font-family: 'Barlow', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin: 0 auto !important;
    text-align: center !important;
    max-width: 36ch;
  }

  /* === All hero sections (except index full-viewport one) — same height on mobile === */
  .hero:not(:has(.hero-video)),
  section[style*="height: 340"],
  section[style*="height: 300"],
  section[style*="height: 280"],
  section[style*="height: 260"] {
    height: auto !important;
    min-height: 340px !important;
    padding-top: 76px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Ouvrez-votre-circuit — larger first section as requested */
  .hero[style*="480"],
  body > section.hero,
  body section.hero[class*="ouvrez"] {
    min-height: 440px !important;
  }
  /* Detect ouvrez-votre-circuit by its specific class/structure */
  body:has(.services-grid):has(.pillars) .hero {
    min-height: 440px !important;
  }

  /* Ouvrez-votre-circuit hero (centered content with max-width) */
  .hero-content[class] {
    padding: 0 24px 32px !important;
    max-width: 100% !important;
  }
}

/* ---------- COMMON SECTION PADDING ---------- */
@media (max-width: 900px) {
  .section-title { font-size: clamp(26px, 5vw, 36px) !important; text-align: center; }
  .main { padding: 40px 20px !important; }
  section { padding-left: 20px !important; padding-right: 20px !important; }

  /* Qui-sommes-nous sections */
  .exp-section,
  .body-text,
  .pourquoi,
  .footer { padding-left: 20px !important; padding-right: 20px !important; }
  .exp-section { padding-top: 56px !important; padding-bottom: 48px !important; }
  .body-text { padding-top: 48px !important; padding-bottom: 48px !important; }
  .pourquoi { padding-top: 56px !important; padding-bottom: 56px !important; }
}

/* ---------- GRIDS that should collapse on mobile ---------- */
@media (max-width: 900px) {
  .services-grid,
  .pillars,
  .features-grid,
  .product-grid,
  .info-grid,
  .stats-grid,
  .stats-3,
  .stats-4,
  .partners-grid,
  .partenaires-grid,
  .testimonials-grid,
  .pricing-grid,
  .gallery-grid,
  .cards-grid,
  .grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  /* Two columns on tablet for short cards */
  .pillars,
  .stats-3,
  .stats-4,
  .stats-grid,
  .partners-grid,
  .partenaires-grid,
  .services-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ---------- PAGES with inline-styled grids (produits, reseau, contact React-ish) ---------- */
@media (max-width: 900px) {
  /* Generic catch-all for inline grids (React renders camelCase to dashed CSS) */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: repeat(3,"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4,"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Inline-styled section paddings 48px 80px / 60px 80px / 72px 80px / 80px 80px
     React serializes these in the DOM with explicit px units. */
  section[style*="80px"],
  div[style*="48px 80px"],
  div[style*="60px 80px"],
  div[style*="72px 80px"],
  div[style*="80px 80px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Configurator CTA bar — wrap on mobile */
  div[style*="padding:'32px 40px'"][style*="flex"] {
    flex-direction: column !important;
    text-align: center !important;
    gap: 18px !important;
    padding: 24px 22px !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  /* Two columns on tablet for stats/cards repeated 3+ */
  [style*="grid-template-columns: repeat(3,"],
  [style*="grid-template-columns: repeat(4,"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ---------- PRODUITS configurator: re-order blocks on mobile ----------
   Desired order (mobile):
   1. Image  2. Modèle  3. Couleur  4. Volant  5. Batterie
   6. Caractéristiques  7. Prix  8. Télécharger
   React renders style props to lowercase CSS so we target the rendered form. */
@media (max-width: 900px) {
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div {
    display: contents !important;
  }
  /* LEFT column children: image, specs, price, download */
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(1) > *:nth-child(1) { order: 1; }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(1) > *:nth-child(2) { order: 6; }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(1) > *:nth-child(3) { order: 7; }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(1) > *:nth-child(4) { order: 8; }
  /* RIGHT column children: modèle, couleur, volant, batterie */
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(2) > *:nth-child(1) { order: 2; }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(2) > *:nth-child(2) { order: 3; }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(2) > *:nth-child(3) { order: 4; }
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div:nth-child(2) > *:nth-child(4) { order: 5; }
}

/* ---------- CONTACT PAGE ---------- */
@media (max-width: 900px) {
  #contact-mini-map { height: 220px !important; }
  .info-card, .map-card { padding: 22px !important; }
}

/* ---------- PRODUITS / QUI-SOMMES-NOUS layout helpers ---------- */
@media (max-width: 900px) {
  .two-col,
  .split,
  .row { grid-template-columns: 1fr !important; flex-direction: column !important; }
  .product-card img, .feature-image img { width: 100% !important; height: auto !important; }
}

/* ---------- RESEAU DE DISTRIBUTION ---------- */
@media (max-width: 900px) {
  #app .layout, #app > section { padding: 20px !important; }
  .distrib-list, .sidebar { width: 100% !important; max-width: 100% !important; }
}

/* ---------- FOOTER (CSS + inline-styled React) ---------- */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 40px 24px !important;
    text-align: center;
  }
  .footer-brand, .footer-col { align-items: center; }
  .footer-links { padding: 0 !important; }
  .footer-bottom { flex-direction: column !important; gap: 12px; text-align: center; padding: 18px 20px !important; }

  /* React inline-styled footers (produits.html, reseau-distribution.html) */
  footer[style*="60px 80px"] {
    padding: 40px 20px 0 !important;
  }
  footer[style*="60px 80px"] > div[style*="grid-template-columns: 2fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    text-align: center !important;
    padding-bottom: 32px !important;
  }
  footer[style*="60px 80px"] > div > div > ul {
    align-items: center !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  /* Footer two-up on tablet */
  .footer-inner { grid-template-columns: 1fr 1fr !important; text-align: left; }
  .footer-brand { grid-column: 1 / -1; text-align: center; }
  footer[style*="60px 80px"] > div[style*="grid-template-columns: 2fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ============================================================
   CANONICAL FOOTER (matches index.html, applied to all pages)
   ============================================================ */
footer, footer.footer {
  background: #000000 !important;
  padding: 60px 32px 0 !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
}
.footer-inner {
  max-width: 1100px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr 1fr !important;
  gap: 48px !important;
  padding-bottom: 48px !important;
}
.footer-brand-name {
  color: #00c8e0 !important;
  font-family: 'Barlow Condensed', sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  margin-top: 16px !important;
  margin-bottom: 10px !important;
}
.footer-brand-tagline, .footer-brand-tag {
  font-size: 13px !important;
  color: rgba(255,255,255,0.5) !important;
  line-height: 1.6 !important;
  font-weight: 300 !important;
}
.footer-col-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin-bottom: 18px !important;
  letter-spacing: 0.03em !important;
  font-family: 'Barlow', sans-serif !important;
}
.footer-links {
  list-style: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 !important;
}
.footer-links a, .footer-links span {
  font-size: 13px !important;
  color: rgba(255,255,255,0.5) !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
  font-family: 'Barlow', sans-serif !important;
}
.footer-links a:hover { color: #00c8e0 !important; }
.social-icons {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}
.social-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(255,255,255,0.6) !important;
  text-decoration: none !important;
  transition: border-color 0.2s, color 0.2s !important;
}
.social-icon:hover { border-color: #00c8e0 !important; color: #00c8e0 !important; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  padding: 20px 0 !important;
  text-align: center !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
}
.footer-bottom p {
  font-size: 12px !important;
  color: rgba(255,255,255,0.35) !important;
  font-family: 'Barlow', sans-serif !important;
}
.footer-lang {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  color: rgba(255,255,255,0.4) !important;
  margin-top: 6px !important;
}

/* Footer mobile already collapsed elsewhere — make sure single-column on mobile */
@media (max-width: 900px) {
  footer, footer.footer { padding: 40px 20px 0 !important; }
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    text-align: center !important;
  }
  .footer-inner > div { display: flex; flex-direction: column; align-items: center; }
  .footer-links { align-items: center !important; }
  .social-icons { justify-content: center !important; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr !important; text-align: left !important; }
  .footer-inner > div:first-child { grid-column: 1 / -1; align-items: center; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  h1 { font-size: clamp(26px, 7vw, 36px) !important; }
  h2 { font-size: clamp(22px, 5.5vw, 32px) !important; }
  h3 { font-size: clamp(18px, 4.5vw, 24px) !important; }
}

/* ============================================================
   USER-REQUESTED REFINEMENTS
   ============================================================ */

/* 1. Remove white frame around sections (qui-sommes-nous body bg is light) */
@media (max-width: 900px) {
  html, body {
    background: #020d1c !important;
    color: #fff !important;
  }
}

/* 2. Menu typography — restore original Barlow font everywhere */
.nav-links a {
  font-family: 'Barlow', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
}

/* 3. Menu colors — white for inactive, blue for active (visible on dark bg) */
.nav-links a {
  color: rgba(255,255,255,0.88) !important;
}
.nav-links a:hover {
  color: #00c8e0 !important;
}
.nav-links a.active {
  color: #0090d0 !important;  /* bleu, pas cyan trop foncé */
  font-weight: 600 !important;
}
/* Mobile hamburger menu — keep the same color logic, ensure no inherited dark color */
body.nav-open .nav-links a {
  color: rgba(255,255,255,0.92) !important;
}
body.nav-open .nav-links a.active {
  color: #0090d0 !important;
  font-weight: 600 !important;
}

/* 4. Section subtitles — restore Barlow (matches home page) */
.hero-subtitle,
.exp-text,
.section-subtitle,
.cta-wave-text {
  font-family: 'Barlow', sans-serif !important;
}

/* 5. PRODUITS configurator: equalize blocks + center on mobile */
@media (max-width: 900px) {
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] {
    align-items: stretch !important;
    max-width: 480px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* Make every card inside the configurator equal width and consistent padding */
  section[style*="48px 80px 60px"] > div[style*="grid-template-columns: 1fr 1fr"] > div > * {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Center the CTA bar (Ce produit vous intéresse) — keep it consistent */
  section[style*="48px 80px 60px"] > div[style*="32px 40px"] {
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* ---------- Home nav tagline (hidden on mobile) + nav height ---------- */
@media (max-width: 960px){
  .nav-tagline{ display:none !important; }
  nav{ height:76px !important; }
}
