/* La vue unique : la photo couvre tout, rien ne défile. Téléphone d'abord. */
.vue {
  position: relative; height: calc(100svh - var(--demobar-offset, 0px)); min-height: 520px;
  overflow: clip; background: var(--mer); outline: none;
}
.vue:not(.is-alt) { touch-action: pinch-zoom; }
.vue.is-alt .bateau, .vue.is-alt .compteur, .vue.is-alt .bas { visibility: hidden; }
.pile { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.diapo { position: absolute; inset: 0; opacity: 0; overflow: hidden; }
.diapo.is-on { opacity: 1; z-index: 1; }
.diapo.is-in { z-index: 2; }
.diapo img { width: 100%; height: 100%; object-fit: cover; }
.diapo[data-boat="rabiou"] img { object-position: 45% 50%; }
.diapo[data-boat="capon"] img { object-position: 50% 50%; }
.diapo[data-boat="portalet"] img { object-position: 50% 50%; }

/* Le nom, peint comme sur un tableau arrière, au-dessus du bateau. */
.nom {
  position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--nom-y, .3) * 100%);
  transform: translateY(-50%); text-align: center; pointer-events: none; --fs: 20vw;
}
.vue[data-boat="rabiou"] { --nom-y: .31; }
.vue[data-boat="capon"] { --nom-y: .26; }
.vue[data-boat="portalet"] { --nom-y: .665; }
.nom-t {
  font: italic 400 var(--fs)/.9 var(--d); letter-spacing: 0; color: var(--acajou-p);
  -webkit-text-stroke: 1.5px var(--laiton); paint-order: stroke fill; text-shadow: .035em .035em 0 var(--laiton);
  white-space: nowrap; padding: 0 .08em;
}
.nom-t.attente .l { visibility: hidden; }
.nom-t.is-peint { -webkit-text-stroke: 0; text-shadow: none; }
.l { position: relative; display: inline-block; color: transparent; --k: 0; --s: 1; --o: 1; }
.l::before, .l::after { content: attr(data-c); position: absolute; left: 0; top: 0; }
.l::before {
  color: var(--acajou-p); text-shadow: .035em .035em 0 rgb(237 181 110 / var(--s));
  clip-path: inset(-30% calc(130% * var(--k) - 30%) -30% -30%);
}
.l::after { color: transparent; -webkit-text-stroke: 1.5px var(--laiton); opacity: var(--o); }
.nom-port {
  display: inline-block; margin-top: calc(var(--fs) * .2); padding: 7px 12px 8px; border-radius: 2px; background: var(--acajou); box-shadow: var(--vernis);
  font: 500 16px/1 var(--t); color: var(--blanc);
}
@media (max-width: 379px), (max-height: 680px) and (max-width: 1023px) { .nom { --fs: 18vw; } }

/* Ordinateur : la plaque du bateau en bas à gauche, le compteur en bas à droite. */
.bateau, .compteur { display: none; }
.bateau, .compteur, .bas { z-index: 4; }

