/* SIGLCF - feuille de style unique, mobile d'abord, sans dépendance externe */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --ink: #15201b;
  --muted: #5a6a63;
  --line: #dde5e0;
  --line-strong: #c3cfc8;
  --primary: #0f6b4a;
  --primary-dark: #0a4f37;
  --primary-soft: #e2f1ea;
  --accent: #e8801c;
  --side: #0b3d2e;
  --side-ink: #cfe3da;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #9a5b00;
  --warn-soft: #fff4dc;
  --info: #175cd3;
  --info-soft: #e7effd;
  --ok: #17693a;
  --ok-soft: #e3f4ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 26, .06), 0 4px 14px rgba(16, 32, 26, .05);
  --topbar-h: 58px;
  --side-w: 262px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
img, svg { max-width: 100%; }
.icon { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--muted); margin-bottom: .25rem; }
:focus-visible { outline: 3px solid #f5b25a; outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: .5rem; padding: 0 .75rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 1.05rem; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: .72rem; }
.topbar-right { display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink);
  border-radius: 8px; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--primary-soft); }
.notif-count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 9px; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-chip { display: none; align-items: center; gap: .55rem; padding: 0 .4rem; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta small { color: var(--muted); font-size: .72rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem;
}

/* ---------- Ossature ---------- */
.shell { display: block; }
.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: min(84vw, 300px);
  background: var(--side); color: var(--side-ink); overflow-y: auto; z-index: 40;
  transform: translateX(-102%); transition: transform .2s ease; padding: .5rem 0 2rem;
}
.sidebar ul { list-style: none; margin: 0; padding: 0 .6rem; }
.nav-group { margin: 1rem 1.2rem .3rem; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: #8fb3a3; }
.sidebar a {
  display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .5rem .8rem; margin: 1px 0;
  color: var(--side-ink); text-decoration: none; border-radius: 8px; font-size: .94rem;
}
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.is-active { background: var(--primary); color: #fff; font-weight: 600; }
.scrim { display: none; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(8, 20, 15, .5); z-index: 35; }
body.menu-open .sidebar { transform: none; }
body.menu-open .scrim { display: block; }
.main { padding: 1rem .85rem 3rem; max-width: 1280px; margin: 0 auto; outline: none; }

@media (min-width: 640px) { .user-chip { display: flex; } .main { padding: 1.4rem 1.4rem 3rem; } }
@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  .sidebar { transform: none; width: var(--side-w); }
  .shell { padding-left: var(--side-w); }
  .scrim { display: none !important; }
}

/* ---------- Composants ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.1rem; }
.page-head h1 { margin-bottom: .15rem; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: .35rem; }
.breadcrumb a { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: .75rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.card-head h2, .card-head h3 { margin: 0; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { border-color: var(--primary); color: inherit; }
.narrow { max-width: 560px; }
.medium { max-width: 860px; }

.grid { display: grid; gap: 1rem; }
.grid > * { min-width: 0; }
.grid-2, .grid-3, .grid-main { grid-template-columns: minmax(0, 1fr); }
.grid-main { align-items: start; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .5rem 1rem; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #eef3f0; color: var(--ink); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1a11; color: #fff; }
.btn-warn { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn-warn:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 34px; padding: .25rem .65rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; padding: .25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge-grey { background: #eceff1; color: #45525a; }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge-indigo { background: #ece9fb; color: #4b3fb5; }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-violet { background: #f3e8fb; color: #7a2fa5; }
.badge-teal { background: #dcf3f1; color: #0b6b66; }
.badge-green { background: var(--ok-soft); color: var(--ok); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.pill-litige { background: var(--danger-soft); color: var(--danger); border-color: #f2b8b3; }

.alert { padding: .75rem 1rem; border-radius: 8px; border: 1px solid; margin-bottom: 1rem; }
.alert-success { background: var(--ok-soft); border-color: #a9dcbd; color: #0f4d29; }
.alert-danger { background: var(--danger-soft); border-color: #f2b8b3; color: #7a1a12; }
.alert-warning { background: var(--warn-soft); border-color: #f3d38b; color: #6b4000; }
.alert-info { background: var(--info-soft); border-color: #b5cdf6; color: #103f8f; }
.alert strong { font-weight: 700; }

/* Formulaires */
.field { margin-bottom: .95rem; min-width: 0; }
.field label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.req::after { content: " *"; color: var(--danger); }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], input[type=datetime-local],
input[type=number], input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 42px; padding: .5rem .7rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid rgba(15,107,74,.18); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--primary); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; }
.check input { margin-top: .15rem; flex: none; }
.hint { font-size: .82rem; color: var(--muted); margin: .25rem 0 0; }
.field-error { display: block; color: var(--danger); font-size: .84rem; margin-top: .25rem; font-weight: 600; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .form-grid .span-2 { grid-column: span 2; } }
.form-section { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.pwd-wrap { position: relative; }
.pwd-wrap .link-btn { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-size: .82rem; }
.pwd-wrap input { padding-right: 5rem; }

.filters { display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 640px) { .filters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .filters { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; } }
.filters .field { margin: 0; }
.filters .btn { align-self: end; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card .table-wrap { border: 0; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #f0f5f2; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:hover { background: #f8fbf9; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-actions { white-space: nowrap; text-align: right; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

/* Cartes de statistiques */
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.stat .stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .stat-sub { font-size: .8rem; color: var(--muted); }
.stat.is-alert { border-color: #f2b8b3; background: #fffafa; }
.stat.is-alert .stat-value { color: var(--danger); }

/* Listes clé/valeur */
.kv { display: grid; grid-template-columns: 1fr; gap: .1rem 1rem; margin: 0; }
.kv dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: .6rem; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (min-width: 640px) { .kv.cols { grid-template-columns: repeat(2, 1fr); } }

/* Onglets / pastilles */
.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.tabs a.is-active { color: var(--primary); border-color: var(--primary); }

.pagination { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; justify-content: space-between; margin-top: .9rem; font-size: .88rem; }
.pagination .pages { display: flex; gap: .25rem; flex-wrap: wrap; }
.pagination a, .pagination span.cur { display: inline-flex; min-width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; background: #fff; padding: 0 .5rem; }
.pagination span.cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* Frise chronologique */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .9rem; }
.timeline li::before { content: ""; position: absolute; left: -1.62rem; top: .35rem; width: 11px; height: 11px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--primary); }
.timeline .when { font-size: .78rem; color: var(--muted); }
.timeline .what { font-weight: 600; }

/* Barres et graphiques */
.bars { display: grid; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 42%) minmax(0, 1fr) auto; gap: .6rem; align-items: center; font-size: .88rem; }
.bar-row .bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row svg { width: 100%; height: 14px; display: block; }
.bar-row .bar-val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 2.5rem; text-align: right; }
.bar-track { fill: #e8efeb; }
.bar-fill { fill: var(--primary); }
.bar-fill.c2 { fill: #2f7fd0; } .bar-fill.c3 { fill: var(--accent); } .bar-fill.c4 { fill: #7a2fa5; } .bar-fill.c5 { fill: var(--danger); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .84rem; margin-top: .6rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; }
.legend .k-disponible, .legend .seg-disponible { background: #2f9e6a; } .legend .k-attribue, .legend .seg-attribue { background: #2a78d6; } .legend .k-litigieux, .legend .seg-litigieux { background: #e34948; }
.legend .s1 { background: var(--primary); } .legend .s2 { background: #2f7fd0; } .legend .s3 { background: var(--accent); } .legend .s4 { background: #7a2fa5; } .legend .s5 { background: var(--danger); }
.chart-cols { width: 100%; height: auto; }
.chart-cols text { font-size: 11px; fill: var(--muted); }
.chart-cols .val { fill: var(--ink); font-weight: 700; }

/* Pièces jointes */
.pieces { list-style: none; margin: 0; padding: 0; }
.pieces li { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.pieces li:last-child { border-bottom: 0; }
.pieces .p-main { flex: 1 1 220px; min-width: 0; }
.pieces .p-title { font-weight: 600; overflow-wrap: anywhere; }
.upload-row { display: grid; gap: .5rem; grid-template-columns: 1fr; padding: .6rem; border: 1px dashed var(--line-strong); border-radius: 8px; margin-bottom: .5rem; background: #fafcfb; }
@media (min-width: 720px) { .upload-row { grid-template-columns: 1fr 1.4fr 1.4fr auto; align-items: center; } }
.preview-frame { width: 100%; min-height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.preview-img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

/* Alerte de délai */
.deadline { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.deadline.ok { background: var(--ok-soft); color: var(--ok); }
.deadline.j3 { background: var(--warn-soft); color: var(--warn); }
.deadline.j1 { background: #ffe1d6; color: #a13a10; }
.deadline.over { background: var(--danger); color: #fff; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: flex; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif-list li.unread { background: #f2f9f5; }
.notif-list .n-body { flex: 1; min-width: 0; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; flex: none; background: var(--info); }
.notif-dot.warning { background: var(--accent); } .notif-dot.danger { background: var(--danger); }

.matrix th, .matrix td { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix .mod td { background: #f0f5f2; font-weight: 700; text-align: left; }
.map-box { height: 62vh; min-height: 380px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .84rem; background: #fff; }
.lot-tile { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 38px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: .84rem; border: 1px solid; margin: 0 .25rem .35rem 0; padding: 0 .4rem; }
.lot-tile.disponible { background: var(--ok-soft); color: var(--ok); border-color: #a9dcbd; }
.lot-tile.attribue { background: var(--info-soft); color: var(--info); border-color: #b5cdf6; }
.lot-tile.litigieux { background: var(--danger-soft); color: var(--danger); border-color: #f2b8b3; }


/* Graphiques SVG rendus côté serveur (aucun style en ligne : compatible CSP) */
.stack { width: 100%; height: 22px; display: block; }
.stack .seg-disponible { fill: #2f9e6a; } .stack .seg-attribue { fill: #2a78d6; } .stack .seg-litigieux { fill: #e34948; }
.stack .seg-a { fill: var(--primary); } .stack .seg-b { fill: #2a78d6; } .stack .seg-c { fill: var(--accent); }
.legend-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.legend .seg-a { background: var(--primary); } .legend .seg-b { background: #2a78d6; } .legend .seg-c { background: var(--accent); }
.meter { width: 100%; height: 8px; display: block; margin-top: .35rem; }
.chart-cols .col-fill { fill: var(--primary); }
.chart-cols .axis { stroke: var(--line-strong); stroke-width: 1; }
.p-0 { padding: 0; }
.view-table { margin-top: .75rem; font-size: .88rem; }
.view-table summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.stat .meter-wrap { margin-top: .3rem; }
.filters .field-narrow { max-width: 11rem; }
.print-only { display: none; }

/* Connexion */
body.guest { background: linear-gradient(160deg, #0b3d2e 0%, #0f6b4a 55%, #e8801c 140%); min-height: 100vh; }
.guest-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; }
.guest-wrap .alert { width: min(100%, 420px); }
.login-card { width: min(100%, 420px); padding: 1.6rem; }
.login-head { text-align: center; margin-bottom: 1.2rem; }
.login-head h1 { font-size: 1.9rem; letter-spacing: .06em; margin: .2rem 0; }
.error-card { max-width: 520px; margin: 3rem auto; text-align: center; }
.error-code { font-size: 3.4rem; font-weight: 800; color: var(--primary); margin: 0; line-height: 1; }

/* ---------- Document imprimable (convocation, attestation...) ---------- */
.doc-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.doc-sheet { background: #fff; width: 100%; max-width: 210mm; margin: 0 auto 1.5rem; padding: 14mm 16mm; border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-family: "Times New Roman", Georgia, serif; font-size: 12pt; line-height: 1.5; color: #000; }
.doc-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; font-size: 10.5pt; text-align: center; margin-bottom: 1.4rem; }
.doc-head .left, .doc-head .right { line-height: 1.35; }
.doc-head .sep { display: block; margin: .3rem auto; width: 60px; border-top: 1px solid #000; }
.doc-ref { margin: 1rem 0; font-weight: 700; }
.doc-title { text-align: center; font-size: 20pt; font-weight: 700; letter-spacing: .12em; margin: 1.5rem 0; text-decoration: underline; }
.doc-body p { text-align: justify; margin-bottom: .9rem; }
.doc-sign { margin-top: 2.2rem; text-align: right; }
.doc-sign .stamp { display: inline-block; min-width: 200px; text-align: center; }
.doc-sign .space { height: 90px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 11pt; }
.doc-table th, .doc-table td { border: 1px solid #000; padding: 5px 8px; text-align: left; vertical-align: top; }
.doc-foot { margin-top: 2rem; font-size: 9pt; color: #444; border-top: 1px solid #999; padding-top: .4rem; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .topbar, .sidebar, .scrim, .doc-toolbar, .no-print, .skip-link, .alert { display: none !important; }
  .shell { padding-left: 0 !important; }
  .main { padding: 0; max-width: none; }
  .doc-sheet { border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
  .print-only { display: block; }
  .view-table { display: none; }
  .filters { display: none; }
}

/* Utilitaires */
.mt { margin-top: 1rem; }
.stat .stat-value small { font-size: .9rem; font-weight: 600; color: var(--muted); }

/* Cartographie (rendu SVG maison, fond OpenStreetMap optionnel) */
.map-layout { display: grid; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 1000px) { .map-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.map-stage { position: relative; }
.map-box { position: relative; overflow: hidden; background: #e9efe9; touch-action: none; cursor: grab; }
.map-box.dragging { cursor: grabbing; }
.map-box svg { width: 100%; height: 100%; display: block; user-select: none; }
.map-tools { position: absolute; top: .6rem; left: .6rem; z-index: 2; display: flex; flex-direction: column; gap: .3rem; }
.map-tools .btn { min-width: 2.2rem; padding: .3rem .5rem; background: #fff; }
.map-attrib { position: absolute; right: .4rem; bottom: .3rem; margin: 0; background: rgba(255,255,255,.85); padding: 0 .35rem; border-radius: 4px; z-index: 2; }
.map-status { position: absolute; left: .6rem; bottom: .3rem; margin: 0; background: rgba(255,255,255,.85); padding: 0 .35rem; border-radius: 4px; z-index: 2; }
.map-layers { display: grid; gap: .35rem; }
.map-side { display: grid; gap: 1rem; align-content: start; }
.m-lotissement { fill: rgba(15, 107, 74, .08); stroke: var(--primary-dark); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }
.m-lot { stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; fill-opacity: .8; }
.m-lot.disponible { fill: #2f9e6a; } .m-lot.attribue { fill: #2a78d6; } .m-lot.litigieux { fill: #e34948; }
.m-lot:hover, .m-lot:focus, .m-pt:hover, .m-pt:focus { fill-opacity: 1; stroke: #111; stroke-width: 2; outline: none; }
.m-lot.is-selected, .m-pt.is-selected { stroke: #111; stroke-width: 3; fill-opacity: 1; }
.m-pt { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.m-pt.litige { fill: #e34948; } .m-pt.visite { fill: #7a2fa5; } .m-pt.lotissement { fill: var(--primary-dark); }
.map-scale { position: absolute; left: .6rem; bottom: 1.7rem; z-index: 2; font-size: .75rem; color: #111; background: rgba(255,255,255,.85); padding: 0 .35rem .1rem; border-radius: 4px; }
.map-scale i { display: block; height: 5px; border: 2px solid #111; border-top: 0; margin-bottom: 1px; }
.map-box .is-off { display: none; }
.map-box.hide-disponible .m-lot.disponible, .map-box.hide-attribue .m-lot.attribue, .map-box.hide-litigieux .m-lot.litigieux { display: none; }

.map-box .tile-fail { display: none; }
.map-layers .legend { margin: 0; display: inline-flex; align-items: center; }
