/* ==========================================================================
   Le Clos de Gamel — feuille de style du site
   Chargée APRÈS Bootstrap 5.2.3 : à spécificité égale, les règles ci-dessous
   l'emportent. Les sélecteurs de la navbar sont volontairement contextuels
   pour passer devant `.navbar-expand-lg .navbar-nav .nav-link` (0,3,0).
   ========================================================================== */

/* --- Police du site, servie depuis nos serveurs -------------------------
   Plus aucune requête vers Google Fonts : l'adresse IP des visiteurs n'est
   transmise à personne. */
@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dancing-script-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dancing-script-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Base ---------------------------------------------------------------- */
body {
  background: #5a7890;
  font-family: 'Dancing Script', serif;
  --bs-body-font-weight: 500;
  font-size: 22px;
}

p { color: #fff; }

@media (min-width: 1200px) {
  p { font-size: 34px; }
}

img { object-fit: cover; }

iframe {
  transition: opacity .5s ease-in-out 250ms;
  min-width: 70%;
  min-height: 500px;
}

/* --- Titres -------------------------------------------------------------- */
h1 {
  font-size: 55px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 14px rgba(0, 0, 0);
  font-family: 'Dancing Script', serif;
  text-align: center;
}

h2 { font-size: 34px; }

h3 {
  font-size: 34px;
  text-shadow: 0 0 14px #000;
  font-family: 'Dancing Script', serif;
  color: #fff;
  text-align: center;
}

/* Petits écrans : à 55 px, « Bienvenue au Clos de Gamel » est plus large que
   l'écran et débordait à droite — un flex item ne rétrécit pas sous la taille
   de son contenu tant que min-width vaut auto. */
@media (max-width: 575.98px) {
  h1 { font-size: 38px; }
  h3 { font-size: 22px; }
  .HeadingDiv { gap: 6rem; }
}

.HeadingDiv { max-width: 100%; min-width: 0; }
/* Les titres du hero portent la classe Bootstrap « d-flex » : leur texte devient
   un flex item anonyme, qui ne se coupe pas en fin de ligne et sort de l'écran.
   On les repasse en bloc — il faut !important, d-flex en porte un. */
.HeadingDiv h1, .HeadingDiv h3 {
  display: block !important;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  h1, h3 { text-align: left; }
}

@media (min-width: 992px) {
  h1 { font-size: 104px; }
  h3 { font-size: 55px; }
}

/* --- Navigation ---------------------------------------------------------- */
.navbar {
  transition: none;
  position: absolute;
  width: 100%;
  z-index: 590;
}

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

.navbar-logo { height: 50px; }

/* 0,3,0 : nécessaire pour battre le padding horizontal de Bootstrap */
.navbar-nav .nav-link.nav-link-main {
  font-size: 21px;
  padding: 7px;
}

.nav-link-lg { font-size: 21px; }       /* entrées du menu déroulant + icônes sociales */
.nav-link-toggle { font-size: 20px; }   /* « Nos hébergements » */

.social-icon {
  width: 32px;
  height: 32px;
}

/* --- Hero (fond vidéo YouTube via data-vbg) ------------------------------ */
.hero { min-height: 100vh; }

.HeadingDiv {
  padding: 10px;
  z-index: 100;
  gap: 13rem;
}

@media (min-width: 576px) {
  .HeadingDiv { padding: 52px; }
}

/* --- Sections ------------------------------------------------------------ */
.section { padding: 40px; }

.section-white {
  margin-top: 0;
  background: #ffffff;
}

.section-title {
  color: #5a7890;
  margin-bottom: 55px;
  margin-top: -84px;
}

.section-title.section-title--tight { margin-top: -43px; }

.section-title-light { color: rgb(255, 255, 255); }

/* --- Séparateurs en vague ------------------------------------------------
   Les marges négatives font volontairement chevaucher la vague sur les
   sections voisines : les modifier décale le raccord. */
.wave {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.wave--1 {
  background-image: url("/assets/img/wave1.svg");
  height: 198px;
  margin-top: -62px;
  margin-bottom: -8px;
}

.wave--2 {
  background-image: url("/assets/img/wave2.svg");
  height: 295px;
  margin-top: -140px;
  margin-bottom: -107px;
}

.wave--1-tail {
  background-image: url("/assets/img/wave1.svg");
  height: 191px;
  margin-top: -136px;
}

/* --- Texte --------------------------------------------------------------- */
.text-brand {
  color: #5a7890;
  font-size: 24px;
}

.text-lg { font-size: 24px; }
.text-md { font-size: 22px; }

/* --- Galeries (lightbox fsLightbox) -------------------------------------- */
.img-gallery {
  aspect-ratio: 16/9;
  border-radius: 20px;
}

.gallery-col { padding: 14px; }
.gallery-col-lg { padding: 30px; }

/* seconde image empilée dans une même colonne */
.img-stack { margin-top: 24px; }

/* --- Bandeau partenaires (Gîtes de France, ANCV, ICE, Charmance) --------- */
.partners {
  background: #ffffff;
  padding-top: 25px;
  padding-bottom: 25px;
}

.partners-row { padding: 100px; }

.partner-item {
  margin-top: 30px;
  margin-bottom: 30px;
}

.partner-logo {
  padding-right: 34px;
  padding-left: 34px;
}

/* --- Carte Google Maps --------------------------------------------------- */
.map-embed {
  margin-top: 56px;
  margin-bottom: 56px;
}

/* --- Utilitaires d'espacement ponctuels ---------------------------------- */
.pt-13 { padding-top: 13px; }
.pt-20 { padding-top: 20px; }
.pt-56 { padding-top: 56px; }
.pb-50 { padding-bottom: 50px; }

/* --- Fond vidéo du hero --------------------------------------------------
   Le flux vient de YouTube (domaine nocookie) : c'est lui qui adapte la
   qualité au débit du visiteur, ce qu'un fichier servi par l'hébergement ne
   sait pas faire. app.js n'insère le lecteur qu'au-dessus de 1024 px ; en
   dessous, et tant qu'il n'est pas inséré, l'image de fond ci-dessous reste
   seule à l'écran. */
.hero { position: relative; overflow: hidden; }

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Une iframe YouTube garde son format 16/9 : on la dimensionne au plus grand
   des deux côtés puis on la recentre, pour couvrir l'écran sans déformation
   — l'équivalent de object-fit: cover, qui ne s'applique pas à une iframe. */
.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;          /* 100 / (16/9) */
  min-width: 177.78vh;      /* 100 * (16/9) */
  min-height: 100vh;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

/* Voile posé par-dessus le lecteur YouTube le temps qu'il démarre : il
   reprend l'image d'accueil, et s'efface en fondu. L'iframe, elle, ne change
   jamais de visibilité — sans quoi YouTube réaffiche ses contrôles. */
.hero-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("/assets/img/hero-poster.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  /* fondu court : pendant la transition le voile est semi-transparent,
     et laisserait entrevoir ce qu'il doit masquer. */
  transition: opacity .5s ease-out;
  pointer-events: none;
}

.hero-cover.is-gone { opacity: 0; }

/* Sur mobile le fond est une balise <video> servie par le site : contrairement
   à une iframe, object-fit suffit à la cadrer, sans gymnastique de vw/vh.

   Elle reste VISIBLE en permanence : masquer une vidéo (opacity, visibility)
   conduit les navigateurs mobiles à en suspendre la lecture pour économiser
   la batterie — l'événement "playing" ne survient alors jamais et la vidéo
   n'est jamais dévoilée. Son attribut poster couvre l'attente. */
.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  pointer-events: none;
}

.hero .HeadingDiv { position: relative; z-index: 100; }

/* lisibilité du titre par-dessus l'image, quelle que soit la frame */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, .35) 100%);
  pointer-events: none;
}

