/* ========== Charte Union des Commercants - Grande-Synthe ========== */
:root {
  --vert: #AEC72D;
  --bleu: #33A9DA;
  --magenta: #C63A78;
  --orange: #ED8A12;
  --jaune: #FDD500;
  --encre: #1A1A1A;
  --blanc: #FFFFFF;
  --gris: #6B7280;
  --gris-clair: #F3F4F6;
  --gris-bord: #E5E7EB;
  --radius: 18px;
  --radius-sm: 12px;
  --ombre: 0 6px 22px rgba(26, 26, 26, .08);
  --ombre-fort: 0 10px 30px rgba(26, 26, 26, .14);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--blanc);
  color: var(--encre);
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: contain;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ====== Structure ====== */
#app { min-height: 100%; padding-bottom: calc(78px + var(--safe-bottom)); }
.screen { display: none; padding: 16px 16px 24px; max-width: 720px; margin: 0 auto; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ====== En-tete multicolore (moment fete) ====== */
.appbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-bord);
}
.appbar .bar-band { height: 5px; display: flex; }
.appbar .bar-band i { flex: 1; }
.appbar .bar-band i:nth-child(1){ background: var(--vert); }
.appbar .bar-band i:nth-child(2){ background: var(--magenta); }
.appbar .bar-band i:nth-child(3){ background: var(--bleu); }
.appbar .bar-band i:nth-child(4){ background: var(--orange); }
.appbar .bar-band i:nth-child(5){ background: var(--jaune); }
.appbar .bar-inner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 720px; margin: 0 auto; }
.appbar .logo { width: 38px; height: 38px; flex: 0 0 auto; }
.appbar h1 { font-size: 16px; font-weight: 800; letter-spacing: .3px; line-height: 1.1; }
.appbar h1 small { display: block; font-size: 11px; font-weight: 600; color: var(--gris); letter-spacing: .5px; text-transform: uppercase; }

/* ====== Titres ====== */
.screen h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.screen .sub { color: var(--gris); font-size: 14px; margin-bottom: 18px; }
.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--gris); margin: 22px 0 10px; }

/* ====== Cartes / blocs ====== */
.card {
  background: var(--blanc); border: 1px solid var(--gris-bord);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--ombre); margin-bottom: 14px;
}
.card.flat { box-shadow: none; }

/* ====== Boutons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 18px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700; background: var(--encre); color: var(--blanc);
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn.vert { background: var(--vert); color: var(--encre); }
.btn.bleu { background: var(--bleu); color: var(--blanc); }
.btn.magenta { background: var(--magenta); color: var(--blanc); }
.btn.orange { background: var(--orange); color: var(--blanc); }
.btn.ghost { background: var(--gris-clair); color: var(--encre); }
.btn.outline { background: transparent; border: 2px solid var(--gris-bord); color: var(--encre); }
.btn.sm { width: auto; padding: 10px 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ====== Progression segmentee (5 traits comme le logo) ====== */
.progress { margin: 8px 0 4px; }
.progress .seg { display: flex; gap: 4px; height: 10px; border-radius: 6px; overflow: hidden; }
.progress .seg b { flex: 1; background: var(--gris-bord); transition: background .3s ease; }
.progress .seg b.on:nth-child(5n+1){ background: var(--vert); }
.progress .seg b.on:nth-child(5n+2){ background: var(--magenta); }
.progress .seg b.on:nth-child(5n+3){ background: var(--bleu); }
.progress .seg b.on:nth-child(5n+4){ background: var(--orange); }
.progress .seg b.on:nth-child(5n+5){ background: var(--jaune); }
.progress .pct { display: flex; justify-content: space-between; font-size: 13px; color: var(--gris); margin-top: 8px; font-weight: 600; }
.progress .pct b { color: var(--encre); font-weight: 800; }

