/* ==========================================================================
   LTP v2 — Thème « Chantier »
   Asphalte, marquage routier jaune, rouge signalisation (couleurs du logo).
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/inter/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --asphalt: #1b1e22;
  --asphalt-2: #24282d;
  --asphalt-3: #31363c;
  --marking: #ffd400;
  --marking-ink: #2a2300;
  --signal: #d42a2f;
  --concrete: #f3f2ee;
  --surface: #ffffff;
  --line: #e3e1da;
  --ink: #1b1e22;
  --muted: #6a6e75;
  --ok: #1f8a4c;
  --ok-bg: #e7f5ec;
  --ko: #c4262c;
  --ko-bg: #fbe9e9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .06), 0 4px 16px rgba(20, 22, 26, .05);
  --sidebar-w: 264px;

  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--concrete);
  --bs-border-color: var(--line);
  --bs-link-color: #1d4f91;
  --bs-link-color-rgb: 29, 79, 145;
  --bs-link-hover-color: #0f2f59;
  --bs-border-radius: 10px;
  --bs-focus-ring-color: rgba(255, 212, 0, .45);
}

html { font-size: 15px; }
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
.tnum, .table td.num, .kpi-value { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Shell */
body.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--asphalt) !important;
  color: #c9ccd1;
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
}
@media (max-width: 991.98px) {
  .sidebar.offcanvas-lg { --bs-offcanvas-width: var(--sidebar-w); --bs-offcanvas-bg: var(--asphalt); }
}

