/* =====================================================================
   Gestion des déchets — thème
   Bootstrap 5.3 + surcouche (clair / sombre)
   ===================================================================== */
:root, [data-bs-theme="light"] {
  --gd-accent: #059669;
  --gd-accent-hover: #047857;
  --gd-accent-soft: #ecfdf5;
  --gd-accent-text: #065f46;
  --gd-bg: #f5f7fa;
  --gd-surface: #ffffff;
  --gd-surface-2: #f8fafc;
  --gd-border: #e5e7eb;
  --gd-text: #0f172a;
  --gd-muted: #64748b;
  --gd-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
  --gd-sidebar-w: 256px;
  --gd-radius: 14px;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--gd-bg);
  --bs-body-color: var(--gd-text);
  --bs-border-color: var(--gd-border);
  --bs-primary: #059669;
  --bs-primary-rgb: 5, 150, 105;
  --bs-link-color: #047857;
  --bs-link-color-rgb: 4, 120, 87;
  --bs-link-hover-color: #065f46;
}
[data-bs-theme="dark"] {
  --gd-accent: #10b981;
  --gd-accent-hover: #34d399;
  --gd-accent-soft: rgba(16, 185, 129, .12);
  --gd-accent-text: #6ee7b7;
  --gd-bg: #0b1120;
  --gd-surface: #111827;
  --gd-surface-2: #0f172a;
  --gd-border: #1f2937;
  --gd-text: #e5e7eb;
  --gd-muted: #94a3b8;
  --gd-shadow: none;
  --bs-body-bg: var(--gd-bg);
  --bs-body-color: var(--gd-text);
  --bs-border-color: var(--gd-border);
  --bs-primary: #10b981;
  --bs-primary-rgb: 16, 185, 129;
  --bs-link-color: #34d399;
  --bs-link-color-rgb: 52, 211, 153;
}

body { background: var(--gd-bg); color: var(--gd-text); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.text-muted, .form-text { color: var(--gd-muted) !important; }
h1, .h1, h2, .h2, h3, .h3 { letter-spacing: -.02em; font-weight: 650; }

/* ---------- Boutons ---------- */
.btn { border-radius: 10px; font-weight: 500; padding: .5rem .9rem; }
.btn-sm { border-radius: 8px; padding: .3rem .65rem; }
.btn-primary, .btn-success { --bs-btn-bg: var(--gd-accent); --bs-btn-border-color: var(--gd-accent); --bs-btn-hover-bg: var(--gd-accent-hover); --bs-btn-hover-border-color: var(--gd-accent-hover); --bs-btn-active-bg: var(--gd-accent-hover); --bs-btn-disabled-bg: var(--gd-accent); --bs-btn-disabled-border-color: var(--gd-accent); color: #fff; }
.btn-soft { background: var(--gd-surface); border: 1px solid var(--gd-border); color: var(--gd-text); }
.btn-soft:hover { background: var(--gd-surface-2); border-color: #cbd5e1; color: var(--gd-text); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Formulaires ---------- */
.form-control, .form-select { border-radius: 10px; border-color: var(--gd-border); background-color: var(--gd-surface); padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--gd-accent); box-shadow: 0 0 0 .2rem rgba(5, 150, 105, .15); }
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .3rem; }

.input-icone { position: relative; }
.input-icone > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--gd-muted); pointer-events: none; }
.input-icone > .form-control { padding-left: 2.3rem; }