/* ====== Stat chips ====== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--gris-clair); border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; }
.stat .n { font-size: 26px; font-weight: 800; line-height: 1; }
.stat .l { font-size: 11px; color: var(--gris); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* ====== Liste commercants ====== */
.merchant {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--gris-bord);
  border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--blanc); width: 100%; text-align: left;
}
.merchant:active { background: var(--gris-clair); }
.merchant .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.merchant .info { flex: 1; min-width: 0; }
.merchant .info .name { display: block; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merchant .info .meta { display: block; font-size: 13px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merchant .tag { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 20px; white-space: nowrap; }
.tag.visite { background: rgba(174,199,45,.18); color: #5c6b10; }
.tag.a_visiter { background: var(--gris-clair); color: var(--gris); }
.tag.absent { background: rgba(198,58,120,.14); color: var(--magenta); }
.tag.reporte { background: rgba(237,138,18,.16); color: #9a5800; }

/* ====== Recherche ====== */
.search { position: relative; margin-bottom: 14px; }
.search input {
  width: 100%; padding: 14px 14px 14px 42px; border: 1px solid var(--gris-bord);
  border-radius: var(--radius-sm); font-size: 15px; background: var(--gris-clair);
}
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gris); }

/* ====== Carte ====== */
/* isolation: isolate cree un contexte d'empilement propre a la carte :
   les couches internes de Leaflet (z-index jusqu'a 1000) restent confinees
   dedans et ne passent plus au-dessus de la modale. */
#map { width: 100%; height: calc(100vh - 250px); height: calc(100dvh - 250px); min-height: 340px; border-radius: var(--radius); border: 1px solid var(--gris-bord); position: relative; z-index: 0; isolation: isolate; }
.map-screen { padding: 0; max-width: none; }
.map-top { padding: 12px 16px; }
.next-stop {
  margin: 12px 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--encre); color: var(--blanc);
  display: flex; align-items: center; gap: 12px; box-shadow: var(--ombre-fort);
}
.next-stop .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--vert); color: var(--encre); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.next-stop .info { flex: 1; min-width: 0; }
.next-stop .info .l { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.next-stop .info .n { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-stop .info .d { font-size: 13px; opacity: .8; }
.next-stop a.go { background: var(--vert); color: var(--encre); padding: 10px 12px; border-radius: 10px; font-weight: 800; text-decoration: none; font-size: 13px; }

/* ====== Questionnaire ====== */
.quiz-wrap { max-width: 560px; margin: 0 auto; }
.quiz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.quiz-head .step { font-size: 13px; font-weight: 700; color: var(--gris); }
.quiz-head .close { width: 38px; height: 38px; border-radius: 50%; background: var(--gris-clair); display: flex; align-items: center; justify-content: center; }
.quiz-q { font-size: 24px; font-weight: 800; margin: 18px 0 6px; line-height: 1.2; }
.quiz-help { color: var(--gris); font-size: 14px; margin-bottom: 18px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 17px 16px;
  border: 2px solid var(--gris-bord); border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 16px; font-weight: 600; background: var(--blanc);
  transition: border-color .12s, background .12s;
}
.opt .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gris-bord); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.opt.multi .mark { border-radius: 7px; }
.opt.sel { border-color: var(--vert); background: rgba(174,199,45,.10); }
.opt.sel .mark { background: var(--vert); border-color: var(--vert); }
.opt.sel .mark svg { width: 15px; height: 15px; color: var(--encre); }
.scale { display: flex; gap: 8px; margin: 10px 0; }
.scale button { flex: 1; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--gris-bord); font-size: 20px; font-weight: 800; background: var(--blanc); }
.scale button.sel { border-color: var(--bleu); background: var(--bleu); color: var(--blanc); }
.scale-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--gris); }
.txt-field { position: relative; }
.txt-field textarea {
  width: 100%; min-height: 110px; padding: 14px 14px 14px; border: 2px solid var(--gris-bord);
  border-radius: var(--radius-sm); font-size: 16px; font-family: inherit; resize: vertical;
}
.mic {
  position: absolute; right: 10px; bottom: 10px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--magenta); color: var(--blanc); display: flex; align-items: center; justify-content: center; box-shadow: var(--ombre);
}
.mic.rec { animation: pulse 1s infinite; background: var(--orange); }
@keyframes pulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.08);} }
.quiz-foot { position: sticky; bottom: 0; padding: 14px 0 calc(8px + var(--safe-bottom)); background: linear-gradient(transparent, var(--blanc) 30%); }

