/* Concept : un carnet de séjour lagon et sable, dans l'esprit du dossier de référence : vert lagon, panneaux doux, titres Didot.
   La clé de la suite est posée sur la photo ; la balise jaune et noire du chemin d'arrivée guide les consignes. */
:root {
  --paper: #FCFCFA;
  --card: #FFFFFF;
  --ink: #1E2E2B;
  --ink-2: #47574F;
  --ink-3: #6A7A74;
  --line: #DDE7E4;
  --fill: #006562;
  --lagoon: #006562;
  --lagoon-soft: #EBF3F2;
  --cream: #F7F2EA;
  --orange: #E8821C;
  --balise: #F2C014;
  --danger: #A9400F;
  --danger-soft: #FCEFE2;
  --lock: #006562;
  --lock-tile: #004E4C;
  --on-lock: #F6FBFA;
  --digit: #FFE9C7;
  --band: #00403E;
  --shadow: 0 10px 28px rgba(0, 60, 58, .14);
  --suite: #006562;
  --display: 'GFS Didot', 'Didot', 'Bodoni 72', 'Times New Roman', serif;
  --body: 'Figtree', 'Lato', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1716;
    --card: #162322;
    --ink: #EDF4F2;
    --ink-2: #B8C8C3;
    --ink-3: #8FA29C;
    --line: #2A3B39;
    --fill: #0A7D79;
    --lagoon: #62CBC5;
    --lagoon-soft: #173230;
    --cream: #26221B;
    --danger: #F5A77C;
    --danger-soft: #36241A;
    --lock: #0A5553;
    --lock-tile: #063B39;
    --band: #06302F;
    --shadow: 0 10px 28px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0D1716;
  --card: #162322;
  --ink: #EDF4F2;
  --ink-2: #B8C8C3;
  --ink-3: #8FA29C;
  --line: #2A3B39;
  --fill: #0A7D79;
  --lagoon: #62CBC5;
  --lagoon-soft: #173230;
  --cream: #26221B;
  --danger: #F5A77C;
  --danger-soft: #36241A;
  --lock: #0A5553;
  --lock-tile: #063B39;
  --band: #06302F;
  --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lagoon); outline-offset: 2px; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.g-root { max-width: 560px; margin-inline: auto; background: var(--paper); min-height: 100%; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); position: relative; }
