/* ════════════════════════════════════════════════════════════════════
   Le Mas de l'Helvie — style.css
   Feuille de style partagée (toutes pages)
   Palette : olive #4C462E | olive-light #DBD2AA | white #FFFFFF
   Typographie : Cormorant Garamond (display) + Raleway (body)

   ÉCHELLE TYPOGRAPHIQUE FLUIDE :
   Principe : clamp(min, pref_vw, max)
   Les préférences vw sont calibrées sur 1440px (desktop typique)
   pour que le rendu soit élégant sans être excessif.
════════════════════════════════════════════════════════════════════ */

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

:root {
  --olive:        #4C462E;
  --olive-light:  #DBD2AA;
  --olive-pale:   #F5F2EA;
  --white:        #FFFFFF;
  --text-dark:    #2E2B1E;
  --text-mid:     #6B6349;

  --font-display: 'Gowun Batang', Georgia, serif;  /* titres, menus */
  --font-body:    'Inter', system-ui, Arial, sans-serif;

  /* Échelle typographique — mesurée pixel par pixel sur les maquettes SVG (1728px canvas)
     Inter : corps, sous-titres, labels | Gowun Batang : titres, menus          */
  --text-xs:       clamp(0.48rem,  0.97vw, 0.9rem);   /* labels, tags, uppercase — 14px */
  --text-sm:       clamp(0.62rem,  1.25vw, 1.1rem);   /* footer contact, body 2 — 18px  */
  --text-base:     clamp(1.24rem,  2.50vw, 2.2rem);   /* corps Inter — 36px à 1440px    */
  --text-md:       clamp(1.03rem,  2.08vw, 1.9rem);   /* sous-titres, CTA, nav — 30px   */
  --text-lg:       clamp(1.79rem,  3.61vw, 3.2rem);   /* intro gîte — 52px              */
  --text-xl:       clamp(2.48rem,  5.00vw, 4.5rem);   /* h2 sections — 72px à 1440px    */
  --text-2xl:      clamp(3.09rem,  6.25vw, 5.6rem);   /* h1 gîte — 90px                 */
  --text-hero:     clamp(4.47rem,  9.03vw, 8.1rem);   /* hero h1 — 130px                */
  --text-hero-sub: clamp(1.89rem,  3.82vw, 3.4rem);   /* hero subtitle — 55px           */
  --text-gites:    clamp(2.75rem,  5.56vw, 5.0rem);   /* section gîtes — 80px           */
  --text-galerie:  clamp(2.23rem,  4.51vw, 4.1rem);   /* GALERIE — 65px                 */

  /* Espacements horizontaux responsive */
  --px:    clamp(1.25rem, 5vw, 5rem);
  --px-sm: clamp(1rem, 3vw, 3rem);

  /* Transitions */
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }

/* ── HEADER ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 12px rgba(76,70,46,.08);
  /* SVG: 252px sur 1728px canvas = 14.6% → garde proportion */
  height: clamp(72px, 10vw, 130px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--px);
}

.site-header__spacer { display: block; }

.site-header__logo { justify-self: center; }

.site-header__logo img {
  height: clamp(48px, 6.5vw, 95px);
  width: auto;
}

.site-header__lang {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__lang a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  padding: 0.1rem 0.2rem;
  transition: opacity var(--transition);
  text-underline-offset: 3px;
}
.site-header__lang a.active { text-decoration: underline; }
.site-header__lang a:hover  { opacity: 0.5; }

/* Hamburger — visible < 640px */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  justify-self: end;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--olive);
  margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}

/* Menu mobile */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--olive);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.mobile-menu.is-open { display: flex; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 300;
  color: var(--olive-light);
  letter-spacing: 0.08em;
  transition: opacity var(--transition);
}
.mobile-menu a:hover { opacity: 0.7; }
.mobile-menu a.active { text-decoration: underline; text-underline-offset: 4px; }

.mobile-menu__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--olive-light);
  font-size: 2rem;
  line-height: 1;
  padding: 0.5rem;
}

/* ── BOUTONS ────────────────────────────────────────────────────── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-md);
  letter-spacing: 0.06em;
  color: var(--olive-light);
  border: 1px solid var(--olive-light);
  padding: clamp(0.7rem, 1.2vw, 1rem) clamp(2rem, 3.5vw, 3.5rem);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  background: transparent;
  white-space: nowrap;
}
.btn-outline:hover {
  background: var(--olive-light);
  color: var(--olive);
}
.btn-outline--dark {
  color: var(--olive);
  border-color: var(--olive);
}
.btn-outline--dark:hover {
  background: var(--olive);
  color: var(--white);
}

/* ── HERO (page d'accueil) ─────────────────────────────────────── */
.hero {
  position: relative;
  height: clamp(400px, 52vw, 860px);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 45%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--olive);
  opacity: 0.49;
}
.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 var(--px);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-hero);  /* 7.52vw = 130px SVG */
  line-height: 1;
  letter-spacing: 0.03em;
}
.hero__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 3.18vw, 2.8rem);  /* hero subtitle — 55px SVG */
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

