/* ================================================================
   HÔTEL BORDERAN - css/style.css

   Sommaire :
   1.  Variables & Reset
   2.  Typographie de base
   3.  Boutons
   4.  Header & Navigation
   5.  Hero
   6.  Sections communes
   7.  Galerie
   8.  Activités & Emplacement
   9.  Prestations & Marquee
   10. Formulaire de réservation
   11. Footer
   12. Barre de progression & Retour en haut
   13. Animations keyframes
   14. Responsive (1024px / 768px / 480px)
   15. prefers-reduced-motion
================================================================ */

/* ----------------------------------------------------------------
   1. VARIABLES & RESET
---------------------------------------------------------------- */
:root {
  /* Charte graphique */
  --beige:       #F5EDE4;
  --brun:        #A9876F;
  --or:          #B8985E;
  --bleu-gris:   #7C8B99;
  --anthracite:  #3D2F23;
  --beige-alt:   #EFE2D4; /* variante plus sombre pour sections alternées */
  --blanc:       #FFFFFF;

  /* Typographie */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Rayons (cohérence forme) */
  --r-card:  8px;
  --r-btn:   6px;
  --r-input: 6px;

  /* Mise en page */
  --header-h:    72px;
  --container:   1200px;
  --narrow:      720px;

  /* Transitions */
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.2s;
  --t-base: 0.28s;
  --t-slow: 0.6s;

  /* Z-index */
  --z-header:   100;
  --z-progress: 200;
  --z-back-top:  90;
  --z-mobile:    99;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--beige);
  color: var(--anthracite);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-sans); cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ----------------------------------------------------------------
   2. TYPOGRAPHIE DE BASE
---------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--anthracite);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--anthracite);
}

/* ----------------------------------------------------------------
   3. BOUTONS
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.75rem;
  border-radius: var(--r-btn);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    background-color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    transform 0.14s ease;
  line-height: 1;
}

/* Bouton principal : anthracite / beige */
.btn-primary {
  background-color: var(--anthracite);
  color: var(--beige);
}
.btn-primary:hover {
  background-color: #5a4536;
  box-shadow: 0 4px 16px rgba(61, 47, 35, 0.22);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(1px); box-shadow: none; }

/* Bouton fantôme (hero, sur fond sombre) */
.btn-ghost {
  background: transparent;
  color: var(--beige);
  border: 1.5px solid rgba(245, 237, 228, 0.65);
}
.btn-ghost:hover {
  background: rgba(245, 237, 228, 0.12);
  border-color: var(--beige);
  transform: translateY(2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.btn-ghost:active { transform: translateY(3px); }

/* Bouton contour hiver (or) */
.btn-outline { background: transparent; }
.btn-outline--hiver {
  color: var(--or);
  border: 1.5px solid var(--or);
}
.btn-outline--hiver:hover {
  background: var(--or);
  color: var(--beige);
  box-shadow: 0 4px 14px rgba(184, 152, 94, 0.28);
  transform: translateY(-1px);
}

/* Bouton contour été (bleu-gris) */
.btn-outline--ete {
  color: var(--bleu-gris);
  border: 1.5px solid var(--bleu-gris);
}
.btn-outline--ete:hover {
  background: var(--bleu-gris);
  color: var(--beige);
  box-shadow: 0 4px 14px rgba(124, 139, 153, 0.28);
  transform: translateY(-1px);
}
.btn-outline--hiver:active,
.btn-outline--ete:active { transform: translateY(0); }

/* ----------------------------------------------------------------
   4. HEADER & NAVIGATION
---------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: var(--z-header);
  background: rgba(245, 237, 228, 0.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(169, 135, 111, 0.12);
  transition: box-shadow var(--t-base) var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(61, 47, 35, 0.08);
}

.header-inner {
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.header-logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--anthracite);
  line-height: 1.2;
}
.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  color: var(--brun);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Nav desktop */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--anthracite);
  transition: color var(--t-fast) var(--ease);
}
/* Indicateur actif : trait or sous le lien */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  background: var(--or);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-base) var(--ease);
}
.nav-link:hover { color: var(--or); }
.nav-link.is-active::after { transform: scaleX(1); }

.btn-reserver {
  margin-left: 0.5rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.875rem;
}

/* Toggle mobile */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-btn);
  color: var(--anthracite);
  transition: background-color var(--t-fast) var(--ease);
  margin-left: auto;
}
.mobile-toggle:hover { background: rgba(61, 47, 35, 0.07); }
.mobile-toggle svg { width: 20px; height: 20px; }

