/* 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; }
.lang-top { width: 82px !important; min-width: 0; height: 40px; padding: 0 22px 0 12px !important; border: 1px solid var(--line); border-radius: 999px; background-color: var(--surface); color: var(--text); font-weight: 700; font-size: .9rem; cursor: pointer; flex: none; margin: 0 6px 0 0; }
@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; }

/* Entonnoir : étape où l'on perd le plus de visiteurs */
tr.funnel-worst td { background: var(--danger-soft); }

/* Rubriques Hôtels, Voyage, Santé : onglets dans le bandeau */
.hub-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hub-tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .92rem; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .4); }
.hub-tabs a:hover { background: rgba(255, 255, 255, .24); }
.hub-tabs a.on { background: var(--yellow); color: #1b1300; border-color: var(--yellow); }
@media print { .topbar, .footer, #modal-root, .btn { display: none !important; } }

/* Barre de recherche type Alibaba */
.sbar { position: relative; width: 100%; max-width: 920px; margin: 18px 0 6px; }
.sbar-box { display: flex; align-items: stretch; background: var(--surface); border: 3px solid var(--yellow); border-radius: 999px; overflow: hidden; box-shadow: var(--shadow); }
.sbar-cat { border: 0; border-right: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 12px 0 16px; font-weight: 600; max-width: 150px; border-radius: 0; min-height: 0; }
.sbar-box input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; font-size: 1rem; background: transparent; color: var(--text); box-shadow: none; border-radius: 0; }
.sbar-box input:focus { outline: none; }
.sbar-box:focus-within { box-shadow: 0 0 0 4px rgba(240, 179, 35, .35); }
.sbar-ai { border: 0; background: transparent; color: var(--green); font-weight: 800; padding: 0 12px; cursor: pointer; white-space: nowrap; }
.sbar-ai:hover { background: var(--yellow-soft); }
.sbar-go { border: 0; background: var(--yellow); color: #1b1300; font-weight: 800; padding: 0 22px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sbar-go:hover { filter: brightness(.95); }
.sbar.big .sbar-box input { padding: 16px 16px; font-size: 1.06rem; }
.sbar-sugg { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.sbar-sugg a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.sbar-sugg a:hover, .sbar-sugg a:focus { background: var(--surface-2); }
.sbar-sugg small { color: var(--muted); white-space: nowrap; }
.sbar-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sbar-chips button { border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: .86rem; cursor: pointer; }
.sbar-chips button.ai { background: var(--yellow); color: #1b1300; border-color: var(--yellow); font-weight: 700; }
.sbar-strip { background: var(--green); padding: 2px 0 10px; }
.sbar-strip .sbar { margin: 8px auto 0; }
.hero-slim { padding-top: 14px; padding-bottom: 16px; }
@media (max-width: 640px) {
  .sbar-cat { max-width: 92px; padding: 0 6px 0 10px; font-size: .85rem; }
  .sbar-go span, .sbar-ai span { display: none; }
  .sbar-go { padding: 0 16px; }
}
/* Assistant IA */
.modal.modal-chat { width: min(640px, 96vw); display: flex; flex-direction: column; max-height: 90vh; }
.chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 12px; min-height: 300px; max-height: 62vh; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 16px; line-height: 1.4; font-size: .96rem; }
.msg.bot { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.wide { max-width: 100%; width: 100%; }
.msg.me.wide { background: transparent; color: var(--text); padding: 0; }
.chat-in { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.chat-in input { flex: 1; }
.chat-res { display: grid; gap: 6px; }
.chat-item { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.chat-item img, .chat-item .ci-ico { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface-2); font-size: 1.6rem; }
.chat-item b { display: block; font-size: .92rem; }
.chat-item small { color: var(--muted); }
.chat-form .field { margin-bottom: 8px; }
.selfie-box video, .selfie-box img { width: 240px; max-width: 100%; height: auto; border-radius: 12px; background: #000; display: block; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }
.card.demand h3 a { color: inherit; text-decoration: none; }
.selfie-box [hidden] { display: none !important; }
/* Rapport des clics (Administration → Onglets & clics) */
.nowrap { white-space: nowrap; }
.clk-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 2px; }
.clk-bar span { display: block; height: 100%; background: var(--green); border-radius: 4px; }
[data-theme='dark'] .clk-bar span { background: var(--yellow); }
/* Fréquentation (tableau de bord) */
.chart .bar2 { fill: var(--yellow); }
[data-theme='dark'] .chart .bar2 { fill: #8fd3ae; }
.legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--green); margin-left: 8px; }
.legend .lg2 { background: var(--yellow); margin-left: 0; }
[data-theme='dark'] .legend .lg { background: var(--yellow); }
[data-theme='dark'] .legend .lg2 { background: #8fd3ae; }
.chat-item .ci-why { display: block; font-style: normal; font-size: 12px; color: var(--green); margin-top: 2px; }
[data-theme='dark'] .chat-item .ci-why { color: var(--yellow); }
/* Tutos */
.tuto-thumb { aspect-ratio: 16 / 9 !important; }
.tuto-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; background: linear-gradient(135deg, var(--green), var(--green-2)); }
.tuto-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: .75rem; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.tuto-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--yellow-soft); box-shadow: none; }
.tuto-best { border: 2px solid var(--yellow); }
.tuto-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .tuto-detail { grid-template-columns: 1fr; } }
.tuto-player { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; position: relative; display: grid; place-items: center; color: #fff; }
.tuto-player video, .tuto-player > img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tuto-player > img { position: absolute; inset: 0; object-fit: cover; opacity: .55; }
.tuto-over { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.75)); }
.tuto-buy { display: grid; gap: 12px; position: sticky; top: 90px; }
.tuto-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--surface-2); border-radius: 10px; padding: 12px; }
.tuto-split div { display: grid; } .tuto-split b { font-size: 1.05rem; }
@media (max-width: 560px) { .tuto-split { grid-template-columns: 1fr; } }
.tuto-prev { margin-top: 8px; max-width: 320px; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.tuto-prev video, .tuto-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tuto-prev [hidden] { display: none !important; }
.tuto-progress { height: 22px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.tuto-progress span { display: block; height: 100%; width: 0; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 22px; transition: width .2s; }
.tuto-mark { background: color-mix(in srgb, var(--danger) 30%, transparent); border-radius: 3px; padding: 0 2px; font-weight: 700; }
.hub-tabs.light a { color: var(--text); background: var(--surface); border-color: var(--line); }
.hub-tabs.light a:hover { background: var(--surface-2); }
.hub-tabs.light a.on { background: var(--yellow); color: #1b1300; border-color: var(--yellow); }
.btn.on-dark { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,.55); }
@media (min-width: 641px) and (max-width: 1360px) { .nav { gap: 2px; } .nav a { padding: 7px 8px; font-size: .92rem; } }
.tuto-face { display: flex; gap: 8px; flex-wrap: wrap; }
.tuto-face figure { margin: 0; width: 104px; }
.tuto-face img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; background: var(--surface-2); display: block; }
.tuto-face figure:first-child img { outline: 3px solid var(--yellow); }
.tuto-face figcaption { font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }
.signup-group { font-size: .95rem; margin: 14px 0 8px; color: var(--muted); font-weight: 700; }
#partnerF[hidden] { display: none !important; }
#partnerF .card { padding: 0; box-shadow: none; }
.tuto-noselfie { width: 104px; height: 104px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; color: var(--muted); outline: 3px solid var(--yellow); }
#roleF.picked .roles { grid-template-columns: 1fr; }
#roleF.picked .signup-group { display: none; }
#roleF .signup-sec[hidden] { display: none !important; }
#roleF.picked .roles label:not(:has(input:checked)) { display: none; }
#roleChange { margin: -4px 0 14px; }
#roleChange[hidden] { display: none !important; }
@media (min-width: 641px) and (max-width: 1360px) { .nav a { padding: 6px 7px; font-size: .9rem; } }
.linkbtn { background: none; border: 0; padding: 0; color: var(--danger); font-weight: 700; cursor: pointer; text-decoration: underline; font: inherit; }

/* Téléphones : la page ne doit jamais être plus large que l'écran (sinon elle « bouge » au toucher).
   Le menu défile dans sa propre bande, les liens du pied de page passent à la ligne. */
body { overflow-x: clip; }
.topbar-in { min-width: 0; }
.footer nav { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 640px) {
  .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; mask-image: linear-gradient(to right, #000 85%, transparent); -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .topbar-in { gap: 8px; }
}

/* Promotion : affiche et partage empilés sur téléphone */
@media (max-width: 700px) { .promo-share { grid-template-columns: 1fr !important; } }

/* Études à l'étranger */
.ee-steps{list-style:none;margin:0;padding:0;border-left:3px solid var(--line);}
.ee-steps li{position:relative;padding:8px 0 12px 18px;color:var(--muted)}
.ee-steps li::before{content:'';position:absolute;left:-8px;top:12px;width:13px;height:13px;border-radius:50%;background:var(--line)}
.ee-steps li.done{color:inherit}.ee-steps li.done::before{background:var(--green,#1fa855)}
.ee-steps li.cur{color:inherit}.ee-steps li.cur::before{background:var(--yellow,#f5b301);box-shadow:0 0 0 4px #f5b30133}
.ee-preview{position:relative;overflow:hidden;background:var(--surface-2);box-shadow:none;min-height:160px;user-select:none}
.ee-wm{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transform:rotate(-20deg);font-size:2rem;font-weight:800;color:#c0392b;opacity:.22;pointer-events:none;white-space:nowrap}
.ee-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(270px,1fr))}
#emF .grid2 > *, #emF .grid3 > *{min-width:0}
#emF input, #emF select, #emF textarea{max-width:100%;min-width:0;width:100%}
@media (max-width: 560px){ #emF .grid2{grid-template-columns:1fr} }

/* Contes audio */
.conte-card { display: block; color: inherit; text-decoration: none; padding: 0 0 14px; overflow: hidden; }
.conte-card .stack { padding: 10px 14px 0; display: flex; flex-direction: column; align-items: flex-start; }
.conte-cover { aspect-ratio: 16 / 10; display: grid; place-items: center; border-radius: 0; }
.conte-cover span { font-size: 3.6rem; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.conte-cover.big { border-radius: 14px; aspect-ratio: 16 / 7; }
.conte-cover.big span { font-size: 5rem; }
.studio-rec [hidden], .cForm [hidden] { display: none !important; }
.studio-rec { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.studio-dot { width: 14px; height: 14px; border-radius: 50%; background: #c0392b; animation: studioBlink 1s infinite; }
@keyframes studioBlink { 50% { opacity: .2; } }
.studio-meter { flex: 1; min-width: 120px; height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.studio-meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width .08s; }

/* Pages jaunes */
.yp-hero { background: linear-gradient(135deg, #f4b81f, #e09a00) !important; color: #1b1300 !important; }
.yp-hero h1, .yp-hero p { color: #1b1300 !important; }
.yp-hero h1 span { color: #0f4c35 !important; }
.yp-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.yp-city { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; border-left: 6px solid #f4b81f; }
.yp-city b { font-size: 1.15rem; }
.yp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.yp-card { display: flex; flex-direction: column; gap: 8px; border-top: 4px solid #f4b81f; }
.yp-quartiers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.yp-quartiers .chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .88rem; text-decoration: none; color: inherit; background: var(--surface); }
.yp-quartiers .chip.on { background: #f4b81f; border-color: #f4b81f; color: #1b1300; font-weight: 700; }
.linklike { background: none; border: 0; padding: 0; text-align: left; text-decoration: underline; cursor: pointer; font: inherit; }
