/* Feuille commune : base, en-tête, menu, boutons, badges, pied de page, barre du bas, textes qui montent.
   Valeurs : tokens.css (= DESIGN.md). */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--entete) + 16px); }
body {
  margin: 0; background: var(--blanc); color: var(--chenal);
  font: 400 var(--t-texte)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
.cache { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a { color: var(--magenta-fonce); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1.04; font-variation-settings: "opsz" 72; }
h2 { font-size: var(--t-h2); line-height: 1.1; font-variation-settings: "opsz" 60; }
h3 { font-size: var(--t-h3); line-height: 1.2; font-weight: 500; }
p { margin: 0; max-width: 34em; text-wrap: pretty; }
.chapeau { font-size: var(--t-chapeau); line-height: 1.45; color: var(--ardoise); max-width: 32em; }
.petit { font-size: var(--t-petit); line-height: 1.45; }
.ardoise { color: var(--ardoise); }
.chiffres { font-variant-numeric: tabular-nums; }
.lieu { font-family: var(--serif); font-style: italic; }
:focus-visible { outline: 2px solid var(--magenta-fonce); outline-offset: 3px; border-radius: 2px; }
/* Sur fond sombre, l'anneau magenta n'a que 2,25:1 : anneau blanc */
.pied :focus-visible, .fin-page :focus-visible { outline-color: var(--blanc); }
@media (min-width: 768px) { .ouverture :focus-visible { outline-color: var(--blanc); } }

/* Au-delà de 1 440 px, l'en-tête et l'ouverture s'élargissent ensemble (le texte d'ouverture reste à gauche du bateau) */
@media (min-width: 1440px) { :root { --marge-large: max(var(--gouttiere), calc((100vw - 1440px) / 2 + 40px)); } .entete .entete__in { max-width: none; padding-inline: var(--marge-large); } }
.page { width: 100%; max-width: calc(var(--contenu) + 2 * var(--gouttiere)); margin-inline: auto; padding-inline: var(--gouttiere); }
.section { padding-block: var(--section); }
.section--voile { background: var(--voile); }
.section__tete { display: grid; gap: var(--s4); margin-bottom: var(--s7); }

.evitement { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--chenal); color: var(--blanc); padding: var(--s3) var(--s4); border-radius: var(--r-bouton); }
.evitement:focus { top: var(--s3); }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: var(--r-bouton);
  font: 600 var(--t-ui)/1.3 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .16s var(--courbe), color .16s var(--courbe), border-color .16s var(--courbe);
}
.bouton--plein { background: var(--magenta-fonce); color: var(--blanc); }
.bouton--plein:hover { background: var(--chenal); }
.bouton--ligne { background: transparent; color: var(--chenal); border-color: var(--chenal); }
.bouton--ligne:hover { background: var(--chenal); color: var(--blanc); }
.bouton--clair { background: var(--blanc); color: var(--chenal); }
.bouton--clair:hover { background: var(--voile); }
.bouton svg { width: 18px; height: 18px; flex: none; }

.badge {
  display: inline-block; vertical-align: 0.15em; margin-left: 6px; padding: 1px 7px;
  border: 1px solid currentColor; border-radius: var(--r-bouton);
  font: 500 var(--t-mention)/1.4 var(--sans); letter-spacing: 0; white-space: nowrap; color: var(--ardoise);
}

