/* Louer à Brazzaville — feuille de style unique, mobile d'abord */
/* Polices auto-hébergées (licence SIL OFL) : aucune dépendance externe */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }
:root {
  --green: #0f5a3a; --green-2: #0b4630; --green-soft: #e3efe8; --yellow: #f0b323; --yellow-soft: #fdf3d7;
  --bg: #f7f5ef; --surface: #ffffff; --surface-2: #f0ede4; --text: #16201b; --muted: #5d6a63; --line: #e2ddd0;
  --danger: #b3261e; --danger-soft: #fbe9e7; --ok: #157347; --shadow: 0 1px 2px rgba(15, 30, 20, .06), 0 6px 20px rgba(15, 30, 20, .06);
  --r: 14px; --r-sm: 10px;
  --f-title: 'Bricolage Grotesque', system-ui, sans-serif; --f-text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #0e1411; --surface: #151d19; --surface-2: #1c2621; --text: #e9efe9; --muted: #9db0a6; --line: #26332c;
  --green-soft: #173327; --yellow-soft: #3a2f10; --danger-soft: #3a1a17; --danger: #ff8a80; --ok: #6fd39c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--f-text); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
img, video { max-width: 100%; display: block; }
a { color: var(--green); }
[data-theme='dark'] a { color: var(--yellow); }
h1, h2, h3 { font-family: var(--f-title); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.8rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--yellow); color: #000; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text) !important; font-family: var(--f-title); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand em { font-style: normal; color: var(--yellow); margin: 0 .18em; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current='page'] { background: var(--surface-2); }
.nav a.cta { background: var(--green); color: #fff; }
.nav a.bell { position: relative; padding: 8px 10px; }
.nav .count { position: absolute; top: 2px; right: 0; background: var(--yellow); color: #1b1300; border-radius: 999px; font-size: .68rem; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; flex: none; }
@media (max-width: 640px) { .brand span { display: none; } .nav { flex-wrap: nowrap; gap: 2px; } .nav a { padding: 7px 9px; font-size: .9rem; white-space: nowrap; } .nav a.nav-search { display: none; } }

/* Boutons et formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 20px; font: 600 .97rem var(--f-text); cursor: pointer; text-decoration: none; background: var(--green); color: #fff !important; min-height: 44px; transition: transform .05s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.yellow { background: var(--yellow); color: #1b1300 !important; }
.btn.ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 7px 14px; min-height: 36px; font-size: .9rem; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 2px solid color-mix(in srgb, var(--green) 30%, transparent); }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin: 0; }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.grid3 { display: grid; gap: 0 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.error { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: var(--r-sm); margin-bottom: 12px; font-size: .93rem; }
.success { background: var(--green-soft); color: var(--ok); padding: 10px 12px; border-radius: var(--r-sm); margin-bottom: 12px; }

/* Cartes et blocs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.section { padding: 26px 0 40px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.pill.verified { background: var(--green); color: #fff; }
.pill.warn { background: var(--yellow-soft); color: #7a5600; }
[data-theme='dark'] .pill.warn { color: var(--yellow); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--green-soft); color: var(--ok); }

/* Accueil */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(240, 179, 35, .35), transparent 60%), linear-gradient(160deg, var(--green) 0%, var(--green-2) 100%); color: #fff; padding: 34px 0 70px; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero h1 span { color: var(--yellow); }
.hero p { color: rgba(255, 255, 255, .85); max-width: 52ch; font-size: 1.05rem; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-top: 18px; scrollbar-width: none; }
.cats button { flex: none; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; padding: 9px 16px; border-radius: 999px; font: 600 .95rem var(--f-text); cursor: pointer; min-height: 42px; }
.cats button[aria-pressed='true'] { background: var(--yellow); border-color: var(--yellow); color: #1b1300; }
.search-layout { display: grid; gap: 20px; grid-template-columns: 290px 1fr; margin-top: -44px; position: relative; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }
.filters { align-self: start; position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; }
@media (max-width: 900px) { .filters { position: static; max-height: none; } .filters.collapsed .filters-body { display: none; } }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.filters h3 { margin: 0; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.filters legend { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.filters .field { margin-bottom: 10px; }
.toggle-filters { display: none; }
@media (max-width: 900px) { .toggle-filters { display: inline-flex; } }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.results-head strong { font-family: var(--f-title); font-size: 1.15rem; }
.results-head select { width: auto; min-height: 38px; padding: 6px 10px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text) !important; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.lcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(15, 30, 20, .12); }
.lcard .ph { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; }
.lcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.lcard .ph .tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.lcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.price { font-family: var(--f-title); font-weight: 800; font-size: 1.25rem; color: var(--green); }
[data-theme='dark'] .price { color: var(--yellow); }
.price small { font-family: var(--f-text); font-weight: 500; font-size: .8rem; color: var(--muted); }
.feats { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.loc { font-weight: 600; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.more { display: flex; justify-content: center; margin-top: 20px; }
.noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .85rem; }

/* Fiche annonce */
.detail { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.gallery { border-radius: var(--r); overflow: hidden; background: var(--surface-2); position: relative; }
.gallery .main-media { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #000; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px; background: var(--surface); }
.thumbs button { flex: none; width: 76px; height: 58px; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer; background: var(--surface-2); color: var(--muted); font-size: .75rem; }
.thumbs button[aria-current='true'] { border-color: var(--yellow); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lock { position: absolute; inset: auto 12px 12px 12px; background: rgba(10, 20, 15, .82); color: #fff; padding: 12px 14px; border-radius: var(--r-sm); font-size: .92rem; display: flex; gap: 10px; align-items: center; }
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.spec div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; }
.spec b { display: block; font-family: var(--f-title); font-size: 1.15rem; }
.spec span { font-size: .8rem; color: var(--muted); }
.side { position: sticky; top: 76px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.desc { white-space: pre-wrap; }

/* Modale */
.modal-back { position: fixed; inset: 0; background: rgba(5, 12, 8, .55); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
.spinner { width: 42px; height: 42px; border: 4px solid var(--surface-2); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.camera { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-sm); background: #000; transform: scaleX(-1); }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; }
#toast div { background: #10241a; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); margin-top: 8px; font-size: .95rem; animation: fade .2s; max-width: 90vw; }
#toast div.err { background: var(--danger); }

/* Authentification et espaces */
.narrow { width: min(520px, 100% - 32px); margin: 30px auto; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.roles label { border: 2px solid var(--line); border-radius: var(--r-sm); padding: 12px; cursor: pointer; font-weight: 500; display: block; margin: 0; }
.roles label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.roles input { position: absolute; opacity: 0; }
.roles b { display: block; font-family: var(--f-title); }
.roles span { font-size: .8rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: thin; }
.tabs a { flex: none; padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a[aria-current='page'] { color: var(--text); border-color: var(--yellow); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi span { font-size: .82rem; color: var(--muted); display: block; }
.kpi b { font-family: var(--f-title); font-size: 1.45rem; font-weight: 800; }
.kpi.accent { background: var(--green); color: #fff; border-color: var(--green); }
.kpi.accent span { color: rgba(255, 255, 255, .8); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--green); }
[data-theme='dark'] .chart .bar { fill: var(--yellow); }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--f-text); }
.chart .avg { stroke: var(--yellow); stroke-dasharray: 4 3; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.media-grid .m { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; }
.media-grid .m img, .media-grid .m video { width: 100%; height: 100%; object-fit: cover; }
.media-grid .m .acts { position: absolute; inset: auto 4px 4px 4px; display: flex; gap: 4px; justify-content: flex-end; }
.media-grid .m .acts button { border: 0; border-radius: 6px; padding: 3px 7px; font-size: .75rem; cursor: pointer; background: rgba(0, 0, 0, .7); color: #fff; }
.doc-view { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0; }
.doc-view img { border-radius: 10px; border: 1px solid var(--line); max-height: 320px; object-fit: contain; background: var(--surface-2); width: 100%; }
.legal h2 { margin-top: 1.4em; }

.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 30px; font-size: .9rem; color: var(--muted); }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0; }
.footer nav { display: flex; gap: 14px; }
.footer span { color: var(--green); font-weight: 600; }
[data-theme='dark'] .footer span { color: var(--yellow); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.uncertain { outline: 2px solid var(--yellow) !important; background: var(--yellow-soft) !important; }

/* --- Espace Artisans, carte, messagerie, signalements --- */
.trade-big { display: grid; place-items: center; height: 100%; font-size: 64px; background: var(--surface-2); }
.cats button small { opacity: .75; font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg a { padding: 8px 16px; text-decoration: none; color: var(--text); font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.seg a[aria-pressed='true'] { background: var(--green); color: #fff; }
.map { height: 320px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.map.big { height: min(520px, 70vh); margin-bottom: 8px; }
.map-pin { background: none; border: 0; }
.map-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--green); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-size: 16px; }
.map-pin span i { font-style: normal; transform: rotate(45deg); line-height: 1; }
.map-pin.me span i { transform: none; }
.gallery .main-media.trade-big { background: var(--surface-2); aspect-ratio: 16 / 7; font-size: 80px; }
.map-pin.off span { background: #8a948f; }
.map-pin.me span { background: var(--yellow); color: #1b1300; border-radius: 50%; transform: none; font-size: 12px; }
.leaflet-popup-content { font: .9rem/1.4 var(--f-text); }
.safety { background: color-mix(in srgb, var(--yellow) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--yellow) 45%, var(--line)); border-radius: var(--r-sm); padding: 12px 14px; }
.safety ul { margin: 6px 0 0; padding-left: 18px; }
.conv-list { list-style: none; margin: 0; padding: 0; }
.conv-list li + li { border-top: 1px solid var(--line); }
.conv-list a { display: block; padding: 12px 6px; text-decoration: none; color: var(--text); }
.conv-list a:hover { background: var(--surface-2); }
.conv-list a.unread { border-left: 4px solid var(--yellow); padding-left: 10px; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 14px 2px; margin: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bubble { max-width: 80%; align-self: flex-start; background: var(--surface-2); padding: 10px 12px; border-radius: 14px 14px 14px 4px; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--green); color: #fff; border-radius: 14px 14px 4px 14px; }
.bubble time { display: block; opacity: .7; margin-top: 4px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 48px; resize: vertical; }
.thumb-edit { display: flex; flex-direction: column; gap: 4px; width: 96px; }
.thumb-edit img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.toggle-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin: 0 0 16px; }
.toggle-box legend { font-weight: 700; padding: 0 6px; }
.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--green); }
.muted-box { opacity: .5; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 18px; }
.plan h2 { margin: 0 0 6px; font-size: 1.15rem; }
.plan ul { padding-left: 18px; margin: 10px 0 14px; }
.pill.sponso { background: var(--yellow); color: #1b1300; }
.lcard.sponsored { outline: 2px solid var(--yellow); outline-offset: -2px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; min-width: 120px; }
.bar span { display: block; height: 100%; background: var(--green); }
.acttabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acttabs a { padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.acttabs a[aria-current='page'] { background: var(--green); color: #fff; border-color: var(--green); }
/* Matrice BCG — palette catégorielle validée (clair / sombre), toujours doublée d'étiquettes et d'un tableau */
:root { --q-vedette: #2a78d6; --q-dilemme: #eb6834; --q-vache: #1baf7a; --q-poids_mort: #eda100; }
[data-theme='dark'] { --q-vedette: #3987e5; --q-dilemme: #d95926; --q-vache: #199e70; --q-poids_mort: #c98500; }
.bcg-wrap { position: relative; }
.bcg svg { width: 100%; height: auto; display: block; }
.bcg .grid line { stroke: var(--line); stroke-width: 1; }
.bcg .axis text, .bcg .qlabel { fill: var(--muted); font: 12px var(--f-text); }
.bcg .qlabel { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.bcg .cut { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.bcg .pt circle { stroke: var(--surface); stroke-width: 2; fill-opacity: .85; }
.bcg .pt text { fill: var(--text); font: 600 12px var(--f-text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.bcg .pt:hover circle, .bcg .pt:focus circle { fill-opacity: 1; stroke: var(--text); }
.bcg .pt:focus { outline: none; }
.bcg-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: .85rem; min-width: 180px; z-index: 2; }
.qdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; margin: 6px 0 10px; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; height: 160px; border-bottom: 1px solid var(--line); }
.bars div { background: var(--q-vedette); border-radius: 4px 4px 0 0; min-height: 1px; position: relative; }
.bars div:hover { filter: brightness(1.1); }
.bar-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; font-size: .72rem; color: var(--muted); text-align: center; margin-top: 4px; }
