/* Chalet La Bessia : feuille de style commune */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --calcaire: #f2f4f3;
  --surface: #ffffff;
  --encre: #15221e;
  --encre-2: #51605b;
  --sapin: #1d4a3d;
  --sapin-fonce: #123329;
  --meleze: #a86c17;
  --crete-1: #dfe5e3;
  --crete-2: #9fb0ac;
  --trait: #d6dcda;
  --sur-sapin: #f2f4f3;
  --voile: rgba(8, 18, 15, 0.78);
  --alerte: #a23a2a;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --texte: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--calcaire); color: var(--encre); font-family: var(--texte); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: max(18px, env(safe-area-inset-left, 0px)) max(18px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; max-width: 65ch; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--meleze); outline-offset: 2px; }
.label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--encre-2); }
.lien { font-weight: 600; color: var(--sapin); text-underline-offset: 3px; }

/* En-tête */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 16px; }
.marque { font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.97rem; }
.top nav a { text-decoration: none; color: var(--encre-2); padding-block: 4px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--encre); text-decoration: underline; text-underline-offset: 5px; }
.langues { position: relative; font-size: 0.9rem; }
.langues summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 7px 10px; border: 1px solid var(--crete-2); border-radius: 999px; font-weight: 600; letter-spacing: 0.04em; color: var(--encre); }
.langues summary::-webkit-details-marker { display: none; }
.langues summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.langues[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.langues summary:hover { background: var(--crete-1); }
.drapeau { display: block; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.langues-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; min-width: 190px; display: grid; padding: 6px; background: var(--calcaire); border: 1px solid var(--crete-2); border-radius: var(--r); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14); }
.langues-menu a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 4px; text-decoration: none; color: var(--encre); }
.langues-menu a:hover { background: var(--crete-1); }
.langues-menu a[aria-current="true"] { font-weight: 700; background: var(--crete-1); }
@media (max-width: 520px) { .langues-menu { right: auto; left: 0; } }
.btn { display: inline-block; font: 600 1rem var(--texte); background: var(--sapin); color: var(--sur-sapin); border: 0; border-radius: var(--r); padding: 13px 22px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--sapin-fonce); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Saisons */
:root[data-saison="hiver"] .s-ete, :root[data-saison="ete"] .s-hiver, :root:not([data-saison]) .s-ete { display: none; }
.saisons { justify-self: start; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--voile); }
.saisons button { text-transform: uppercase; letter-spacing: 0.08em; font: 600 0.78rem var(--texte); color: #fff; background: transparent; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.saisons button[aria-pressed="true"] { background: #fff; color: var(--encre); }

/* Ouverture */
.hero { position: relative; overflow: hidden; background: var(--sapin-fonce); }
.hero > img { display: block; width: 100%; height: clamp(440px, 58vw, 700px); object-fit: cover; object-position: 50% 30%; }
.hero > img.s-ete { object-position: 50% 45%; }
.hero > img.s-hiver { object-position: 50% 35%; }
.hero-txt { position: absolute; inset: auto 0 0 0; background: linear-gradient(transparent, var(--voile)); color: #fff; }
.hero-txt .wrap { padding-block: clamp(90px, 14vw, 160px) clamp(22px, 4vw, 44px); display: grid; gap: 14px; }
.hero-txt h1 { max-width: none; font-size: clamp(2.8rem, 8vw, 5.4rem); }
.hero-sous { font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem, 2.8vw, 1.9rem); line-height: 1.25; max-width: none; margin-bottom: 6px; }
.hero-sous span { display: inline-block; }
.hero-txt .label { color: #fff; }
.etoiles { display: inline-flex; align-items: center; gap: 10px; }
.etoiles span[aria-hidden] { letter-spacing: 0.15em; }
.intro { padding-block: 30px; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.intro > * { min-width: 0; }
p.chapo { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 52ch; color: var(--encre-2); }
.entete-page { padding-block: clamp(36px, 6vw, 72px) clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.entete-page h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 20ch; }

.chiffres { background: var(--sapin); color: var(--sur-sapin); }
.chiffres .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 28px; padding-block: 28px; }
.chiffres b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chiffres span { font-size: 0.95rem; opacity: 0.85; }

section { padding-block: clamp(48px, 8vw, 92px); }
.bande { background: var(--surface); border-block: 1px solid var(--trait); }
.tete { display: grid; gap: 12px; margin-bottom: 32px; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px 48px; align-items: start; }
.deux > * { min-width: 0; }
.pile { display: grid; gap: 16px; align-content: start; }

/* Photos */
.vue, .galerie img, .pieces img, .cartes img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); background: var(--crete-1); }
.galerie { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.galerie img.large { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
@media (max-width: 520px) { .galerie img.large { grid-column: auto; grid-row: auto; height: auto; aspect-ratio: 4 / 3; } }

/* Cartes des niveaux (accueil) et pièces (page Le chalet) */
.cartes, .pieces { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px 28px; }
.cartes { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 36px 24px; }
.cartes article, .pieces article { display: grid; gap: 12px; align-content: start; min-width: 0; }
.cap { color: var(--meleze); font-weight: 600; }
.niveau-titre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--trait); }
ul.liste { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
ul.liste li::marker { color: var(--crete-2); }
.equip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.equip > div { display: grid; gap: 12px; align-content: start; min-width: 0; }

.reperes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 32px; }
.reperes div { border-top: 3px solid var(--sapin); padding-top: 12px; }
.reperes b { font-family: var(--display); font-size: 1.5rem; display: block; line-height: 1.2; margin-bottom: 4px; }

