/* ==========================================================================
   GABARIT HÔTEL — feuille de base (NOYAU)
   ==========================================================================
   Ne contient AUCUNE couleur en dur : tout passe par les variables produites
   depuis site.json (src/theme.js). Cette feuille décrit la STRUCTURE et le
   comportement ; l'ambiance décrit la PERSONNALITÉ ; site/theme.css a le
   dernier mot. Trois couches, chargées dans cet ordre, jamais mélangées.

   Élément signature du gabarit : LE COMPTOIR — la barre de recherche de
   disponibilité, qui se détache du hero au défilement et reste à portée de
   pouce. C'est le seul geste qui rapporte de l'argent sur un site d'hôtel ;
   il ne doit jamais être à plus d'un regard. (Le défaut le plus courant des
   sites d'hôtel : un visiteur qui fait défiler la page perd la réservation
   de vue et se croit obligé de téléphoner.)
   ========================================================================== */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* Accessibilité : le focus doit rester visible, y compris sur fond sombre. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.enveloppe { width: min(1160px, 92vw); margin-inline: auto; }

.saut-contenu {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: .8rem 1.2rem; z-index: 100;
}
.saut-contenu:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------- en-tête -- */

.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem 4vw;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.entete.pose {
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--ligne);
  padding-block: .6rem;
}
.entete__logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.entete__logo img { height: 46px; width: auto; }
.entete__nom {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
.entete.pose .entete__nom { color: var(--encre); text-shadow: none; }

.nav { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; font-size: .93rem; letter-spacing: .02em;
  color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.5); padding: .3rem 0;
  border-bottom: 1px solid transparent;
}
.entete.pose .nav a { color: var(--encre); text-shadow: none; }
.nav a:hover { border-bottom-color: var(--accent); }
@media (max-width: 900px) { .nav { display: none; } }

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative; min-height: min(94svh, 780px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8rem 4vw 2.5rem;
  color: #fff;
  background: var(--primaire-sombre);
  overflow: hidden;
}
.hero__fond {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  /* Montée lente à l'ouverture : l'image respire au lieu d'apparaître d'un bloc. */
  animation: respire 18s ease-out forwards;
}
@keyframes respire { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__voile {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.35) 100%);
}
.hero__texte { position: relative; width: min(1160px, 92vw); margin-inline: auto; }
.hero__eyebrow {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-clair); margin-bottom: 1rem;
}
.hero h1 { color: #fff; max-width: 16ch; text-wrap: balance; }
.hero__baseline { font-size: 1.2rem; max-width: 46ch; opacity: .92; }

/* ----------------------------------------------- LE COMPTOIR (signature) -- */
/*  Dans le hero au chargement ; devient une barre fixe dès qu'on le dépasse.
    Sur mobile il se pose en bas de l'écran, à portée de pouce.               */

.comptoir {
  position: relative; z-index: 5;
  width: min(1160px, 92vw); margin: 2.5rem auto -3.5rem;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.45);
  padding: 1.1rem 1.2rem;
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}
.comptoir__champ { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.comptoir__champ label {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--encre-douce);
}
.comptoir input, .comptoir select, .champ input, .champ select, .champ textarea {
  font: inherit; font-size: .98rem;
  padding: .62rem .7rem;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-petit);
  background: var(--fond);
  color: var(--encre);
  width: 100%;
}
.comptoir .bouton { height: 100%; min-height: 46px; }

.comptoir--fixe {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  width: 100%; margin: 0; border-radius: 0;
  border-left: 0; border-right: 0; border-bottom: 0;
  box-shadow: 0 -8px 40px -20px rgba(0,0,0,.5);
  animation: monte .3s ease-out;
}
@keyframes monte { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (min-width: 901px) {
  .comptoir--fixe { inset: 0 0 auto 0; animation: descend .3s ease-out; box-shadow: 0 10px 40px -22px rgba(0,0,0,.45); }
  @keyframes descend { from { transform: translateY(-100%); } to { transform: translateY(0); } }
}

/* -------------------------------------------------------------- sections -- */

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section--fond { background: var(--fond-2); }
.section__intro { max-width: 60ch; margin-bottom: 3rem; }
.eyebrow {
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .8rem; font-weight: 600;
}
.section__intro p { color: var(--encre-douce); font-size: 1.08rem; }

.grille { display: grid; gap: 1.6rem; }
.grille--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grille--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grille--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------------------------------------------------------------- cartes -- */

.carte {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.carte:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -28px rgba(0,0,0,.5); }
.carte__image { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--fond-2); }
.carte__corps { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; gap: .6rem; }
.carte__corps p { color: var(--encre-douce); font-size: .96rem; margin: 0; }

.attributs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .2rem 0 0; }
.attributs li {
  font-size: .78rem; padding: .18rem .55rem;
  border: 1px solid var(--ligne); border-radius: 999px;
  color: var(--encre-douce);
}

/* Le prix est un engagement : il se lit d'un coup d'œil, filet compris.
   « Sur demande » n'est pas un échec — c'est une réponse honnête tant que la
   direction n'a pas saisi ses tarifs, et elle vaut mieux qu'un « 0 FCFA ». */