/* Nav mobile */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(245, 237, 228, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(169, 135, 111, 0.18);
  padding: 0.75rem 1.5rem 1.25rem;
  z-index: var(--z-mobile);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-nav[hidden] { display: none; }

.mobile-nav-link {
  padding: 0.85rem 0;
  font-size: 0.95rem;
  color: var(--anthracite);
  border-bottom: 1px solid rgba(169, 135, 111, 0.12);
  transition: color var(--t-fast);
}
.mobile-nav-link:last-of-type { border-bottom: none; }
.mobile-nav-link:hover { color: var(--or); }

.mobile-nav-reserver {
  margin-top: 0.75rem;
  padding: 0.7rem 1.25rem;
  background: var(--anthracite);
  color: var(--beige);
  border-radius: var(--r-btn);
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: none;
}
.mobile-nav-reserver:hover { background: #5a4536; color: var(--beige); }

/* ----------------------------------------------------------------
   5. HERO
---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  will-change: transform; /* parallax desktop */
}
/* Le <picture> doit prendre toute la hauteur du conteneur */
.hero-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  /* Overlay doux : la photo est déjà lumineuse */
  background: linear-gradient(
    165deg,
    rgba(15, 8, 2, 0.25) 0%,
    rgba(15, 8, 2, 0.45) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  max-width: 820px;
}

/* Surtitre localisation */
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 237, 228, 1);
  margin-bottom: 0.6rem;
  animation: fadeUp 0.9s var(--ease) 0.15s both;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--beige);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.22), 0 1px 5px rgba(0, 0, 0, 0.18);
  line-height: 1.05;
  margin-bottom: 0.35rem;
  animation: fadeUp 0.9s var(--ease) 0.25s both;
}

/* Sous-titre "Hôtel de Montagne" */
.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 237, 228, 1);
  margin-bottom: 1.4rem;
  animation: fadeUp 0.9s var(--ease) 0.38s both;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.92rem, 2vw, 1.08rem);
  font-weight: 300;
  color: rgba(245, 237, 228, 1);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
  max-width: 50ch;
  margin: 0 auto 2rem;
  line-height: 1.65;
  animation: fadeUp 0.9s var(--ease) 0.5s both;
}

.hero-cta {
  animation: fadeUp 0.9s var(--ease) 0.68s both,
             breathe 3.5s ease-in-out 2.5s infinite;
}

/* ----------------------------------------------------------------
   6. SECTIONS COMMUNES
---------------------------------------------------------------- */
.section {
  padding: 6rem 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow {
  max-width: var(--narrow);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--anthracite);
  text-align: center;
  margin-bottom: 0.6rem;
}
/* Trait décoratif sous le titre */
.section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--or);
  border-radius: 1px;
  margin: 0.65rem auto 0;
}

.section-lead {
  text-align: center;
  font-size: 0.975rem;
  color: var(--anthracite);
  opacity: 0.78;
  max-width: 58ch;
  margin: 0 auto 3rem;
  line-height: 1.75;
}

/* Animation d'apparition au scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------------------
   7. GALERIE
---------------------------------------------------------------- */
.section-galerie {
  background: var(--beige);
}

/* Bento : 1 grande (60%) + colonne 2 petites (40%) */
.gallery-bento {
  display: grid;
  grid-template-columns: 3fr 2fr;
  /* grid-template-rows contraint VRAIMENT la hauteur de la rangée,
     contrairement à height qui est juste une préférence ignorée
     par les rangées auto quand le contenu est plus grand. */
  grid-template-rows: 540px;
  gap: 1rem;
  margin-top: 2.5rem;
  /* Filet de sécurité : empêche tout débordement hors du conteneur */
  overflow: hidden;
}

.gallery-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  /* Fond neutre pendant le chargement des images */
  background-color: var(--beige-alt);
}

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

/* Overlay avec titre + description en bas de chaque card */
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.1rem 1.1rem;
  background: linear-gradient(to top, rgba(15, 8, 2, 0.72) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  pointer-events: none;
}

.gallery-card-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--beige);
  text-transform: uppercase;
}

.gallery-card-info {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: rgba(245, 237, 228, 0.88);
  line-height: 1.4;
  font-style: italic;
}

/* ----------------------------------------------------------------
   8. ACTIVITÉS & EMPLACEMENT
---------------------------------------------------------------- */
.section-activites {
  /* Fond légèrement plus chaud pour différencier la section */
  background: var(--beige-alt);
}

/* Switcher onglets saison */
.season-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: 0 auto 3rem;
  padding: 0.3rem;
  background: rgba(245, 237, 228, 0.65);
  border-radius: 50px;
  width: fit-content;
}

