/* ═══════════════════════════════════════════════════════════════════
   Chalet Renaud · Alpe d'Huez
   Direction : la photo d'abord. Typographie éditoriale (Bodoni Moda en
   titrage, Archivo en texte), palette froide d'altitude, un seul accent
   — tout le reste s'efface derrière les images.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Couleurs — les NOMS sont stables : conditions.html s'en sert aussi. */
  --bg:      #fbfbf9;   /* papier, neutre très légèrement froid */
  --panel:   #ffffff;
  --fg:      #15181b;   /* encre, noir bleuté */
  --muted:   #6c7378;
  --line:    #e4e5e1;
  --accent:  #1d4e53;   /* vert glacier profond */
  --accent-dark: #143a3e;
  --dark:    #11161a;

  /* Typographie */
  --display: 'Bodoni Moda', 'Didot', Georgia, serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Rythme */
  --gutter: 24px;
  --measure: 1240px;
  --section: clamp(64px, 9vw, 120px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* L'attribut HTML `hidden` doit toujours l'emporter sur un display
   défini plus bas, sinon la visionneuse photo s'affiche au chargement. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 20px;
}
h1 { font-size: clamp(38px, 6.4vw, 76px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }

.accent { color: var(--accent); }
.muted  { color: var(--muted); }
.small  { font-size: 13px; }

.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.eyebrow.light { color: #8d9499; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 15px 30px;
  font-family: var(--body); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-block { width: 100%; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--dark); color: #fff; padding: 12px 18px; font-size: 14px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 251, 249, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--measure); margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--display);
  font-size: 19px; letter-spacing: 0.01em;
}
.brand.light { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; }
.nav-links a:not(.btn):hover { color: var(--accent); }

/* ---------- Ouverture ---------- */
.hero { position: relative; min-height: min(84vh, 760px); display: flex; align-items: flex-end; }
.hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,16,0.30) 0%, rgba(10,14,16,0.05) 40%, rgba(10,14,16,0.82) 100%),
    linear-gradient(155deg, #223741 0%, #35596a 42%, #7f93a0 72%, #cdd6d9 100%);
  background-size: cover;
  background-position: center;
}
.photo-tag {
  position: absolute; top: 20px; left: 20px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 11px; background: rgba(12,16,18,0.55); color: #fff; border-radius: 2px;
}
.hero-copy {
  position: relative; width: 100%;
  max-width: var(--measure); margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 7vw, 88px);
  color: #fff;
}
.hero-copy .eyebrow { color: rgba(255,255,255,0.78); }
.hero-copy h1 { color: #fff; max-width: 12ch; }
.hero-copy .lead {
  font-size: clamp(16px, 1.5vw, 19px);
  color: rgba(255,255,255,0.9);
  max-width: 48ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; }

/* Ligne de repères sous l'ouverture */
.meta-bar { background: var(--dark); color: #cfd6d9; }
.meta-bar-inner {
  max-width: var(--measure); margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 13px; letter-spacing: 0.01em;
}
.meta-bar .sep { color: #4a5358; }

/* ---------- Présentation ---------- */
.intro { padding-block: var(--section); }
.intro-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.intro-grid > * { min-width: 0; }
.intro-text p { font-size: 17px; line-height: 1.75; color: #2e3539; max-width: 62ch; }
.intro-text strong { font-weight: 600; color: var(--fg); }

.specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: 8px;
}
.spec { background: var(--bg); padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.spec b {
  font-family: var(--display); font-weight: 400; font-size: 32px;
  line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums;
}
.spec b sup { font-size: 0.5em; }
.spec span { font-size: 12.5px; color: var(--muted); }

.station-line {
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: 13.5px; color: var(--muted);
}
.station-line b { color: var(--fg); font-weight: 600; }

/* ---------- Galerie ---------- */
.gallery { padding-block: 0 var(--section); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.gallery-head p { margin: 0; font-size: 13.5px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.gallery-tile {
  position: relative; display: block; padding: 0; margin: 0; border: none;
  overflow: hidden; background: #e9eae6; aspect-ratio: 4 / 3;
  font-family: inherit; text-align: left; cursor: zoom-in; max-width: 100%;
}
/* La première photo occupe deux colonnes : elle porte la composition. */
.gallery-tile:first-child { grid-column: span 2; aspect-ratio: 8 / 5; }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-tile:hover img { transform: scale(1.035); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 16px 12px; font-size: 12.5px; font-weight: 500; color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(8,11,13,0.72) 100%);
  opacity: 0; transition: opacity 0.25s ease;
}
.gallery-tile:hover .gallery-caption,
.gallery-tile:focus-visible .gallery-caption { opacity: 1; }

/* Emplacement en attente de fichier : la composition tient debout même
   sans photo, et le nom du fichier attendu est écrit dessus. */
.gallery-tile.is-placeholder {
  cursor: default;
  background: repeating-linear-gradient(45deg, #eff0ec 0 10px, #e9eae6 10px 20px);
  border: 1px dashed var(--line);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 6px; padding: 16px; text-align: center;
}
.gallery-tile.is-placeholder .ph-name {
  font-size: 12px; font-weight: 600; color: var(--muted);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
.gallery-tile.is-placeholder .ph-caption { font-size: 12.5px; color: var(--muted); max-width: 26ch; }
.gallery-empty { font-size: 14px; padding: 24px 0; }

/* ---------- Visionneuse ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 11, 13, 0.95);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-figure { margin: 0; max-width: min(1200px, 90vw); text-align: center; }
.lightbox-figure img { max-width: 100%; max-height: 84vh; margin: 0 auto; }
.lightbox-figure figcaption { color: #b9c1c4; font-size: 13.5px; margin-top: 14px; }
.lightbox-btn {
  position: absolute; z-index: 51;
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  width: 46px; height: 46px; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- L'essentiel ---------- */
.essentials { background: var(--panel); border-block: 1px solid var(--line); padding-block: var(--section); }
.essentials h2 { max-width: 20ch; }
.essentials-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 48px; margin-top: 44px;
}
.essential { display: flex; flex-direction: column; gap: 6px; }
.essential b { font-size: 15px; font-weight: 600; }
.essential span { font-size: 14px; color: var(--muted); line-height: 1.65; }
.essential::before {
  content: ""; width: 26px; height: 2px; background: var(--accent); margin-bottom: 10px;
}

/* ---------- Infos pratiques ---------- */
.practical { padding-block: var(--section); }
.practical-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 36px;
}
.practical-item { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.practical-item strong { font-size: 15px; }
.practical-item span { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ---------- Réservation ---------- */
.booking { background: var(--dark); color: #e7ebec; padding-block: var(--section); }
.booking-inner {
  max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(32px, 6vw, 72px); align-items: start;
}
.booking-inner > * { min-width: 0; }
.booking-copy h2 { color: #fff; max-width: 14ch; }
.booking-copy .eyebrow { color: #8d9499; }
.booking-copy > p { color: #a8b0b4; font-size: 15.5px; max-width: 46ch; }
.fine-print {
  list-style: none; margin: 24px 0 0; padding: 0;
  font-size: 13.5px; color: #a8b0b4;
  display: flex; flex-direction: column; gap: 9px;
}
.fine-print li { padding-left: 18px; position: relative; }
.fine-print li::before { content: "—"; position: absolute; left: 0; color: #4f7e80; }

.booking-card {
  background: var(--panel); color: var(--fg);
  padding: 30px; border-radius: 3px;
  display: flex; flex-direction: column; gap: 18px;
}
.week-note {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); text-align: center; margin: 0;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; }
input {
  font-family: inherit; font-size: 15px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--fg);
  /* Sans min-width, la largeur « naturelle » d'un <input> fait déborder
     la grille parente hors de l'écran sur mobile. */
  min-width: 0; width: 100%;
}
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.field-group {
  border: 1px solid var(--line); border-radius: 2px;
  padding: 16px 18px 14px; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.field-group legend {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); padding: 0 6px;
}
.field-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-trio > * { min-width: 0; }
.field-help { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 0; }
.bed-summary {
  font-size: 13.5px; font-weight: 600; margin: 0;
  background: #f2f4f3; border-left: 2px solid var(--accent); padding: 10px 12px;
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { max-width: 100%; overflow: hidden; }

.code-row { display: flex; align-items: flex-end; gap: 10px; }
.code-field { flex: 1; min-width: 0; }
.code-optional { font-weight: 400; color: var(--muted); }
.code-row .btn { flex: none; padding: 11px 18px; border-color: var(--line); color: var(--fg); }
.code-row .btn:hover { background: #f2f4f3; }
.code-feedback { font-size: 12.5px; margin: -8px 0 0; min-height: 16px; color: var(--muted); }
.code-feedback.ok { color: #2f6d3d; }
.code-feedback.error { color: #a3402c; }

.consent-row {
  /* flex-direction explicite : la règle générique `label` impose column,
     ce qui empilerait la case au-dessus du texte. */
  display: flex; flex-direction: row; align-items: flex-start; gap: 10px;
  font-size: 12.5px; font-weight: 400; line-height: 1.55; color: var(--muted); cursor: pointer;
}
.consent-row input { margin-top: 2px; flex: none; width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.consent-row a { color: var(--accent); text-decoration: underline; }

.booking-feedback { font-size: 13.5px; min-height: 18px; }
.booking-feedback.error { color: #a3402c; }
.booking-feedback.ok { color: #2f6d3d; }

.price-breakdown {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--line); padding-top: 16px; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.price-row { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.price-row.discount { color: #2f6d3d; font-weight: 600; }
.price-row.total {
  color: var(--fg); font-weight: 700; font-size: 17px;
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px;
}
.calendar-note, .form-note { font-size: 11.5px; color: var(--muted); text-align: center; margin: 0; }

/* ---------- Pages secondaires (conditions, merci) ---------- */
.prose { max-width: 70ch; margin: 0 auto; padding: 72px var(--gutter) 96px; }
.prose h1 { font-size: clamp(30px, 4.5vw, 42px); }
.prose h2 { font-size: 20px; margin: 44px 0 12px; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.75; color: var(--muted); }
.prose strong { color: var(--fg); }
.updated { font-size: 12.5px; color: var(--muted); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--dark); color: #a8b0b4; padding: 64px var(--gutter) 28px; }
.footer-inner {
  max-width: var(--measure); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(232,235,236,0.14);
}
.footer-inner > * { min-width: 0; }
.footer-inner p { margin: 0 0 6px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--measure); margin: 22px auto 0;
  font-size: 12px; color: #6c7378;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .intro-grid, .booking-inner, .footer-inner { grid-template-columns: 1fr; }
  .essentials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 36px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-tile:first-child { grid-column: span 2; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn) { display: none; }
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-tile, .gallery-tile:first-child { grid-column: auto; aspect-ratio: 4 / 3; }
  .essentials-grid, .practical-grid, .field-row { grid-template-columns: 1fr; }
  .hero { min-height: 72vh; }
  .gallery-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