/* ---------- Mise en page ---------- */
.gd-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--gd-sidebar-w); z-index: 1030;
  background: var(--gd-surface); border-right: 1px solid var(--gd-border);
  display: flex; flex-direction: column; overflow-y: auto;
}
.gd-marque { display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.25rem 1rem; color: var(--gd-text); font-weight: 700; letter-spacing: -.02em; }
.gd-marque .logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #10b981, #047857); color: #fff; display: grid; place-items: center; font-size: 1.15rem; box-shadow: 0 4px 12px rgba(5, 150, 105, .35); }
.gd-marque small { display: block; font-weight: 500; color: var(--gd-muted); font-size: .72rem; letter-spacing: 0; }
.gd-section { padding: .9rem 1.25rem .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gd-muted); font-weight: 600; }
.gd-nav { list-style: none; padding: 0 .75rem; margin: 0; }
.gd-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 10px; color: var(--gd-text); font-weight: 500; font-size: .92rem; opacity: .85; }
.gd-nav a i { font-size: 1.05rem; color: var(--gd-muted); }
.gd-nav a:hover { background: var(--gd-surface-2); opacity: 1; }
.gd-nav a.actif { background: var(--gd-accent-soft); color: var(--gd-accent-text); opacity: 1; }
.gd-nav a.actif i { color: var(--gd-accent); }
.gd-profil { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid var(--gd-border); display: flex; align-items: center; gap: .7rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gd-accent-soft); color: var(--gd-accent-text); display: grid; place-items: center; font-weight: 600; font-size: .85rem; flex-shrink: 0; }

.gd-main { margin-left: var(--gd-sidebar-w); min-height: 100vh; }
.gd-topbar {
  position: sticky; top: 0; z-index: 1020; height: 64px; padding: 0 1.75rem;
  display: flex; align-items: center; gap: 1rem;
  background: color-mix(in srgb, var(--gd-bg) 85%, transparent); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--gd-border);
}
.gd-topbar .recherche { max-width: 420px; flex: 1; }
.gd-contenu { padding: 1.75rem; max-width: 1480px; }
.gd-entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.gd-entete h1 { margin: 0; font-size: 1.6rem; }
.gd-entete .sous-titre { color: var(--gd-muted); margin-top: .2rem; }
.fil { font-size: .85rem; color: var(--gd-muted); margin-bottom: .35rem; display: inline-flex; align-items: center; gap: .3rem; }
.fil:hover { color: var(--gd-accent); }