/* ====== Besoins (synthese) ====== */
.need { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.need .bar { flex: 1; height: 30px; background: var(--gris-clair); border-radius: 8px; overflow: hidden; position: relative; }
.need .bar i { display: block; height: 100%; background: var(--bleu); border-radius: 8px; }
.need .lbl { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; }
.need .cnt { font-weight: 800; min-width: 28px; text-align: right; }

/* ====== Empty / loaders ====== */
.empty { text-align: center; padding: 40px 20px; color: var(--gris); }
.empty svg { width: 54px; height: 54px; opacity: .5; margin-bottom: 12px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--gris-bord); border-top-color: var(--encre); border-radius: 50%; animation: spin 1s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== Toast ====== */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--encre); color: var(--blanc); padding: 12px 18px; border-radius: 30px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 1300; max-width: 90%; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { background: var(--vert); color: var(--encre); }
#toast.err { background: var(--magenta); }

/* ====== Barre de navigation basse ====== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--blanc); border-top: 1px solid var(--gris-bord);
  display: flex; padding: 8px 6px calc(8px + var(--safe-bottom)); box-shadow: 0 -4px 18px rgba(26,26,26,.05);
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--gris); padding: 4px;
}
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.active { color: var(--encre); }
.tabbar button.active svg { color: var(--vert); }

/* ====== Modale fiche commercant ====== */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(26,26,26,.45); z-index: 1200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1201; background: var(--blanc);
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(20px + var(--safe-bottom)); transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1); max-height: 88vh; overflow-y: auto; box-shadow: var(--ombre-fort); max-width: 720px; margin: 0 auto;
}
.sheet.show { transform: translateY(0); }
.sheet .grab { width: 40px; height: 5px; background: var(--gris-bord); border-radius: 5px; margin: 6px auto 14px; }
.sheet h3 { font-size: 21px; font-weight: 800; }
.sheet .cat-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 20px; background: var(--gris-clair); margin: 6px 0 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--gris-bord); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: var(--blanc);
}
.status-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.status-pick button { padding: 12px; border-radius: 10px; border: 2px solid var(--gris-bord); font-weight: 700; font-size: 13px; background: var(--blanc); }
.status-pick button.sel { border-color: var(--encre); background: var(--encre); color: var(--blanc); }

.offline-banner { display: none; background: var(--orange); color: var(--blanc); text-align: center; font-size: 13px; font-weight: 700; padding: 6px; }
.offline-banner.show { display: block; }

/* ====== Connexion ====== */
.login-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--gris-clair); z-index: 200; }
.login-card { position: relative; background: var(--blanc); border-radius: 22px; box-shadow: var(--ombre-fort); padding: 34px 24px 28px; width: 100%; max-width: 400px; text-align: center; overflow: hidden; }
.login-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(110deg, var(--vert), var(--bleu) 33%, var(--magenta) 66%, var(--orange)); }
.login-logo { width: 72px; height: 72px; margin: 0 auto 12px; }
.login-card h1 { font-size: 22px; font-weight: 800; }
.login-sub { color: var(--gris); font-size: 13px; margin-bottom: 20px; }
.login-card .field { text-align: left; }
.login-err { color: var(--magenta); font-size: 13px; font-weight: 700; min-height: 18px; margin-bottom: 6px; }
.login-foot { margin-top: 16px; font-size: 13px; }
.login-foot a { color: var(--gris); }

