/* Guide mobile : charte de design/charte.md, en une colonne */

:root {
  --papier: #FBFAF7;
  --texte: #1C2421;
  --texte-2: #48524E;
  --discret: #5B6661;
  --filet: #E4E2DB;
  --pointille: #A3ABA7;
  --accent: #1F5E55;              /* remplacé par la couleur du JSON */
  --teinte: color-mix(in srgb, var(--accent) 9%, var(--papier));
  --filet-teinte: color-mix(in srgb, var(--accent) 22%, var(--papier));
  --accent-fonce: color-mix(in srgb, var(--accent) 80%, #000);
  --titres: Manrope, Inter, system-ui, sans-serif;
  --corps: Inter, system-ui, -apple-system, sans-serif;
  --largeur: 560px;
  --gouttiere: 20px;
  --hauteur-barre: 104px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hauteur-barre) + 8px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--accent); }
a:hover { color: var(--accent-fonce); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

/* Visible pour les lecteurs d'écran seulement */
.cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Barre du haut ---------- */

.barre {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--papier) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--filet);
  padding-top: env(safe-area-inset-top);
}

.barre-haut,
.sections {
  max-width: var(--largeur);
  margin: 0 auto;
  padding-left: var(--gouttiere);
  padding-right: var(--gouttiere);
}

.barre-haut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 8px;
}

.barre-nom {
  font-family: var(--titres);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.langues {
  display: flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--filet);
  border-radius: 999px;
  background: #fff;
}

.langue {
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--discret);
  cursor: pointer;
  position: relative;
}

/* Zone tactile de 44 px de haut sans agrandir le bouton (le voyageur lit souvent debout, d'une main) */
.langue::after,
.pastille::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -6px;
  bottom: -6px;
}

.pastille::after { top: -5px; bottom: -5px; } /* 36 px + 4 px de chaque côté (bordure comprise) */

