/* SD ONE · lot 109 v2 (25/10/2026 : panneau de la course, actions groupées et alertes au centre) — v1 24/10/2026, Hassan. Bleu nuit / bleu / argent, jamais de doré. Affichage seulement.
   A) Colonne « Client / Passagers » : passager principal + N, téléphone en petit dessous (v2-lot109-client-fenetres.js).
      Les textes d'origine restent dans la case pour les autres modules, masqués seulement quand la ligne du lot 109 est posée. */
html body td.c-cli .cli[data-sd109] > span:not(.sd109-l) { display: none !important; }
/* v2 : ces anciens textes portent data-sd-ancien (client-passager-texte, client-contact-texte) ; un futur réglage admin
   « Afficher les anciens éléments » pourra les remontrer avec : html.sd-anciens-visibles [data-sd-ancien] { display: revert !important; } */
html body td.c-cli .cli > span.sd109-l { display: flex !important; flex-direction: column; gap: 1px; min-width: 0; white-space: normal; }
html body td.c-cli .sd109-l > .sd109-p { display: flex !important; align-items: baseline; gap: 4px; min-width: 0; color: var(--texte2); }
html body td.c-cli .sd109-l .sd109-nom { display: block !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
html body td.c-cli .sd109-l .sd109-n { flex: none; display: inline-block; padding: 0 6px; border-radius: 8px; background: #E6EEF9; color: #1E5AA8; font: 700 11px/1.5 Manrope, sans-serif; white-space: nowrap; }
html body td.c-cli .sd109-l > .sd109-t { display: block !important; font-size: 11.5px; line-height: 1.35; color: var(--texte2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* B) Fenêtres de modification : au milieu de l'écran, fixes pendant le défilement, contenu qui défile à l'intérieur.
      Même recette que la boîte de dialogue du navigateur (inset 0 + marges automatiques + hauteur ajustée) :
      pas de transform, donc les listes en position fixe à l'intérieur (adresses, prestations) restent bien placées.
      Les positions écrites par les lots (sous la case cliquée, en bas sur téléphone) sont remplacées ; rien d'autre ne change.
   23h21 (Hassan) : modèle = la fenêtre « Véhicule » ; toutes les fenêtres et encadrés au milieu, en entier, jamais coupés
   en faisant défiler ; seul l'intérieur défile. Les cartes de la fenêtre Véhicule ne sont pas touchées (lot 112).
   Restent accrochés à leur bouton (ce sont des menus ou des listes de saisie, pas des fenêtres) : menu ⋯, menus de ligne,
   listes d'adresses et de prestations sous un champ, calendrier rond de la bannière (#v2-calpop).
   Le petit choix de date du bouton « Aujourd'hui » (.sd49-cal, lot 49) est un encadré : il est centré comme les autres. */
/* lot 48 : petites fenêtres par case du planning (Client, Date, Horaires, Itinéraire, Véhicule, Type, Infos…) */
html body .sd48-voile > .sd48-f,
html body .sd48-voile > .sd48-f.sd48-bas {
  position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; margin: auto !important;
  height: fit-content !important; max-height: calc(100vh - 32px) !important; max-height: calc(100dvh - 32px) !important;
  max-width: calc(100vw - 16px) !important;
}
/* lot 15 / tableau lisible : liste de choix d'une case (Type, Chauffeur…), lot 64 : prix TTC d'une ligne de tarif,
   lot 19 : encadré « État de la course », tableau lisible : encadré « Itinéraire » (étapes), lot 49 : petit calendrier.
   Pas de voile chez eux : un large contour sombre (outline) en tient lieu (ne bloque aucun clic, le clic dehors ferme comme avant). */
html body .sd-lc,
html body .sd64-boite,
html body .sd19-et,
html body .sd-etapes-pop,
html body .sd49-cal {
  position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; margin: auto !important;
  height: fit-content !important; max-height: calc(100vh - 32px) !important; max-height: calc(100dvh - 32px) !important;
  max-width: calc(100vw - 16px) !important; overflow: auto !important; overscroll-behavior: contain;
  box-shadow: 0 18px 44px rgba(3, 10, 22, .38) !important; outline: 100vmax solid rgba(3, 10, 22, .22) !important; outline-offset: 0 !important;
}
/* Téléphone (≤ 640 px) : largeur de l'écran moins 16 px, boutons d'au moins 44 px */
@media (max-width: 640px) {
  html body .sd48-voile > .sd48-f,
  html body .sd48-voile > .sd48-f.sd48-bas,
  html body .sd-lc,
  html body .sd64-boite,
  html body .sd19-et,
  html body .sd-etapes-pop { width: calc(100vw - 16px) !important; }
  html body .ed-voile { padding-left: 8px !important; padding-right: 8px !important; }
  html body .ed-voile > .ed { width: 100% !important; max-width: calc(100vw - 16px) !important; box-sizing: border-box; }
  html body .fen-voile { padding: 8px !important; }
  html body .fen-voile > .fen { max-height: calc(100vh - 16px) !important; max-height: calc(100dvh - 16px) !important; }
  html body .sd48-p .bt, html body .sd48-p button, html body .sd48-x,
  html body .sd-lc-p button, html body .sd-lc-x, html body .sd64-boite button, html body .sd19-et-i, html body .sd19-et-x, html body .sd-ep-x,
  html body .fen .fp .bt, html body .fen .ft button, html body .ed .pied .bt { min-height: 44px !important; }
  html body .sd-lc-x, html body .fen .ft button, html body .sd19-et-x, html body .sd-ep-x { min-width: 44px !important; }
}

/* ---------- v2 (25/10/2026 07h46, Hassan : « Fiche complète » s'ouvrait coupée à droite) ----------
   Règle redite : TOUTES les fenêtres et panneaux s'ouvrent au milieu de l'écran, en entier ; seul l'intérieur défile.
   1) Panneau de la course (#v2-pan : « Fiche complète », ⋯ « Ouvrir le détail », pastille vol…) : n'est plus collé à droite
      sous la barre du menu ; il s'ouvre au centre, par-dessus la barre, avec un voile. Contenu et boutons inchangés,
      fermeture inchangée (croix, Échap). La page ne réserve plus de place à droite pour lui. */
html body #v2-pan.ouvert {
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; margin: auto !important;
  width: min(560px, calc(100vw - 32px)) !important; max-width: calc(100vw - 16px) !important;
  height: fit-content !important; max-height: calc(100vh - 32px) !important; max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain;
  transform: none !important; transition: none !important; z-index: 83 !important;
  border: 1px solid var(--trait) !important; border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(3, 10, 22, .45) !important;
}
html body #v2-pan:not(.ouvert) { transition: none !important; }
html body.sd62-wa-ouvert #v2-pan.ouvert { right: var(--sd62-wa) !important; width: min(560px, calc(100vw - var(--sd62-wa) - 32px)) !important; }
@media (min-width: 1600px) { html body.pan-ouvert .v2-contenu { padding-right: 20px !important; } }
@media (max-width: 1599px) { html body.pan-ouvert .pl-nav { margin-right: 0 !important; } }
/* 2) Actions groupées (.massif, ouvert depuis la barre des courses cochées) et Alertes (#fil-tiroir, cloche du haut) :
      au centre aussi, en entier, l'intérieur défile. */
html body .massif.ouvert,
html body .fil-tiroir.ouvert {
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; margin: auto !important;
  height: fit-content !important; max-height: calc(100vh - 32px) !important; max-height: calc(100dvh - 32px) !important;
  max-width: calc(100vw - 32px) !important; transform: none !important; transition: none !important;
  box-shadow: 0 20px 60px rgba(3, 10, 22, .45) !important;
}
html body .massif.ouvert { width: fit-content !important; border-radius: 16px; border: 1px solid rgba(196, 201, 208, .25); z-index: 82 !important; }
html body .massif:not(.ouvert) { transition: none !important; }
html body .fil-tiroir.ouvert { width: min(440px, calc(100vw - 32px)) !important; z-index: 82 !important; }
html body.sd62-wa-ouvert .massif.ouvert, html body.sd62-wa-ouvert .fil-tiroir.ouvert { right: var(--sd62-wa) !important; max-width: calc(100vw - var(--sd62-wa) - 32px) !important; }
@media (max-width: 760px) { html body .massif.ouvert { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; } }
@media (max-width: 640px) {
  html body #v2-pan.ouvert, html body .fil-tiroir.ouvert { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px) !important; }
  html body #v2-pan .pan-x, html body .massif .ferme { min-width: 44px !important; min-height: 44px !important; }
}
/* 3) Encadré « État de la course » (lot 19, qui le ferme dès que la page défile) : tant qu'il est ouvert, la page
      ne défile plus (comme sous les autres fenêtres) ; il reste donc ouvert et fixe au milieu. */
html:has(> body > .sd19-et), html:has(> body > .sd19-et) > body { overflow: hidden !important; }
/* 4) Voile sous le panneau de la course, les actions groupées et les alertes : ces trois-là ont un flou d'arrière-plan
      (backdrop-filter) qui empêche une ombre ou un contour de servir de voile ; il est posé sur la page elle-même.
      Il ne bloque aucun clic (pointer-events: none). */
html:has(#v2-pan.ouvert)::before, html:has(.massif.ouvert)::before, html:has(.fil-tiroir.ouvert)::before {
  content: ""; position: fixed; inset: 0; z-index: 81; background: rgba(3, 10, 22, .42); pointer-events: none;
}
html:has(body.sd62-wa-ouvert):has(#v2-pan.ouvert, .massif.ouvert, .fil-tiroir.ouvert)::before { right: var(--sd62-wa); }
/* 5) WhatsApp ouvert (lot 62) : toutes les fenêtres se centrent dans l'espace qui reste à gauche du panneau WhatsApp */
html body.sd62-wa-ouvert .sd48-voile > .sd48-f,
html body.sd62-wa-ouvert .sd-lc, html body.sd62-wa-ouvert .sd64-boite, html body.sd62-wa-ouvert .sd19-et,
html body.sd62-wa-ouvert .sd-etapes-pop, html body.sd62-wa-ouvert .sd49-cal {
  right: var(--sd62-wa) !important; max-width: calc(100vw - var(--sd62-wa) - 16px) !important;
}