/* ====== Avatar / compte ====== */
.bar-inner .avatar { margin-left: auto; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--encre); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; background: var(--magenta); }
.acc-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.acc-name { font-weight: 800; font-size: 17px; }
.acc-role { color: var(--magenta); font-weight: 700; font-size: 13px; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 12px; border-radius: 12px; background: var(--blanc); font-size: 15px; font-weight: 600; }
.menu button:active { background: var(--gris-clair); }
.menu button svg { width: 20px; height: 20px; color: var(--gris); flex: 0 0 auto; }
.menu button span { flex: 1; }
.menu button svg:last-child { width: 18px; color: var(--gris-bord); }
.sub-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gris); padding: 6px 0; margin-bottom: 4px; }
.sub-back svg { width: 18px; height: 18px; }
.muted-line { color: var(--gris); font-size: 14px; margin-bottom: 8px; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--gris-bord); }
.row-item small { display: block; color: var(--gris); font-size: 12px; }
.row-act { display: flex; gap: 6px; flex: 0 0 auto; }
.mini { padding: 8px 12px; border-radius: 9px; background: var(--gris-clair); font-weight: 700; font-size: 13px; }
.mini.danger { background: rgba(198,58,120,.12); color: var(--magenta); }
.mini-select { padding: 0 12px; border: 1px solid var(--gris-bord); border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--blanc); }
.mini-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.photo-row { display: flex; align-items: center; gap: 12px; }
.photo-prev { width: 84px; height: 64px; border-radius: 12px; background: var(--gris-clair); background-size: cover; background-position: center; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--gris); border: 1px solid var(--gris-bord); }
.photo-btn { cursor: pointer; }

/* ====== Besoins (qui dit quoi) ====== */
.need-item { border: 1px solid var(--gris-bord); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.need-item.open { border-color: var(--bleu); }
.need-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: var(--blanc); text-align: left; }
.need-bar { position: relative; width: 64px; height: 26px; background: var(--gris-clair); border-radius: 7px; overflow: hidden; flex: 0 0 auto; }
.need-bar i { display: block; height: 100%; }
.need-label { flex: 1; font-weight: 700; font-size: 14px; }
.need-count { font-weight: 800; min-width: 24px; text-align: right; }
.need-head svg { width: 18px; height: 18px; color: var(--gris); transition: transform .2s; }
.need-item.open .need-head svg { transform: rotate(90deg); }
.need-body { padding: 4px 8px 10px; background: var(--gris-clair); }
.need-merchant { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--gris-bord); }
.need-merchant:last-child { border-bottom: none; }
.nm-name { flex: 1; text-align: left; font-weight: 700; font-size: 14px; }
.nm-name small { display: block; color: var(--gris); font-weight: 500; font-size: 12px; }
.nm-call { width: 40px; height: 40px; border-radius: 50%; background: var(--vert); color: var(--encre); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nm-call svg { width: 18px; height: 18px; }

/* ====== Actions / taches ====== */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1px solid var(--gris-bord); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--blanc); }
.task.done { opacity: .6; }
.task-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gris-bord); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.task.doing .task-check { border-color: var(--orange); }
.task.done .task-check { background: var(--vert); border-color: var(--vert); }
.task-check svg { width: 15px; height: 15px; color: var(--encre); }
.task-main { flex: 1; text-align: left; min-width: 0; }
.task-title { font-weight: 700; font-size: 15px; }
.task.done .task-title { text-decoration: line-through; }
.task-meta { color: var(--gris); font-size: 13px; margin-top: 3px; }
.task-meta b { color: var(--encre); }

