/* HostLite — site public de réservation directe.
   Les couleurs et le rayon viennent des variables posées par le thème du
   site (layout) : --p, --s, --bg, --text, --muted, --card, --radius. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--p); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.012em; }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); font-weight: 800; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 750; margin: 0 0 .7rem; }
h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 .4rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.15rem; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }

/* ---------- En-tête ---------- */
header.site {
  background: var(--card);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(140%) blur(6px);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: .85rem; padding-bottom: .85rem;
}
.brand { font-size: 1.2rem; font-weight: 800; color: var(--p); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
header.site nav { display: flex; align-items: center; gap: 1.1rem; font-size: .9rem; }
header.site nav a { color: var(--text); font-weight: 600; }
.tel { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--p); }

/* ---------- Accueil ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(140deg, var(--p), color-mix(in srgb, var(--p) 55%, #000));
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.62) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 4.6rem; padding-bottom: 4.6rem; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); max-width: 18ch; }
.hero p { max-width: 56ch; font-size: 1.06rem; opacity: .96; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.4rem; font-size: .92rem; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }

.section { padding: 3rem 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { margin: .2rem 0 0; }

/* ---------- Cartes de logement ---------- */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.pcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 8px 26px rgba(0,0,0,.07);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,.07), 0 16px 40px rgba(0,0,0,.11); }
.pcard-media { position: relative; aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--muted) 15%, transparent); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-count {
  position: absolute; right: .6rem; bottom: .6rem; background: rgba(0,0,0,.62); color: #fff;
  border-radius: 999px; padding: .16rem .6rem; font-size: .76rem; font-weight: 600;
}
.pcard .body { padding: 1.05rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.pcard h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.pcard h3 a { color: inherit; }
.pcard .facts { font-size: .87rem; color: var(--muted); margin: 0 0 .55rem; }
.pcard .excerpt { font-size: .92rem; margin: 0 0 .9rem; }
.pcard .tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .9rem; }
.pcard .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; }
.price { color: var(--text); font-weight: 800; font-size: 1.12rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .8rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .72rem 1.35rem; background: var(--p); color: #fff; border: 0;
  border-radius: calc(var(--radius) - 1px); font-weight: 700; font-size: .97rem;
  cursor: pointer; font-family: inherit; line-height: 1.2;
  transition: filter .15s ease, transform .12s ease;
}
.btn:hover { filter: brightness(1.09); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.alt { background: var(--s); color: #17211d; }
.btn.ghost { background: transparent; color: var(--p); border: 1.5px solid currentColor; }
.btn.block { width: 100%; }
.btn.lg { padding: .9rem 1.6rem; font-size: 1.03rem; }

/* ---------- Galerie ---------- */
.gal {
  display: grid; gap: .5rem; margin: 1.4rem 0 2rem;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border-radius: var(--radius); overflow: hidden;
  max-height: 460px;
}
.gal button { padding: 0; border: 0; cursor: pointer; background: none; overflow: hidden; position: relative; }
.gal button:first-child { grid-row: span 2; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .2s ease; }
.gal button:hover img { transform: scale(1.045); filter: brightness(1.04); }
.gal .more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.52); color: #fff; font-weight: 700; font-size: 1rem;
}
.gal-single { border-radius: var(--radius); overflow: hidden; margin: 1.4rem 0 2rem; max-height: 440px; }
.gal-single img { width: 100%; height: 440px; object-fit: cover; }
@media (max-width: 760px) {
  .gal { grid-template-columns: 1fr 1fr; max-height: none; }
  .gal button:first-child { grid-column: span 2; aspect-ratio: 3/2; }
  .gal button { aspect-ratio: 3/2; }
  .gal button:nth-child(n+4) { display: none; }
}

/* Visionneuse plein écran */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh;
}
dialog.lightbox::backdrop { background: rgba(0,0,0,.9); }
dialog.lightbox img { max-width: 96vw; max-height: 88vh; object-fit: contain; border-radius: 6px; margin: 0 auto; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .7rem; color: #fff; }
.lb-bar button {
  background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px;
  width: 40px; height: 40px; font-size: 1.15rem; cursor: pointer; line-height: 1;
}
.lb-bar button:hover { background: rgba(255,255,255,.26); }
.lb-count { font-size: .9rem; min-width: 5ch; text-align: center; }

/* ---------- Fiche logement ---------- */
.prop-head { padding-top: 1.9rem; }
.prop-head .place { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: var(--muted); font-size: .95rem; }
.facts-row {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin: 1rem 0 0;
  font-size: .95rem; font-weight: 600;
}
.facts-row span { display: inline-flex; align-items: center; gap: .45rem; }
.facts-row svg { flex: none; opacity: .75; }

.layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 940px) { .layout { grid-template-columns: minmax(0,1.7fr) minmax(320px,1fr); } }

.card {
  background: var(--card); border-radius: var(--radius); padding: 1.35rem 1.45rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.055);
  margin: 0 0 1.4rem;
}
.card.plain { box-shadow: none; background: transparent; padding: 0; }
.card p:last-child { margin-bottom: 0; }
.sep { border: 0; border-top: 1px solid color-mix(in srgb, var(--muted) 22%, transparent); margin: 1.4rem 0; }

