/* ============================================================
   TEV TOURNÉES — identité atelier Toutenvélo (charte Maintenance)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --ink: #171a14;
  --paper: #f4f5ef;
  --card: #ffffff;
  --lime: #a8c63c;
  --lime-dark: #74901f;
  --steel: #5f665a;
  --line: #e1e4d8;
  --amber: #b57708;
  --red: #b8432f;
  --ok: #4c8c3b;
  --radius: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.mono { font-family: 'IBM Plex Mono', monospace; }
a { color: var(--lime-dark); }

/* ---------- barre de navigation ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 3px solid var(--lime);
}
.brand {
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 17px;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
}
.brand span { color: var(--lime); font-weight: 400; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.topbar nav a {
  color: #d8dccb;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 6px;
}
.topbar nav a.on { background: var(--lime); color: var(--ink); font-weight: 700; }

/* ---------- structure de page ---------- */
main { max-width: 720px; margin: 0 auto; padding: 22px 18px 90px; }

h1 {
  font-size: 25px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 6px 0 4px;
}
h1::after {
  content: '';
  display: block;
  width: 52px;
  height: 5px;
  background: var(--lime);
  margin-top: 7px;
  border-radius: 3px;
}
.subtitle { color: var(--steel); margin: 10px 0 22px; font-size: 14px; }

.section-title {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 8px;
  height: 20px;
  background: var(--lime);
  border-radius: 3px;
  flex: none;
}
.section-title .count { font-size: 13px; color: var(--steel); font-weight: 500; letter-spacing: 0; }

/* ---------- avatars livreurs ---------- */
.avatar {
  --s: 26px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(var(--s) * .38);
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
  vertical-align: middle;
  border: 1.5px solid var(--card);
  box-shadow: 0 0 0 1px var(--line);
}
.avatar-vide {
  background: var(--paper);
  color: var(--steel);
  box-shadow: 0 0 0 1px var(--line);
  border-color: var(--paper);
}
.livreur-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--steel);
  min-width: 0;
}
.livreur-tag .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cartes tournée ---------- */
.tournee-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.tournee-card:active { transform: scale(.99); box-shadow: 0 2px 10px rgba(23,26,20,.10); }
.tournee-card .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.tournee-card .nom {
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.tournee-card .date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--steel);
  white-space: nowrap;
}
.tournee-card .meta {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tournee-card .compte {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--lime-dark);
  font-weight: 600;
  white-space: nowrap;
}
.progress {
  margin-top: 11px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.progress > div { height: 100%; background: var(--lime); border-radius: 3px; transition: width .3s; }
.progress.done > div { background: var(--ok); }

.empty {
  text-align: center;
  color: var(--steel);
  padding: 44px 16px;
  font-size: 14px;
  line-height: 1.6;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.loading {
  text-align: center;
  color: var(--steel);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 36px 0;
}

/* ---------- boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 13px 18px;
  cursor: pointer;
  width: 100%;
  background: none;
  color: var(--ink);
}
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:active { background: var(--lime-dark); color: #fff; }
.btn-ghost { border-color: var(--line); background: var(--card); }
.btn-danger { border-color: #e3c4bd; color: var(--red); background: var(--card); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.fab {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  border: none;
  box-shadow: 0 4px 14px rgba(23,26,20,.28);
  cursor: pointer;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { background: var(--lime-dark); color: #fff; }

/* ---------- en-tête de tournée ---------- */
.tournee-head {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 18px 12px;
}
.tournee-head .ligne {
  display: flex;
  align-items: center;
  gap: 10px;
}
.back {
  color: var(--steel);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px 2px 0;
}
.tournee-head h1 { font-size: 21px; margin: 0; flex: 1; min-width: 0; }
.tournee-head h1::after { display: none; }
.icon-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--steel);
  font-size: 16px;
  padding: 7px 11px;
  cursor: pointer;
  flex: none;
}
.tournee-head .infos {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.tournee-head .date-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--steel);
}
.tournee-head .compte {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--lime-dark);
  margin-left: auto;
}

