/* Site de réservation — la vitrine, distincte de l'application interne. */

:root {
  --encre: #17302f;
  --encre-doux: #5c7270;
  --vert: #0f6b5c;
  --vert-fonce: #0b5246;
  --sable: #f6f1e8;
  --sable-fonce: #ece3d4;
  --terre: #c2703d;
  --fond: #fbfaf7;
  --surface: #ffffff;
  --bord: #e4ded3;
  --succes: #15803d;
  --succes-fond: #dcfce7;
  --erreur: #b91c1c;
  --erreur-fond: #fee2e2;
  --attente-fond: #fef3c7;
  --attente: #92400e;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(23, 48, 47, .05), 0 8px 24px rgba(23, 48, 47, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--fond);
  color: var(--encre);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; font-weight: 700; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }
a { color: var(--vert); }
img { max-width: 100%; display: block; }
.discret { color: var(--encre-doux); font-size: .88rem; }
.centre { text-align: center; }
.chargement { padding: 4rem 1rem; text-align: center; color: var(--encre-doux); }

.large { width: min(1120px, 100%); margin: 0 auto; padding: 0 1.1rem; }
.etroit { width: min(760px, 100%); margin: 0 auto; padding: 0 1.1rem; }

/* -------------------------------------------------- Bandeau démonstration */
.bandeau-demo {
  background: var(--terre); color: #fff; padding: .55rem 1.1rem;
  font-size: .88rem; text-align: center; line-height: 1.4;
}
.bandeau-demo a { color: #fff; margin-left: .6rem; }
.bandeau-demo button {
  margin-left: .6rem; background: rgba(255, 255, 255, .18); color: #fff;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  padding: .12rem .7rem; font: inherit; font-size: .82rem; cursor: pointer;
}
.bandeau-demo button:hover { background: rgba(255, 255, 255, .3); }

/* ------------------------------------------------------------- En-tête */
.entete {
  background: var(--surface); border-bottom: 1px solid var(--bord);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
}
.entete__interieur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.1rem; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--encre); }
.logo__marque { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.logo__pastille {
  width: 34px; height: 34px; border-radius: 10px; background: var(--vert); color: #fff;
  display: grid; place-items: center; font-size: 1.1rem;
}
.entete nav { display: flex; gap: .4rem; align-items: center; }
.entete nav a { text-decoration: none; color: var(--encre-doux); padding: .45rem .7rem; border-radius: 8px; font-size: .92rem; }
.entete nav a:hover { background: var(--sable); color: var(--encre); }

/* ------------------------------------------------------------ Bandeau */
.hero { background: linear-gradient(160deg, #0f6b5c 0%, #0b3f3a 100%); color: #fff; padding: 2.6rem 0 3.4rem; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero p { color: #cfe6e0; max-width: 55ch; }

/* --------------------------------------------------------- Recherche */
.recherche {
  background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: .9rem; display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}
.recherche--flottante { margin-top: -2.2rem; position: relative; z-index: 5; }

.champ { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.champ label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-doux); }
.champ--large { grid-column: 1 / -1; }
input, select, textarea {
  font: inherit; padding: .6rem .7rem; border: 1px solid var(--bord); border-radius: 10px;
  background: #fff; color: var(--encre); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--vert); outline-offset: 1px; border-color: var(--vert); }
textarea { min-height: 90px; resize: vertical; }
.case { display: flex; align-items: flex-start; gap: .5rem; font-size: .92rem; }
.case input { width: auto; margin-top: .25rem; }
.aide { font-size: .8rem; color: var(--encre-doux); }

.bouton {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--vert); color: #fff; border: 1px solid var(--vert);
  padding: .65rem 1.1rem; border-radius: 10px; text-decoration: none; display: inline-block; text-align: center;
}
.bouton:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton--terre { background: var(--terre); border-color: var(--terre); }
.bouton--terre:hover { background: #a85c2e; border-color: #a85c2e; }
.bouton--fantome { background: #fff; color: var(--vert); }
.bouton--fantome:hover { background: var(--sable); }
.bouton--danger { background: #fff; color: var(--erreur); border-color: #e8bdbd; }
.bouton--danger:hover { background: var(--erreur-fond); }
.bouton--bloc { width: 100%; padding: .85rem 1rem; font-size: 1.02rem; }
.bouton--petit { padding: .35rem .7rem; font-size: .85rem; }

/* ------------------------------------------------------------ Sections */
.section { padding: 2.2rem 0; }
.section__entete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }

.grille-logements { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.carte-logement {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.carte-logement:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.carte-logement__image { aspect-ratio: 4 / 3; background: var(--sable-fonce); position: relative; overflow: hidden; }
.carte-logement__image img { width: 100%; height: 100%; object-fit: cover; }
.carte-logement__vide { display: grid; place-items: center; height: 100%; color: var(--encre-doux); font-size: .85rem; }
.carte-logement__corps { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.carte-logement__titre { font-weight: 700; }
.carte-logement__prix { margin-top: auto; padding-top: .5rem; font-weight: 700; }
.carte-logement__prix span { font-weight: 400; color: var(--encre-doux); font-size: .88rem; }
.pastille {
  position: absolute; top: .6rem; left: .6rem; background: rgba(255,255,255,.94);
  border-radius: 999px; padding: .2rem .6rem; font-size: .78rem; font-weight: 600;
}
.pastille--indispo { background: rgba(185, 28, 28, .92); color: #fff; }

/* -------------------------------------------------------------- Fiche */
.galerie { display: grid; gap: .5rem; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; border-radius: var(--rayon); overflow: hidden; }
.galerie img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; background: var(--sable-fonce); }
.galerie > :first-child { grid-row: span 2; }
.galerie--une { grid-template-columns: 1fr; grid-template-rows: auto; }
.galerie--une > :first-child { grid-row: auto; }
.galerie__cadre { aspect-ratio: 3 / 2; max-height: 380px; }
.galerie--une .galerie__cadre { aspect-ratio: 16 / 9; max-height: 440px; }
/* Sans photo, le cadre ne doit pas occuper un écran entier pour ne rien montrer. */
.galerie--vide .galerie__cadre { aspect-ratio: auto; height: 200px; background: var(--sable-fonce);
  border: 1px dashed var(--bord); border-radius: var(--rayon); }

.fiche { display: grid; gap: 2rem; grid-template-columns: 1fr 340px; align-items: start; padding: 1.6rem 0 3rem; }
.fiche__cote { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 86px); }

.encart {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1.1rem; box-shadow: var(--ombre);
}
.encart + .encart { margin-top: 1rem; }
.encart__prix { font-size: 1.35rem; font-weight: 700; }
.encart__prix span { font-size: .9rem; font-weight: 400; color: var(--encre-doux); }

.caracteristiques { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--encre-doux); margin: .2rem 0 1rem; }
.equipements { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); list-style: none; padding: 0; margin: 0; }
.equipements li { display: flex; gap: .5rem; align-items: center; }
.equipements li::before { content: '✓'; color: var(--vert); font-weight: 700; }

.detail-prix { display: grid; gap: .4rem; margin: .9rem 0; font-size: .94rem; }
.detail-prix div { display: flex; justify-content: space-between; gap: 1rem; }
.detail-prix .remise { color: var(--succes); }
.detail-prix .total { border-top: 1px solid var(--bord); padding-top: .5rem; font-weight: 700; font-size: 1.05rem; }
.detail-prix .caution { color: var(--encre-doux); }

/* --------------------------------------------------------- Calendrier */
.calendrier { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.mois__titre { text-align: center; font-weight: 700; margin-bottom: .5rem; text-transform: capitalize; }
.mois__grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mois__jour-nom { text-align: center; font-size: .72rem; color: var(--encre-doux); text-transform: uppercase; padding-bottom: .2rem; }
.jour {
  border: none; background: none; font: inherit; padding: .35rem 0 .15rem; border-radius: 8px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1;
}
.jour small { font-size: .62rem; color: var(--encre-doux); }
.jour:hover:not(:disabled) { background: var(--sable-fonce); }
.jour:disabled { color: #c3c9c8; cursor: not-allowed; text-decoration: line-through; }
.jour:disabled small { visibility: hidden; }
.jour--vide { visibility: hidden; }
.jour--choisi { background: var(--vert); color: #fff; }
.jour--choisi small { color: #cfe6e0; }
.jour--intervalle { background: var(--sable-fonce); }
.legende { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--encre-doux); margin-top: .8rem; }

/* ------------------------------------------------------------ Messages */
.message { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .94rem; }
.message--erreur { background: var(--erreur-fond); color: var(--erreur); }
.message--succes { background: var(--succes-fond); color: var(--succes); }
.message--info { background: var(--sable); color: var(--encre); }
.message--attente { background: var(--attente-fond); color: var(--attente); }
.message ul { margin: .3rem 0 0; padding-left: 1.2rem; }

.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge--succes { background: var(--succes-fond); color: var(--succes); }
.badge--erreur { background: var(--erreur-fond); color: var(--erreur); }
.badge--attente { background: var(--attente-fond); color: var(--attente); }
.badge--info { background: #dbeafe; color: #1d4ed8; }
.badge--neutre { background: var(--sable-fonce); color: var(--encre-doux); }

/* ------------------------------------------------------------ Étapes */
.etapes { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.4rem; font-size: .85rem; color: var(--encre-doux); }
.etapes span { padding: .25rem .7rem; border-radius: 999px; background: var(--sable); }
.etapes .actif { background: var(--vert); color: #fff; font-weight: 600; }

.recap { background: var(--sable); border-radius: var(--rayon); padding: 1rem 1.1rem; margin-bottom: 1.4rem; }
.recap__ligne { display: flex; justify-content: space-between; gap: 1rem; }

.champs { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--bord); }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-doux); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------- Visionneuse */
.visionneuse { position: fixed; inset: 0; background: rgba(12, 22, 20, .93); display: grid; place-items: center; z-index: 60; padding: 1rem; }
.visionneuse img { max-height: 86vh; max-width: 100%; object-fit: contain; border-radius: 8px; }
.visionneuse__fermer, .visionneuse__precedent, .visionneuse__suivant {
  position: absolute; background: rgba(255,255,255,.14); color: #fff; border: none;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
}
.visionneuse__fermer { top: 1rem; right: 1rem; }
.visionneuse__precedent { left: 1rem; }
.visionneuse__suivant { right: 1rem; }
.visionneuse__legende { position: absolute; bottom: 1.2rem; color: #e7efed; font-size: .9rem; }

/* ------------------------------------------------------------- Pied */
.pied { background: var(--encre); color: #b9c9c6; padding: 2rem 0; margin-top: 3rem; font-size: .9rem; }
.pied a { color: #9fd4c8; }
.pied__colonnes { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

#annonces { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 80; }
.annonce { background: var(--encre); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--ombre); max-width: 320px; }
.annonce--erreur { background: var(--erreur); }
.annonce--succes { background: var(--succes); }

@media (max-width: 880px) {
  .fiche { grid-template-columns: 1fr; }
  .fiche__cote { position: static; }
  .galerie { grid-template-columns: 1fr 1fr; }
  .galerie > :first-child { grid-column: span 2; grid-row: auto; }
  .hero { padding: 2rem 0 2.6rem; }
  h1 { font-size: 1.55rem; }
}