.season-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--anthracite);
  opacity: 0.55;
  transition: all var(--t-base) var(--ease);
}
.season-tab svg { width: 15px; height: 15px; }

.season-tab--hiver.active {
  background: var(--or);
  color: var(--beige);
  opacity: 1;
  box-shadow: 0 2px 10px rgba(184, 152, 94, 0.3);
}
.season-tab--ete.active {
  background: var(--bleu-gris);
  color: var(--beige);
  opacity: 1;
  box-shadow: 0 2px 10px rgba(124, 139, 153, 0.3);
}
.season-tab:not(.active):hover {
  opacity: 0.8;
  background: rgba(245, 237, 228, 0.5);
}

/* Panels saison */
.season-panel {
  /* Utilisé pour la transition de fondu */
}
.season-panel[hidden] { display: none; }
.season-panel.is-fading { opacity: 0; transition: opacity 0.2s ease; }

/* Grille de cards */
.activity-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.activity-card {
  background: rgba(245, 237, 228, 0.72);
  border-radius: var(--r-card);
  padding: 1.75rem 1.5rem;
  transition:
    box-shadow var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease);
}
.activity-card:hover {
  box-shadow: 0 6px 22px rgba(61, 47, 35, 0.09);
  background: rgba(245, 237, 228, 0.95);
}

/* Icône de card */
.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.card-icon svg { width: 22px; height: 22px; }

/* Couleur icône hiver */
.season-panel--hiver .card-icon {
  background: rgba(184, 152, 94, 0.13);
  color: var(--or);
}
/* Couleur icône été */
.season-panel--ete .card-icon {
  background: rgba(124, 139, 153, 0.13);
  color: var(--bleu-gris);
}

.card-title {
  font-family: var(--font-sans);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--anthracite);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--anthracite);
  opacity: 0.72;
  line-height: 1.55;
  max-width: none;
}

/* Été : typographie plus aérée (sensation de calme) */
.activity-cards--ete .card-desc {
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.activity-cards--ete .card-title {
  letter-spacing: 0.015em;
}

/* Décalage d'apparition pour les cards (stagger) */
.activity-card:nth-child(2).reveal { transition-delay: 0.07s; }
.activity-card:nth-child(3).reveal { transition-delay: 0.14s; }
.activity-card:nth-child(4).reveal { transition-delay: 0.21s; }

.season-cta { text-align: center; }

/* ----------------------------------------------------------------
   9. PRESTATIONS & MARQUEE
---------------------------------------------------------------- */
.section-prestations {
  background: var(--anthracite);
  padding: 5rem 0;
  overflow: hidden;
}
.section-prestations .section-title {
  color: var(--beige);
  margin-bottom: 3rem;
}
.section-prestations .section-title::after {
  background: var(--or);
}

/* Marquee */
.marquee-outer {
  position: relative;
  overflow: hidden;
  /* Fondu sur les bords */
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

/* Deux tracks empilés verticalement */
.marquee-track {
  display: flex;
  width: max-content;
}
.marquee-track + .marquee-track {
  margin-top: 0.25rem; /* légère séparation entre les deux bandes */
}

.marquee-items {
  display: flex;
  align-items: center;
  list-style: none;
}
.marquee-items.paused { animation-play-state: paused; }

/* Bande 1 : défilement gauche — 22s (+10% plus rapide que 25s) */
.marquee-items--1 {
  animation: marqueeScroll 22s linear infinite;
}

/* Bande 2 : défilement droite (direction inverse) — même vitesse */
.marquee-items--2 {
  animation: marqueeScrollReverse 22s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 2.5rem;
  border-right: 1px solid rgba(245, 237, 228, 0.1);
  color: var(--beige);
  white-space: nowrap;
  position: relative;
  transition: color var(--t-fast);
  cursor: default;
}
.marquee-item:last-child { border-right: none; }
.marquee-item svg { width: 20px; height: 20px; opacity: 0.78; flex-shrink: 0; }

.marquee-label {
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  opacity: 0.82;
}

/* Tooltip (desktop, hover) */
.marquee-item::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--or);
  color: var(--beige);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 5;
}
@media (hover: hover) {
  .marquee-item:hover::before { opacity: 1; }
  .marquee-item:hover { color: var(--or); }
}

/* Grille statique : cachée par défaut, visible via prefers-reduced-motion */
.prestations-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.prestation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--beige);
  border: 1px solid rgba(245, 237, 228, 0.14);
  border-radius: var(--r-card);
  font-size: 0.875rem;
  opacity: 0.9;
}
.prestation-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; }

