/* Gestion consulaire — thème clair aux couleurs de la Côte d'Ivoire */
@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --orange: #f77f00;
  --orange-soft: #fff3e6;
  --green: #009e60;
  --green-dark: #0b5d36;
  --green-soft: #e7f6ee;
  --ink: #1d2721;
  --ink-2: #4a5850;
  --muted: #74827a;
  --line: #e3e8e4;
  --line-2: #eef2ef;
  --bg: #f5f7f4;
  --card: #ffffff;
  --blue: #2563eb; --blue-soft: #e8efff;
  --red: #c62828; --red-soft: #fdecec;
  --amber: #b45309; --amber-soft: #fff4dc;
  --violet: #7c3aed; --violet-soft: #f1ebff;
  --teal: #0f766e; --teal-soft: #e0f5f2;
  --gray-soft: #eef1ef;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 24, .05), 0 4px 16px rgba(16, 40, 24, .05);
  --side: 252px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, "Segoe UI", Roboto, sans-serif; font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 24px; }
.mb0 { margin-bottom: 0; } .mb2 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ---------- Structure ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; position: relative; }
.brand::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--orange) 33%, #fff 33% 66%, var(--green) 66%); border-radius: 2px; }
.brand img { width: 42px; height: auto; }
.brand strong { display: block; font-size: 14px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 16px 10px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; text-decoration: none; margin-bottom: 1px; }
.sidebar nav a:hover { background: var(--line-2); color: var(--ink); }
.sidebar nav a.active { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.sidebar nav a span { flex: 1; }
.count { font-style: normal; background: var(--orange); color: #fff; border-radius: 99px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; }
.side-foot { border-top: 1px solid var(--line-2); padding: 10px 16px; display: grid; gap: 4px; }
.side-foot a { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.global-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.global-search input { border: 0; background: transparent; padding: 9px 0; width: 100%; font: inherit; outline: none; color: var(--ink); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--line-2); }
.user-menu summary span:last-child { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 13.5px; }
.user-menu small { color: var(--muted); font-weight: 400; font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green-dark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 190px; padding: 6px; z-index: 50; }
.dropdown a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.dropdown a:hover { background: var(--line-2); text-decoration: none; }
.content { padding: 24px; width: 100%; max-width: 1400px; }
.backdrop { display: none; }

/* ---------- En-têtes de page ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--line-2); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-primary:hover { background: #094a2b; }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover { background: #df7200; }
.btn-danger { background: #fff; border-color: #f0c4c4; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--green-dark); }
.btn-ghost:hover { background: var(--green-soft); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 15.5px; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--ink-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--line-2); }
.inline-form { display: inline; }

/* ---------- Cartes / blocs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 14px 18px 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-side-l { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none !important; }
a.kpi:hover { border-color: #cfd9d2; }
.kpi .ki { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--green-soft); color: var(--green-dark); }
.kpi .ki.o { background: var(--orange-soft); color: #c45f00; }
.kpi .ki.b { background: var(--blue-soft); color: var(--blue); }
.kpi .ki.r { background: var(--red-soft); color: var(--red); }
.kpi .ki.v { background: var(--violet-soft); color: var(--violet); }
.kpi strong { display: block; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi em { font-style: normal; font-size: 12px; color: var(--muted); display: block; }

/* Barres */
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 54px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-track { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 99px; min-width: 2px; }
.bar-fill.o { background: var(--orange); }
.bar-row .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.split-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line-2); margin: 8px 0; }
.split-bar span { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.pyramid { display: grid; gap: 4px; font-size: 12.5px; }
.pyr-row { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 6px; }
.pyr-row .l { display: flex; justify-content: flex-end; }
.pyr-row .c { text-align: center; color: var(--muted); }
.pyr-row b { display: block; height: 14px; border-radius: 3px; }
.pyr-row .l b { background: #6aa8e8; } .pyr-row .r b { background: var(--orange); }
.columns { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.columns .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.columns .col div { display: flex; gap: 2px; align-items: flex-end; width: 100%; justify-content: center; height: calc(100% - 20px); }
.columns .col b { width: 40%; max-width: 18px; border-radius: 3px 3px 0 0; background: var(--green); min-height: 1px; }
.columns .col b.d { background: var(--orange); }
.columns .col span { font-size: 11px; color: var(--muted); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.actions { text-align: right; white-space: nowrap; }
.row-link { color: inherit; font-weight: 600; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .ph { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--line-2); flex: none; display: grid; place-items: center; font-weight: 700; color: var(--green-dark); font-size: 13px; }
.person div { min-width: 0; }
.person small { display: block; color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .ic { color: #b5c2ba; margin-bottom: 6px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green-dark); }
.badge-blue { background: var(--blue-soft); color: #1d4ed8; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-gray { background: var(--gray-soft); color: var(--ink-2); }
.badge-orange { background: var(--orange-soft); color: #b45309; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--line-2); font-size: 12px; color: var(--ink-2); }

/* ---------- Alertes ---------- */
.alert { position: relative; padding: 12px 40px 12px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: var(--green-dark); border-color: #bfe5cf; }
.alert-error { background: var(--red-soft); color: var(--red); border-color: #f3c6c6; }
.alert-warning { background: var(--amber-soft); color: #8a4a06; border-color: #f4dca8; }
.alert-info { background: var(--blue-soft); color: #1e40af; border-color: #cddcff; }
.alert-x { position: absolute; right: 8px; top: 7px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; }
.note { background: var(--orange-soft); border-left: 4px solid var(--orange); padding: 10px 14px; border-radius: 8px; color: #7a3d00; font-size: 13.5px; }
.note.green { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.note.blue { background: var(--blue-soft); border-color: var(--blue); color: #1e3a8a; }
.note.red { background: var(--red-soft); border-color: var(--red); color: #7f1d1d; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.f12 { grid-column: span 12; } .f9 { grid-column: span 9; } .f8 { grid-column: span 8; } .f6 { grid-column: span 6; } .f4 { grid-column: span 4; } .f3 { grid-column: span 3; } .f2 { grid-column: span 2; }
.field label, label.lbl { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--ink-2); }
.field .req::after { content: " *"; color: var(--red); }
.field small, .hint { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=month], input[type=file], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d3dbd5; border-radius: 9px; font: inherit; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 158, 96, .14); }
input[type=file] { padding: 7px; background: #fafbfa; }
textarea { min-height: 90px; resize: vertical; }
textarea.tall { min-height: 260px; font-family: inherit; line-height: 1.6; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--green-dark); flex: none; }
.radio-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-cards label { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; cursor: pointer; display: flex; gap: 7px; align-items: center; font-weight: 500; font-size: 13.5px; background: #fff; }
.radio-cards input { accent-color: var(--green-dark); }
.radio-cards label:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
fieldset.section { border: 0; padding: 0; margin: 0 0 22px; }
fieldset.section > legend, .section-title { font-size: 15px; font-weight: 700; color: var(--green-dark); padding: 0 0 8px; margin-bottom: 14px; border-bottom: 2px solid var(--line-2); width: 100%; display: flex; align-items: center; gap: 8px; }
.section-title .num { width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 12.5px; display: grid; place-items: center; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 6px; }
.form-actions.sticky { position: sticky; bottom: 0; background: rgba(245, 247, 244, .95); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 10px; z-index: 5; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field.grow { flex: 3; min-width: 220px; }

/* Photo d'identité */
.photo-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.photo-frame { width: 150px; aspect-ratio: 3 / 4; border-radius: 10px; border: 2px dashed #c9d4cc; background: #f8faf8 center / cover no-repeat; display: grid; place-items: center; color: var(--muted); overflow: hidden; position: relative; flex: none; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.photo-actions { display: flex; flex-direction: column; gap: 8px; }
.photo-ring { position: absolute; inset: 12% 18% 30%; border: 2px solid rgba(255,255,255,.85); border-radius: 50% 50% 45% 45%; pointer-events: none; box-shadow: 0 0 0 999px rgba(0,0,0,.18); }

/* Géolocalisation */
.geo-box { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.geo-map { height: 280px; background: #e9efe9; }
.geo-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: #fafbfa; border-bottom: 1px solid var(--line); }
.geo-status { font-size: 13px; color: var(--muted); }
.geo-status.ok { color: var(--green-dark); font-weight: 600; }
.geo-status.err { color: var(--red); }

/* ---------- Fiche ---------- */
.profile { display: flex; gap: 18px; align-items: flex-start; }
.profile .big-photo { width: 130px; aspect-ratio: 3/4; border-radius: 12px; object-fit: cover; background: var(--line-2); display: grid; place-items: center; font-size: 34px; font-weight: 700; color: var(--green-dark); flex: none; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; display: flex; gap: 6px; align-items: center; }
.tabs a.active { color: var(--green-dark); border-color: var(--green-dark); }
.tabs a .count { background: var(--line); color: var(--ink-2); }
.tabs a.active .count { background: var(--green-dark); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { color: var(--muted); display: block; }

/* Pièces */
.pieces { display: grid; gap: 10px; }
.piece { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.piece.ok { border-color: #bfe5cf; background: #f6fcf8; }
.piece .st { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); }
.piece.ok .st { background: var(--green); color: #fff; }
.piece .pl { font-size: 13.5px; }
.piece .pl small { display: block; color: var(--muted); }
.piece .pa { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--red); }
.file-pick { position: relative; overflow: hidden; }
.file-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.viewer { position: fixed; inset: 0; background: rgba(10, 20, 14, .82); z-index: 100; display: grid; place-items: center; padding: 20px; }
.viewer img, .viewer iframe { max-width: 96vw; max-height: 88vh; background: #fff; border-radius: 6px; }
.viewer iframe { width: 900px; height: 88vh; border: 0; }
.viewer .close { position: absolute; top: 12px; right: 16px; color: #fff; font-size: 32px; background: none; border: 0; cursor: pointer; }

/* Étapes de la demande */
.steps { display: flex; gap: 0; margin: 4px 0 18px; overflow-x: auto; }
.step { flex: 1; min-width: 110px; text-align: center; position: relative; font-size: 12.5px; color: var(--muted); padding-top: 32px; }
.step::before { content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; z-index: 1; line-height: 22px; }
.step::after { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.step:first-child::after { display: none; }
.step.done { color: var(--green-dark); }
.step.done::before { content: "✓"; background: var(--green); border-color: var(--green); color: #fff; }
.step.done::after, .step.current::after { background: var(--green); }
.step.current { color: var(--ink); font-weight: 700; }
.step.current::before { border-color: var(--orange); color: var(--orange); }
.step.bad::before { content: "✕"; background: var(--red); border-color: var(--red); color: #fff; }

/* Décision du Consul */
.decision { border: 2px solid var(--orange); background: linear-gradient(180deg, #fffaf3, #fff); }

/* Carte interactive */
.map-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; height: calc(100vh - 160px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.map-side { border-right: 1px solid var(--line); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
#map { height: 100%; width: 100%; }
.map-list { display: grid; gap: 4px; }
.map-list button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; font: inherit; }
.map-list button:hover { background: var(--line-2); }
.map-list img, .map-list .ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--line-2); flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--green-dark); }
.mk { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; overflow: hidden; }
.mk img, .mk span { transform: rotate(45deg); width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; }
.pop { display: flex; gap: 12px; min-width: 250px; font-family: "Inter", sans-serif; }
.pop img, .pop .ph { width: 72px; height: 96px; border-radius: 8px; object-fit: cover; background: var(--line-2); flex: none; display: grid; place-items: center; font-weight: 700; color: var(--green-dark); }
.pop h4 { margin: 0 0 2px; font-size: 14px; }
.pop p { margin: 2px 0; font-size: 12.5px; color: var(--ink-2); }
.leaflet-popup-content { margin: 12px 14px; }

/* ---------- Connexion & pages publiques ---------- */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 10% -10%, #fff3e6 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e7f6ee 0, transparent 60%), var(--bg); }
.login-box { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(16, 40, 24, .1); padding: 30px 28px; border: 1px solid var(--line); }
.login-box .logo { display: block; width: 100%; max-width: 330px; margin: 0 auto 6px; }
.login-box h1 { font-size: 18px; text-align: center; margin: 14px 0 18px; color: var(--ink-2); font-weight: 600; }
.flag-bar { height: 5px; background: linear-gradient(90deg, var(--orange) 33.3%, #fff 33.3% 66.6%, var(--green) 66.6%); }
body.public { background: var(--bg); }
.pub-head { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; text-align: center; }
.pub-head img { height: 64px; width: auto; }
.pub-main { max-width: 860px; margin: 24px auto; padding: 0 16px; }
.pub-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 24px 16px 36px; }
.verify { text-align: center; }
.verify .seal { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; }
.verify .seal.ok { background: var(--green-soft); color: var(--green); }
.verify .seal.ko { background: var(--red-soft); color: var(--red); }
.verify .seal.warn { background: var(--amber-soft); color: var(--amber); }
.verify-card { display: flex; gap: 18px; text-align: left; align-items: flex-start; margin-top: 16px; }
.verify .dl { text-align: left; }
.filters-toggle { display: none; }
.verify-card img { width: 120px; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- Divers ---------- */
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; }
.pager .cur { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.money-in { color: var(--green-dark); font-weight: 600; }
.money-out { color: var(--red); font-weight: 600; }
details.more > summary { cursor: pointer; color: var(--green-dark); font-weight: 600; margin: 6px 0; }
.modal { position: fixed; inset: 0; background: rgba(10, 20, 14, .45); display: none; place-items: center; padding: 16px; z-index: 90; }
.modal.open { display: grid; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box h2 { display: flex; justify-content: space-between; align-items: center; }
.ac-wrap { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 60; max-height: 320px; overflow-y: auto; }
.ac-list button { display: flex; width: 100%; gap: 10px; padding: 8px 10px; border: 0; background: #fff; text-align: left; cursor: pointer; font: inherit; align-items: center; }
.ac-list button:hover, .ac-list button.on { background: var(--green-soft); }
.ac-list small { display: block; color: var(--muted); }
.selected-person { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #bfe5cf; background: #f6fcf8; border-radius: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 35; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-grid; }
  .g3, .g2, .g-side-l { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; grid-template-rows: auto 70vh; height: auto; }
  .map-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
}
@media (max-width: 760px) {
  .content { padding: 16px; }
  .topbar { padding: 8px 12px; }
  .hide-sm { display: none !important; }
  .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > * { grid-column: auto !important; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dt { margin-top: 8px; }
  .profile { flex-direction: column; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px; }
  .kpi .ki { display: none; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  /* Tableaux en cartes */
  table.table.cards-sm thead { display: none; }
  table.table.cards-sm, .cards-sm tbody, .cards-sm tr, .cards-sm td { display: block; width: 100%; }
  .cards-sm tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  .cards-sm td { border: 0; padding: 3px 10px; }
  .cards-sm td[data-l]::before { content: attr(data-l) " : "; color: var(--muted); font-size: 12px; }
  .cards-sm td.actions, .cards-sm td.num, .cards-sm td.center { text-align: left; }
  .piece { grid-template-columns: 26px 1fr; }
  .piece .pa { grid-column: 1 / -1; justify-content: flex-start; }
  .verify-card { flex-direction: column; align-items: center; text-align: center; }
  .form-actions .btn { flex: 1; }
  .bar-row { grid-template-columns: 90px 1fr 44px; }
  .verify-card .dl { grid-template-columns: 1fr 1.3fr !important; gap: 6px 10px; }
  .verify-card .dl dt { margin-top: 0; }
  .filters-toggle { display: inline-flex; }
  .filters:not(.open) > .field:not(.grow):not(.keep) { display: none; }
  .filters .field.grow { flex-basis: 100%; }
}
@media print {
  .sidebar, .topbar, .no-print, .form-actions, .alert { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
