/* ============================================================
   COMPOSANTS — boutons, navigation, curseur, cartes, footer…
   ============================================================ */

/* ---- CURSEUR SUR-MESURE -------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--heartwood-lit);
  pointer-events: none; z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .45s var(--ease-out), height .45s var(--ease-out),
              background .3s, opacity .3s;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(202,139,61,.55);
  pointer-events: none; z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: width .55s var(--ease-out), height .55s var(--ease-out),
              border-color .35s, opacity .35s, background .35s;
}
body.cursor-hover .cursor-ring {
  width: 74px; height: 74px;
  border-color: rgba(202,139,61,.9);
  background: rgba(202,139,61,.1);
}
body.cursor-hover .cursor { width: 4px; height: 4px; }
.cursor-ring[data-label]::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--heartwood-lit);
  opacity: 0; transition: opacity .3s;
}
body.cursor-view .cursor-ring[data-label]::after { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none !important; }
}

/* ---- BOUTONS ------------------------------------------------- */
.btn {
  --_bg: var(--heartwood);
  --_fg: var(--linen);
  position: relative;
  display: inline-flex; align-items: center; gap: .7em;
  padding: 1.05em 2em;
  font-family: var(--font-body); font-weight: 600;
  font-size: var(--step--1); letter-spacing: .04em;
  color: var(--_fg); background: var(--_bg);
  border-radius: var(--radius-pill);
  overflow: hidden; isolation: isolate;
  transition: color .7s var(--ease-out), transform .5s var(--ease-out);
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--on-light);
  border-radius: inherit;
  transform: scale(0); transform-origin: bottom center;
  transition: transform .85s var(--ease-inout);
}
.btn:hover { color: var(--linen); }
.btn:hover::before { transform: scale(1.05); }
.btn .arrow { transition: transform .6s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  --_bg: transparent; --_fg: var(--on-dark);
  border: 1px solid var(--line);
}
.btn-ghost::before { background: var(--heartwood); }
.on-light .btn-ghost { --_fg: var(--ink); border-color: var(--line-dark); }
.on-light .btn-ghost:hover { color: var(--linen); }

.btn-lg { padding: 1.25em 2.5em; font-size: var(--step-0); }

/* lien-texte souligné animé */
.link-underline {
  position: relative; font-weight: 600; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: .5em;
  color: var(--accent-lit);
}
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .65s var(--ease-inout);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }
.link-underline .arrow { transition: transform .6s var(--ease-out); }
.link-underline:hover .arrow { transform: translateX(4px); }

/* ---- NAVIGATION ---------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--gutter);
  transition: background .7s var(--ease-out), padding .7s var(--ease-out),
              box-shadow .5s;
  mix-blend-mode: normal;
}
.nav.scrolled {
  background: rgba(11,36,48,.85);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  padding-block: .9rem;
  box-shadow: 0 1px 0 var(--line);
}
.nav-logo { display: flex; align-items: center; flex: none; }
/* Le logo d'origine est terracotta : illisible sur les hero sombres et sur le
   fond translucide de la nav. On le passe en blanc (même technique que le
   voile de chargement).

   L'ombre portée d'origine (6px, 45%) suffisait sur les hero sombres mais
   pas sur les photos claires — vue aérienne en plein soleil, piscine,
   ciel — où un logo blanc sur fond blanc disparaissait tout simplement.
   On empile deux ombres : une proche pour détacher le contour, une plus
   large et diffuse qui fait socle. Le poids reste invisible sur fond
   sombre et rend le logo lisible partout. */
.nav-logo-img {
  height: 45px; width: auto; display: block;
  filter: brightness(0) invert(1)
          drop-shadow(0 1px 3px rgba(11, 36, 48, .55))
          drop-shadow(0 4px 18px rgba(11, 36, 48, .45));
  transition: height .7s var(--ease-out);
}
.nav.scrolled .nav-logo-img { height: 38px; }