/* Avis */
.avis { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px 40px; }
.avis blockquote, .avis-liste blockquote { margin: 0; min-width: 0; border-top: 3px solid var(--sapin); padding-top: 16px; display: grid; gap: 14px; align-content: start; }
.avis blockquote p { font-size: 1.12rem; line-height: 1.55; }
blockquote footer { font-size: 0.9rem; color: var(--encre-2); }
.avis-liste { columns: 2 340px; column-gap: 48px; }
.avis-liste blockquote { break-inside: avoid; margin-bottom: 36px; }
.avis-liste .note { color: var(--meleze); letter-spacing: 0.12em; font-size: 0.95rem; }

/* FAQ */
.faq { display: grid; gap: 44px; max-width: 800px; }
.faq h2 { font-size: 1.5rem; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--trait); }
.faq summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; font-size: 1.08rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; font-weight: 400; color: var(--sapin); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; color: var(--encre-2); }

.note { border-left: 3px solid var(--meleze); padding: 4px 0 4px 16px; color: var(--encre-2); }

/* Tarifs et mentions légales */
.tableau { overflow-x: auto; }
.tableau table { width: 100%; max-width: 860px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tableau th, .tableau td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau thead th { font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--encre-2); border-bottom: 2px solid var(--sapin); }
.tableau tbody th { font-family: var(--display); font-size: 1.15rem; min-width: 190px; }
.tableau tbody th span { display: block; font: 400 0.9rem var(--texte); color: var(--encre-2); margin-top: 4px; }
.tableau .prix { text-align: right; white-space: nowrap; font-weight: 600; padding-right: 0; }
.legal { display: grid; gap: 36px; max-width: 760px; }
.legal > div { display: grid; gap: 12px; }
.legal h2 { font-size: 1.4rem; }

/* Calendrier */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-nav button { font: 600 1rem var(--texte); background: var(--surface); color: var(--encre); border: 1px solid var(--crete-2); border-radius: var(--r); padding: 8px 14px; cursor: pointer; }
.cal-nav button[disabled] { opacity: 0.35; cursor: default; }
.cal-mois { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.cal-mois h3 { font-size: 1rem; margin-bottom: 8px; text-transform: capitalize; }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; font-size: 0.88rem; text-align: center; font-variant-numeric: tabular-nums; }
.cal-grille span { padding: 7px 0; border-radius: 4px; background: var(--surface); }
.bande .cal-grille span { background: var(--calcaire); }
.cal-grille .j-tete { background: none !important; color: var(--encre-2); font-weight: 600; }
.cal-grille .j-vide, .cal-grille .j-passe { background: none !important; color: #b3bdb9; }
.cal-grille .j-pris { background: var(--crete-1) !important; color: #8a9692; text-decoration: line-through; }
.cal-legende { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 0.9rem; color: var(--encre-2); }
.cal-legende i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--trait); }

/* Formulaire */
.demande { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r); padding: clamp(18px, 3vw, 32px); display: grid; gap: 18px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; }
.champ { display: grid; gap: 5px; min-width: 0; }
.champ.tout { grid-column: 1 / -1; }
.champ label { font-size: 0.9rem; font-weight: 600; }
input, textarea { font: 400 1rem var(--texte); color: var(--encre); background: var(--calcaire); border: 1px solid var(--crete-2); border-radius: var(--r); padding: 11px 12px; width: 100%; min-width: 0; }
textarea { min-height: 96px; resize: vertical; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.erreur { color: var(--alerte); font-weight: 600; }
.succes { border-left: 3px solid var(--sapin); padding: 6px 0 6px 16px; }
.petit { font-size: 0.88rem; color: var(--encre-2); }

.appel { background: var(--sapin); color: var(--sur-sapin); }
.appel .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.appel p { color: var(--sur-sapin); opacity: 0.88; }
.appel .btn { background: var(--sur-sapin); color: var(--sapin-fonce); }
.appel .btn:hover { background: #fff; }

footer.pied { border-top: 1px solid var(--trait); color: var(--encre-2); font-size: 0.92rem; }
footer.pied .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer.pied a { text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Assistant (chat) */
.chat-icone { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--crete-2); background: var(--surface); color: var(--sapin); cursor: pointer; }
.chat-icone:hover { background: var(--crete-1); }
.chat-bulle { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: 8px; font: 600 0.95rem var(--texte); background: var(--sapin); color: var(--sur-sapin); border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; box-shadow: 0 6px 20px rgba(8, 18, 15, 0.25); }
.chat-bulle:hover { background: var(--sapin-fonce); }
.chat { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50; width: min(390px, calc(100vw - 24px)); height: min(580px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; box-shadow: 0 16px 48px rgba(8, 18, 15, 0.3); overflow: hidden; }
.chat[hidden] { display: none !important; }
.chat-tete { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--sapin); color: var(--sur-sapin); font-family: var(--display); }
.chat-tete button { background: none; border: 0; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-fil { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--calcaire); }
.chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 0.97rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--trait); }
.chat-user { align-self: flex-end; background: var(--sapin); color: var(--sur-sapin); }
.chat-msg a { color: var(--sapin); font-weight: 600; text-underline-offset: 3px; }
.chat-erreur { border-color: var(--alerte); color: var(--alerte); }
.chat-attente { color: var(--encre-2); letter-spacing: 0.2em; }
.chat-form { display: flex; gap: 8px; }
.chat .chat-form { padding: 12px; border-top: 1px solid var(--trait); }
.chat-form input { flex: 1; min-width: 0; }
.chat-form .btn { padding: 11px 16px; white-space: nowrap; }
.chat-notice { margin: 0; padding: 0 12px 12px; font-size: 0.74rem; line-height: 1.4; color: var(--encre-2); max-width: none; }
.chat-faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px 40px; align-items: center; background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--sapin); border-radius: var(--r); padding: clamp(18px, 3vw, 28px); }
.chat-faq > * { min-width: 0; }
.chat-faq h2 { font-size: 1.4rem; }