/* ── PRÉSENTATION (accueil) ────────────────────────────────────── */
.section-presentation {
  display: grid;
  grid-template-columns: 49.5% 1fr;
}
.section-presentation__image {
  overflow: hidden;
  min-height: clamp(300px, 45vw, 800px);
}
.section-presentation__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.section-presentation__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 7rem) clamp(2rem, 4.5vw, 6rem);
}
.section-presentation__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);  /* 72px at 1440px */
  line-height: 1.2;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}
.section-presentation__body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-base);  /* 36px at 1440px */
  line-height: 1.75;
}
.section-presentation__body p + p { margin-top: 1rem; }

/* ── GÎTES (section fond olive, accueil) ───────────────────────── */
.section-gites {
  background: var(--olive);
  padding: clamp(3rem, 5.5vw, 7rem) var(--px);
}
.section-gites__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  color: var(--olive-light);
  text-align: center;
  letter-spacing: 0.03em;
  margin-bottom: clamp(2rem, 4.5vw, 5.5rem);
}
.gites-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2.5vw, 2.5rem);
  max-width: 1440px;
  margin: 0 auto;
}
.gite-card { text-align: center; }
.gite-card__link {
  display: block;
  overflow: hidden;
  aspect-ratio: 461 / 690;
}
.gite-card__link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gite-card:hover .gite-card__link img { transform: scale(1.04); }
.gite-card__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-light);
  margin-top: 1.25rem;
}
.section-gites__cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.5rem, 4.5vw, 5rem);
}

/* ── PROXIMITÉ (accueil) ────────────────────────────────────────── */
.section-proximite {
  padding: clamp(3.5rem, 6vw, 8rem) var(--px);
  text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.section-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-base);  /* 36px at 1440px */
  line-height: 1.75;
  max-width: 860px;
  margin: 0 auto;
}

/* ── GALERIE PLAN (accueil) ────────────────────────────────────── */
.section-gallery {
  margin: 0 auto;
  max-width: 900px;
  padding: clamp(0.5rem, 2vw, 2rem) var(--px-sm);
  overflow: hidden;
  border-radius: 3px;
}
.section-gallery img { width: 100%; height: auto; }

/* ── IMMERSION (accueil) ───────────────────────────────────────── */
.section-immersion {
  display: grid;
  grid-template-columns: 50.8% 1fr;
}
.section-immersion__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 5.5vw, 8rem) clamp(2rem, 4.5vw, 6rem);
}
.section-immersion__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: 2rem;
}
.section-immersion__body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-base);
  line-height: 2;
  margin-bottom: 2.5rem;
}
.section-immersion__image {
  overflow: hidden;
  min-height: clamp(380px, 52vw, 860px);
}
.section-immersion__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ── FOOTER ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--olive);
  padding: clamp(2.5rem, 4vw, 5rem) var(--px) clamp(1.5rem, 2.5vw, 3rem);
  color: var(--olive-light);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo img {
  height: clamp(48px, 6.5vw, 90px);
  width: auto;
  margin-bottom: 1.5rem;
}
.footer-contact-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.footer-contact-info a,
.footer-contact-info p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--olive-light);
  line-height: 1.8;
}
.footer-contact-info a:hover { text-decoration: underline; }
.footer-center {
  text-align: center;
  align-self: flex-end;
}
.footer-copyright {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.05em;
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
}
.footer-nav a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-md);
  line-height: 2;
  transition: opacity var(--transition);
}
.footer-nav a:hover { opacity: 0.65; }
.footer-social img {
  height: clamp(26px, 3vw, 50px);
  width: auto;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .section-presentation,
  .section-immersion {
    grid-template-columns: 1fr;
  }
  .section-presentation__image {
    min-height: clamp(220px, 42vw, 480px);
  }
  .section-immersion__image {
    min-height: clamp(260px, 48vw, 500px);
    aspect-ratio: 16/9;
    height: auto;
    order: 1;
  }
  .gites-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header__lang { display: none; }
  .hamburger { display: block; }

  .section-presentation__image { display: none; }

  .gites-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }

  .footer-top { grid-template-columns: 1fr; }
  .footer-top { text-align: center; }
  .footer-center { order: 3; text-align: center; }
  .footer-right { align-items: center; order: 2; }
  .footer-nav { align-items: center; }
  .footer-left { display: flex; flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gite-card__link img,
  .carousel__slide { transition: none; }
}

/* ════════════════════════════════════════════════════════════════
   ACCESSIBILITÉ — WCAG 2.1 AA
   Ajouts non-destructifs : n'écrase aucun style existant.
════════════════════════════════════════════════════════════════ */

