/* ============================================================
   SAMA · style.css
   Variables → Reset → Base → Video Stage → Nav → Sections
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
/* Palette alignée sur sama-insurance.ch : les sections à photo/vidéo
   (hero, constat, faq, footer) restent sombres (vert foncé + texte clair,
   pour la lisibilité sur une image) ; les sections pleines (services,
   réservation, nav défilée, modales) passent en clair, comme sur l'autre
   site. --navy-deep/--navy/--cream gardent leurs noms historiques mais
   changent de rôle : voir les commentaires sur chaque token. */
:root {
  --navy:       #E2F2E8;   /* white-ecru — surface claire (fond section Services) */
  --navy-deep:  #3E7D5A;   /* green-deep — fond des sections sombres + texte accent sur fond clair */
  --cream:      #182A20;   /* text-dark — texte par défaut sur fond clair */
  --red:        #5BAE7A;   /* green-mid — accent / CTA */
  --red-dark:   #3E7D5A;   /* green-deep — accent hover */
  --overlay:        rgba(14, 34, 20, 0.55);
  --overlay-strong: rgba(8, 9, 10, 0.65); /* neutre (pas vert) : garde les couleurs naturelles de la photo FAQ (bottes jaunes, ciré coloré) */

  /* Tokens dédiés aux 4 sections qui restent sombres (hero, constat, faq, footer) */
  --dark-bg:          #3E7D5A;
  --dark-bg-2:        #2F6047;
  --dark-text:        #F0FAF4;   /* white-warm — texte clair sur fond sombre + texte sur bouton accent */
  --dark-text-muted:  rgba(240, 250, 244, 0.68);
  --pale:             #C2E8CE;   /* green-sage — accent lisible sur fond vert foncé (remplace --red quand le fond est sombre) */

  /* Tokens clairs additionnels (texte secondaire / fonds), repris de sama-insurance.ch */
  --paper:   #F0FAF4;   /* white-warm — fond section Réservation, fond des champs */
  --dim:     #6A8A75;   /* text-light — texte secondaire sur fond clair */
  --dim-mid: #3C5445;   /* text-mid — labels / texte moyen sur fond clair */
  --heading-accent: #4E9973;   /* vert clair doux — accent sur "Réservez votre Bilan Express" et "Ce que nous faisons pour vous" */

  --font-head:  'Montserrat', sans-serif;
  --font-body:  'Inter', sans-serif;
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; } /* Lenis gère le scroll fluide */
body {
  background: var(--dark-bg);
  color: var(--dark-text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

/* ── Video Stage — couche fixe derrière tout ────────────────── */
.video-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-2) 100%);
}

.video-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
  /* Fallback vert foncé si la vidéo est absente */
  background: linear-gradient(160deg, var(--dark-bg) 0%, var(--dark-bg-2) 100%);
}

.video-wrap.is-active { opacity: 1; }

/* iOS peut bloquer l'autoplay (réglage "Lecture auto" du téléphone,
   réseau lent) : Safari affiche alors un gros bouton lecture natif
   que le CSS ne peut pas toujours masquer directement (c'est un
   comportement protégé par Apple, pas un simple style ignorable).
   Solution fiable : la vidéo reste invisible (opacity 0) tant qu'elle
   n'a pas *réellement* démarré (événement "playing", posé par JS) —
   tant qu'elle est invisible, aucun bouton ne peut apparaître dessus.
   En attendant, le dégradé vert de .video-wrap sert de fond, ce qui
   paraît intentionnel plutôt que cassé. */
.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.video-wrap video.is-playing {
  opacity: 1;
}

.video-wrap video::-webkit-media-controls,
.video-wrap video::-webkit-media-controls-enclosure,
.video-wrap video::-webkit-media-controls-panel,
.video-wrap video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.vid-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

/* ── Sections — couche contenu (z-index > video-stage) ─────── */
section, footer {
  position: relative;
  z-index: 1;
}