/* ----------------------------------------------------------------
   10. FORMULAIRE DE RÉSERVATION
---------------------------------------------------------------- */
.section-reservation { background: var(--beige); }

.reservation-form { margin-top: 2rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
/* Évite le double espacement quand form-field est dans form-row */
.form-row .form-field { margin-bottom: 0; }

.form-field label {
  font-size: 0.858rem;
  font-weight: 500;
  color: var(--anthracite);
  line-height: 1.4;
}
.req { color: var(--or); margin-left: 1px; }
.optional {
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.6;
  margin-left: 4px;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--anthracite);
  opacity: 0.6;
}

.input-wrap { position: relative; }

/* Inputs, selects, textarea */
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.72rem 1rem;
  background: var(--blanc);
  border: 1.5px solid rgba(169, 135, 111, 0.32);
  border-radius: var(--r-input);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--anthracite);
  transition:
    border-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%233D2F23' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(61, 47, 35, 0.35);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--or);
  box-shadow: 0 0 0 3px rgba(184, 152, 94, 0.14);
}

/* Champ valide */
.form-field.is-valid input,
.form-field.is-valid select,
.form-field.is-valid textarea {
  border-color: #5e8b5e;
}

/* Coche verte de validation */
.field-check {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #5e8b5e;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.form-field.is-valid .field-check { opacity: 1; }

/* RGPD */
.form-field--rgpd { margin-top: 0.5rem; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.858rem;
  color: var(--anthracite);
  line-height: 1.55;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1.5px solid rgba(169, 135, 111, 0.45);
  border-radius: 4px;
  background: var(--blanc);
  accent-color: var(--or);
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}

/* Envoi */
.form-submit { margin-top: 1.75rem; }

.btn-submit { min-width: 200px; justify-content: center; }

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(245, 237, 228, 0.3);
  border-top-color: var(--beige);
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
  flex-shrink: 0;
}
.btn-submit:disabled { opacity: 0.72; cursor: not-allowed; }

/* Messages de retour */
.form-confirm,
.form-error {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-card);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
}
.form-confirm {
  background: rgba(94, 139, 94, 0.1);
  border: 1px solid rgba(94, 139, 94, 0.28);
  color: #3a6b3a;
}
.form-error {
  background: rgba(160, 60, 60, 0.08);
  border: 1px solid rgba(160, 60, 60, 0.22);
  color: #7a3a3a;
}

