/* Host space (/hote/): loaded by that page only. Shapes and sizes from the shared UI charter
   (~/Documents/CLAUDESYSTEM/charte-ui/composants-communs.md): control stack §1, markers §3, point card §4, list §6, panels §7, flat map §8.
   The page: a compact header, the search, a map preview; every map step runs in a full-screen overlay (#zone[data-full="true"]). */
.hote-tete { gap: 6px; margin-bottom: 4px }
.hote-tete h1 { margin: 0; font-size: clamp(26px, 7vw, 36px); line-height: 1.1 }
.hote-atouts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px }
.hote-atouts li { display: inline-flex; gap: 6px; align-items: center; min-height: 30px; padding: 3px 10px; border-radius: 999px; background: var(--lapis-clair);
  color: var(--encre); font-size: 14px; line-height: 1.2 }
.hote-atouts li::before { content: "✓"; color: var(--lapis); font-weight: 700 }
.hote-gratuit { margin: 0; font-weight: 700; color: var(--or-fonce); font-size: 15px }
.hote { gap: 12px }
#hote-charge { margin: 0 }
html.hote-plein, html.hote-plein body { overflow: hidden }  /* the overlay is open: the page under it never scrolls */

/* the zone: the map preview in the page; full screen when a map step runs */
.hote-zone { position: relative; display: flex; flex-direction: column; background: var(--carte); overflow: hidden }
.hote-zone[data-full="false"] { height: clamp(240px, 42svh, 420px); border: 1px solid var(--line); border-radius: 10px }
.hote-zone[data-full="true"] { position: fixed; inset: 0; z-index: 1000; height: 100dvh; margin: 0; border: 0; border-radius: 0 }
.hote-zone[data-full="false"]:not([data-map="off"]) :is(.ov-barre, .hote-panneau, .pile, .epingle, .epingle-barre) { display: none }
.hote-zone[data-full="false"] .mapboxgl-ctrl-bottom-left, .hote-zone[data-full="false"] .mapboxgl-ctrl-bottom-right { bottom: 0 }
.hote-ouvrir { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 0; border: 0; background: rgba(20,24,46,.08); cursor: pointer }
.hote-ouvrir .bouton { box-shadow: 0 2px 10px rgba(0,0,0,.3); min-height: 48px }
.hote-ouvrir:focus-visible .bouton { outline: 3px solid #1a73e8; outline-offset: 2px }
.hote-zone[data-full="true"] .hote-ouvrir, .hote-zone[data-map="off"] .hote-ouvrir { display: none }

/* the overlay's own bar: back on the left, the step, close on the right (charter §7: the cross that leaves full screen is top right) */
.ov-barre { flex: none; position: relative; z-index: 7; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; min-height: 52px;
  padding: 4px 8px; padding-top: max(4px, env(safe-area-inset-top, 0px)); background: var(--velin); border-bottom: 1px solid var(--line) }
.ov-titre { margin: 0; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ov-bouton { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--encre); display: grid; place-items: center; cursor: pointer; padding: 0 }
.ov-bouton:hover { background: var(--lapis-clair) }
.ov-bouton:focus-visible { outline: 3px solid #1a73e8; outline-offset: 0 }
.hote-zone[data-map="off"] .ov-barre { display: none }

.hote-panneau { display: contents }
.hote-recherche { position: relative; z-index: 6; display: grid; gap: 4px }
.hote-zone .hote-recherche { padding: 8px var(--gouttiere); background: var(--carte); border-bottom: 1px solid var(--line) }
.hote-zone .hote-recherche label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }  /* the bar names the step */
.hote-recherche label { font-weight: 700; font-size: 15px }
.hote input#q { width: 100%; min-height: 48px; font: 500 17px/1.2 var(--f-texte); padding: 10px 14px; border: 1.5px solid var(--lapis); border-radius: 10px; background: #fff; color: var(--encre); box-sizing: border-box }
.hote-suggestions { position: absolute; z-index: 8; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(20,24,46,.18); max-height: min(60vh, 440px); overflow-y: auto }
.suggestion { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 6px 12px; cursor: pointer }
.suggestion[aria-selected="true"], .suggestion:hover { background: var(--lapis-clair) }
.suggestion .texte, .entree .texte, .fp-tete .texte { display: grid; min-width: 0 }
.suggestion b, .entree b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hote-rien { display: grid; gap: 8px; padding-top: 6px }
.hote-rien p { margin: 0 }
.picto { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--lapis); box-shadow: 0 0 0 2px #fff }
.picto-village { background: var(--encre) }
.picto-place { background: var(--muted) }

.hote-carte { position: relative; flex: 1; min-height: 0 }
.hote-map { position: absolute; inset: 0 }
.hote-zone .hote-suggestions { left: var(--gouttiere); right: var(--gouttiere); margin-top: -4px }
/* no map (no key, or it failed to load): the message and the add button, then the panel in the page's flow */
.hote-zone[data-map="off"] { height: auto; min-height: 0 }
.hote-zone[data-map="off"] .hote-carte { flex: 0 0 auto; min-height: 0; order: 1 }
.hote-zone[data-map="off"] .hote-map { display: none }
.hote-zone[data-map="off"] .feuille { position: static; order: 2; height: auto; box-shadow: none; border-radius: 0 }
.hote-zone[data-map="off"] .feuille-corps { visibility: visible }
.hote-zone[data-map="off"] .feuille-tete .poignee { display: none }
.hote-sans-carte { position: absolute; left: 12px; right: 12px; top: 64px; z-index: 3 }
.hote-zone[data-map="off"] .hote-sans-carte { position: static; margin: 12px var(--gouttiere) }
.hote button.hote-ajout { position: absolute; z-index: 4; top: 10px; left: 10px; right: 64px; justify-self: start; min-height: 44px; padding: 10px 16px; border-radius: 22px;
  font-size: 15px; line-height: 1.2; box-shadow: 0 2px 8px rgba(0,0,0,.3); max-width: max-content; text-align: left }
.hote-zone[data-map="off"] button.hote-ajout { position: static; margin: 0 var(--gouttiere) 12px }

/* control stack (charter §1): bottom right, above the closed sheet */
.pile { position: absolute; z-index: 2; right: 10px; bottom: calc(84px + 30px); display: grid; gap: 8px }
.pile .disque { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: rgba(0,0,0,.72); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.30); cursor: pointer }
.pile .disque:hover { background: #0e1a26 }
.pile .disque:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px }
.pile .couches { margin-bottom: 10px }  /* 8 + 10 = 18 px under the layers disc */
.pile .couches.actif svg path { fill: #00a978 }
.pile svg { display: block; pointer-events: none }
.hote-carte .mapboxgl-ctrl-bottom-left, .hote-carte .mapboxgl-ctrl-bottom-right { bottom: 84px }
.hote-carte .mapboxgl-ctrl-scale { border-color: var(--encre); color: var(--encre); background: rgba(255,255,255,.8) }

/* pin mode: the pin stands in the middle, its point on the centre */
.epingle { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)) }
.epingle-barre { position: absolute; z-index: 4; left: 10px; right: 10px; top: 10px; display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--encre); color: var(--velin);
  box-shadow: 0 2px 10px rgba(0,0,0,.35) }
