:root {
  --mer: #1F4E5F;
  --mer-clair: #2E6E83;
  --sable: #F6F0E6;
  --sable-fonce: #E8DCC7;
  --terre: #B5653A;
  --encre: #22292C;
  --doux: #6B7376;
  --carte: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sable); color: var(--encre);
  font-family: "Nunito Sans", system-ui, -apple-system, sans-serif; font-size: 16px;
}
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; }

/* Porte */
.porte { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 24px 16px;
  background: linear-gradient(180deg, var(--mer) 0%, var(--mer-clair) 100%); color: #fff; }
.porte h1 { font-size: clamp(48px, 12vw, 84px); margin: 0; line-height: 1; }
.porte .sous { color: #F3E6CF; }
.porte form { margin: 28px auto 0; width: min(320px, 100%); display: grid; gap: 10px; text-align: left; }
.porte label { font-size: 14px; color: #E9F1F3; }
.porte input { font: inherit; padding: 12px 14px; border-radius: 10px; border: 0; }
.porte button { font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 10px; background: var(--terre); color: #fff; cursor: pointer; }
.msg { min-height: 1.2em; margin: 0; color: #FFD7C2; font-size: 14px; }

/* En-têtes */
.entete { text-align: center; padding: 30px 16px 18px; background: var(--mer); color: #fff; position: relative; }
.entete h1 { font-size: clamp(40px, 10vw, 68px); margin: 0; line-height: 1.05; }
.sous { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 20px; margin: 4px 0 0; color: #F3E6CF; }
.compte { font-size: 14px; margin: 8px 0 0; color: #CFE0E5; }
.badge { display: inline-block; margin: 12px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--terre); font-size: 13px; font-weight: 700; }
.entete-album { background-size: cover; background-position: center; padding-top: 52px; }
.entete-album::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,45,55,.55), rgba(20,45,55,.8)); }
.entete-album > * { position: relative; }
.retour { position: absolute; top: 12px; left: 12px; border: 0; background: rgba(255,255,255,.18); color: #fff;
  font: inherit; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.filtres { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.filtres button { border: 0; border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 600; font-size: 14px;
  background: rgba(255,255,255,.18); color: #fff; cursor: pointer; }
.filtres button[aria-pressed="true"] { background: #fff; color: var(--mer); }

.contenu { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.vide { text-align: center; color: var(--doux); }

/* Voyages */
.voyages { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.voyage { display: block; border: 0; padding: 0; text-align: left; background: var(--carte); border-radius: 14px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(31,78,95,.12); cursor: pointer; font: inherit; color: inherit; }
.voyage-img { aspect-ratio: 4 / 3; background: var(--sable-fonce) center / cover no-repeat; }
.voyage-txt { padding: 12px 14px 14px; }
.voyage-txt h2 { margin: 0; font-size: 26px; line-height: 1.1; color: var(--mer); }
.voyage-txt p { margin: 4px 0 0; color: var(--doux); font-size: 14px; }

/* Boutons */
.actions-admin { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 6px; }
.bouton { display: inline-block; font: inherit; font-weight: 700; padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--terre); color: #fff; cursor: pointer; }
.bouton.discret { background: var(--sable-fonce); color: var(--encre); }

/* Envoi */
.envoi { background: var(--carte); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; }
.envoi p { margin: 0 0 8px; font-size: 14px; }
.envoi progress { width: 100%; height: 10px; accent-color: var(--terre); }

/* Jours et grille */
.jour h2 { font-size: 28px; margin: 26px 0 10px; color: var(--mer); }
.jour h2 small { font-family: "Nunito Sans", sans-serif; font-size: 13px; color: var(--doux); font-weight: 400; margin-left: 8px; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
@media (max-width: 520px) { .grille { grid-template-columns: repeat(3, 1fr); gap: 3px; } }
.case { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--sable-fonce); cursor: pointer; overflow: hidden; }
.case img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case .duree { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px;
  padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.case .bulle { position: absolute; left: 6px; bottom: 6px; background: rgba(255,255,255,.85); border-radius: 999px;
  font-size: 12px; padding: 1px 6px; }

/* Visionneuse */
.vis { position: fixed; inset: 0; background: #0E1416; z-index: 50; display: flex; flex-direction: column; }
.v-scene { flex: 1; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding: 48px 8px 0; }
.v-scene img, .v-scene video { max-width: 100%; max-height: calc(100% - 60px); object-fit: contain; }
.v-legende { color: #F3E6CF; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; font-style: italic;
  text-align: center; max-width: 780px; padding: 10px 16px 0; min-height: 1em; }
.v-fermer { position: absolute; top: 8px; right: 12px; z-index: 2; border: 0; background: none; color: #fff; font-size: 38px; cursor: pointer; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; border: 0; background: rgba(255,255,255,.12);
  color: #fff; font-size: 34px; width: 46px; height: 64px; border-radius: 10px; cursor: pointer; }
.v-prec { left: 8px; } .v-suiv { right: 8px; }
@media (max-width: 640px) { .v-nav { display: none; } }
.v-barre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); color: #CFD8DA; font-size: 14px; }
.v-outils { display: flex; flex-wrap: wrap; gap: 6px; }
.v-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 14px; padding: 7px 12px;
  border-radius: 999px; cursor: pointer; text-decoration: none; }
.v-btn.danger { background: rgba(181,101,58,.55); }

/* Fenêtre */
.fen { position: fixed; inset: 0; z-index: 60; background: rgba(14,20,22,.6); display: grid; place-items: center; padding: 16px; }
.fen-boite { background: var(--carte); border-radius: 14px; padding: 18px 18px 14px; width: min(520px, 100%); max-height: 92vh; overflow: auto; }
.fen-boite h2 { margin: 0 0 12px; font-size: 28px; color: var(--mer); }
.fen-boite label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
.fen-boite input, .fen-boite textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #CDBFA8; border-radius: 8px; }
.fen-boite textarea { min-height: 120px; resize: vertical; }
.fen-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 0; }
.qr-grand { display: block; margin: 0 auto; width: 240px; height: 240px; image-rendering: pixelated; }
.qr-lien { word-break: break-all; text-align: center; font-size: 14px; }
.qr-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.qr-liste figure { margin: 0; text-align: center; font-size: 12px; }
.qr-liste img { width: 100%; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--encre); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); }