/* ---------- Cartes ---------- */
.card { border: 1px solid var(--gd-border); border-radius: var(--gd-radius); background: var(--gd-surface); box-shadow: var(--gd-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--gd-border); padding: .9rem 1.2rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.card-header .lien { margin-left: auto; font-weight: 500; font-size: .85rem; }
.card-body { padding: 1.2rem; }
.list-group-item { background: transparent; border-color: var(--gd-border); padding: .8rem 1.2rem; }
.list-group-item-action:hover { background: var(--gd-surface-2); }
.vide { padding: 2.5rem 1rem; text-align: center; color: var(--gd-muted); }
.vide i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ---------- KPI ---------- */
.kpi { padding: 1.1rem 1.2rem; display: flex; gap: 1rem; align-items: center; height: 100%; }
.kpi .icone { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.kpi .valeur { font-size: 1.65rem; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.kpi .libelle { color: var(--gd-muted); font-size: .82rem; }
.ton-vert   { background: #dcfce7; color: #15803d; }
.ton-bleu   { background: #dbeafe; color: #1d4ed8; }
.ton-rouge  { background: #fee2e2; color: #b91c1c; }
.ton-ambre  { background: #fef3c7; color: #b45309; }
.ton-violet { background: #ede9fe; color: #6d28d9; }
.ton-gris   { background: #f1f5f9; color: #475569; }
[data-bs-theme="dark"] .ton-vert   { background: rgba(34,197,94,.15); color: #4ade80; }
[data-bs-theme="dark"] .ton-bleu   { background: rgba(59,130,246,.15); color: #60a5fa; }
[data-bs-theme="dark"] .ton-rouge  { background: rgba(239,68,68,.15); color: #f87171; }
[data-bs-theme="dark"] .ton-ambre  { background: rgba(245,158,11,.15); color: #fbbf24; }
[data-bs-theme="dark"] .ton-violet { background: rgba(139,92,246,.15); color: #a78bfa; }
[data-bs-theme="dark"] .ton-gris   { background: rgba(148,163,184,.12); color: #cbd5e1; }

/* ---------- Pastilles de statut ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.sans-point::before { display: none; }
.pill-primary { background: #dbeafe; color: #1d4ed8; }
.pill-info { background: #e0f2fe; color: #0369a1; }
.pill-warning { background: #fef3c7; color: #b45309; }
.pill-success { background: #dcfce7; color: #15803d; }
.pill-danger { background: #fee2e2; color: #b91c1c; }
.pill-secondary, .pill-light { background: #f1f5f9; color: #475569; }
.pill-dark { background: #e2e8f0; color: #1e293b; }
[data-bs-theme="dark"] .pill-primary { background: rgba(59,130,246,.15); color: #93c5fd; }
[data-bs-theme="dark"] .pill-info { background: rgba(14,165,233,.15); color: #7dd3fc; }
[data-bs-theme="dark"] .pill-warning { background: rgba(245,158,11,.15); color: #fcd34d; }
[data-bs-theme="dark"] .pill-success { background: rgba(34,197,94,.15); color: #86efac; }
[data-bs-theme="dark"] .pill-danger { background: rgba(239,68,68,.15); color: #fca5a5; }
[data-bs-theme="dark"] .pill-secondary, [data-bs-theme="dark"] .pill-light, [data-bs-theme="dark"] .pill-dark { background: rgba(148,163,184,.12); color: #cbd5e1; }
.puce-type { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.puce-type::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c, #94a3b8); }

/* ---------- Tableaux ---------- */
.table { --bs-table-bg: transparent; margin: 0; }
.table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gd-muted); font-weight: 600; background: var(--gd-surface-2); border-bottom: 1px solid var(--gd-border); padding: .7rem 1rem; white-space: nowrap; }
.table > tbody td { padding: .8rem 1rem; border-color: var(--gd-border); vertical-align: middle; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--gd-surface-2); }
tr.cliquable { cursor: pointer; }
.cellule-titre { font-weight: 500; }
.cellule-sous { font-size: .8rem; color: var(--gd-muted); }

/* ---------- Filtres ---------- */
.barre-filtres { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.barre-filtres .form-control, .barre-filtres .form-select { width: auto; min-width: 160px; }
.barre-filtres .recherche-large { flex: 1; min-width: 220px; }
.onglets { display: inline-flex; background: var(--gd-surface); border: 1px solid var(--gd-border); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.onglets a { padding: .4rem .85rem; border-radius: 9px; color: var(--gd-muted); font-weight: 500; font-size: .875rem; }
.onglets a.actif { background: var(--gd-accent-soft); color: var(--gd-accent-text); }

/* ---------- Fiche ---------- */
.fiche dt { font-weight: 500; color: var(--gd-muted); font-size: .85rem; }
.fiche dd { margin-bottom: .8rem; }
.carte-mini { height: 280px; border-radius: var(--gd-radius); overflow: hidden; border: 1px solid var(--gd-border); }
.alerte-douce { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px; background: #eff6ff; color: #1e40af; font-size: .9rem; }
[data-bs-theme="dark"] .alerte-douce { background: rgba(59,130,246,.1); color: #93c5fd; }
.chronologie { list-style: none; padding: 0; margin: 0; }
.chronologie li { position: relative; padding: 0 0 1rem 1.5rem; }
.chronologie li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gd-accent); }
.chronologie li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--gd-border); }
.chronologie li:last-child::after { display: none; }

/* ---------- Carte ---------- */
#carte { height: calc(100vh - 230px); min-height: 460px; border-radius: var(--gd-radius); border: 1px solid var(--gd-border); }
.leaflet-container { font-family: inherit; }
/* Mode sombre : plan inversé (l'IGN ne propose pas de style sombre) */
.tuiles-sombres { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.marqueur { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.marqueur.losange { border-radius: 3px; transform: rotate(45deg); }

/* ---------- Ma journée (terrain) ---------- */
.tache { border-radius: var(--gd-radius); }
.tache .heure { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.tache .actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.tache .actions .btn { display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .78rem; padding: .55rem .25rem; }
.tache .actions .btn i { font-size: 1.15rem; }

/* ---------- Messages ---------- */
.toast-zone { position: fixed; top: 76px; right: 1.5rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.toast-zone .alert { border: 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.15); }

/* ---------- Connexion ---------- */
.page-connexion { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.page-connexion .visuel { background: linear-gradient(150deg, #064e3b, #059669 60%, #34d399); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.page-connexion .visuel::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; background: rgba(255,255,255,.08); }
.page-connexion .formulaire { display: grid; place-items: center; padding: 2rem; background: var(--gd-surface); }

/* ---------- Mobile ---------- */
.gd-barre-mobile { display: none; }
@media (max-width: 991.98px) {
  .gd-sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .gd-sidebar.ouverte { transform: none; }
  .gd-voile { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 1025; display: none; }
  .gd-voile.visible { display: block; }
  .gd-main { margin-left: 0; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .gd-topbar { padding: 0 1rem; height: 58px; }
  .gd-topbar .recherche { display: none; }
  .gd-contenu { padding: 1rem; }
  .gd-entete h1 { font-size: 1.35rem; }
  .gd-barre-mobile {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: var(--gd-surface); border-top: 1px solid var(--gd-border); padding-bottom: env(safe-area-inset-bottom);
  }
  .gd-barre-mobile a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem; font-size: .68rem; color: var(--gd-muted); font-weight: 500; }
  .gd-barre-mobile a i { font-size: 1.25rem; }
  .gd-barre-mobile a.actif { color: var(--gd-accent); }
  .toast-zone { left: 1rem; right: 1rem; top: 66px; max-width: none; }
  #carte { height: calc(100vh - 260px); min-height: 360px; }
  .page-connexion { grid-template-columns: 1fr; }
  .page-connexion .visuel { display: none; }
  .table-mobile-cartes thead { display: none; }
  .table-mobile-cartes tr { display: block; padding: .75rem 1rem; border-bottom: 1px solid var(--gd-border); }
  .table-mobile-cartes td { display: inline-block; border: 0 !important; padding: .1rem .5rem .1rem 0 !important; }
  .table-mobile-cartes td.cache-mobile { display: none; }
  .table-mobile-cartes td.ligne-mobile { display: block; }
}
@media (min-width: 992px) { .seulement-mobile { display: none !important; } }

/* ---------- Recherche instantanée ---------- */
form.recherche, .recherche-page { position: relative; }
.suggestions {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1050;
  background: var(--gd-surface); border: 1px solid var(--gd-border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16); max-height: min(70vh, 560px); overflow-y: auto; padding: .35rem;
  min-width: min(520px, 92vw);
}
.suggestions.ouvert { display: block; }
.suggestions .groupe + .groupe { border-top: 1px solid var(--gd-border); margin-top: .25rem; padding-top: .25rem; }
.suggestions .groupe-titre { display: flex; align-items: center; gap: .4rem; padding: .45rem .65rem .25rem; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--gd-muted); font-weight: 600; }
.suggestions .groupe-titre span { margin-left: auto; background: var(--gd-surface-2); border-radius: 999px; padding: 0 .45rem; }
.suggestions .suggestion { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 9px; color: var(--gd-text); }
.suggestions .suggestion:hover, .suggestions .suggestion.actif { background: var(--gd-accent-soft); }
.suggestions .s-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggestions .s-titre { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions .s-sous { font-size: .8rem; color: var(--gd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions mark { background: #fef08a; color: inherit; padding: 0; border-radius: 2px; }
[data-bs-theme="dark"] .suggestions mark { background: rgba(250, 204, 21, .35); }
.suggestions .s-vide { padding: .9rem .75rem; color: var(--gd-muted); font-size: .9rem; }
.suggestions .s-tout { border-top: 1px solid var(--gd-border); border-radius: 0 0 9px 9px; margin-top: .25rem; font-size: .85rem; color: var(--gd-accent-text); }
.raccourci { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .7rem; color: var(--gd-muted);
  border: 1px solid var(--gd-border); border-radius: 6px; padding: 0 .35rem; pointer-events: none; }
@media (max-width: 991.98px) { .raccourci { display: none; } .suggestions { min-width: 0; } }

/* ---------- Recherche instantanée ---------- */
form.recherche, .recherche-page { position: relative; }
.suggestions {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1050;
  background: var(--gd-surface); border: 1px solid var(--gd-border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16); max-height: min(70vh, 560px); overflow-y: auto; padding: .35rem;
  min-width: min(520px, 92vw);
}
.suggestions.ouvert { display: block; }
.suggestions .groupe + .groupe { border-top: 1px solid var(--gd-border); margin-top: .25rem; padding-top: .25rem; }
.suggestions .groupe-titre { display: flex; align-items: center; gap: .4rem; padding: .45rem .65rem .25rem; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--gd-muted); font-weight: 600; }
.suggestions .groupe-titre span { margin-left: auto; background: var(--gd-surface-2); border-radius: 999px; padding: 0 .45rem; }
.suggestions .suggestion { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 9px; color: var(--gd-text); }
.suggestions .suggestion:hover, .suggestions .suggestion.actif { background: var(--gd-accent-soft); }
.suggestions .s-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggestions .s-titre { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions .s-sous { font-size: .8rem; color: var(--gd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions mark { background: #fef08a; color: inherit; padding: 0; border-radius: 2px; }
[data-bs-theme="dark"] .suggestions mark { background: rgba(250, 204, 21, .35); }
.suggestions .s-vide { padding: .9rem .75rem; color: var(--gd-muted); font-size: .9rem; }
.suggestions .s-tout { border-top: 1px solid var(--gd-border); border-radius: 0 0 9px 9px; margin-top: .25rem; font-size: .85rem; color: var(--gd-accent-text); }
.raccourci { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .7rem; color: var(--gd-muted);
  border: 1px solid var(--gd-border); border-radius: 6px; padding: 0 .35rem; pointer-events: none; }
@media (max-width: 991.98px) { .raccourci { display: none; } .suggestions { min-width: 0; } }

/* ---------- Cases à cocher : taille fixe, zone de clic confortable sur mobile ---------- */
.form-check-input { width: 1.2em; height: 1.2em; flex-shrink: 0; margin-top: .15em; cursor: pointer; }
.form-check-input[type="checkbox"] { border-radius: .3em; }
.form-check-label { cursor: pointer; }
@media (max-width: 991.98px) {
  .form-check-input { width: 1.45em; height: 1.45em; }
  .form-check { min-height: 2rem; display: flex; align-items: center; gap: .55rem; padding-left: 0; }
  .form-check .form-check-input { float: none; margin: 0; }
}

/* ---------- Carte : alertes camions (jamais regroupées) ---------- */
.alerte-camion { width: 26px; height: 26px; border-radius: 50%; background: #dc2626; color: #fff; display: grid; place-items: center;
  font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); }
.alerte-camion:not(.en-cours) { background: #f87171; opacity: .85; }
.alerte-camion.en-cours { animation: pulsation 1.8s ease-out infinite; }
@keyframes pulsation { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.55), 0 1px 5px rgba(0,0,0,.45); }
  70% { box-shadow: 0 0 0 14px rgba(220,38,38,0), 0 1px 5px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0), 0 1px 5px rgba(0,0,0,.45); } }
@media (prefers-reduced-motion: reduce) { .alerte-camion.en-cours { animation: none; } }

/* ---------- Cases à cocher, boutons radio, interrupteurs (règle unique) ----------
   Bootstrap place la case en flottant avec une marge négative : dès qu'un conteneur n'a pas le
   retrait prévu, la case sort du cadre. Ici : mise en page flex, aucune marge négative. */
.form-check { display: flex; align-items: flex-start; gap: .6rem; padding-left: 0; min-height: 0; margin-bottom: .3rem; }
.form-check .form-check-input { float: none; margin: .15em 0 0; flex-shrink: 0; }
.form-check-label { cursor: pointer; line-height: 1.4; }
.form-check-input { width: 1.15em; height: 1.15em; cursor: pointer; background-color: var(--gd-surface);
  border: 1.5px solid #94a3b8; }
.form-check-input[type="checkbox"] { border-radius: .3em; }
.form-check-input:checked { background-color: var(--gd-accent); border-color: var(--gd-accent); }
.form-check-input:focus { border-color: var(--gd-accent); box-shadow: 0 0 0 .2rem rgba(5, 150, 105, .2); }
.form-switch .form-check-input { width: 2.1em; border-radius: 2em; }
[data-bs-theme="dark"] .form-check-input { border-color: #64748b; }
@media (max-width: 991.98px) {
  .form-check-input { width: 1.35em; height: 1.35em; }
  .form-switch .form-check-input { width: 2.4em; }
  .form-check { min-height: 1.9rem; align-items: center; }
  .form-check .form-check-input { margin-top: 0; }
}
/* Pieds de formulaires : boutons empilés pleine largeur sur mobile */
@media (max-width: 575.98px) {
  .pied-actions { flex-direction: column-reverse; align-items: stretch !important; }
  .pied-actions > *, .pied-actions .btn { width: 100%; }
  .pied-actions > div { display: flex; flex-direction: column-reverse; gap: .5rem; }
}
/* Barre de recherche : le texte ne passe plus sous « Ctrl K » */
form.recherche .form-control { padding-right: 4.6rem; text-overflow: ellipsis; }
/* Interrupteurs : Bootstrap leur applique un retrait négatif spécifique (.form-switch) → neutralisé */
.form-check.form-switch { padding-left: 0; }
.form-check.form-switch .form-check-input { margin-left: 0; float: none; }
.case-option { padding: .5rem .85rem !important; align-items: center; background: var(--gd-surface); }
.case-option:has(input:checked) { border-color: var(--gd-accent) !important; background: var(--gd-accent-soft); }
/* Filtres : partage de la largeur sur mobile, texte tronqué proprement */
@media (max-width: 991.98px) {
  .barre-filtres > .form-select, .barre-filtres > .form-control, .barre-filtres form > .form-select { min-width: 0; flex: 1 1 140px; }
  .barre-filtres .recherche-large { flex: 1 1 100%; max-width: none !important; }
  .barre-filtres .form-select { text-overflow: ellipsis; padding-right: 2.2rem; }
  /* Cartes mobiles : libellé devant les valeurs chiffrées */
  .table-mobile-cartes td[data-libelle]::before { content: attr(data-libelle) " : "; color: var(--gd-muted); font-size: .78rem; }
}
@media (max-width: 991.98px) { .barre-filtres .recherche-large { width: 100%; } }

/* ---------- Pages d'erreur ---------- */
.page-erreur { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; gap: 1.5rem; background: var(--gd-bg); }
.gd-contenu .carte-erreur { margin: 3rem auto; }
.marque-erreur { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--gd-text); }
.marque-erreur img { border-radius: 10px; }
.carte-erreur { max-width: 560px; width: 100%; text-align: center; background: var(--gd-surface); border: 1px solid var(--gd-border);
  border-radius: 20px; padding: 2.5rem 2rem; box-shadow: var(--gd-shadow); }
.carte-erreur .code-erreur { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1rem; }
.carte-erreur .numero-erreur { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gd-muted); }
.carte-erreur h1 { font-size: 1.5rem; margin: .4rem 0 .8rem; }
.carte-erreur .message-erreur { color: var(--gd-text); margin-bottom: .6rem; }
.carte-erreur .detail-erreur { color: var(--gd-muted); font-size: .9rem; }
.carte-erreur .actions-erreur { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
@media (max-width: 575.98px) { .carte-erreur { padding: 2rem 1.2rem; } .carte-erreur .actions-erreur .btn { flex: 1 1 100%; } }
/* Indicateurs : icône à gauche du chiffre (la classe .card de Bootstrap impose une colonne) */
.card.kpi { flex-direction: row; }
.kpi > div { min-width: 0; }

/* ---------- Notification d'appel entrant (3CX) ---------- */
.notif-appel { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1085; width: min(380px, calc(100vw - 2rem)); padding: 1rem 1.1rem;
  background: var(--gd-surface); border: 1px solid var(--gd-border); border-left: 4px solid var(--gd-accent); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .2); animation: arrivee .25s ease-out; }
.notif-appel .icone-appel { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--gd-accent-soft); color: var(--gd-accent); font-size: 1.15rem; animation: sonnerie 1.2s ease-in-out infinite; }
@keyframes arrivee { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sonnerie { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .notif-appel, .notif-appel .icone-appel { animation: none; } }
@media (max-width: 991.98px) { .notif-appel { bottom: calc(76px + env(safe-area-inset-bottom)); right: 1rem; } }