/* Flatpickr - ajustements charte */
.flatpickr-calendar {
  font-family: var(--font-sans);
  border: 1.5px solid rgba(169, 135, 111, 0.28);
  border-radius: var(--r-card);
  box-shadow: 0 8px 28px rgba(61, 47, 35, 0.12);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover { background: var(--or); border-color: var(--or); }
.flatpickr-day.today { border-color: var(--brun); }
.flatpickr-months .flatpickr-month { color: var(--anthracite); }

/* ----------------------------------------------------------------
   11. FOOTER
---------------------------------------------------------------- */
.site-footer {
  background: var(--anthracite);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(245, 237, 228, 0.45);
  max-width: none;
}
.footer-link {
  font-size: 0.78rem;
  color: rgba(245, 237, 228, 0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
.footer-link:hover { color: var(--beige); }

/* ----------------------------------------------------------------
   12. BARRE DE PROGRESSION & RETOUR EN HAUT
---------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--or);
  z-index: var(--z-progress);
  pointer-events: none;
  transition: width 0.1s linear;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--anthracite);
  color: var(--beige);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-back-top);
  box-shadow: 0 4px 16px rgba(61, 47, 35, 0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity var(--t-base) var(--ease),
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}
.back-to-top[hidden] { display: none; }
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #5a4536; box-shadow: 0 6px 22px rgba(61, 47, 35, 0.28); }
.back-to-top svg { width: 17px; height: 17px; }

/* ----------------------------------------------------------------
   13. ANIMATIONS KEYFRAMES
---------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Animation "respiration" subtile sur le CTA hero */
@keyframes breathe {
  0%, 100% { box-shadow: 0 4px 18px rgba(245, 237, 228, 0.16); }
  50%       { box-shadow: 0 6px 30px rgba(245, 237, 228, 0.32); }
}

/* Bande 1 : défilement gauche (0 → -50%) */
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Bande 2 : défilement droite (-50% → 0), boucle seamless grâce au clone */
@keyframes marqueeScrollReverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------------
   14. RESPONSIVE
---------------------------------------------------------------- */

/* Tablette : ≤ 1024px */
@media (max-width: 1024px) {
  .activity-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Mobile : ≤ 768px */
@media (max-width: 768px) {
  :root { --header-h: 64px; }

  /* Header mobile : masquer nav desktop uniquement */
  .header-nav { display: none; }

  /* Bouton Réserver : compact, poussé à droite par margin-left auto */
  .btn-reserver {
    margin-left: auto;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
  }

  /* Toggle hamburger : après le bouton Réserver */
  .mobile-toggle {
    display: flex;
    margin-left: 0.5rem; /* override le margin-left: auto du sélecteur de base */
  }

  /* Sections */
  .section { padding: 4rem 0; }

  /* Galerie : empilement vertical, hauteurs explicites par item */
  .gallery-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto; /* reset : hauteurs portées par les items */
    overflow: visible;
  }
  .gallery-item--large { height: 260px; }
  .gallery-col { grid-template-rows: auto; gap: 1rem; }
  .gallery-col .gallery-item { height: 200px; }

  /* Activities : 1 colonne sur très petit mobile, 2 sur tablette */
  .activity-cards { grid-template-columns: 1fr; }

  /* Form : 1 colonne */
  .form-row { grid-template-columns: 1fr; }
  .form-row .form-field { margin-bottom: 1rem; }
  .form-row .form-field:last-child { margin-bottom: 0; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; gap: 0.5rem; }

  /* Back to top */
  .back-to-top { bottom: 1.25rem; right: 1.25rem; }
}

/* Tablette intermédiaire : entre 481px et 768px → 2 colonnes activités */
@media (min-width: 481px) and (max-width: 768px) {
  .activity-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Petit mobile : ≤ 480px */
@media (max-width: 480px) {
  /* .logo-sub conservé : les étoiles ★★★ restent visibles */

  .season-tabs { width: 100%; }
  .season-tab { flex: 1; justify-content: center; padding: 0.6rem 0.75rem; }

  .prestations-grid { grid-template-columns: repeat(2, 1fr); }

  /* Âges enfants : 1 colonne sur très petit mobile */
  #ages-container { grid-template-columns: 1fr; }
}

/* Grille des selects d'âge générés dynamiquement */
#ages-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* ----------------------------------------------------------------
   15. PREFERS-REDUCED-MOTION
   Désactive toutes les animations, parallax et marquee.
   La grille statique remplace le marquee animé.
---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  /* Désactive les transitions et animations globalement */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Hero : affichage immédiat sans animation */
  .hero-title,
  .hero-subtitle,
  .hero-cta,
  .hero-content {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* Parallax désactivé */
  .hero-bg { transform: none !important; will-change: auto; }

  /* Reveal : afficher immédiatement */
  .reveal { opacity: 1; transform: none; transition: none; }

  /* Galerie : pas de zoom hover */
  .gallery-item:hover .gallery-img { transform: none; }

  /* Marquee : masqué */
  .marquee-outer { display: none; }

  /* Grille statique : affichée à la place */
  .prestations-grid { display: grid; }

  /* Lightbox : transitions instantanées */
  .lightbox,
  .lightbox-img,
  .lightbox-close { transition: none !important; }
}

/* ----------------------------------------------------------------
   LIGHTBOX GALERIE
---------------------------------------------------------------- */

/* Curseur pointer sur les images zoomables */
.gallery-item--zoomable {
  cursor: zoom-in;
}

/* Overlay plein écran */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* État initial : invisible */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.lightbox[hidden] {
  display: none;
}

/* Quand ouverte */
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Fond assombri */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 5, 0.82);
  cursor: zoom-out;
}

/* Conteneur image centré */
.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(92vw, 1100px);
  max-height: 92dvh;
  transform: scale(0.94);
  transition: transform 0.3s var(--ease);
}

.lightbox.is-open .lightbox-inner {
  transform: scale(1);
}

/* Image agrandie */
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 90dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  /* Empêche le drag */
  user-select: none;
  -webkit-user-drag: none;
}

/* Bouton fermeture */
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 237, 228, 0.15);
  border: 1px solid rgba(245, 237, 228, 0.3);
  border-radius: 50%;
  color: var(--beige);
  cursor: pointer;
  transition: background-color var(--t-fast), transform var(--t-fast);
}

.lightbox-close:hover {
  background: rgba(245, 237, 228, 0.28);
  transform: scale(1.08);
}

.lightbox-close svg {
  width: 16px;
  height: 16px;
}

/* Mobile : bouton fermeture dans le coin supérieur droit de l'écran */
@media (max-width: 480px) {
  .lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
  }
}