/* ====== Responsive mobile (espace bureau) ====== */
@media (max-width: 600px) {
  .screen { padding: 14px 12px 22px; }
  .appbar .bar-inner { padding: 10px 12px; gap: 10px; }
  .appbar .logo { width: 34px; height: 34px; }
  .appbar h1 { font-size: 14px; min-width: 0; }
  .appbar h1 small { font-size: 10px; }
  .screen h2 { font-size: 20px; }
  .stats { gap: 8px; }
  .stat { padding: 12px 6px; }
  .stat .n { font-size: 22px; }
  .stat .l { font-size: 10px; }
  .btn { padding: 14px 16px; font-size: 15px; }
  .tabbar button { font-size: 10px; }
  .tabbar button svg { width: 22px; height: 22px; }
  #map { height: calc(100vh - 230px); height: calc(100dvh - 230px); min-height: 300px; }
  .sheet { padding: 8px 14px calc(18px + var(--safe-bottom)); }
  .status-pick { grid-template-columns: repeat(2, 1fr); }
}
/* l'appbar doit laisser le titre se reduire sans pousser l'avatar hors ecran */
.appbar h1 { flex: 1; min-width: 0; overflow: hidden; }
.appbar h1 small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ====== Filtre Actions + badge perso ====== */
.tfilter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.tfilter .chip { padding: 8px 14px; border-radius: 100px; border: 1.5px solid var(--gris-bord); background: var(--blanc); font-size: 13px; font-weight: 700; }
.tfilter .chip.on { background: var(--encre); color: #fff; border-color: var(--encre); }
.me-badge { display: inline-block; margin-left: 8px; background: var(--vert); color: var(--encre); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 20px; vertical-align: middle; text-transform: uppercase; letter-spacing: .3px; }

/* ====== Mon espace (raccourcis par fonction) ====== */
.role-links { display: flex; flex-direction: column; gap: 8px; }
.role-link { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 12px; border-radius: 14px; background: var(--blanc); border: 1.5px solid var(--gris-bord); }
.role-link:active { background: var(--gris-clair); }
.role-link > svg:first-child { width: 22px; height: 22px; color: var(--encre); flex: 0 0 auto; }
.role-link span { flex: 1; display: block; }
.role-link b { display: block; font-size: 15px; font-weight: 700; }
.role-link small { display: block; color: var(--gris); font-size: 12px; margin-top: 1px; }
.role-link > svg:last-child { width: 18px; color: var(--gris-bord); flex: 0 0 auto; }
.hint { font-size: 12px; color: var(--gris); margin-top: 6px; }

/* ====== Guide d'utilisation ====== */
.guide > p { color: var(--gris); margin-bottom: 16px; font-size: 15px; }
.g-step { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.g-num { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.g-step b { font-size: 15px; }
.g-step p { color: var(--gris); font-size: 14px; margin-top: 3px; line-height: 1.5; }

/* ====== Layout DESKTOP / web (>=900px) : pas un telephone ====== */
@media (min-width: 900px) {
  #appRoot { display: flex; flex-direction: column; min-height: 100vh; }
  .appbar { order: 0; }
  .appbar .bar-inner { max-width: 960px; }
  /* la barre d'onglets passe en haut, horizontale */
  .tabbar { order: 1; position: static; flex-direction: row; justify-content: center; gap: 6px;
    border-top: none; border-bottom: 1px solid var(--gris-bord); box-shadow: none; padding: 8px 16px; }
  .tabbar button { width: auto; flex: 0 0 auto; flex-direction: row; gap: 8px; font-size: 14px; padding: 10px 18px; border-radius: 100px; }
  .tabbar button:hover { background: var(--gris-clair); }
  .tabbar button.active { background: var(--gris-clair); }
  .tabbar button svg { width: 20px; height: 20px; }
  #app { order: 2; padding-bottom: 50px; }
  .screen { max-width: 860px; padding-top: 26px; }
  #map { height: calc(100vh - 210px); min-height: 420px; }
  /* fenetres centrees facon web (au lieu de monter du bas) */
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 540px; max-width: calc(100vw - 48px);
    max-height: 88vh; border-radius: 22px; transform: translate(-50%, -50%) scale(.96); }
  .sheet.show { transform: translate(-50%, -50%); }
  .sheet .grab { display: none; }
}
