/* Style iOS (validé le 02/12/2026) : police système Apple, bleu #007aff, barres translucides, listes groupées.
   Commun au site public et à l'administration ; l'administration ajoute admin.css. Propriétés logiques. */
:root {
  --blue: #007aff; --blue-d: #0062cc; --red: #ff3b30; --green: #34c759; --pin: #d63a2a;
  --label: #000; --label2: #3c3c4399; --label3: #3c3c434d; --sep: #c6c6c8; --fill: #7878801f;
  --bg: #f2f2f7; --card: #fff; --bar: rgba(249, 249, 249, .86);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --barh: 64px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 17px/1.35 var(--font); color: var(--label); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
svg { fill: currentColor; }

/* --- Barre du haut translucide --- */
.bar { position: fixed; z-index: 1000; inset-block-start: 0; inset-inline: 0; min-block-size: var(--barh);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-block-end: .5px solid rgba(0, 0, 0, .2); }
.bar { display: flex; align-items: center; gap: 12px; }
.bar > div { min-inline-size: 0; }
.bar h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.bar .count { display: block; font-size: 13px; color: var(--label2); margin-block-start: 1px; }

.front { overflow: hidden; }
.map { position: fixed; inset: calc(var(--barh) + env(safe-area-inset-top, 0px)) 0 0 0; background: #e9ece4; }

/* --- Commandes de carte (empilées comme dans Plans) --- */
.ctrls { position: fixed; z-index: 900; inset-inline-end: 12px; inset-block-start: calc(var(--barh) + env(safe-area-inset-top, 0px) + 12px);
  display: grid; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-radius: 10px; box-shadow: 0 1px 6px rgba(0, 0, 0, .16); overflow: hidden; }
.ctrls button { inline-size: 44px; block-size: 44px; border: 0; background: none; color: var(--blue); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ctrls button + button { border-block-start: .5px solid var(--sep); }
.ctrls svg { inline-size: 22px; block-size: 22px; }
.ctrls button span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ctrls button.on { background: var(--blue); color: #fff; }
.ctrls button:active { background: var(--fill); }

.legend { position: fixed; z-index: 900; inset-inline-start: 12px; inset-block-start: calc(var(--barh) + env(safe-area-inset-top, 0px) + 12px);
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 12px;
  padding: 8px 12px; font-size: 13px; line-height: 1.65; box-shadow: 0 1px 6px rgba(0, 0, 0, .14); display: grid; }
.legend .n { display: none; }
.legend b { font-size: 12px; font-weight: 600; color: var(--label2); }
.legend i, .sw { display: inline-block; inline-size: 10px; block-size: 10px; border-radius: 50%; margin-inline-end: 7px; vertical-align: 0; }

/* --- Bouton principal : pilule bleue centrée en bas --- */
.cta { position: fixed; z-index: 950; inset-block-end: calc(28px + var(--cookies-h, 0px) + env(safe-area-inset-bottom, 0px)); inset-inline-start: 50%; transform: translateX(-50%);
  border: 0; border-radius: 999px; background: var(--blue); color: #fff; padding: 15px 26px; font-size: 17px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 122, 255, .38); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.cta b { font-size: 24px; line-height: 0; font-weight: 500; }
.cta:active { background: var(--blue-d); transform: translateX(-50%) scale(.98); }
[dir="rtl"] .cta { transform: translateX(50%); }

/* --- Feuille du formulaire --- */
.panel { position: fixed; z-index: 1001; inset-block-start: calc(var(--barh) + env(safe-area-inset-top, 0px) + 10px); inset-inline: 20px;
  max-block-size: calc(100% - var(--barh) - 40px); overflow: auto; background: var(--bg); border-radius: 16px; padding-block-end: 12px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .25); }
@media (min-width: 900px) {
  .panel { inset-inline: auto 16px; inline-size: 390px; inset-block-start: calc(var(--barh) + 14px); }
  .front .cta { display: none; }
  .front.form-open .ctrls { inset-inline-end: 418px; }
}
@media (max-width: 899px) { .front.form-open .legend, .front.form-open .cta { display: none; } }
.sheet-hd { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 12px 16px 10px; background: var(--bg); }
.sheet-hd b { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; }
.sheet-hd b small { color: var(--label2); font-weight: 400; margin-inline-start: 4px; font-size: 15px; }
.hdb { border: 0; background: none; color: var(--blue); font-size: 17px; padding: 4px 0; cursor: pointer; text-align: start; justify-self: start; }
.hdb.strong { font-weight: 600; justify-self: end; text-align: end; }
.hdb:disabled { color: var(--label3); cursor: default; }

/* Listes groupées */
.grp { margin: 0 16px 18px; }
.grp > small, .gl { display: block; font-size: 13px; color: var(--label2); text-transform: uppercase; letter-spacing: .02em; padding: 0 16px 6px; }
.lst { background: var(--card); border-radius: 10px; overflow: hidden; margin: 0; padding: 0; list-style: none; }
.row { position: relative; display: flex; align-items: center; gap: 12px; inline-size: 100%; min-block-size: 44px; padding: 11px 16px;
  border: 0; background: var(--card); text-align: start; font-size: 17px; color: var(--label); }
.lst > .row + .row, .lst > li + li { box-shadow: inset 0 .5px 0 var(--sep); }
.row.act { color: var(--blue); cursor: pointer; }
.row.act svg { inline-size: 22px; block-size: 22px; flex: none; }
.row:active { background: #e5e5ea; }
.row.chk { cursor: pointer; justify-content: space-between; }
.row.chk::after { content: ""; inline-size: 14px; block-size: 8px; border-inline-start: 2.5px solid transparent; border-block-end: 2.5px solid transparent; transform: rotate(-45deg) translateY(-3px); }
.row.chk[aria-checked="true"]::after { border-color: var(--blue); }
.row .sw { margin: 0; }
.row.chk span { flex: 1; display: flex; align-items: center; gap: 10px; }
.row.field { cursor: text; }
.row.field span { inline-size: 92px; flex: none; }
.row.field input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; min-inline-size: 0; padding: 0; }
.row-in { display: block; inline-size: 100%; border: 0; outline: 0; resize: vertical; padding: 11px 16px; font-size: 17px; background: var(--card); min-block-size: 64px; }
::placeholder { color: var(--label3); }
.foot { font-size: 13px; color: var(--label2); margin: -10px 32px 16px; }
.foot a { color: var(--blue); }
.err { color: var(--red); font-size: 15px; margin: 0 32px 12px; }
.file { overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.trap { position: absolute; inset-inline-start: -9999px; }

.search { display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 0 10px; block-size: 40px; color: var(--label2); }
.search svg { inline-size: 20px; block-size: 20px; flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; color: var(--label); min-inline-size: 0; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sugg { margin-block-start: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.sugg li { padding: 11px 16px; cursor: pointer; font-size: 15.5px; }
.sugg li:hover, .sugg li.on { background: #e5e5ea; }
#addr { display: block; font-size: 16px; }
#addr b { font-weight: 600; }

.done { text-align: center; padding: 4px 24px 18px; }
.done span { display: inline-grid; place-items: center; inline-size: 56px; block-size: 56px; border-radius: 50%; background: var(--green); color: #fff; }
.done span svg { inline-size: 32px; block-size: 32px; }
.done h2 { font-size: 22px; margin: 10px 0 4px; }
.done p { margin: 0; color: var(--label2); font-size: 15px; }

/* --- Boutons et champs génériques (connexion, admin) --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 12px 18px;
  font-size: 17px; font-weight: 600; background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; }
.btn:active { background: var(--blue-d); }
.btn.g { background: var(--fill); color: var(--blue); }
.btn.w { inline-size: 100%; }
.fld { display: block; inline-size: 100%; border: 0; border-radius: 10px; padding: 11px 14px; font-size: 17px; background: var(--fill); color: var(--label); margin-block-end: 10px; }
.fld:focus { outline: 2px solid var(--blue); }
.lbl { display: block; font-size: 13px; color: var(--label2); text-transform: uppercase; letter-spacing: .02em; margin: 14px 4px 6px; }

/* --- Repères et bulles --- */
.nid { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.nid.sel { z-index: 1000 !important; }
.pin { display: block; inline-size: 30px; block-size: 42px; }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.leaflet-popup-content { font-size: 14px; line-height: 1.45; margin: 12px 14px; }
.leaflet-popup-content b { font-size: 15px; }
.leaflet-control-zoom { border: 0 !important; border-radius: 10px !important; overflow: hidden; box-shadow: 0 1px 6px rgba(0, 0, 0, .16) !important; }
.leaflet-control-zoom a { color: var(--blue) !important; }

/* --- Connexion --- */
.login { min-block-size: 100%; display: grid; place-items: center; overflow: auto; }
.login form { inline-size: min(380px, 100% - 32px); }
.login h2 { font-size: 34px; font-weight: 700; margin: 0 4px 18px; }
.login .btn { margin-block-start: 8px; }

/* --- Menu : bouton « burger », volet latéral --- */
.burger { flex: none; inline-size: 40px; block-size: 40px; margin-inline-start: -8px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  display: grid; place-content: center; gap: 5px; padding: 0; }
.burger span { display: block; inline-size: 22px; block-size: 2.5px; border-radius: 2px; background: var(--blue); transition: transform .25s, opacity .2s; }
.burger:active { background: var(--fill); }
.menu-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .32); opacity: 0; transition: opacity .28s; }
.menu-in .scrim { opacity: 1; }
.drawer { position: fixed; z-index: 1101; inset-block: 0; inset-inline-start: 0; inline-size: min(330px, 86vw); overflow: auto;
  background: var(--bg); box-shadow: 4px 0 30px rgba(0, 0, 0, .22); transform: translateX(-105%); visibility: hidden;
  transition: transform .3s cubic-bezier(.32, .72, 0, 1), visibility 0s .3s;
  padding: env(safe-area-inset-top, 0px) 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
[dir="rtl"] .drawer { transform: translateX(105%); }
.menu-in .drawer { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.32, .72, 0, 1); }
.dr-hd { display: flex; align-items: center; gap: 12px; padding: 18px 16px 20px 20px; }
.dr-hd img { inline-size: 52px; block-size: auto; flex: none; }
.dr-hd div { flex: 1; min-inline-size: 0; }
.dr-hd b { display: block; font-size: 20px; font-weight: 700; }
.dr-hd small { display: block; font-size: 13px; color: var(--label2); }
.dr-x { flex: none; align-self: flex-start; inline-size: 30px; block-size: 30px; border: 0; border-radius: 50%; background: var(--fill); color: var(--label2);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.drawer .grp { margin-inline: 12px; }
a.row { text-decoration: none; }
.row.act span { flex: 1; color: var(--label); }
.chev { flex: none; inline-size: 8px; block-size: 8px; border-block-start: 2px solid var(--label3); border-inline-end: 2px solid var(--label3); transform: rotate(45deg); margin-inline-end: 4px; }
[dir="rtl"] .chev { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .drawer, .scrim, .burger span { transition: none !important; } }

/* --- Fenêtre « À propos » --- */
.about { inline-size: min(420px, 100% - 32px); max-block-size: calc(100% - 40px); padding: 0 0 6px; border: 0; border-radius: 16px; background: var(--bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3); color: var(--label); }
.about::backdrop { background: rgba(0, 0, 0, .38); }
.about[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.about .sheet-hd { border-radius: 16px 16px 0 0; }
.ab-id { text-align: center; padding: 4px 24px 6px; }
.ab-id img { inline-size: 120px; block-size: auto; }
.ab-id h2 { margin: 8px 0 2px; font-size: 24px; }
.ab-id p { margin: 0; color: var(--label2); font-size: 15px; }
.ab-txt { margin: 12px 32px 18px; font-size: 15px; color: var(--label); text-align: center; }
.ab-row { align-items: flex-start; color: var(--label); }
.ab-row .k { inline-size: 76px; flex: none; color: var(--label); }
.ab-row .v { flex: 1; color: var(--blue); }

/* --- Bandeau cookies --- */
.cookies { position: fixed; z-index: 1050; inset-inline: 12px; inset-block-end: calc(12px + env(safe-area-inset-bottom, 0px)); max-inline-size: 560px; margin-inline: auto;
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.cookies p { margin: 0; flex: 1; font-size: 13.5px; line-height: 1.4; color: var(--label); }
.cookies b { font-weight: 600; }
.cookies a { color: var(--blue); }
.cookies .btn { padding: 9px 20px; font-size: 15px; border-radius: 10px; }
.has-cookies { --cookies-h: 100px; }
@media (min-width: 900px) { .cookies { inset-inline: 16px auto; } }

/* --- Pages d'information (données personnelles, conditions, cookies, mentions) --- */
.doc { min-block-size: 100%; overflow: auto; }
.doc main { max-inline-size: 760px; margin: 0 auto; padding: calc(var(--barh) + env(safe-area-inset-top, 0px) + 18px) 16px 120px; }
.doc .card { background: var(--card); border-radius: 12px; padding: 4px 20px 16px; margin-block-end: 18px; }
.doc h2 { font-size: 22px; margin: 18px 4px 8px; }
.doc h3 { font-size: 17px; margin: 18px 0 6px; }
.doc p, .doc li { font-size: 16px; line-height: 1.55; }
.doc .upd { color: var(--label2); font-size: 13px; margin: 0 4px 14px; }
.doc a { color: var(--blue); }
.doc table { inline-size: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: start; padding: 8px 6px; border-block-end: .5px solid var(--sep); vertical-align: top; }
.doc th { font-size: 13px; color: var(--label2); font-weight: 600; text-transform: uppercase; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding: 2px; scrollbar-width: none; }
.tabs a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--fill); color: var(--label); text-decoration: none; font-size: 15px; }
.tabs a.on { background: var(--blue); color: #fff; }

/* --- Bulle publique : bouton « Détails », fenêtre de détails --- */
.pop-det { display: flex; align-items: center; justify-content: center; gap: 6px; inline-size: 100%; margin-block-start: 10px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: var(--fill); color: var(--blue); font-size: 15px; font-weight: 600; cursor: pointer; }
.pop-det svg { inline-size: 18px; block-size: 18px; }
.pop-det:active { background: #e5e5ea; }
.det { inline-size: min(560px, 100% - 32px); }
.det-img { display: block; inline-size: calc(100% - 32px); min-block-size: 180px; max-block-size: 62vh; object-fit: contain; margin: 2px 16px 16px; border-radius: 12px; background: #000; }
.det-no { text-align: center; color: var(--label2); font-size: 15px; margin: 6px 24px 16px; }
.det .row .k { inline-size: 100px; flex: none; color: var(--label2); }