.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 14px; }
.brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-logo { background: #fff; border-radius: 10px; padding: 5px 7px; display: inline-flex; box-shadow: 0 0 0 3px rgba(255, 212, 0, .25); }
.brand-logo img { height: 34px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text span { font-size: .78rem; color: #9aa0a8; text-transform: uppercase; letter-spacing: .08em; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #7c828b; padding: 16px 12px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0;
  color: #c9ccd1; text-decoration: none; border-radius: 10px;
  font-weight: 500; position: relative;
  transition: background .15s, color .15s;
}
.nav-item i { font-size: 1.1rem; width: 22px; text-align: center; color: #8d939b; transition: color .15s; }
.nav-item:hover { background: var(--asphalt-2); color: #fff; }
.nav-item:hover i { color: #fff; }
.nav-item.active { background: var(--asphalt-3); color: #fff; }
.nav-item.active i { color: var(--marking); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  background: var(--marking); border-radius: 0 4px 4px 0;
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin: 0 12px 14px; padding: 10px; border-radius: 12px; background: var(--asphalt-2);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--marking); color: var(--marking-ink); font-weight: 700; font-size: .85rem;
}
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.who strong { color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: #8d939b; font-size: .75rem; }
.btn-sidebar { color: #c9ccd1; }
.btn-sidebar:hover { color: var(--marking); background: var(--asphalt-3); }

/* Marquage routier décoratif */
.road-stripe {
  height: 6px; flex-shrink: 0;
  background: repeating-linear-gradient(90deg, var(--marking) 0 28px, transparent 28px 46px);
  opacity: .9;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 26px 32px 18px;
}
.topbar-title { flex: 1; min-width: 220px; }
.topbar h1 { font-size: 1.75rem; font-weight: 750; letter-spacing: -.025em; margin: 0; }
.topbar .subtitle { color: var(--muted); margin: 4px 0 0; }
.topbar .breadcrumb { margin-bottom: 4px; font-size: .82rem; --bs-breadcrumb-divider-color: #a3a6ab; }
.topbar .breadcrumb a { color: var(--muted); text-decoration: none; }
.topbar .breadcrumb a:hover { color: var(--ink); }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.content { padding: 4px 32px 32px; flex: 1; max-width: 1280px; width: 100%; }
.content-wide { max-width: none; }

.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 32px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line);
}

@media (max-width: 575.98px) {
  .topbar { padding: 16px 16px 12px; align-items: center; }
  .topbar h1 { font-size: 1.4rem; }
  .content { padding: 4px 16px 24px; }
  .footer { padding: 14px 16px; }
}

/* ------------------------------------------------------------------ Cartes */
.card {
  --bs-card-border-color: var(--line);
  --bs-card-border-radius: var(--radius);
  --bs-card-inner-border-radius: calc(var(--radius) - 1px);
  --bs-card-cap-bg: transparent;
  --bs-card-bg: #fff;
  background-color: #fff;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-header h2, .card-header .h2 { font-size: 1.02rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card-header .card-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 20px; }
.chip-icon {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: #fff6c2; color: #6b5800; font-size: 1.05rem;
}
.chip-icon.dark { background: var(--asphalt); color: var(--marking); }
.chip-icon.red { background: var(--ko-bg); color: var(--ko); }
.chip-icon.green { background: var(--ok-bg); color: var(--ok); }

/* ------------------------------------------------------------------ KPI */
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); height: 100%;
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi-value { font-size: 1.9rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi.dark { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.kpi.dark .kpi-label, .kpi.dark .kpi-sub { color: #9aa0a8; }
.kpi.dark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: repeating-linear-gradient(90deg, var(--marking) 0 22px, transparent 22px 36px);
}
.text-ok { color: var(--ok) !important; }
.text-ko { color: var(--ko) !important; }

/* ------------------------------------------------------------------ Boutons */
.btn { font-weight: 600; border-radius: 10px; }
.btn-dark { --bs-btn-bg: var(--asphalt); --bs-btn-border-color: var(--asphalt); --bs-btn-hover-bg: #000; --bs-btn-hover-border-color: #000; }
.btn-accent {
  --bs-btn-color: var(--marking-ink); --bs-btn-bg: var(--marking); --bs-btn-border-color: var(--marking);
  --bs-btn-hover-color: var(--marking-ink); --bs-btn-hover-bg: #ffe14d; --bs-btn-hover-border-color: #ffe14d;
  --bs-btn-active-bg: #f2c900; --bs-btn-active-border-color: #f2c900; --bs-btn-active-color: var(--marking-ink);
}
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #f7f6f2; --bs-btn-hover-border-color: #d5d2c9; }
.btn-icon {
  width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center;
  border-radius: 9px; border: 0; background: transparent; color: var(--muted);
}
.btn-ghost:hover { background: #efede7; color: var(--ink); }
.btn-ghost-danger:hover { background: var(--ko-bg); color: var(--ko); }
.btn:focus-visible, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); border-color: #e0bb00; }

/* ------------------------------------------------------------------ Formulaires */
.form-check-input:checked { background-color: var(--asphalt); border-color: var(--asphalt); }
.form-switch .form-check-input:checked { background-color: var(--ok); border-color: var(--ok); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); border-color: #e0bb00; }
.form-switch .form-check-input { width: 2.6em; height: 1.35em; margin-top: .1em; }
.form-switch .form-check-label { margin-left: .35rem; font-weight: 500; }
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.req { color: var(--signal); }
.form-control, .form-select { border-radius: 10px; border-color: #d9d6ce; padding: .55rem .8rem; background-color: #fff; }
.input-group-text { background: #faf9f6; border-color: #d9d6ce; color: var(--muted); }
.form-control::placeholder { color: #a5a8ad; }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented .btn {
  border: 1px solid #d9d6ce; background: #fff; color: var(--ink); font-weight: 500;
  padding: .5rem .9rem;
}
.segmented .btn-check:checked + .btn { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.segmented .btn-check:checked + .btn::before { content: "\F272"; font-family: "bootstrap-icons"; margin-right: 6px; color: var(--marking); }
.segmented .btn-check:focus-visible + .btn { box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }

.check-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.check-tiles .btn { border: 1px solid #d9d6ce; background: #fff; font-weight: 500; display: flex; align-items: center; gap: 8px; justify-content: center; padding: .65rem; }
.check-tiles .btn i { font-size: 1.15rem; }
.check-tiles.single { display: flex; }
.check-tiles .btn-check:checked + .btn { background: #fff6c2; border-color: #e0bb00; color: var(--marking-ink); }

.form-section { padding-top: 6px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-top: 6px; }

/* ------------------------------------------------------------------ Tableaux */
.table { --bs-table-bg: #fff; margin: 0; }
.table > thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 650; background: #fff; border-bottom: 1px solid var(--line); white-space: nowrap;
  padding-top: 12px; padding-bottom: 12px;
}
.table > tbody td { vertical-align: middle; border-color: #efede7; padding-top: 11px; padding-bottom: 11px; }
.table > tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #fbfaf5; }
.table td.num, .table th.num { text-align: right; }
.table > :not(caption) > * > :first-child { padding-left: 20px; }
.table > :not(caption) > * > :last-child { padding-right: 20px; }
.table-sm > :not(caption) > * > :first-child { padding-left: 4px; }
.table td.actions { text-align: right; white-space: nowrap; width: 1%; }
.table .muted { color: var(--muted); }
.table tfoot td { font-weight: 700; background: #fff; border-top: 2px solid var(--line); }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
th a.sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
th a.sort:hover { color: var(--ink); }
th a.sort.active { color: var(--ink); }

.table-search { max-width: 280px; }
.table-search .form-control { padding-left: 2.2rem; }
.table-search { position: relative; }
.table-search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #a5a8ad; }

.badge-soft { font-weight: 600; padding: .35em .65em; border-radius: 6px; font-size: .75rem; }
.badge-interne { background: #e8eef7; color: #1d4f91; }
.badge-externe { background: #f6ecdf; color: #8a4b08; }
.badge-chef { background: #fff6c2; color: #6b5800; }
.badge-off { background: #ecebe7; color: var(--muted); }
.badge-alert { background: var(--ko-bg); color: var(--ko); }

.empty-state { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: 8px; color: #c2bfb6; }
.empty-state p { margin: 0; }

/* ------------------------------------------------------------------ Accueil */
.quick-action {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.quick-action:hover { transform: translateY(-2px); border-color: #e0bb00; color: var(--ink); }
.quick-action .chip-icon { width: 44px; height: 44px; font-size: 1.3rem; border-radius: 12px; }
.quick-action strong { display: block; }
.quick-action small { color: var(--muted); }
.quick-action .bi-arrow-right { margin-left: auto; color: #b9b6ad; }

.hero {
  background: var(--asphalt); color: #fff; border-radius: var(--radius);
  padding: 26px 28px; position: relative; overflow: hidden; margin-bottom: 20px;
}
.hero h2 { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; margin: 0 0 4px; }
.hero p { color: #b6bac0; margin: 0; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--marking) 0 34px, transparent 34px 56px);
}
.hero .btn { position: relative; z-index: 1; }

/* ------------------------------------------------------------------ Assistant récap */
.stepper { display: flex; gap: 6px; margin-bottom: 20px; counter-reset: step; overflow-x: auto; padding-bottom: 2px; }
.stepper > a, .stepper > span {
  flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .86rem; white-space: nowrap;
}
.stepper .n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: #ecebe7; color: var(--muted); font-size: .8rem; font-weight: 700;
}
.stepper .done .n { background: var(--ok-bg); color: var(--ok); }
.stepper .current { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.stepper .current .n { background: var(--marking); color: var(--marking-ink); }
.stepper > a:hover { border-color: #e0bb00; color: var(--ink); }

.recap-context {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  background: #fff6c2; border: 1px solid #f0d64a; border-radius: 12px; padding: 12px 16px; margin-bottom: 20px;
}
.recap-context div { display: flex; flex-direction: column; }
.recap-context small { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b5800; font-weight: 600; }
.recap-context strong { color: var(--marking-ink); }

/* ------------------------------------------------------------------ Fiche chantier */
.cost-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #ecebe7; margin: 10px 0 14px; }
.cost-bar span { display: block; height: 100%; }
.c-personnel { background: #1d4f91; }
.c-engins { background: #e0bb00; }
.c-fournitures { background: #1f8a4c; }
.c-fournisseurs { background: #8a4b08; }
.c-frais { background: #8d939b; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

.total-list { list-style: none; padding: 0; margin: 0; }
.total-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.total-list li:last-child { border-bottom: 0; }
.total-list .grand { font-weight: 750; font-size: 1.08rem; border-top: 2px solid var(--ink); border-bottom: 0; margin-top: 4px; padding-top: 12px; }

.balance-box { border-radius: 12px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.balance-box.pos { background: var(--ok-bg); color: var(--ok); }
.balance-box.neg { background: var(--ko-bg); color: var(--ko); }
.balance-box .v { font-size: 1.5rem; letter-spacing: -.02em; }

.day-entry { padding: 14px 0; border-bottom: 1px solid #efede7; }
.day-entry:last-child { border-bottom: 0; }
.day-entry .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.day-entry .resume { color: #43474d; white-space: pre-line; }

/* ------------------------------------------------------------------ Rapport personnel */
.grid-report { font-size: .78rem; }
.grid-report th, .grid-report td { padding: 6px 6px !important; text-align: center; white-space: nowrap; }
.grid-report td.name, .grid-report th.name { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 160px; }
.grid-report thead th.name { background: #faf9f6; }
.grid-report .we { background: #e9e8e3; color: #8d939b; }
.grid-report .zero { color: #c2bfb6; }
.grid-report .wk { background: #e7f5ec; font-weight: 700; }
.grid-report .ctrl { background: var(--ko-bg); font-weight: 700; }
.grid-report .ctrl.ok { background: var(--ok-bg); }
.grid-report .tot { font-weight: 700; background: #faf9f6; }
.grid-report td[title] { cursor: help; text-decoration: underline dotted #b9b6ad; }

/* ------------------------------------------------------------------ Connexion */
body.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    linear-gradient(180deg, rgba(27, 30, 34, .96), rgba(27, 30, 34, .96)),
    repeating-linear-gradient(115deg, #2a2e33 0 2px, transparent 2px 18px);
  background-color: var(--asphalt);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.auth-brand { background: #fff; padding: 28px 28px 8px; text-align: center; }
.auth-brand img { height: 74px; width: auto; }
.auth-body { padding: 12px 28px 28px; }
.auth-body h1 { font-weight: 750; letter-spacing: -.02em; text-align: center; }
.auth-body .lead-sub { text-align: center; color: var(--muted); margin-bottom: 22px; }
.auth-card .road-stripe { height: 8px; background-color: var(--asphalt); }
.error-icon { width: 64px; height: 64px; border-radius: 16px; margin: 6px auto 14px; display: grid; place-items: center; background: #fff6c2; color: #b38f00; font-size: 2rem; }
.auth-body .text-secondary { text-align: center; }

/* ------------------------------------------------------------------ Règles de mot de passe */
.pw-rules { list-style: none; padding: 10px 12px; margin: -6px 0 16px; background: #faf9f6; border: 1px solid var(--line); border-radius: 10px; font-size: .84rem; }
.pw-rules li { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--muted); }
.pw-rules li i { font-size: .9rem; }
.pw-rules li.ok { color: var(--ok); }

/* ------------------------------------------------------------------ Menu réductible */
.sidebar { transition: width .2s ease; }
.sidebar-toggle {
  position: absolute; top: 28px; right: -13px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%; padding: 0; place-items: center;
  background: #fff; color: var(--muted); border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15); font-size: .75rem;
  opacity: .55; transition: opacity .15s, color .15s;
}
.sidebar:hover .sidebar-toggle, .sidebar-toggle:focus-visible { opacity: 1; }
.sidebar-toggle:hover { color: var(--ink); border-color: #e0bb00; }
@media (min-width: 992px) {
  .sidebar { overflow: visible; }
  body.sidebar-mini { --sidebar-w: 76px; }
  body.sidebar-mini .sidebar-toggle { top: 66px; }
  body.sidebar-mini .sidebar-toggle i { transform: rotate(180deg); }
  body.sidebar-mini .brand-text,
  body.sidebar-mini .nav-item span,
  body.sidebar-mini .who,
  body.sidebar-mini .sidebar-user > a { display: none; }
  body.sidebar-mini .sidebar-brand { padding: 20px 0 14px; justify-content: center; }
  body.sidebar-mini .brand-logo { padding: 4px; }
  body.sidebar-mini .brand-logo img { height: 26px; }
  body.sidebar-mini .sidebar-nav { padding: 6px 10px 12px; overflow-x: hidden; }
  body.sidebar-mini .nav-section { font-size: 0; padding: 10px 0 6px; margin: 0 8px; border-top: 1px solid var(--asphalt-3); }
  body.sidebar-mini .nav-item { justify-content: center; padding: 11px 0; }
  body.sidebar-mini .nav-item.active::before { left: -10px; }
  body.sidebar-mini .sidebar-user { flex-direction: column; margin: 0 8px 14px; padding: 8px 4px; gap: 6px; }
  body.sidebar-mini .sidebar-user form { margin: 0 !important; }
}

/* ------------------------------------------------------------------ Cartographie */
.map-card { overflow: hidden; }
.map-canvas { height: calc(100vh - 230px); min-height: 460px; width: 100%; background: #e8e6df; z-index: 0; }
.map-small { height: 280px; min-height: 0; border-radius: 10px; border: 1px solid #d9d6ce; }
.map-pin span {
  display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); margin-top: 2px;
}
.map-pin span::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.map-pin.actif span { background: var(--marking); border-color: var(--asphalt); }
.map-pin.actif span::after { background: var(--asphalt); }
.map-pin.perte span { background: var(--ko); }
.map-pin.archive span { background: #9aa0a8; }
.pin-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.pin-dot.actif { background: var(--marking); box-shadow: 0 0 0 2px var(--asphalt) inset; }
.pin-dot.perte { background: var(--ko); }
.pin-dot.archive { background: #9aa0a8; }
.map-legend { display: flex; gap: 16px; font-size: .84rem; color: var(--muted); flex-wrap: wrap; }
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.map-list { max-height: calc(100vh - 420px); min-height: 200px; overflow-y: auto; border-top: 1px solid var(--line); }
.map-list-item {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  padding: 10px 20px; border: 0; border-bottom: 1px solid #efede7; background: #fff;
}
.map-list-item:hover { background: #fbfaf5; }
.map-list-item .txt { display: flex; flex-direction: column; min-width: 0; }
.map-list-item strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-list-item small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-missing li { padding: 3px 0; }
.map-popup { min-width: 200px; font-family: var(--bs-body-font-family); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.btn-dark { color: #fff; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(27, 30, 34, .25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--asphalt); color: var(--marking); font-weight: 700; }
.table-search.mw-100 { max-width: none; }

/* ------------------------------------------------------------------ Génération d'export */
.dl-overlay {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: rgba(27, 30, 34, .45); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.dl-overlay.show { opacity: 1; visibility: visible; }
.dl-box {
  background: #fff; border-radius: 16px; padding: 26px 30px; min-width: 300px; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 6px;
}
.dl-box strong { font-size: 1.05rem; }
.dl-box small { color: var(--muted); }
.dl-road { height: 14px; border-radius: 7px; background: var(--asphalt); overflow: hidden; margin-bottom: 12px; position: relative; }
.dl-road span {
  position: absolute; inset: 5px -60px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--marking) 0 22px, transparent 22px 40px);
  animation: dl-drive .7s linear infinite;
}
@keyframes dl-drive { from { transform: translateX(0); } to { transform: translateX(40px); } }
@media (prefers-reduced-motion: reduce) { .dl-road span { animation: none; } }

/* ------------------------------------------------------------------ Divers */
.alert { border-radius: 12px; }
.alert i { margin-top: 2px; }
.list-links a { display: flex; align-items: center; gap: 10px; padding: 10px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid #efede7; }
.list-links a:last-child { border-bottom: 0; }
.list-links a:hover { color: #1d4f91; }
.small-muted { font-size: .82rem; color: var(--muted); }
.w-num { width: 140px; }
.dl-inline { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.dl-inline dt { color: var(--muted); font-weight: 500; }
.dl-inline dd { margin: 0; font-weight: 600; }
.pagination { --bs-pagination-color: var(--ink); --bs-pagination-active-bg: var(--asphalt); --bs-pagination-active-border-color: var(--asphalt); --bs-pagination-border-radius: 8px; }

/* ------------------------------------------------------------------ Impression */
@media print {
  .sidebar, .topbar-actions, .footer, .no-print, .card-tools, .btn, form { display: none !important; }
  body.app { display: block; background: #fff; }
  .content { padding: 0; max-width: none; }
  .topbar { padding: 0 0 12px; }
  .card { box-shadow: none; break-inside: avoid; }
  .kpi.dark { background: #fff; color: var(--ink); border-color: var(--line); }
  a { text-decoration: none; color: inherit; }
}