@media (min-width: 700px) { .g-root { box-shadow: 0 0 0 1px var(--line); } }
.pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.overline { font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

/* Photo d'accueil */
.hero { position: relative; height: clamp(270px, 66vw, 350px); overflow: hidden; background: #004E4C; color: #fff; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 45, 43, .42) 0, rgba(0, 45, 43, 0) 34%, rgba(0, 45, 43, .82) 100%); }
.hero-top, .hero-text { position: absolute; z-index: 1; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.hero-top { top: 14px; font-size: 13px; font-weight: 600; letter-spacing: .22em; }
.hero-text { bottom: 54px; }
.hero-hello { font-size: 17px; font-weight: 500; }
.hero-suite { font: 400 clamp(40px, 11.5vw, 52px)/1.05 var(--display); letter-spacing: .005em; margin-top: 2px; text-wrap: balance; }

/* Carte du séjour */
.stay { position: relative; z-index: 2; margin: -38px max(16px, env(safe-area-inset-left, 0px)) 0; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; }
.stay-dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.stay-dates > div:last-child { text-align: right; }
.stay-day { font-size: 16px; font-weight: 600; margin-top: 1px; }
.stay-hour { font-size: 13px; color: var(--ink-2); }
.stay-nights { font-size: 12px; font-weight: 600; color: var(--lagoon); white-space: nowrap; text-align: center; }
.stay-nights svg { display: block; margin: 0 auto 1px; width: 26px; height: 12px; }
.stage { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.stage-title { font: 400 25px/1.2 var(--display); color: var(--lagoon); }
.stage-sub { color: var(--ink-2); font-size: 15px; margin-top: 2px; }

/* Boîte à clefs */
.lock { background: var(--lock); color: var(--on-lock); border-radius: 16px; padding: 15px 16px 16px; }
.lock .overline { color: #FFD08A; }
.lock-sub { font-size: 14px; opacity: .82; margin-top: 2px; }
.wheels { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wheel { width: 56px; height: 68px; display: grid; place-items: center; background: var(--lock-tile); border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 12px 14px -10px rgba(0, 0, 0, .8), inset 0 -12px 14px -10px rgba(0, 0, 0, .8); font-size: 38px; font-weight: 600; color: var(--digit); font-variant-numeric: tabular-nums; animation: roll .55s cubic-bezier(.2, .9, .3, 1.1) both; }
.wheel:nth-child(2) { animation-delay: .07s; }
.wheel:nth-child(3) { animation-delay: .14s; }
.wheel:nth-child(4) { animation-delay: .21s; }
@keyframes roll { from { transform: translateY(-9px) rotateX(38deg); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .wheel { animation: none; } }
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.lock-note { font-size: 14px; opacity: .85; flex: 1 1 180px; min-width: 0; }
.lock .btn { background: var(--orange); color: #fff; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 10px; background: var(--fill); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.suite { background: var(--fill); color: #fff; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btns.one { grid-template-columns: 1fr; }

/* Blocs */
.block { margin-top: 26px; }
.block > h2, .h2 { font: 400 28px/1.2 var(--display); text-wrap: balance; }
.block > h2 + *, .h2 + * { margin-top: 10px; }
.lead { color: var(--ink-2); }
.rows { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 58px; }
.row + .row { border-top: 1px solid var(--line); }
.row-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--lagoon-soft); color: var(--lagoon); }
.row-ic svg { width: 18px; height: 18px; }
.row-body { flex: 1 1 auto; min-width: 0; }
.row-title { font-weight: 600; }
.row-text { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.mono { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); letter-spacing: .02em; }

/* Bandeau règles : la balise jaune et noire encadre l'essentiel */
.rules { margin-top: 26px; background: var(--band); color: #F6FBFA; }
.rules::before, .rules::after { content: ""; display: block; height: 9px; background: repeating-linear-gradient(-45deg, #F2C014 0 11px, #14211F 11px 22px); }
.rules-in { padding-top: 16px; padding-bottom: 16px; }
.rules ul { display: grid; gap: 5px; }
.rules li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .03em; text-transform: uppercase; }
.rules li svg { width: 18px; height: 18px; color: #F2C014; flex: none; }
.rules p { margin-top: 10px; font-size: 15px; color: #CFE1DE; }

/* Alertes */
.alert { background: var(--danger-soft); border-radius: 16px; padding: 14px 15px; }
.alert h3 { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 700; color: var(--danger); }
.alert h3 svg { width: 18px; height: 18px; flex: none; }
.alert li { margin-top: 5px; font-size: 15px; }
.alert li:first-child { font-weight: 600; }

/* En-tête de page */
.page-head { padding-top: 24px; }
.page-title { font: 400 39px/1.1 var(--display); margin-top: 8px; text-wrap: balance; }
.page-title::after { content: ""; display: block; width: 46px; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--orange); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--orange); border-radius: 5px; padding: 3px 9px; }
.page-sub { color: var(--ink-2); margin-top: 10px; }

/* Étapes du chemin : le rail reprend la balise */
.steps { position: relative; margin-top: 16px; padding-left: 34px; display: grid; gap: 24px; }
.steps::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 7px; border-radius: 4px; background: repeating-linear-gradient(-45deg, #F2C014 0 7px, #14211F 7px 14px); }
.step { position: relative; }
.step-n { position: absolute; left: -34px; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #14211F; color: #F2C014; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 3px var(--paper); }
.step-title { font-size: 17px; font-weight: 700; line-height: 28px; }
.step-text { color: var(--ink-2); }
.step-photo { display: block; width: 100%; padding: 0; border: 0; background: none; margin-top: 8px; border-radius: 14px; overflow: hidden; }
.step-photo img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }

/* Galerie */
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-top: 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery button { flex: none; padding: 0; border: 0; background: none; scroll-snap-align: start; border-radius: 14px; overflow: hidden; }
.gallery img { height: 240px; width: auto; max-width: min(82vw, 440px); object-fit: cover; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 14px; padding: 4px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); background: transparent; border: 0; }

/* Spa */
.spa-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spa-photos button { padding: 0; border: 0; background: none; border-radius: 14px; overflow: hidden; }
.spa-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.rule-list { display: grid; gap: 9px; margin-top: 12px; }
.rule-list li { display: flex; gap: 10px; }
.rule-list svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.rule-list .no svg { color: var(--danger); }
.rule-list .yes svg { color: var(--lagoon); }
.rule-list .no { font-weight: 500; }

/* Adresses */
.filters { display: flex; gap: 6px; overflow-x: auto; margin-top: 14px; padding-bottom: 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex: none; font-size: 15px; padding: 7px 14px; font-weight: 500; }
.filters .chip[aria-pressed="true"] { background: var(--fill); color: #fff; box-shadow: none; }
.note { font-size: 14px; color: var(--ink-3); margin-top: 10px; }
.place { padding: 14px 0; border-bottom: 1px solid var(--line); }
.place-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.place h3 { font-size: 17px; font-weight: 700; line-height: 1.3; min-width: 0; }
.drive { flex: none; font-size: 14px; font-weight: 600; color: var(--lagoon); white-space: nowrap; }
.place p { color: var(--ink-2); font-size: 15px; margin-top: 3px; }
.place .meta { color: var(--ink-3); font-size: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.links a { font-size: 15px; font-weight: 600; color: var(--lagoon); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; }
.links svg { width: 16px; height: 16px; }

/* Départ */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; cursor: pointer; }
.check + .check { border-top: 1px solid var(--line); }
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--lagoon); }
.check.todo input:checked + span { color: var(--ink-3); text-decoration: line-through; }

/* Vidéos */
.video { border-radius: 10px; overflow: hidden; background: #000; margin-top: 10px; }
.video video { width: 100%; }

/* Bas de page */
.closing { margin-top: 32px; padding-top: 24px; padding-bottom: 22px; background: var(--lagoon-soft); }
.closing-title { font: 400 28px/1.2 var(--display); color: var(--lagoon); }
.closing .btns { margin-top: 14px; }
.contact-lines { margin-top: 14px; font-size: 15px; color: var(--ink-2); display: grid; gap: 3px; }
.contact-lines a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* Barre d'onglets */
.tabs { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); box-shadow: 0 -1px 0 var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
.tabs button { display: grid; justify-items: center; gap: 2px; padding: 5px 0; border: 0; background: none; color: var(--ink-3); font-size: 12px; font-weight: 500; border-radius: 8px; }
.tabs svg { width: 22px; height: 22px; }
.tabs button[aria-current="page"] { color: var(--lagoon); font-weight: 700; }

/* Agrandissement et messages */
.zoom { position: fixed; inset: 0; z-index: 40; background: rgba(5, 10, 10, .94); display: grid; place-items: center; padding: 12px; border: 0; width: 100%; }
.zoom img { max-height: 92%; max-width: 100%; object-fit: contain; }
.zoom-x { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); color: #fff; font-size: 15px; font-weight: 600; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--band); color: #fff; padding: 9px 15px; border-radius: 8px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.offline { background: var(--balise); color: #14211F; font-size: 14px; font-weight: 600; padding: 7px 16px; }

/* Page d'erreur et accueil général */
.empty { padding: 44px 16px; }
.empty h1 { font: 400 36px/1.15 var(--display); }
.empty p { margin-top: 10px; color: var(--ink-2); }
.empty .btns { margin-top: 18px; }
.field { display: grid; gap: 5px; margin-top: 14px; }
.field label, .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
input, textarea, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
textarea { min-height: 60px; resize: vertical; field-sizing: content; }
.error { color: var(--danger); font-size: 15px; margin-top: 10px; }

/* Idées de journée */
.day { background: var(--cream); border-radius: 16px; padding: 15px 16px; margin-top: 12px; }
.day h3 { font: 400 23px/1.2 var(--display); }
.day ol { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.day li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; font-size: 15px; }
.day b { font-size: 13px; font-weight: 700; color: var(--danger); line-height: 22px; }