.nav-menu {
  display: flex; align-items: center; gap: clamp(.9rem, 1.9vw, 2rem);
  min-width: 0;
}
.nav-menu > a,
.nav-group-btn {
  font-family: inherit;
  font-size: var(--step--1); font-weight: 500; letter-spacing: .02em;
  color: var(--on-dark); opacity: .85; position: relative;
  padding-block: .3em; white-space: nowrap;
}
.nav-menu > a::after,
.nav-group-btn::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px;
  width: 100%; background: var(--accent-lit); transform: scaleX(0);
  transform-origin: right; transition: transform .6s var(--ease-inout);
}
.nav-menu > a:hover,
.nav-group-btn:hover { opacity: 1; }
.nav-menu > a:hover::after,
.nav-group-btn:hover::after { transform: scaleX(1); transform-origin: left; }

/* PAGE COURANTE — le trait d'un pixel en accent-lit (#AD5A31) sur un hero
   photographique sombre était pratiquement invisible : même épaisseur que
   l'animation de survol, et une teinte brique qui se noie dans l'image.
   On la marque sur TROIS canaux à la fois — couleur du texte, graisse et
   un trait de 2px en sable éclairé avec un halo — pour qu'elle se lise
   quelle que soit la photo derrière. */
.nav-menu > a[aria-current="page"],
.nav-group-btn[aria-current="true"] {
  opacity: 1; color: var(--sand); font-weight: 600;
}
.nav-menu > a[aria-current="page"]::after,
.nav-group-btn[aria-current="true"]::after {
  height: 2px; bottom: -2px; border-radius: 2px;
  background: var(--sand);
  box-shadow: 0 0 12px rgba(227, 167, 94, .55);
  transform: scaleX(1); transform-origin: left;
}
.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* ---- MENUS DÉROULANTS (Expériences · Activités) ---------------
   Deux regroupements font passer la barre de 10 à 8 entrées de premier
   niveau : c'est autant de place rendue au logo et au bouton Réserver,
   et la bascule vers le burger peut remonter de 1280 à 1100px. */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-group-btn {
  display: inline-flex; align-items: center; gap: .45em;
  background: none; border: 0; cursor: pointer;
}
.nav-caret { flex: none; transition: transform .4s var(--ease-out); opacity: .75; }
.nav-group.open .nav-caret { transform: rotate(180deg); }
/* pont invisible sous le bouton : la souris peut descendre vers le panneau
   sans traverser un vide qui refermerait le menu */
.nav-group::after {
  content: ""; position: absolute; top: 100%; left: -.6rem; right: -.6rem;
  height: 1.1rem; pointer-events: none;
}
.nav-group.open::after { pointer-events: auto; }