/* --- Façades : carte et vidéo ne partent qu'au clic ----------------------
   Tant que le visiteur n'a rien demandé, aucune requête ne part vers Google
   ou YouTube, donc aucun cookie tiers n'est déposé. */
.facade {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  min-width: 70%;
  border-radius: 12px;
  overflow: hidden;
  background: #5a7890;
}

.facade-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.55);
}

.facade-box {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem;
  text-align: center;
}

.facade-btn {
  font-family: 'Dancing Script', serif;
  font-size: 28px;
  font-weight: 700;
  color: #35505f;
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: .6rem 2rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.facade-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.facade-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.facade-note {
  color: #fff;
  font-size: 17px;
  margin: 0;
  max-width: 34ch;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.facade-alt { color: #fff; font-size: 17px; }
.facade-alt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* --- Pied de page -------------------------------------------------------- */
.site-footer {
  background: #35505f;
  padding: 2.5rem 0;
  text-align: center;
}

.site-footer p { color: #fff; margin: 0 0 .4rem; font-size: 19px; }
.footer-brand { font-size: 24px; }
.site-footer a { color: #fff; }
.site-footer a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .facade-btn, .hero-cover { transition: none; }
}

/* --- Correctifs de cascade (à garder en fin de fichier) -------------------
   La règle générale `.HeadingDiv { gap: 13rem }` est déclarée APRÈS le media
   query mobile du haut de ce fichier : elle l'écrasait. Sur un téléphone,
   208 px séparaient donc le titre du sous-titre, le bloc dépassait la hauteur
   du hero, et `overflow: hidden` rognait le haut du titre — on ne lisait plus
   que « de Gamel ». Ces règles-ci viennent en dernier et gagnent. */
@media (max-width: 575.98px) {
  h1 { font-size: 34px; }
  h3 { font-size: 20px; }
  .HeadingDiv { gap: 2rem; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .HeadingDiv { gap: 5rem; }
}
