/* MOUNAQIB | مُنقّب — application web. Couleurs identiques à l'application Android (ui/theme/Theme.kt). */
:root {
  --green-900: #0A3A22; --green-800: #0F4D2E; --green-700: #14653C; --green-600: #1B7A49;
  --green-100: #E3F0E7; --green-50: #F1F7F2;
  --gold: #D4A72C; --gold-light: #F2D27A; --gold-dark: #9A7414; --gold-soft: #FBF1D6;
  --cream: #F6F2E7; --sand: #E9D9B8; --ink: #1C2A22; --muted: #6B756F; --line: #E4DECF;
  --red: #C62828; --red-dark: #8E1B1B; --red-soft: #FDECEC; --orange: #E07B12; --blue: #1D5FBF;
  --card: #FFFFFF;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 58, 34, .06), 0 4px 14px rgba(10, 58, 34, .06);
  --header: linear-gradient(180deg, var(--green-700), var(--green-900));
  --sidebar-w: 284px;
  --tabbar-h: 64px;
  --font: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink);
  background: var(--cream); min-height: 100vh;
}
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
p { margin: 0 0 .6em; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ── Icônes (Material Symbols Rounded, Apache 2.0 — sous-ensemble local régénéré par tools/icons.py) ── */
@font-face {
  font-family: "Material Symbols Rounded"; font-style: normal; font-weight: 500; font-display: block;
  src: url(vendor/fonts/material-symbols.woff2?v=0.1.6-202611121031) format("woff2");
}
.ic {
  font-family: "Material Symbols Rounded"; font-weight: 500; font-style: normal; font-size: 22px;
  line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
  display: inline-block; vertical-align: middle; flex-shrink: 0;
  font-variation-settings: "FILL" 0; -webkit-font-smoothing: antialiased; user-select: none;
  width: 1em; overflow: hidden;
}
.ic.fill, .on > .ic, .on .tab-ic .ic { font-variation-settings: "FILL" 1; }
.ic.big { font-size: 48px; }
[dir="rtl"] .back .ic, [dir="rtl"] .chev, [dir="rtl"] .ic.flip { transform: scaleX(-1); }

/* ── Coquille ── */
.shell { min-height: 100vh; display: flex; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--green-800), var(--green-900)); color: #fff;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
  border-inline-end: 1px solid rgba(212, 167, 44, .35);
}
.sidebar a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand b { display: block; color: var(--gold-light); font-size: 24px; font-weight: 800; line-height: 1.1; }
.brand small { display: block; color: rgba(255, 255, 255, .75); font-size: 11px; letter-spacing: .14em; }
[dir="ltr"] .brand small { letter-spacing: .02em; font-size: 12px; }
.side-sos {
  display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #E53935, var(--red-dark)); font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 16px rgba(198, 40, 40, .35);
}
.side-sos:hover { filter: brightness(1.08); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-groups a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; color: rgba(255, 255, 255, .88);
  position: relative;
}
.side-nav a:hover, .side-groups a:hover { background: rgba(255, 255, 255, .08); }
.side-nav a.on { background: var(--gold-soft); color: var(--green-900); font-weight: 700; }
.side-nav a.on .ic { color: var(--green-800); }
.side-nav .badge { position: static; margin-inline-start: auto; }
.side-groups { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 10px; }
.side-groups summary {
  cursor: pointer; list-style: none; color: var(--gold-light); font-size: 13px; font-weight: 700; padding: 6px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.side-groups summary::-webkit-details-marker { display: none; }
.side-groups summary::after { content: "expand_more"; font-family: "Material Symbols Rounded"; font-size: 18px; transition: transform .2s; }
.side-groups details[open] summary::after { transform: rotate(180deg); }
.side-groups a { font-size: 14px; padding: 6px 12px; }
.side-groups a .ic { font-size: 19px; color: var(--gold-light); }
.side-groups a.red .ic { color: #FF8A80; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; font-weight: 600; }
.side-user:hover { background: rgba(255, 255, 255, .08); }

.topbar {
  position: sticky; top: 0; z-index: 500; display: flex; align-items: center; gap: 8px;
  min-height: 60px; padding: 6px 14px; padding-top: max(6px, env(safe-area-inset-top));
  background: var(--header); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.top-title { flex: 1; min-width: 0; }
.top-title h1 { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title small { display: block; color: var(--gold-light); font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-brand { display: flex; }
.top-actions { display: flex; gap: 4px; align-items: center; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important;
}
.topbar .icon-btn { color: #fff; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.lang-switch { display: inline-flex; border: 1px solid rgba(212, 167, 44, .6); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; color: rgba(255, 255, 255, .85); padding: 3px 11px; cursor: pointer; font-size: 13px; font-weight: 700;
}
.lang-switch button.on { background: var(--gold); color: var(--green-900); }
.offline-banner {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 6px 16px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 600;
}
.offline-banner a { color: #fff; text-decoration: underline; }
.view { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 20px 40px; }
.tabbar { display: none; }

/* Mobile et tablette étroite : barre d'onglets en bas, pas de barre latérale. */
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .view { padding: 14px 14px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 600; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(10, 58, 34, .06);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; min-width: 0;
  }
  .tab-ic { position: relative; display: inline-flex; padding: 3px 18px; border-radius: 999px; }
  .tabbar a.on { color: var(--green-800); }
  .tabbar a.on .tab-ic { background: var(--gold-soft); }
  .tab-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tab-ic .badge { position: absolute; top: -4px; inset-inline-end: 6px; }
}
@media (min-width: 1024px) {
  .top-brand, .top-lang { display: none; }
  .topbar { padding-inline: 24px; }
  .view { padding: 24px 28px 48px; }
}
@media (max-width: 520px) {
  .top-lang .lang-switch button { padding: 3px 8px; }
  .top-title h1 { font-size: 17px; }
}
body.bare .sidebar, body.bare .tabbar, body.bare .topbar { display: none; }
body.bare .view { max-width: none; padding: 0; }

.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-family: var(--font);
}

/* ── États ── */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 16px; color: var(--muted); text-align: center; }
.state.error .ic { color: var(--orange); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--green-100); border-top-color: var(--green-700); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px;
  border-radius: 999px; border: 1px solid transparent; background: var(--green-800); color: #fff; font-weight: 700; font-size: 15px;
  cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--green-800); }
.btn.gold { background: var(--gold); color: var(--green-900); }
.btn.red { background: var(--red); }
.btn.outline { background: #fff; color: var(--green-700); border-color: var(--green-700); }
.btn.gold-outline { background: #fff; color: var(--gold-dark); border-color: var(--gold); }
.btn.red-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; color: var(--green-700); }
.btn.small { min-height: 36px; padding: 4px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.outline.busy::after { border-color: var(--green-100); border-top-color: var(--green-700); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.fab {
  position: fixed; z-index: 550; inset-inline-end: 22px; bottom: 26px; box-shadow: 0 8px 20px rgba(10, 58, 34, .3);
}
@media (max-width: 1023px) { .fab { bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); } }

/* ── Cartes et listes ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--gold); transform: translateY(-1px); }
.card + .card { margin-top: 12px; }
.card h3 { font-size: 17px; margin-bottom: 4px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid.narrow { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.row-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: inherit; text-decoration: none !important; transition: border-color .15s, box-shadow .15s;
}
.row-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.row-card .grow { flex: 1; min-width: 0; }
.row-card .title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-card .sub { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.row-card .chev { color: var(--muted); }
.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(20, 101, 60, .1); color: var(--green-700); flex-shrink: 0; }
.icon-tile .ic { font-size: 26px; }
.icon-tile.gold { background: var(--gold-soft); color: var(--gold-dark); }
.icon-tile.red { background: var(--red-soft); color: var(--red); }
.icon-tile.blue { background: rgba(29, 95, 191, .1); color: var(--blue); }
.icon-tile.orange { background: rgba(224, 123, 18, .12); color: var(--orange); }
.avatar {
  width: var(--s); height: var(--s); border-radius: 50%; background: var(--green-700); color: #fff; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(var(--s) * .38);
}
.avatar.gold { background: var(--gold); color: var(--green-900); }
.verified { color: var(--blue); display: inline-flex; }
.verified .ic { font-size: 18px; font-variation-settings: "FILL" 1; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(20, 101, 60, .1); color: var(--green-700); white-space: nowrap; }
.pill.gold { background: var(--gold-soft); color: var(--gold-dark); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.orange { background: rgba(224, 123, 18, .12); color: #B45F08; }
.pill.blue { background: rgba(29, 95, 191, .1); color: var(--blue); }
.pill.gray { background: #EEF0EE; color: var(--muted); }
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; }
.rating .ic { font-size: 17px; color: var(--gold); }
.rating small { color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.section-title h2 { font-size: 18px; font-weight: 800; color: var(--green-900); }
.section-title a { font-size: 14px; font-weight: 600; }
.section-title:first-child { margin-top: 0; }
.info-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { color: var(--green-700); font-size: 20px; margin-top: 2px; }
.info-row .lbl { color: var(--muted); min-width: 120px; }
.info-row .val { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat .ic { color: var(--green-700); }
.stat b { font-size: 20px; color: var(--green-800); line-height: 1.3; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stat.gold .ic, .stat.gold b { color: var(--gold-dark); }
.stat.red .ic, .stat.red b { color: var(--red); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.lead { color: var(--muted); font-size: 15.5px; }
.prose { white-space: pre-line; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ── Puces, onglets ── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.chip {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 14px;
  cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.chip:hover { border-color: var(--gold); }
.chip.on { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.search {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px;
}
.search .ic { color: var(--green-700); }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; padding: 8px 0; background: transparent; font-size: 15px; }
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 167, 44, .2); }

/* ── Formulaires ── */
.form { display: grid; gap: 14px; }
.form .two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-weight: 700; font-size: 14px; color: var(--green-900); }
.field .req { color: var(--red); font-style: normal; margin-inline-start: 3px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(20, 101, 60, .15); }
.field textarea { resize: vertical; }
.field .hint { color: var(--muted); font-size: 12.5px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--green-700); }
.form-error { background: var(--red-soft); color: var(--red-dark); border: 1px solid rgba(198, 40, 40, .25); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-soft); border: 1px solid rgba(212, 167, 44, .45); color: #5E470B; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.notice .ic { color: var(--gold-dark); }
.notice.red { background: var(--red-soft); border-color: rgba(198, 40, 40, .3); color: var(--red-dark); }
.notice.red .ic { color: var(--red); }
.notice.green { background: var(--green-50); border-color: var(--green-100); color: var(--green-900); }
.notice.green .ic { color: var(--green-700); }
.photo-pick { display: flex; align-items: center; gap: 12px; }
.photo-pick img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

.contact-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.contact-bar .btn { flex: 1 1 auto; }

/* ── Accueil ── */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 26px 24px; min-height: 180px;
  background:
    radial-gradient(circle at 15% 25%, rgba(242, 210, 122, .55) 0 34px, transparent 35px),
    linear-gradient(180deg, transparent 58%, rgba(201, 150, 61, .9) 58%, #B07A2E 100%),
    linear-gradient(180deg, #F4C27A, #E9A55B 55%, #D9894A);
  display: flex; flex-direction: column; justify-content: center;
}
[dir="ltr"] .hero { background:
    radial-gradient(circle at 85% 25%, rgba(242, 210, 122, .55) 0 34px, transparent 35px),
    linear-gradient(180deg, transparent 58%, rgba(201, 150, 61, .9) 58%, #B07A2E 100%),
    linear-gradient(180deg, #F4C27A, #E9A55B 55%, #D9894A); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(10, 58, 34, .94), rgba(10, 58, 34, .72) 45%, rgba(10, 58, 34, .1));
}
[dir="ltr"] .hero::before { background: linear-gradient(to right, rgba(10, 58, 34, .94), rgba(10, 58, 34, .72) 45%, rgba(10, 58, 34, .1)); }
.hero::after {
  content: ""; position: absolute; inset-inline: -10%; bottom: -30px; height: 90px; border-radius: 50%;
  background: rgba(176, 122, 46, .55); filter: blur(2px);
}
.hero > * { position: relative; z-index: 1; max-width: 640px; }
.hero h2 { font-size: 28px; font-weight: 800; }
.hero p { color: var(--gold-light); font-size: 16.5px; margin: 4px 0 14px; }
.hero .search { max-width: 560px; }
.strip {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; color: #fff; text-decoration: none !important;
  background: var(--green-900); margin-top: 12px;
}
.strip .grow { flex: 1; }
.strip .gold-price { color: var(--gold-light); font-size: 19px; font-weight: 800; }
.strip .up { color: #6EE7A0; }
.strip .down { color: #FF8A80; }
.strip.alert { background: var(--red-soft); border: 1px solid rgba(198, 40, 40, .3); color: var(--ink); }
.strip.alert .bubble { width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.strip.alert b { color: var(--red-dark); display: block; }
.service-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 520px) { .service-grid { grid-template-columns: repeat(3, 1fr); gap: 9px; } }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 116px; padding: 10px 8px;
  border-radius: 18px; background: linear-gradient(180deg, var(--green-700), var(--green-900)); border: 1px solid rgba(212, 167, 44, .45);
  color: #fff; text-align: center; font-weight: 600; font-size: 14px; line-height: 1.35; text-decoration: none !important;
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(10, 58, 34, .25); }
.tile .bubble { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: inline-flex; align-items: center; justify-content: center; }
.tile .ic { color: var(--gold-light); font-size: 26px; }
.tile.red { background: linear-gradient(135deg, #E53935, var(--red-dark)); }
.tile.gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.tile.gold .ic { color: #fff; }
.mini-tiles { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.mini-tile {
  flex: 0 0 108px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); text-align: center; font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.mini-tile:hover { border-color: var(--gold); }
.mini-tile .bubble { width: 42px; height: 42px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); display: inline-flex; align-items: center; justify-content: center; }
.promo {
  border-radius: 22px; padding: 18px; color: #fff; border: 1px solid rgba(212, 167, 44, .5);
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
}
.promo.red { background: linear-gradient(135deg, #3A0D0D, #7A1414); }
.promo h3 { color: var(--gold-light); font-size: 19px; }
.promo.red h3 { color: #fff; }
.promo p { color: rgba(255, 255, 255, .85); font-size: 14px; }
.home-cols { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
@media (min-width: 900px) { .home-cols { grid-template-columns: 1fr 1fr; } }
.tagline { text-align: center; color: var(--gold-dark); font-weight: 700; margin-top: 22px; }

/* ── Pages de détail ── */
.detail-head { display: flex; gap: 14px; align-items: center; }
.detail-head h2 { font-size: 21px; font-weight: 800; }
.detail-head .sub { color: var(--muted); }
.banner {
  border-radius: 20px; padding: 20px; color: #fff; background: linear-gradient(135deg, var(--green-700), var(--green-900));
  border: 1px solid rgba(212, 167, 44, .45);
}
.banner h2 { font-size: 22px; color: #fff; }
.banner .sub { color: var(--gold-light); }
.banner .pill { background: rgba(255, 255, 255, .15); color: #fff; }
.progress { height: 10px; border-radius: 5px; background: var(--green-100); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), var(--gold)); border-radius: 5px; }
.cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: var(--sand); }
.thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--sand); }

/* ── Carte ── */
.map-box { height: 420px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #e8e4d8; z-index: 0; }
.screen-map .map-box { height: calc(100vh - 230px); min-height: 380px; }
@media (max-width: 1023px) { .screen-map .map-box { height: calc(100vh - 60px - var(--tabbar-h) - 150px); } }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content { margin: 10px 12px; font-size: 14px; line-height: 1.5; }
.leaflet-popup-content b { display: block; font-size: 15px; }
.map-pin { width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.map-pin .ic { transform: rotate(45deg); color: #fff; font-size: 17px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 5px; }

/* ── Or et météo ── */
.price-hero { border-radius: 20px; padding: 20px; color: #fff; background: linear-gradient(135deg, var(--green-800), var(--green-900)); border: 1px solid rgba(212, 167, 44, .5); }
.price-hero .big { font-size: 34px; font-weight: 800; color: var(--gold-light); line-height: 1.2; }
.chart { width: 100%; height: 180px; display: block; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.weather-now { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.weather-now .temp { font-size: 48px; font-weight: 800; line-height: 1; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: 13px; }
.day .ic { color: var(--gold-dark); font-size: 28px; }

/* ── Urgences ── */
.sos-big {
  width: 100%; border: 0; border-radius: 22px; padding: 22px; cursor: pointer; color: #fff; font-weight: 800; font-size: 22px;
  background: radial-gradient(circle at 50% 0%, #FF5A52, var(--red) 55%, var(--red-dark)); box-shadow: 0 10px 26px rgba(198, 40, 40, .4);
  display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none !important;
}
.sos-big .ic { font-size: 40px; }
.sos-big:hover { filter: brightness(1.06); }

/* ── Notifications éphémères ── */
.toasts { position: fixed; z-index: 2000; inset-inline: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (max-width: 1023px) { .toasts { bottom: calc(var(--tabbar-h) + 16px); } }
.toast { background: var(--green-900); color: #fff; padding: 10px 18px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); font-weight: 600; max-width: 90vw; transition: opacity .4s, transform .4s; }
.toast.error { background: var(--red-dark); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ── Authentification ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--cream); }
@media (min-width: 960px) { .auth { grid-template-columns: 1.1fr 1fr; } }
.auth-art {
  position: relative; color: #fff; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background: linear-gradient(180deg, var(--green-800), var(--green-900)); overflow: hidden;
}
.auth-art::after {
  content: ""; position: absolute; inset-inline: -20%; bottom: -120px; height: 260px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(233, 165, 91, .55), rgba(176, 122, 46, .15) 60%, transparent 70%);
}
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { font-size: 30px; font-weight: 800; color: var(--gold-light); max-width: 520px; }
.auth-art ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: rgba(255, 255, 255, .9); }
.auth-art li .ic { color: var(--gold-light); }
@media (max-width: 959px) { .auth-art { padding: 22px 18px; } .auth-art h2 { font-size: 22px; } .auth-art ul { display: none; } }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 28px 18px 40px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 26px; font-weight: 800; color: var(--green-900); margin-bottom: 4px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top .lang-switch { border-color: rgba(212, 167, 44, .7); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-accounts { font-size: 13.5px; }
.demo-accounts button { border: 1px dashed var(--gold); background: var(--gold-soft); border-radius: 10px; padding: 6px 10px; cursor: pointer; text-align: start; width: 100%; }
.demo-accounts button + button { margin-top: 6px; }

/* ── Profil ── */
.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-head h2 { font-size: 22px; }
.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 12px; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--ink); text-decoration: none !important; cursor: pointer; text-align: start; width: 100%; font-weight: 600;
}
.menu-list > :last-child { border-bottom: 0; }
.menu-list .ic { color: var(--green-700); }
.menu-list .grow { flex: 1; }
.menu-list .danger, .menu-list .danger .ic { color: var(--red); }
.notif { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.notif.unread { border-color: var(--gold); background: #FFFDF5; }
.notif .grow { flex: 1; min-width: 0; }
.notif b { display: block; }
.notif time { color: var(--muted); font-size: 12.5px; }

/* ── Illustration désert ── */
.scene {
  position: relative; overflow: hidden; border-radius: 18px; flex-shrink: 0;
  background:
    radial-gradient(circle at var(--sun-x) 30%, #FFF6D2 0 15px, rgba(255, 243, 196, .4) 16px 28px, transparent 29px),
    radial-gradient(ellipse 65% 42% at 22% 104%, var(--dune2) 0 97%, transparent 100%),
    radial-gradient(ellipse 75% 46% at 88% 108%, var(--dune1) 0 97%, transparent 100%),
    radial-gradient(ellipse 90% 30% at 50% 100%, var(--dune1) 0 97%, transparent 100%),
    linear-gradient(180deg, var(--sky1), var(--sky2));
}
.scene.mini { border-radius: 14px; }
.scene-machine { position: absolute; bottom: 14%; inset-inline-start: 18%; color: rgba(60, 40, 15, .55); }
.scene-machine .ic { font-size: 34px; }
.scene.mini .scene-machine .ic { font-size: 18px; }
.scene-caption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 40px 16px 12px; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(10, 58, 34, .82));
}
.scene-caption h2, .scene-caption h3 { color: #fff; font-size: 22px; font-weight: 800; margin: 0; }
.scene-caption small { color: var(--gold-light); font-weight: 600; font-size: 14px; }
.scene-pill { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--green-900) !important; color: var(--gold-light) !important; }
.zone-card { padding: 0; overflow: hidden; }
.zone-card .scene { border-radius: 0; }
.zone-card p { padding: 12px 16px 14px; margin: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.site-code { width: 46px; height: 46px; border-radius: 50%; background: var(--green-800); color: var(--gold-light); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.meta-wrap { display: flex; flex-wrap: wrap; gap: 6px; }


/* ── Travailleurs, superviseurs, chauffeurs (people.js) ── */
/* ── Travailleurs, superviseurs, chauffeurs (screens/people.js) ── */
.filter-select {
  min-height: 44px; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  padding: 8px 14px; font-size: 14.5px; cursor: pointer;
}
.filter-select:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 167, 44, .2); }
.avatar.gray { background: var(--muted); }
.person-head .rating small { color: rgba(255, 255, 255, .75); }
.person-head .verified { color: var(--gold-light); }
.star-pick { display: flex; gap: 2px; }
.star-pick button { border: 0; background: transparent; padding: 2px; cursor: pointer; color: var(--gold); line-height: 0; border-radius: 8px; }
.star-pick button:hover { background: var(--gold-soft); }
.star-pick .ic { font-size: 34px; }


/* ── Or et météo (goldweather.js) ── */
/* ── Or (screens/goldweather.js) ── */
.gold-hero { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; justify-content: space-between; }
.gold-hero small { display: block; color: rgba(255, 255, 255, .78); }
.gold-hero .side .big { font-size: 26px; }
.gold-hero .trend {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 2px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .28); font-weight: 700; font-size: 14px;
}
.gold-hero .trend .ic { font-size: 18px; }
.gold-hero .trend.up { color: #6EE7A0; }
.gold-hero .trend.down { color: #FF8A80; }
.karat {
  width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--green-900); margin-inline-end: 4px;
}
.chart-range { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }

/* ── Météo ── */
.wx-hero {
  background: linear-gradient(180deg, #2E86C1, #7FB3D5 62%, #F5CBA7); border-color: rgba(46, 134, 193, .45);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.wx-hero h2 { font-size: 22px; }
.wx-hero .sub { color: #fff; font-weight: 700; }
.wx-hero small { color: rgba(255, 255, 255, .9); }
.wx-hero .ic.big { font-size: 72px; color: #fff; }
.wx-hero .ic.wx-sun { color: #FFD54F; }
.wx-hero .temp { font-size: 56px; }
.wx-hero .btn { text-shadow: none; }
.day .ic.wx-blue { color: var(--blue); }
.day .wx-mini { display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 12px; }
.day .wx-mini .ic { font-size: 14px; color: inherit; }
.day .wx-rain { color: var(--blue); }
.wx-temp { font-size: 20px; color: var(--green-800); flex-shrink: 0; }


/* ── Travaux, contrats et broyage (jobs.js) ── */
/* ── Travaux et contrats, broyage (screens/jobs.js) ── */
.job-ring {
  --p: 0; --sz: 56px; --bw: 6px;
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: var(--sz); height: var(--sz); border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--green-100) 0);
}
.job-ring::before { content: ""; position: absolute; inset: var(--bw); border-radius: 50%; background: var(--card); }
.job-ring > span { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.job-ring b { color: var(--green-800); font-size: 13.5px; font-weight: 800; }
.job-ring small { color: var(--muted); font-size: 12px; }
.job-ring.big { --sz: 132px; --bw: 14px; }
.job-ring.big b { font-size: 28px; }
.job-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.job-progress .grow { flex: 1; min-width: 190px; display: grid; gap: 6px; }
.job-progress h3 { margin: 0; }
.job-agreement-title { display: flex; align-items: center; gap: 8px; }
.job-agreement-title .ic { color: var(--gold-dark); }
.job-range input[type="range"] { padding: 0; border: 0; box-shadow: none; accent-color: var(--green-700); min-height: 32px; }
.job-range label { display: flex; justify-content: space-between; gap: 8px; }
.job-range label b { color: var(--gold-dark); }
.jobs-filters { margin-bottom: 4px; }
.jobs-filters .toolbar { margin: 4px 0 8px; }
.jobs-select {
  flex: 1 1 150px; min-width: 0; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer;
}
.jobs-select:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 167, 44, .2); }
.jobs-count { margin: 2px 2px 10px; }
.jobs-pad { padding-bottom: 76px; }


/* ── Marché (market.js) ── */
/* ── Marché (screens/market.js) ── */
.mk-toolbar .chips { padding-bottom: 2px; }
.mk-kinds .chip { display: inline-flex; align-items: center; gap: 5px; }
.mk-kinds .chip .ic { font-size: 18px; }
.mk-pad { padding-bottom: 76px; margin-top: 4px; }

/* Grille d'annonces : 2 colonnes sur téléphone, comme sur Android. */
.mk-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
@media (max-width: 520px) { .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.mk-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); color: inherit; text-decoration: none !important; transition: border-color .15s, transform .15s;
}
.mk-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.mk-media { position: relative; }
.mk-media .mk-visual { aspect-ratio: 1.35; }
.mk-cond {
  position: absolute; top: 8px; inset-inline-start: 8px; padding: 1px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--gold-dark);
}
.mk-cond.new { background: var(--green-700); }
.mk-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px 12px; }
.mk-body h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.45; min-height: 2.9em; }
.mk-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-price { color: var(--green-800); font-weight: 800; font-size: 16px; }
.mk-price.big { color: var(--gold-dark); font-size: 28px; line-height: 1.2; }
.mk-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.mk-title { margin: 0; font-size: 22px; font-weight: 800; color: var(--green-900); }

/* Visuel : photo, sinon icône de la catégorie sur fond teinté. */
.mk-visual {
  --tint: var(--green-700);
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--tint);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 18%, #fff), var(--gold-soft));
}
.mk-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-visual .ic { font-size: 54px; }
.mk-visual.mk-hero { height: 260px; border-radius: 18px; border: 1px solid var(--line); }
.mk-visual.mk-hero .ic { font-size: 84px; }
.mk-visual.mini { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; }
.mk-visual.mini .ic { font-size: 28px; }
.mk-detector { --tint: #1D5FBF; }
.mk-vehicle { --tint: #7C3AED; }
.mk-machinery { --tint: #B45309; }
.mk-ore { --tint: #92400E; }
.mk-land { --tint: #065F46; }
.mk-safety { --tint: #C62828; }
@media (max-width: 520px) { .mk-visual.mk-hero { height: 210px; } }

/* Photo du formulaire d'annonce. */
.mk-photo { position: relative; }
.mk-photo-btn {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 150px; padding: 0; overflow: hidden;
  border: 2px dashed var(--green-700); border-radius: 18px; background: var(--green-50); color: var(--green-700); font: inherit; cursor: pointer;
}
.mk-photo-btn:hover, .mk-photo-btn:focus-visible { border-color: var(--gold); outline: 0; }
.mk-photo-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-photo-btn.busy img { opacity: .55; }
.mk-photo-btn.busy::after {
  content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .7); border-top-color: var(--green-700); animation: spin .8s linear infinite;
}
.mk-photo-empty { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.mk-photo-empty .ic { font-size: 30px; }
.mk-photo-change {
  position: absolute; bottom: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px;
  border-radius: 999px; background: rgba(10, 58, 34, .8); color: #fff; font-size: 13px; font-weight: 600;
}
.mk-photo-change .ic { font-size: 17px; }
.mk-photo-clear { position: absolute; top: 8px; inset-inline-end: 8px; width: 36px; height: 36px; background: rgba(10, 58, 34, .8); color: #fff; }
.mk-photo-clear:hover { background: var(--red); }
.mk-price-fields .check { align-self: center; min-height: 44px; }
.mk-kind-pill .ic { font-size: 16px; }


/* ── Annuaires (directory.js) ── */
/* ── Annuaires (screens/directory.js) ── */
/* Couleur de catégorie fournie par l'API (`--c`) : tuile d'icône et puce teintées. */
.dir-tile, .dir-pill { color: var(--c, var(--green-700)); background: rgba(20, 101, 60, .1); background: color-mix(in srgb, var(--c, var(--green-700)) 13%, #fff); }
.dir-tile-lg { width: 64px; height: 64px; border-radius: 18px; }
.dir-tile-lg .ic { font-size: 34px; }
/* Ligne d'annuaire : lien vers la fiche + bouton d'appel séparé (pas de lien imbriqué). */
.dir-row { padding: 0; gap: 0; }
.dir-row .dir-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 12px 14px; color: inherit; text-decoration: none; }
.dir-row .dir-call { flex-shrink: 0; color: var(--green-700); margin-inline-end: 6px; }
.dir-row .dir-call:hover { background: var(--green-50); }
.dir-count { margin: 0 2px 8px; min-height: 1em; }
.dir-busy { opacity: .55; transition: opacity .15s; pointer-events: none; }
/* Fiche */
.dir-head .grow { flex: 1; min-width: 0; }
.dir-head h2 { overflow-wrap: anywhere; margin-bottom: 4px; }
.dir-gap, .dir-cover { margin-top: 14px; }
.dir-gap .stack > .card + .card { margin-top: 0; }
.dir-contact .contact-bar { margin-top: 0; }
.dir-fuel-line { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.dir-fuel-line .ic { color: var(--green-700); }
.dir-fuel-line.orange .ic { color: var(--orange); }
.dir-fuel-line.red .ic { color: var(--red); }
.dir-fuel-line.gray .ic { color: var(--muted); }


/* ── Services religieux (religious.js) ── */
/* ── Services religieux (screens/religious.js) ── */
.rel-banner { display: flex; align-items: center; gap: 14px; }
.rel-banner > .ic { font-size: 56px; color: var(--gold-light); flex-shrink: 0; }
.rel-verse { color: var(--gold-light); font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.rel-intro { color: rgba(255, 255, 255, .9); font-size: 14.5px; margin: 0; }
.rel-actions { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0; }
@media (min-width: 900px) { .rel-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rel-action {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink); font-weight: 700; line-height: 1.35; text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s;
}
.rel-action:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.rel-action .icon-tile { width: 42px; height: 42px; }
.rel-pane { margin-top: 6px; }
.rel-list > .card + .card { margin-top: 0; }
.rel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rel-head .grow { flex: 1; min-width: 0; }
.rel-card .rel-head h3 { margin: 0; }
.rel-card .rel-q { margin: 10px 0 0; color: var(--green-900); font-size: 16px; }
.rel-a { margin: 0; }
.rel-by { margin: 4px 0 0; }
.rel-ref { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--blue); }
.rel-ref .ic { font-size: 18px; }
.rel-meta { margin-top: 10px; align-items: center; gap: 6px 14px; }
.rel-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.rel-meta .ic { font-size: 18px; color: var(--green-700); }
.rel-notes { margin: 8px 0 0; }
.rel-form { max-width: 720px; }


/* ── Urgences et sécurité (emergency.js) ── */
/* ── Urgences (js/screens/emergency.js) ── */
.sev-critical { --sev: var(--red-dark); }
.sev-high { --sev: var(--red); }
.sev-medium { --sev: var(--orange); }
.sev-low { --sev: var(--gold-dark); }
.icon-tile.sev { background: var(--sev, var(--red)); color: #fff; }

/* Accueil : SOS + appels rapides */
.em-top { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .em-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.em-sos { display: flex; flex-direction: column; gap: 8px; }
.em-sos .sos-big { min-height: 150px; }
.em-sos-txt { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.em-sos-txt b { font-size: 42px; letter-spacing: .08em; }
.em-sos-txt small { font-size: 16px; font-weight: 700; opacity: .95; }
.em-sos .sos-big .ic { font-size: 54px; }
.sos-big.pulse { animation: sos-pulse 1.8s ease-in-out infinite; }
@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(198, 40, 40, .4), 0 0 0 0 rgba(198, 40, 40, .35); }
  50% { box-shadow: 0 10px 26px rgba(198, 40, 40, .4), 0 0 0 12px rgba(198, 40, 40, 0); }
}
@media (prefers-reduced-motion: reduce) { .sos-big.pulse { animation: none; } }

.dial-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dial-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.dial {
  display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; border-radius: 16px;
  background: var(--tone, var(--red)); color: #fff; text-decoration: none !important; transition: filter .15s;
}
.dial:hover { filter: brightness(1.08); }
.dial .ic { font-size: 28px; }
.dial .grow { flex: 1; min-width: 0; }
.dial b { display: block; font-size: 15px; line-height: 1.3; }
.dial small { display: block; font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dial .km { color: var(--gold-light); font-size: 12.5px; font-weight: 700; white-space: nowrap; align-self: flex-start; }
.dial[aria-disabled="true"] { opacity: .55; cursor: default; }
.dial.red { --tone: var(--red); }
.dial.blue { --tone: var(--blue); }
.dial.navy { --tone: #1E3A8A; }
.dial.gold { --tone: var(--gold-dark); }
.dial.water { --tone: #0E7490; }

.kind-grid { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 900px) { .kind-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.kind-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 4px; min-height: 76px;
  background: #fff; border: 1px solid rgba(198, 40, 40, .2); border-radius: 16px; color: var(--ink); text-align: center;
  font-size: 12.5px; font-weight: 600; line-height: 1.35; text-decoration: none !important; transition: border-color .15s;
}
.kind-tile .ic { color: var(--red); font-size: 26px; }
.kind-tile:hover { border-color: var(--red); }
.em-cols { margin-top: 6px; }

/* File locale des signalements */
.em-pending { border-color: rgba(224, 123, 18, .5); background: #FFF8EF; margin-bottom: 16px; }
.em-pending-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; color: #8A4B07; }
.em-pending-head .ic { color: var(--orange); }
.em-pending-head .grow { flex: 1; min-width: 180px; }
.pending-row { display: flex; align-items: center; gap: 10px; }
.pending-row .grow { flex: 1; min-width: 0; }

/* Alertes */
.alert-card {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 16px;
  background: var(--red-soft); border: 1px solid rgba(198, 40, 40, .25);
}
.alert-card .bubble {
  width: 36px; height: 36px; border-radius: 50%; background: var(--sev, var(--red)); color: #fff; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.alert-card .bubble .ic { font-size: 20px; }
.alert-card .grow { flex: 1; min-width: 0; }
.alert-card b { display: block; color: var(--red-dark); }
.alert-card p { margin: 2px 0 6px; font-size: 14px; }
.alert-card .meta-wrap { align-items: center; }
.alert-card .meta-wrap a .ic { font-size: 16px; }
.alert-card.expired { background: #fff; border-color: var(--line); opacity: .8; }
.em-alerts { margin-top: 4px; }

/* Formulaire de signalement / de victime */
.em-form { max-width: 820px; }
.em-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--green-50); }
.em-victims { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.em-victims > .ic { color: var(--red); }
.em-victims label { font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper .icon-btn { border: 1px solid var(--line); background: #fff; color: var(--green-800); width: 38px; height: 38px; }
.stepper .icon-btn:hover { background: var(--green-100); }
.stepper input {
  width: 64px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; text-align: center;
  font-size: 20px; font-weight: 800; color: var(--red); background: #fff;
}
.em-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); cursor: pointer; font-weight: 600; }
.em-toggle .ic { color: var(--red); }
.em-toggle .grow { flex: 1; }
.em-toggle input { width: 22px; height: 22px; accent-color: var(--red); }
#loc-box .info-row { border-bottom: 0; padding-top: 2px; }
.em-vloc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 44px; }
.em-form .detail-head { padding-bottom: 4px; border-bottom: 1px solid var(--line); }

/* Résultat (signalement gardé hors connexion) */
.em-result { max-width: 680px; margin: 0 auto; text-align: center; }
.em-result-ic .ic { color: var(--orange); }
.em-result h2 { font-size: 21px; color: var(--green-900); margin: 4px 0; }
.em-result .notice { text-align: start; margin: 10px 0; }
.em-result-actions { justify-content: center; margin-top: 12px; }
.em-result-dials { max-width: 680px; margin: 0 auto; }

/* Détail d'un signalement */
.incident-head {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, var(--sev, var(--red)), var(--red-dark));
}
.incident-head .bubble {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .16); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.incident-head .bubble .ic { font-size: 28px; }
.incident-head .grow { flex: 1; min-width: 0; }
.incident-head small { font-weight: 600; opacity: .85; }
.incident-head h2 { color: #fff; font-size: 22px; margin: 2px 0; overflow-wrap: anywhere; }
.incident-head .pill { background: rgba(255, 255, 255, .18); color: #fff; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.steps .dot {
  width: 24px; height: 24px; border-radius: 50%; background: var(--line); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.steps .dot .ic { font-size: 16px; color: #fff; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--green-700); }
.steps li.current { font-weight: 800; }
.em-lock { display: flex; align-items: center; gap: 8px; }
.em-lock .ic { color: var(--gold-dark); }
.victim-row { align-items: flex-start; }
.victim-row .kv { margin-top: 6px; gap: 2px 12px; }
.victim-row .title { white-space: normal; }