.nav-sub {
  position: absolute; top: calc(100% + 1rem); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 13.5rem; padding: .45rem;
  display: flex; flex-direction: column;
  background: rgba(11, 36, 48, .93);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden;
  transition: opacity .32s var(--ease-out), transform .32s var(--ease-out),
              visibility .32s;
}
.nav-sub::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(11, 36, 48, .93);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.nav-group.open .nav-sub {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-sub a {
  display: block; padding: .62em .95em; border-radius: calc(var(--radius-m) - 4px);
  font-size: var(--step--1); font-weight: 500; letter-spacing: .015em;
  color: var(--on-dark); opacity: .85; white-space: nowrap;
  transition: background .3s var(--ease-out), opacity .3s, color .3s;
}
.nav-sub a:hover, .nav-sub a:focus-visible {
  opacity: 1; background: rgba(251, 248, 240, .09);
}
.nav-sub a[aria-current="page"] {
  opacity: 1; color: var(--sand); font-weight: 600;
  background: rgba(227, 167, 94, .12);
}

.nav-burger { display: none; width: 34px; height: 20px; position: relative; }
/* Le trait mesure 34×20 : bien en dessous des 44px de cible tactile.
   On élargit la zone cliquable sans déplacer les barres (elles sont en
   position absolue, un padding les aurait décalées). */
.nav-burger::after { content: ""; position: absolute; inset: -12px; }
.nav-burger span {
  position: absolute; left: 0; width: 100%; height: 1.5px;
  background: var(--on-dark); transition: transform .6s var(--ease-inout), opacity .4s;
}
.nav-burger span:nth-child(1) { top: 2px; }
.nav-burger span:nth-child(2) { top: 9px; }
.nav-burger span:nth-child(3) { top: 16px; }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* menu plein écran (mobile)
   Le menu compte 10 entrées, plus le pied de contact, plus le cluster
   de préférences qui redescend ici sous 1080px. Avec `justify-content:
   center` et aucun défilement, tout ce qui dépassait était rogné EN HAUT
   ET EN BAS — les premières entrées devenaient inatteignables sur un
   téléphone court, et en paysage le menu était inutilisable.
   Correctif : on défile quand ça déborde, on centre quand ça tient
   (marges automatiques sur le premier/dernier enfant — contrairement à
   `justify-content: center`, elles ne rognent jamais le débordement). */
.nav-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--canopy-800);
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: var(--gutter);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  clip-path: circle(0% at calc(100% - 3rem) 3rem);
  transition: clip-path 1s var(--ease-inout);
  pointer-events: none;
}
.nav-overlay > :first-child { margin-top: auto; }
.nav-overlay > :last-child { margin-bottom: auto; }
body.menu-open .nav-overlay {
  clip-path: circle(150% at calc(100% - 3rem) 3rem);
  pointer-events: auto;
}
.nav-overlay ol { display: flex; flex-direction: column; gap: .2em; counter-reset: m; }
.nav-overlay ol > li { counter-increment: m; }
.nav-overlay a,
.nav-ov-head {
  font-family: var(--font-display);
  /* Taille pilotée par la LARGEUR *et* la HAUTEUR : `--step-4` seul
     ignorait la hauteur disponible, or ce sont 8 entrées empilées dont
     deux dépliées. `vh` fait tenir la liste sur un téléphone court et
     en paysage. */
  font-size: clamp(1.3rem, min(6.4vw, 4.6vh), 4.2rem);
  color: var(--on-dark); display: inline-flex; align-items: baseline; gap: .5em;
  /* cible tactile confortable même quand la police se resserre */
  min-height: 44px; align-content: center;
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), color .4s;
}
.nav-overlay a:hover { color: var(--accent-lit); }
.nav-overlay ol > li > a::before,
.nav-ov-head::before {
  content: "0" counter(m);
  font-family: var(--font-body); font-size: .28em; font-weight: 600;
  letter-spacing: .1em; color: var(--accent); opacity: .8;
}
body.menu-open .nav-overlay a,
body.menu-open .nav-ov-head { opacity: 1; transform: none; }

/* Regroupement dans le menu plein écran : l'intitulé porte le numéro et
   n'est pas cliquable (il n'a pas de page à lui) ; ses deux destinations
   se lisent en dessous, en retrait et plus petites. */
.nav-ov-group { display: flex; flex-direction: column; }
.nav-ov-head { color: var(--on-dark-soft); cursor: default; }
.nav-ov-sub {
  display: flex; flex-wrap: wrap; gap: .2em 1.6em;
  padding-left: 2.1em; margin-top: -.1em;
}
.nav-ov-sub a {
  font-size: clamp(.95rem, min(3.6vw, 2.5vh), 1.7rem);
  color: var(--on-dark-soft);
}
.nav-ov-sub a::before {
  content: "—"; font-family: var(--font-body); font-size: .55em;
  color: var(--accent); opacity: .7;
}
/* cadence d'entrée : une marche par entrée de premier niveau (8 depuis
   les regroupements) — les sous-liens suivent leur intitulé */
.nav-overlay li:nth-child(1) :is(a, .nav-ov-head) { transition-delay: .25s; }
.nav-overlay li:nth-child(2) :is(a, .nav-ov-head) { transition-delay: .31s; }
.nav-overlay li:nth-child(3) :is(a, .nav-ov-head) { transition-delay: .37s; }
.nav-overlay li:nth-child(4) :is(a, .nav-ov-head) { transition-delay: .43s; }
.nav-overlay li:nth-child(5) :is(a, .nav-ov-head) { transition-delay: .49s; }
.nav-overlay li:nth-child(6) :is(a, .nav-ov-head) { transition-delay: .55s; }
.nav-overlay li:nth-child(7) :is(a, .nav-ov-head) { transition-delay: .61s; }
.nav-overlay li:nth-child(8) :is(a, .nav-ov-head) { transition-delay: .67s; }
.nav-overlay-foot {
  margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: 2rem;
  color: var(--on-dark-soft); font-size: var(--step--1);
}

