:root {
  --chaux: #fdfdfc;
  --ardoise: #2f363d;
  --rouge: #d7322e;
  --rade: #1f4e8c;
  --granit: #c3c0b8;
  --brume: #eef1f4;
  --titre: "Young Serif", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--chaux);
  color: var(--ardoise);
  font: 1.0625rem/1.55 "Atkinson Hyperlegible", system-ui, sans-serif;
}

h1, h2 { font-family: var(--titre); font-weight: 400; margin: 0 0 .5em; }
h2 { font-size: 1.75rem; line-height: 1.2; color: var(--rade); }
p { max-width: 62ch; }
img { display: block; max-width: 100%; height: auto; } /* width/height du HTML : proportions seulement */

:focus-visible { outline: 3px solid var(--rade); outline-offset: 2px; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 5rem; }

/* Menu fixe en haut */
.menu {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.75rem;
  padding: .75rem max(1.5rem, calc((100% - 77rem) / 2));
  background: rgba(253, 253, 252, .94);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--granit);
}
.menu a { color: var(--ardoise); text-decoration: none; font-weight: 700; }
.menu a:hover { color: var(--rouge); }
.menu-nom { font-family: var(--titre); font-weight: 400 !important; font-size: 1.5rem; color: var(--rouge) !important; margin-right: auto; }
.menu .menu-reserver { background: var(--rouge); color: var(--chaux); padding: .55rem 1.2rem; border-radius: 99px; }
.menu .menu-reserver:hover { background: #b0241f; color: var(--chaux); }

/* Diaporama : fondu entre les photos, zoom lent sur la photo affichée */
.diaporama { position: relative; height: min(72vh, 42rem); overflow: hidden; background: var(--rade); }
.diaporama img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease;
}
.diaporama img.actif { opacity: 1; animation: zoom 6s ease-out forwards; }
@keyframes zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
/* Dégradé sombre en bas, pour lire le nom sur la photo */
.diaporama::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 20, 35, .7), rgba(10, 20, 35, 0) 55%);
}
.diapo-titre {
  position: absolute; z-index: 1;
  left: max(1.5rem, calc((100% - 77rem) / 2)); bottom: 4.5rem;
  max-width: min(36rem, calc(100% - 3rem));
  color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.diapo-titre h1 { font-size: clamp(3.5rem, 9vw, 7rem); line-height: .9; color: #fff; margin: 0 0 .75rem; }
.diapo-titre p { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 700; }
.diapo-titre .diapo-lieu { font-size: 1.05rem; font-weight: 400; margin-top: .25rem; }
.diapo-commandes {
  z-index: 1;
  position: absolute; left: max(1.5rem, calc((100% - 77rem) / 2)); bottom: 1.5rem;
  display: flex; align-items: center; gap: .75rem;
}
#diapo-pause {
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; font-size: .9rem;
}
#diapo-points { display: flex; gap: .5rem; }
#diapo-points button {
  width: .8rem; height: .8rem; padding: 0; border: 2px solid #fff; border-radius: 50%;
  background: transparent; cursor: pointer; box-shadow: 0 0 4px rgba(0, 0, 0, .5);
}
#diapo-points [aria-current] { background: #fff; }

