/* Le Logement du Bonheur — site de réservation.
   Couleurs du logo : le bleu de la maison, le rose du « DB » et du soleil.
   Mobile d'abord ; le bureau s'ajoute en min-width. Aucune image décorative,
   aucun script : la page pèse ce que pèsent ses photos. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bleu: #2a68b0;
  --bleu-fonce: #1b4a85;
  --rose: #cf2c5e;
  --rose-fonce: #b0214d;
  --encre: #14233a;
  --discret: #52627a;
  --fond: #f5f8fc;
  --surface: #ffffff;
  --ligne: #d9e2ee;
  --libre: #0b7a4b;
  --libre-fond: #e3f5ec;
  --complet: #a3283f;
  --complet-fond: #fbe9ed;
  --inconnu-fond: #eef2f7;
  --rayon: 14px;
  --ombre: 0 1px 2px rgb(20 35 58 / 6%), 0 8px 24px rgb(20 35 58 / 8%);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu-fonce); }
a:hover { color: var(--rose-fonce); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 750; }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1em; }

.conteneur { width: min(100% - 32px, 1120px); margin-inline: auto; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lien-evitement { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.lien-evitement:focus { left: 8px; }

/* En-tête */
.entete { background: var(--surface); border-bottom: 1px solid var(--ligne); }
.entete__ligne { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.marque__nom { font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em; }
.entete__lien { text-decoration: none; font-weight: 600; padding: 8px 4px; white-space: nowrap; }

/* Accueil */
.hero { position: relative; min-height: 380px; display: grid; align-items: end; color: #fff; background: var(--bleu-fonce); overflow: hidden; }
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__voile { position: absolute; inset: 0; background: linear-gradient(to top, rgb(14 28 50 / 82%), rgb(14 28 50 / 18%) 70%); }
.hero__texte { position: relative; padding-block: 40px 88px; }
.hero h1 { margin-bottom: .35em; text-wrap: balance; }
.hero p { font-size: 1.125rem; max-width: 36rem; margin: 0; text-shadow: 0 1px 8px rgb(0 0 0 / 35%); }

.recherche-boite { position: relative; margin-top: -56px; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; }
.recherche { display: grid; gap: 14px; }
.recherche__champ { display: grid; gap: 4px; min-width: 0; }
.recherche label { font-size: .9rem; font-weight: 650; color: var(--discret); }
.recherche input, .recherche select {
  font: inherit; color: var(--encre); background: var(--fond);
  border: 1.5px solid var(--ligne); border-radius: 10px; padding: 11px 12px; min-height: 48px; width: 100%; min-width: 0;
}
.recherche input:focus, .recherche select:focus { border-color: var(--bleu); outline: none; box-shadow: 0 0 0 3px rgb(42 104 176 / 20%); }

.bouton {
  font: inherit; font-weight: 700; color: #fff; background: var(--rose); border: 0; border-radius: 10px;
  padding: 12px 20px; min-height: 48px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.bouton:hover { background: var(--rose-fonce); color: #fff; }
.bouton--plein { width: 100%; }

.section { padding-block: 48px 8px; }
.section--texte .texte { max-width: 68ch; }
.texte p { margin-bottom: 1em; }

.grille-cartes { display: grid; gap: 20px; }
.carte { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; display: flex; flex-direction: column; }
.carte__photo { display: block; aspect-ratio: 4 / 3; background: var(--ligne); }
.carte__photo img { width: 100%; height: 100%; object-fit: cover; }
.carte__corps { padding: 16px 18px 20px; }
.carte__titre { margin-bottom: .2em; }
.carte__titre a { color: var(--encre); text-decoration: none; }
.carte__titre a:hover { color: var(--rose-fonce); }
.carte__meta { color: var(--discret); font-size: .95rem; margin-bottom: .6em; }
.carte__prix { margin: 0; }

.etat { margin: .6em 0 0; padding: 8px 12px; border-radius: 10px; font-size: .98rem; }
.etat--libre { background: var(--libre-fond); color: var(--libre); }
.etat--complet { background: var(--complet-fond); color: var(--complet); }
.etat--inconnu { background: var(--inconnu-fond); color: var(--discret); }
.erreur { color: var(--complet); margin: 12px 0 0; font-weight: 600; }
.note { color: var(--discret); margin: 12px 0 0; }
.total { font-size: 1.1rem; margin: 12px 0 0; }
.total strong { font-size: 1.6rem; }
.total span { color: var(--discret); font-size: .95rem; }

/* Fiche d'une chambre */
.fil { margin: 20px 0 12px; }
.fil a { text-decoration: none; font-weight: 600; }

.galerie { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--rayon); }
.galerie li { flex: 0 0 88%; scroll-snap-align: start; aspect-ratio: 4 / 3; background: var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.galerie img { width: 100%; height: 100%; object-fit: cover; }

.fiche { display: grid; gap: 28px; padding-top: 28px; }
.fiche__reservation { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; align-self: start; }
.fiche__reservation h2 { margin-bottom: .3em; }
/* Sur téléphone, les dates se choisissent avant de lire la description. */
.fiche__reservation { order: -1; }

.equipements { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.equipements ul { margin: 0; padding-left: 1.1em; color: var(--encre); }
.equipements li { margin-bottom: .2em; }

.calendriers { display: grid; gap: 24px; }
.calendrier { width: 100%; max-width: 360px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; text-align: center; font-variant-numeric: tabular-nums; }
.calendrier caption { font-weight: 700; text-align: left; margin-bottom: 6px; }
.calendrier th { font-size: .78rem; color: var(--discret); font-weight: 600; }
.calendrier abbr { text-decoration: none; }
.jour { padding: 8px 0; border-radius: 8px; font-size: .95rem; }
.jour--libre { background: var(--libre-fond); color: var(--libre); }
.jour--pris { background: var(--complet-fond); color: var(--complet); text-decoration: line-through; }
.jour--passe { color: #66738a; }
.legende { color: var(--discret); font-size: .92rem; display: flex; gap: 18px; align-items: center; }
.pastille { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.pastille--libre { background: var(--libre-fond); border: 1px solid var(--libre); }
.pastille--pris { background: var(--complet-fond); border: 1px solid var(--complet); }

/* Pages de texte */
.page-texte { max-width: 760px; padding-block: 40px 24px; }
.page-texte h2 { margin-top: 1.6em; }
.avertissement { background: #fff6e0; border: 1px solid #f0d9a0; color: #5b4300; padding: 14px 16px; border-radius: 10px; }
.a-completer { background: #fff6e0; border-bottom: 2px dashed #c79a1b; padding: 0 4px; color: #5b4300; font-weight: 600; }

/* Pied */
.pied { margin-top: 64px; background: var(--encre); color: #dfe8f3; padding-block: 28px; }
.pied__ligne { display: grid; gap: 14px; }
.pied__marque { margin: 0; font-weight: 600; }
.pied__liens { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pied a { color: #dfe8f3; }
.pied a:hover { color: #fff; }

@media (min-width: 720px) {
  .recherche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px auto; align-items: end; }
  .grille-cartes { grid-template-columns: repeat(2, 1fr); }
  .galerie li { flex-basis: 56%; }
  .calendriers { grid-template-columns: 1fr 1fr; }
  .pied__ligne { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 960px) {
  .hero { min-height: 480px; }
  .grille-cartes { grid-template-columns: repeat(3, 1fr); }
  .fiche { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
  .fiche__reservation { order: 0; }
  .fiche__reservation { position: sticky; top: 16px; }
  .galerie li { flex-basis: 640px; }
}

/* Dans la colonne latérale (360 px), le formulaire ne tient pas sur une ligne :
   dates côte à côte, puis voyageurs et bouton pleine largeur. */
@media (min-width: 720px) {
  .fiche__reservation .recherche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fiche__reservation .recherche__champ--court,
  .fiche__reservation .recherche .bouton { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
