/* ════════════════════════════════════════════════════════════
   The Lys Spa — Correctifs mobile & composants partagés
   Chargé EN DERNIER dans le <head> : gagne par ordre de cascade
   à spécificité égale. 80% des clientes sont sur téléphone.
   ════════════════════════════════════════════════════════════ */

/* ── GLOBAL (tous écrans) ───────────────────────────────────── */

/* Empêche iOS d'agrandir/rétrécir le texte de façon imprévisible */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Éléments mobiles injectés par i18n.js : masqués par défaut (desktop).
   La media query ≤640px les rallume. */
.m-nav,
.m-menu,
.m-menu-overlay { display: none; }

/* Curseur custom actif (classe posée sur <html> par le JS, desktop non
   tactile uniquement) : masquer le curseur natif sur TOUS les éléments,
   sinon les liens/boutons réaffichent la main (cursor:pointer). */
html.cur-none, html.cur-none * { cursor: none !important; }

/* ── ACCESSIBILITÉ ──────────────────────────────────────────── */

/* Navigation clavier : contour doré visible sur l'élément focusé.
   :focus-visible ne s'affiche qu'au clavier (pas au clic souris). */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold, #B8965A) !important;
  outline-offset: 3px;
}

/* Réduction des animations (réglage système des personnes sensibles
   au mouvement) : tout passe en quasi-instantané. Les animations
   `forwards` sautent à leur état final, les `infinite` (marquee,
   particules) s'arrêtent après 1 itération. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto !important; }
  /* Pas de curseur custom (l'anneau qui suit la souris = mouvement) */
  .cur-dot, .cur-ring, .cursor-dot, .cursor-ring { display: none !important; }
  body { cursor: auto !important; }
  html.cur-none, html.cur-none * { cursor: auto !important; }
}

/* Curseur custom (dot + ring) : JAMAIS sur mobile/tactile.
   Corrige aussi un bug des pages apropos/contact/tarifs dont la règle
   ≤640px masquait .cursor-dot/.cursor-ring alors que les éléments
   s'appellent .cur-dot/.cur-ring. */
@media (max-width: 640px), (hover: none), (pointer: coarse) {
  .cur-dot, .cur-ring, .cursor-dot, .cursor-ring { display: none !important; }
  body { cursor: auto !important; }
}

/* Sélecteur de langue dans le pied de page (visible sur tous les écrans) */
.f-lang {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px;
}
.f-lang-label {
  font-size: 9px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted, #8a7c6a); font-family: 'Jost', sans-serif;
}

