/* GOdriving — compléments d'interface */

.note svg{width:18px;height:18px;vertical-align:-4px;margin-right:5px}
.note .ml{vertical-align:middle}

/* Icônes isolées dans un paragraphe */
p svg,span svg,div svg,li svg{flex:0 0 auto}
.empty svg{width:52px;height:52px;color:var(--line);margin:0 auto 12px;display:block}
.stat-ico svg{width:20px;height:20px;color:var(--brand-dark)}
.row-ico svg{width:20px;height:20px;color:var(--brand-dark)}
.si-ico svg{width:19px;height:19px;color:var(--brand-dark)}
.ac-item svg{width:18px;height:18px;color:var(--brand);flex:0 0 auto}
.vehicle-card .vic svg{width:26px;height:26px;color:var(--ink-2)}
.quick svg{width:15px;height:15px}
.badge svg{width:13px;height:13px}
.chip svg{width:15px;height:15px}
.row-che svg{width:18px;height:18px}
.composer button svg{width:21px;height:21px}
.icon-btn svg{width:20px;height:20px}
.ap-input .ap-ico svg{width:22px;height:22px;color:var(--muted)}
.float-btn svg{width:22px;height:22px;color:var(--ink)}
.login-logo svg{width:42px;height:42px}
.brand-logo svg{width:20px;height:20px}
.navbar a svg{width:23px;height:23px}
.alert svg{width:19px;height:19px;flex:0 0 auto;margin-top:1px}
.btn svg{width:20px;height:20px;flex:0 0 auto}
.star-input svg{width:32px;height:32px}

/* Sécurité : un SVG sans attribut ne doit jamais envahir un bloc */
.card > svg:only-child{max-width:32px;max-height:32px}

/* Grands chiffres du hero et bandeaux de statistiques : empilés sur mobile */
@media (max-width:767px){
  .grid-4{grid-template-columns:1fr 1fr}
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
}
@media (max-width:400px){
  .grid-4{grid-template-columns:1fr 1fr}
}

/* Barres de filtres horizontales */
.filter-bar{display:flex;gap:8px;overflow-x:auto;padding:4px 0;scrollbar-width:none}
.filter-bar::-webkit-scrollbar{display:none}

/* Tableaux (administration) */
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th,.table td{text-align:left;padding:9px 10px;border-bottom:1px solid var(--line-2);white-space:nowrap}
.table thead th{color:var(--muted);font-weight:700;font-size:11.5px;text-transform:uppercase;letter-spacing:.03em}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
@media (max-width:767px){
  .table-wrap .table{font-size:12px}
  .table th,.table td{padding:8px}
}

/* Badges de statut administration */
.badge-lg{padding:7px 12px;font-size:12.5px}

/* Graphiques */
.chart-box{position:relative;height:220px;width:100%}

