/* Fanal · page des voyageurs (assistant d'accueil).
   Charte du livret d'accueil : marine 17324D, océan 2B6A8E, ciel 6FA8C9, écume EAF2F7, sable F7F1E8,
   sable foncé E9D8BC, corail E07155, corail clair FBEAE5, soleil F0B34A, texte 26323D.
   Polices servies par Fanal (aucune ressource extérieure : CSP « default-src 'self' »). */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/lato-400.ttf?v=3.5.4") format("truetype");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/lato-700.ttf?v=3.5.4") format("truetype");
}

/* ---------- jetons (thème clair) ---------- */
:root {
  color-scheme: light;
  --fond: #F7F1E8;
  --surface: #FFFFFF;
  --surface-douce: #EAF2F7;
  --texte: #26323D;
  --texte-doux: #536476;
  --titre: #17324D;
  --ligne: #D8E2EA;
  --bord-champ: #7D8C9B;
  --entete-fond: #17324D;
  --entete-texte: #FFFFFF;
  --entete-doux: #CFE0EC;
  --accent: #E07155;
  --primaire: #17324D;
  --primaire-survol: #0F2438;
  --primaire-texte: #FFFFFF;
  --lien: #2B6A8E;
  --lien-survol: #17324D;
  --puce-fond: #EAF2F7;
  --puce-bord: #2B6A8E;
  --puce-texte: #17324D;
  --source-texte: #2B6A8E;
  --bulle-voyageur: #17324D;
  --bulle-voyageur-texte: #FFFFFF;
  --transmis-fond: #FBEAE5;
  --transmis-texte: #8A3A26;
  --hote-fond: #FFF6F2;
  --hote-bord: #E07155;
  --hote-tete: #8A3A26;
  --urgence: #D7263D;
  --urgence-texte: #B01E32;
  --urgence-sur: #FFFFFF;
  --urgence-fond-doux: #FDECEE;
  --succes-fond: #E6F3EC;
  --succes-texte: #1E5B3A;
  --bandeau-fond: #F0B34A;
  --bandeau-texte: #17324D;
  --separateur-fond: rgb(23 50 77 / 0.07);
  /* marée (3.5.4) : eau et courbe, pastilles des pleines (océan) et basses mers (sable), conseil (corail) */
  --maree-eau: #DCEAF3;
  --maree-courbe: #2B6A8E;
  --maree-pleine-fond: #DCEAF3;
  --maree-pleine-texte: #1F5F84;
  --maree-basse-fond: #F3E6D3;
  --maree-basse-texte: #8A5A1E;
  --maree-onglets: #E9E2D6;
  --maree-conseil-icone: #C2553A;
  --voile: rgb(15 36 56 / 0.55);
  --eclat: rgb(240 179 74 / 0.6);
  --anneau: #2B6A8E;
  --anneau-defaut: #2B6A8E;
  --anneau-entete: #F0B34A;
  --ombre: 0 1px 2px rgb(23 50 77 / 0.06), 0 2px 10px rgb(23 50 77 / 0.05);
  --ombre-menu: 0 12px 32px rgb(15 36 56 / 0.22);
  --rayon: 16px;
  --colonne: 560px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- thème sombre ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --fond: #0E1A26;
    --surface: #172636;
    --surface-douce: #1D3245;
    --texte: #E6EDF3;
    --texte-doux: #A7B6C4;
    --titre: #F4EBDD;
    --ligne: #2A3F53;
    --bord-champ: #6E8396;
    --entete-fond: #132C44;
    --entete-texte: #FFFFFF;
    --entete-doux: #BFD5E5;
    --primaire: #8FC1DE;
    --primaire-survol: #A9D0E7;
    --primaire-texte: #0E1A26;
    --lien: #8FC1DE;
    --lien-survol: #BFDDF0;
    --puce-fond: #1D3245;
    --puce-bord: #6FA8C9;
    --puce-texte: #E6EDF3;
    --source-texte: #A9CFE6;
    --bulle-voyageur: #245A79;
    --bulle-voyageur-texte: #FFFFFF;
    --transmis-fond: #3B2621;
    --transmis-texte: #F5B7A5;
    --hote-fond: #2A211F;
    --hote-bord: #E07155;
    --hote-tete: #F5B7A5;
    --urgence: #C81F37;
    --urgence-texte: #FF8E9B;
    --urgence-sur: #FFFFFF;
    --urgence-fond-doux: #3A1A20;
    --succes-fond: #173A2A;
    --succes-texte: #A6E3C0;
    --bandeau-fond: #F0B34A;
    --bandeau-texte: #0E1A26;
    --separateur-fond: rgb(255 255 255 / 0.07);
    --maree-eau: rgb(111 168 201 / 0.2);
    --maree-courbe: #8FC1DE;
    --maree-pleine-fond: #1D3245;
    --maree-pleine-texte: #A9CFE6;
    --maree-basse-fond: #3A2E1E;
    --maree-basse-texte: #F0C98A;
    --maree-onglets: #0A141E;
    --maree-conseil-icone: #F5B7A5;
    --voile: rgb(0 0 0 / 0.6);
    --eclat: rgb(240 179 74 / 0.55);
    --anneau: #F0B34A;
    --anneau-defaut: #F0B34A;
    --ombre: 0 1px 2px rgb(0 0 0 / 0.25);
    --ombre-menu: 0 12px 32px rgb(0 0 0 / 0.5);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--fond);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
}
body[data-ecran="discussion"] { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--lien); }
p, h1, h2, h3 { margin: 0; }
:focus-visible { outline: 3px solid var(--anneau); outline-offset: 2px; }
.titre-ecran:focus { outline: none; }

.invisible {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icone {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icone-petite { width: 16px; height: 16px; stroke-width: 2.2; }
.sans-script { padding: 24px; text-align: center; }

/* ---------- connexion perdue : sous l'en-tête de l'écran affiché (voyageurs.js le déplace) ---------- */
.reseau {
  position: fixed;
  z-index: 50;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bandeau-fond);
  color: var(--bandeau-texte);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.2);
  animation: descente 0.25s ease-out both;
}
.entete .reseau { position: absolute; top: calc(100% + 10px); }
.reseau .icone { width: 18px; height: 18px; }

/* ---------- écrans ---------- */
.ecran {
  display: flex;
  flex-direction: column;
}
.ressort { flex-grow: 1; }

