/* Pension Mataiva Village : la palette et le CSS de page, chargés après le kit tasteskill (public/assets).
   La palette sort de start.mjs brand avec les couleurs de la pension (sable #faf6ef, encre #16262a,
   bleu lagon #2f6e74) ; la police de texte est Karla, gardée à la demande de la pension. */
:root {
  --p-bg: #faf6ef; --p-surface: #f3ede3; --p-ink: #16262a; --p-muted: #5e6869;
  --p-accent: #2f6e74; --p-accent-ink: #faf6ef; --p-action: #2f6e74; --p-action-ink: #faf6ef;
  --p-inv-bg: #16262a; --p-inv-surface: #233236; --p-inv-ink: #faf6ef; --p-inv-muted: #9ba09e;
  --p-inv-accent: #faf6ef; --p-inv-accent-ink: #16262a; --p-inv-action: #faf6ef; --p-inv-action-ink: #16262a;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-text: "Karla", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.012em;
}

/* ---- the logo: the pension's own round emblem beside its name */
.nav__logo img { height: 32px; width: 32px; border-radius: 50%; }
/* a small laptop (1024-1279): the 23-character name and four words do not share the bar with the action, so the
   bar keeps the emblem; the link still says the name to a screen reader */
@media (min-width: 1024px) and (max-width: 1279px) { .nav .nav__name { display: none; } }

/* ---- the close: the name set across the .wrap from line to line (the dealt type moment "name");
   "Pension Mataiva Village" in Instrument Serif runs about 7.4 times its size */
.close__word { font-size: calc(min(100vw - 2 * var(--gut), var(--container)) / 7.45); line-height: 1.12; letter-spacing: -0.03em; white-space: nowrap; }

/* ---- a split under a section head: its photograph shares the screen with the h2 above it */
[data-place="visit"] { --pl-head: 96px; }
[data-place="visit"] .visit--card { align-self: stretch; }
[data-place="visit"] .visit__cols { grid-template-columns: minmax(0, 1fr); }

/* ---- tall-small (the offer's dealt composition), on the page's one split: the words and a square photograph
   at the left line, its foot level with the tall photograph's at the right line */
.tall-small { align-items: stretch; }
.tall-small__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); }
.tall-small__text > .section-head { margin-bottom: 0; }
.tall-small__text > .rows { align-self: stretch; }
.tall-small__text > .pl-photo { width: calc((100% - var(--gutter)) / 2); margin-top: auto; }
@media (max-width: 1023px) { .tall-small > .pl-photo > img { aspect-ratio: 4 / 3; } .tall-small__text > .pl-photo { display: none; } }

/* ---- the rooms row (side): the head is the row's first cell, as tall as the tiles; a phone keeps the
   facts line under each photograph and drops the longer line, so the section stays one screen */