/* Lien « Conditions générales » dans la ligne de copyright du pied de page */
.f-copy a {
  color: var(--gold, #B8965A); text-decoration: none; transition: color .2s;
}
.f-copy a:hover { color: var(--beige, #E8D4B0); }

/* Emplacement photo réutilisable : cadre vide élégant aux couleurs
   de la DA, en attendant les vraies photos de la cliente.
   Usage : <div class="photo-slot" data-photo="Légende facultative"></div>
   Variantes de ratio : .photo-slot--wide / --portrait / --square */
.photo-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 120% at 50% 35%, rgba(184,150,90,.06), transparent 60%),
    linear-gradient(135deg, #0d0a0b 0%, #14100f 100%);
  border: 1px solid rgba(184,150,90,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo-slot--wide     { aspect-ratio: 16 / 9; }
.photo-slot--portrait { aspect-ratio: 3 / 4; }
.photo-slot--square   { aspect-ratio: 1 / 1; }

/* Coins dorés discrets : signale un cadre « en attente d'image » */
.photo-slot::before,
.photo-slot::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid rgba(184,150,90,.45);
}
.photo-slot::before { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.photo-slot::after  { bottom: 14px; right: 14px; border-left: none; border-top: none; }

/* Libellé central (icône + texte data-photo) */
.photo-slot > .photo-slot-label,
.photo-slot[data-photo]::placeholder { display: none; }
.photo-slot-inner {
  text-align: center;
  color: rgba(184,150,90,.55);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  pointer-events: none;
  padding: 0 16px;
}
.photo-slot-inner svg { display: block; margin: 0 auto 10px; opacity: .6; }

/* Quand une vraie <img> est posée dans le slot, elle remplit le cadre
   et masque la décoration d'attente. */
.photo-slot > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-slot:has(> img)::before,
.photo-slot:has(> img)::after,
.photo-slot:has(> img) .photo-slot-inner { display: none; }


/* Section galerie « Nos espaces » : grille d'emplacements photo */
.sec-gallery { padding: 120px 64px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 56px;
}
@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ── MOBILE ≤ 640px ─────────────────────────────────────────── */
@media (max-width: 640px) {

  .sec-gallery { padding: 80px 20px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Hero : en plein écran (100vh) il laisse de grands vides haut/bas.
     On le ramène à la hauteur de son contenu + marges confortables. */
  .hero {
    height: auto !important;
    min-height: 0 !important;
    padding: 96px 0 72px;
  }


  /* 1. CIBLES TACTILES ≥ 44px (recommandation Apple/WCAG) ─────── */

  /* Sélecteur de langue (injecté par i18n.js APRÈS ce fichier →
     on force avec !important pour gagner la cascade) */
  .lang-switch { gap: 2px !important; }
  .lang-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 13px !important;
    padding: 0 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .lang-sep { font-size: 13px !important; }

  /* Steppers du tunnel de réservation (−/+ personnes & enfants) :
     34px → 44px. C'est le chemin qui rapporte de l'argent. */
  .s1b-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
  }

  /* Liens & boutons de pied de page : zone tactile confortable.
     (La nav mobile est gérée par .m-nav ci-dessous.) */
  .f-col a, .f-social a, .back-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .f-col li { margin-bottom: 4px; }

  /* ── NAV MOBILE : Réserver (gauche) · logo (centre) · ☰ (droite) ──
     On masque la nav desktop et on affiche la barre injectée .m-nav. */
  nav > .nav-links,
  nav > .nav-logo,
  nav > .nav-right { display: none !important; }

  /* La barre reste épinglée en haut pendant tout le scroll.
     La page met nav en `sticky`, mais body{overflow-x:hidden} casse
     le sticky (body devient conteneur de défilement) → on force `fixed`,
     qui se positionne par rapport au viewport quoi qu'il arrive.
     :not(.m-menu-links) → ne pas arracher le <nav> interne du menu. */
  nav:not(.m-menu-links) {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    z-index: 500 !important;
    transform: none !important;
    padding: 12px 16px !important;
  }

  .m-nav {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 10px;
  }
  .m-nav-book {
    font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--beige-light, #E8D4B0); background: var(--wine, #8C1E30);
    padding: 0 16px; min-height: 40px; text-decoration: none;
    white-space: nowrap; display: inline-flex; align-items: center;
    flex-shrink: 0;
    transition: background .25s, color .25s;
  }
  /* « Réserver » mobile : doré au survol et au clic */
  .m-nav-book:hover, .m-nav-book:active {
    background: var(--gold-light, #D4AF71); color: var(--bg, #070506);
  }
  .m-nav-logo { text-align: center; text-decoration: none; flex: 1; }
  .m-nav-logo-main {
    font-family: var(--ff-d, 'Cormorant Garamond', serif);
    font-size: 19px; font-weight: 300; letter-spacing: .1em;
    color: var(--cream, #F5EDE0); display: block;
    white-space: nowrap; line-height: 1.05;
  }
  .m-nav-logo-sub {
    font-size: 7px; letter-spacing: .26em; text-transform: uppercase;
    color: var(--gold, #B8965A); display: block; margin-top: 2px;
    white-space: nowrap;
  }
  .m-nav-burger {
    background: none; border: none; cursor: pointer; padding: 10px;
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; flex-direction: column; justify-content: center;
    align-items: flex-end; gap: 5px;
  }
  .m-nav-burger span {
    display: block; width: 24px; height: 1.5px;
    background: var(--cream, #E8D4B0); transition: .3s;
  }
  .m-nav-burger span:nth-child(2) { width: 18px; }

  /* Panneau menu plein écran (glisse depuis la droite) */
  .m-menu-overlay {
    display: block; position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,.6); opacity: 0; pointer-events: none;
    transition: opacity .3s;
  }
  .m-menu-overlay.open { opacity: 1; pointer-events: auto; }
  /* Masquer la barre nav (logo/réserver/burger) quand le menu est ouvert
     pour éviter qu'elle ne transparaisse derrière le panneau. */
  body.m-menu-is-open nav:not(.m-menu-links) { opacity: 0 !important; pointer-events: none !important; }
  .m-menu {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 9001;
    width: 82%; max-width: 330px;
    background: var(--bg-2, #0d0a0b);
    border-left: 1px solid var(--border, rgba(184,150,90,.2));
    padding: 76px 32px 40px;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.76,0,.24,1);
    box-shadow: -24px 0 70px rgba(0,0,0,.55);
  }
  .m-menu.open { transform: translateX(0); }
  .m-menu-close {
    position: absolute; top: 22px; right: 22px;
    background: none; border: none; color: var(--gold, #B8965A);
    font-size: 34px; line-height: 1; cursor: pointer;
    width: 44px; height: 44px;
  }
  .m-menu-brand {
    font-family: var(--ff-d, 'Cormorant Garamond', serif);
    font-size: 24px; font-weight: 300; letter-spacing: .12em;
    color: var(--cream, #F5EDE0); margin-bottom: 8px;
  }
  .m-menu-brand-sub {
    font-size: 8px; letter-spacing: .38em; text-transform: uppercase;
    color: var(--gold, #B8965A); margin-bottom: 40px;
  }
  .m-menu-links { display: flex; flex-direction: column; }
  .m-menu-links a {
    font-family: var(--ff-d, 'Cormorant Garamond', serif);
    font-size: 22px; font-weight: 300; letter-spacing: .03em;
    color: var(--beige, #E8D4B0); text-decoration: none;
    padding: 16px 0; border-bottom: 1px solid rgba(184,150,90,.12);
    display: flex; align-items: center;
  }
  .m-menu-links a:active { color: var(--gold, #B8965A); }
  .m-menu-lang {
    margin-top: auto; padding-top: 32px;
    display: flex; align-items: center; gap: 10px;
  }
  .m-menu-lang-label {
    font-size: 8px; letter-spacing: .3em; text-transform: uppercase;
    color: var(--muted, #8a7c6a);
  }


  /* 2. LISIBILITÉ DU TEXTE DE LECTURE (pas les labels décoratifs) ─ */

  /* Champs de formulaire ≥ 16px : empêche le zoom auto d'iOS au focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Descriptions / paragraphes de contenu : plancher confortable */
  .svc-desc        { font-size: 13px !important; opacity: .72 !important; }
  .payment-note,
  .night-text p,
  .persons-price-label { font-size: 13px !important; }
  .f-brand-desc    { font-size: 14px !important; }
  .f-col a, .f-col span { font-size: 14px; }
  .f-copy          { font-size: 12px; }


  /* 3. TABLEAU TARIFS → CARTES EMPILÉES (pas de scroll horizontal) ─
     Le scroll horizontal donne l'impression d'un site « cassé ». */
  .table-wrap {
    overflow-x: visible !important;
    width: 100%;
  }
  .price-table {
    min-width: 0 !important;
    width: 100%;
    display: block;
    font-size: 14px;
  }
  .price-table thead { display: none; }
  .price-table tbody { display: block; }

  .price-table tr {
    display: block;
    border: 1px solid rgba(184,150,90,.20);
    margin-bottom: 16px;
    padding: 4px 18px 14px;
    background: rgba(255,255,255,.015);
  }
  .price-table tr.row-highlight {
    border-color: var(--wine, #8C1E30);
    background: rgba(140,30,48,.08);
  }

  /* Cellule durée = titre de la carte */
  .price-table td.td-dur {
    display: block;
    font-size: 22px;
    color: var(--beige, #E8D4B0);
    padding: 14px 0 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(184,150,90,.22);
  }
  .price-table td.td-dur small { font-size: 14px; opacity: .7; }

  /* Chaque ligne prix : libellé de colonne à gauche, prix à droite */
  .price-table td.td-price-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid rgba(184,150,90,.10);
    text-align: right;
  }
  .price-table tr td.td-price-cell:last-child { border-bottom: none; }
  .price-table td.td-price-cell::before {
    content: attr(data-label);
    flex: 1;
    margin-right: 16px;
    text-align: left;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted, #8a7c6a);
    font-weight: 400;
  }
  .price-table td.td-price-cell .price-val { font-size: 20px; }
  .price-table td.td-price-cell .price-val.featured-val { font-size: 22px; }
  .price-table td.td-price-cell .price-val small { font-size: 12px; }

  /* badge "Populaire" reste lisible dans le titre de carte */
  .price-table .badge { font-size: 9px; }
}