.prose { white-space: pre-line; }
.prose.clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.readmore { background: none; border: 0; color: var(--p); font: inherit; font-weight: 700; cursor: pointer; padding: .4rem 0 0; text-decoration: underline; }

/* Équipements par catégorie */
.amen-group { margin-bottom: 1.2rem; }
.amen-group:last-child { margin-bottom: 0; }
.amen-group h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: .5rem; font-weight: 700;
}
.amen-list { display: grid; gap: .45rem .9rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.amen-list li { display: flex; align-items: flex-start; gap: .55rem; font-size: .93rem; list-style: none; line-height: 1.45; }
.amen-list svg { flex: none; color: var(--p); margin-top: .16rem; }
.amen-list span { min-width: 0; }
ul.amen-list { margin: 0; padding: 0; }

/* Chambres et lits */
.beds { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.bed {
  border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  border-radius: calc(var(--radius) - 2px); padding: .8rem .9rem;
}
.bed strong { display: block; font-size: .92rem; }
.bed span { font-size: .87rem; color: var(--muted); }

/* Badges */
.badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.badges span, .tag {
  display: inline-block; background: color-mix(in srgb, var(--p) 11%, transparent);
  color: color-mix(in srgb, var(--p) 82%, var(--text));
  border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; font-weight: 600;
}

/* Réassurance : une colonne par argument, icône à gauche du texte.
   Le sélecteur vise l'enfant direct — sinon le bloc de texte devient lui
   aussi une rangée flex et le titre se retrouve écrasé sur trois lignes. */
.trust { display: grid; gap: 1.4rem 1.6rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.trust > div { display: flex; gap: .75rem; align-items: flex-start; }
.trust > div > div { min-width: 0; }
.trust svg { flex: none; color: var(--p); margin-top: .1rem; }
.trust strong { display: block; font-size: .95rem; line-height: 1.35; margin-bottom: .15rem; }
.trust p { margin: 0; font-size: .89rem; color: var(--muted); line-height: 1.55; }

/* ---------- Encart de réservation ---------- */
.booking { position: sticky; top: 84px; }
.booking .from { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .9rem; }
.booking .from strong { font-size: 1.5rem; font-weight: 800; }

label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: .28rem; }
input, select, textarea {
  width: 100%; padding: .62rem .72rem; font: inherit;
  border: 1px solid color-mix(in srgb, var(--muted) 42%, transparent);
  border-radius: calc(var(--radius) - 3px); background: var(--bg); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--p); outline-offset: 1px; border-color: var(--p); }
.row { display: grid; gap: .8rem; }
@media (min-width: 620px) { .row.c2 { grid-template-columns: 1fr 1fr; } .row.c4 { grid-template-columns: repeat(4,1fr); } }
.field { margin-bottom: .85rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; }
.check input { width: auto; margin-top: .32rem; flex: none; }
.check label { font-weight: 400; font-size: .87rem; margin: 0; }

table.quote { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.quote td { padding: .34rem 0; }
table.quote td:last-child { text-align: right; white-space: nowrap; }
table.quote tr.total td {
  border-top: 1.5px solid color-mix(in srgb, var(--muted) 30%, transparent);
  font-weight: 800; font-size: 1.08rem; padding-top: .6rem;
}

.alert { padding: .8rem 1rem; border-radius: calc(var(--radius) - 3px); margin: 1rem 0; font-size: .93rem; }
.alert.error { background: #fbe4e2; color: #99291f; }
.alert.success { background: #ddefe4; color: #1c6343; }
.error-text { color: #a13029; font-size: .82rem; }

/* ---------- Pied de page ---------- */
footer.site {
  margin-top: 3.5rem; padding: 2.4rem 0 2rem; background: var(--card);
  font-size: .9rem; color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: .9rem; }
footer.site nav a { color: var(--text); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .pcard:hover, .btn:hover { transform: none; }
}

/* ---------- Accueil : logement mis en avant ---------- */
.feature {
  display: grid; gap: 1.6rem; align-items: center;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);
}
@media (min-width: 880px) { .feature { grid-template-columns: 1.15fr 1fr; gap: 0; } }

.feature-media { display: grid; gap: .4rem; }
.feature-media > a { display: block; line-height: 0; overflow: hidden; }
.feature-media > a img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform .5s ease; }
.feature-media > a:hover img { transform: scale(1.04); }
.feature-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.feature-thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.feature-body { padding: 1.6rem 1.8rem; }
.feature-body h2 { margin: .55rem 0 .3rem; font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.feature-body .facts { font-size: .9rem; margin: 0 0 .8rem; }
.feature-body .amen-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.feature-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem;
  padding-top: 1.1rem; border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}
.feature-foot .price small { font-weight: 500; color: var(--muted); font-size: .82rem; }

/* ---------- Accueil : les hôtes ---------- */
.hosts { display: flex; gap: 1.2rem; align-items: flex-start; }
.hosts-mark {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--p) 12%, transparent); color: var(--p);
}
.hosts h2 { margin-bottom: .5rem; }
.hosts-sign {
  margin-top: .9rem; font-style: italic; color: var(--muted); font-size: .93rem;
}
@media (max-width: 620px) { .hosts { flex-direction: column; gap: .8rem; } }