/* Sections vidéo : fond transparent → laisse voir la vidéo fixe */
.section-video {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sections solides : Services et Réservation sont désormais claires
   (comme sama-insurance.ch), Hero/Constat/FAQ/Footer restent sombres.
   Liseré fin pour séparer visuellement les sections consécutives. */
.section-solid {
  background: var(--navy);
  border-top: 1px solid rgba(62, 125, 90, 0.12);
  z-index: 2;
}

footer {
  background: var(--dark-bg);
  z-index: 2;
}

/* ── Navigation ─────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 4vw;
  transition: background 0.45s ease, padding 0.45s ease, backdrop-filter 0.45s ease;
}

/* Non défilée : au-dessus de la vidéo du hero → texte clair */
.nav-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--dark-text);
  line-height: 1;
  transition: color 0.3s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.8rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dark-text);
  opacity: 0.8;
  transition: opacity 0.2s, color 0.3s;
}
.nav-links a:hover { opacity: 1; }

.btn-nav {
  background: var(--red) !important;
  color: var(--dark-text) !important;
  opacity: 1 !important;
  padding: 0.55rem 1.5rem;
  border-radius: 8px;
  font-size: 0.7rem !important;
  transition: background 0.2s, transform 0.15s;
}
.btn-nav:hover {
  background: var(--red-dark) !important;
  transform: translateY(-1px);
}

/* Défilée : fond clair, texte sombre (comme sur sama-insurance.ch) */
#main-nav.nav-solid {
  background: rgba(240, 250, 244, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.1rem 4vw;
  border-bottom: 1px solid rgba(62, 125, 90, 0.08);
}
.nav-solid .nav-logo { color: var(--navy-deep); }
.nav-solid .nav-links a { color: var(--cream); opacity: 1; }
.nav-solid .nav-links a:hover { color: var(--navy-deep); }
.nav-solid .nav-toggle span { background: var(--cream); }

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark-text);
  border-radius: 2px;
  transition: transform 0.32s var(--ease-out), opacity 0.25s, background 0.3s;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mask reveal — mot par mot ──────────────────────────────── */
/* Chaque mot est enveloppé en JS dans .word-wrap > .word.
   Le overflow:hidden sur .word-wrap crée le masque invisible.
   GSAP anime .word de translateY(105%) → 0. */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.06em;   /* espace pour les descendants (g, y, p…) */
  margin-bottom: -0.06em;
}
.word {
  display: inline-block;
  will-change: transform;
}

/* ── HERO ───────────────────────────────────────────────────── */
/* Texte ancré en bas-gauche, style éditorial. Reste sombre (vidéo). */
#hero {
  padding: 0 5vw 10vh;
  align-items: flex-end;
  justify-content: flex-start;
}

.hero-content {
  max-width: 900px;
  width: 100%;
  /* Le contenu du hero est centré verticalement dans une section 100svh ;
     la nav (position:fixed) ne réserve pas sa place dans ce flux. Sans
     cette marge, un hero-content assez haut (ex. avec les deux boutons)
     peut chevaucher la nav tout en haut d'écran. */
  padding-top: clamp(5.5rem, 11vh, 8.5rem);
}

.label {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--pale);
  margin-bottom: 1.6rem;
  opacity: 0;   /* fade-up simple */
}

h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.8rem, 6.5vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.01em; /* -0.03em faisait se toucher certaines paires de lettres (ex. "couveRTure") en 900 à cette taille */
  color: var(--dark-text);
  margin-bottom: 2rem;
  /* Masqué tant que le JS (découpage en mots + GSAP) n'a pas pris le relais :
     sinon le texte brut s'affiche quelques instants au chargement puis
     "saute" dans son état masqué — visible comme un bug sur connexion lente.
     main.js repasse l'opacité à 1 juste après avoir positionné les mots. */
  opacity: 0;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 400;
  color: var(--dark-text-muted);
  max-width: 420px;
  margin-bottom: 2.8rem;
  /* idem que h1 : masqué tant que le JS n'a pas positionné les mots */
  opacity: 0;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--dark-text);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  padding: 1.05rem 2.4rem;
  border-radius: 8px;
  transition: background 0.25s, transform 0.2s;
  opacity: 0;  /* fade-up simple */
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.btn-secondary {
  display: inline-block;
  margin-top: 1rem;
  background: transparent;
  color: var(--dark-text);
  border: 1.5px solid rgba(240, 250, 244, 0.5);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  padding: 1.05rem 2.4rem;
  border-radius: 8px;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.btn-secondary:hover {
  background: rgba(240, 250, 244, 0.1);
  border-color: var(--dark-text);
  transform: translateY(-2px);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--dark-text);
  outline-offset: 3px;
}