/* Nom et calendrier côte à côte */
.haut {
  display: grid;
  grid-template-columns: 1fr minmax(0, 26rem);
  gap: 3rem;
  align-items: start;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.logo { width: 7rem; margin-bottom: 1rem; }
.accroche { font-size: 1.2rem; }

/* Le calendrier dépasse sur le bandeau, comme une affiche posée dessus */
.calendrier {
  position: relative; /* passe au-dessus du diaporama */
  margin-top: -7rem;
  background: var(--chaux);
  border-top: 6px solid var(--rouge);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(31, 78, 140, .18);
  padding: 1.5rem;
}
.calendrier h2 { font-size: 1.35rem; }

.nav { display: flex; align-items: center; justify-content: space-between; }
.nav p { margin: 0; font-weight: 700; text-transform: capitalize; }
.nav button {
  width: 2.75rem; height: 2.75rem;
  font-size: 1.5rem; line-height: 1;
  background: none; color: var(--rade);
  border: 2px solid var(--rade); border-radius: 50%;
  cursor: pointer;
}
.nav button:disabled { opacity: .3; cursor: default; }

.jours, .grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jours { margin: 1rem 0 .25rem; font-size: .85rem; text-align: center; color: #5b636b; }

.grille button {
  aspect-ratio: 1;
  font: inherit;
  background: none;
  color: var(--ardoise);
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.grille button:hover:not(:disabled) { border-color: var(--rade); }
.grille button:disabled { color: #8b9198; cursor: default; }

/* Jours pris : des volets fermés */
.grille .pris, .pastille.pris {
  background: repeating-linear-gradient(var(--granit) 0 3px, transparent 3px 6px);
  color: #5b636b;
}
.grille .ferme, .pastille.ferme { background: var(--brume); color: #a3a8ae; }
.grille .entre { background: #f6d3d1; }
.regles { font-size: .9rem; margin: -.25rem 0 .75rem; color: #5b636b; }
.grille .choisi, .pastille.choisi { background: var(--rouge); color: var(--chaux); font-weight: 700; }

.legende { display: flex; gap: 1.25rem; font-size: .9rem; margin: 1rem 0 .5rem; }
.legende span { display: flex; align-items: center; gap: .4rem; }
.pastille { display: inline-block; width: 1rem; height: 1rem; border-radius: 2px; }

#resume { min-height: 3.1em; margin: 0; font-weight: 700; }
.bouton {
  display: block; margin-top: 1rem; padding: .8rem 1rem;
  background: var(--rouge); color: var(--chaux);
  text-align: center; font-weight: 700; text-decoration: none; border-radius: 99px;
}
.bouton:hover { background: #b0241f; }
.bouton[hidden] { display: none; }

/* Contenu */
main { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
main > section { padding: 2.5rem 0; }

/* Fond coloré sur toute la largeur de l'écran */
.bande { background: var(--brume); box-shadow: 0 0 0 100vmax var(--brume); clip-path: inset(0 -100vmax); }

.titre dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--granit);
}
.titre dt { font-size: .9rem; color: #5b636b; }
.titre dd { margin: 0; font-family: var(--titre); font-size: 1.3rem; color: var(--rade); }

/* Les 5 chambres, chacune avec son nom */
.chambres { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.chambres figure { margin: 0; }
/* Pastille « Voir les photos » sur chaque chambre */
.chambres a { position: relative; display: block; overflow: hidden; border-radius: 4px 4px 0 0; }
.chambres a::after {
  content: "Voir les photos"; position: absolute; right: .5rem; bottom: 1rem;
  padding: .3rem .7rem; border-radius: 99px;
  background: rgba(20, 24, 28, .7); color: #fff; font-size: .8rem; font-weight: 700;
}
.chambres img { transition: transform .4s ease; }
.chambres a:hover img { transform: scale(1.04); }
.chambres img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px 4px 0 0; border-bottom: 8px solid var(--theme); }
.chambres figcaption { font-family: var(--titre); font-size: 1.15rem; margin-top: .5rem; }
.chambres small { display: block; font: .9rem/1.4 "Atkinson Hyperlegible", system-ui, sans-serif; color: #5b636b; margin-top: .2rem; }

.avis { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.avis blockquote { margin: 0; padding-left: 1rem; border-left: 4px solid var(--rouge); }
.avis p { margin: 0 0 .5rem; font-size: 1.05rem; }
.avis cite { font-style: normal; font-weight: 700; color: var(--rade); }

/* Galeries : grille sans trous, la 1re photo en grand. Cliquer ouvre la photo. */
.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  grid-auto-rows: 13rem;
  grid-auto-flow: dense;
  gap: .75rem;
}
.galerie a:first-child { grid-column: span 2; grid-row: span 2; }
.galerie a.portrait { grid-row: span 2; } /* photo verticale : deux cases en hauteur, pas de recadrage serré */
.galerie a { overflow: hidden; border-radius: 4px; }
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.galerie a:hover img { transform: scale(1.04); }

/* Visionneuse plein écran */
#visionneuse {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 3rem 4.5rem; border: 0;
  background: rgba(20, 24, 28, .94);
}
#visionneuse[open] { display: grid; place-items: center; }
/* La photo tient toujours dans l'écran, marges comprises (la croix et les flèches restent visibles). */
#visionneuse img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 4px; }
#visionneuse button {
  position: absolute; width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
#visionneuse button:hover { background: rgba(255, 255, 255, .3); }
.v-fermer { top: 1rem; right: 1rem; }
.v-prec { left: 1rem; top: calc(50% - 1.5rem); }
.v-suiv { right: 1rem; top: calc(50% - 1.5rem); }

/* Vidéo : bande bleu nuit sur toute la largeur, image cliquable puis lecteur YouTube */
main > section.video {
  background: #102a4c; box-shadow: 0 0 0 100vmax #102a4c; clip-path: inset(0 -100vmax);
  color: var(--chaux); text-align: center; padding: 4rem 0;
}
.video h2 { color: var(--chaux); font-size: clamp(2rem, 4vw, 3rem); }
.video p { margin-left: auto; margin-right: auto; }
.video-lancer, .video-cadre {
  display: block; width: 100%; max-width: 1100px; aspect-ratio: 16 / 9;
  margin: 2rem auto 1rem; border: 0; border-radius: 6px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.video-lancer { position: relative; padding: 0; cursor: pointer; background: #000; }
.video-lancer img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; opacity: .85; }
.video-lancer:hover img { transform: scale(1.03); opacity: 1; }
.video-play {
  position: absolute; top: 50%; left: 50%; width: 5.5rem; height: 5.5rem; margin: -2.75rem 0 0 -2.75rem;
  border-radius: 50%; background: var(--rouge); box-shadow: 0 0 0 10px rgba(215, 50, 46, .3);
  transition: transform .3s ease;
}
.video-play::after { /* triangle lecture */
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 1rem 0 1rem 1.6rem; border-color: transparent transparent transparent #fff;
}
.video-lancer:hover .video-play { transform: scale(1.1); }
.video-note { font-size: .85rem; opacity: .7; }

.demande { border-top: 6px solid var(--rouge); }
.demande form { display: grid; gap: 1rem; max-width: 34rem; }
.sejour { margin: 0; padding: .75rem 1rem; background: var(--brume); border-left: 4px solid var(--rouge); }
label { display: grid; gap: .3rem; font-weight: 700; }
input, textarea, select {
  font: inherit; font-weight: 400;
  padding: .6rem .75rem;
  background: var(--chaux);
  color: var(--ardoise);
  border: 1px solid #8b9198;
  border-radius: 4px;
}
form button {
  justify-self: start;
  font: inherit; font-weight: 700;
  padding: .8rem 1.5rem;
  background: var(--rouge);
  color: var(--chaux);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
form button:hover { background: #b0241f; }
#etat:empty { display: none; }
.piege { position: absolute; left: -9999px; } /* champ piège à robots, invisible */
form button:disabled { opacity: .6; cursor: wait; }

footer { background: var(--rade); color: var(--chaux); padding: 2rem 1.5rem 3rem; text-align: center; }
footer a { color: var(--chaux); }
footer p { margin: .3rem auto; }
footer .credits { font-size: .8rem; opacity: .8; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .diaporama img, .galerie img, .chambres img { transition: none; }
  .diaporama img.actif { animation: none; }
}

@media (max-width: 52rem) {
  .menu a:not(.menu-nom, .menu-reserver) { display: none; }
  .diaporama { height: 50vh; }
  #visionneuse { padding: 3.5rem .5rem; }
  .v-prec, .v-suiv { top: auto; bottom: 1rem; }
  .haut { grid-template-columns: 1fr; gap: 2rem; padding-top: 2rem; }
  .calendrier { margin-top: 0; }
  .galerie { grid-template-columns: 1fr 1fr; grid-auto-rows: 9rem; }
}