.epingle-barre p { margin: 0 }
.epingle-barre .message { color: var(--encre) }  /* the panel is hidden in pin mode: its messages show here */
.epingle-barre .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap }
.hote .epingle-barre .bouton.lien { color: var(--velin) }
.hote-zone[data-mode="pin"] .pile { bottom: 30px }
.hote-zone[data-mode="pin"] .feuille { display: none }
.hote-zone[data-mode="pin"] .mapboxgl-ctrl-bottom-left, .hote-zone[data-mode="pin"] .mapboxgl-ctrl-bottom-right { bottom: 0 }

/* the sheet (charter §7): closed = the head (84 px), open = 88 % of the zone; the map runs under it */
.feuille { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 84px; display: flex; flex-direction: column; background: rgba(251,250,246,.96);
  border-radius: 14px 14px 0 0; box-shadow: 0 -4px 16px rgba(20,24,46,.18); transition: height .22s ease }
.feuille[data-open="true"] { height: 88%; background: var(--carte) }  /* a page never shows through another (charter §7) */
.feuille-tete { flex: none; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; padding: 0 var(--gouttiere) 10px; min-height: 74px; cursor: pointer; touch-action: none }
.feuille-tete .poignee { grid-column: 1 / -1; justify-self: center; width: 64px; height: 24px; border: 0; background: transparent; position: relative; cursor: pointer }
.feuille-tete .poignee::after { content: ""; position: absolute; left: 12px; right: 12px; top: 10px; height: 5px; border-radius: 3px; background: #b9b6ad }
.feuille-titre { grid-column: 2; margin: 0; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.feuille-tete .retour[hidden] + .feuille-titre { grid-column: 1 / -1 }
.hote .feuille-tete .retour { min-height: 44px; padding: 8px 8px 8px 0 }
.feuille-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gouttiere) 24px; display: grid; gap: 14px; align-content: start }
.feuille[data-open="false"] .feuille-corps { visibility: hidden }
.page { display: grid; gap: 14px; align-content: start; background: transparent }
.page h2 { margin: 6px 0 0; font-size: 22px }
.hote-visibles { list-style: none; margin: 0; padding: 0; display: grid }
.hote-visibles li { border-bottom: 1px solid var(--line) }
.entree { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 8px 0; border: 0; background: transparent; text-align: left; font: inherit; color: var(--encre); cursor: pointer }
.entree:hover b { color: var(--lapis) }

