/* ==========================================================================
   COMPOSANTS — éléments qui reviennent sur plusieurs pages :
   en-tête et menu, boutons, cartes, formulaire, galeries, visionneuse, vidéo, pied de page
   ========================================================================== */

/* ------------------------------------------------------------- EN-TÊTE */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  transition: height .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { height: var(--header-h-small); box-shadow: 0 2px 14px rgba(0, 0, 0, .14); }

.site-header__bar {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.brand { display: block; flex: none; line-height: 0; }
.brand img { width: 291px; height: auto; transition: width .25s ease; }
.is-scrolled .brand img { width: 230px; }

.nav {
  display: flex; align-items: stretch; gap: 26px;
  height: var(--header-h);
  margin: 0; padding: 0; list-style: none;
  transition: height .25s ease;
}
.is-scrolled .nav { height: var(--header-h-small); }

.nav__item { position: relative; display: flex; align-items: center; }

.nav__link, .subnav__link {
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px; line-height: 1.6;
  color: var(--navy);
  text-decoration: none;
  background: none; border: 0; padding: 8px 0; margin: 0;
  cursor: pointer;
}
.nav__link { position: relative; }
.nav__link::before {                 /* soulignement qui apparaît au survol */
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.6px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav__link:hover::before, .nav__link[aria-current="page"]::before,
.is-current-branch > .nav__link::before, .nav__item--has-sub.is-open > .nav__link::before { transform: scaleX(1); }

.nav__sub-toggle::after {            /* petite flèche du sous-menu */
  content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 2px 3px 9px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease;
}
.nav__item--has-sub.is-open .nav__sub-toggle::after { transform: rotate(225deg); margin-bottom: 0; }

.subnav {
  position: absolute; top: 100%; left: -20px; z-index: 5;
  width: 240px; margin: 0; padding: 20px 0; list-style: none;
  background: var(--white);
  border-top: 2.4px solid #000051;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.nav__item--has-sub.is-open > .subnav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) and (min-width: 981px) {
  .nav__item--has-sub:hover > .subnav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__item--has-sub:hover > .nav__link::before { transform: scaleX(1); }
  .nav__item--has-sub.is-dismissed > .subnav { opacity: 0; visibility: hidden; transform: translateY(8px); }
}
.subnav__link { display: block; padding: 6px 20px; line-height: 28px; transition: background-color .15s ease; }
.subnav__link:hover, .subnav__link[aria-current="page"] { background: rgba(0, 4, 85, .06); }

/* Bouton « hamburger » (écrans étroits) */
.nav-toggle {
  display: none;
  width: 48px; height: 48px; margin-right: -10px;
  background: none; border: 0; cursor: pointer; color: var(--navy);
  align-items: center; justify-content: center;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 26px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s ease, background-color .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -8px; }
.nav-toggle__bars::after  { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 980px) {
  :root { --header-h: 68px; --header-h-small: 60px; }
  .brand img { width: 220px; }
  .is-scrolled .brand img { width: 200px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .is-scrolled .site-nav { top: var(--header-h-small); }
  .is-nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }

  .nav { flex-direction: column; gap: 0; height: auto; padding: 8px var(--gutter) 20px; }
  .is-scrolled .nav { height: auto; }
  .nav__item { display: block; border-bottom: 1px solid rgba(0, 4, 85, .1); }
  .nav__link, .subnav__link { display: block; width: 100%; min-height: 48px; padding: 12px 0; font-size: 17px; text-align: left; }
  .nav__link::before { display: none; }
  .nav__sub-toggle { display: flex; align-items: center; justify-content: space-between; }
  .nav__sub-toggle::after { margin-right: 6px; }

  .subnav {
    position: static; width: auto; padding: 0 0 8px 16px;
    border: 0; box-shadow: none; background: transparent;
    display: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav__item--has-sub.is-open > .subnav { display: block; }
  .subnav__link { padding: 10px 0; line-height: 1.5; font-size: 16px; min-height: 44px; }
  .subnav__link:hover, .subnav__link[aria-current="page"] { background: none; text-decoration: underline; }
}

/* ------------------------------------------------------------- BOUTONS */
.btn {
  display: inline-block;
  padding: 6px 20px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.7;
  text-align: center; text-decoration: none;
  color: var(--navy);
  background: transparent;
  border: 1.6px solid currentColor;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.btn--outline-light { color: var(--white); font-weight: 400; border-width: .8px; border-radius: 2px; }
.btn--outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.btn--pill { color: var(--white); font-size: 16px; padding: 3px 16px; border-radius: 48px; }
.btn--pill:hover { background: var(--white); color: #000; border-color: var(--white); }

.btn--outline-dark { font-size: 18px; }

/* ------------------------------------------------------------- CARTE BLANCHE (texte centré sur fond bleu) */
.card {
  width: min(638px, 100%);
  margin: 0 auto;
  padding: 43px 45px 56px;
  text-align: center;
  background: var(--white);
  border: 9px solid rgba(0, 0, 0, .18);
  border-radius: 4px;
  box-shadow: 6px 6px 18px rgba(0, 0, 0, .63);
}
.card__icon { display: block; width: 100px; height: 100px; margin: 0 auto 8px; }
.card__portrait { display: block; width: 191px; height: auto; margin: 0 auto 18px; }
.card__portrait img { width: 191px; height: auto; }
.card__title {
  margin: 0 0 6px;
  font-family: var(--font-serif); font-weight: 700; font-size: 31px; line-height: 1.5;
  color: var(--navy);
}
.card__kicker {
  margin: 0 0 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 2.2; letter-spacing: -1px;
  color: var(--navy-deep);
}
.card__text { margin: 0 0 6px; font-size: 22px; line-height: 1.35; color: var(--text); }
.card__actions { margin: 28px 0 0; }

@media (max-width: 640px) {
  .card { padding: 30px 22px 38px; border-width: 7px; }
  .card__icon { width: 84px; height: 84px; }
  .card__portrait, .card__portrait img { width: 150px; }
  .card__title { font-size: 25px; }
  .card__kicker { font-size: 16px; line-height: 1.8; letter-spacing: -.5px; }
  .card__text { font-size: 18px; }
}

/* ------------------------------------------------------------- FORMULAIRE */
.contact-form { width: min(834px, 100%); margin: 0 auto; }
.contact-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.field { margin: 0; }
.field--full { grid-column: 1 / -1; }

.input {
  display: block; width: 100%;
  padding: 16px;
  font-family: var(--font-body); font-weight: 500; font-size: 17px; line-height: 1.4;
  color: var(--text);
  background: var(--field);
  border: 0; border-radius: 0;
  appearance: none; -webkit-appearance: none;
}
.input::placeholder { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: #999; opacity: 1; }
.input--area { min-height: 150px; resize: vertical; }
.input:focus { outline: 2px solid var(--navy); outline-offset: 0; background: #e6e6ee; }
.input[aria-invalid="true"] { outline: 2px solid var(--danger); }

.contact-form__actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 25px; }
.form-status { flex: 1; min-height: 1.5em; margin: 0; font-size: 15px; line-height: 1.4; color: var(--navy); }
.form-status.is-error { color: var(--danger); }
.btn--submit { flex: none; }
.btn--submit[disabled] { opacity: .55; cursor: progress; }

.contact-form--dark { width: min(855px, 100%); margin-top: 56px; }
.contact-form--dark .input { box-shadow: inset 0 0 18px rgba(0, 0, 0, .12); }
.contact-form--dark .input:focus { outline-color: var(--white); background: #f3f3f8; }
.contact-form--dark .btn--submit { color: var(--white); border-width: 2px; }
.contact-form--dark .btn--submit:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.contact-form--dark .form-status { color: var(--white); }
.contact-form--dark .form-status.is-error { color: #ffb3b3; }
.contact-form--dark .input[aria-invalid="true"] { outline-color: #ffb3b3; }

/* Piège à robots : hors écran, invisible pour les humains */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 700px) {
  .contact-form__grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-form__actions { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .btn--submit { width: 100%; }
}

/* ------------------------------------------------------------- GALERIES */
.gallery-section { background: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0; padding: 0; list-style: none; }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 759px) { .gallery, .gallery--3 { grid-template-columns: repeat(2, 1fr); } }

.gallery__link { position: relative; display: block; overflow: hidden; aspect-ratio: 400 / 284; background: #c9cde4; }
.gallery__link picture { display: block; width: 100%; height: 100%; }
.gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery__link::after {              /* voile bleu + « + » au survol */
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 4, 85, 0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Ccircle cx='28' cy='28' r='27' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M28 17v22M17 28h22' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 56px no-repeat;
  background-blend-mode: normal;
  opacity: 0; transition: opacity .3s ease;
}
.gallery__link:hover::after, .gallery__link:focus-visible::after { opacity: 1; background-color: rgba(0, 4, 85, .35); }
.gallery__link:hover .gallery__img { transform: scale(1.05); }
.gallery__link:focus-visible { outline-offset: -4px; }

/* ------------------------------------------------------------- VISIONNEUSE DE PHOTOS (<dialog>) */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  color: var(--white); background: transparent;
}
.lightbox::backdrop { background: rgba(0, 2, 36, .94); }
.lightbox[open] { animation: lb-in .25s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px 72px 72px; touch-action: pan-y; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 8px 40px rgba(0, 0, 0, .6); user-select: none; -webkit-user-drag: none; }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; padding: 0 72px; text-align: center; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .85); }
.lightbox__count { position: absolute; top: 22px; left: 22px; font-size: 14px; letter-spacing: .08em; color: rgba(255, 255, 255, .8); }

.lightbox__btn {
  position: absolute; width: 48px; height: 48px; padding: 0;
  display: grid; place-items: center;
  color: var(--white); background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%;
  cursor: pointer; transition: background-color .2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev, .lightbox__next { top: 50%; margin-top: -24px; }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }
.lightbox__btn[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 700px) {
  .lightbox__stage { padding: 60px 0 64px; }
  .lightbox__caption { padding: 0 16px; bottom: 14px; font-size: 13px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 64px; margin: 0; width: 44px; height: 44px; background: rgba(0, 2, 36, .55); }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
}

/* ------------------------------------------------------------- VIDÉO YOUTUBE « à la demande » */
.video-frame {
  position: relative;
  width: min(784px, 100%); aspect-ratio: 16 / 9;
  background: #000;
  border: 6.4px solid var(--white);
  box-shadow: 0 2px 80px #000;
}
.video-frame__play { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-frame__play picture { display: block; width: 100%; height: 100%; }
.video-frame__poster { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.video-frame__play:hover .video-frame__poster { opacity: .9; }
.video-frame__icon {
  position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px;
  background: rgba(0, 4, 85, .86); border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .5);
  transition: transform .25s ease, background-color .25s ease;
}
.video-frame__icon::before {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -15px 0 0 -9px;
  border-style: solid; border-width: 15px 0 15px 26px; border-color: transparent transparent transparent var(--white);
}
.video-frame__play:hover .video-frame__icon { transform: scale(1.08); background: rgba(0, 4, 85, .95); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame__fallback { position: absolute; inset: auto 0 12px; text-align: center; color: var(--white); }

/* Vidéo verticale (hébergée sur le site) */
.video-vertical {
  width: min(420px, 100%, calc((100vh - 150px) * 9 / 16));
  width: min(420px, 100%, calc((100svh - 150px) * 9 / 16));
  aspect-ratio: 9 / 16;
  margin: 56px auto 0;
  background: #000;
  border: 6.4px solid var(--white);
  box-shadow: 0 2px 40px rgba(0, 0, 0, .65);
}
.video-vertical video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }

@media (max-width: 640px) {
  .video-frame__icon { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .video-frame__icon::before { margin: -12px 0 0 -7px; border-width: 12px 0 12px 20px; }
  .video-frame { border-width: 4px; }
  .video-vertical { margin-top: 36px; width: min(420px, 100%); }
}

/* ------------------------------------------------------------- PIED DE PAGE */
.site-footer { background: var(--white); }

.footer-rooms { padding: 92px var(--gutter); background: var(--navy); border-radius: 3px; }
.footer-rooms__list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 23px;
  max-width: 980px; margin: 0 auto; padding: 0; list-style: none;
}
.footer-rooms .btn { display: grid; place-items: center; width: 100%; height: 100%; min-height: 48px; }
@media (max-width: 900px) { .footer-rooms { padding-block: 64px; } .footer-rooms__list { grid-template-columns: repeat(2, 1fr); max-width: 420px; } }
@media (max-width: 380px) { .footer-rooms__list { grid-template-columns: 1fr; } }

.footer-contact { padding: 81px 0 54px; background: var(--white); }
.display-title {
  margin: 0 0 28px;
  font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: 1.26;
  text-align: center; color: var(--navy);
}
.display-title a { text-decoration: none; }
.display-title a:hover { text-decoration: underline; text-underline-offset: 6px; }
.footer-contact .display-title--phone { margin-bottom: 29px; }
@media (max-width: 640px) { .footer-contact { padding-top: 60px; } .display-title { font-size: 30px; } }

.footer-credit { padding: 54px 0 36px; text-align: center; background: #000; }
.footer-credit__text { margin: 0 0 14px; font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .77); }
.footer-credit__legal { margin: 34px 0 0; font-size: 13px; color: rgba(255, 255, 255, .55); }
.footer-credit__legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer-credit__legal a:hover { color: var(--white); }