/* En-tête */
.entete { position: sticky; top: 0; z-index: 40; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.entete__in { display: flex; align-items: center; gap: var(--s4); height: var(--entete); }
.logo { display: block; flex: none; }
.logo img { width: 132px; height: auto; }
.nav { display: none; margin-left: auto; }
.nav ul { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--chenal); text-decoration: none; font: 500 var(--t-ui)/1.3 var(--sans); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--magenta); }
.langue { display: flex; gap: 2px; margin-left: auto; }
.langue button {
  min-width: 40px; min-height: 40px; padding: 0 8px; background: none; border: 0; border-radius: var(--r-bouton);
  font: 500 var(--t-petit)/1 var(--sans); color: var(--ardoise); cursor: pointer;
}
.langue button[aria-pressed="true"] { color: var(--chenal); text-decoration: underline; text-decoration-color: var(--magenta); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.entete__reserver { display: none; }
.entete__menu {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 10px; background: none; border: 0;
  font: 500 var(--t-ui)/1 var(--sans); color: var(--chenal); cursor: pointer;
}
.entete__menu svg { width: 24px; height: 24px; }
/* 320 px : logo, langues et « Menu » ne tiennent pas sur une ligne */
@media (max-width: 359px) {
  .logo img { width: 112px; }
  .langue button { min-width: 36px; padding: 0 4px; }
  .entete__menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
/* Écrans très bas (paysage, zoom 400 %) : en-tête et barre du bas ne restent pas collés, ils mangeraient l'écran */
@media (max-height: 460px) {
  .entete { position: relative; }
  .barre { position: static; transform: none; box-shadow: none; }
  body:has(.barre) { padding-bottom: 0; }
}
@media (min-width: 1080px) {
  .nav { display: block; }
  .langue { margin-left: var(--s4); }
  .entete__reserver { display: inline-flex; min-height: 44px; padding: 10px 18px; }
  .entete__menu { display: none; }
  .logo img { width: 152px; }
}

/* Menu mobile */
dialog.menu {
  margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; padding: 0;
  background: var(--blanc); color: var(--chenal);
}
dialog.menu::backdrop { background: rgba(15, 51, 64, 0.4); }
.menu__in { display: flex; flex-direction: column; min-height: 100%; padding: 0 var(--gouttiere) var(--s6); }
.menu__tete { display: flex; align-items: center; justify-content: space-between; height: var(--entete); }
.menu__fermer { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; font: 500 var(--t-ui)/1 var(--sans); color: var(--chenal); cursor: pointer; }
.menu ul { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.menu li + li { border-top: 1px solid var(--filet); }
.menu li a { display: block; padding: 14px 0; font: 400 28px/1.15 var(--serif); color: var(--chenal); text-decoration: none; }
.menu li a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--magenta); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.menu__bas { margin-top: auto; display: grid; gap: var(--s3); padding-top: var(--s6); }
.menu[open] li { animation: monte-menu .45s var(--courbe) both; }
.menu[open] li:nth-child(2) { animation-delay: 40ms; }
.menu[open] li:nth-child(3) { animation-delay: 80ms; }
.menu[open] li:nth-child(4) { animation-delay: 120ms; }
.menu[open] li:nth-child(5) { animation-delay: 160ms; }
@keyframes monte-menu { from { opacity: 0; transform: translateY(10px); } }

/* Pied de page */
.pied { background: var(--chenal); color: var(--blanc); padding-block: var(--s8) var(--s9); }
.pied a { color: var(--blanc); }
.pied__grille { display: grid; gap: var(--s7); }
.pied h2 { font-size: var(--t-h3); line-height: 1.2; margin-bottom: var(--s4); }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.pied__contact a { font-size: var(--t-chapeau); }
.pied__note { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgba(255, 255, 255, 0.22); font-size: var(--t-mention); color: #C9D6DA; max-width: none; }
@media (min-width: 900px) { .pied__grille { grid-template-columns: 5fr 3fr 3fr; } }

/* Barre du bas (téléphone) */
.barre {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; gap: var(--s2); align-items: center;
  padding: 10px var(--gouttiere) calc(10px + env(safe-area-inset-bottom));
  background: var(--blanc); border-top: 1px solid var(--filet); box-shadow: var(--ombre);
  transform: translateY(110%); transition: transform .24s var(--courbe);
}
.barre.est-visible { transform: none; }
.barre__prix { margin-right: auto; font: 500 var(--t-petit)/1.25 var(--sans); color: var(--ardoise); }
.barre__prix strong { display: block; font: 500 20px/1.1 var(--serif); color: var(--chenal); white-space: nowrap; }
.barre .bouton { min-height: 46px; padding-inline: 16px; }
.barre__wa { width: 46px; padding: 0; }
@media (min-width: 1080px) { .barre { display: none; } }
@media (max-width: 1079px) { body:has(.barre) { padding-bottom: 76px; } html:has(.barre) { scroll-padding-bottom: 96px; } }

/* Textes qui montent derrière un rideau (classe .monte posée par commun.js). L'état d'attente n'utilise pas clip-path :
   un élément entièrement rogné n'est jamais vu par l'IntersectionObserver (revue motion). L'animation remplit « backwards » :
   finie, elle ne laisse aucun clip-path qui rognerait l'anneau de focus. */
.monte main h2, .monte main .chapeau, .monte [data-monte] { opacity: 0; transform: translateY(0.4em); }
.monte main h2.est-la, .monte main .chapeau.est-la, .monte [data-monte].est-la {
  opacity: 1; transform: none; animation: rideau 1s var(--courbe) var(--d, 0ms) backwards;
}
@keyframes rideau {
  from { clip-path: inset(-0.2em -0.2em 100% -0.2em); transform: translateY(0.4em); opacity: 0; }
  40% { opacity: 1; }
  to { clip-path: inset(-0.2em -0.2em -0.4em -0.2em); transform: none; opacity: 1; }
}
@media print {
  .monte main h2, .monte main .chapeau, .monte [data-monte] { opacity: 1 !important; transform: none !important; animation: none !important; }
  .entete { position: static; }
  .barre, .entete__menu, .entete__reserver, .langue, .evitement { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