/* the lodging card on the map (charter §4) */
.hote-popup .mapboxgl-popup-content { padding: 12px 12px 14px; border-radius: 10px; box-shadow: 0 4px 18px rgba(20,24,46,.25); font-family: var(--f-texte) }
.fiche-point { display: grid; gap: 10px; max-height: 50vh; overflow-y: auto }
.fp-tete { display: grid; grid-template-columns: auto 1fr 40px; gap: 10px; align-items: start }
.fiche-point .fp-tete h3 { margin: 0; font: 700 17px/1.25 var(--f-texte); color: var(--encre) }
.fp-tete p { margin: 2px 0 0 }
.hote .fp-fermer { width: 40px; height: 40px; margin: -8px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--encre); display: grid; place-items: center; cursor: pointer; padding: 0 }
.fp-tenu { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--or-clair); font-weight: 700; font-size: 14px }
.fp-source { margin: 0; font-size: 13px }
.fiche-point .bouton { width: 100% }
#list-card:empty { display: none }
#list-card .fiche-point { padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; max-height: none }

.hote-fin { margin: 0 }
.hote-fin [hidden] { display: none }

/* who is signed in: one discreet line, the address masked by the server */
.hote-signe { margin: 0 0 8px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; overflow-wrap: anywhere }
.hote-signe[hidden] { display: none }
.hote-signe .bouton.lien { min-height: 44px; padding: 0 4px }

/* wide screens: the panel on the left (search, list, pages), the map on the right */
@media (min-width: 900px) {
  .hote-zone[data-full="false"] { height: 420px }
  .hote-zone[data-full="true"] { display: grid; grid-template-columns: 400px 1fr; grid-template-rows: auto 1fr }
  .hote-zone[data-full="true"] .ov-barre { grid-column: 1 / -1 }
  .hote-zone[data-full="true"] .hote-carte { grid-column: 2; grid-row: 2 }
  .hote-panneau { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--carte) }
  .hote-zone .hote-recherche { padding: 12px 16px }
  .hote-zone .hote-suggestions { left: 16px; right: 16px }
  .feuille { position: static; height: auto; flex: 1; min-height: 0; border-radius: 0; box-shadow: none; background: transparent; transition: none }
  .feuille[data-open="true"] { height: auto }
  .feuille[data-open="false"] .feuille-corps { visibility: visible }
  .feuille-tete { min-height: 52px; padding: 8px 16px; cursor: default }
  .feuille-tete .poignee { display: none }
  .feuille-corps { padding: 0 16px 24px }
  .pile { bottom: 30px }
  .hote-carte .mapboxgl-ctrl-bottom-left, .hote-carte .mapboxgl-ctrl-bottom-right { bottom: 0 }
  .epingle-barre { left: auto; width: 420px }
  .hote-zone[data-map="off"] { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) { .feuille { transition: none } }
/* a panel page (sign-in, claim, card...) takes the room: the search is for the map and the pin only */
.hote-zone[data-full="true"]:not([data-step="list"]):not([data-mode="pin"]) .hote-recherche { display: none }

/* the operator's page (/hote/admin/, host-admin.js): one card per item, its buttons on one row (site buttons, the second choice as a link) */
.admin { display: grid; gap: 18px }
.admin-resume { margin: 0; font-family: var(--f-titre); font-weight: 700; font-size: 20px; color: var(--lapis) }
.admin-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.admin-item { display: grid; gap: 4px; padding: 12px 14px; background: var(--carte); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: calc(var(--entete-h) + 12px) }
.admin-item.allume { border-color: var(--lapis); box-shadow: 0 0 0 2px var(--lapis) }
.admin-item p { margin: 0 }
.admin-titre { font-weight: 700 }
.admin-pourquoi { font-size: 15px }
.admin-details { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 4px 0 0; font-size: 15px }
.admin-details dt { color: var(--muted) }
.admin-details dd { margin: 0 }
.admin-item .actions { align-items: center; margin-top: 6px }
.admin-lien { display: inline-flex; align-items: center; min-height: 44px }
.admin-journal .admin-item { grid-template-columns: 1fr auto; align-items: center }
.admin-journal .admin-item .meta { grid-column: 1 }
.admin-journal .admin-item .bouton { grid-column: 2; grid-row: 1 / span 2 }
@media (max-width: 480px) { .admin-details { grid-template-columns: 1fr } .admin-details dd { margin-bottom: 4px } }
/* the information mail's link (/hote/stop/, host-optout.js): two choices, each button with its one line */
.stop-choix { display: grid; gap: 4px; justify-items: start; margin: 14px 0 0 }
.stop-choix p { margin: 0 }
.stop-choisi { margin: 10px 0 0; border-left: 3px solid var(--or); padding: 4px 0 4px 12px; font-style: italic }
