:root { --c0: #12355e; --c1: #1a3d6b; --c2: #2f6fc0; --c3: #1d4677; }
/* thèmes (Options → Thème) */
body.theme-sombre { --c0: #1b2430; --c1: #263241; --c2: #3d5a80; --c3: #2f3b4c; }
body.theme-vert { --c0: #0f5a4e; --c1: #13806f; --c2: #1e9c86; --c3: #116b5d; }
body.theme-gris { --c0: #2f3b46; --c1: #3e4c59; --c2: #5b7083; --c3: #364451; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; font-family: "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; color: #1e2a3a; }
.cache { display: none !important; }
button { font-family: inherit; cursor: pointer; }
.btn { border: 1px solid #ccd5e0; background: #f3f5f8; padding: 8px 14px; border-radius: 6px; font-weight: 600; }
.btn.bleu { background: var(--c2); color: #fff; border-color: var(--c2); }
.btn.rouge { background: #c62828; color: #fff; border-color: #c62828; }
.btn.vert { background: #2e9d4f; color: #fff; border-color: #2e9d4f; }
.btn:disabled { opacity: .5; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #ccd5e0; border-radius: 6px; }
.err { color: #c62828; min-height: 1em; }

/* login */
#login { position: fixed; inset: 0; background: #0f2a4a; display: flex; align-items: center; justify-content: center; }
.carte-login { background: #fff; padding: 32px; border-radius: 10px; width: 320px; display: flex; flex-direction: column; gap: 12px; }
.carte-login h1 { margin: 0 0 8px; text-align: center; color: var(--c1); letter-spacing: 1px; }
.logo-login { width: 240px; max-width: 100%; display: block; margin: 0 auto; }
.logo-sb { height: 44px; display: block; margin: 0 auto; }

/* layout */
#app { display: flex; height: 100vh; height: 100dvh; }   /* dvh : la barre d'adresse du téléphone ne cache plus le bas */
#sidebar { width: 300px; background: var(--c0); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; transition: margin .2s; }
#sidebar.ferme { margin-left: -300px; }
.sb-titre { padding: 14px; text-align: center; font-weight: 700; color: #b9cbe3; border-bottom: 1px solid var(--c3); }
#recherche { margin: 8px; background: #0d2848; border: 1px solid var(--c3); color: #fff; text-align: center; }
#filtre-statut { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px 8px; }
#filtre-statut button { flex: 1; background: var(--c3); color: #fff; border: 0; padding: 5px; border-radius: 4px; font-size: 12px; }
#filtre-statut button.actif { background: #2f8fd8; }
#liste { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
#liste li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #1a426f; cursor: pointer; }
#liste li:hover { background: #1a426f; }
#liste li.sel { background: #24558c; outline: 1px solid #5d8fd0; }
#liste .pastille { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid #fff3; }
#liste .nom { font-weight: 700; font-size: 13px; }
#liste .sous { font-size: 11px; color: #a8bdd8; }
#liste .age { margin-left: auto; font-size: 11px; color: #7f9cc4; white-space: nowrap; }
#liste input[type=checkbox] { width: 16px; height: 16px; }
.sb-bas { display: flex; justify-content: space-around; padding: 8px; border-top: 1px solid var(--c3); }
.sb-bas button { background: var(--c3); border: 0; color: #fff; font-size: 18px; width: 52px; height: 40px; border-radius: 6px; }

#principal { flex: 1; position: relative; display: flex; flex-direction: column; min-width: 0; }
#topbar { height: 50px; background: var(--c1); color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 10px; z-index: 1001; }
#topbar .ico { background: var(--c2); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 6px; font-size: 18px; position: relative; }
#titre-zone { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
#titre-vehicule { text-align: center; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#titre-marque:empty { display: none; }
.logo-veh { height: 30px; max-width: 64px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 4px; flex: none; }
.pastille-marque { flex: none; background: #fff; color: var(--c1); font-weight: 800; font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.lm-liste { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.lm-item { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 1px solid #dfe5ec; border-radius: 8px; padding: 6px; width: 90px; }
.lm-item img { height: 36px; max-width: 80px; object-fit: contain; }
.badge { position: absolute; top: -6px; right: -6px; background: #e53935; color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 5px; }
#carte { flex: 1; }

/* compteur & journée */
#compteur { position: absolute; left: 12px; bottom: 16px; z-index: 1000; background: color-mix(in srgb, var(--c1) 93%, transparent); color: #fff; border-radius: 10px; padding: 12px 16px; display: flex; gap: 16px; align-items: center; }
.cpt-vitesse { width: 86px; height: 86px; border-radius: 50%; border: 5px solid #5d8fd0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cpt-vitesse b { font-size: 26px; }
.cpt-info div { margin: 2px 0; font-size: 13px; }
#journee { position: absolute; right: 12px; bottom: 16px; z-index: 1000; background: color-mix(in srgb, var(--c1) 93%, transparent); color: #fff; border-radius: 10px; padding: 10px 12px; width: 420px; font-size: 12px; }
#journee td { padding: 2px 4px; }
#journee td:nth-child(even) { background: #fff; color: var(--c1); font-weight: 700; border-radius: 3px; text-align: right; }
.adresse { background: #fff; color: var(--c1); padding: 6px 8px; border-radius: 6px; font-weight: 600; margin-bottom: 6px; }
.j-date { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 0; }
.j-date button { background: #f2d94e; border: 0; border-radius: 4px; padding: 2px 10px; font-weight: 700; }
.j-date b { background: #f2d94e; color: var(--c1); padding: 2px 10px; border-radius: 4px; }

/* situation */
#situation { position: absolute; right: 12px; top: 64px; z-index: 1002; background: color-mix(in srgb, var(--c1) 95%, transparent); color: #fff; padding: 12px; border-radius: 10px; width: 380px; }
.sit-tete { font-weight: 700; display: flex; justify-content: space-between; }
.fermer { background: none; border: 0; color: #fff; font-size: 20px; }
.live { background: #f2e64e; color: #c62828; text-align: center; font-weight: 700; margin: 8px 0; border-radius: 3px; }
.grille2 { display: grid; grid-template-columns: 1fr 50px; gap: 6px; align-items: center; }
.grille2 b { text-align: center; border-radius: 4px; padding: 2px; color: #fff; }
.grille2 .v { background: #2e9d4f; } .grille2 .o { background: #f39c12; } .grille2 .r { background: #c62828; } .grille2 .g { background: #8a96a8; }

/* plein écran (actions / modules) */
.plein { position: absolute; top: 50px; left: 0; right: 0; bottom: 0; background: #fff; z-index: 1003; overflow-y: auto; padding: 20px 40px; }
#actions h3 { text-align: center; margin: 18px 0; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.tuiles a { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; font-size: 12px; font-weight: 700; color: #5a6575; text-align: center; }
.tuiles a i { font-style: normal; font-size: 30px; background: #1f4f91; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.tuiles a:hover i { background: var(--c2); }
.retour { position: absolute; right: 16px; top: 12px; background: var(--c2); color: #fff; border: 0; width: 36px; height: 36px; border-radius: 6px; font-size: 18px; }
.mod-tete { display: flex; justify-content: space-between; align-items: center; }
#mod-corps { max-width: 1000px; margin: 10px auto; }
.carte-blanche { border: 1px solid #e1e6ee; border-radius: 8px; padding: 16px; margin: 12px 0; }
.ligne { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.ligne label { min-width: 160px; font-weight: 600; }
.tableau { width: 100%; border-collapse: collapse; margin: 10px 0; }
.tableau th { background: var(--c1); color: #fff; padding: 6px; text-align: left; font-size: 12px; }
.tableau td { padding: 6px; border-bottom: 1px solid #e6eaf0; font-size: 13px; }
.tableau tr.total td { font-weight: 700; background: #f3f5f8; }
.choix-jour { display: flex; gap: 10px; }
.choix-jour button { flex: 1; }
.trajet-ligne { display: flex; align-items: center; gap: 14px; border: 1px solid #e1e6ee; border-radius: 8px; padding: 10px 14px; margin: 8px 0; }
.trajet-ligne .pt { width: 14px; height: 14px; border-radius: 50%; }
.barre { height: 18px; background: var(--c2); border-radius: 3px; min-width: 2px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.pill.r { background: #fde2e2; color: #c62828; } .pill.v { background: #dff3e5; color: #2e7d32; } .pill.o { background: #fff1d6; color: #b26a00; } .pill.g { background: #e9edf2; color: #5a6575; }
.notif { display: flex; gap: 10px; padding: 8px; border-bottom: 1px solid #eef1f5; cursor: pointer; }
.notif.nonlu { background: #f2f7ff; }
.notif small { color: #7a8596; }

/* panneau trajets sur la carte */
#panneau-trajets { position: absolute; left: 10px; top: 60px; bottom: 16px; width: 270px; z-index: 1002; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px #0003; display: flex; flex-direction: column; }
.pt-tete { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #e6eaf0; }
#pt-liste { overflow-y: auto; padding: 8px; flex: 1; min-height: 0; }
#panneau-trajets.reduit { bottom: auto !important; height: auto !important; }
#panneau-trajets.reduit #pt-liste { display: none; }
.pt-poignee { display: none; height: 22px; flex: none; cursor: ns-resize; touch-action: none; position: relative; }
.pt-poignee::before { content: ""; position: absolute; left: 50%; top: 8px; width: 46px; height: 5px; margin-left: -23px; border-radius: 3px; background: #c3cbd6; }
#panneau-trajets.reduit .pt-tete { border-bottom: 0; }
#pt-titre { cursor: pointer; }
.pt-trajet { border: 1px solid #e1e6ee; border-radius: 8px; margin-bottom: 10px; }
.pt-trajet .entete { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f3f6fb; border-radius: 8px 8px 0 0; }
.pt-trajet .entete b { flex: 1; color: var(--c2); }
.pt-trajet .etape { padding: 4px 10px 4px 30px; font-size: 12px; cursor: pointer; }
.pt-trajet .etape small { display: block; color: #8a96a8; }

/* replay */
#replay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1002; background: #fff; border-top: 2px solid var(--c1); padding: 8px 12px; }
.rp-ctrl { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.rp-barre { display: flex; gap: 6px; align-items: center; }
.rp-barre .btn { min-width: 38px; height: 38px; font-size: 20px; padding: 0; }
#rp-timeline { position: relative; flex: 1; height: 38px; background: #eef1f5; border-radius: 4px; cursor: pointer; touch-action: none; overflow: visible; }
#rp-segments { position: absolute; inset: 0; overflow: hidden; }
#rp-bulle { position: absolute; bottom: 44px; transform: translateX(-50%); background: var(--c1); color: #fff; font-weight: bold;
  font-size: 15px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; display: none; pointer-events: none; }
#rp-timeline.glisse #rp-bulle { display: block; }
.rp-bas { display: flex; gap: 6px; margin: 0 44px; }
.rp-bas #rp-heures { flex: 1; }
#rp-zoom-txt { color: #6a7585; font-size: 10px; white-space: nowrap; }
#rp-segments .seg { position: absolute; top: 4px; bottom: 4px; background: #0aa0c8; border-radius: 2px; }
#rp-segments .seg.arret { background: #c62828; top: 10px; bottom: 10px; opacity: .85; }
#rp-curseur { position: absolute; top: -3px; bottom: -3px; width: 4px; margin-left: -2px; background: var(--c1); left: 0; border-radius: 2px; }
#rp-heures { position: relative; height: 16px; font-size: 10px; color: #6a7585; }
#rp-heures span { position: absolute; transform: translateX(-50%); }

/* marqueurs */
.mk { position: relative; }
.mk .fleche { width: 30px; height: 30px; }
.mk .etiq { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); background: #111c; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
#toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); background: var(--c1); color: #fff; padding: 10px 18px; border-radius: 6px; z-index: 3000; display: none; }
@media print { #sidebar, #topbar, .mod-tete button, .no-print { display: none !important; } .plein { position: static; } }
#b-infos { position: absolute; right: 10px; bottom: 14px; z-index: 1001; }
@media (min-width: 801px) { #b-infos { display: none !important; } }
@media (max-width: 800px) {
  #sidebar { position: absolute; z-index: 2000; height: 100%; }
  #compteur { top: 60px; bottom: auto; left: 10px; padding: 6px 10px; gap: 8px; }
  #compteur .cpt-vitesse { width: auto; height: auto; border: 0; flex-direction: row; gap: 4px; }
  #compteur .cpt-vitesse b { font-size: 22px; }
  body:not(.infos) #compteur .cpt-info { display: none; }
  body:not(.infos) #journee { display: none !important; }
  .leaflet-control-zoom { display: none; }
  #journee { left: 0; right: 0; bottom: 0; width: auto; border-radius: 12px 12px 0 0; }
  body.infos #b-infos { bottom: auto; top: 60px; right: 62px; left: auto; }
  #situation { left: 8px; right: 8px; width: auto; }
  #panneau-trajets { width: auto; right: 10px; top: auto; height: auto; max-height: 45%; }
  .pt-poignee { display: block !important; }
  #panneau-trajets.reduit { bottom: 16px !important; }
  .plein { padding: 12px; }
  .tuiles { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .trajet-ligne { flex-wrap: wrap; }
}

/* pendant Parcours / Vidéo : on libère la carte */
body.mode-carte #journee, body.mode-carte #compteur, body.mode-carte #b-infos { display: none !important; }

/* suivre : vitesse + panneau de limitation */
#vitesse-legale { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; border: 5px solid #d32f2f; background: #fff; color: #111;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; letter-spacing: -.5px; box-sizing: border-box; box-shadow: 0 1px 4px #0003; }
#vitesse-legale.depasse { background: #d32f2f; color: #fff; animation: clignote 1s infinite; }
#compteur.depasse { background: #c62828; }
@keyframes clignote { 50% { box-shadow: 0 0 0 6px #d32f2f55; } }

/* kilométrage */
.km-tete { font-weight: 700; background: #f3f5f8; margin: -16px -16px 12px; padding: 10px 16px; border-radius: 8px 8px 0 0; }
.km-val { font-family: Consolas, monospace; font-size: 22px; font-weight: 700; }
.deux-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
pre.sms { background: #f3f5f8; padding: 10px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; user-select: all; }
#barre-itin { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 1003; background: #fff; padding: 8px 12px;
  border-radius: 8px; box-shadow: 0 2px 10px #0003; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 95%; }
@media (max-width: 800px) { .deux-cartes { grid-template-columns: 1fr; } }

/* v4 */
.entete-groupe { background: #0d2848 !important; color: #8fb3e0; font-size: 12px; font-weight: 700; cursor: default !important; padding: 6px 12px !important; }
#panneau-groupes { width: 100%; }
.pg-titre { text-align: center; font-weight: 700; padding: 8px 0; }
.pg-ligne { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: #1a426f; margin-bottom: 4px; border-radius: 4px; cursor: pointer; }
.pg-ligne span { flex: 1; } .pg-ligne b { font-size: 13px; }
.pv { min-width: 230px; } .pv-titre { text-align: center; font-weight: 700; background: var(--c1); color: #fff; padding: 6px; border-radius: 4px; margin-bottom: 8px; }
.pv-btns { display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; justify-content: center; }
.pv-btn { width: 44px; height: 44px; border: 0; border-radius: 6px; background: var(--c2); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.pv-btn.vert { background: #2e9d4f; }
.pa { min-width: 260px; } .pa-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #e6eaf0; }
.pa-adr { color: #6a7585; padding-top: 6px; }
.carbu-fond { display: inline-block; width: 60px; height: 6px; background: #ffffff44; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
#c-carbu-barre { height: 100%; background: #4caf50; border-radius: 3px; } #c-carbu-barre.bas { background: #e53935; }
#c-tension-txt { color: #b9cbe3; }
.s-groupe { background: var(--c2); padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-left: auto; margin-right: 8px; }
.sit-tete { align-items: center; }
[data-sit] { cursor: pointer; } [data-sit]:hover { outline: 2px solid #fff; }
#sit-detail { background: #fff; color: #1e2a3a; border-radius: 6px; margin-top: 10px; max-height: 260px; overflow: auto; }
.sd-titre { font-weight: 700; padding: 6px 10px; background: #f3f5f8; display: flex; justify-content: space-between; align-items: center; }
.sd-titre .fermer { color: var(--c1); }
.sd-ligne { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #eef1f5; cursor: pointer; font-size: 13px; }
.sd-ligne span:last-child { margin-left: auto; color: #6a7585; } .sd-ligne .pastille { width: 10px; height: 10px; border-radius: 50%; }
#multi-grille { position: absolute; inset: 0; z-index: 2500; background: #fff; display: flex; flex-direction: column; }
.mg-tete { background: var(--c1); color: #fff; display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.mg-tete b { flex: 1; text-align: center; } .mg-tete button { background: var(--c2); color: #fff; border: 0; width: 38px; height: 34px; border-radius: 6px; font-size: 16px; }
#mg-zone { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: minmax(220px, 1fr); gap: 2px; overflow: auto; }
.mg-case { position: relative; } .mg-carte { position: absolute; inset: 0; }
.mg-nom { position: absolute; top: 4px; left: 4px; z-index: 500; background: #fff; font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 3px; box-shadow: 0 1px 3px #0003; }
.mg-x, .mg-go { position: absolute; z-index: 500; background: #fff; border: 0; width: 26px; height: 26px; border-radius: 4px; box-shadow: 0 1px 3px #0003; }
.mg-x { top: 4px; right: 4px; } .mg-go { bottom: 4px; right: 4px; }
.mg-vit { position: absolute; bottom: 4px; left: 4px; z-index: 500; background: #fff; font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 3px; }
@media (max-width: 800px) { #mg-zone { grid-template-columns: 1fr 1fr; } .pv-btns { grid-template-columns: repeat(4, 40px); } }

#raccourcis { position: absolute; left: 0; bottom: calc(100% + 8px); display: flex; gap: 6px; }
#raccourcis button, #raccourcis a { width: 46px; height: 40px; border: 2px solid var(--c1); background: #fff; border-radius: 6px; font-size: 18px;
  display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
#raccourcis #r-fermer { background: var(--c1); color: #fff; }
#raccourcis .actif { background: #2e9d4f !important; color: #fff; border-color: #2e9d4f; }
body.mode-carte #raccourcis { display: none !important; }
@media (max-width: 800px) { #raccourcis { bottom: auto; top: 0; left: calc(100% + 8px); } }

/* location de voitures */
.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.pill.noir { background: #111; color: #fff; }
.tableau tr.retard td { background: #fff4f4; }
.scan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.scan label.btn { cursor: pointer; }
.vignettes { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.vignettes figure { margin: 0; text-align: center; font-size: 11px; color: #6a7585; }
.vignettes img { height: 110px; border-radius: 6px; border: 1px solid #ccd5e0; display: block; }
input.ocr { background: #fff8d6; border-color: #e0b000; }
.alerte-client { border-radius: 8px; padding: 10px; margin: 8px 0; border: 2px solid #ccd5e0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alerte-client.v { border-color: #2e9d4f; background: #f1faf3; } .alerte-client.o { border-color: #f39c12; background: #fff8ec; }
.alerte-client.r, .alerte-client.noir { border-color: #c62828; background: #fff1f1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.kpi { border: 1px solid #e1e6ee; border-radius: 8px; padding: 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 18px; } .kpi b { font-size: 18px; } .kpi small { color: #6a7585; font-size: 11px; }
.kpi.mauvais { border-color: #c62828; background: #fff4f4; }
.etoiles b { font-size: 26px; color: #f2a900; cursor: pointer; padding: 0 2px; }
a.btn { text-decoration: none; color: inherit; display: inline-block; } a.btn.bleu, a.btn.vert { color: #fff; }

/* téléphone : bouton « infos » toujours visible au-dessus de la barre du navigateur */
@media (max-width: 800px) {
  #b-infos { bottom: calc(14px + env(safe-area-inset-bottom)); padding: 12px 16px; font-size: 14px; box-shadow: 0 2px 8px #0005; }
  #compteur { cursor: pointer; }
  body.infos #journee { max-height: 60dvh; overflow-y: auto; }
}
@media (max-width: 800px) {
  body.infos #compteur { flex-direction: column; align-items: flex-start; gap: 6px; }
  body.infos #compteur .cpt-info div { font-size: 14px; }
  body.infos #raccourcis { display: none; }
}
@media (max-width: 800px) {
  /* parcours / vidéo / suivre : boutons + et - visibles (en plus du pincement) */
  body.mode-carte .leaflet-control-zoom, body.suivre .leaflet-control-zoom { display: block !important; }
  body.mode-carte #replay ~ * .leaflet-control-zoom { display: block !important; }
}
.mk .etiq .etiq-v { background: #2e9d4f; color: #fff; border-radius: 3px; padding: 0 4px; margin-left: 3px; }

.ch-conseils { background: #f5f8fc; border-left: 4px solid #1565c0; padding: 8px 12px; line-height: 1.7; }
.cb-ev { border: 1px solid #e1e6ee; border-left: 5px solid; border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: #fff; }
.cb-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px; margin-top: 6px; }
.cb-grille > div { background: #f5f8fc; border-radius: 6px; padding: 6px 10px; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.cb-graphes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-graphes svg { width: 100%; background: #fff; border: 1px solid #e6eaf0; border-radius: 6px; }
@media (max-width: 800px) { .cb-graphes { grid-template-columns: 1fr; } }
.cb-jour { background: #eef2f7; padding: 6px 10px; border-radius: 6px; }
tr.cb-anormal td { background: #fff4e0; }
.kpis .alerte b { color: #c62828; }
.cb-kpis > div { background: #f5f8fc; border-radius: 8px; padding: 8px 10px; }
.cb-kpis small { display: block; color: #6a7585; font-size: 11px; }
.cb-kpis b { font-size: 18px; }
.ed-icones { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-icones label { display: flex; align-items: center; gap: 4px; border: 1px solid #dfe5ec; border-radius: 8px; padding: 4px 8px; cursor: pointer; min-height: 52px; }
.ed-icones label:has(input:checked) { border-color: #1565c0; background: #e8f1fc; }
.ed-icones svg { max-height: 44px; width: auto; }
/* téléphone : infos du véhicule regroupées dans le panneau du bas */
@media (max-width: 800px) {
  body.infos #compteur { display: none !important; }
  #j-infos { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
  #j-infos .cpt-vitesse { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff; color: var(--c1); border-radius: 10px; padding: 4px 12px; min-width: 70px; }
  #j-infos .cpt-vitesse b { font-size: 26px; line-height: 1; }
  #j-infos .cpt-info { display: grid !important; grid-template-columns: 1fr 1fr; gap: 4px; flex: 1; }
  #j-infos .cpt-info > div { background: #ffffff1f; border-radius: 6px; padding: 4px 8px; margin: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #j-infos .cpt-info > div.cache { display: none; }
  #j-infos .carbu-fond { display: none; }
  /* compteur rond (comme l'ancienne plateforme) */
  #j-infos .cpt-vitesse { width: 84px; height: 84px; min-width: 0; padding: 0; border-radius: 50%; align-self: center;
    border: 5px solid #8fb6e8; box-shadow: inset 0 0 0 3px #fff; }
  #j-infos .cpt-vitesse b { font-size: 28px; }
  #j-infos .cpt-vitesse small { font-size: 11px; }
  /* statistiques du jour : toute la largeur, libellé à gauche, valeur à droite (plus de vide à droite) */
  #journee table { width: 100%; border-collapse: separate; border-spacing: 0 4px; table-layout: fixed; }
  #journee td { font-size: 13px; padding: 4px 8px; }
  #journee td:nth-child(odd) { color: #d6e4f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #journee tr td:first-child { width: 38%; }
  #journee td:nth-child(even) { border-radius: 4px; }
  #journee td:nth-child(3) { padding-left: 10px; }
  #journee .j-date { margin: 4px 0 2px; }
  #journee .adresse { margin-bottom: 4px; }
}
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
td.adr { font-size: 12px; min-width: 160px; color: #33415a; }
@media print { .defile { overflow: visible; } }
.rap-jour { border: 1px solid #dfe6f0; border-radius: 8px; margin: 14px 0; overflow: hidden; }
.rap-tete { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; background: #eef3f9; padding: 8px 12px; }
.rap-t { margin: 0; }
.rap-t tr.rap-l td { border-bottom: 0; }
.rap-t tr.rap-adr td { font-size: 12px; color: #33415a; padding-top: 0; }
.rap-t tr.rap-adr td div { margin: 2px 0; }
@media print { .rap-jour { break-inside: avoid-page; } }
/* vue 3D */
#carte { isolation: isolate; }        /* les calques Leaflet restent dans la carte : la 3D peut passer sous le compteur */
#carte3d { position: absolute; z-index: 999; background: #dfe6ee; }
#carte3d .c3d-haut { display: none; }  /* la vitesse est déjà dans le compteur */
#carte3d-map { position: absolute; inset: 0; }
.c3d-haut { position: absolute; left: 10px; top: 10px; background: color-mix(in srgb, var(--c1) 93%, transparent); color: #fff; border-radius: 10px; padding: 6px 12px; display: flex; align-items: baseline; gap: 6px; z-index: 2; }
.c3d-haut span { font-size: 12px; opacity: .85; margin-right: 6px; } .c3d-haut b { font-size: 26px; }
.c3d-btns { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; display: flex; gap: 8px; z-index: 2; }
@media (max-width: 800px) { .c3d-btns { left: 10px; transform: none; top: auto; bottom: calc(72px + env(safe-area-inset-bottom)); } }
.c3d-btns button { background: #1565c0; color: #fff; border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 700; box-shadow: 0 2px 8px #0005; }
.m3d-voiture svg { width: 34px; height: auto; display: block; filter: drop-shadow(0 3px 3px #0006); }
#r-3d { font-weight: 800; }
/* téléphone : les tableaux des rapports deviennent des cartes (plus besoin de glisser à droite / à gauche) */
.c-titre[data-t]::before { content: none; }
@media (max-width: 800px) {
  table.cartes-m, table.cartes-m tbody { display: block; width: 100%; }
  table.cartes-m tr:has(> th) { display: none; }
  table.cartes-m tr.ligne-c { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; background: #fff; border: 1px solid #dfe6f0;
    border-radius: 10px; margin: 8px 0; padding: 10px 12px; }
  table.cartes-m tr.ligne-c > td { display: block; padding: 0; border: 0; font-size: 14px; }
  table.cartes-m tr.ligne-c > td[data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; color: #6a7585; text-transform: uppercase; letter-spacing: .3px; }
  table.cartes-m td.c-titre { grid-column: 1 / -1; order: -1; font-weight: 800; font-size: 16px; color: var(--c1); }
  table.cartes-m td.c-titre[data-t]::before { content: attr(data-t); }
  table.cartes-m td.c-num { display: none !important; }
  table.cartes-m tr.ligne-c:has(+ tr.rap-adr) { border-bottom: 0; border-radius: 10px 10px 0 0; margin-bottom: 0; }
  table.cartes-m tr.rap-adr { display: block; background: #fff; border: 1px solid #dfe6f0; border-top: 1px dashed #dfe6f0; border-radius: 0 0 10px 10px; margin: 0 0 8px; padding: 8px 12px; }
  table.cartes-m tr.rap-adr > td { display: block; padding: 0; border: 0; } table.cartes-m tr.rap-adr > td:empty { display: none; }
  table.cartes-m tr.total { display: flex; justify-content: space-between; gap: 10px; background: #eef3f9; border-radius: 8px; padding: 8px 12px; font-weight: 700; }
  table.cartes-m tr.total > td { padding: 0; border: 0; }
  table.cartes-m tr.ch-d { display: block; margin: -6px 0 8px; } table.cartes-m tr.ch-d > td { display: block; padding: 0; }
  .defile:has(> table.cartes-m) { overflow: visible; }
  /* le titre de la journée reste collé en haut pendant qu'on fait défiler ses trajets */
  .rap-jour { overflow: clip; border: 0; }
  .rap-tete { position: sticky; top: 0; z-index: 5; border-radius: 8px; box-shadow: 0 2px 6px #0002; }
}
/* l'application ne doit jamais glisser ni se zoomer en entier (seule la carte se zoome) */
#app { width: 100vw; max-width: 100%; overflow: hidden; }
.parc-k > div { cursor: pointer; border: 2px solid transparent; } .parc-k > div.choisi { border-color: #1565c0; }
.pk-masse { flex-wrap: wrap; gap: 6px; background: #f5f8fc; border-radius: 8px; padding: 8px; }
@media (max-width: 800px) { table.cartes-m tr.pk-l > td:first-child { grid-column: 1 / -1; order: -2; } }
.marque-txt { display: block; text-align: center; font-size: 22px; letter-spacing: 1px; }
.sb-titre .marque-txt { color: #fff; } .carte-login .marque-txt { color: var(--c1); font-size: 26px; }
.pk-pack .carbu-fond { height: 8px; background: #e6eaf0; border-radius: 4px; overflow: hidden; margin-top: 6px; }
/* santé batterie (compteur) */
.sb-ok { color: #2e9d4f; font-weight: 700; }
.sb-moy { color: #e08a00; font-weight: 700; cursor: pointer; text-decoration: underline dotted; }
.sb-mal { color: #c62828; font-weight: 700; cursor: pointer; text-decoration: underline dotted; }

/* conducteurs (jusqu'à 3) */
.cd-bloc { border-bottom: 1px solid #e6ebf1; padding-bottom: 8px; margin-bottom: 10px; }
.cd-bloc h3 { font-size: 15px; margin: 6px 0; }
.cd-act { gap: 8px; }
.btn.wa { background: #25d366; color: #fff; border-color: #25d366; }
body.pdf-gen .no-print { display: none !important; }

/* dessin d'un périmètre libre */
#pm-barre { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; background: #fff; border-radius: 12px;
  box-shadow: 0 3px 12px #0004; padding: 8px 10px; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; }
#pm-barre #pm-info { font-size: 13px; font-weight: 600; color: var(--c1); }
#pm-barre button:disabled { opacity: .45; }

.pm-poignee { background: #fff; border: 2px solid #1e6fd9; border-radius: 3px; box-shadow: 0 1px 4px #0005; }
.pm-poignee.milieu { opacity: .55; width: 16px !important; height: 16px !important; margin-left: -8px !important; margin-top: -8px !important; }
.pm-poignee.rayon { border-color: #8e24aa; }
.pa-formes { display: flex; gap: 14px; justify-content: center; margin: 10px 0 16px; flex-wrap: wrap; }
.pa-forme { width: 140px; height: 130px; border: 2px solid #e3e8ef; border-radius: 14px; background: #f3f5f8; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-size: 14px; color: var(--c1); }
.pa-forme svg { width: 60px; height: 60px; }
.pa-forme.choisi { background: #fbffa8; border-color: #1e6fd9; }
.pa-radio { min-width: auto !important; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }
.poi-mk span { display: inline-block; transform: translate(-50%, -50%); background: #fff; color: #b35400; border: 1px solid #e67e22; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; white-space: nowrap; box-shadow: 0 1px 3px #0003; }

/* Options : interrupteurs, thèmes */
.interr { display: flex !important; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; font-weight: 500; min-width: 0 !important; }
.interr input { display: none; }
.interr span { flex: none; width: 46px; height: 26px; border-radius: 13px; background: #d5dbe3; position: relative; transition: background .2s; }
.interr span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0004; transition: left .2s; }
.interr input:checked + span { background: #2ecc71; }
.interr input:checked + span::after { left: 23px; }
.themes { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 10px; }
.theme-choix { display: flex !important; align-items: center; gap: 6px; min-width: 0 !important; cursor: pointer; }
.theme-choix span { width: 64px; height: 32px; border-radius: 8px; display: inline-block; }
#pf-cats.grise { opacity: .45; pointer-events: none; }
body.sans-etiq .mk .etiq { display: none; }

/* ===================== habillage des rapports et du tableau de bord ===================== */
.carte-blanche { border: 0; border-radius: 14px; box-shadow: 0 1px 3px #0000000f, 0 4px 14px #1a3d6b12; background: #fff; }
.rp-entete { display: flex; align-items: center; gap: 14px; padding: 4px 0 14px; margin-bottom: 14px; border-bottom: 3px solid var(--c1); }
.rp-logo { height: 42px; max-width: 120px; object-fit: contain; }
.rp-titres { flex: 1; min-width: 0; }
.rp-titres h2 { margin: 0; color: var(--c1); font-size: 21px; letter-spacing: .2px; }
.rp-titres div { color: #4a5668; font-size: 13px; margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rp-titres .logo-veh { height: 22px; } .rp-titres .pastille-marque { background: #eef3f9; }
.rp-date { color: #8a96a8; font-size: 11px; text-align: right; white-space: nowrap; }
.rp-sous { color: var(--c1); font-size: 15px; margin: 18px 0 6px; padding-left: 8px; border-left: 4px solid var(--c2); }
.kpis2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; flex: 1; }
.kpi2 { display: flex; align-items: center; gap: 10px; background: #f6f8fb; border-radius: 12px; padding: 10px 12px; border-left: 4px solid #c9d3df; min-width: 0; }
.kpi2 .k-ico { font-size: 22px; width: 38px; height: 38px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 1px 3px #0001; }
.kpi2 small { display: block; color: #6a7585; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi2 b { font-size: 18px; color: #1d2b3a; white-space: nowrap; }
.kpi2.v { border-left-color: #2e9d4f; } .kpi2.v b { color: #2e7d32; }
.kpi2.o { border-left-color: #f39c12; } .kpi2.o b { color: #b26a00; }
.kpi2.r { border-left-color: #c62828; background: #fff5f5; } .kpi2.r b { color: #c62828; }
.kpi2.b { border-left-color: var(--c2); } .kpi2.b b { color: var(--c1); }
.graphe { background: #fbfcfe; border: 1px solid #edf1f6; border-radius: 12px; padding: 8px; overflow-x: auto; }
.graphe svg { width: 100%; min-width: 300px; height: auto; display: block; }
.classement { display: flex; flex-direction: column; gap: 6px; }
.cl-l { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.cl-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #33415a; font-weight: 600; }
.cl-barre { background: #eef2f7; border-radius: 6px; height: 14px; overflow: hidden; }
.cl-barre span { display: block; height: 100%; border-radius: 6px; }
.cl-l b { min-width: 52px; text-align: right; color: #1d2b3a; }
.cb-haut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cb-jauge { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: #6a7585; font-size: 11px; }
.donut { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut-leg div { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0; color: #33415a; }
.donut-leg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.donut-leg b { margin-left: auto; padding-left: 10px; }
.tb-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.tb-bloc { background: #fbfcfe; border: 1px solid #edf1f6; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.tb-grille .tb-bloc { margin-top: 0; }
.tb-bloc h3 { margin: 0 0 10px; font-size: 15px; color: var(--c1); }
.tb-alertes div { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px dashed #e3e8ef; font-size: 13px; }
.tb-alertes div:last-child { border-bottom: 0; }
.tb-alertes b { background: var(--c1); color: #fff; border-radius: 10px; padding: 0 9px; font-size: 12px; }
.tb-attention { border-color: #ffd8a8; background: #fffaf2; }
.tb-l { display: flex; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed #f1dcbc; cursor: pointer; font-size: 13px; }
.tb-l:last-child { border-bottom: 0; } .tb-l small { color: #8a96a8; white-space: nowrap; }
.vide { color: #6a7585; margin: 6px 0; }
/* rapports : en-têtes de journée et tableaux plus doux */
.rap-tete { background: linear-gradient(90deg, var(--c1), var(--c2)); color: #fff; }
.rap-tete .pill.g { background: #ffffff2b; color: #fff; }
.rap-jour { border: 1px solid #e3e9f1; border-radius: 12px; }
.tableau th { background: #eef3f9; color: var(--c1); text-transform: uppercase; font-size: 11px; letter-spacing: .3px; border-bottom: 2px solid #dbe3ee; }
.tableau tr:nth-child(even) td { background: #fafbfd; }
.tableau tr.total td { background: #eef3f9; color: var(--c1); }
.cb-ev { border-radius: 12px; box-shadow: 0 1px 4px #0000000d; }
@media print {
  .carte-blanche { box-shadow: none; }
  .kpi2, .graphe, .tb-bloc { break-inside: avoid; }
}
@media (max-width: 800px) {
  .rp-entete { gap: 10px; } .rp-logo { height: 32px; } .rp-titres h2 { font-size: 17px; } .rp-date { display: none; }
  .kpis2 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi2 { padding: 8px; gap: 8px; } .kpi2 .k-ico { width: 32px; height: 32px; font-size: 18px; } .kpi2 b { font-size: 15px; }
  .cb-haut { flex-direction: column; align-items: stretch; } .cb-jauge { flex-direction: row; justify-content: center; gap: 10px; font-size: 12px; }
}

/* ---- carburant : 3 rapports en onglets ---- */
.cb-onglets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 14px; }
.cb-onglets button { border: 2px solid #dfe5ee; background: #fff; border-radius: 12px; padding: 10px 6px; font-weight: 700; font-size: 14px; color: #3a4756;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; position: relative; }
.cb-onglets button span { font-size: 22px; }
.cb-onglets button em { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 11px; background: #e9edf2; color: #5a6575; border-radius: 9px; padding: 1px 7px; }
.cb-onglets button.actif { border-color: var(--c2); background: color-mix(in srgb, var(--c2) 10%, #fff); color: var(--c1); box-shadow: 0 2px 8px #0000000f; }
.cb-onglets button.alerte em { background: #c62828; color: #fff; }
.cb-resume { margin-bottom: 12px; }
.cb-aide { font-size: 12px; color: #6a7585; background: #f6f8fb; border-radius: 8px; padding: 8px 10px; }
.cb-carte { border: 1px solid #e1e6ee; border-radius: 14px; overflow: hidden; margin: 10px 0; background: #fff; box-shadow: 0 1px 4px #0000000d; break-inside: avoid; }
.cb-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; font-weight: 700; }
.cb-qte { font-size: 18px; background: #fff; border-radius: 20px; padding: 2px 12px; white-space: nowrap; }
.cb-carte.plein .cb-tete { background: #e3f4e8; color: #1e6b34; } .cb-carte.plein .cb-qte { color: #2e7d32; }
.cb-carte.vol .cb-tete { background: #fde7e7; color: #a51f1f; } .cb-carte.vol .cb-qte { color: #c62828; }
.cb-carte.anormal .cb-tete { background: #fff3dc; color: #8a5300; } .cb-carte.anormal .cb-qte { color: #b26a00; }
.cb-corps { padding: 10px 14px 12px; }
.cb-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cb-tuile { background: #f6f8fb; border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.cb-tuile span { grid-row: span 2; font-size: 18px; }
.cb-tuile small { color: #6a7585; font-size: 11px; line-height: 1.2; }
.cb-tuile b { font-size: 16px; color: #1d2b3a; }
.cb-tuile.v b { color: #2e7d32; } .cb-tuile.r b { color: #c62828; } .cb-tuile.o b { color: #b26a00; } .cb-tuile.b b { color: var(--c1); }
.cb-niv { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-bottom: 10px; }
.cb-niv-fond { grid-column: 1 / -1; height: 12px; background: #eef1f5; border-radius: 6px; position: relative; overflow: hidden; }
.cb-niv-fond i { position: absolute; top: 0; bottom: 0; left: 0; background: #90a4bd; }
.cb-niv-fond i.plus { background: #43a047; } .cb-niv-fond i.moins { background: repeating-linear-gradient(45deg, #e53935 0 6px, #ef9a9a 6px 12px); }
.cb-niv small { color: #6a7585; font-size: 11px; } .cb-niv small:last-child { text-align: right; }
.cb-voir { display: inline-block; margin-top: 8px; font-size: 13px; }
.cb-vide { text-align: center; color: #6a7585; padding: 30px 10px; background: #f6f8fb; border-radius: 14px; }
.cb-vide div { font-size: 38px; margin-bottom: 6px; }
.cb-jour2 { border: 1px solid #e1e6ee; border-radius: 14px; padding: 10px 12px 12px; margin: 12px 0; background: #fff; box-shadow: 0 1px 4px #0000000d; break-inside: avoid; }
.cb-jour2-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.cb-jour2-tete b { margin-right: auto; font-size: 15px; color: var(--c1); }
.cb-g { border: 1px solid #eef1f5; border-radius: 10px; padding: 6px 6px 0; }
.cb-g-titre { font-size: 12px; font-weight: 700; color: #5a6575; padding: 0 4px; }
.cb-g svg { border: 0 !important; }
.cb-det { margin-top: 8px; } .cb-det summary { cursor: pointer; color: var(--c2); font-weight: 600; font-size: 13px; }
@media (max-width: 800px) {
  .cb-onglets button { font-size: 12px; padding: 8px 4px; } .cb-onglets button span { font-size: 20px; }
  .cb-tete { font-size: 13px; padding: 8px 10px; } .cb-qte { font-size: 15px; }
  .cb-tuiles { grid-template-columns: 1fr 1fr; } .cb-tuile b { font-size: 14px; }
}
body.pdf-gen .cb-det table, .cb-det[open] table { display: table; }

/* ---- location : Aujourd'hui, caisse, procès-verbal ---- */
.pill.b { background: #e3ecfb; color: #1e4fd8; }
.choix { display: flex; flex-wrap: wrap; gap: 6px; }
.choix button { border: 2px solid #dfe5ee; background: #fff; border-radius: 20px; padding: 6px 14px; font-weight: 600; cursor: pointer; color: #3a4756; }
.choix button.actif { border-color: var(--c1); background: var(--c1); color: #fff; }
.lj-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.lj-tete h2 { margin: 0; color: var(--c1); } .lj-tete small { color: #6a7585; text-transform: capitalize; }
.lj-etapes h3 small { color: #6a7585; font-weight: 600; }
.lj-prog { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.lj-prog i { display: block; height: 100%; background: linear-gradient(90deg, #2e9d4f, #43a047); }
.lj-etape { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; }
.lj-etape:hover { background: #f6f8fb; }
.lj-etape > span { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed #c9d3df; display: flex; align-items: center; justify-content: center; color: #8a94a3; flex: none; }
.lj-etape.fait > span { background: #dff3e5; border: 0; color: #2e7d32; font-weight: 800; }
.lj-etape.fait b { text-decoration: line-through; color: #8a94a3; }
.lj-etape div { flex: 1; } .lj-etape small { display: block; color: #6a7585; } .lj-etape i { color: #8a94a3; font-style: normal; font-size: 20px; }
.lj-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.lj-kpi { background: #fff; border-radius: 14px; padding: 10px; text-align: center; box-shadow: 0 1px 4px #0000000f; border-top: 4px solid #c9d3df; }
.lj-kpi span { font-size: 20px; } .lj-kpi b { display: block; font-size: 24px; color: #1d2b3a; } .lj-kpi small { color: #6a7585; }
.lj-kpi.v { border-color: #2e9d4f; } .lj-kpi.o { border-color: #f39c12; } .lj-kpi.r { border-color: #c62828; } .lj-kpi.b { border-color: #1e4fd8; }
.lj-traiter h3 { margin-top: 0; }
.lj-t { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; margin: 6px 0; border-left: 4px solid #f39c12; background: #fff8ec; }
.lj-t.r { border-color: #c62828; background: #fff2f2; }
.lj-t > span { font-size: 20px; } .lj-t > div { flex: 1; font-size: 14px; }
.lj-filtres { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 8px; }
.lj-filtres button { border: 0; background: #e9edf2; border-radius: 20px; padding: 7px 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.lj-filtres button.actif { background: var(--c1); color: #fff; }
.lj-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lj-v { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 1px 6px #0000001a; border-top: 5px solid #2e9d4f; display: flex; flex-direction: column; gap: 8px; }
.lj-v.loue { border-top-color: #f39c12; } .lj-v.depart { border-top-color: #1e4fd8; }
.lj-v-haut { display: flex; gap: 6px; flex-wrap: wrap; }
.lj-v-nom { display: flex; align-items: center; gap: 10px; } .lj-v-nom b { font-size: 16px; } .lj-v-nom small { display: block; color: #6a7585; }
.lj-v-info { background: #f6f8fb; border-radius: 10px; padding: 6px 10px; font-size: 14px; } .lj-v-info small { color: #6a7585; }
.lj-v-info.resa { background: #eef3fe; }
.lj-v-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; } .lj-v-btns .btn { padding: 6px 10px; }
.lp-pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.lp-pay > div { background: #f6f8fb; border-radius: 12px; padding: 8px 12px; }
.lp-pay small { display: block; color: #6a7585; font-size: 11px; } .lp-pay b { font-size: 18px; } .lp-pay b.v { color: #2e7d32; }
.lp-pay .reste { background: #1d1d1d; color: #fff; } .lp-pay .reste small { color: #ccc; }
.lp-pay .solde { background: #dff3e5; } .lp-pay .solde b { color: #2e7d32; }
td.v { color: #2e7d32; } td.r { color: #c62828; }
.lp-form { background: #f6f8fb; border-radius: 12px; padding: 10px 12px; margin: 10px 0; } .lp-form h3 { margin-top: 0; }
.pv-ong { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid #e6eaf0; margin-bottom: 12px; }
.pv-ong button { border: 0; background: none; padding: 10px 4px; font-weight: 700; color: #6a7585; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.pv-ong button.actif { color: var(--c1); border-bottom-color: var(--c1); }
.pv-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pv-box { background: #f6f8fb; border-radius: 12px; padding: 10px; } .pv-box small { display: block; color: #6a7585; } .pv-box span { color: #6a7585; }
.pv-box input { width: 100%; box-sizing: border-box; }
.pv-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.pv-ph { aspect-ratio: 4/3; border: 2px dashed #c9d3df; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; background: #fafbfd; }
.pv-ph span { font-size: 26px; } .pv-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-ph small { position: relative; z-index: 1; background: #ffffffd9; border-radius: 8px; padding: 1px 6px; margin-top: auto; margin-bottom: 4px; }
.pv-ph.charge { opacity: .5; }
.pv-total { background: #f6f8fb; border-radius: 10px; padding: 10px; margin: 8px 0; font-size: 15px; }
.pv-bas { justify-content: space-between; margin-top: 12px; }
.pa-couleurs { display: flex; gap: 8px; flex-wrap: wrap; }
.pa-couleurs button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #c9d3df; cursor: pointer; }
.pa-couleurs button.actif { box-shadow: 0 0 0 3px var(--c1); }
.pa-cachet { width: 150px; height: 75px; border: 1px dashed #c9d3df; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: repeating-conic-gradient(#f3f5f8 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.pa-cachet img { max-width: 100%; max-height: 100%; }
@media (max-width: 800px) {
  .lj-kpis { grid-template-columns: repeat(2, 1fr); } .lj-grille { grid-template-columns: 1fr; }
  .pv-ong button { font-size: 12px; } .pv-photos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) { #loc-zone { margin-top: 4px; } .onglets.no-print { flex-wrap: nowrap !important; overflow-x: auto; padding-bottom: 4px; } .onglets.no-print .btn { white-space: nowrap; flex: none; } }
/* itinéraire vers le véhicule */
.c-nav a, .pv-nav a { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 14px; background: #fff; color: #1a73e8 !important; font-weight: 700; text-decoration: none; font-size: 13px; }
.c-nav a + a, .pv-nav a + a { color: #0a8fbf !important; }
.pv-nav { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e6eaf0; font-size: 13px; font-weight: 600; color: #3a4756; }
.pv-nav a { background: #eef3fe; } .pv-nav a + a { background: #e6f7fc; }

/* ---- téléphone : panneau « infos » compact et sombre (comme l'ancienne plateforme, en plus propre) ---- */
@media (max-width: 800px) {
  #journee { background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 96%, #000) 0%, color-mix(in srgb, var(--c1) 88%, #000) 100%);
    padding: 10px 12px calc(8px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -4px 16px #0004; }
  body.infos #journee { max-height: 46dvh; }
  #journee::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: #ffffff55; margin: -4px auto 6px; }
  #j-infos { gap: 10px; margin-bottom: 6px; align-items: center; }
  #j-infos .cpt-vitesse { width: 70px; height: 70px; border: 4px solid #6fa3e6; box-shadow: 0 0 0 3px #ffffff22, inset 0 0 0 2px #fff;
    background: radial-gradient(circle at 50% 35%, #fff 0%, #e8f0fb 100%); }
  #j-infos .cpt-vitesse b { font-size: 24px; }
  #j-infos .cpt-vitesse small { font-size: 10px; margin-top: -2px; }
  #j-infos .cpt-info { grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  #j-infos .cpt-info > div { background: none; border-radius: 0; padding: 2px 0; font-size: 12.5px; color: #d6e4f5; border-bottom: 1px solid #ffffff14; }
  #j-infos .cpt-info > div b { color: #fff; font-size: 13.5px; }
  #j-infos .cpt-info > div small { color: #9fd3a8; font-size: 11px; }
  #j-infos .cpt-info .c-nav { grid-column: 1 / -1; border-bottom: 0; padding-top: 4px; }
  #j-infos .c-nav a { padding: 2px 10px; font-size: 12px; }
  #journee .adresse { background: none; color: #fff; padding: 2px 0 2px 20px; font-weight: 500; font-size: 12.5px; position: relative; margin: 2px 0 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; border-top: 1px solid #ffffff1f; padding-top: 6px; }
  #journee .adresse::before { content: "📍"; position: absolute; left: 0; top: 5px; font-size: 13px; }
  #journee .j-date { margin: 2px 0 4px; gap: 6px; }
  #journee .j-date button { padding: 1px 12px; border-radius: 12px; }
  #journee .j-date b { padding: 1px 12px; border-radius: 12px; font-size: 13px; }
  #journee table { border-spacing: 0 2px; }
  #journee td { font-size: 12px; padding: 2px 6px; }
  #journee td:nth-child(odd) { color: #b9cce6; padding-left: 0; }
  #journee td:nth-child(even) { background: #0b1a30; color: #fff; font-weight: 700; border-radius: 6px; font-size: 13px; }
  #journee tr td:first-child { width: 34%; }
}
@media (max-width: 800px) {
  #journee tr:first-child td:nth-child(1) { width: 31%; } #journee tr:first-child td:nth-child(2) { width: 21%; }
  #journee tr:first-child td:nth-child(3) { width: 22%; } #journee td:nth-child(3) { padding-left: 10px; }
}

/* ---- bouton « Y aller » (icône route) + feuille de choix Google Maps / Waze ---- */
.bt-nav { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 2px solid #ffffff55; cursor: pointer; padding: 0;
  background: #0b1a30 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path d='M30 4c-9 0-14 6-9 12s4 10-3 13-8 10-3 15' fill='none' stroke='%23ffc928' stroke-width='9' stroke-linecap='round'/><path d='M30 4c-9 0-14 6-9 12s4 10-3 13-8 10-3 15' fill='none' stroke='%23fff' stroke-width='1.6' stroke-dasharray='3 3' stroke-linecap='round'/><circle cx='35' cy='10' r='6' fill='%23e53935'/><circle cx='35' cy='10' r='2.3' fill='%23fff'/></svg>") center / 30px no-repeat; box-shadow: 0 2px 8px #0005, inset 0 0 0 2px #ffffff14;
  transition: transform .15s; }
.bt-nav:active { transform: scale(.92); }
.j-adr-l { display: flex; align-items: center; gap: 8px; }
.j-adr-l .adresse { flex: 1; min-width: 0; margin-bottom: 0 !important; }
.pv-btn.bt-nav { width: 38px; height: 38px; background-size: 24px; border-color: #c9d3df; }
.nav-fond { position: fixed; inset: 0; z-index: 5000; background: #0000; display: flex; align-items: flex-end; justify-content: center; transition: background .25s; }
.nav-fond.ouvert { background: #0008; }
.nav-feuille { width: 100%; max-width: 460px; background: #fff; border-radius: 22px 22px 0 0; padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .25s ease-out; box-shadow: 0 -6px 24px #0004; }
.nav-fond.ouvert .nav-feuille { transform: none; }
@media (min-width: 801px) { .nav-fond { align-items: center; } .nav-feuille { border-radius: 18px; } }
.nav-poignee { width: 42px; height: 5px; border-radius: 3px; background: #d5dce6; margin: 2px auto 10px; }
.nav-tete { display: flex; gap: 12px; align-items: center; padding: 0 2px 12px; border-bottom: 1px solid #eef1f5; margin-bottom: 8px; }
.nav-tete .bt-nav { cursor: default; }
.nav-tete b { display: block; font-size: 17px; color: #1d2b3a; }
.nav-tete small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #6a7585; font-size: 12px; }
.nav-app { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 10px; border: 0; background: none; border-radius: 14px;
  text-decoration: none; color: #1d2b3a; text-align: left; cursor: pointer; font: inherit; }
.nav-app:hover, .nav-app:active { background: #f3f6fa; }
.nav-app div { flex: 1; } .nav-app b { display: block; font-size: 16px; } .nav-app small { color: #6a7585; font-size: 12px; }
.nav-app i { font-style: normal; font-size: 24px; color: #b0bac7; }
.nav-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.nav-ico.g { background: linear-gradient(135deg, #e8f0fe, #d2e3fc); }
.nav-ico.w { background: linear-gradient(135deg, #e0f7fd, #b9ecfa); }
.nav-ico.c { background: #f1f3f6; }
.nav-annuler { width: 100%; margin-top: 8px; padding: 13px; border: 0; border-radius: 14px; background: #f1f3f6; font-weight: 700; font-size: 15px; color: #3a4756; cursor: pointer; }
/* carburant estimé (boîtier sans jauge) */
.ce-info { display: flex; gap: 10px; background: #eef4fd; border-left: 4px solid var(--c2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; color: #2c3a4b; }
.ce-info.r { background: #fff4e5; border-color: #f39c12; }
.ce-info > span { font-size: 20px; } .ce-info small { display: block; color: #6a7585; margin-top: 4px; }
.ce-prix { margin: 12px 0 4px; } .ce-prix input { width: 110px; }
.ce-barres { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 6px 4px 0; overflow-x: auto; }
.ce-b { flex: 1; min-width: 34px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.ce-b i { width: 70%; max-width: 46px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #ffb74d, #f57c00); }
.ce-b i.vide { background: #e6eaf0; }
.ce-b .ce-v { font-size: 11px; font-weight: 700; color: #b26a00; min-height: 14px; }
.ce-b small { font-size: 10px; color: #6a7585; white-space: nowrap; padding-top: 4px; border-top: 2px solid #e6eaf0; width: 100%; text-align: center; }
.ce-barres + .ce-tab { margin-top: 14px; }
.ce-b i { max-height: calc(100% - 40px); }
tr.ce-zero td { color: #9aa4b2; }
tr.cb-ev-l td { font-weight: 600; } tr.cb-ev-l.plein td { background: #e3f4e8; color: #1e6b34; } tr.cb-ev-l.baisse td { background: #fde7e7; color: #a51f1f; }
/* carburant : fiabilité, preuve, qualité des données */
.cb-tete > span:last-child { display: flex; align-items: center; gap: 8px; }
.cb-fiab { font-size: 11px; font-weight: 700; border-radius: 12px; padding: 2px 8px; background: #fff; white-space: nowrap; }
.cb-fiab.ok { color: #2e7d32; } .cb-fiab.av { color: #b26a00; }
.cb-carte.vol.a-verifier .cb-tete { background: #fff3dc; color: #8a5300; }
.cb-raisons { margin-top: 8px; font-size: 12px; background: #fff8ec; color: #8a5300; border-radius: 8px; padding: 6px 10px; }
.cb-preuve { margin-top: 8px; } .cb-preuve small { color: #6a7585; font-size: 11px; } .cb-preuve i.gris { display: inline-block; width: 10px; height: 10px; background: #e9edf2; vertical-align: middle; }
.cb-preuve svg { width: 100%; max-width: 520px; height: 110px; display: block; background: #fafbfd; border: 1px solid #eef1f5; border-radius: 8px; margin-top: 3px; }
.cb-qualite { border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; font-size: 13px; }
.cb-qualite.ok { background: #e8f5ec; color: #1e6b34; } .cb-qualite.av { background: #fff4e5; color: #7a4a00; border-left: 4px solid #f39c12; }
.cb-qualite ul { margin: 4px 0 0; padding-left: 18px; }
/* preuves conduite */
.ch-verif { margin-top: 8px; }
.pc-diag { margin: 10px 0 6px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.pc-diag.v { background: #e3f4e8; color: #1e6b34; } .pc-diag.r { background: #fde7e7; color: #a51f1f; } .pc-diag.o { background: #fff3dc; color: #8a5300; }
.pc-compte { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; } .pc-compte small { color: #6a7585; }
.pc-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; max-height: 520px; overflow: auto; }
.pc-ev { border: 1px solid #e1e6ee; border-left: 4px solid #9aa7b8; border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 12.5px; }
.pc-ev.v { border-left-color: #2e9d4f; } .pc-ev.r { border-left-color: #c62828; } .pc-ev.o { border-left-color: #f39c12; }
.pc-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .pc-h span:first-of-type { color: #6a7585; }
.pc-svg { width: 100%; height: 64px; background: #fafbfd; border-radius: 6px; margin: 4px 0; }
.pc-ev p { margin: 2px 0 4px; color: #3a4756; }
.pa-btns { display: flex; gap: 6px; margin-top: 8px; } .pa-btns .btn { padding: 6px 10px; } .pa-btns .btn.vert { flex: 1; }
.pa-adr { font-size: 13px; line-height: 1.35; margin-top: 6px; }

/* ---- panneau Infos : chiffres en grille compacte (3 colonnes), hauteur = contenu ---- */
.j-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 4px; }
.j-grille > div { background: #0b1a30; border-radius: 8px; padding: 4px 8px; min-width: 0; }
.j-grille small { display: block; color: #9fb4d1; font-size: 10.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-grille b { display: block; color: #fff; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-der { margin-top: 4px; font-size: 11px; color: #9fb4d1; text-align: center; } .j-der b { color: #dbe6f5; font-weight: 600; }
@media (max-width: 800px) {
  body.infos #journee { height: auto !important; min-height: 0 !important; max-height: 58dvh; padding-bottom: 6px !important; }
  #journee .j-adr-l { margin: 0; } #journee .j-adr-l .bt-nav { width: 40px; height: 40px; background-size: 26px; }
  #journee .adresse { margin: 0 !important; padding-top: 4px !important; -webkit-line-clamp: 1 !important; }
  #journee .j-date { margin: 4px 0 2px !important; } #journee .j-date button, #journee .j-date b { line-height: 1.25; }
  #j-infos { margin-bottom: 2px !important; }
  #j-infos .cpt-info > div { padding: 1px 0 !important; }
}
.bt-suivre { flex: none; height: 40px; padding: 0 12px; border-radius: 20px; border: 2px solid #ffffff55; background: #2e9d4f; color: #fff;
  font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 4px; cursor: pointer; box-shadow: 0 2px 8px #0005; }
.bt-suivre small { font-size: 13px; } .bt-suivre:active { transform: scale(.94); }
.pt-trajet .etape.clic { cursor: pointer; position: relative; border-radius: 8px; }
.pt-trajet .etape.clic:hover, .pt-trajet .etape.clic:active { background: #eef3fb; }
.pt-trajet .etape.clic i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 20px; color: #9aa7b8; }
/* ---- Ma position ---- */
.bt-mapos { width: 40px; height: 40px; border-radius: 8px; border: 0; background: #fff; box-shadow: 0 1px 5px #0004; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.bt-mapos span { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #5f6b7a; position: relative; box-sizing: border-box; }
.bt-mapos span::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #5f6b7a; }
.bt-mapos.actif span { border-color: #1a73e8; } .bt-mapos.actif span::after { background: #1a73e8; }
.bt-mapos.cherche span { animation: mapos 1s infinite; }
@keyframes mapos { 50% { opacity: .3; } }
.moi-pt i { display: block; width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 1px #0003, 0 1px 6px #0006; box-sizing: border-box; margin: 2px; }
.pv-dist { text-align: center; font-size: 13px; color: #1a73e8; margin: 2px 0 4px; }

.vignettes figure.vg-sup { position: relative; }
.vg-x { position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff;
  background: #d93025; color: #fff; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.35); padding: 0; }

/* tableau Infos réductible (PC) */
.j-ouvrir { display: none; }
.bt-reduire { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12);
  color: #fff; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.bt-reduire:hover { background: rgba(255,255,255,.25); }
@media (min-width: 801px) {
  body.j-reduit #journee { display: none !important; }
  body.j-reduit:not(.mode-carte) .j-ouvrir:has(+ #journee:not(.cache)) { display: block; position: absolute; right: 12px; bottom: 16px; z-index: 1000;
    background: var(--c1); color: #fff; border: 2px solid rgba(255,255,255,.6); border-radius: 22px; padding: 8px 16px; font-size: 14px; font-weight: 700;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
  body.j-reduit .j-ouvrir:hover { filter: brightness(1.15); }
}
@media (max-width: 800px) { .bt-reduire { display: none; } }

.ce-b small { line-height: 1.25; }
.ce-src { display: inline-block; font-size: 11px; color: #6a7585; background: #f1f4f8; border-radius: 6px; padding: 1px 6px; margin-left: 4px; font-weight: 600; }

/* ---------- langue : Français / الدارجة ---------- */
.langues { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.langues button { border: 1px solid #c9d3df; background: #fff; color: #1a3d6b; border-radius: 20px; padding: 6px 16px; font-weight: 700; cursor: pointer; font-size: 14px; }
.langues button.actif { background: #1a3d6b; color: #fff; border-color: #1a3d6b; }
.lg-ar, [data-lang="ar"] { font-family: Tahoma, "Segoe UI", "Noto Sans Arabic", sans-serif; }
html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, sans-serif; }
html[dir="rtl"] #carte, html[dir="rtl"] .leaflet-container, html[dir="rtl"] #carte3d-map { direction: ltr; }
html[dir="rtl"] .leaflet-popup-content, html[dir="rtl"] .leaflet-tooltip { direction: rtl; text-align: right; }
html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="date"], html[dir="rtl"] input[type="time"] { direction: ltr; text-align: right; }
html[dir="rtl"] .tableau th, html[dir="rtl"] .tableau td { text-align: right; }
html[dir="rtl"] #sidebar.ferme { margin-left: 0; margin-right: -300px; }

.pc-liens { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pc-liens .pc-video { padding: 6px 12px; font-size: 13px; }