#hebergements .section-head { margin-bottom: 0; align-content: start; }
@media (max-width: 639px) { #hebergements .tile > p:not(.tile__facts) { display: none; } .closing__links .footer__lede { display: none; } }

/* ---- the legal row's two links, side by side */
.footer__legal-links { display: inline-flex; flex-wrap: wrap; gap: 0 var(--s-5); }

/* ---- compositions (sections.md, Designed variety): square photographs on the 1200 column */
.strip { align-items: start; }
/* one photograph from line to line under its head row (the dealt bleed, kept inside the .wrap: a place lays nothing
   past the container but a ground) */
.pl-photo--wide > img { height: min(calc(100cqw / var(--pl-r)), calc(var(--pl-room) - var(--pl-head, 0px))); width: 100%; }
@media (max-width: 639px) { .pl-photo--wide > img { height: auto; aspect-ratio: 4 / 5; } .wall > li:nth-child(n + 7) { display: none; } }
#demande { --hm: 2; }
.wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 0; list-style: none; }
.wall > li { margin: 0; }
.wall img { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; object-position: var(--pos, 50% 50%); }
@media (max-width: 639px) {
  .wall { grid-column: 1 / -1; }
  .strip > .pl-photo { grid-column: span 6; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- rows of text under each other, then a strip of photographs (#espaces, #sur-place) */
.grid + .strip { margin-top: var(--s-7); }

/* ---- the rooms' photo carousels, in the 3D style the pension chose: three photographs show, the current one facing
   the visitor and its two neighbours turned in along an arc, over a dark blur of the current photograph. The others
   wait unseen behind the neighbours, so the one that changes ends of the arc does it out of sight. The stage takes what the head leaves
   of the section, so the section stays one screen at every size. Asked for by the client: the kit has no carousel,
   no blurred ground and no dark section on a place */
.has-carousel { position: relative; overflow: hidden; }
.has-carousel > .wrap { display: flex; flex-direction: column; }
.has-carousel .section-head { flex: none; margin-bottom: var(--s-5); }
.carousel { flex: 1 1 0; min-height: 300px; display: flex; flex-direction: column; gap: var(--s-2); }
.carousel__bg { filter: blur(44px) brightness(.34) saturate(1.15); opacity: 0; transition: opacity 700ms var(--ease); }
.carousel__bg[data-active] { opacity: 1; }
.carousel__viewport { position: relative; flex: 1 1 0; min-height: 0; container-type: size; }
.carousel__stage { --w: min(34cqw, 75cqh); position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; perspective: calc(var(--w) * 5.5); touch-action: pan-y; }
.carousel__slide { position: absolute; left: 50%; top: 50%; width: var(--w); aspect-ratio: 3 / 4; overflow: hidden; background: var(--p-inv-surface); box-shadow: 0 18px 48px rgb(0 0 0 / .35); transform: translate(-50%, -50%) translateX(var(--x, 0)) translateZ(var(--z, 0)) rotateY(var(--turn, 0deg)); transition: transform 700ms cubic-bezier(.22, 1, .36, 1), opacity 350ms var(--ease); will-change: transform, opacity; }
.carousel__slide > img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); user-select: none; -webkit-user-drag: none; }
.carousel__slide[data-pos="0"] { z-index: 3; }
.carousel__slide[data-pos="-1"], .carousel__slide[data-pos="1"] { z-index: 2; cursor: pointer; }
.carousel__slide[data-pos="-1"] { --x: calc(var(--w) * -1.07); --z: calc(var(--w) * -.7); --turn: 36deg; }
.carousel__slide[data-pos="1"] { --x: calc(var(--w) * 1.07); --z: calc(var(--w) * -.7); --turn: -36deg; }
.carousel__slide[data-pos="-2"] { --x: calc(var(--w) * -1.7); --z: calc(var(--w) * -1.5); --turn: 48deg; }
.carousel__slide[data-pos="2"] { --x: calc(var(--w) * 1.7); --z: calc(var(--w) * -1.5); --turn: -48deg; }
.carousel__slide[data-pos="-2"], .carousel__slide[data-pos="2"], .carousel__slide[data-pos="far"] { z-index: 1; opacity: 0; pointer-events: none; }
.carousel__slide[data-pos="far"] { --z: calc(var(--w) * -2.2); }
.carousel__btn { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; padding: 0; border: 0; border-radius: 50%; background: var(--p-inv-bg); color: var(--p-inv-ink); cursor: pointer; transition: background-color 150ms var(--ease), transform 90ms var(--ease); }
.carousel__btn--prev { left: 0; }
.carousel__btn--next { right: 0; }
.carousel__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.carousel__btn:hover { background: var(--p-inv-surface); }
.carousel__btn:active { transform: scale(.94); }
.carousel__btn:focus-visible, .carousel__dot:focus-visible { outline: 2px solid var(--p-inv-ink); outline-offset: 2px; }
.carousel__dots { flex: none; display: flex; justify-content: center; }
.carousel__dot { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel__dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--p-inv-ink); opacity: .4; transition: opacity 150ms var(--ease), transform 150ms var(--ease); }
.carousel__dot:hover::before { opacity: .75; }
.carousel__dot[aria-current]::before { opacity: 1; transform: scale(1.35); }
.carousel__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* without a script: every photograph side by side, flat */
html:not(.js) .carousel__stage { position: static; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--gutter); height: 100%; container-type: normal; perspective: none; }
html:not(.js) .carousel__slide { position: relative; left: auto; top: auto; width: auto; aspect-ratio: auto; transform: none; opacity: 1; pointer-events: auto; }
html:not(.js) .carousel__btn, html:not(.js) .carousel__dots { display: none; }
/* under 1024: the current photograph large, a strip of each neighbour showing, cut by the stage */
@media (max-width: 1023px) {
  .carousel__stage { --w: min(66cqw, 75cqh); overflow: clip; }
  .carousel__btn { width: 44px; height: 44px; margin-top: -22px; }
}
@media (max-width: 639px) {
  .room-names { display: none; }
  html:not(.js) .carousel__stage { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; grid-auto-rows: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .carousel__slide, .carousel__bg { transition: none; }
}

.spec__note { max-width: 62ch; margin-top: var(--s-5); }
.spec__note + .strip { margin-top: var(--s-6); }
@media (max-width: 639px) { .spec__note { margin-top: 0; } #sorties .tile__media { --tile-ratio: 10 / 9; } }

/* ---- a price group's label, 13px over its rows (sections.md, Menu or prices) */
.group-label { margin-bottom: var(--s-3); }

/* ---- the comparison table (sections-library.md, comparison-table): a row a type, one rule closing each */
.spec { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.spec th, .spec td { padding: var(--s-4) var(--s-4) var(--s-4) 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--line); }
.spec thead th { padding-top: 0; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.spec tbody th { font-weight: 500; }
@media (max-width: 1023px) {
  .spec thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec tbody tr { display: grid; gap: var(--s-1); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
  .spec tbody :is(th, td) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s-4); padding: 0; border: 0; }
  .spec tbody th { display: block; padding-bottom: var(--s-2); }
  .spec td::before { content: attr(data-label); color: var(--muted); }
}


/* ---- a tablet held upright (640-1023): the strips stay four across, so a section holds its photographs in one row
   instead of stacking them a screen each */
/* a small laptop (1024-1279 wide): a split's photograph at 4:5 so it fills the shorter screen beside its words */
@media (min-width: 1024px) and (max-width: 1279px) { .pl-photo--end > img { --pl-r: .8; } }
/* a short laptop screen (768 to 820 tall): the close drops the name set large, and the table, the strips and the
   rates sit tighter, so every section stays one screen */
@media (min-width: 1024px) and (max-height: 820px) {
  .close__word { display: none; }
  .spec :is(th, td) { padding-block: var(--s-3); }
  .spec__note { margin-top: var(--s-3); }
  #comparer .strip > .pl-photo > img { --pl-r: 1.3333; }
  #tarifs .rows > li { padding-block: var(--s-3); }
  #tarifs .stack-5 > * + * { margin-top: var(--s-4); }
  .faq > .faq__item { padding-block: var(--s-3); }
  .booking { padding: var(--s-4); }
  .booking .form { gap: var(--s-3); }
  .booking .field { gap: var(--s-1); }
  .booking textarea { min-height: 48px; }
  /* the phone and the message side by side, one row less */
  .booking .field--full { grid-column: auto; }
}
/* the comparison table from 1023 down: each type its name, then its facts in one run with their labels */
@media (max-width: 1023px) {
  .spec tbody tr { display: block; padding-block: var(--s-3); }
  .spec tbody :is(th, td) { display: inline; padding: 0; }
  .spec tbody th { display: block; padding-bottom: var(--s-1); }
  .spec td::before { content: attr(data-label) " : "; }
  .spec td + td::before { content: " · " attr(data-label) " : "; }
  :root[lang="en"] .spec td::before { content: attr(data-label) ": "; }
  :root[lang="en"] .spec td + td::before { content: " · " attr(data-label) ": "; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .strip > .pl-photo { grid-column: span 3; }
  .strip > .pl-photo > img { aspect-ratio: 4 / 5; }
  .wall img { aspect-ratio: 2 / 3; }
  #demande { --h: 2; }
  #sorties { --h: 2; }
  #sorties .tile__media { --tile-ratio: 16 / 9; }
  #questions .faq__item { padding-block: var(--s-7); }
  .pl-photo--wide > img { height: auto; aspect-ratio: 4 / 3; }
  #venir[data-place="visit"] .pl-photo > img { aspect-ratio: 16 / 9; }
  #sorties .tile { grid-column: 1 / -1; }
}

/* ---- a phone (sections.md, At 390; layout-v4.md: one screen holds 636px under the bar)
   .phone-fill: a split that stands on one phone screen, its words first and its photograph taking what they leave
   (as system.css does for the visit block), the longer line marked .phone-hide left for the desktop;
   .g2m-fill: a split on two phone screens, the words on the first and the photograph filling the second. */
@media (max-width: 1023px) {
  .phone-fill > .wrap { display: flex; flex-direction: column; gap: var(--s-5); }
  .phone-fill > .wrap > .pl-photo { flex: 1 1 0; min-height: 220px; display: flex; flex-direction: column; }
  .phone-fill > .wrap > .pl-photo > img { flex: 1 1 0; width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: auto; }
}
@media (max-width: 639px) {
  .phone-hide { display: none; }
  /* the legal pages: their text runs past one phone screen, so it stands alone there, without the photograph */
  #legal > .wrap > .pl-photo { display: none; }
  .g2m-fill > .wrap > .pl-photo { display: flex; flex-direction: column; }
  .g2m-fill > .wrap > .pl-photo > img { flex: 1 1 0; width: 100%; height: auto; min-height: 0; aspect-ratio: auto; }
  /* the visit block: its photograph at 4:3, growing into what the words leave of the screen */
  #venir[data-place="visit"] .pl-photo > img { aspect-ratio: 4 / 3; }
  /* the shared spaces and "sur place": their rows, then two of the four photographs, on one screen */
  :is(#espaces, #sur-place) .strip > .pl-photo:nth-child(n + 3) { display: none; }
  /* two of the four photographs at 4:3 under the table */
  #comparer .strip > .pl-photo:nth-child(n + 3) { display: none; }
  #comparer .strip > .pl-photo > img { aspect-ratio: 4 / 3; }
  /* the rates on one screen: tighter rows, the meal photograph in what is left */
  #tarifs .rows > li { padding-block: var(--s-3); }
  #tarifs.phone-fill > .wrap > .pl-photo { min-height: 160px; }
  /* the three outings, one under the other */
  #sorties .tile { grid-column: 1 / -1; }
  /* write or call: the links on one line beside their names */
  #joindre .rows__value { max-width: none; }
}

/* ---- the booking form on the surface ground beside its photograph (sections.md, Booking) */
.booking { background: var(--surface); padding: var(--s-5); }
.booking textarea { min-height: 72px; }
@media (max-width: 639px) { .booking { padding: var(--s-5); } }