/* Photos en grand */
.galerie img, .pieces img, .cartes img, img.vue { cursor: zoom-in; transition: filter 0.2s ease, transform 0.2s ease; }
.galerie img:hover, .pieces img:hover, .cartes img:hover, img.vue:hover { filter: brightness(1.07); transform: scale(1.012); }
@media (prefers-reduced-motion: reduce) { .galerie img, .pieces img, .cartes img, img.vue { transition: none; } .galerie img:hover, .pieces img:hover, .cartes img:hover, img.vue:hover { transform: none; } }
.visionneuse { position: fixed; inset: 0; z-index: 100; background: rgba(8, 18, 15, 0.94); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.visionneuse figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 100%; max-height: 100%; }
.visionneuse figure img { max-width: min(100%, 1500px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.visionneuse figcaption { color: #f2f4f3; font-size: 0.95rem; text-align: center; max-width: 70ch; }
.visionneuse button { position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 1.9rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.visionneuse button:hover { background: rgba(255, 255, 255, 0.28); }
.vis-fermer { top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; }
.vis-prec { left: 14px; top: 50%; transform: translateY(-50%); }
.vis-suiv { right: 14px; top: 50%; transform: translateY(-50%); }

/* Titres réduits aux cinq étoiles */
.titre-etoiles { color: var(--meleze); letter-spacing: 0.14em; line-height: 1; }
/* Champs de date : format d'affichage imposé (voir site.js) */
.champ-date { position: relative; display: block; }
.champ-date.actif input { color: transparent; caret-color: transparent; }
.champ-date.actif input::-webkit-datetime-edit { opacity: 0; }
.date-vue { display: none; }
.champ-date.actif .date-vue { display: block; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--encre); }
.champ-date.actif .date-vue.vide { color: var(--encre-2); }
/* Page Vos hôtes */
.portraits, .coeurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 36px 28px; }
.portraits article, .coeurs article { display: grid; gap: 12px; align-content: start; min-width: 0; }
.portrait-photo { aspect-ratio: 4 / 5; max-width: 320px; border-radius: var(--r); background: var(--crete-1); }

/* Page Plus de photos : carrousel */
.car-zones { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.car-zones button { font: 600 0.9rem var(--texte); color: var(--encre); background: var(--calcaire); border: 1px solid var(--crete-2); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.car-zones button:hover, .car-zones button[aria-pressed="true"] { background: var(--sapin); border-color: var(--sapin); color: var(--sur-sapin); }
.car-scene { position: relative; display: flex; align-items: center; justify-content: center; height: min(72vh, 760px); min-height: 300px; background: #14201d; border-radius: var(--r); overflow: hidden; touch-action: pan-y; }
.car-scene img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.car-fleche { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.9); color: #14201d; font-size: 1.9rem; line-height: 1; cursor: pointer; padding-bottom: 5px; }
.car-fleche:hover { background: #fff; }
#car-prec { left: 12px; } #car-suiv { right: 12px; }
.car-legende { display: flex; justify-content: space-between; gap: 16px; margin: 12px 0 0; font-weight: 600; }
.car-legende #car-compte { color: var(--encre-2); font-weight: 400; white-space: nowrap; }
.car-titre { font-size: 1.25rem; margin: 36px 0 14px; }
.car-vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.car-vignettes a { display: block; border-radius: 4px; overflow: hidden; outline-offset: 2px; }
.car-vignettes img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--crete-1); }
.car-vignettes a[aria-current="true"] { outline: 3px solid var(--meleze); }
@media (max-width: 520px) { .car-scene { height: 62vh; } .car-fleche { width: 40px; height: 40px; font-size: 1.6rem; } }