.prix {
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--ligne);
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
}
.prix__valeur { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.prix__unite { font-size: .82rem; color: var(--encre-douce); }
.prix--demande .prix__valeur { font-size: 1.15rem; color: var(--encre-douce); font-style: italic; }

/* --------------------------------------------------------------- boutons -- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: .02em;
  padding: .75rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--rayon-petit);
  background: var(--accent); color: #fff;
  text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .1s ease;
}
.bouton:hover { background: var(--accent-clair); border-color: var(--accent-clair); }
.bouton:active { transform: translateY(1px); }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }
.bouton--fantome { background: transparent; color: var(--encre); border-color: var(--ligne); }
.bouton--fantome:hover { background: var(--fond-2); border-color: var(--accent); color: var(--encre); }
.bouton--clair { background: #fff; color: var(--primaire); border-color: #fff; }
.bouton--large { width: 100%; }

/* ----------------------------------------------------------- restaurant -- */

.carte-menu { display: grid; gap: 2.4rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.carte-menu__groupe h3 {
  font-size: .82rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid var(--ligne); padding-bottom: .6rem;
}
.plat { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; align-items: baseline; }
.plat__nom { font-weight: 600; }
.plat__desc { font-size: .88rem; color: var(--encre-douce); }
.plat__prix { font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; }
.plat__jour::after {
  content: "du jour"; margin-left: .5rem; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent);
  padding: .05rem .4rem; border-radius: 999px; vertical-align: middle;
}

/* -------------------------------------------------------------- tunnel --- */

.tunnel {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in srgb, var(--primaire-sombre) 82%, transparent);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; overflow-y: auto;
}
.tunnel[open], .tunnel.ouvert { display: flex; }
.tunnel__panneau {
  background: var(--fond); color: var(--encre);
  border-radius: var(--rayon); width: min(560px, 100%);
  padding: 1.8rem; box-shadow: 0 40px 90px -40px rgba(0,0,0,.8);
}
.tunnel__fermer {
  float: right; background: none; border: 0; font-size: 1.6rem; line-height: 1;
  color: var(--encre-douce); cursor: pointer; padding: 0 .3rem;
}
.champ { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.champ label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.champ textarea { min-height: 90px; resize: vertical; }

.recap { background: var(--fond-2); border-radius: var(--rayon-petit); padding: 1rem; margin-bottom: 1.2rem; }
.recap__ligne { display: flex; justify-content: space-between; gap: 1rem; font-size: .94rem; padding: .2rem 0; }
.recap__total {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--ligne); margin-top: .6rem; padding-top: .6rem;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
}

.extras { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.extra {
  display: flex; align-items: center; gap: .7rem;
  border: 1px solid var(--ligne); border-radius: var(--rayon-petit); padding: .7rem .9rem;
  cursor: pointer;
}
.extra:has(input:checked) { border-color: var(--accent); background: var(--accent-pale); }
.extra input { width: 18px; height: 18px; accent-color: var(--accent); }
.extra__prix { margin-left: auto; font-weight: 600; white-space: nowrap; }

.paliers { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.palier {
  flex: 1 1 auto; padding: .6rem .8rem; text-align: center;
  border: 1px solid var(--ligne); border-radius: var(--rayon-petit);
  background: var(--carte); cursor: pointer; font: inherit; font-size: .9rem;
}
.palier[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-pale); font-weight: 600; }

.message { padding: .8rem 1rem; border-radius: var(--rayon-petit); font-size: .93rem; margin-bottom: 1rem; }
.message--erreur { background: color-mix(in srgb, #c0392b 14%, var(--fond)); border: 1px solid color-mix(in srgb, #c0392b 40%, var(--fond)); }
.message--ok { background: color-mix(in srgb, #1e8449 14%, var(--fond)); border: 1px solid color-mix(in srgb, #1e8449 40%, var(--fond)); }
.message--info { background: var(--fond-2); border: 1px solid var(--ligne); }

.attente { display: flex; align-items: center; gap: .8rem; }
.attente__rond {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ligne); border-top-color: var(--accent);
  animation: tourne .9s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- résultats -- */

.resultat { display: grid; grid-template-columns: 200px 1fr auto; gap: 1.2rem; align-items: center;
  border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1rem; background: var(--carte); }
.resultat img { border-radius: var(--rayon-petit); aspect-ratio: 4/3; object-fit: cover; }
.resultat--indisponible { opacity: .55; }
@media (max-width: 700px) {
  .resultat { grid-template-columns: 1fr; }
  .resultat img { aspect-ratio: 16/9; }
}

/* ---------------------------------------------------------------- galerie -- */

.galerie { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.galerie img { aspect-ratio: 1; object-fit: cover; border-radius: var(--rayon-petit); }
.galerie img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }

/* ------------------------------------------------------------------ pied -- */

.pied {
  background: var(--primaire-sombre); color: color-mix(in srgb, #fff 82%, transparent);
  padding: 4rem 4vw 6rem;
}
.pied a { color: inherit; }
.pied h4 { color: #fff; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; }
.pied__bas {
  border-top: 1px solid color-mix(in srgb, #fff 15%, transparent);
  margin-top: 2.5rem; padding-top: 1.5rem; font-size: .84rem; opacity: .75;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* Le comptoir fixe recouvre le bas de page sur mobile : on rend la place. */
@media (max-width: 900px) { .pied { padding-bottom: 8rem; } }

/* --------------------------------------------------------------- annonce -- */

.annonce {
  background: var(--accent); color: #fff; text-align: center;
  padding: .6rem 1rem; font-size: .9rem; position: relative; z-index: 55;
}

/* ------------------------------------------------------ révélation douce -- */
/*  Une seule animation au défilement, appliquée aux blocs de contenu. Plus
    serait du bruit : le sujet, ce sont les chambres, pas les transitions.   */
.revele { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.revele.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .revele { opacity: 1; transform: none; } }

.invisible { display: none !important; }
.discret { color: var(--encre-douce); font-size: .88rem; }