/* Flèche de scroll */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, transparent, var(--dark-text));
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.9) translateY(0); }
  50% { opacity: 0.9; transform: scaleY(1) translateY(8px); }
}

/* Repère de scroll pour "Le constat" : la section est très longue (300vh,
   sticky) — sans indice, on peut croire être arrivé en bas du site.
   Décalé à droite pour ne pas gêner le texte ancré à gauche. */
.constat-scroll-indicator {
  left: auto;
  right: 5vw;
  bottom: 4vh;
  transform: none;
}

/* ── LE CONSTAT (section sticky) ────────────────────────────── */
/* Reste sombre (vidéo). */
.section-constat {
  min-height: 300vh;
  align-items: flex-start;
}

.constat-inner {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: flex-end;       /* texte en bas */
  justify-content: flex-start; /* texte à gauche */
  padding: 0 5vw 11vh;
  overflow: hidden;
}

.constat-phrase {
  position: absolute;
  bottom: 10vh;
  left: 5vw;
  max-width: 820px;
  will-change: opacity, transform;
  /* état initial géré par GSAP (mots individuels) */
}

.constat-phrase p {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--dark-text);
}

/* ── SERVICES ───────────────────────────────────────────────── */
/* Section claire (cf. .section-solid pour le fond, --navy = white-ecru).
   Espacement resserré (rem, pas vh) : 14vh était calibré pour une
   section vidéo plein écran, laisse un grand vide vide en fond uni. */
.section-services {
  padding: 7rem 5vw 6.5rem;
}

.services-inner {
  width: 100%;
  max-width: 1100px;
}

.section-eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--red);
  margin-bottom: 1rem;
  opacity: 0;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--heading-accent); /* "Ce que nous faisons pour vous" — vert clair doux. #faq .section-title reste clair (règle plus bas, spécificité supérieure) */
  margin-bottom: 5rem;
  /* pas d'état initial : géré par mot via JS */
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid rgba(123, 174, 96, 0.15);
  padding: 2.8rem 2.2rem 2.4rem;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(55px);
  /* transition uniquement pour l'état hover (pas pour l'animation d'entrée GSAP) */
  will-change: transform, opacity;
}
.card:hover {
  border-color: rgba(123, 174, 96, 0.35);
  box-shadow: 0 16px 40px rgba(62, 125, 90, 0.1);
}

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--red);
  margin-bottom: 1.4rem;
}
.card-icon svg { width: 100%; height: 100%; display: block; }

.card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--cream);
  margin-bottom: 0.9rem;
}

.card p {
  font-size: 0.88rem;
  color: var(--dim);
  line-height: 1.75;
}

/* ── CTA FINAL ──────────────────────────────────────────────── */
/* Section claire (cf. .section-solid), fond white-warm (un peu plus
   clair que --navy/white-ecru de Services, comme sur sama-insurance.ch). */
.section-cta {
  background: var(--paper);
  padding: 7rem 5vw 6.5rem;
}

.cta-inner {
  max-width: 1100px;
  width: 100%;
}

.cta-inner h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.6rem, 5.5vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--heading-accent); /* "Réservez votre Bilan Express." — vert clair doux */
  margin: 1.2rem 0 2rem;
  /* géré par mot via JS */
}

.cta-sub {
  font-size: 1rem;
  color: var(--dim);
  margin-bottom: 2.8rem;
  max-width: 380px;
  opacity: 0;
}