/* ---- FOOTER -------------------------------------------------- */
.footer { background: var(--bark); color: var(--on-dark); padding-block: var(--space-2xl) var(--space-l); }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--gutter); padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--line);
}
.footer-brand h3 { font-size: var(--step-3); margin-bottom: .4em; }
.footer-brand p { color: var(--on-dark-soft); max-width: 34ch; font-size: var(--step--1); }
.footer-col h4 {
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent-lit);
  margin-bottom: 1.4em;
}
.footer-col ul { display: flex; flex-direction: column; gap: .85em; }
.footer-col a, .footer-col address {
  color: var(--on-dark-soft); font-size: var(--step--1); font-style: normal;
  transition: color .3s; line-height: 1.5;
}
.footer-col a:hover { color: var(--on-dark); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; padding-top: var(--space-m);
  font-size: var(--step--1); color: var(--on-dark-soft);
}
/* Les liens légaux vivent au milieu du bas de page : ni noyés dans les
   colonnes de contenu, ni relégués après les réseaux sociaux — c'est là
   qu'un visiteur les cherche, et là que la loi veut qu'ils soient
   atteignables depuis n'importe quelle page. */
.footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.footer-legal a, .footer-legal .consent-reopen { transition: color .3s; }
.footer-legal a:hover, .footer-legal .consent-reopen:hover { color: var(--accent-lit); }

.footer-socials { display: flex; gap: 1.2rem; }
.footer-socials a { transition: color .3s; }
.footer-socials a:hover { color: var(--accent-lit); }

/* Le pied de page n'avait AUCUNE règle responsive : ses quatre colonnes
   (1.4fr 1fr 1fr 1fr) tenaient jusqu'à 320px de large, soit ~60px par
   colonne — les libellés se brisaient lettre à lettre. */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: var(--space-l); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 48ch; }
}
@media (max-width: 540px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-col h4 { margin-bottom: 1em; }
}
/* les liens du pied doivent rester des cibles tactiles au doigt */
@media (hover: none), (pointer: coarse) {
  .footer-col a { display: inline-flex; align-items: center; min-height: 40px; }
  .footer-socials { gap: 1.6rem; }
  .footer-socials a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-legal { gap: 1.6rem; }
  .footer-legal a, .footer-legal .consent-reopen { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---- MARQUEE ------------------------------------------------- */
.marquee { overflow: hidden; padding-block: var(--space-l); border-block: 1px solid var(--line-dark); }
.marquee-track {
  display: flex; gap: 3rem; width: max-content;
  animation: marquee 55s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-size: var(--step-3);
  color: var(--on-light); opacity: .38; display: inline-flex; align-items: center; gap: 3rem;
}
.marquee-track span::after { content: "✦"; font-size: .5em; color: var(--accent); opacity: .9; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- PUCES / TAGS ------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: var(--step--1); font-weight: 600; letter-spacing: .04em;
  padding: .5em 1em; border: 1px solid var(--line);
  border-radius: var(--radius-pill); color: var(--on-dark-soft);
}
.on-light .tag { border-color: var(--line-dark); color: var(--on-light-soft); }

/* ---- FILET DÉCORATIF (grain de bois) ------------------------ */
.woodgrain { display: block; width: 100%; height: auto; opacity: .5; }

/* ---- RIDEAU DE CHARGEMENT / TRANSITION DE PAGE ---------------- */
.page-veil {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--atlantide-deep);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity .7s var(--ease-inout);
}
.page-veil img { height: 42px; width: auto; filter: brightness(0) invert(1); animation: veilPulse 1.5s ease-in-out infinite; }
.page-veil.veil-out { opacity: 0; pointer-events: none; }
.page-veil.veil-in { opacity: 0; }
.page-veil.veil-in.show { opacity: 1; }
@keyframes veilPulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .page-veil { transition: none; }
  .page-veil img { animation: none; }
}

/* ---- GRAIN FILMIQUE (texture resort, discrète et globale) ---- */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* ---- COLORIMÉTRIE UNIFIÉE DES PHOTOS (grade chaud "resort") -- */
.hero-media img, .page-hero .media img, .exp .media img, .cta-band .media img,
.room-row .media img, .package .media img, .tour-card .media img,
.gallery img, .figure img, .detail-gallery img, .event-item .media img {
  filter: saturate(1.08) contrast(1.05) brightness(.98) sepia(.05);
}