/* ---------- carte ---------- */
.map-wrap {
  position: relative;
  height: 42vh;
  min-height: 260px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#map { position: absolute; inset: 0; background: var(--line); }

.btn-fond {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 7px 11px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 1px 4px rgba(23,26,20,.25);
  cursor: pointer;
}
.btn-fond:active { background: var(--lime); }

.btn-geoloc {
  position: absolute;
  top: 52px;
  right: 10px;
  z-index: 500;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(23,26,20,.25);
  cursor: pointer;
}
/* position affichée mais carte libre */
.btn-geoloc.actif { color: var(--lime-dark); border-color: var(--lime-dark); }
/* la carte suit le coursier */
.btn-geoloc.suit { background: var(--lime-dark); color: #fff; border-color: var(--lime-dark); }

.dot-moi {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 1px rgba(116,144,31,.55), 0 1px 5px rgba(23,26,20,.45);
}

/* position d'un autre coursier de la tournée (vue responsable) */
.pin-coursier {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pin-coursier .rond {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--lime);
  background: var(--card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1.5px var(--ink), 0 2px 6px rgba(23,26,20,.45);
}
.pin-coursier .rond .avatar { --s: 34px; }
.pin-coursier .etiquette {
  margin-top: 3px;
  max-width: 100px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(23,26,20,.82);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
/* position qui date : la photo passe en gris et le liseré s'efface */
.pin-coursier.perimee { opacity: .6; }
.pin-coursier.perimee .rond { filter: grayscale(1); border-color: var(--steel); }

/* Leaflet place ses contrôles en z-index 1000 : ils passaient
   au-dessus des panneaux. On les redescend sous les sheets. */
.leaflet-top, .leaflet-bottom { z-index: 400 !important; }
.leaflet-pane { z-index: 300 !important; }
.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(255,255,255,.75) !important;
}

.marker-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(23,26,20,.35);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 11px;
}
.marker-stop.collecte { border-radius: 5px; border-color: var(--ink); }
.marker-stop.livre { background: #b6bbaf !important; color: #fff !important; opacity: .85; border-color: #fff; }
.marker-stop.reporte { opacity: .6; border-style: dashed; }

/* ---------- liste des stops ---------- */
.stops-list { max-width: 720px; margin: 0 auto; padding: 14px 18px 100px; }

/* ---------- page tournée : carte plein écran, liste en tiroir ---------- */
.page-tournee {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page-tournee .topbar,
.page-tournee .tournee-head { flex: none; width: 100%; }
.page-tournee .tournee-head { max-width: 720px; margin: 0 auto; }
/* la carte prend toute la hauteur restante */
.page-tournee .map-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

/* bouton d'ouverture, posé en bas de la carte */
.btn-liste {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 3px 12px rgba(23,26,20,.35);
  cursor: pointer;
}
.btn-liste .chev { color: var(--lime); font-size: 15px; line-height: 1; }
.btn-liste:active { background: var(--lime); color: var(--ink); }
.btn-liste:active .chev { color: var(--ink); }
.page-tournee.liste-ouverte .btn-liste { display: none; }

/* le tiroir lui-même */
.liste-tiroir {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 720px;
  max-height: 76dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 22px rgba(23,26,20,.28);
  transform: translateY(101%);
  transition: transform .25s ease;
  z-index: 700;
}
.page-tournee.liste-ouverte .liste-tiroir { transform: translateY(0); }

.tiroir-poignee {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px 10px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--steel);
  cursor: pointer;
}
.tiroir-poignee .chev { color: var(--lime-dark); font-size: 15px; line-height: 1; }
.tiroir-poignee:active { background: var(--line); }

.page-tournee .stops-list {
  max-width: none;
  margin: 0;
  padding: 10px 18px 96px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* le bouton + reste atteignable par-dessus le tiroir */
.page-tournee .fab { z-index: 750; }

.stop-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.stop-row.livre { background: #fafbf7; border-color: #eceee4; }
.stop-row.livre .adresse { text-decoration: line-through; color: var(--steel); }
.stop-row.reporte { border-style: dashed; }

/* collectes : fond gris + flèche vers le bas */
.stop-row.collecte { background: #E8E8E8; border-color: #d6d6d2; }
.stop-row.collecte.livre { background: #efefec; }
.collecte-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  margin-right: 7px;
  vertical-align: -3px;
  flex: none;
}
.stop-row.livre .collecte-ico { background: #b6bbaf; }
.badge-collecte {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* stop mixte : petit carré collecte en coin du rond */
.marker-stop { position: relative; }
.marker-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 15px;
  height: 15px;
  padding: 0 2px;
  border-radius: 4px;
  background: #b6bbaf;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
}

/* deux compteurs côte à côte dans le formulaire */
.quantites {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quantites .stepper { gap: 8px; }
.quantites .stepper button { width: 40px; height: 40px; font-size: 19px; }
.quantites .stepper .val { font-size: 19px; min-width: 28px; }

.stop-check {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
  color: transparent;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.stop-row.livre .stop-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.stop-row.reporte .stop-check { border-color: var(--amber); color: var(--amber); font-size: 15px; }

.stop-info { flex: 1; min-width: 0; }
.stop-info .adresse {
  font-size: 14.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stop-info .details {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--steel);
  flex-wrap: wrap;
}
.chip-transp {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}
.badge-report { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--amber); }
.heure { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ok); }
.nb-colis {
  flex: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--lime-dark);
  white-space: nowrap;
}
.stop-row.livre .nb-colis { color: #a8ada0; }
.stop-remarque-flag { color: var(--amber); font-size: 13px; }

/* ---------- panneaux ---------- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23,26,20,.45);
  z-index: 900;
  display: none;
}
.sheet-overlay.open { display: block; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--paper);
  border-radius: 14px 14px 0 0;
  border-top: 3px solid var(--lime);
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  z-index: 950;
  transform: translateY(105%);
  transition: transform .22s ease;
  max-height: 88vh;
  overflow-y: auto;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 -6px 24px rgba(23,26,20,.18);
}
.sheet.open { transform: translateY(0); }
.sheet h2 {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 14px;
}

/* ---------- formulaires ---------- */
label.field {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--steel);
  margin: 14px 0 6px;
}
input[type="text"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--lime-dark); }
textarea { resize: vertical; min-height: 68px; }

.autocomplete { position: relative; }
.suggestions {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 4px;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(23,26,20,.14);
}
.suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  padding: 11px 13px;
  cursor: pointer;
}
.suggestions button:last-child { border-bottom: none; }
.suggestions button:active { background: var(--paper); }

.transp-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.transp-choices button {
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 8px 13px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  opacity: .45;
}
.transp-choices button.selected { opacity: 1; border-color: var(--ink); }

/* choix du livreur avec photo */
.livreur-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}
.livreur-choices button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 4px 8px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: var(--steel);
}
.livreur-choices button.selected {
  border-color: var(--lime-dark);
  background: #f6f9ea;
  color: var(--ink);
  font-weight: 700;
}
.livreur-choices .avatar { --s: 42px; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}
.stepper .val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 21px;
  font-weight: 600;
  min-width: 38px;
  text-align: center;
}

/* ---------- détail d'un stop ---------- */
.detail-adresse { font-size: 16px; font-weight: 700; line-height: 1.35; }
.detail-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 4px;
  font-size: 13px;
  color: var(--steel);
}
.detail-remarque {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.45;
}
.detail-livre-info {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ok);
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ---------- toast ---------- */
#toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
  z-index: 1100;
  white-space: nowrap;
}
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- page modèles ---------- */
.modele-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.modele-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
}
.modele-head .nom {
  font-weight: 700;
  font-size: 15.5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modele-head .resume { font-size: 11px; color: var(--steel); flex: none; }
.modele-head .chev { color: var(--lime-dark); font-weight: 700; flex: none; }
.modele-head:active { background: var(--paper); }

.modele-corps { padding: 4px 16px 16px; border-top: 1px solid var(--line); }

.modele-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.modele-stop:last-of-type { border-bottom: none; }
.modele-stop .num { flex: none; width: 20px; color: var(--steel); font-size: 11px; }
.modele-stop .adr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modele-stop .q { flex: none; font-size: 11.5px; color: var(--steel); }
.modele-stop .chip-transp { flex: none; }
.stop-suppr {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stop-suppr:active { background: var(--red); color: #fff; border-color: var(--red); }

/* petit bouton discret sous la rangée principale */
.ligne-mini { margin-top: 12px; text-align: center; }
.btn-mini {
  background: none;
  border: none;
  padding: 6px 8px;
  color: var(--steel);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-mini:active { color: var(--lime-dark); }

/* ---------- menu hamburger (mobile) ---------- */
.burger {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform .18s ease, opacity .18s ease;
}
/* croix quand le menu est ouvert */
.topbar.nav-ouverte .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.topbar.nav-ouverte .burger span:nth-child(2) { opacity: 0; }
.topbar.nav-ouverte .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 599px) {
  .topbar { flex-wrap: nowrap; }
  .burger { display: flex; }
  .topbar nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--ink);
    border-bottom: 3px solid var(--lime);
    box-shadow: 0 10px 24px rgba(23,26,20,.35);
    z-index: 500;
  }
  .topbar.nav-ouverte nav { display: flex; }
  .topbar nav a {
    padding: 14px 18px;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: 14px;
  }
  .topbar nav a.on { background: var(--lime); color: var(--ink); }
}