/* ── BOOKING WIDGET (rendez-vous) ───────────────────────────── */
.booking-widget {
  margin-top: 4rem;
  background: #fff;
  border: 1px solid rgba(138, 204, 160, 0.25);
  box-shadow: 0 20px 80px rgba(62, 125, 90, 0.1);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.booking-steps {
  display: flex;
  border-bottom: 1px solid rgba(138, 204, 160, 0.2);
}
.booking-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.1rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.booking-step.active { color: var(--cream); border-bottom-color: var(--red); }
.booking-step.done   { color: var(--red); }

.booking-panel { display: none; }
.booking-panel.active { display: block; }

/* Étape 1 : calendrier + créneaux */
.booking-cal-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 380px; }
.booking-calendar { padding: 2rem 1.8rem; border-right: 1px solid rgba(138, 204, 160, 0.2); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.cal-month-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cream);
  text-transform: capitalize;
}
.cal-nav-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  background: rgba(91, 174, 122, 0.08);
  transition: background 0.2s, color 0.2s;
}
.cal-nav-btn:hover { background: var(--red); color: var(--dark-text); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day-name {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 0.06em;
  padding: 6px 0;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 0.78rem; font-weight: 500;
  color: var(--cream);
  border: 1px solid transparent;
  transition: all 0.16s;
}
.cal-day.past, .cal-day.weekend { color: var(--dim); opacity: 0.55; }
.cal-day.today { border-color: var(--red); color: var(--red); font-weight: 700; }
.cal-day.selectable { cursor: pointer; }
.cal-day.selectable:hover { background: rgba(91, 174, 122, 0.1); color: var(--navy-deep); }
.cal-day.selected { background: var(--red); color: var(--dark-text) !important; font-weight: 700; border-color: var(--red); }

.booking-slots { padding: 2rem 1.8rem; display: flex; flex-direction: column; }
.booking-slots-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cream);
  margin-bottom: 1rem;
  min-height: 20px;
}
.slots-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; color: var(--dim);
  font-size: 0.78rem; text-align: center; gap: 0.8rem; padding: 2rem 0; line-height: 1.7;
}
.slots-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem;
  flex: 1; align-content: start; max-height: 260px; overflow-y: auto; padding-right: 2px;
}
.slots-grid::-webkit-scrollbar { width: 3px; }
.slots-grid::-webkit-scrollbar-thumb { background: rgba(62, 125, 90, 0.2); border-radius: 2px; }
.slot-btn {
  padding: 0.65rem 0.4rem;
  border: 1px solid rgba(138, 204, 160, 0.35);
  border-radius: 8px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--dim-mid);
  background: #fff;
  transition: all 0.16s;
  text-align: center;
  font-family: var(--font-body);
}
.slot-btn:hover:not(:disabled) { border-color: var(--red); color: var(--navy-deep); background: rgba(91, 174, 122, 0.06); }
.slot-btn.selected { background: var(--red); border-color: var(--red); color: var(--dark-text); }
.slot-btn.busy { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.slots-all-busy { grid-column: 1 / -1; text-align: center; font-size: 0.78rem; color: var(--dim); line-height: 1.7; padding: 1rem 0; }

.slots-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.7rem; padding: 2rem 0; color: var(--dim); font-size: 0.78rem;
  grid-column: 1 / -1;
}
.slots-spinner {
  width: 22px; height: 22px;
  border: 2px solid rgba(138, 204, 160, 0.3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin-slot 0.75s linear infinite;
}
@keyframes spin-slot { to { transform: rotate(360deg); } }

.btn-to-next {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; margin-top: 1.2rem; width: 100%;
  background: var(--red); color: var(--dark-text);
  border-radius: 8px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em;
  font-family: var(--font-body);
  transition: background 0.25s, transform 0.2s;
}
.btn-to-next:hover:not(:disabled) { background: var(--red-dark); transform: translateY(-1px); }
.btn-to-next:disabled { opacity: 0.3; cursor: not-allowed; }

/* Étape 2 : formulaire */
.booking-form-panel { padding: 2.2rem 2rem; }
.booking-summary-bar {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.8rem 1rem; background: rgba(91, 174, 122, 0.08);
  border-radius: 8px; margin-bottom: 1.8rem; color: var(--red);
}
.booking-summary-date { font-weight: 700; font-size: 0.85rem; color: var(--cream); }
.booking-summary-change {
  margin-left: auto; font-size: 0.72rem; font-weight: 600; color: var(--red);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.booking-summary-change:hover { color: var(--red-dark); }

.booking-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bform-field { display: flex; flex-direction: column; gap: 0.4rem; }
.bform-field.full { grid-column: 1 / -1; }
.bform-label {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim-mid);
}
.bform-input {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(138, 204, 160, 0.35);
  border-radius: 8px;
  font-size: 0.86rem; font-family: var(--font-body);
  color: var(--cream);
  background: var(--paper);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.bform-input::placeholder { color: var(--dim); }
.bform-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(91, 174, 122, 0.12); }
.bform-input.error { border-color: #e05252; }
.bform-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%233C5445' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.consent-wrap { display: flex; align-items: flex-start; gap: 0.6rem; margin: 1.2rem 0 0.3rem; }
.consent-wrap input[type="checkbox"] {
  width: 17px; height: 17px; min-width: 17px; margin-top: 2px;
  accent-color: var(--red); cursor: pointer;
}
.consent-label { font-size: 0.78rem; color: var(--dim-mid); line-height: 1.6; cursor: pointer; }
.legal-link {
  display: inline; font-size: inherit; color: var(--red);
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; background: none; border: none; font-family: inherit;
}
.legal-link:hover { color: var(--red-dark); }
.consent-error { font-size: 0.74rem; color: #c0392b; display: none; margin-top: 0.4rem; }

.booking-form-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.6rem; gap: 0.8rem; flex-wrap: wrap;
}
.btn-back {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; font-weight: 600; color: var(--dim);
  transition: color 0.2s; font-family: var(--font-body);
}
.btn-back:hover { color: var(--cream); }
.btn-confirm-rdv { opacity: 1 !important; padding: 0.85rem 1.8rem !important; font-size: 0.72rem !important; }

/* Étape 3 : confirmation */
.booking-confirm-panel {
  padding: 3.6rem 2rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
}
.confirm-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(91, 174, 122, 0.12); color: var(--red);
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.2rem;
}
.confirm-title { font-family: var(--font-head); font-weight: 900; font-size: 1.4rem; color: var(--cream); }
.confirm-detail {
  font-size: 0.88rem; color: var(--navy-deep); background: rgba(91, 174, 122, 0.1);
  padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600;
}
.confirm-sub { font-size: 0.82rem; color: var(--dim); max-width: 380px; line-height: 1.7; }
.confirm-actions { display: flex; gap: 0.8rem; margin-top: 0.4rem; flex-wrap: wrap; justify-content: center; }
.btn-new-rdv {
  padding: 0.7rem 1.4rem; border: 1px solid rgba(138, 204, 160, 0.4); border-radius: 8px;
  font-size: 0.74rem; font-weight: 600; color: var(--red);
  transition: all 0.2s; font-family: var(--font-body);
}
.btn-new-rdv:hover { background: rgba(91, 174, 122, 0.06); border-color: var(--red-dark); color: var(--red-dark); }

@media (max-width: 768px) {
  .booking-cal-row { grid-template-columns: 1fr; }
  .booking-calendar { border-right: none; border-bottom: 1px solid rgba(138, 204, 160, 0.2); }
  .booking-form-grid { grid-template-columns: 1fr; }
  .booking-form-panel { padding: 1.6rem 1.3rem; }
  .booking-step { padding: 0.9rem 0.4rem; font-size: 0.6rem; letter-spacing: 0.06em; }
}

/* ── MODALES LÉGALES (mentions / confidentialité) ───────────── */
/* Traitement à part, toujours clair, indépendant du thème de la section
   qui les ouvre — reprend tel quel le traitement de sama-insurance.ch. */
.legal-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999; align-items: center; justify-content: center; padding: 1.2rem;
}
.legal-modal-overlay.open { display: flex; }
.legal-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 680px; width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 2.8rem 2.4rem; position: relative;
}
.legal-modal h2 { font-family: var(--font-head); font-size: 1.35rem; color: var(--navy-deep); margin-bottom: 0.4rem; }
.legal-modal h3 { font-family: var(--font-head); font-size: 0.92rem; color: var(--navy-deep); margin: 1.5rem 0 0.5rem; }
.legal-modal p, .legal-modal li { font-size: 0.86rem; color: #444; line-height: 1.75; }
.legal-modal a { color: var(--navy-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal-modal ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.legal-modal .legal-date { font-size: 0.76rem; color: #999; margin-bottom: 1.4rem; }
.legal-modal-close {
  position: absolute; top: 1rem; right: 1.1rem;
  font-size: 1.4rem; color: #999;
  transition: color 0.2s;
}
.legal-modal-close:hover { color: #333; }

@media (max-width: 600px) {
  .legal-modal { padding: 2rem 1.3rem; }
}

/* ── FAQ ────────────────────────────────────────────────────── */
/* Section à photo fixe : reste sombre (image + overlay vert-noir pour
   la lisibilité, comme .vid-overlay mais plus opaque). */
.section-photo {
  position: relative;
  border-top: 1px solid rgba(240, 250, 244, 0.1);
  overflow: hidden;
}
.section-faq {
  padding: 8rem 5vw 7rem;
  background-image: url('../assets/images/faq-bg.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.section-faq::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay-strong);
  z-index: 0;
}

.faq-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  width: 100%;
}

#faq .section-eyebrow { color: var(--pale); }
#faq .section-title { color: var(--dark-text); }

.faq-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid rgba(240, 250, 244, 0.14);
  opacity: 0;
  transform: translateY(35px);
  will-change: transform, opacity;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.5rem 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark-text);
  text-align: left;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--pale); }

.faq-icon {
  width: 26px; height: 26px;
  min-width: 26px;
  border-radius: 50%;
  border: 1px solid rgba(240, 250, 244, 0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--dark-text);
  transition: transform 0.35s var(--ease-out), background 0.3s, border-color 0.3s, color 0.3s;
}
.faq-item.open .faq-icon {
  background: var(--red);
  border-color: var(--red);
  color: var(--dark-text);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}
.faq-item.open .faq-answer { max-height: 320px; }

.faq-answer-inner {
  padding-bottom: 1.6rem;
  padding-right: 2.2rem;
  font-size: 0.92rem;
  color: var(--dark-text-muted);
  line-height: 1.75;
}

@media (max-width: 768px) {
  .section-faq { padding: 6rem 6vw 5rem; }
  .faq-question { font-size: 0.92rem; padding: 1.2rem 0; gap: 0.8rem; }
  .faq-answer-inner { padding-right: 0; font-size: 0.88rem; }
  .faq-list { margin-top: 2.2rem; }
}

/* ── FOOTER ─────────────────────────────────────────────────── */
/* Reste sombre, comme sur sama-insurance.ch. Deux niveaux : un bandeau
   principal (marque, contact, Instagram mis en avant) puis une barre
   basse discrète pour les liens légaux — hiérarchie plus pro/moderne
   qu'une seule ligne de liens à plat. */
footer {
  border-top: 1px solid rgba(240, 250, 244, 0.08);
  padding: 3.5rem 4vw 0;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.6rem;
  padding-bottom: 3rem;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--dark-text);
}

.footer-tagline {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(240, 250, 244, 0.45);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact a {
  font-size: 0.82rem;
  color: rgba(240, 250, 244, 0.65);
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--dark-text); }

/* Instagram : bouton plein, plus visible qu'un simple lien texte */
.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.3rem;
  border-radius: 100px;
  background: rgba(240, 250, 244, 0.1);
  border: 1px solid rgba(240, 250, 244, 0.18);
  color: var(--dark-text);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.footer-instagram:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-1px);
}