/* Téléphone : la poignée et la plaque basse, sous le pouce. */
.bas {
  position: absolute; left: var(--bord-g); right: var(--bord-d); bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 44px 1fr 44px; grid-template-rows: 44px 64px; column-gap: 6px;
}
.poignee {
  grid-column: 2; height: 44px; justify-self: center; display: flex; align-items: center; gap: 10px;
  padding: 0 18px; background: var(--acajou-p); border-radius: 2px 2px 0 0; font: 500 16px/1 var(--t);
}
.poignee::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--laiton); }
.bas .cpt-f { grid-row: 1; width: 44px; height: 44px; background: var(--acajou-p); border-radius: 2px; display: grid; place-items: center; }
.bas .cpt-f:first-of-type { grid-column: 1; }
.bas .cpt-f:last-of-type { grid-column: 3; }
.cpt-f svg { width: 10px; }
.bas-rang {
  grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px; padding: 0 8px 0 16px;
}
.bas-prix { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bas-prix span { font: 300 30px/1 var(--t); white-space: nowrap; }
.bas-prix small { font-size: 15px; color: var(--b80); white-space: nowrap; }
.bas-rang .action { height: 48px; padding: 0 16px; }
@media (max-width: 379px) {
  .bas-prix small { display: none; }
  .bas-rang .action { padding: 0 12px; font-size: 15.5px; }
}

/* Mots de durée : le choisi en blanc plein, l'autre pâli. */
.durees { display: flex; flex-wrap: wrap; gap: 0 20px; }
.durees button {
  min-height: 44px; font: italic 400 28px/1 var(--d); color: rgb(255 255 255 / .6); transition: color .2s;
}
.durees button[aria-pressed="true"] { color: var(--blanc); }
.durees button:hover { color: var(--blanc); }

.cpt { display: flex; align-items: center; }
.cpt-n { font: 300 28px/1 var(--t); min-width: 3.4em; text-align: center; }
.compteur .cpt-f, .fiche .cpt-f { width: 44px; height: 44px; display: grid; place-items: center; }

.jours { font-size: 15px; color: var(--b80); }
.jours-l { display: block; }
.jours button { min-height: 44px; padding: 0 2px; color: var(--blanc); text-decoration: underline 1px rgb(255 255 255 / .5); text-underline-offset: 4px; }
.jours button:hover { text-decoration-color: var(--blanc); }

@media (min-width: 1024px) {
  .vue { min-height: 560px; }
  .nom { --fs: clamp(5.5rem, min(13.5vw, 27svh), 14rem); }
  .vue[data-boat="rabiou"] { --nom-y: .28; }
  .vue[data-boat="capon"] { --nom-y: .25; }
  .vue[data-boat="portalet"] { --nom-y: .605; }
  .bas { display: none; }
  .bateau, .compteur { display: block; position: absolute; bottom: max(var(--bord), env(safe-area-inset-bottom)); }
  .bateau { left: var(--bord-g); width: clamp(470px, 31vw, 580px); padding: 20px 26px 16px; }
  .faits { font-size: 15px; line-height: 1.45; color: var(--b80); }
  .tarif { margin-top: 12px; }
  .prix { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
  .prix-n { font: 300 44px/1.05 var(--t); }
  .prix-c { font-size: 15px; color: var(--b80); }
  .compteur { right: var(--bord-d); width: clamp(300px, 21vw, 400px); padding: 12px 22px 14px; }
  .compteur .cpt { justify-content: space-between; margin: 0 -10px 4px; }
  .voiles { font-size: 15px; line-height: 1.4; margin-bottom: 4px; }
  .jours { line-height: 1.4; }
  .jours button { min-height: 36px; }
}
@media (min-width: 1024px) and (max-height: 700px) {
  .bateau { padding-top: 14px; }
  .prix-n { font-size: 36px; }
}

/* La fiche du bateau, au téléphone : une feuille de 88 dvh. */
.fiche {
  position: fixed; z-index: 48; left: 0; right: 0; bottom: 0; height: min(88dvh, 100dvh - 120px); max-width: 640px; margin: 0 auto;
  background: var(--acajou-p); border-radius: 4px 4px 0 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px var(--bord-d) max(20px, env(safe-area-inset-bottom)) var(--bord-g);
  transform: translateY(100%); transition: transform .32s var(--ease);
}
.fiche.is-on { transform: none; }
.fiche-tire { display: block; width: 40px; height: 3px; margin: 0 auto 6px; background: var(--laiton); border-radius: 2px; }
.fiche .fermer { position: absolute; top: 8px; right: max(4px, env(safe-area-inset-right)); }
.fiche-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.fiche .cpt-n { min-width: 2.6em; font-size: 24px; }
.fiche-nom { margin-top: 18px; font: italic 400 46px/1 var(--d); color: var(--laiton); }
.fiche-faits { margin-top: 8px; font-size: 17px; color: var(--b80); }
.fiche-listes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.fiche-listes li { font-size: 16px; line-height: 1.4; margin-top: 4px; }
.fiche-prix { margin-top: 22px; display: grid; gap: 10px; }
.fiche-prix div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fiche-prix dt { font-size: 16px; }
.fiche-prix dd { font: 300 30px/1 var(--t); text-align: right; }
.fiche-prix dd small { display: block; margin-top: 4px; font: 450 15px/1.2 var(--t); color: var(--b80); }
.fiche .jours { margin-top: 18px; font-size: 16px; }
.fiche-vers { margin-top: 18px; }
.fiche-vers a { display: flex; align-items: center; min-height: 64px; font: italic 400 40px/1 var(--d); text-decoration: none; border-top: 1px solid rgb(255 255 255 / .14); }
.fiche-vers a::after { content: "→"; margin-left: auto; font: 300 24px/1 var(--t); color: var(--laiton); }

.fermer { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blanc); }
.fermer svg { width: 18px; }

@media (prefers-reduced-motion: reduce) { .fiche { transition: none; } }

/* Téléphone en paysage : une seule rangée basse, le nom borné par la hauteur. */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 1023px) {
  .vue { min-height: 0; }
  .nom { --fs: min(16vw, 26svh); }
  .vue[data-boat] { --nom-y: .42; }
  .vue[data-boat="portalet"] { --nom-y: .56; }
  .bas { grid-template-columns: 44px auto 44px 1fr; grid-template-rows: 64px; align-items: center; }
  .poignee { grid-column: 2; grid-row: 1; height: 64px; border-radius: 2px; }
  .bas .cpt-f { grid-row: 1; height: 64px; }
  .bas-rang { grid-column: 4; grid-row: 1; margin-left: 6px; }
}
