/* ══════════════════════════════════════════════
   ALFRED — style.css
   osalfred.com · 2026
   ══════════════════════════════════════════════ */

/* ── Variables ───────────────────────────── */
:root {
  --blue: #007BFF;
  --blue-glow: rgba(0, 123, 255, 0.12);
  --blue-border: rgba(0, 123, 255, 0.2);
  --silver: #A0A0A0;
  --white: #FFFFFF;
  --text-body: #D1D5DB;
  --bg-dark: #0d0d0d;
  --bg-darker: #111111;
  --glass-bg: rgba(10, 10, 10, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
}

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

/* ── Base ────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', sans-serif;
  background: #000;
  color: var(--white);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

/* ── Typography helpers ──────────────────── */
.playfair { font-family: 'Playfair Display', serif; }
.playfair-italic { font-family: 'Playfair Display', serif; font-style: italic; }

.gradient-heading {
  background: linear-gradient(135deg, var(--silver) 0%, var(--white) 55%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass components ────────────────────── */
.a-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.a-glass:hover {
  border-color: var(--blue-border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px var(--blue-glow);
}

.a-glass-strong {
  background: rgba(6, 6, 8, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 12px 60px rgba(0,0,0,0.7), 0 0 80px rgba(0,123,255,0.04);
}

/* ── Buttons ─────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s, opacity 0.25s;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
}
/* Glow via ::after opacity — propriété composée (GPU), zéro layout shift */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: 0 0 22px 6px rgba(0,123,255,0.45);
  opacity: 0;
  animation: btn-glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:hover::after { animation: none; opacity: 1; }
.btn-primary:active { transform: translateY(0); }

@keyframes btn-glow-pulse {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: var(--blue-border);
  box-shadow: 0 0 15px rgba(0,123,255,0.1);
}

/* ── Section containers ─────────────────── */
.section-video  { position: relative; z-index: 10; background: transparent; }
.section-dark   { position: relative; z-index: 10; background: var(--bg-dark); }
.section-darker { position: relative; z-index: 10; background: var(--bg-darker); }

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

/* ── Accents ─────────────────────────────── */
.blue-halo {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,123,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

.sep { height: 1px; background: linear-gradient(to right, transparent, rgba(0,123,255,0.3), transparent); }

/* ── Marquee ─────────────────────────────── */
.marquee-wrapper { overflow: hidden; width: 100%; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 80px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee-item:hover { color: rgba(255,255,255,0.5); }

/* ── FAQ ─────────────────────────────────── */
.faq-answer { overflow: hidden; height: 0; }
.faq-icon { transition: transform 0.3s; font-size: 20px; line-height: 1; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── Process segments ────────────────────────── */
.process-seg {
  transform-origin: top center;
  width: 1px !important;
  max-width: 1px !important;
  min-width: 1px !important;
  align-self: center;
}

/* ── Stat values ─────────────────────────── */
.stat-val {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(135deg, var(--silver), var(--white));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ── Comparison table ───────────────────── */
.comp-yes { color: var(--blue); font-weight: 700; }
.comp-no  { color: rgba(255,255,255,0.2); }
.comp-alfred {
  background: rgba(0,123,255,0.06);
  border-left: 1px solid rgba(0,123,255,0.25);
  border-right: 1px solid rgba(0,123,255,0.25);
  transition: background 0.3s ease;
}
thead .comp-alfred { border-top: 1px solid rgba(0,123,255,0.25); border-radius: 4px 4px 0 0; }
tbody tr:last-child .comp-alfred { border-bottom: 1px solid rgba(0,123,255,0.25); }

.comp-table-wrap {
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.comp-table-wrap:hover {
  border-color: rgba(0,123,255,0.45) !important;
  box-shadow: 0 0 0 1px rgba(0,123,255,0.2), 0 0 40px rgba(0,123,255,0.08) !important;
}
.comp-table-wrap:hover .comp-alfred {
  background: rgba(0,123,255,0.12);
  border-color: rgba(0,123,255,0.5);
}
.comp-table-wrap:hover thead .comp-alfred { color: white; }

/* ── Sticky nav ──────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  will-change: background, backdrop-filter;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#nav.scrolled {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 12px 0;
}

/* Nav links — hover via CSS only, no inline handlers */
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link:focus-visible { color: white; }

/* Footer links */
.footer-link {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover, .footer-link:focus-visible { color: white; }

/* ── Scroll progress bar ─────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, #007BFF, rgba(0,123,255,0.4));
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
  will-change: width;
}

/* ── Calendly container ─────────────────── */
.calendly-inline-widget {
  min-width: 320px;
  min-height: 630px;
  border-radius: 12px;
  overflow: hidden;
}

/* ── Beams canvas ────────────────────────── */
@media (hover: none) { #shader-bg { display: none; } }
#shader-bg { will-change: transform; }

/* ── GSAP initial states ─────────────────── */
.gsap-fade  { opacity: 0; }
.gsap-up    { opacity: 0; transform: translateY(30px); }
.gsap-left  { opacity: 0; transform: translateX(-30px); }
.gsap-right { opacity: 0; transform: translateX(30px); }
.gsap-scale { opacity: 0; transform: scale(0.95); }

/* ── Pill tags ───────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
}

/* ── Testimonial avatar ──────────────────── */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #0d1a2e, #0a0a14);
  border: 1px solid rgba(0,123,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

/* ── Guarantee badge ─────────────────────── */
.guarantee-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,10,10,0.6);
}
.guarantee-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(0,123,255,0.8);
  flex-shrink: 0;
}

/* ── Mobile menu overlay ─────────────────── */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}
#mobile-menu a:hover { color: #007BFF; }

/* ── Global interactive transitions ─────── */
a, button, .btn-primary, .btn-secondary, .a-glass, .faq-item {
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease,
              border-color 0.2s ease, background 0.2s ease;
}

/* ── Section paint optimization ─────────── */
.section-dark, .section-darker, .section-video {
  will-change: auto;
  transform: translateZ(0);
}

/* ── iOS momentum scroll ─────────────────── */
@supports (-webkit-overflow-scrolling: touch) {
  .comp-table-wrap { -webkit-overflow-scrolling: touch; }
}

/* ════════════════════════════════════════════
   RESPONSIVE — TABLET (769px–1024px)
════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Hero: 50/50 split on tablet */
  #s01 .container > div { gap: 28px !important; }
  #s01 [style*="flex:0 0 55%"] { flex: 0 0 50% !important; }
  #s01 h1 { font-size: 2.6rem !important; }

  /* Services: 2 col */
  #s03 [style*="grid-template-columns:repeat(auto-fit,minmax(280px"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Process: reduce padding */
  .process-step-v { padding-right: 20px; }

  /* Stats row: 2+2 */
  #stats-row { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }

  /* S05 grid: stack on narrow tablet */
  @media (max-width: 900px) {
    #s05-grid { grid-template-columns: 1fr !important; }
    #s05-grid > div:first-child { padding: 40px 32px !important; }
  }

  .container { padding: 0 32px !important; }
}

/* ════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  #hamburger { display: flex !important; }
  /* Bouton nav "Réserver un appel" inutile sur mobile — le menu hamburger l'a déjà */
  #nav .btn-primary { display: none !important; }
  /* Badge "3 créneaux ce mois" — masqué sur mobile pour libérer la nav */
  #nav span[style*="border:1px solid rgba(0,123,255"] { display: none !important; }
  /* Stats mobile masquées, right panel desktop caché */
  #hero-stats-mobile { display: none !important; }
  #hero-right { display: none !important; }

  /* Hero S01 */
  #s01 .container > div {
    flex-direction: column !important;
    gap: 24px !important;
  }
  #s01 [style*="flex:0 0 55%"] {
    flex: none !important;
    width: 100% !important;
  }
  #s01 [style*="flex:1;display:flex;flex-direction:column"] {
    width: 100% !important;
  }
  .a-glass-strong { padding: 28px 20px !important; overflow: visible !important; }
  #s01 h1 { font-size: 2rem !important; }
  /* Hero section — empêche le débordement horizontal */
  #s01 { min-height: auto !important; padding-top: 80px !important; padding-bottom: 40px !important; }
  #s01 .container { padding-top: 24px !important; padding-bottom: 32px !important; gap: 0 !important; }
  /* Empêche le contenu hero de sortir du viewport */
  #s01 [style*="flex:0 0 55%"] { overflow-x: hidden !important; }
  body { overflow-x: hidden !important; }
  /* CTA buttons — force column on mobile (couvre tous les cas d'espacement inline) */
  #s01 .gsap-up > a.btn-primary,
  #s01 .gsap-up > a.btn-secondary {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  #s01 [style*="display:flex"][style*="gap:12px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #s01 [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Stats */
  #stats-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  /* S02 témoignages */
  #s02 [style*="grid-template-columns:repeat(auto-fit,minmax(280px"] {
    grid-template-columns: 1fr !important;
  }
  #s02 [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* S03 features */
  #s03 [style*="grid-template-columns:repeat(auto-fit,minmax(280px"] {
    grid-template-columns: 1fr !important;
  }

  /* Process — reduce gap on mobile */
  .process-step-v { gap: 20px !important; }
  .process-step-v > div:first-child > div:first-child { width: 48px !important; height: 48px !important; }
  .process-seg { min-height: 32px !important; width: 1px !important; max-width: 1px !important; }

  /* S04 FAQ badges */
  #s04 [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* S05 Calendly */
  #s05-grid {
    grid-template-columns: 1fr !important;
    border-radius: 16px !important;
  }
  #s05-grid > div:first-child { padding: 36px 24px !important; }
  #s05-grid .calendly-inline-widget {
    min-height: 580px !important;
    height: 580px !important;
  }

  /* Sections padding */
  .section-dark, .section-darker, .section-video {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
  #s05 { padding-top: 60px !important; }
  .container { padding: 0 16px !important; }

  /* Footer brand column */
  footer .container > div > div:first-child { max-width: 100% !important; width: 100%; }
  footer .container > div { gap: 24px !important; }
  footer a.footer-link { min-height: 44px; display: flex; align-items: center; }

  /* Comparison table: horizontal scroll */
  .comp-table-wrap { overflow-x: auto !important; }
  .comp-table-wrap table { min-width: 560px !important; }

  /* Touch targets */
  .btn-primary, .btn-secondary {
    min-height: 48px;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
  .faq-question { min-height: 56px; }
  .nav-links a { min-height: 44px; display: flex; align-items: center; }
}

/* ════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 480px)
════════════════════════════════════════════ */
@media (max-width: 480px) {
  #s01 h1 { font-size: 1.8rem !important; }
  #s02 [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
    grid-template-columns: 1fr !important;
  }
  #s04 [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
    grid-template-columns: 1fr !important;
  }
  .a-glass-strong { padding: 24px 16px !important; }
  #stats-row { grid-template-columns: 1fr 1fr !important; }
  .process-step-v > div:first-child > div {
    width: 40px !important;
    height: 40px !important;
  }
}

/* ── Focus visible (accessibility) ──────── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
