@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('/vendor/fonts/chakra-petch/chakra-petch-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('/vendor/fonts/chakra-petch/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('/vendor/fonts/chakra-petch/chakra-petch-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/vendor/fonts/barlow/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/vendor/fonts/barlow/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/vendor/fonts/barlow/barlow-latin-600-normal.woff2') format('woff2'); }
:root {
  --bg: #0b1230;
  --bg2: #121a3d;
  --bg3: #1b2550;
  --line: #2a3568;
  --text: #eef2ff;
  --muted: #9aa6cc;
  --orange: #3ff0ff;   /* couleur « manif » : cyan électrique */
  --on-orange: #05091c;
  --orange-dim: rgba(63, 240, 255, .14);
  --red: #ff3b5c;
  --red-dim: rgba(255, 59, 92, .18);
  --green: #2fbf71;
  --blue: #0b1230;   /* magasins : bleu nuit sur la carte claire */
  --store-ring: #ffffff;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-body: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Chakra Petch', 'Barlow', 'Arial Narrow', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 16px/1.45 var(--font-body); }
body { overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
a { color: var(--orange); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Boutons et champs ---------- */
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 12px; font-weight: 650; background: var(--bg3); border: 1px solid var(--line); width: 100%; }
.btn.primary { background: var(--orange); color: var(--on-orange); border-color: transparent; }
.btn.danger { background: var(--red); color: #fff; border-color: transparent; }
.btn.ok { background: var(--green); color: #04220f; border-color: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; width: auto; border-radius: 10px; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; position: relative; }
.iconbtn.round { border-radius: 50%; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit; font-size: 16px; }
input:focus { outline: 2px solid var(--orange); outline-offset: -1px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.error { color: #ff8f8a; font-size: 14px; margin: 10px 0 0; min-height: 1em; }
.muted { color: var(--muted); }
.sep { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- Écrans plein écran ---------- */
.screen { position: fixed; inset: 0; overflow-y: auto; padding: calc(28px + var(--safe-t)) 20px calc(28px + var(--safe-b));
  background: radial-gradient(120% 60% at 50% 0%, #1f2630 0%, var(--bg) 60%); }
.screen .wrap { max-width: 420px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo img { width: 52px; height: 52px; border-radius: 14px; }
.logo h1 { font-size: 26px; letter-spacing: -.02em; }
.logo p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.screen .card + .card { margin-top: 14px; }
.switch-link { text-align: center; margin-top: 18px; font-size: 15px; }
.switch-link button { color: var(--orange); font-weight: 650; }
.suggest { background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; margin-top: 4px; overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.suggest button:last-child { border-bottom: 0; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--orange-dim); color: #c8fbff; font-size: 14px; }
.notice.red { background: var(--red-dim); color: #ffc7d0; }
.notice.blue { background: rgba(130,150,255,.14); color: #d4dcff; }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.big-status { text-align: center; padding: 18px 4px; }
.big-status svg { width: 48px; height: 48px; color: var(--orange); }
.big-status h2 { margin: 12px 0 8px; }

/* ---------- Carte ---------- */
#mapview { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: #f2f2f2; }
.topbar { position: absolute; z-index: 500; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) 10px 8px 14px; background: linear-gradient(var(--bg) 60%, rgba(11,18,48,0)); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.live { margin-left: auto; white-space: nowrap; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  padding: 6px 10px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #69737e; }
.live.on i { background: var(--green); box-shadow: 0 0 0 0 rgba(47,191,113,.6); animation: pulse-g 2s infinite; }
.legend { position: absolute; z-index: 500; top: calc(64px + var(--safe-t)); left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 99px;
  background: rgba(11,18,48,.9); border: 1px solid var(--line); }
.lg { width: 10px; height: 10px; border-radius: 50%; }
.lg.orange { background: var(--orange); } .lg.red { background: var(--red); }
.mapbtns { position: absolute; z-index: 500; right: 12px; bottom: calc(104px + var(--safe-b)); display: grid; gap: 10px; }
.report-fab { position: absolute; z-index: 500; left: 50%; transform: translateX(-50%); bottom: calc(22px + var(--safe-b));
  display: flex; align-items: center; gap: 10px; padding: 0 30px; height: 62px; border-radius: 99px; font-size: 19px; font-weight: 800;
  background: var(--orange); color: var(--on-orange); box-shadow: 0 10px 30px rgba(63,240,255,.35), 0 3px 10px rgba(0,0,0,.4); }
.report-fab svg { width: 24px; height: 24px; stroke-width: 2.6; }
.report-fab:active { transform: translateX(-50%) scale(.97); }
.crosshair { position: absolute; z-index: 450; left: 50%; top: 50%; width: 40px; height: 52px; transform: translate(-50%, -100%); pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.crosshair svg { width: 40px; height: 52px; fill: var(--orange); stroke: var(--on-orange); stroke-width: 2; }
.crosshair svg circle { fill: var(--on-orange); stroke: none; }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-bottom.leaflet-right { bottom: var(--safe-b); }

/* Marqueurs d'événements */
.ev-icon { position: relative; }
.ev-dot { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; border: 3px solid #0b1230;
  box-shadow: 0 3px 10px rgba(0,0,0,.45); color: #fff; font-weight: 800; font-size: 13px; }
.ev-dot.orange { background: var(--orange); color: var(--on-orange); }
.ev-dot.red { background: var(--red); }
.ev-halo { position: absolute; inset: -14px; border-radius: 50%; opacity: .5; }
.ev-halo.orange { background: radial-gradient(var(--orange) 0%, transparent 70%); }
.ev-halo.red { background: radial-gradient(var(--red) 0%, transparent 70%); animation: halo 1.4s ease-out infinite; }
.ev-arrow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.ev-arrow svg { position: absolute; width: 26px; height: 26px; left: -13px; top: -13px; stroke: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.ev-arrow.orange svg { fill: var(--orange); } .ev-arrow.red svg { fill: var(--red); }
.store-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--blue); border: 3px solid #fff; display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.store-icon svg { width: 16px; height: 16px; color: #fff; }
.me-icon { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(61,139,253,.25); }
@keyframes halo { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes pulse-g { 0% { box-shadow: 0 0 0 0 rgba(47,191,113,.6); } 70% { box-shadow: 0 0 0 7px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }

/* ---------- Panneau du bas ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,.35); }
.sheet-backdrop.clear { background: transparent; pointer-events: none; }
.sheet { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; max-height: 88vh; max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg);
  border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); padding: 6px 18px calc(18px + var(--safe-b));
  box-shadow: 0 -10px 40px rgba(0,0,0,.45); animation: up .22s ease-out; max-width: 640px; margin: 0 auto; }
.sheet.half { max-height: 56vh; }
.grip { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 6px auto 12px; }
@keyframes up { from { transform: translateY(30px); } to { transform: none; } }
.sheet h2 { font-size: 21px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-head .iconbtn { margin-left: auto; margin-right: -8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--orange-dim); border-color: var(--orange); color: #c8fbff; }
.chip.danger[aria-pressed="true"] { background: var(--red-dim); border-color: var(--red); color: #ffc7d0; }
.chips.size .chip { flex: 1 1 calc(33% - 8px); }

.compass { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); gap: 6px; justify-content: center; }
.compass button { border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.compass button svg { width: 26px; height: 26px; color: var(--text); }
.compass button[aria-pressed="true"] { background: var(--orange-dim); border-color: var(--orange); }
.compass button[aria-pressed="true"] svg, .compass button[aria-pressed="true"] { color: #c8fbff; }
.compass-wrap { display: flex; align-items: center; gap: 16px; }
.compass-wrap .hint { flex: 1; }

.photo-pick { display: flex; align-items: center; gap: 12px; }
.photo-pick img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.submit-bar { position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--bg); padding: 14px 0 4px; margin-top: 10px; }

/* Fiche événement */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.badge.orange { background: var(--orange); color: var(--on-orange); } .badge.red { background: var(--red); color: #fff; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.fact { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fact small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.fact b { font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.tag { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--bg3); }
.tag.warn { background: var(--red-dim); color: #ffc7d0; }
.photos { display: flex; gap: 8px; overflow-x: auto; margin: 4px -18px 12px; padding: 0 18px; }
.photos figure { margin: 0; flex: none; position: relative; }
.photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.photos figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.7); }
.reports { margin-top: 8px; }
.rep { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: 14px; background: var(--bg2); }
.rep b { font-size: 15px; }
.rep a { text-decoration: none; }

/* ---------- Panneau plein écran ---------- */
.panel { position: fixed; inset: 0; z-index: 1100; background: var(--bg); display: flex; flex-direction: column; animation: up .2s ease-out; }
.panel-head { display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 10px 8px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 19px; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(24px + var(--safe-b)); max-width: 720px; width: 100%; margin: 0 auto; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.tabs button { padding: 9px 14px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-weight: 650; font-size: 14px; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; }
.list-item { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.list-item h3 { font-size: 16px; }
.list-item .meta { font-size: 14px; color: var(--muted); margin: 4px 0; }
.list-item .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.check { font-size: 13px; padding: 8px 10px; border-radius: 10px; margin-top: 8px; }
.check.good { background: rgba(47,191,113,.14); color: #b4f0cd; }
.check.bad { background: var(--red-dim); color: #ffc7d0; }
.check.unk { background: var(--bg3); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat small { color: var(--muted); font-size: 12px; }
.menu-list { display: grid; gap: 8px; margin-top: 14px; }
.menu-list .btn { justify-content: flex-start; }
.menu-list .btn svg { color: var(--muted); }
.pw-box { font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-align: center; padding: 16px; border-radius: 12px;
  background: var(--bg3); border: 1px dashed var(--orange); margin: 10px 0; user-select: all; }
.search { margin-bottom: 12px; }

.toast { position: fixed; z-index: 2000; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 650; font-size: 15px; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
.toast.err { background: var(--red); color: #fff; }

@media (min-width: 700px) {
  .sheet { left: 16px; right: auto; width: 420px; bottom: 16px; border-radius: 20px; border: 1px solid var(--line); max-height: calc(100vh - 110px); }
}

/* Mode signalement : la carte se réduit au-dessus du formulaire pour garder le repère visible */
#mapview.reporting #map { bottom: 58vh; bottom: 58dvh; }
#mapview.reporting .crosshair { top: 21vh; top: 21dvh; }
#mapview.reporting .legend, #mapview.reporting .mapbtns { display: none; }
.sheet.report { max-height: 58vh; height: 58vh; max-height: 58dvh; height: 58dvh; border-radius: 16px 16px 0 0; }
@media (min-width: 700px) {
  #mapview.reporting #map { bottom: 0; left: 452px; }
  #mapview.reporting .crosshair { top: 50%; left: calc(452px + (100vw - 452px) / 2); }
  .sheet.report { height: auto; max-height: calc(100vh - 110px); }
}

/* Magasins inscrits */
.lg.shop { background: #0b1230; border: 2px solid #fff; box-shadow: 0 0 0 1px #9aa6cc; width: 11px; height: 11px; }
.shop-dot { width: 14px; height: 14px; border-radius: 50%; background: #0b1230; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); cursor: pointer; }
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { margin: 9px 13px; font-size: 14px; }

textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.4; }
textarea:focus { outline: 2px solid var(--orange); outline-offset: -1px; }

/* Les cercles de la carte (zone d'alerte, rayon du magasin) : ne pas hériter du style des icônes */
.leaflet-overlay-pane svg { width: auto; height: auto; stroke-width: initial; }

/* Carte en noir et blanc */
.leaflet-tile-pane { filter: grayscale(1) contrast(1.12); }
.osm-fallback { filter: grayscale(1) contrast(.75) brightness(1.12); }

/* Typographie : Chakra Petch pour le nom, les titres et les étiquettes d'alerte */
h1, h2, .brand span, .logo h1, .report-fab, .badge, .panel-head h2, .pw-box { font-family: var(--font-display); }
h1, h2 { font-weight: 700; letter-spacing: .01em; }
.brand span { font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .08em; }
.logo h1 { font-size: 28px; text-transform: uppercase; letter-spacing: .07em; }
.sheet h2 { font-size: 21px; text-transform: uppercase; letter-spacing: .03em; }
.panel-head h2 { font-size: 22px; font-weight: 700; }
.report-fab { font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.badge { font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.fact b { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.list-item h3, .card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