.langue[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.sections {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 4px;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.sections::-webkit-scrollbar { display: none; }

.pastille {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--filet);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--texte-2);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.pastille:hover { color: var(--texte); }

.pastille[aria-current="true"] {
  background: var(--teinte);
  border-color: var(--filet-teinte);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Mise en page ---------- */

.guide {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--gouttiere) calc(48px + env(safe-area-inset-bottom));
}

.chargement,
.erreur-chargement {
  padding: 64px 0;
  color: var(--discret);
  text-align: center;
}

.section {
  padding: 36px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section + .section {
  border-top: 1px solid var(--filet);
  margin-top: 28px;
}

.entete {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.surtitre {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--titres);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: 30px; line-height: 1.1; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: 0; font-family: var(--corps); }

p { margin: 0; text-wrap: pretty; }

.intro { color: var(--texte-2); font-size: 16px; }

.icone {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Couverture ---------- */

.couverture {
  margin: 20px calc(var(--gouttiere) * -1) 0;
  padding: 28px var(--gouttiere);
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

@media (min-width: 600px) {
  .couverture { margin: 20px 0 0; border-radius: 20px; padding: 32px; }
}

.couverture .surtitre { color: #fff; }

.couverture-haut {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.couverture-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.couverture h1 {
  font-size: 40px;
  line-height: 1.05;
}

.couverture-sous {
  font-size: 16px;
  opacity: 0.92;
}

.couverture-bas {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 14px;
  line-height: 1.5;
}

.couverture-bas span:last-child { text-align: right; }

/* ---------- Composants communs ---------- */

.carte {
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.carte-teintee { background: var(--teinte); }
.carte-bordee { border: 1px solid var(--filet-teinte); }

.carte-accent {
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carte-accent .icone { stroke: currentColor; }

.grille-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chiffre-cle {
  border-radius: 14px;
  background: var(--teinte);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chiffre-cle .libelle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--discret);
}

.chiffre-cle .libelle .icone { width: 16px; height: 16px; flex-basis: 16px; }

.chiffre-cle .valeur {
  font-family: var(--titres);
  font-size: 22px;
  font-weight: 800;
}

.rond {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  background: var(--teinte);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rond .icone { width: 18px; height: 18px; flex-basis: 18px; }

.texte-carte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.texte-carte strong { font-size: 16px; font-weight: 600; }
.texte-carte span { font-size: 15px; color: var(--texte-2); }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.bouton:hover { color: #fff; background: var(--accent-fonce); }

.bouton .icone { stroke: currentColor; width: 18px; height: 18px; flex-basis: 18px; }

.bouton-clair {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--filet-teinte);
}

.bouton-clair:hover { background: var(--teinte); color: var(--accent); }

/* ---------- Bienvenue ---------- */

.hote {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hote-photo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 999px;
  object-fit: cover;
}

/* Logo d'une conciergerie : en entier, jamais rogné, sur fond blanc */
.hote-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--filet, #E4E2DB);
  padding: 6px;
  box-sizing: border-box;
}

.hote-initiale {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 999px;
  background: var(--teinte);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--titres);
  font-size: 26px;
  font-weight: 800;
}

.hote-nom {
  font-family: var(--titres);
  font-size: 18px;
  font-weight: 700;
}

.hote-role { font-size: 14px; color: var(--discret); }

.mot { font-size: 16px; line-height: 1.6; }

.sommaire {
  border-radius: 14px;
  background: var(--teinte);
  padding: 18px 20px 8px;
  display: flex;
  flex-direction: column;
}

.sommaire .surtitre { padding-bottom: 4px; }

.sommaire a {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--filet-teinte);
  font-size: 15px;
  color: var(--texte);
  text-decoration: none;
}

.sommaire a:last-child { border-bottom: 0; }
.sommaire a:hover { color: var(--accent); }

#accueil { padding-top: 0; }

/* ---------- Étapes numérotées ---------- */

.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.etape {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.numero {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.etape .texte-carte { padding-top: 3px; }

.code {
  font-family: var(--titres);
  font-weight: 800;
  color: var(--texte);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- Bloc Accès ---------- */

.acces {
  border-radius: 16px;
  border: 1px solid var(--filet-teinte);
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acces-titre {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acces-titre h3 { font-family: var(--titres); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }

.acces-aide { font-size: 15px; color: var(--texte-2); }

.formulaire-code {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.champ-code {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--filet);
  border-radius: 12px;
  background: var(--papier);
  font-family: var(--titres);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.4em;
  text-indent: 0.4em;            /* compense l'espace après le dernier chiffre */
  text-align: center;
  color: var(--texte);
}

.champ-code-long {              /* 9 signes (« k7m3-p9wx ») : plus serré pour tenir sur un téléphone */
  font-size: 20px;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
}

.champ-code:focus { border-color: var(--accent); outline: none; }

.formulaire-code .bouton { height: 52px; border-radius: 12px; flex: 0 0 auto; }

.message-code {
  font-size: 14px;
  min-height: 1.5em;
  color: var(--discret);
}

.message-code.erreur { color: #A23B1E; font-weight: 500; }

.message-code:empty { min-height: 0; margin-top: -16px; }

.acces-ouvert { gap: 20px; }

.lien-discret {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--discret);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Wifi ---------- */

.wifi-champ {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wifi-champ small { font-size: 12px; opacity: 0.9; }

.wifi-champ strong {
  font-family: var(--titres);
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

.carte-accent .bouton {
  align-self: flex-start;
  background: #fff;
  color: var(--accent);
}

.carte-accent .bouton:hover { background: var(--teinte); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.urgence {
  border-radius: 12px;
  background: var(--teinte);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--texte);
}

.urgence:hover { color: var(--texte); background: var(--filet-teinte); }

.urgence strong { font-family: var(--titres); font-size: 24px; font-weight: 800; }
.urgence span { font-size: 14px; color: var(--texte-2); line-height: 1.35; }

.note { font-size: 15px; color: var(--texte-2); }

/* ---------- Règles ---------- */

.liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.regle {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--filet);
  font-size: 16px;
}

.regle:last-child { border-bottom: 0; }

/* ---------- Logement ---------- */

.equipements {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 440px) {
  .equipements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.equipement {
  border-radius: 14px;
  border: 1px solid var(--filet-teinte);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.equipement-titre {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.equipement p { font-size: 15px; color: var(--texte-2); line-height: 1.5; }

/* ---------- Quartier ---------- */

.plan {
  width: 100%;
  border-radius: 14px;
  display: block;
}

.adresse {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--filet);
}

.adresse:last-child { border-bottom: 0; }

.adresse.favori {
  margin: 4px -14px;
  padding: 12px 14px;
  border-radius: 12px;
  border-bottom: 0;
  background: var(--teinte);
}

.adresse .texte-carte strong { font-size: 15px; }
.adresse .texte-carte span { font-size: 14px; color: var(--discret); }
.adresse.favori .texte-carte span { color: var(--texte-2); }

.distance {
  font-size: 14px;
  color: var(--texte-2);
  white-space: nowrap;
}

/* ---------- Départ ---------- */

.badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--teinte);
  font-size: 15px;
  font-weight: 600;
}

.badge .icone { width: 16px; height: 16px; flex-basis: 16px; }

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.checklist label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  font-size: 16px;
  cursor: pointer;
}

.checklist input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 0;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.checklist input:checked { background: var(--accent); }

.checklist input:checked::after {
  content: "";
  width: 10px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}

.checklist input:checked + span { color: var(--discret); text-decoration: line-through; }

.a-bientot {
  font-family: var(--titres);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding-top: 4px;
}

.pied {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid var(--filet);
  font-size: 12px;
  color: var(--discret);
  text-align: center;
}

.photo-acces { display: block; width: 100%; max-width: 320px; margin-top: 8px; border-radius: 10px; }

/* ---------- Raccourcis de l'accueil : accès, wifi, hôte ---------- */

.raccourcis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.raccourci {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--filet-teinte);
  border-radius: 14px;
  background: #fff;
  color: var(--texte);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.raccourci:hover { background: var(--teinte); color: var(--texte); }
.raccourci .icone { width: 20px; height: 20px; flex-basis: 20px; }

/* ---------- Aide à l'arrivée ---------- */

.souci {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--filet-teinte);
  font-size: 15px;
  color: var(--texte-2);
}

.souplesse-lignes { display: flex; flex-direction: column; gap: 10px; }

.bon-a-savoir ul {
  margin: 4px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  color: var(--texte-2);
}

.regle .texte-carte span { line-height: 1.45; }

/* Photo facultative d'un équipement */
.photo-equipement { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; display: block; }