/* ── 1. LIEN D'ÉVITEMENT [2.4.1 — A] ──────────────────────────
   Invisible par défaut, visible au focus clavier uniquement.
   Positionné avant le header dans le flux DOM.
── */
.skip-link {
  /* Invisible par défaut — visible UNIQUEMENT au focus clavier */
  position: fixed;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--olive);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  white-space: nowrap;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  outline: 3px solid var(--olive-light);
  outline-offset: 2px;
}

/* ── 3. FOCUS VISIBLE [2.4.11 — AA] ───────────────────────────
   Anneau de focus cohérent sur toutes les surfaces.
   Utilise :focus-visible pour ne pas affecter les clics souris.
   Deux variantes : fond clair (défaut) et fond sombre (olive).
── */

/* Suppression explicite du reset navigateur si présent */
:focus { outline: none; }

/* Anneau principal — sur fond clair */
:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Sur fond olive (footer, section-gites, olive section) */
.site-footer :focus-visible,
.section-gites :focus-visible,
.gite-olive :focus-visible,
.mobile-menu :focus-visible {
  outline-color: var(--white);
  outline-offset: 3px;
}

/* Hero : fond sombre avec overlay */
.hero :focus-visible {
  outline-color: var(--olive-light);
  outline-offset: 3px;
}

/* Boutons et liens du header : anneau sous le texte */
.site-header__lang a:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
  border-radius: 1px;
  opacity: 1; /* annuler l'opacity réduite */
}

/* Cartes gîtes (liens avec image) */
.gite-card__link:focus-visible {
  outline: 3px solid var(--olive-light);
  outline-offset: 4px;
}

/* Boutons carrousel */
.carousel__btn:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
}

/* Bouton hamburger */
.hamburger:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ── 4. CONTRASTE FOOTER — vérification ───────────────────────
   olive-light (#DBD2AA) sur olive (#4C462E) = 6.21:1 → PASS ✓
   Le contraste est déjà conforme. Seul le weight passe à 400
   pour améliorer la lisibilité (inchangé visuellement).
── */
.footer-nav a {
  font-weight: 400; /* était 300 → meilleure lisibilité, ratio inchangé */
}

/* ── 5. LANGUE ACTIVE — indicateur visuel renforcé ────────────
   aria-current="page" est ajouté en PHP.
   CSS : underline + bold pour la langue active.
── */
.site-header__lang a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mobile-menu a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── 14. CIBLES TACTILES [2.5.5 — AA] ─────────────────────────
   Zone de clic minimale 44×44px via padding étendu.
   La taille visuelle reste identique.
── */
.site-header__lang a {
  /* Remplace padding: 0.1rem 0.2rem */
  padding: 0.6rem 0.4rem;
  /* Annule le décalage vertical introduit */
  line-height: 1;
}

.hamburger {
  /* Minimum 44× 44px [WCAG 2.5.5] — display géré par le breakpoint 640px */
  min-width: 44px;
  min-height: 44px;
  /* Pas de display:flex ici — évite d’écraser display:none desktop */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* Quand visible (mobile), centrer les spans */
@media (max-width: 640px) {
  .hamburger {
    display: flex;
  }
}

.carousel__btn {
  /* Déjà clamp(36px, 3.5vw, 52px) — OK sur desktop,
     s'assurer du min 44px sur mobile */
  min-width: 44px;
  min-height: 44px;
}

.mobile-menu__close {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── REDUCED MOTION [2.3.1 — A] ───────────────────────────────
   Compléter la règle existante : couvrir toutes les transitions.
── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Exception : keep visibility-affecting transitions (focus, skip-link) */
  .skip-link {
    transition: none;
  }
}

/* ── SR-ONLY UTILITY ───────────────────────────────────────────
   Texte lisible par les AT uniquement (non visible à l'écran).
   Utilisé pour les labels contextuels additionnels.
── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Version focusable (pour skip-links additionnels) */
.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ── CARROUSEL — LIVE REGION ───────────────────────────────────
   Région d'annonce pour les AT : invisible mais lue.
── */
.carousel__announce {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── LIENS SOCIAUX SVG (footer) [WCAG 1.1.1 / 2.5.5 / 1.4.11] ──
   Remplacement de l'image composite par deux liens SVG séparés.
   Couleur : olive-light sur fond olive → contraste 6.21:1 ✓
── */
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--olive-light);
  /* Cible tactile ≥ 44px [WCAG 2.5.5] */
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}
.footer-social__link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.footer-social__link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* ── figure.section-gallery [sémantique 1.3.1] ──────────────────
   Remplace le <div> précédent — display inchangé visuellement.
── */
figure.section-gallery {
  display: block;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════════
   FONT FALLBACK METRICS — élimine le layout shift au chargement
   Gowun Batang → Georgia | Inter → Arial
════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Gowun Batang';
  src: local('Georgia');
  font-style: normal;
  font-weight: 400 700;
  ascent-override:  95%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 103%;
}

@font-face {
  font-family: 'Inter';
  src: local('Arial');
  font-style: normal;
  font-weight: 300 400;
  ascent-override:  90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 96%;
}
