* { box-sizing: border-box; }
/* Toute règle posant un display (flex, block…) écrase [hidden], qui n'est
   qu'un `display: none` de la feuille par défaut. On masquait donc des
   éléments en JS sans effet visible : la case des notifications et le bouton
   « Passer » de l'onboarding restaient affichés. Une règle globale ferme la
   famille entière de bugs, au lieu d'une exception par sélecteur. */
[hidden] { display: none !important; }
/* Pile de polices, sans police embarquée. En japonais (html lang="ja", posé par i18n.js),
   les polices japonaises du système passent avant le sans-serif générique : sans elles, un
   Windows ou un vieil iOS peuvent dessiner les kanji avec une police chinoise, aux tracés
   différents. Les autres langues gardent system-ui seul. */
:root { --police: system-ui, sans-serif; }
:root:lang(ja) { --police: system-ui, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans CJK JP", "Noto Sans JP", sans-serif; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font: 14px/1.4 var(--police); }

#viewbox { position: fixed; inset: 0; overflow: hidden; background: #e8e8e8; touch-action: none; cursor: grab; }
#viewbox:active { cursor: grabbing; }
#map { position: absolute; top: 0; left: 0; will-change: transform; }
img.tile { position: absolute; width: 256px; height: 256px; user-select: none; -webkit-user-drag: none; opacity: 0; transition: opacity .15s linear; contain: layout paint style; }
img.tile.loaded, img.tile.stale, img.tile.fallback { opacity: 1; }
@media (prefers-reduced-motion: reduce) { img.tile { transition: none; } }
/* épingle de lieu (résultat de recherche) : goutte sobe ardoise, pointe en
   bas — surtout pas un rond rouge, ça ressemblait à une pastille de prix */
.marker { position: absolute; width: 30px; height: 40px; margin: 0; transform: translate(-50%, -100%); background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 40"><path d="M15 1C7.8 1 2 6.8 2 14c0 9.6 11.2 23.4 12.2 24.6a1 1 0 001.6 0C16.8 37.4 28 23.6 28 14 28 6.8 22.2 1 15 1z" fill="%23374151" stroke="%23fff" stroke-width="2"/><circle cx="15" cy="14" r="5" fill="%23fff"/></svg>') center / contain no-repeat; border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); z-index: 5; }
/* pins emoji (domicile 🏠, travail 🏭) : pointe en bas au centre */
.marker.emoji { width: auto; height: auto; margin: 0; transform: translate(-50%, -90%); background: none; border: 0; box-shadow: none; font-size: 24px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
canvas.overlay { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 4; will-change: transform; }

#controls { display: contents; }

/* barre d'état masquée (app native) : les coins hauts sont libres, seule la
   pilule centrale occupe le haut. Repliée, la loupe monte à ras ; dépliée,
   le champ redescend sous la zone sûre pour ne pas écrire derrière l'île,
   et passe au-dessus du rail de centrage qu'il recouvre. */
/* --coin-haut-gauche / --coin-haut-droit : posées par l'app Android quand le
   poinçon de la caméra frontale occupe ce coin (à gauche sur les Xiaomi, au
   centre ou à droite ailleurs — rien de standard). Sans elles : 14 px —
   et non 10 : l'écran de l'iPhone 16 Pro est arrondi (~60 px de rayon) et
   un bouton de 40 px à 10 px du coin mord sur la courbe. À 14 px des deux
   bords, le cercle passe entier. Invisible sur capture d'écran, qui rend
   l'image rectangulaire. */
#search-box.collapsed { top: var(--coin-haut-gauche, 14px); left: 14px; }
#search-box:not(.collapsed) { z-index: 12; }
#search-box { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 58px; display: flex; height: 40px; background: rgba(255,255,255,.52); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); border-radius: 22px; box-shadow: 0 1px 5px rgba(0,0,0,.3); overflow: hidden; z-index: 10; transition: border-radius .25s ease; }
#s { border: 0; min-width: 0; padding: 0 16px; flex: 1; width: auto; font: inherit; outline: none; background: transparent; transition: width .25s ease, padding .25s ease, opacity .2s ease; }
#bs { border: 0; width: 40px; cursor: pointer; color: transparent; background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9kCBxQkAPQ1ZpQAAAGrSURBVDjLjdRNiE5xFAbw372v14zvkEGsjLD20UghKTay1uykyEIWSpY2Stmp2dhMoWQ1USYbScrKhpKyGkVDNDaGfM21ed5ct/cOp/7dc+89/+c8z/k/9xYoUPkTu7EXm7EQM3iO+3jfp/6v6NTyJbiEY1iE13iXfB+O4BdeoAxo0Q+0yLqGCRxFt1GzChfDctR/xDncxY5ak7KW9+I8JjE8H9iagJ36R9Nek5u43FZUYicGcCv3ZQtYhTk8xFYsbgPcgGnM1jb1A+vFMwxifRtgmdOba1FR1WrhR8MhRRPwA9ZFdtlgVo9ewy34mn0a9inK+KrC4TA9EZvUZe7BweQHAvipoaKABXiVNYoHmeV1PMZbbMcmnIlHh/JuPHabCc7PurS1MfU4VmN5vozjYSdgE7iBFdlzG/u1zGlbvoaleIKnkTaEQ9iIjznhQVyNoiuYwli/wXdwEiOxU5W5vsQdPMLpzLMbT47F7NO4UPRhW9V+FgP4jO+NxiM4G6azebYMk50W+WWG/C12KRpefBO2u7AyDbuY6sxj5uYqatcCX3AvhzgcX479BrxnZh85IOwcAAAAAElFTkSuQmCC") no-repeat center / 16px; }
/* replié : juste la loupe dans un rond */
#search-box.collapsed { right: auto; width: 40px; border-radius: 50%; justify-content: center; }
#search-box.collapsed #s { flex: 0 0 0; width: 0; min-width: 0; padding: 0; border: 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) { #s { transition: none; } }

/* menu d'autocomplete (positionné en JS sous la barre) */
.ac-list { position: fixed; z-index: 20; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.28); overflow-y: auto; max-height: 320px; }
.ac-list[hidden] { display: none; }
.ac-item { padding: 8px 14px; cursor: pointer; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item:hover, .ac-item.active { background: rgba(37,99,235,.15); }

.layer-btn { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none;
  padding: 8px 0; cursor: pointer; font: 600 14px/1.2 var(--police); color: #222; text-align: left; }
.layer-btn.actif { color: #15803d; }
.layer-btn.actif::after { content: '✓'; margin-left: auto; }
.layer-btn .thumb { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 3px; background: #dcd7cc center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.thumb[data-layer="plan"] { background-image: url("https://mantan.app/tiles/styles/mantan/6/32/22.png"); }
.thumb[data-layer="sat"] { background-image: url("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/6/23/33"); }

#geo-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.52); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); color: #4a4a4a; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); z-index: 11; }
#geo-btn:hover { color: #2563eb; }
#geo-btn.loading { opacity: .5; }
#toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(8px); background: rgba(30,30,30,.92); color: #fff; font-size: 13px; padding: 8px 16px; border-radius: 20px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* globe animé pendant la recherche */
/* spinner CSS (0 octet, net à tout DPI) au lieu d'un GIF/AVIF chargé */
#bs.loading { background: #fff; color: transparent; position: relative; }
#bs.loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(0,0,0,.18); border-top-color: rgba(0,0,0,.55); animation: bs-spin .6s linear infinite; }
@keyframes bs-spin { to { transform: rotate(360deg); } }
/* Pile de boutons de droite. Colonne inversée : elle grandit vers le haut, donc
   masquer le centrage GPS ou faire apparaître l'appareil photo ne déplace pas
   les autres. Sur ordinateur elle démarre au-dessus de la minimap. */
#rail > button { flex: 0 0 auto; }
#totem-fab { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #16a34a; color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 2px 10px rgba(22,163,74,.5); animation: totem-in .25s ease; }
@keyframes totem-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #totem-fab { animation: none; } }
/* choix quand plusieurs stations sont à portée */
#totem-pick { position: fixed; right: 10px; bottom: 62px; z-index: 12; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.3); padding: 8px; max-width: min(300px, 86vw); }
#totem-pick .tp-title { font-size: 12px; color: #6b7280; padding: 4px 8px 6px; }
#totem-pick button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; font: inherit; cursor: pointer; }
#totem-pick button:hover { background: rgba(22,163,74,.12); }
#totem-pick small { color: #6b7280; }

/* onboarding du premier lancement : voile + carte en 3 étapes */
/* Même fond que l'écran de lancement natif (#FDF2D9 dans capacitor.config) :
   le passage de l'un à l'autre ne doit pas se voir. */
#boot { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: #fdf2d9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity .25s ease; }
#boot b { font: 800 21px/1 var(--police); color: #15803d; letter-spacing: .5px; }
#boot.parti { opacity: 0; }
#boot[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { #boot { transition: none; } }

.so-state.doute { font-style: italic; color: #92702a; font-weight: 600; }
/* le crayon cesse d'être discret quand c'est justement lui qu'on attend */
.sheet-open.a-confirmer .so-edit { background: #fef3c7; border-radius: 8px; opacity: 1; }

.sh-adblue { margin-top: 6px; display: inline-block; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.4 var(--police); }
.sh-adblue[hidden] { display: none; }
.sh-adblue.pump { background: #dceedd; color: #15803d; }
/* le bidon de boutique ne remplit pas un réservoir : ton neutre, pas vert */
.sh-adblue.canister { background: #f3efe4; color: #92702a; }
/* une affirmation d'enseigne : traits pointillés, comme tout ce qui reste à
   confirmer sur cette carte */
.sh-adblue.brand { background: none; border: 1px dashed #d6cdb4; color: #9ba090; }
.corr-adblue { display: flex; align-items: center; gap: 8px; margin: 8px 0; font: 14px/1.3 var(--police); color: #374151; }

#releve { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); width: min(340px, calc(100vw - 24px)); z-index: 28; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,.35); font: 14px/1.4 var(--police); }
#releve[hidden] { display: none; }
#releve .rl-titre { font-weight: 700; color: #111827; margin-bottom: 10px; }
#releve button { display: block; width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; text-align: left; font: 600 14px/1.2 var(--police); background: #dceedd; color: #15803d; cursor: pointer; }
#releve button small { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; color: #6b7280; }
#releve .rl-annuler { background: none; color: #9ca3af; text-align: center; font-weight: 400; margin-bottom: 0; }

#cam-cadre { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); border: 2px solid #16a34a; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
#cam-cadre[hidden] { display: none; }
#cam-zoom { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font: 600 13px/1 var(--police); }
#cam-zoom button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
#cam-zoom input[type=range] { width: 130px; accent-color: #16a34a; }
#cam-zoom .cz-val { min-width: 34px; text-align: center; }

#ab-journal { margin-top: 10px; padding: 10px; border-radius: 10px; background: #f3efe4; font: 12px/1.5 var(--police); color: #6b7280; }
#ab-journal[hidden] { display: none; }
#ab-journal .jn-etat { margin-bottom: 8px; font-weight: 600; color: #15803d; }
#ab-journal button { border: 0; border-radius: 8px; background: #16a34a; color: #fff; font: 600 12px/1 var(--police); padding: 8px 12px; margin-right: 6px; cursor: pointer; }
#ab-journal .jn-vider { background: #9ca3af; }
#ab-journal .jn-texte { width: 100%; height: 160px; margin-top: 8px; font: 11px/1.4 ui-monospace, monospace; }
#ab-journal .jn-texte[hidden] { display: none; }

#onboard { position: fixed; inset: 0; background: rgba(20,26,18,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 30; display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
#onboard[hidden] { display: none; }
#onboard .ob-card { width: min(400px, 100%); background: #fffdf6; border-radius: 18px; padding: 18px 20px; margin-bottom: 12px; font: 14px/1.5 var(--police); color: #22301f; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.ob-dots { display: flex; gap: 5px; margin-bottom: 10px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d6cdb4; transition: all .2s; }
.ob-dots i.on { background: #15803d; width: 18px; border-radius: 3px; }
#onboard h4 { margin: 0 0 8px; font-size: 16px; }
#onboard p { margin: 8px 0 0; font-size: 13px; color: #4b5563; }
.ob-grad { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #16a34a, #d97706, #dc2626); }
.ob-grad-labels { display: flex; justify-content: space-between; font-size: 11px; color: #6b7263; margin-top: 3px; }
.ob-next, .ob-locate, .ob-action { display: block; width: 100%; border: 0; border-radius: 10px; background: #16a34a; color: #fff; font: 700 14px/1 var(--police); padding: 12px; margin-top: 12px; cursor: pointer; }
.ob-skip, .ob-plus-tard { display: block; width: 100%; border: 0; background: none; color: #9ba090; font: 400 12px/1 var(--police); margin-top: 10px; cursor: pointer; }
/* display: block l'emportait sur [hidden] : « Passer » restait sur la dernière carte */
.ob-skip[hidden], .obc-etape[hidden], .obc-push-row[hidden], .ob-alertes[hidden] { display: none; }
.ob-alertes { margin-top: 10px; }
.obc-etape { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
/* .ob-action et non .ob-next : onboard.js fait passer à la carte suivante
   tout .ob-next, et « Recevoir le code » sortait de la dernière */
.obc-etape .ob-action { margin-top: 0; }
.obc-etape .ob-action:disabled { opacity: .5; cursor: default; }
.obc-etape input[type=email], .obc-etape input[type=text] { border: 1px solid #d6cdb4; border-radius: 10px; padding: 10px 12px; font: 15px/1.2 var(--police); background: #fff; color: #22301f; min-width: 0; }
.obc-chiffres { letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.obc-case { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #22301f; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-chips button { border: 1.5px solid #d6cdb4; border-radius: 999px; background: none; padding: 7px 12px; font: 500 13px/1 var(--police); color: #22301f; cursor: pointer; }
.ob-chips button.on { border-color: #15803d; background: #dceedd; color: #15803d; font-weight: 700; }

/* carnet : accès direct depuis la carte */

/* « + » station manquante, à côté du « ? » */

/* groupes de carburants par famille */
.fuel-family { font: 600 11px/1 var(--police); color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; margin: 8px 0 3px; }
.fuel-family:first-child { margin-top: 0; }

/* rangée d'actions rapides de la fiche */
.sheet-quick { display: flex; gap: 8px; margin-top: 8px; }
.sheet-quick button { flex: 1; border: 0; border-radius: 10px; padding: 9px 4px; background: rgba(22,163,74,.09); color: #15803d; font: 600 12.5px/1 var(--police); cursor: pointer; }
.sheet-quick button[hidden] { display: none; }

/* ajout d'une station manquante : bandeau + viseur + formulaire */
#add-bar { position: fixed; top: calc(60px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.95); box-shadow: 0 2px 12px rgba(0,0,0,.3); font: 600 13px/1.3 var(--police); color: #374151; z-index: 24; max-width: calc(100vw - 20px); }
#add-bar[hidden], #add-cross[hidden], #add-form[hidden] { display: none; }
#add-bar .add-here { border: 0; border-radius: 8px; padding: 7px 12px; background: #16a34a; color: #fff; font: 700 13px/1 var(--police); cursor: pointer; }
#add-bar .add-cancel { border: 0; background: none; color: #9ca3af; font: 600 13px/1 var(--police); cursor: pointer; }
#add-cross { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 34px; color: #dc2626; text-shadow: 0 0 4px #fff, 0 0 8px #fff; z-index: 23; pointer-events: none; }
#add-form { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(340px, calc(100vw - 24px)); padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 26; font: 14px/1.5 var(--police); color: #374151; }
#add-form .add-close { position: absolute; top: 10px; right: 10px; border: 0; background: none; font-size: 16px; color: #9ca3af; cursor: pointer; }
.add-type-row { display: flex; gap: 14px; margin: 8px 0 10px; font-size: 13px; }
#add-form label { display: block; margin: 8px 0; font-size: 13px; }
#add-form input[type="text"], #add-form select { width: 100%; box-sizing: border-box; margin-top: 3px; padding: 8px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
#add-form .fillup-row { display: flex; gap: 8px; }
#add-form .fillup-row > * { flex: 1; min-width: 0; }
.add-note { margin: 6px 0 0; font-size: 11px; color: #9ca3af; }
#add-form .add-save { width: 100%; margin-top: 10px; border: 0; border-radius: 10px; padding: 10px; background: #16a34a; color: #fff; font: 700 14px/1 var(--police); cursor: pointer; }

/* « ? » à propos, juste au-dessus de l'échelle */
#about { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(360px, calc(100vw - 24px)); max-height: 82vh; overflow-y: auto; padding: 18px 20px; border-radius: 16px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 26; font: 14px/1.5 var(--police); color: #374151; }
#about[hidden] { display: none; }
.ab-close { position: absolute; top: 10px; right: 10px; border: 0; background: none; font-size: 16px; color: #9ca3af; cursor: pointer; }
.ab-head { display: flex; align-items: center; gap: 14px; }
.ab-head img { border-radius: 12px; }
.ab-kana { font-size: 12px; color: #9ca3af; }
.ab-kanji { font-size: 26px; font-weight: 800; color: #15803d; line-height: 1.2; }
.ab-romaji { font-size: 14px; font-weight: 700; color: #111827; }
.ab-def { font-size: 12px; color: #6b7280; }
.ab-pitch { margin: 12px 0 8px; font-size: 13px; }
.ab-version { font-size: 12px; color: #9ca3af; margin-bottom: 10px; }
.ab-log, .ab-legal { border-top: 1px solid #eee; padding: 8px 0; font-size: 13px; }
.ab-log summary, .ab-legal summary { cursor: pointer; font-weight: 600; color: #15803d; }
.ab-log h4 { margin: 10px 0 4px; font-size: 12px; color: #6b7280; }
.ab-log ul { margin: 0; padding-left: 18px; }
.ab-log li { margin: 3px 0; }
.ab-legal p { margin: 8px 0 0; color: #6b7280; font-size: 12px; }
.ab-replay { display: block; width: 100%; margin: 4px 0 8px; border: 0; border-radius: 8px; padding: 7px; background: rgba(22,163,74,.09); color: #15803d; font: 600 12px/1 var(--police); cursor: pointer; }
.ab-legal a { color: #15803d; }

/* échelle : bracket ⊔ dont la largeur correspond à la distance affichée */

/* échelle de zoom en pyramide (cliquable) */

/* --- Mantan : carburant, rayon, moins chère, fiche station --- */
/* sections carburant / bornes : la section inactive est estompée, toucher
   l'une bascule le mode d'affichage */
.prefs-section { border-radius: 10px; padding: 4px 6px; margin: 0 -6px 4px; transition: opacity .2s ease, background .2s ease; }
.prefs-section.active { background: rgba(22,163,74,.08); }
.prefs-section.inactive { opacity: .45; }
#connector-list label { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; font-size: 13px; cursor: pointer; }
#install-banner { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(94vw, 460px); background: rgba(255,255,255,.95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 16px; padding: 10px 12px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.3); z-index: 24; }
#install-banner[hidden] { display: none; }
#install-banner img { border-radius: 8px; flex: 0 0 auto; }
.install-btn { border: 0; border-radius: 10px; padding: 8px 12px; background: #16a34a; color: #fff; font: 600 13px/1 var(--police); cursor: pointer; flex: 0 0 auto; }
.install-close { border: 0; background: rgba(0,0,0,.06); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; flex: 0 0 auto; }
#prefs[hidden] { display: none; }
.prefs-title { font-weight: 600; font-size: 13px; margin: 6px 0 4px; }
#fuel-list label { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; font-size: 13px; cursor: pointer; }
#radius { width: 100%; accent-color: #16a34a; }
#profile-btn { width: 100%; margin-top: 10px; border: 0; border-radius: 10px; padding: 8px; background: rgba(22,163,74,.12); color: #15803d; font: 600 13px/1 var(--police); cursor: pointer; }
#profile { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(340px, calc(100vw - 24px)); max-height: 80vh; overflow-y: auto; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 26; }
#profile[hidden] { display: none; }
.pf-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.06); cursor: pointer; font-size: 14px; }
#profile p { font-size: 13px; color: #444; }
#profile label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 2px; }
#profile input[type="text"], #profile input[type="email"], #profile select { width: 100%; padding: 8px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; font: inherit; background: #fff; }
#profile input[type="range"] { width: 100%; accent-color: #16a34a; }
.pf-check { display: flex; align-items: center; gap: 6px; }
.pf-check input { accent-color: #16a34a; }
.pf-email { font-size: 13px; color: #666; margin-bottom: 4px; }
.pf-login-btn, .pf-save, .pf-code-btn { width: 100%; margin-top: 12px; border: 0; border-radius: 10px; padding: 11px; background: #16a34a; color: #fff; font: 600 14px/1 var(--police); cursor: pointer; }
.pf-login-btn:disabled, .pf-code-btn:disabled { background: rgba(0,0,0,.12); color: #6b7280; cursor: default; }
/* code à 6 chiffres : chiffres espacés et centrés, on relit ce qu'on tape */
#pf-code { text-align: center; font-size: 22px !important; font-weight: 700; letter-spacing: .32em; text-indent: .32em; padding: 10px !important; }
.pf-logout, .pf-toujours { width: 100%; margin-top: 8px; border: 0; border-radius: 10px; padding: 9px; background: rgba(0,0,0,.06); color: #555; font: 600 13px/1 var(--police); cursor: pointer; }
.sheet-trend-row { display: flex; align-items: center; gap: 8px; }
.sheet-mascot[hidden] { display: none; }
.sheet-trend { font-size: 13px; font-weight: 600; margin: 4px 0; }
.sheet-trend.up { color: #b91c1c; }
.sheet-trend.down { color: #15803d; }
.sheet-trend.flat { color: #374151; }
.sheet-trend:empty { display: none; }
.sheet-trend-detail { font-size: 11.5px; color: #888; }
.sheet-trend-detail:empty { display: none; }
.sheet-spark { width: 100%; height: 36px; display: block; }
#trend-banner { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: min(92vw, 480px); background: rgba(255,251,235,.95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,.08); border-radius: 14px; padding: 8px 10px 8px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.25); z-index: 12; }
#trend-banner[hidden] { display: none; }
#zone-banner { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(92vw, 480px); background: rgba(239,246,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,.08); border-radius: 14px; padding: 8px 10px 8px 14px; font-size: 13px; color: #1e3a8a; box-shadow: 0 2px 10px rgba(0,0,0,.25); z-index: 13; }
#zone-banner[hidden] { display: none; }
#zone-close { border: 0; background: rgba(0,0,0,.06); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; flex: 0 0 auto; }
#trend-banner.up { color: #b91c1c; }
#trend-banner.down { color: #15803d; }
#trend-close { border: 0; background: rgba(0,0,0,.06); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; flex: 0 0 auto; }
#hint { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(30,30,30,.8); color: #fff; font-size: 13px; padding: 6px 14px; border-radius: 16px; z-index: 9; pointer-events: none; }
#hint[hidden] { display: none; }
#sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 60vh; overflow-y: auto; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 18px 18px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.3); padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); z-index: 25; }
#sheet[hidden] { display: none; }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.06); cursor: pointer; font-size: 14px; }
.sheet-title { font-size: 17px; font-weight: 700; padding-right: 36px; }
.sheet-addr { color: #555; font-size: 13px; margin-top: 2px; }
.sheet-dist { color: #15803d; font-size: 13px; font-weight: 600; margin-top: 2px; }
.sheet-dist:empty { display: none; }
.sheet-prices { margin: 10px 0; }
.price-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.price-row span:first-child { flex: 1; }
.price-row span:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 600; }
.price-row.dispo-ok span:nth-child(2) { color: #15803d; }
.price-row.dispo-zero span:nth-child(2) { color: #b91c1c; }
.price-row small { color: #999; font-size: 11px; min-width: 105px; text-align: right; }
/* fraîcheur du relevé : vert = récent, ambre = plus de 3 jours, rouge = plus d'une semaine */
.price-row small.fresh-fresh { color: #15803d; }
.price-row small.fresh-ok { color: #6b7280; }
.price-row small.fresh-stale { color: #b45309; }
.price-row small.fresh-old { color: #b91c1c; font-weight: 600; }
.price-row.pref { background: rgba(22,163,74,.08); border-radius: 6px; padding: 4px 6px; font-weight: 700; color: #15803d; }
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet-go, .sheet-go-alt { flex: 1; text-align: center; padding: 11px 0; border-radius: 12px; text-decoration: none; font-weight: 600; }
.sheet-go { background: #16a34a; color: #fff; }
.sheet-go-alt { background: rgba(0,0,0,.06); color: #333; }
.sheet-go-alt[hidden] { display: none; }
/* emplacement partenaire : une ligne discrète, servie par nous, sans tracking */
.sheet-price-note { font-size: 11px; color: #999; text-align: right; margin-top: -2px; }
/* repère EIA (stations américaines) : un paragraphe à lire, aligné à gauche, à part des prix */
.sheet-repere { text-align: left; font-size: 12px; margin-top: 8px; line-height: 1.4; }
.sheet-partner { display: block; text-align: center; margin-top: 10px; font-size: 12.5px; color: #92702a; text-decoration: none; }
.sheet-partner[hidden] { display: none; }
/* Signalement à OSM : un lien discret en pied de fiche, assez haut pour le pouce (44 px). */
.sheet-osm { display: block; margin: 10px auto 0; min-height: 44px; padding: 0 12px; border: 0; background: none;
  color: #6b7280; font: 500 12.5px/1.2 var(--police); text-decoration: underline; cursor: pointer; }
.sheet-osm[hidden] { display: none; }
.sheet-osm-voir { display: block; width: fit-content; margin: 0 auto; padding: 12px; color: #6b7280;
  font: 500 12.5px/1.2 var(--police); text-decoration: underline; }
.sheet-osm-voir[hidden] { display: none; }

/* minimap : vue régionale (tuiles) + rectangle de cadrage */

/* petit écran : on enlève les contrôles d'ordinateur (pyramide de zoom,
   calques, minimap) — le pinch et le double-tap suffisent au doigt */
/* « pointer: coarse » plutôt qu'une largeur : un téléphone en paysage dépasse
   767 px et retrouvait la pyramide de zoom, les calques et la minimap — des
   contrôles d'ordinateur qu'on ne veut nulle part au doigt. Le critère est
   l'outil de pointage, pas la taille de l'écran. */
@media (max-width: 767px), (pointer: coarse) {
  /* l'échelle part avec eux : au doigt on juge les distances au déplacement,
     et chaque élément en moins est de la carte en plus */
  }

/* corrections utilisateur */
.sheet-flag { background: rgba(217,119,6,.12); color: #92400e; font-weight: 600; font-size: 13px; border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.sheet-flag[hidden] { display: none; }
.sheet-correct { margin-top: 8px; font-size: 13px; }
.sheet-correct summary { cursor: pointer; color: #666; }
.correct-actions { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.correct-actions button { border: 0; border-radius: 10px; padding: 9px 10px; background: rgba(0,0,0,.06); font: 600 13px/1 var(--police); cursor: pointer; text-align: left; }
.corr-price-row { display: flex; flex-direction: column; gap: 6px; }
.corr-prices { display: flex; flex-direction: column; gap: 6px; }
/* une ligne par carburant : on relève tout le totem d'un coup, sans rouvrir */
.corr-line { display: flex; align-items: center; gap: 6px; }
.corr-line label { flex: 1; font: 600 13px/1 var(--police); }
.corr-value { border: 1px solid rgba(0,0,0,.15); border-radius: 8px; padding: 6px 8px; font: inherit; width: 88px; }
.corr-same { flex: 0 0 auto; font: 500 12px/1 var(--police) !important; padding: 7px 9px !important; white-space: nowrap; }
.corr-line[data-etat="ok"] label::after { content: ' ✓'; color: #16a34a; }
.corr-line[data-etat="ok"] .corr-value { border-color: #16a34a; }
.corr-flags { display: flex; gap: 8px; }
.corr-flags button { flex: 1; text-align: center; }
.corr-ruptures { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.corr-ruptures[hidden] { display: none; }
.corr-ruptures-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.corr-ruptures-btns button { flex: 1 0 auto; text-align: center; }
.price-row.rupture span:first-child { text-decoration: line-through; opacity: .7; }
.correct-actions small { color: #999; }
.price-row small.fresh-user { color: #7c3aed; } /* correction utilisateur : violet « non vérifié » */
.corr-price-row[hidden] { display: none; }

/* carnet de pleins */
.sheet-fillup { margin-top: 8px; font-size: 13px; }
.sheet-fillup[hidden] { display: none; }
.sheet-fillup summary { cursor: pointer; color: #15803d; font-weight: 600; }
.fillup-form { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.fillup-row { display: flex; gap: 8px; }
.fillup-form input, .fillup-form select { flex: 1; min-width: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; padding: 8px 10px; font: inherit; }
.fu-save { border: 0; border-radius: 10px; padding: 10px; background: #16a34a; color: #fff; font: 600 13px/1 var(--police); cursor: pointer; }
#carnet { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(380px, calc(100vw - 24px)); max-height: 82vh; overflow-y: auto; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 26; }
#carnet[hidden] { display: none; }
.ca-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.06); cursor: pointer; font-size: 14px; }
.ca-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.ca-stat { background: rgba(22,163,74,.08); border-radius: 12px; padding: 10px; text-align: center; }
.ca-stat b { display: block; font-size: 17px; color: #15803d; }
.ca-stat span { font-size: 11.5px; color: #666; }
.ca-item { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 13px; }
.ca-item .ca-station { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-item .ca-date { color: #999; font-size: 11px; }
.ca-item .ca-saved { font-weight: 600; }
.ca-item .ca-saved.pos { color: #15803d; }
.ca-item .ca-saved.neg { color: #b45309; }
.ca-del { border: 0; background: none; color: #bbb; cursor: pointer; font-size: 13px; }
.ca-csv { display: block; text-align: center; margin-top: 10px; font-size: 13px; color: #15803d; }
.ca-thanks { display: block; text-align: center; margin-top: 12px; padding: 10px; border-radius: 12px; background: rgba(22,163,74,.1); color: #15803d; font-size: 13px; font-weight: 600; text-decoration: none; }
.ca-thanks[hidden] { display: none; }
.ca-coffee-row { display: flex; gap: 8px; margin-top: 8px; }
.ca-coffee-row button { flex: 1; border: 0; border-radius: 10px; padding: 10px; background: #16a34a; color: #fff; font: 600 13px/1 var(--police); cursor: pointer; }
.ca-coffee-row button:disabled { opacity: .6; }
/* carnet : onglets pleins / entretien */
.ca-tabs { display: flex; gap: 6px; margin: 8px 0; }
.ca-tab { flex: 1; border: 0; border-radius: 10px; padding: 8px; background: rgba(0,0,0,.05); font: 600 13px/1 var(--police); cursor: pointer; color: #666; }
.ca-tab.active { background: rgba(22,163,74,.14); color: #15803d; }
.ca-view[hidden] { display: none; }
.ma-due { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ma-due-item { background: rgba(217,119,6,.12); color: #92400e; font-weight: 600; font-size: 13px; border-radius: 10px; padding: 8px 12px; }
.ma-add { font-size: 13px; margin-bottom: 8px; }
.ma-add summary { cursor: pointer; color: #15803d; font-weight: 600; }
.ma-form { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.ma-form input, .ma-form select { flex: 1; min-width: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; padding: 8px 10px; font: inherit; }
.ma-form .prefs-title { margin: 2px 0 0; font-size: 12.5px; }
.ma-save { border: 0; border-radius: 10px; padding: 10px; background: #16a34a; color: #fff; font: 600 13px/1 var(--police); cursor: pointer; }
.ma-summary { font-size: 12.5px; color: #666; margin: 4px 0 8px; }
.ma-item { padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.ma-item .ma-main { flex: 1; min-width: 0; }
.ma-item .ma-sub { color: #999; font-size: 11.5px; }
.ma-item .ma-next { color: #b45309; font-size: 11.5px; font-weight: 600; }
.pf-danger { margin-top: 12px; font-size: 13px; }
.pf-danger summary { cursor: pointer; color: #b91c1c; }
.pf-danger p { color: #666; font-size: 12.5px; }
.pf-delete { width: 100%; border: 1px solid #b91c1c; border-radius: 10px; padding: 10px; background: rgba(185,28,28,.06); color: #b91c1c; font: 600 13px/1 var(--police); cursor: pointer; }

/* Légende de la carte dans « à propos » : plutôt qu'une quatrième carte
   d'onboarding qui taxerait tout le monde pour un cas rare, l'explication vit
   là où on va la chercher quand on l'a vue. */
.ab-legend { margin: 10px 0 4px; }
.ab-legend > summary { cursor: pointer; font-size: 13px; color: #15803d; font-weight: 600; }
.lg-row { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 12.5px; color: #4b5563; line-height: 1.45; }
.lg-row b { color: #111827; }
.lg-dot { flex: 0 0 44px; }

/* Rappel « vous n'êtes pas sur place » au-dessus des contributions : la
   contrainte doit s'expliquer là où elle bloque, pas après un refus. */
.corr-hint { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(180,83,9,.10); color: #92400e; font-size: 12.5px; line-height: 1.4; }
.sheet-quick button:disabled { opacity: .4; cursor: default; }
/* Station sans nouvelles : l'invitation à la rafraîchir prend la place du
   verdict, qui n'a aucun sens sans prix fiable. */
.sheet-stale { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(148,163,184,.16); font-size: 13px; line-height: 1.45; color: #334155; }
.sheet-stale b { color: #0f172a; }

/* Caméra en direct : totems à LED */
#cam { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; }
#cam[hidden] { display: none; }
#cam-video { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
#cam-aide { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; padding: 7px 14px; font: 600 13px/1 var(--police); }
#cam-actions { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #000; }
#cam-actions button { border: 0; border-radius: 999px; padding: 13px 22px; font: 600 15px/1 var(--police); cursor: pointer; }
#cam-annuler { background: rgba(255,255,255,.15); color: #fff; }
#cam-shot { background: #16a34a; color: #fff; }
#cam-shot[disabled] { opacity: .6; }
/* pendant la rafale : l'image se fige, il faut que ça se voie */
#cam.pose #cam-video { opacity: .65; }
#cam.pose #cam-aide { background: #16a34a; }

/* Position courante : petite voiture, discrète, au-dessus des tuiles mais
   sous les pastilles de prix — on se repère avec, on ne la lit pas. */
.marker.emoji.me { font-size: 18px; transform: translate(-50%, -50%); z-index: 6; }
/* glissement entre deux positions GPS (classe posée par mk.move, retirée par
   render : un pan doit rester instantané) */
.marker.glisse { transition: left .9s linear, top .9s linear; }
@media (prefers-reduced-motion: reduce) { .marker.glisse { transition: none; } }


/* --- Accueil épuré ------------------------------------------------------
   Deux commandes en haut (recherche, menu), une barre d'action en bas. Tout
   le reste a rejoint le menu : au repos, l'écran ne montre que la carte et
   ce qu'on peut faire ici et maintenant. */

#menu-btn { position: fixed; top: var(--coin-haut-droit, 14px); right: 14px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.52); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  color: #4a4a4a; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); z-index: 12; }

/* le centrage passe sous la recherche : il n'apparaît que lorsqu'on est sorti
   du champ, et n'a donc pas à réserver de place en permanence */
#rail { position: fixed; top: calc(var(--coin-haut-gauche, 14px) + 48px); left: 10px; z-index: 11; display: flex; flex-direction: column; gap: 8px; }

#actions { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 12; display: flex; gap: 7px; }
/* Même verre dépoli que les commandes du haut, teinté vert. Le texte garde
   une ombre portée : blanc sur un fond translucide, il faut de quoi tenir
   au-dessus d'une carte chargée. */
#actions button { flex: 1; height: 44px; border: 0; border-radius: 999px;
  background: rgba(22,163,74,.62); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  color: #fff; font: 700 14px/1 var(--police); cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.35); box-shadow: 0 2px 10px rgba(0,0,0,.22);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }
#actions button.creuse { background: rgba(255,255,255,.52); color: #23301f;
  text-shadow: none; box-shadow: 0 1px 6px rgba(0,0,0,.22); }
#actions button.loading { opacity: .6; }
.ob-locate.loading { opacity: .6; cursor: progress; }
#actions #totem-fab { flex: 1.45; }

/* --- Menu ---------------------------------------------------------------- */
/* Le menu, lui, reste opaque : on y lit des réglages, pas la carte. */
#prefs { position: fixed; top: 0; right: 0; bottom: 0; width: min(310px, 82vw);
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: -6px 0 22px rgba(0,0,0,.25); z-index: 40; overflow-y: auto;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  transform: none; left: auto; border-radius: 0; }
.menu-close { position: absolute; top: 10px; right: 12px; border: 0; background: none;
  font-size: 17px; color: #6b7280; cursor: pointer; padding: 4px; }
.menu-head { font: 700 11px/1 var(--police); text-transform: uppercase; letter-spacing: .07em;
  color: #8a9280; margin: 18px 0 8px; }
.menu-head:first-of-type { margin-top: 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; padding: 10px 0; cursor: pointer; text-align: left;
  font: 600 14px/1.2 var(--police); color: #222; border-bottom: 1px solid rgba(0,0,0,.08); }
.menu-item em { margin-left: auto; font: 500 11px/1 var(--police); color: #8a9280; font-style: normal; }
.menu-item:last-of-type { border-bottom: 0; }
/* le lien du blog est le seul <a> du menu, donc son « dernier du type » : il garde son trait */
a.menu-item { text-decoration: none; }
a.menu-item:last-of-type { border-bottom: 1px solid rgba(0,0,0,.08); }
.menu-avance { margin-top: 16px; font-size: 13px; }
.menu-avance summary { cursor: pointer; color: #8a9280; font-weight: 600; }
.menu-avance .prefs-title { margin-top: 10px; }

/* --- Horaires dans la fiche --------------------------------------------- */
.sheet-open { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font-size: 13px; }
.sheet-open[hidden] { display: none; }
.so-state { font-weight: 600; }
.so-state.ouvert { color: #15803d; }
.so-state.ferme { color: #b45309; }
.so-state.inconnu { color: #9ca3af; font-weight: 500; }
.so-edit, .so-photo { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 2px 4px; opacity: .65;
  min-width: 32px; min-height: 32px; }
.so-edit:hover, .so-photo:hover { opacity: 1; }
.so-edit[hidden], .so-photo[hidden] { display: none; }
.sheet-hours { margin-top: 4px; font-size: 12.5px; }
.sheet-hours[hidden] { display: none; }
.sheet-hours summary { cursor: pointer; color: #6b7280; }
.sh-days { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; padding: 8px 0 4px; }
.sh-days b { font-weight: 600; }
.sh-days span { font-variant-numeric: tabular-nums; color: #4b5563; }
.sh-days .aujourdhui { color: #15803d; }
.sh-services { color: #6b7280; font-size: 12px; padding-top: 4px; border-top: 1px solid rgba(0,0,0,.08); }

/* --- Correction des horaires -------------------------------------------- */
#hours-edit { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(360px, 92vw); max-height: 84vh; overflow-y: auto; z-index: 45;
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.32); padding: 16px; }
#hours-edit[hidden] { display: none; }
.he-close { position: absolute; top: 8px; right: 10px; border: 0; background: none;
  font-size: 16px; color: #6b7280; cursor: pointer; }
.he-title { font: 700 15px/1.2 var(--police); }
.he-sub { font-size: 12px; color: #6b7280; margin: 2px 0 12px; }
.he-day { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.he-day b { flex: 0 0 74px; font: 600 12px/1 var(--police); }
.he-day select { flex: 0 0 auto; border: 1px solid rgba(0,0,0,.15); border-radius: 8px;
  padding: 5px 6px; font: inherit; font-size: 12px; }
.he-day input[type="time"] { border: 1px solid rgba(0,0,0,.15); border-radius: 8px;
  padding: 4px 6px; font: inherit; font-size: 12px; width: 88px; }
.he-day .he-copy { margin-left: auto; border: 0; background: rgba(0,0,0,.06); border-radius: 8px;
  padding: 5px 7px; font: 600 10px/1 var(--police); cursor: pointer; white-space: nowrap; }
.he-auto { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 13px; }
.he-save { width: 100%; height: 40px; border: 0; border-radius: 999px; background: #16a34a;
  color: #fff; font: 700 14px/1 var(--police); cursor: pointer; }


/* --- Signalement à OSM et photo des horaires ----------------------------- */
#osm-signal, #horaires-photo { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; z-index: 46;
  background: rgba(255,255,255,.98); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.32); padding: 16px; box-sizing: border-box; }
#osm-signal[hidden], #horaires-photo[hidden], #osm-signal [hidden], #horaires-photo [hidden] { display: none; }
.os-close, .hp-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0;
  background: none; font-size: 16px; color: #6b7280; cursor: pointer; }
.os-titre, .hp-titre { font: 700 16px/1.25 var(--police); margin: 0 40px 2px 0; }
.os-sub, .hp-sub { font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.os-motifs { border: 0; margin: 0 0 10px; padding: 0; }
.os-motifs legend { font: 600 13px/1.3 var(--police); margin-bottom: 4px; padding: 0; }
.os-case { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
.os-case input, .hp-osm input, .hp-edit-auto input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; }
.os-texte-l { display: block; font: 600 13px/1.3 var(--police); margin-bottom: 4px; }
.os-texte { width: 100%; box-sizing: border-box; border: 1px solid rgba(0,0,0,.2); border-radius: 10px;
  padding: 8px 10px; font: 15px/1.35 var(--police); resize: vertical; }
.os-compte { text-align: right; font-size: 11px; color: #6b7280; margin-top: 2px; }
.os-erreur, .hp-erreur { color: #b91c1c; font-size: 13px; min-height: 1em; margin: 6px 0; }
.os-erreur:empty, .hp-erreur:empty { margin: 0; }
.os-note, .hp-osm-note { display: block; color: #6b7280; font-size: 11.5px; line-height: 1.35; margin: 6px 0 12px; }
.os-envoyer, .hp-valider, .os-ok, .hp-ok { width: 100%; min-height: 44px; border: 0; border-radius: 999px;
  background: #16a34a; color: #fff; font: 700 14px/1 var(--police); cursor: pointer; }
.os-envoyer:disabled, .hp-valider:disabled { opacity: .55; cursor: wait; }
.os-merci p, .hp-merci p { font: 600 15px/1.4 var(--police); margin: 4px 0 10px; outline: none; }
.os-merci .os-fiche { font: 400 13px/1.4 var(--police); color: #4b5563; }
.os-lien, .hp-lien { display: block; margin: 0 0 14px; color: #1d4ed8; font-size: 14px; }
.hp-etat { font-size: 13px; color: #374151; margin-bottom: 8px; }
.hp-etat:empty { display: none; }
.hp-jours { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 8px; font-size: 14px; }
.hp-jours dt { font-weight: 600; }
.hp-jours dd { margin: 0; font-variant-numeric: tabular-nums; }
.hp-auto { font-size: 13px; color: #15803d; margin-bottom: 6px; }
.hp-oh { font-size: 11.5px; color: #6b7280; margin: 6px 0 10px; overflow-wrap: anywhere; }
.hp-oh code { font-size: 11.5px; }
.hp-osm { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
.hp-osm-note { margin-top: 0; }
.hp-actions { display: flex; gap: 8px; }
.hp-actions button { flex: 1; min-height: 44px; border-radius: 999px; font: 700 14px/1.1 var(--police); cursor: pointer; }
.hp-corriger, .hp-reprendre, .hp-saisir { border: 1px solid rgba(0,0,0,.15); background: #fff; color: #111827; }
.hp-reprendre { border: 0; background: #16a34a; color: #fff; }
.hp-edit-jour { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,.06); }
.hp-edit-jour b { flex: 0 0 76px; font: 600 13px/1 var(--police); }
.hp-edit-jour select, .hp-edit-jour input[type="time"] { min-height: 36px; border: 1px solid rgba(0,0,0,.18);
  border-radius: 8px; padding: 2px 6px; font: 14px var(--police); background: #fff; }
.hp-plages { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.hp-plage { display: inline-flex; align-items: center; gap: 4px; }
.hp-edit-auto { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }

/* Grand écran : la barre de zoom occupe le bord gauche et les calques le bord
   droit. La recherche et le menu, posés aux deux coins, passaient dessous —
   invisible à l'œil, mais les clics tombaient sur le mauvais élément. */
/* symétrique : les décalages ne servent qu'aux écrans où ces contrôles
   existent vraiment, donc à la souris */
@media (min-width: 768px) and (pointer: fine) {
  #search-box { left: 44px; right: 200px; }
  #search-box.collapsed { left: 44px; }
    #rail { left: 44px; } /* le centrage tombait sur la barre de zoom */
}
#search-box { z-index: 12; }

/* Pavé du relevé de prix : douze touches, rien d'autre */
.pave { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.pave button { height: 42px; border: 0; border-radius: 10px; background: rgba(0,0,0,.06);
  font: 700 17px/1 var(--police); color: #1f2417; cursor: pointer; }
.pave button:active { background: rgba(0,0,0,.12); }
.pave .pave-valider { background: #16a34a; color: #fff; font-size: 13px; }
.pave .pave-large { grid-column: 1 / -1; }
.corr-line.actif .corr-value { border-color: #16a34a; box-shadow: 0 0 0 2px rgba(22,163,74,.18); }
.corr-value { text-align: center; font-variant-numeric: tabular-nums; }

/* Lecture du ticket de plein */
.fu-ticket { width: 100%; height: 40px; border: 0; border-radius: 999px; background: #16a34a;
  color: #fff; font: 700 13px/1 var(--police); cursor: pointer; margin-bottom: 4px; }
.fu-ticket[hidden] { display: none; }
.fu-publier { background: rgba(0,0,0,.05); border-radius: 11px; padding: 10px; }
.fu-publier[hidden] { display: none; }
.fu-publier b { display: block; font-size: 13px; margin-bottom: 3px; }
.fu-publier small { display: block; color: #6b7280; font-size: 11.5px; margin-bottom: 8px; }
.fu-publier-actions { display: flex; gap: 6px; }
.fu-publier-actions button { flex: 1; height: 32px; border: 0; border-radius: 999px;
  font: 600 12px/1 var(--police); cursor: pointer; }
.fu-pub-oui { background: #16a34a; color: #fff; }
.fu-pub-non { background: rgba(0,0,0,.08); color: #2b3325; }

/* --- Trajet : résultat de recherche, puis stations du corridor ----------- */
#destination { position: fixed; top: 58px; left: 10px; right: 10px; z-index: 13;
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 11px 13px; }
#destination[hidden] { display: none; }
.dest-nom { font: 700 14px/1.25 var(--police); }
.dest-sub { font: 500 12px/1.3 var(--police); color: #6b7280; margin: 2px 0 9px; }
.dest-go { width: 100%; height: 36px; border: 0; border-radius: 999px;
  background: rgba(22,163,74,.72); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  color: #fff; font: 700 13px/1 var(--police); cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.dest-close { position: absolute; top: 6px; right: 8px; border: 0; background: none;
  font-size: 14px; color: #9ca3af; cursor: pointer; padding: 4px; }

#trajet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; max-height: 58vh;
  overflow-y: auto; background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px 16px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  padding: 9px 14px calc(14px + env(safe-area-inset-bottom)); }
#trajet[hidden] { display: none; }
.tj-poignee { width: 34px; height: 4px; border-radius: 2px; background: rgba(0,0,0,.15); margin: 0 auto 10px; }
.tj-titre { font: 700 14px/1.2 var(--police); }
.tj-sub { font: 500 12px/1.3 var(--police); color: #6b7280; margin: 2px 0 8px; }
.tj-close { position: absolute; top: 8px; right: 12px; border: 0; background: none;
  font-size: 15px; color: #9ca3af; cursor: pointer; }
.tj-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%; border: 0; background: none; text-align: left; cursor: pointer;
  padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.08); font: 600 13px/1.3 var(--police); }
.tj-item:last-child { border-bottom: 0; }
.tj-item small { display: block; font: 500 11px/1.3 var(--police); color: #6b7280; }
.tj-item b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tj-item.moins-chere b { color: #15803d; }

/* --- Choix de la langue -------------------------------------------------- */
#langues { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(340px, 92vw); max-height: 82vh; overflow-y: auto; z-index: 45;
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.32); padding: 16px; }
#langues[hidden] { display: none; }
.lg-close { position: absolute; top: 8px; right: 10px; border: 0; background: none;
  font-size: 16px; color: #6b7280; cursor: pointer; }
.lg-titre { font: 700 15px/1.2 var(--police); margin-bottom: 10px; }
.lg-auto { background: rgba(0,0,0,.05); border-radius: 9px; padding: 8px 10px; margin-bottom: 10px;
  font: 500 12px/1.4 var(--police); color: #6b7280; }
.lg-auto b { color: #1f2417; }
.lg-liste { display: flex; flex-direction: column; gap: 1px;
  background: rgba(0,0,0,.09); border: 1px solid rgba(0,0,0,.09); border-radius: 10px; overflow: hidden; }
.lg-liste button { display: flex; align-items: center; gap: 8px; border: 0; background: #fff;
  padding: 11px 12px; text-align: left; cursor: pointer;
  font: 600 14px/1.25 var(--police); color: #222; }
.lg-liste button small { display: block; font: 500 11px/1.3 var(--police); color: #6b7280; }
.lg-liste button.actif { color: #15803d; }
.lg-liste button.actif::after { content: '✓'; margin-left: auto; }
.lg-note { font: 500 11.5px/1.4 var(--police); color: #6b7280; margin-top: 10px; }
