/* Écrans chauffeur : fiche, outils en course, confirmation de course, carte en direct, pont Android.
  Règles déplacées de booking.css (étape 7 de l’audit), dans leur ordre d’origine ; chargé juste après booking.css. */

:root {
  /* Palette du fichier : couleurs écrites en dur remplacées par ces variables (mêmes valeurs). */
  --c-black-a18: rgba(0, 0, 0, 0.18);
  --c-red-49: #d92d20;
  --c-white: #fff;
}
/* Section d’origine : Cashback (administrateur) */
.lm-map {
  height: 55vh;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0.6rem 0;
}
.lm-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  background: #12b76a;
  flex: none;
}
.lm-dot.lm-low {
  background: #f79009;
}
.lm-dot.lm-lost {
  background: var(--c-red-49);
}
.lm-dot.lm-old {
  background: #98a2b3;
}
.lm-check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Section d’origine : Fonctions chauffeur en course (V0168-95) */
.dx-block {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line, rgba(128, 128, 128, 0.3));
  border-radius: 14px;
}
.dx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.dx-call {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.dx-late {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.dx-hist {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.dx-bad {
  color: var(--c-danger-2);
  font-weight: 600;
}
.dx-sos {
  width: 100%;
  min-height: 52px;
  font-weight: 700;
  font-size: 1.05rem;
  border: 0;
  border-radius: 12px;
  background: #c1121f;
  color: var(--c-white);
  cursor: pointer;
}
.dx-sos:disabled {
  opacity: 0.6;
}
.dx-thread {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 4px 0;
  margin-bottom: 8px;
}
.dx-msg {
  margin: 0;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 85%;
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}
.dx-me {
  justify-self: end;
  background: rgba(11, 95, 255, 0.14);
}
.dx-other {
  justify-self: start;
  background: rgba(128, 128, 128, 0.16);
}

/* Section d’origine : Pont application Android */
.nb-dialog {
  max-width: min(520px, 94vw);
}
/* Contenu qui défile dans la fenêtre ; les boutons restent visibles en bas, le texte ne déborde jamais. */
.nb-dialog .nb-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px;
  overflow-wrap: anywhere;
}
.nb-dialog .nb-body > .site-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -16px;
  padding: 12px 16px;
  background: var(--theme-surface);
  border-top: 1px solid var(--theme-border);
}
.nb-step > div {
  min-width: 0;
}
.nb-text {
  max-height: 50vh;
  overflow: auto;
  margin-bottom: 12px;
  line-height: 1.5;
}
.nb-step {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}
.nb-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  flex-wrap: wrap;
}
.nb-bio {
  width: 100%;
  margin-bottom: 12px;
}

/* Section d’origine : confirmation de course (chauffeur) et picto « Confirmé » (administrateur) */
.rcf-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface, #fff);
  border-bottom: 2px solid var(--accent, #b8743a);
  padding: 10px max(16px, env(safe-area-inset-left, 0px)) 10px max(16px, env(safe-area-inset-right, 0px));
  box-shadow: 0 2px 10px var(--c-black-a18);
}
.rcf-act {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rcf-msg {
  font-size: 0.85rem;
  min-height: 1.1em;
}

/* Section d’origine : Fiche chauffeur (onglets Informations | Documents) */
.driver-fiche .df-siret {
  border: 1px solid #ecd9a0;
  background: #fbf6e8;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  margin: 0 0 0.6rem;
}
.driver-fiche .df-garage {
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  margin: 0.6rem 0;
}
.driver-fiche .df-lookup-btn {
  white-space: nowrap;
}
.driver-fiche .df-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  text-align: center;
  margin: 0.8rem 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--theme-border);
}

/* Section d’origine : V0168-51 : confirmation de course — motif du refus */
.rcf-why {
  margin: 0 0 8px;
}

/* Section d’origine : V0168-53 : règles de courses d'un chauffeur */
.df-rules {
  border: 1px solid var(--line, #d9d3ca);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 10px;
}
.df-rule-sec {
  display: grid;
  gap: 6px;
}
.df-rule-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-left: 22px;
}
.df-km {
  width: 76px !important;
  min-height: 36px;
  display: inline-block;
  margin: 0 4px;
}
.df-rules-msg {
  font-size: 0.85rem;
}
.df-rules .fiche-save {
  justify-self: start;
}

/* En-tête sur petit écran (téléphone, grands caractères) : il tient toujours dans la largeur, la page ne glisse
   plus de côté ; le nom de la société se réduit en premier, les boutons se compactent. */
.app > header {
  min-width: 0;
  overflow-x: clip;
}
.app > header > .brand {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}
.app > header > .round {
  flex: none;
}
@media (max-width: 430px) {
  .app > header {
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .app > header > #new-booking-top:not([hidden]),
  .app > header > #new-folder-top:not([hidden]) {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 84px;
    padding: 4px 6px;
    font-size: 0.72rem;
  }
}
@media (max-width: 360px) {
  .app > header > .brand strong,
  .app > header > .brand span {
    display: none;
  }
  .app > header > .brand svg {
    width: 48px;
  }
}