.footer-bottom {
  border-top: 1px solid rgba(240, 250, 244, 0.08);
  padding: 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(240, 250, 244, 0.32);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
}

.footer-legal button,
.footer-legal a {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(240, 250, 244, 0.38);
  transition: color 0.2s;
}
.footer-legal button:hover,
.footer-legal a:hover { color: var(--dark-text); }

@media (max-width: 640px) {
  .footer-main { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Focus visible global (accessibilité clavier) ──────────── */
/* Accent vert : reste visible sur fond clair comme sur fond sombre. */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible { border-radius: 8px; }

/* ── Reduced Motion — tout s'affiche directement ───────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-line { animation: none; }

  /* Éléments fade simples */
  h1, .hero-sub, .label, .btn-primary, .section-eyebrow,
  .cta-sub, .card, .faq-item {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Mots splittés par JS */
  .word { transform: none !important; }
  .word-wrap { overflow: visible !important; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  /* Centrage du contenu des cartes Services uniquement sur téléphone
     (au-delà, l'alignement à gauche reste cohérent avec le reste du site). */
  .card {
    text-align: center;
  }
  .card-icon {
    margin-left: auto;
    margin-right: auto;
  }

  /* Hamburger visible */
  .nav-toggle { display: flex; }

  /* Menu plein écran : reste clair (comme la nav défilée), texte sombre */
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(240, 250, 244, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.38s var(--ease-out);
    z-index: 99;
  }
  .nav-links.is-open {
    opacity: 1;
    pointer-events: all;
  }
  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.14em;
    color: var(--cream);
    opacity: 1;
  }
  .nav-links a:hover { color: var(--navy-deep); }
  .btn-nav {
    font-size: 0.85rem !important;
    padding: 0.75rem 2rem;
  }

  /* Hero */
  .hero-content { padding-top: 14vh; }
}

@media (max-width: 480px) {
  .cards-grid { gap: 1rem; }
}