/* Détail trajet : tour de route */
.timeline{position:relative;padding-left:26px}
.timeline::before{content:'';position:absolute;left:7px;top:8px;bottom:8px;width:2px;background:var(--line)}
.timeline .tl{position:relative;margin-bottom:16px}
.timeline .tl:last-child{margin-bottom:0}
.timeline .tl::before{content:'';position:absolute;left:-24px;top:5px;width:12px;height:12px;border-radius:50%;background:#fff;border:3px solid var(--brand)}
.timeline .tl.end::before{border-radius:3px;border-color:var(--ink);background:var(--ink)}

/* Bandeau d'état */
.banner{border-radius:var(--radius);padding:14px 16px;display:flex;gap:12px;align-items:center;margin-bottom:14px}
.banner-ok{background:var(--brand-soft);color:var(--brand-ink)}
.banner-warn{background:var(--warn-soft);color:#8A5A00}
.banner-err{background:var(--danger-soft);color:#9B2C30}

/* Zone d'installation */
.install-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}

/* Séparateur de section avec titre */
.section-sep{display:flex;align-items:center;gap:12px;margin:22px 0 12px}
.section-sep h2{font-size:17px;white-space:nowrap}
.section-sep::after{content:'';flex:1;height:1px;background:var(--line)}

/* Mobile : jamais de débordement horizontal */
img,svg,video{max-width:100%}
.table-wrap{max-width:100%}

/* Barre d'onglets admin */
.adm-tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.adm-tabs::-webkit-scrollbar{display:none}

/* ---------- Carte : marqueurs ---------- */
.mpin{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:#fff;color:var(--ink);font-weight:800;font-size:14px;
  border-radius:14px 14px 14px 4px;box-shadow:0 3px 12px rgba(14,27,44,.25);
  border:2px solid var(--brand);width:52px;height:34px;line-height:1;
}
.mpin small{font-size:8px;font-weight:700;color:var(--muted);letter-spacing:.02em}
.mpin.pin-full{border-color:var(--muted)}
.mpin.pin-full small{color:var(--muted)}
.mpoint{width:16px;height:16px;border-radius:50%;background:#fff;border:4px solid var(--brand);box-shadow:0 2px 8px rgba(0,0,0,.25)}
.mpoint.end{border-radius:4px;border-color:var(--accent);background:var(--accent)}
.mme{width:18px;height:18px;border-radius:50%;background:#2E7CF6;border:4px solid #fff;box-shadow:0 2px 10px rgba(46,124,246,.5)}
.mpop{min-width:170px;font-family:var(--font)}
.mpop b{font-size:13.5px;display:block;margin-bottom:4px}
.mpop-row{font-size:12.5px;color:#6B7A8C}
.mpop-btn{display:block;margin-top:8px;background:var(--brand);color:#fff;text-align:center;padding:8px;border-radius:10px;font-weight:700;font-size:13px}
.mpop-link{
  display:flex;align-items:center;justify-content:center;gap:6px;
  margin-top:6px;padding:7px;border:1px solid var(--line);border-radius:10px;
  font-weight:650;font-size:12.5px;border-bottom:1px solid var(--line);
}
.leaflet-popup-content{margin:12px 14px}
.leaflet-container a.leaflet-popup-close-button{color:#6B7A8C}

/* ---------- Mode carte plein écran ---------- */
body.mapmode{background:#DDE6ED}
body.mapmode .map-wrap{position:fixed;inset:0;height:100vh;width:100%}
body.mapmode .appbar{position:fixed;top:0;left:0;right:0;z-index:65;background:transparent;border:none;backdrop-filter:none;-webkit-backdrop-filter:none}
body.mapmode .appbar-row{background:rgba(255,255,255,.95);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-radius:16px;padding:8px 10px;box-shadow:var(--shadow)}
body.mapmode .sheet{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));transition:max-height .26s ease}
body.mapmode .sheet.collapsed{max-height:96px;overflow:hidden}
.sheet-head{display:flex;align-items:center;gap:10px;padding:0 16px 10px}
.sheet-head h2{font-size:17px;flex:1}
.sheet-grab{cursor:pointer}
body.mapmode .map-actions{position:fixed;right:14px;bottom:calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));z-index:70;display:flex;flex-direction:column;gap:10px}
body.mapmode .map-actions .float-btn{position:static}
.result-count{background:var(--accent);color:#fff;border-radius:99px;padding:9px 15px;font-size:13px;font-weight:700;border:none;box-shadow:var(--shadow-lg);cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:transform .12s}
.result-count:active{transform:scale(.96)}
.near-list{max-height:34vh;overflow-y:auto;margin:0 -4px;padding:0 4px}
.role-hint{background:var(--accent);color:#fff;border-radius:14px;padding:12px 14px;font-size:13px;display:flex;gap:10px;align-items:center}

/* ---------- Notifications ---------- */
.notif-row.unread{background:var(--brand-soft)}
.notif-row.unread .row-t{font-weight:800}

/* ---------- Avis ---------- */
.review-card{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--line-2)}
.review-card:last-child{border-bottom:none}
.rate-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* ---------- Navigation administration (7 onglets) ---------- */
.navbar-inner.adm a{font-size:9.5px;gap:2px}
.navbar-inner.adm a .pill{padding:5px 11px}
.navbar-inner.adm a svg{width:21px;height:21px}
.navdot{position:absolute;margin-top:-13px;margin-left:13px;width:8px;height:8px;border-radius:50%;background:var(--warn);border:1.5px solid #fff}
.navbar-inner.adm a .pill{position:relative}

/* Icône d'état dans les statistiques admin */
.stat-ico.alt{background:var(--line-2)}
.stat-ico.alt svg{color:var(--ink-2)}

/* Boutons flottants de la carte : placés sous l'en-tête pour ne jamais
   se superposer au panneau glissant du bas */
body.mapmode .map-actions{
  left:auto;right:14px;
  top:calc(env(safe-area-inset-top,0px) + 78px);
  bottom:auto;
}

/* Barre de saisie d'un message : posée AU-DESSUS de la navigation du bas,
   pour que les onglets restent toujours accessibles */
.composer{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));border-radius:16px 16px 0 0;box-shadow:0 -6px 22px rgba(14,27,44,.10)}

/* ---------- Adresse cliquable : ouvre Google Maps ---------- */
.addr-link{
  display:inline-flex;align-items:center;gap:5px;
  color:var(--brand-dark);text-decoration:none;cursor:pointer;
  border-bottom:1px dashed rgba(0,140,63,.45);padding-bottom:1px;
}
.addr-link:active{opacity:.6}
.addr-link svg{width:13px;height:13px;flex:0 0 auto;opacity:.85}
/* Dans une carte de trajet, le bloc entier est déjà un lien :
   on retire tout soulignement parasite de la ligne d'adresse */
.route-places .rp-sub .addr-link,
.timeline .addr-link{border-bottom-style:dotted}
.timeline .addr-link{font-size:12.5px}
/* Bouton d'itinéraire Google Maps */
.gmaps-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  width:100%;margin-top:12px;padding:11px 14px;
  background:#fff;color:var(--ink);border:1px solid var(--line);
  border-radius:12px;font-weight:650;font-size:14px;text-decoration:none;
  box-shadow:0 2px 8px rgba(15,15,26,.06);
}
.gmaps-btn:active{transform:scale(.99)}
.gmaps-btn svg{width:17px;height:17px;color:var(--brand-dark)}