.ecran-chargement {
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
}
.chargement .points i { width: 10px; height: 10px; background: var(--lien); }

/* ---------- en-têtes ---------- */
.entete {
  position: relative;
  z-index: 10;
  background: var(--entete-fond);
  color: var(--entete-texte);
  --anneau: var(--anneau-entete);
}
.entete-int {
  width: 100%;
  max-width: calc(var(--colonne) + 48px);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
.entete-grande .entete-int {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: calc(env(safe-area-inset-top) + 18px);
  padding-bottom: 8px;
}
.entete-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.entete-lieu {
  min-width: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--entete-doux);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entete-maison {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.entete-accent {
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- décor marin des en-têtes : un phare au large et la mer qui vient sur le sable ----------
   Le faisceau tourne comme celui d'un phare vu de côté (il s'allonge vers la gauche, se raccourcit en venant vers
   nous, la lanterne brille : l'éclat, puis il repasse derrière la tour) ; la houle et la vague glissent en sens
   contraires, très lentement. Transform et opacity seulement (le compositeur s'en charge, rien n'est repeint) ;
   tout reste fixe si l'appareil demande moins d'animations. */
.entete-grande .entete-int, .entete-phare .entete-int { position: relative; z-index: 1; }
.ciel { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ciel-colonne {
  position: relative;
  height: 100%;
  max-width: calc(var(--colonne) + 48px);
  margin: 0 auto;
}
.phare {
  position: absolute;
  right: max(30px, calc(env(safe-area-inset-right) + 6px));
  bottom: 21px;
  width: 24px;
  height: 64px;
}
.tour { display: block; width: 100%; height: 100%; overflow: visible; }
.tour-fut { fill: #EAF2F7; }
.tour-bande, .tour-toit { fill: var(--accent); }
.tour-galerie { fill: #CFE0EC; }
.tour-lanterne { fill: #F0B34A; }
.faisceau {
  position: absolute;
  right: 12px;
  top: 16.5px;
  width: min(1180px, 96vw);
  height: 320px;
  margin-top: -160px;
  transform-origin: 100% 50%;
  background:
    conic-gradient(from 262deg at 100% 50%, transparent 4.5deg, rgb(255 222 160 / 0.13) 6.2deg, rgb(255 222 160 / 0.26) 9deg, rgb(255 222 160 / 0.13) 11.8deg, transparent 13.5deg),
    conic-gradient(from 262deg at 100% 50%, transparent -4deg, rgb(255 222 160 / 0.06) 9deg, transparent 22deg);
  -webkit-mask-image: linear-gradient(270deg, #000 6%, rgb(0 0 0 / 0.6) 50%, transparent 97%);
  mask-image: linear-gradient(270deg, #000 6%, rgb(0 0 0 / 0.6) 50%, transparent 97%);
  animation: faisceau 16s linear infinite;
}
.lanterne {
  position: absolute;
  left: 50%;
  top: 16.5px;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, #FFF6E0, rgb(255 214 140 / 0.7) 30%, rgb(240 179 74 / 0.22) 60%, transparent);
  opacity: 0;
  animation: eclat-phare 16s ease-in-out infinite;
}
.mer { position: relative; height: 36px; margin-top: -2px; overflow: hidden; pointer-events: none; }
.mer-basse { height: 18px; margin-top: 0; }
.houle { position: absolute; left: 0; bottom: 0; display: block; width: 200%; height: 100%; }
.houle.loin { fill: #245B7C; animation: houle 150s linear infinite reverse; }
.houle.rive { animation: houle 110s linear infinite; }
.houle .eau { fill: var(--fond); }
.houle .ecume { stroke: rgb(255 255 255 / 0.9); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.houle .crete { stroke: #6FA8C9; stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.8; }
.mer-basse .houle .ecume { stroke-width: 2; }
.mer-basse .houle .crete { opacity: 0.55; }
@media (prefers-color-scheme: dark) {
  .houle.loin { fill: #1E4A66; }
  .houle .ecume { stroke: rgb(207 224 236 / 0.75); }
}

/* drapeaux des langues (symboles d-fr, d-en, d-nl, d-de) : 3 × 2, coins arrondis, liseré pour le blanc */
.drapeau {
  display: block;
  flex: none;
  width: 24px;
  height: 16px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.14);
}
.drapeau svg { display: block; width: 100%; height: 100%; }

/* boutons de langue : un drapeau dans une pastille de 32 px, cible de 44 px */
.langues { display: flex; gap: 2px; flex: none; }
.langue {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  background: none;
}
.langue::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6px 0;
  border: 1.5px solid transparent;
  border-radius: 16px;
  transition: background-color 0.15s, border-color 0.15s;
}
.langue .drapeau { width: 26px; height: 18px; opacity: 0.72; transition: opacity 0.15s, transform 0.15s; }
.langue[aria-pressed="true"] .drapeau { opacity: 1; }
.langue[aria-pressed="true"]::before { background: rgb(255 255 255 / 0.16); border-color: #FFFFFF; }
@media (hover: hover) { .langue:hover .drapeau { opacity: 1; transform: scale(1.06); } }

/* ---------- contenu des écrans d'accueil et d'urgence ---------- */
.contenu {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  max-width: calc(var(--colonne) + 48px);
  margin: 0 auto;
  padding: 28px max(24px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  gap: 22px;
}
.bloc-titre { display: flex; flex-direction: column; gap: 8px; }
.titre-grand {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.15;
  color: var(--titre);
}
.intro { font-size: 16px; line-height: 1.5; }
.note {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-douce);
  color: var(--texte);
  font-size: 15px;
}

/* formulaires */
.formulaire { display: flex; flex-direction: column; gap: 10px; }
.formulaire label { font-size: 15px; font-weight: 700; color: var(--titre); }
.champ {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--bord-champ);
  border-radius: 12px;
  background: var(--surface);
  color: var(--texte);
  font-size: 17px;
}
.champ::placeholder { color: var(--texte-doux); opacity: 1; }
.champ:focus-visible { outline: 3px solid var(--anneau); outline-offset: 1px; border-color: var(--lien); }
.champ[aria-invalid="true"] { border-color: var(--urgence); }
.champ-long {
  height: auto;
  min-height: 96px;
  padding: 12px 16px;
  line-height: 1.45;
  resize: vertical;
}
.aide { font-size: 13px; color: var(--texte-doux); }
.erreur-champ {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--urgence-texte);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.erreur-champ .icone { width: 18px; height: 18px; margin-top: 1px; }

/* boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.1s, opacity 0.15s;
}
.bouton:active:not(:disabled) { transform: scale(0.98); }
.bouton:disabled { opacity: 0.6; }
.formulaire .bouton { margin-top: 4px; }
.bouton-primaire { background: var(--primaire); color: var(--primaire-texte); }
.bouton-urgence { background: var(--urgence); color: var(--urgence-sur); }
.bouton-urgence-contour {
  min-height: 48px;
  border: 2px solid var(--urgence);
  background: var(--surface);
  color: var(--urgence-texte);
  font-size: 16px;
}
.bouton-discret {
  min-height: 44px;
  background: transparent;
  color: var(--lien);
  font-size: 16px;
}
@media (hover: hover) {
  .bouton-primaire:hover:not(:disabled) { background: var(--primaire-survol); }
  .bouton-urgence-contour:hover { background: var(--urgence-fond-doux); }
  .bouton-discret:hover { text-decoration: underline; }
  a:hover { color: var(--lien-survol); }
}

.carte {
  background: var(--surface);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.atouts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 16px 18px;
  list-style: none;
}
.atouts li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.35; }
.atouts .icone { width: 22px; height: 22px; color: var(--lien); }
.pied {
  font-size: 12px;
  line-height: 1.4;
  color: var(--texte-doux);
  text-align: center;
}

/* ---------- écran d'information (fermé, QR code) ---------- */
#ecran-info { padding-top: 32px; gap: 20px; }
.carte-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 22px;
  border-radius: 18px;
}
.carte-info h1 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
  color: var(--titre);
}
.info-textes { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.5; }
/* accès invité : hors séjour, le code donné par l'hôte ouvre la page */
.bouton-code {
  align-self: stretch;
  min-height: 48px;
  margin-top: 4px;
  border: 2px solid var(--primaire);
  background: var(--surface);
  color: var(--lien);
  font-size: 16px;
}
@media (hover: hover) { .bouton-code:hover { background: var(--surface-douce); } }
.pastille {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-douce);
  color: var(--lien);
}
.pastille .icone { width: 26px; height: 26px; }
.sous-titre { font-size: 16px; font-weight: 700; color: var(--titre); }
.urgence-compacte { display: flex; flex-direction: column; gap: 10px; }

/* ---------- numéros d'urgence ---------- */
.numeros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.numero {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 80px;
  padding: 12px 14px;
  border: 2px solid var(--urgence);
  border-radius: 14px;
  background: var(--surface);
  color: var(--titre);
  text-decoration: none;
  transition: transform 0.1s;
}
.numero:active { transform: scale(0.98); }
.numero-chiffre { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--urgence-texte); }
.numero-libelle { font-size: 14px; line-height: 1.3; color: var(--texte); }
.numero-principal { background: var(--urgence); }
.numero-principal .numero-chiffre, .numero-principal .numero-libelle { color: var(--urgence-sur); }
.numeros-compacts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.numeros-compacts .numero {
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 60px;
  padding: 6px 4px;
  border-radius: 12px;
  text-align: center;
}
.numeros-compacts .numero-chiffre { font-size: 20px; }
.numeros-compacts .numero-libelle { font-size: 11px; line-height: 1.2; }

/* ---------- discussion ---------- */
.ecran-discussion {
  height: 100vh;
  overflow: hidden;
}
@supports (height: 100dvh) {
  .ecran-discussion { height: var(--hauteur-app, 100dvh); }
}
.entete-discussion { flex: none; }
.entete-discussion .entete-int {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "maison actions" "salut actions" "dates dates" "meteo meteo" "maree maree";
  column-gap: 12px;
  max-width: calc(var(--colonne) + 40px);   /* même colonne de 560 px que le fil */
  padding-top: calc(env(safe-area-inset-top) + 14px);
  padding-bottom: 8px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.entete-lieu-discussion { grid-area: maison; align-self: end; font-size: 12px; }
.salut {
  grid-area: salut;
  align-self: start;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.dates { grid-area: dates; margin-top: 6px; font-size: 14px; color: var(--entete-doux); }
.actions-entete { grid-area: actions; display: flex; align-items: flex-start; gap: 8px; }
/* le phare de l'accueil reste dans l'en-tête du séjour : dates et météo s'arrêtent avant lui, et l'en-tête garde
   assez de hauteur (même sans météo) pour que la lanterne passe sous les boutons */
.entete-phare .entete-int { min-height: calc(env(safe-area-inset-top) + 118px); align-content: start; }
.entete-phare .dates { padding-right: 48px; }
.meteo {
  grid-area: meteo;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 48px);
  margin-top: 10px;
  padding: 6px 16px 6px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}
.meteo-icone { width: 26px; height: 26px; stroke-width: 1.8; color: #CFE0EC; }
.meteo.ciel-soleil .meteo-icone, .meteo.ciel-eclaircie .meteo-icone { color: #F0B34A; }
.meteo.ciel-lune .meteo-icone, .meteo.ciel-nuit-nuage .meteo-icone { color: #F3E3A3; }
.meteo-temp { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1; white-space: nowrap; }
.meteo-textes { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.meteo-ciel { font-size: 14px; }
.meteo-prevision { font-size: 12px; color: var(--entete-doux); }
/* marée (3.5.4) : sous la météo, une pastille qui ouvre le détail du jour */
.maree {
  grid-area: maree;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 48px);
  min-height: 44px;
  margin-top: 8px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  color: var(--entete-texte);
  text-align: left;
  cursor: pointer;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  -webkit-tap-highlight-color: transparent;
}
.maree:hover { background: rgb(255 255 255 / 0.14); }
.maree-mini { width: 46px; height: 26px; flex: none; overflow: visible; }
.maree-mini .courbe { fill: none; stroke: #8FC3E0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.maree-mini .eau { fill: rgb(143 195 224 / 0.22); }
.maree-mini .point { fill: #F0B34A; stroke: var(--entete-fond); stroke-width: 2; }
.maree-textes { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.maree-etat { font-size: 14px; }
.maree-suite { font-size: 12px; color: var(--entete-doux); }
.maree-chevron { width: 16px; height: 16px; flex: none; color: var(--entete-doux); transform: rotate(-90deg); }
.rond-urgence {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--urgence);
  color: var(--urgence-sur);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.12);
}
.rond-urgence .icone { stroke-width: 2.2; }

/* menu langue + quitter */
.menu { position: relative; }
.menu-bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 60px;
  height: 44px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--entete-doux);
  border-radius: 22px;
  color: var(--entete-texte);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.menu-bouton::-webkit-details-marker { display: none; }
.menu[open] .menu-bouton { background: rgb(255 255 255 / 0.12); }
.menu[open] .menu-bouton .icone { transform: rotate(180deg); }
.menu-bouton .icone { transition: transform 0.15s; }
.menu-liste {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  width: max-content;
  min-width: 232px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid var(--ligne);
  border-radius: 14px;
  background: var(--surface);
  color: var(--texte);
  box-shadow: var(--ombre-menu);
  --anneau: var(--anneau-defaut);
  animation: apparition 0.15s ease-out both;
}
.menu-titre {
  padding: 6px 12px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-doux);
}
.menu-choix {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--texte);
  font-size: 16px;
  text-align: left;
}
.menu-choix[aria-pressed="true"] { background: var(--surface-douce); font-weight: 700; color: var(--titre); }
.menu-choix[aria-pressed="true"]::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
}
@media (hover: hover) { .menu-choix:hover { background: var(--surface-douce); } }
.menu-separation { height: 1px; margin: 6px 4px; background: var(--ligne); }
.menu-quitter { color: var(--texte); }
.menu-quitter .icone { color: var(--texte-doux); }
.menu-quitter-textes { display: flex; flex-direction: column; line-height: 1.3; }
.menu-quitter-textes small { font-size: 13px; color: var(--texte-doux); }

/* fil de la discussion */
.fil {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.fil-colonne {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: calc(var(--colonne) + 32px);
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.message { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.messages .message { animation: apparition 0.22s ease-out both; }
.message-voyageur { align-items: flex-end; }
.message-assistant, .message-hote { align-items: flex-start; }
.bulle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(86%, 470px);
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.bulle-assistant {
  border-top-left-radius: 4px;
  background: var(--surface);
  box-shadow: var(--ombre);
}
.bulle-voyageur {
  border-top-right-radius: 4px;
  background: var(--bulle-voyageur);
  color: var(--bulle-voyageur-texte);
  white-space: pre-wrap;
}
.bulle-hote {
  border: 1.5px solid var(--hote-bord);
  border-top-left-radius: 4px;
  background: var(--hote-fond);
}
.bulle-tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--hote-tete);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bulle-tete .icone { width: 16px; height: 16px; }
.bulle-heure { margin-left: auto; font-weight: 400; letter-spacing: 0; text-transform: none; }
.bulle-texte { display: flex; flex-direction: column; gap: 8px; }
.bulle ul, .bulle ol { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-left: 20px; }
.bulle ul, .consigne-texte ul, .confirmation-texte ul { list-style: disc; }      /* listes dans la liste des messages */
.bulle ol, .consigne-texte ol, .confirmation-texte ol { list-style: decimal; }
.bulle a { color: var(--lien); text-decoration: underline; text-underline-offset: 2px; }
.bulle a.tel { white-space: nowrap; }
.bulle-voyageur a { color: inherit; }
.bulle strong { font-weight: 700; }
.message-hote.nouveau .bulle { animation: eclat 4s ease-out both; }

.sources { display: flex; flex-wrap: wrap; gap: 6px; }
.source, .etiquette {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.source { background: var(--puce-fond); color: var(--source-texte); }
.etiquette { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.etiquette .icone { width: 14px; height: 14px; stroke-width: 2.2; }
.etiquette-transmis { background: var(--transmis-fond); color: var(--transmis-texte); }
.etiquette-alerte { background: var(--urgence-fond-doux); color: var(--urgence-texte); }
.traduit { font-size: 13px; color: var(--texte-doux); }
.lien-bouton {
  min-height: 44px;
  margin: -12px 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lien);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.original {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 0 12px;
  border-left: 3px solid var(--ligne);
  color: var(--texte-doux);
  font-size: 14px;
}

.separateur { display: flex; justify-content: center; padding: 4px 0; }
.separateur span {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--separateur-fond);
  color: var(--texte-doux);
  font-size: 12px;
  font-weight: 700;
}

/* question en cours d'envoi, non envoyée */
.provisoire .bulle-voyageur { opacity: 0.75; }
.etat-envoi { font-size: 12px; color: var(--texte-doux); }
.non-envoye .bulle-voyageur { opacity: 1; box-shadow: 0 0 0 2px var(--urgence); }
.non-envoye .etat-envoi { color: var(--urgence-texte); font-weight: 700; }
.message-erreur { align-items: stretch; }
.erreur-envoi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 12px 10px 14px;
  border-radius: 12px;
  background: var(--urgence-fond-doux);
  color: var(--urgence-texte);
  font-size: 14px;
  font-weight: 700;
}
.erreur-envoi p { flex: 1 1 200px; }
.bouton-petit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid currentColor;
  border-radius: 22px;
  background: var(--surface);
  color: var(--urgence-texte);
  font-size: 14px;
  font-weight: 700;
}
.bouton-petit .icone { width: 16px; height: 16px; }

/* l'assistant écrit */
.bulle-ecrit { flex-direction: row; align-items: center; gap: 10px; min-height: 46px; }
.ecrit-texte { font-size: 14px; color: var(--texte-doux); }
.points { display: inline-flex; align-items: center; gap: 5px; padding: 0 2px; }
.points i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--texte-doux);
  animation: rebond 1.2s ease-in-out infinite;
}
.points i:nth-child(2) { animation-delay: 0.15s; }
.points i:nth-child(3) { animation-delay: 0.3s; }

/* suggestions : pastille de 36 px, cible de 44 px */
.suggestions { display: flex; flex-wrap: wrap; gap: 0 8px; margin: -4px 0; }
.suggestion {
  position: relative;
  z-index: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--puce-texte);
  font-size: 14px;
  font-weight: 700;
}
.suggestion::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 0;
  border: 1.5px solid var(--puce-bord);
  border-radius: 18px;
  background: var(--puce-fond);
  transition: background-color 0.15s;
}
.suggestion:disabled { opacity: 0.55; }
@media (hover: hover) { .suggestion:hover:not(:disabled)::before { background: var(--surface); } }

.aller-bas {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  background: var(--primaire);
  color: var(--primaire-texte);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--ombre-menu);
  animation: apparition 0.2s ease-out both;
}

/* barre de saisie, collée en bas */
.barre-saisie {
  position: relative;
  flex: none;
  border-top: 1px solid var(--ligne);
  background: var(--surface);
}
.barre-saisie .aller-bas { position: absolute; }
.barre-int {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: calc(var(--colonne) + 32px);
  margin: 0 auto;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.ligne-saisie { display: flex; align-items: flex-end; gap: 10px; }
.saisie {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--hauteur-saisie, 48px);
  min-height: 48px;
  padding: 12px 16px;
  border: 1.5px solid var(--bord-champ);
  border-radius: 24px;
  background: var(--fond);
  color: var(--texte);
  font-size: 16px;
  line-height: 22px;
  resize: none;
  overflow-y: auto;
}
.saisie::placeholder { color: var(--texte-doux); opacity: 1; }
.saisie:focus-visible { outline: 3px solid var(--anneau); outline-offset: 1px; border-color: var(--lien); }
.envoyer {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--primaire);
  color: var(--primaire-texte);
  transition: opacity 0.15s, transform 0.1s;
}
.envoyer .icone { stroke-width: 2.2; }
.envoyer:active:not(:disabled) { transform: scale(0.94); }
.envoyer:disabled { opacity: 0.5; }
.compteur { font-size: 12px; font-weight: 700; color: var(--texte-doux); text-align: right; }
.compteur-max { color: var(--urgence-texte); }

/* ---------- urgence ---------- */
.ecran-urgence { min-height: 100vh; min-height: 100dvh; }
.entete-urgence .entete-int {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: calc(env(safe-area-inset-top) + 16px);
  padding-bottom: 16px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.rond-retour {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--entete-doux);
  border-radius: 50%;
  background: transparent;
  color: var(--entete-texte);
}
.titre-urgence { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.15; }
.contenu-urgence {
  gap: 18px;
  padding-top: 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}
.contact-textes { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-libelle { font-size: 13px; color: var(--texte-doux); }
.contact-nom { font-size: 17px; font-weight: 700; color: var(--titre); overflow-wrap: anywhere; }
.rond-appel {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--primaire);
  color: var(--primaire-texte);
}
.consignes { display: flex; flex-direction: column; gap: 10px; }
.sous-titre-serif { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.consignes-liste { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.consigne {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
}
.consigne-titre { font-size: 16px; font-weight: 700; color: var(--titre); }
.consigne-texte { display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }
.consigne-texte ul, .consigne-texte ol { margin: 0; padding-left: 20px; }
.note-urgence { padding: 14px 16px; font-size: 15px; line-height: 1.45; }
.prevenir { display: flex; flex-direction: column; gap: 12px; }
.prevenir-form { padding: 16px; }
.prevenir-form .bouton-urgence { margin-top: 6px; }
.prevenir-form .bouton-discret { margin-top: 0; }
.confirmation {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--succes-fond);
  color: var(--succes-texte);
  box-shadow: none;
  animation: apparition 0.22s ease-out both;
}
.confirmation-pastille {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--succes-texte);
  color: var(--succes-fond);
}
.confirmation-pastille .icone { width: 18px; height: 18px; stroke-width: 2.6; }
.confirmation-texte { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; line-height: 1.45; }
.confirmation-texte a { color: inherit; }

/* ---------- guide du logement : rubriques en tuiles, recherche, fiches ; l'assistant pour le reste ---------- */
/* couleur de chaque rubrique (pictogrammes, pastilles, puces) */
.c-arrivee_depart { --c: #2B6A8E; }
.c-logement { --c: #8A5A2B; }
.c-equipements { --c: #4F53A8; }
.c-chauffage { --c: #C4532A; }
.c-dechets { --c: #2E7D4F; }
.c-regles { --c: #74539E; }
.c-securite { --c: #A63A4C; }
.c-urgence { --c: #C81F37; }
.c-transports { --c: #1D7183; }
.c-restaurants { --c: #B04A2A; }
.c-activites { --c: #9A6510; }
.c-alentours { --c: #367558; }
.c-autre { --c: #536476; }
@media (prefers-color-scheme: dark) {
  .c-arrivee_depart { --c: #8FC1DE; }
  .c-logement { --c: #E0B07A; }
  .c-equipements { --c: #AEB2F2; }
  .c-chauffage { --c: #F29A6E; }
  .c-dechets { --c: #84D3A4; }
  .c-regles { --c: #C8ABEC; }
  .c-securite { --c: #F2909D; }
  .c-urgence { --c: #FF8E9B; }
  .c-transports { --c: #80D0DE; }
  .c-restaurants { --c: #F5A88C; }
  .c-activites { --c: #F0C46A; }
  .c-alentours { --c: #92D4B2; }
  .c-autre { --c: #A7B6C4; }
}
.ecran-guide, .ecran-page { min-height: 100vh; min-height: 100dvh; }
.guide { display: flex; flex-direction: column; flex-grow: 1; }
.guide-colonne {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 18px;
  width: 100%;
  max-width: calc(var(--colonne) + 40px);
  margin: 0 auto;
  padding: 18px max(20px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

/* recherche */
.recherche { position: relative; }
.recherche-champ {
  width: 100%;
  height: 54px;
  padding: 0 52px 0 50px;
  border: 1.5px solid var(--ligne);
  border-radius: 16px;
  background: var(--surface);
  color: var(--texte);
  font-size: 17px;
  box-shadow: var(--ombre);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
}
.recherche-champ::placeholder { color: var(--texte-doux); opacity: 1; }
.recherche-champ::-webkit-search-cancel-button, .recherche-champ::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.recherche-champ:focus-visible { outline: 3px solid var(--anneau); outline-offset: 1px; border-color: var(--lien); }
.recherche-loupe { position: absolute; top: 17px; left: 18px; color: var(--lien); pointer-events: none; }
.recherche-effacer {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--texte-doux);
}
@media (hover: hover) { .recherche-effacer:hover { background: var(--surface-douce); color: var(--texte); } }

/* rubriques */
.rubriques, .resultats { display: flex; flex-direction: column; gap: 12px; }
.guide-titre { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--titre); }
.guide-note { font-size: 14px; line-height: 1.4; color: var(--texte-doux); }
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tuiles > li { display: flex; min-width: 0; }
.tuile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 122px;
  padding: 14px 14px 13px;
  border: 0;
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--texte);
  text-align: left;
  box-shadow: var(--ombre);
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.15s;
}
.tuile::after {   /* reflet de la couleur de la rubrique, en haut à droite */
  content: "";
  position: absolute;
  top: -34px;
  right: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.07;
  pointer-events: none;
}
.tuile:active { transform: scale(0.97); }
@media (hover: hover) {
  .tuile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(23 50 77 / 0.08), 0 8px 22px rgb(23 50 77 / 0.1); }
}
.tuile-icone, .fiche-ligne-icone {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--c);
}
.tuile-icone::before, .fiche-ligne-icone::before, .puce-rubrique::before {   /* teinte de la rubrique */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.13;
}
.tuile-icone .icone, .fiche-ligne-icone .icone { position: relative; width: 25px; height: 25px; stroke-width: 1.8; }
.tuile-nom { font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--titre); overflow-wrap: anywhere; }
.tuile-compte { margin-top: auto; font-size: 13px; color: var(--texte-doux); }
.tuile-fantome {
  position: relative;
  min-height: 122px;
  border-radius: var(--rayon);
  background: var(--surface);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.tuile-fantome::after {   /* reflet qui passe : chargement */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--surface-douce) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: reflet 1.3s ease-in-out infinite;
}

/* listes de fiches (rubrique, résultats, même rubrique) */
.liste-fiches { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fiche-ligne {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 12px 14px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--texte);
  text-align: left;
  box-shadow: var(--ombre);
  transition: transform 0.12s, box-shadow 0.15s;
}
.fiche-ligne:active { transform: scale(0.985); }
@media (hover: hover) {
  .fiche-ligne:hover { box-shadow: 0 2px 4px rgb(23 50 77 / 0.08), 0 6px 18px rgb(23 50 77 / 0.09); }
}
.fiche-ligne-icone { width: 42px; height: 42px; border-radius: 12px; }
.fiche-ligne-icone .icone { width: 22px; height: 22px; }
.fiche-ligne-textes { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.fiche-ligne-rubrique { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); }
.fiche-ligne-titre { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--titre); overflow-wrap: anywhere; }
.fiche-ligne-apercu {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  color: var(--texte-doux);
}
.fiche-ligne-suite { width: 18px; height: 18px; color: var(--texte-doux); }
.liste-fiches-compacte .fiche-ligne { min-height: 56px; padding: 10px 12px; }
.liste-fiches-compacte .fiche-ligne-icone { width: 34px; height: 34px; border-radius: 10px; }
.liste-fiches-compacte .fiche-ligne-icone .icone { width: 19px; height: 19px; }
.liste-fiches-compacte .fiche-ligne-titre { font-size: 15px; font-weight: 400; color: var(--texte); }
mark {
  padding: 0 1px;
  border-radius: 3px;
  background: rgb(240 179 74 / 0.38);
  color: inherit;
}
.resultats-compte { font-size: 14px; font-weight: 700; color: var(--texte-doux); }
.vide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  text-align: center;
}
.vide .pastille { margin-bottom: 4px; }
.vide-titre { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--titre); overflow-wrap: anywhere; }
.vide-texte { font-size: 15px; line-height: 1.45; color: var(--texte-doux); }
.vide .bouton { margin-top: 6px; }
.guide-erreur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }

/* l'assistant (ou l'hôte) pour ce que le guide ne dit pas */
.relais {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 14px;
  padding: 18px;
  background: var(--entete-fond);
  color: var(--entete-texte);
  --anneau: var(--anneau-entete);
}
.relais-pastille {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #F0B34A;
}
.relais-pastille .icone { width: 24px; height: 24px; }
.relais-textes { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.relais-titre { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.2; }
.relais-texte { font-size: 14.5px; line-height: 1.45; color: var(--entete-doux); }
.relais-bouton { grid-column: 1 / -1; background: #F0B34A; color: #17324D; }
@media (hover: hover) { .relais-bouton:hover:not(:disabled) { background: #F4C46E; } }
.relais-nouveau .relais-pastille { animation: pouls 1.4s ease-in-out 3; }
.relais-petit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 10px 10px 18px;
  background: var(--surface);
  color: var(--texte);
  --anneau: var(--anneau-defaut);
}
.relais-petit .relais-titre { font-family: var(--sans); font-size: 16px; color: var(--titre); }
.relais-lien { padding: 0 10px; font-weight: 700; }
.nouvelle-reponse {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--hote-bord);
  border-radius: 14px;
  background: var(--hote-fond);
  color: var(--texte);
  text-align: left;
}
.nouvelle-pastille {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
}
.nouvelle-pastille .icone { width: 19px; height: 19px; }
.nouvelle-texte { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; font-size: 14px; line-height: 1.35; }
.nouvelle-texte strong { font-size: 15px; color: var(--hote-tete); }
.nouvelle-reponse > .icone { color: var(--hote-tete); }

/* en-tête des pages du guide et de la discussion (retour, titre, urgence) */
.entete-page { flex: none; }
.entete-page .entete-int {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(var(--colonne) + 40px);
  padding-top: calc(env(safe-area-inset-top) + 14px);
  padding-bottom: 8px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.page-titres { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.titre-page { font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.page-sous-titre { font-size: 13px; line-height: 1.3; color: var(--entete-doux); }
.contenu-page {
  gap: 18px;
  max-width: calc(var(--colonne) + 40px);
  padding-top: 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.rubrique-tete { display: flex; align-items: center; gap: 14px; }
.rubrique-tete .tuile-icone { width: 52px; height: 52px; border-radius: 16px; background: var(--surface); box-shadow: var(--ombre); }
.rubrique-tete .tuile-icone .icone { width: 28px; height: 28px; }
.rubrique-compte { font-size: 15px; font-weight: 700; color: var(--texte-doux); }

/* une fiche */
.fiche { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 22px; }
.puce-rubrique {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c);
  font-size: 13px;
  font-weight: 700;
}
.puce-rubrique .icone, .puce-rubrique span { position: relative; }
.puce-rubrique .icone { width: 16px; height: 16px; }
.fiche-titre { font-family: var(--serif); font-size: 25px; font-weight: 700; line-height: 1.2; color: var(--titre); overflow-wrap: anywhere; }
.fiche-texte { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.fiche-texte ul, .fiche-texte ol { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-left: 22px; }
.fiche-texte ul { list-style: disc; }
.fiche-texte ol { list-style: decimal; }
.fiche-texte li::marker { color: var(--c); }
.fiche-texte strong { font-weight: 700; color: var(--titre); }
.fiche-texte a { color: var(--lien); text-decoration: underline; text-underline-offset: 2px; }
.fiche-texte a.tel { white-space: nowrap; }
/* lien d'une fiche vers une autre (3.5.3) : un bouton qui a l'air d'un lien, dans le texte et les messages */
.lien-fiche { display: inline; padding: 0; border: 0; background: none; color: var(--lien); font: inherit; text-align: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* introduction d'une rubrique (3.5.3) : la première chose lue, liseré de la couleur de la rubrique */
.intro-rubrique { border-left: 4px solid var(--c); padding-top: 16px; }
.intro-rubrique .fiche-titre { font-size: 22px; }
/* « Accueil du guide » : à côté du retour, quand le retour n'y mène pas en une fois */
.entete-page .rond-retour + .rond-accueil { margin-left: -4px; }
.rond-accueil[hidden] { display: none; }
/* mise en forme des fiches (éditeur de Fanal, 3.5.1) : intertitres, italique, images, aussi dans les messages,
   les consignes d'urgence et le texte original d'une fiche traduite */
.intertitre { margin: 6px 0 -2px; font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--titre); }
.bulle .intertitre, .consigne-texte .intertitre, .original .intertitre { font-size: 17px; margin-top: 2px; }
.fiche-texte em, .bulle em, .consigne-texte em, .original em { font-style: italic; }
.fiche-image { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.fiche-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface-douce);
}
.fiche-image-qr img { width: min(240px, 100%); align-self: center; padding: 10px; border-radius: 14px; background: #FFFFFF; box-shadow: var(--ombre); image-rendering: pixelated; }
.fiche-image figcaption { font-size: 14px; line-height: 1.4; color: var(--texte-doux); text-align: center; }
.image-absente img { display: none; }
.original-titre { font-weight: 700; }
.fiche .original { gap: 8px; padding: 2px 0 2px 14px; line-height: 1.5; }
.fiche .original ul, .fiche .original ol { display: flex; flex-direction: column; gap: 2px; margin: 0; padding-left: 20px; }
.voisines { display: flex; flex-direction: column; gap: 10px; }

/* ---------- marée : feuille du détail (aujourd'hui, demain), ouverte par la pastille de l'en-tête ---------- */
.feuille-maree {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 600px;
  max-height: min(88vh, calc(100% - 24px));
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px max(20px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--fond);
  color: var(--texte);
  box-shadow: 0 -12px 40px rgb(15 36 56 / 0.25);
}
.feuille-maree[open] { animation: monte 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.feuille-maree::backdrop { background: var(--voile); }
html:has(.feuille-maree[open]) { overflow: hidden; }
.feuille-poignee { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--ligne); }
.feuille-tete { display: flex; align-items: flex-start; gap: 12px; }
.feuille-titre { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.2; color: var(--titre); }
.feuille-date { margin: 2px 0 0; font-size: 14px; color: var(--texte-doux); }
.feuille-fermer {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -2px -4px 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--titre);
  background: var(--surface);
  box-shadow: var(--ombre);
  cursor: pointer;
}
.feuille-fermer .icone { width: 20px; height: 20px; }
.maree-onglets { display: flex; gap: 4px; margin: 14px 0 12px; padding: 4px; border-radius: 999px; background: var(--maree-onglets); }
.maree-onglet {
  flex: 1;
  min-height: 36px;
  padding: 6px 0;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  color: var(--texte-doux);
  background: transparent;
  cursor: pointer;
}
.maree-onglet[aria-selected="true"] { font-weight: 700; color: var(--titre); background: var(--surface); box-shadow: var(--ombre); }
.maree-carte { padding: 14px 14px 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--ombre); }
.maree-maintenant { display: flex; align-items: center; gap: 12px; }
.maree-hauteur { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; color: var(--titre); white-space: nowrap; }
.maree-maintenant-textes { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.maree-sens {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--maree-pleine-texte);
  background: var(--maree-pleine-fond);
}
.maree-sens.descend { color: var(--maree-basse-texte); background: var(--maree-basse-fond); }
.maree-prochaine { font-size: 14px; color: var(--texte-doux); }
.fleche-maree { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.maree-graphe { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.maree-graphe .eau { fill: var(--maree-eau); }
.maree-graphe .courbe { fill: none; stroke: var(--maree-courbe); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.maree-graphe .axe { stroke: var(--ligne); stroke-width: 1; }
.maree-graphe .repere-heure { stroke: var(--ligne); stroke-width: 1; stroke-dasharray: 2 4; }
.maree-graphe .graduation { font-family: var(--sans); font-size: 11px; fill: var(--texte-doux); }
.maree-graphe .valeur { font-family: var(--sans); font-size: 11px; font-weight: 700; fill: var(--texte); }
.maree-graphe .maintenant { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.maree-graphe .maintenant-texte { font-family: var(--sans); font-size: 11px; font-weight: 700; fill: var(--accent); }
.maree-graphe .point { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.maree-horaires { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; }
.maree-horaire {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--ombre);
}
.maree-horaire.passee { opacity: 0.55; }
.maree-horaire.prochaine { box-shadow: inset 0 0 0 2px var(--maree-courbe); }
.maree-pastille { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; }
.maree-pastille.pleine { color: var(--maree-pleine-texte); background: var(--maree-pleine-fond); }
.maree-pastille.basse { color: var(--maree-basse-texte); background: var(--maree-basse-fond); }
.maree-pastille .fleche-maree { width: 16px; height: 16px; }
.maree-horaire-textes { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.maree-horaire-nom { font-size: 12px; color: var(--texte-doux); }
.maree-horaire-heure { font-size: 17px; font-weight: 700; color: var(--titre); white-space: nowrap; }
.maree-horaire-heure small { font-size: 12px; font-weight: 400; color: var(--texte-doux); }
.maree-coef { margin: 12px 0 0; font-size: 14px; color: var(--texte-doux); }
.maree-conseil { display: flex; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--transmis-fond); }
.maree-conseil-icone { width: 22px; height: 22px; flex: none; margin-top: 1px; fill: none; stroke: var(--maree-conseil-icone); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.maree-conseil p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--texte); }
.maree-lien {
  display: block;
  margin-top: 4px;
  padding: 2px 0;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--lien);
  text-align: left;
  background: none;
  cursor: pointer;
}
.maree-lien:hover { color: var(--lien-survol); text-decoration: underline; }
.maree-source { margin: 12px 0 0; font-size: 12px; color: var(--texte-doux); text-align: center; }

/* ---------- grands écrans : colonne centrée, en-tête pleine largeur ---------- */
@media (min-width: 720px) {
  .entete-maison { font-size: 40px; }
  .entete-grande .entete-int { padding-top: calc(env(safe-area-inset-top) + 28px); padding-bottom: 12px; }
  .entete-grande .mer { height: 44px; }
  .phare { transform: scale(1.15); transform-origin: 50% 100%; }
  .contenu { padding-top: 36px; }
  .bulle { font-size: 16px; }
  .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-colonne { padding-top: 24px; }
}

/* ---------- arrivée des écrans : chaque bloc monte en fondu, l'un après l'autre (une fois, à l'affichage) ---------- */
#ecran-acces > *, #ecran-info > *, .atouts li, .fil-colonne > .message, .suggestion {
  animation: monte 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
#ecran-acces > :nth-child(2), #ecran-info > :nth-child(2) { animation-delay: 0.07s; }
#ecran-acces > :nth-child(3), #ecran-info > :nth-child(3) { animation-delay: 0.14s; }
#ecran-acces > :nth-child(4) { animation-delay: 0.21s; }
#ecran-acces > :nth-child(n+5) { animation-delay: 0.3s; }
.atouts li:nth-child(1) { animation-delay: 0.3s; }
.atouts li:nth-child(2) { animation-delay: 0.38s; }
.atouts li:nth-child(3) { animation-delay: 0.46s; }
.atouts .icone { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: inherit; }
.suggestion:nth-child(1) { animation-delay: 0.18s; }
.suggestion:nth-child(2) { animation-delay: 0.24s; }
.suggestion:nth-child(3) { animation-delay: 0.3s; }
.suggestion:nth-child(4) { animation-delay: 0.36s; }
/* guide : la recherche, les rubriques (tuile après tuile), l'assistant ; les pages de rubrique et de fiche.
   Au retour sur un écran déjà vu (bouton retour), rien ne rejoue (classe « vu », posée par voyageurs.js). */
.guide-colonne > *, .contenu-page > *, .tuile, .liste-fiches > li {
  animation: monte 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.guide-colonne > :nth-child(2) { animation-delay: 0.04s; }
.guide-colonne > :nth-child(3) { animation-delay: 0.1s; }
.guide-colonne > :nth-child(n+4) { animation-delay: 0.42s; }
.tuile { animation-delay: calc(0.12s + var(--i, 0) * 0.045s); }
.tuile .tuile-icone { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(0.2s + var(--i, 0) * 0.045s); }
.contenu-page > :nth-child(2) { animation-delay: 0.06s; }
.contenu-page > :nth-child(3) { animation-delay: 0.12s; }
.contenu-page > :nth-child(n+4) { animation-delay: 0.18s; }
.liste-fiches > li:nth-child(2) { animation-delay: 0.1s; }
.liste-fiches > li:nth-child(3) { animation-delay: 0.14s; }
.liste-fiches > li:nth-child(4) { animation-delay: 0.18s; }
.liste-fiches > li:nth-child(n+5) { animation-delay: 0.22s; }
.ecran.vu .guide-colonne > *, .ecran.vu .contenu-page > *, .ecran.vu .tuile, .ecran.vu .tuile .tuile-icone,
.ecran.vu .liste-fiches > li { animation: none; }
/* réponse de l'hôte arrivée, relais qui brille : même au retour sur le guide */
.guide-colonne > .nouvelle-reponse, .ecran.vu .guide-colonne > .nouvelle-reponse {
  animation: descente 0.3s ease-out both, eclat 4s ease-out 0.3s both;
}
.guide-colonne > .relais-nouveau, .ecran.vu .guide-colonne > .relais-nouveau { animation: eclat 4s ease-out both; }
/* nom refusé : le champ hoche la tête */
.champ[aria-invalid="true"] { animation: refus 0.4s ease-in-out; }

/* ---------- animations discrètes ---------- */
@keyframes apparition {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes descente {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes rebond {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes monte {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: none; }
}
@keyframes refus {
  0%, 100% { transform: none; }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
/* un tour du faisceau : longueur vue de côté (cosinus de l'angle), plus pâle derrière la tour */
@keyframes faisceau {
  0%, 100% { transform: scaleX(1); opacity: 0.9; }
  6.25% { transform: scaleX(0.92); opacity: 0.92; }
  12.5% { transform: scaleX(0.71); opacity: 0.8; }
  18.75% { transform: scaleX(0.38); opacity: 0.45; }
  25% { transform: scaleX(0.03); opacity: 0.08; }
  31.25% { transform: scaleX(-0.38); opacity: 0.26; }
  37.5% { transform: scaleX(-0.71); opacity: 0.34; }
  43.75% { transform: scaleX(-0.92); opacity: 0.34; }
  50% { transform: scaleX(-1); opacity: 0.3; }
  56.25% { transform: scaleX(-0.92); opacity: 0.2; }
  62.5% { transform: scaleX(-0.71); opacity: 0.1; }
  68.75% { transform: scaleX(-0.38); opacity: 0; }
  75% { transform: scaleX(-0.03); opacity: 0; }
  81.25% { transform: scaleX(0.38); opacity: 0.14; }
  87.5% { transform: scaleX(0.71); opacity: 0.5; }
  93.75% { transform: scaleX(0.92); opacity: 0.8; }
}
/* la lanterne brille quand le faisceau passe vers nous (même durée que lui) */
@keyframes eclat-phare {
  0%, 15%, 37%, 100% { opacity: 0; }
  25% { opacity: 1; }
}
@keyframes houle { to { transform: translateX(-50%); } }
@keyframes reflet { to { transform: translateX(100%); } }
@keyframes pouls {
  0%, 100% { transform: none; }
  50% { transform: scale(1.12); }
}
@keyframes eclat {
  0% { box-shadow: 0 0 0 0 var(--eclat); }
  15% { box-shadow: 0 0 0 6px var(--eclat); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .points i { animation: none !important; opacity: 0.7; }
  .points i:nth-child(2) { opacity: 0.5; }
  .points i:nth-child(3) { opacity: 0.3; }
  .message-hote.nouveau .bulle { animation: none !important; box-shadow: 0 0 0 3px var(--eclat); }
  .tuile-fantome::after { animation: none !important; transform: none; opacity: 0.5; }
}
