/* ==========================================================================
   Studio Les Thermes Nouveaux – Balaruc-les-Bains
   Direction « Carnet de séjour » : lagune, sable, terre cuite.
   Mobile d’abord. Aucun style en ligne (CSP stricte).
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  --lagune: #1F5C60;
  --lagune-fonce: #16454A;
  --nuit: #113A3E;
  --encre: #20292B;
  --encre-douce: #3A4648;
  --creme: #FBF7F0;
  --sable: #F1E9DC;
  --bord: #DCCFBB;
  --bord-fort: #C9B89C;
  --terre: #A8491F;
  --terre-fonce: #8C3B18;
  --abricot: #F4D3B5;
  --erreur: #8A2C12;
  --filet: var(--terre);        /* filets et pictos */
  --accent: var(--terre-fonce); /* petits textes d’accent (7:1 sur crème) */
  --focus: var(--encre);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 5vw, 3rem);
  --container: 73.75rem;
  --header-h: 3.75rem;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font: 400 1.1875rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.12; text-wrap: balance; }
p { margin: 0 0 1.1em; }
ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
a { color: var(--lagune-fonce); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .16em; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: .2em; cursor: help; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: 0; }
section[id] { scroll-margin-top: var(--header-h); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - 2 * var(--gutter), 85rem); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { flex: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.note { font-size: 1.0625rem; color: var(--encre-douce); }
.label { font: 600 1rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

.skip-link {
  position: absolute; left: 1rem; top: .4rem; z-index: 30;
  display: flex; align-items: center; min-height: 3rem; padding: .5rem 1.1rem;
  background: var(--lagune-fonce); color: #fff; font-weight: 600; border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.5rem; padding: .7rem 1.6rem;
  border: 2px solid transparent; border-radius: 6px;
  font: 600 1.1875rem/1.25 var(--sans); text-align: center; text-decoration: none; text-wrap: balance;
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.btn--primary { background: var(--lagune); color: #fff; }
.btn--primary:hover { background: var(--lagune-fonce); }
.btn--secondary { border-color: var(--lagune); background: transparent; color: var(--lagune-fonce); }
.btn--secondary:hover { background: var(--sable); }
.btn[disabled] { background: var(--encre-douce); cursor: progress; }

/* ---------- En-tête ---------- */

.site-header { position: sticky; top: 0; z-index: 10; background: var(--creme); border-bottom: 1px solid var(--bord); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: var(--header-h); }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 3rem; color: var(--encre); text-decoration: none; }
.brand__name { font: 600 1.0625rem/1.15 var(--serif); text-wrap: balance; }
.brand__place { display: none; font-size: 1rem; line-height: 1.3; color: var(--encre-douce); white-space: nowrap; }

.site-nav ul { display: flex; align-items: center; gap: .25rem; }
.site-nav li:not(:last-child) { display: none; }
.site-nav a {
  display: flex; align-items: center; min-height: 3rem; padding-inline: .7rem; border-radius: 6px;
  color: var(--encre); font-size: 1.0625rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { color: var(--lagune-fonce); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--terre); text-underline-offset: .4em; }
.site-nav .site-nav__cta { padding-inline: 1rem; border: 2px solid var(--lagune); color: var(--lagune-fonce); font-weight: 600; transition: background-color .15s; }
.site-nav .site-nav__cta:hover { background: var(--sable); text-decoration: none; }

/* ---------- Hero : photo pleine largeur, puis panneau crème qui mord sur son bord inférieur ---------- */

.hero { --onglet: 1.5rem; }
.hero__media { position: relative; height: min(66.6vw, 56vh); min-height: 14rem; background: var(--sable); }
.hero__media picture { display: block; height: 100%; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero__caption { display: none; }

.hero__panel { position: relative; margin-top: -2.25rem; }
.hero__content { position: relative; max-width: 47rem; margin-right: var(--onglet); padding-top: 1.25rem; background: var(--creme); }
/* le panneau se prolonge jusqu’au bord gauche de l’écran */
.hero__content::before { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 100vw; background: inherit; }

.surtitre { margin-bottom: .6rem; padding-right: 1rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; color: var(--accent); }
/* sous la photo, le texte reprend toute la largeur de la colonne */
.hero h1, .hero__lead, .hero__actions { margin-right: calc(-1 * var(--onglet)); }
.hero h1 { margin-bottom: .45em; font-size: clamp(1.8rem, 1.15rem + 3.5vw, 4rem); line-height: 1.06; letter-spacing: -.015em; }
.hero__lead { margin-bottom: 1.5rem; line-height: 1.5; }
.hero__lead-res { display: block; }
.hero__lead-sep { display: none; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.hero__actions .btn { flex: 1 1 14rem; }

/* Repères : bandeau en ligne, séparateurs fins */
.reperes { display: grid; grid-template-columns: 1fr 1fr; margin-top: 2.25rem; border-block: 1px solid var(--bord); font: 500 1rem/1.25 var(--serif); text-align: center; }
.reperes li { position: relative; padding: .95rem .25rem; }
.reperes li::before { content: ""; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: var(--bord-fort); }

/* ---------- Sections ---------- */

main { counter-reset: chapitre; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sable { background: var(--sable); }
.section--nuit { background: var(--lagune-fonce); color: var(--creme); --filet: var(--abricot); --accent: var(--abricot); --focus: var(--creme); }

/* Numéro de chapitre + filet, comme dans un carnet */
.section__head { counter-increment: chapitre; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section__head::before {
  content: counter(chapitre, decimal-leading-zero);
  content: counter(chapitre, decimal-leading-zero) / "";
  display: block; width: max-content; margin-bottom: .9rem; padding-right: 3.4rem;
  background: linear-gradient(var(--filet), var(--filet)) right center / 2.5rem 2px no-repeat;
  color: var(--accent); font: 700 1rem/1.2 var(--sans); letter-spacing: .12em;
}
.section__head h2 { font-size: clamp(2rem, 1.45rem + 2.4vw, 3.125rem); letter-spacing: -.01em; }
.section__intro { max-width: 28em; margin: 1rem 0 0; font-size: 1.125em; line-height: 1.55; }

.split { display: grid; gap: 2.5rem; }
.prose { max-width: 29em; }
.prose > :last-child { margin-bottom: 0; }
.lead { font-size: 1.125em; line-height: 1.55; }
.lead::first-letter { float: left; margin: .09em .12em 0 0; font: 500 3.3em/.82 var(--serif); color: var(--accent); }

/* Fiche du studio */
.fiche { padding: clamp(1.4rem, 4vw, 2.25rem); background: var(--sable); border-radius: 4px; }
.fiche .label { margin-bottom: .9rem; }
.fiche__row { padding-block: .65rem; border-top: 1px solid var(--bord-fort); }
.fiche dt { font-size: 1.0625rem; color: var(--encre-douce); }
.fiche dd { font-weight: 600; }

/* Équipements */
.tiles { display: grid; column-gap: 2.5rem; border-bottom: 1px solid var(--bord-fort); }
.tile { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem; align-items: start; padding-block: 1.05rem; border-top: 1px solid var(--bord-fort); }
.tile .icon { width: 2.25rem; height: 2.25rem; color: var(--terre); }
.tile > div { padding-top: .3rem; }
.tile__label { display: block; font-weight: 600; line-height: 1.35; }
.tile__detail { display: block; margin-top: .15rem; font-size: 1.0625rem; line-height: 1.4; color: var(--encre-douce); }

.extras { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.extras h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.extras__list { column-gap: 2.5rem; }
.extras__list li { position: relative; padding: .2rem 0 .2rem 1.5rem; break-inside: avoid; }
.extras__list li::before { content: ""; position: absolute; left: 0; top: 1em; width: .75rem; height: 2px; background: var(--terre); }

/* Galerie en mosaïque : une grande photo, puis des vignettes */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem .75rem; }
.gallery__cell--lead, .gallery__cell--wide { grid-column: 1 / -1; }
.gallery__item { display: block; height: 100%; color: inherit; text-decoration: none; cursor: zoom-in; }
.gallery figure { display: flex; flex-direction: column; height: 100%; }
.gallery picture { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 3px; background: var(--sable); }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery__cell--wide picture { aspect-ratio: 16 / 9; }
.gallery__cell--square picture { aspect-ratio: 1; }
.gallery__cell--entree img { object-position: 34% 50%; }
.gallery figcaption { padding-top: .55rem; font-size: 1.0625rem; line-height: 1.4; }
.gallery__item:hover picture { outline: 3px solid var(--lagune); outline-offset: 2px; }
.gallery__item:hover figcaption { text-decoration: underline; }
.gallery__note { margin: 1.75rem 0 0; }

/* Votre cure */
.cure__intro { max-width: 28em; margin-bottom: clamp(2rem, 5vw, 3.25rem); font-size: 1.125em; line-height: 1.55; }
.points { display: grid; gap: 1.9rem 3rem; }
.point::before { content: ""; display: block; width: 2.5rem; height: 2px; margin-bottom: 1rem; background: var(--filet); }
.point h3 { margin-bottom: .45rem; font-size: 1.4375rem; }
.point p { margin: 0; }
.adresse { padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--creme); color: var(--encre); border-radius: 6px; --accent: var(--terre-fonce); --focus: var(--encre); }
.adresse .label { margin-bottom: .8rem; }
.adresse address { margin-bottom: 1.4rem; }
.adresse strong { display: block; margin-bottom: .3rem; font: 600 1.4375rem/1.25 var(--serif); }
.adresse .btn { width: 100%; padding-inline: 1rem; }
.adresse .note { margin: 1rem 0 0; }

/* Tarifs */
.tarif { display: grid; gap: 1.75rem; padding: clamp(1.25rem, 5vw, 3.25rem); background: var(--sable); border-radius: 6px; }
.tarif__prix { margin: 0; font: 500 clamp(1.5rem, 1.1rem + 1.9vw, 2.5rem)/1.22 var(--serif); }
.tarif__prix span { display: inline-block; }
.tarif__prix strong { font: 700 1.02em/1 var(--sans); letter-spacing: -.01em; color: var(--terre-fonce); white-space: nowrap; }
.tarif__suite > p:first-child { margin-bottom: 1.25rem; }
.tarif__suite .note { margin: 1.1rem 0 0; }

/* ---------- Contact ---------- */

.contact-cards, .contact-pending { max-width: 30rem; }
.contact-card { margin-bottom: 1rem; }
.contact-card__link {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 5rem; padding: .9rem 1.25rem .9rem 4.75rem;
  background: var(--creme); border: 2px solid var(--lagune); border-radius: 8px;
  color: var(--encre); text-decoration: none; transition: background-color .15s;
}
.contact-card__link:hover { background: #fff; }
.contact-card__link .icon { position: absolute; left: 1.25rem; top: 50%; width: 2.25rem; height: 2.25rem; margin-top: -1.125rem; color: var(--lagune); }
.contact-card__label { font-size: 1.0625rem; line-height: 1.35; color: var(--encre-douce); }
.contact-card__value { font-size: 1.25rem; font-weight: 600; line-height: 1.3; color: var(--lagune-fonce); overflow-wrap: anywhere; }
.contact-card__value:empty { display: none; }
.contact-pending { margin: 0; padding: 1.1rem 1.4rem; background: var(--creme); border-left: 4px solid var(--terre); border-radius: 0 6px 6px 0; }

.contact-form { max-width: 44rem; margin-top: 1.5rem; padding: clamp(1.25rem, 4vw, 2.25rem); background: var(--creme); border: 1px solid var(--bord-fort); border-radius: 8px; }
.contact-form h3 { margin-bottom: 1.25rem; font-size: 1.625rem; }
/* pot de miel : hors écran, sans display:none */
.hp { position: absolute; left: -9999px; top: auto; }
.form-grid { display: grid; gap: 1.15rem 1.25rem; }
.field label { display: block; margin-bottom: .35rem; font-size: 1.125rem; font-weight: 600; }
.field__req { font-size: 1rem; font-weight: 400; color: var(--encre-douce); }
.field input, .field textarea, .hp input {
  display: block; width: 100%; min-height: 3.5rem; padding: .7rem .9rem;
  background: #fff; border: 2px solid #5B6765; border-radius: 6px;
  color: var(--encre); font: inherit; line-height: 1.4;
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--lagune); outline-offset: 2px; border-color: var(--lagune-fonce); }
.field [aria-invalid="true"] { border-color: var(--erreur); background: #FFF4EE; }
.field-hint, .field-error { margin: .4rem 0 0; font-size: 1.0625rem; line-height: 1.4; }
.field-hint { color: var(--encre-douce); }
.field-error { font-weight: 600; color: var(--erreur); }
.field-error:empty, .form-status:empty { display: none; }
.form-note { margin: 1.4rem 0; font-size: 1.0625rem; line-height: 1.5; color: var(--encre-douce); }
.contact-form .btn { width: 100%; }
.form-status { margin: 1.25rem 0 0; padding: .9rem 1.1rem; border-left: 4px solid; border-radius: 0 6px 6px 0; font-weight: 600; }
.form-status.is-success { background: var(--sable); color: var(--lagune-fonce); }
.form-status.is-error { background: #FFF4EE; color: var(--erreur); }
.contact-form.is-sent > :not(h3, .form-status) { display: none; }
.contact-form.is-sent .form-status { margin-top: 0; }

/* ---------- Pied de page ---------- */

.site-footer { padding-block: 3rem 2.25rem; background: var(--nuit); color: var(--creme); --focus: var(--creme); }
.site-footer__name { margin-bottom: .35rem; font: 500 1.4375rem/1.3 var(--serif); }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; margin: 1.5rem 0 0; padding-top: .75rem; border-top: 1px solid #3F676B; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 3rem; color: var(--creme); }
[hidden] + .site-footer__sep { display: none; }

/* ---------- Pages simples (mentions légales, 404) ---------- */

.page { padding-block: clamp(2rem, 6vw, 4rem) clamp(3.5rem, 8vw, 6rem); }
.page h1 { margin-bottom: 1.25rem; font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); letter-spacing: -.01em; }
.page__body { max-width: 30em; }
.page__body h2 { margin: 2.5rem 0 .8rem; font-size: 1.625rem; }
.page__body h2::before { content: ""; display: block; width: 2.5rem; height: 2px; margin-bottom: 1rem; background: var(--filet); }
.page__lead { max-width: 28em; font-size: 1.125em; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; margin-bottom: 1.25rem; font-weight: 600; }
.page__actions { margin-top: 2.5rem; }

/* ---------- Visionneuse ---------- */

.has-lightbox { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #0E1A1C; color: var(--creme); --focus: var(--creme);
}
.lightbox::backdrop { background: #0E1A1C; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem var(--gutter); }
.lightbox__counter { margin: 0; color: var(--abricot); font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.lightbox__stage { display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox__stage picture { display: contents; }
.lightbox__stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
/* la photo de la salle d’eau est petite : jamais plus de 720 px de large */
.lightbox__stage.is-narrow img { max-width: min(100%, 45rem); }
.lightbox__bottom {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: center;
  padding: .9rem var(--gutter) max(1rem, env(safe-area-inset-bottom));
}
.lightbox__legend { grid-column: 1 / -1; min-height: 2.8em; margin: 0; font-size: 1.125rem; line-height: 1.4; text-align: center; text-wrap: balance; }
.lb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-width: 3.5rem; min-height: 3.5rem; padding: 0 1.1rem;
  background: var(--creme); border: 2px solid var(--creme); border-radius: 6px;
  color: var(--encre); font: 600 1.125rem/1 var(--sans); cursor: pointer; transition: background-color .15s;
}
.lb-btn:hover { background: #fff; }
.lb-btn--close { background: transparent; color: var(--creme); }
.lb-btn--close:hover { background: #24393C; }
.lb-btn .icon { width: 1.5rem; height: 1.5rem; stroke-width: 2; }

/* ---------- Paliers ---------- */

@media (max-width: 22.49em) {
  .lb-btn--prev .lb-btn__text, .lb-btn--next .lb-btn__text { display: none; }
  .adresse .btn .icon { display: none; }
}

@media (min-width: 22.5em) {
  .reperes { font-size: 1.0625rem; }
  .reperes li { white-space: nowrap; }
}

@media (min-width: 24.375em) {
  .hero { --onglet: 4rem; }
  .brand__name { font-size: 1rem; white-space: nowrap; }
  .brand__place { display: block; }
}

@media (min-width: 30em) {
  .brand__name { font-size: 1.125rem; }
  .fiche__row { display: grid; grid-template-columns: 8.75rem 1fr; column-gap: 1rem; }
  .fiche dt { padding-top: .08em; }
}

@media (min-width: 34em) {
  .extras__list { columns: 2; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
  .contact-form .btn { width: auto; }
  .points { grid-template-columns: 1fr 1fr; }
}

/* Repères : 2 colonnes */
@media (max-width: 39.99em) {
  .reperes li:nth-child(odd)::before { display: none; }
  .reperes li:nth-child(n+3) { border-top: 1px solid var(--bord); }
}

@media (min-width: 40em) {
  .hero { --onglet: 0rem; }
  .hero__panel { margin-top: -3.5rem; }
  .hero__content { padding: 2rem 2.5rem 0 0; }
  .hero__actions .btn { flex: 0 0 auto; }
  .surtitre { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; padding-right: 0; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; }
  .surtitre::before { content: ""; width: 2.5rem; height: 2px; background: var(--filet); }
  .hero__lead { font-size: 1.3125rem; }
  .reperes { font-size: 1.1875rem; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .gallery { gap: 1.75rem 1.25rem; }
}

/* Repères : 3 colonnes */
@media (min-width: 40em) and (max-width: 62.49em) {
  .reperes { grid-template-columns: repeat(3, 1fr); }
  .reperes li:nth-child(3n+1)::before { display: none; }
  .reperes li:nth-child(n+4) { border-top: 1px solid var(--bord); }
}

@media (min-width: 48em) {
  body { font-size: 1.25rem; }
  .lightbox__bottom { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem; padding-block: 1rem 1.25rem; }
  .lightbox__legend { grid-area: 1 / 2; min-height: 0; }
  .lb-btn--prev { grid-area: 1 / 1; }
  .lb-btn--next { grid-area: 1 / 3; }
  .lightbox__stage { padding-inline: var(--gutter); }
}

@media (min-width: 56em) {
  .tarif { grid-template-columns: 1fr 1fr; gap: 0; align-items: center; }
  .tarif__prix { padding-right: 3rem; }
  .tarif__suite { padding-left: 3.5rem; border-left: 1px solid var(--bord-fort); }
}

@media (min-width: 62.5em) {
  :root { --header-h: 4rem; }
  .brand__name { font-size: 1.1875rem; }
  .site-nav li:not(:last-child) { display: block; }
  .site-nav .site-nav__cta { margin-left: .5rem; }

  .hero__media { height: min(66.6vw, 54vh); }
  .hero__panel { margin-top: -7rem; }
  .hero__content { padding: 2.25rem 3rem 0 0; }
  .hero__lead { margin-bottom: 1.25rem; font-size: 1.375rem; }
  .hero__lead-res, .hero__lead-sep { display: inline; }
  .reperes { grid-template-columns: repeat(6, 1fr); margin-top: 2.5rem; font-size: 1.25rem; }
  .reperes li { padding-block: 1.2rem; }
  .reperes li:first-child::before { display: none; }

  .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4.5rem; align-items: start; }
  .tiles { grid-template-columns: repeat(3, 1fr); column-gap: 3.5rem; }
  .extras__list { columns: 3; column-gap: 3.5rem; }

  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
  .gallery__cell--lead { grid-column: span 2; grid-row: span 2; }
  .gallery__cell--wide { grid-column: span 2; }
  .gallery picture { aspect-ratio: 16 / 9; }
  .gallery__cell--square picture { aspect-ratio: 1; }
  .gallery__cell--lead picture, .gallery__cell--wide picture { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
  .gallery figcaption { min-height: calc(2.8em + .55rem); }

  /* Contact : titre à gauche, moyens de contact à droite ;
     quand le formulaire est actif, il prend la colonne de droite. */
  .contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; column-gap: 4.5rem; align-items: start; }
  .contact > .section__head { grid-area: 1 / 1; margin-bottom: 0; }
  .contact__ways { grid-area: 1 / 2; padding-top: 2.1rem; }
  .contact-form { grid-area: 2 / 2; }
  .contact:has(.contact-form:not([hidden])) .contact__ways { grid-area: 2 / 1; padding-top: 2rem; }
  .contact:has(.contact-form:not([hidden])) .contact-form { grid-area: 1 / 2 / 3 / 3; margin-top: 2.1rem; }
}

@media (min-width: 80em) {
  /* légende de la photo d’ouverture, à droite du panneau */
  .hero__caption {
    display: block; position: absolute; top: calc(100% + 1rem);
    right: max(var(--gutter), calc((100% - var(--container)) / 2));
    max-width: 16rem; font-size: 1.0625rem; line-height: 1.4; color: var(--encre-douce);
  }
  .hero__caption::before { content: ""; display: block; width: 2.5rem; height: 2px; margin-bottom: .7rem; background: var(--filet); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  *, *::before, *::after { background: transparent !important; color: #000 !important; }
  body { font-size: 12pt; }
  .site-header { position: static; }
  .site-nav, .skip-link, .hero__actions, .lightbox, .contact-form, .screen-only { display: none !important; }
  .section { padding-block: 1.25rem; }
  .btn { border: 1px solid #000; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
