/* ATLAS CÔTE D’IVOIRE — thème sombre épuré */
:root {
  --bg: #08090a;
  --bg-2: #0d0f0f;
  --surface: #121515;
  --surface-2: #181c1b;
  --surface-3: #1f2423;
  --line: #222827;
  --line-2: #2e3533;
  --text: #eef1ef;
  --text-2: #b4bcb8;
  --muted: #838d88;
  --green: #3fd08a;
  --green-2: #2aa86c;
  --green-deep: #0e2e20;
  --orange: #ff9447;
  --orange-deep: #3a2414;
  --danger: #ff6b6b;
  --danger-deep: #3a1517;
  --warn: #f3c25a;
  --warn-deep: #33290f;
  --info: #7fb2ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -30px rgba(0,0,0,.8);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --wrap: 1180px;
  --green-hover: #6fe3a9;
  --on-green: #04150d;
  --on-orange: #1d0d02;
  --on-danger: #1b0506;
  --ok-line: #1f5a3f;
  --ok-text: #b8f3d4;
  --danger-line: #6a2a2d;
  --danger-text: #ffd0d0;
  --danger-hover: #ff8b8b;
  --warn-line: #5a4a1c;
  --orange-line: #6a3c1c;
  --orange-text: #ffd5b6;
  --info-line: #263c66;
  --info-deep: #13203a;
  --surface-hover: #262c2a;
  --map-a: #121716;
  --map-b: #0a0c0c;
  --overlay: rgba(8,9,10,.84);
  --ghost: rgba(255,255,255,.08);
  --row-hover: rgba(255,255,255,.015);
  color-scheme: dark;
}

/* Mode clair : ivoire, vert profond, accents orange (identité de la maquette) */
:root[data-theme="light"] {
  --bg: #f8f6f0;
  --bg-2: #f2efe7;
  --surface: #ffffff;
  --surface-2: #f7f5ef;
  --surface-3: #ece8de;
  --line: #e4e0d5;
  --line-2: #d2ccbe;
  --text: #14201a;
  --text-2: #3b4842;
  --muted: #5f6b65;
  --green: #12683f;
  --green-2: #0f5a36;
  --green-deep: #e2f1e8;
  --green-hover: #0b4d2e;
  --orange: #c2531a;
  --orange-deep: #fcecdf;
  --danger: #b42318;
  --danger-deep: #fdecea;
  --warn: #8a5800;
  --warn-deep: #fbf1d4;
  --info: #1f5fbf;
  --on-green: #ffffff;
  --on-orange: #ffffff;
  --on-danger: #ffffff;
  --ok-line: #a8d5bb;
  --ok-text: #0b4d2e;
  --danger-line: #f1b5af;
  --danger-text: #8c1d13;
  --danger-hover: #93190f;
  --warn-line: #e8cf8c;
  --orange-line: #f0c09d;
  --orange-text: #7a330c;
  --info-line: #b9cdf0;
  --info-deep: #eaf1fc;
  --surface-hover: #e4dfd3;
  --map-a: #eef0ea;
  --map-b: #e6e3da;
  --overlay: rgba(248,246,240,.88);
  --ghost: rgba(0,0,0,.07);
  --row-hover: rgba(0,0,0,.02);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -28px rgba(30,40,30,.35);
  color-scheme: light;
}

/* Bouton de thème */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.atlas-tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.78) contrast(.92) saturate(.35); }
:root[data-theme="light"] .atlas-tiles-dark { filter: saturate(.75) contrast(.95); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-hover); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--orange); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--overlay); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: auto; height: 52px; flex: none; display: block; }
.brand-logo-lg { width: auto; height: 126px; display: block; }
.brand-footer { margin-bottom: 4px; }
@media (max-width: 760px) { .brand-mark { height: 44px; } }
.brand-name { font-size: .92rem; letter-spacing: .14em; font-weight: 500; white-space: nowrap; }
.brand-name strong { font-weight: 700; }
.brand-name small { display: block; font-size: .68rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-nav ul { display: flex; list-style: none; gap: 2px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; color: var(--text-2); text-decoration: none; border-radius: 8px; font-size: .93rem; }
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--orange); border-radius: 8px 8px 0 0; }
.nav-search { display: grid !important; place-items: center; width: 38px; height: 38px; padding: 0 !important; border: 1px solid var(--line-2); border-radius: 50% !important; }
.nav-search svg { width: 18px; height: 18px; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line-2); background: transparent; border-radius: 10px; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { position: absolute; left: 11px; width: 18px; height: 2px; background: var(--text); content: ""; transition: transform .2s; }
.nav-toggle-bar { top: 19px; } .nav-toggle-bar::before { top: -6px; left: 0; } .nav-toggle-bar::after { top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px; font-size: 1rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--orange); border-radius: 4px; }
  .nav-search { width: auto !important; border-radius: 8px !important; height: 44px; }
}

/* ---------- Boutons et formulaires ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 600 .93rem/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-hover); color: var(--on-green); }
.btn-secondary { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-hover); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover { background: var(--danger-hover); color: var(--on-danger); }
.btn-danger-text { color: var(--danger) !important; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
label, .label { display: block; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; font: 1rem/1.4 var(--font); min-height: 44px; transition: border-color .15s, box-shadow .15s; }
input[type=file] { color: var(--text-2); font: inherit; }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select[multiple] { background-image: none; padding-right: 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field { margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.field-check { display: flex; gap: 10px; align-items: flex-start; }
.field-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.field-check label { margin: 0; font-weight: 500; color: var(--text); }
.hint { font-size: .84rem; color: var(--muted); margin: 6px 0 0; }
.field-error { color: var(--danger); font-size: .86rem; margin: 6px 0 0; font-weight: 500; }
.req { color: var(--muted); font-weight: 500; }
.form { max-width: 100%; }

/* ---------- Messages ---------- */
.flash { margin: 16px auto; max-width: var(--wrap); padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 500; }
main .flash, .auth-card .flash, .admin-main > .flash { margin: 0 0 16px; }
.flash-success { background: var(--green-deep); border-color: var(--ok-line); color: var(--ok-text); }
.flash-error { background: var(--danger-deep); border-color: var(--danger-line); color: var(--danger-text); }
.notice { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.notice p:last-child { margin: 0; }
.notice-warn { border-left-color: var(--warn); }
.notice-danger { border-left-color: var(--danger); }
.notice-sm { font-size: .86rem; padding: 8px 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface-2); white-space: nowrap; margin-left: 6px; vertical-align: middle; }
.badge:first-child { margin-left: 0; }
.badge-ok { color: var(--green); border-color: var(--ok-line); background: var(--green-deep); }
.badge-warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-deep); }
.badge-danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-deep); }
.badge-muted { color: var(--muted); }
.badge-demo { color: var(--orange); border-color: var(--orange-line); background: var(--orange-deep); }

/* ---------- Accueil ---------- */
.hero { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--green) 13%, transparent), transparent 70%); pointer-events: none; }
.hero-inner { position: relative; text-align: center; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 600; margin-bottom: 14px; }
.slogan { font-family: var(--display); font-weight: 500; font-size: clamp(2.3rem, 7vw, 4.6rem); letter-spacing: -.02em; line-height: 1.05; margin: 0 auto 36px; max-width: 14ch; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; color: var(--muted); font-size: .9rem; margin-top: 28px; }
.hero-stats strong { color: var(--text); font-weight: 650; }
.hero-stats a { color: inherit; text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; transition: border-color .2s, background .2s, color .2s; }
.hero-stats a:hover, .hero-stats a:focus-visible { color: var(--text); border-color: var(--line-2); background: var(--surface); }
.hero-stats a:hover strong { color: var(--green); }

.search { position: relative; max-width: 760px; margin: 0 auto; text-align: left; }
.search-field { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 6px 6px 18px; transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); }
.search-icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-field input { border: 0; background: transparent; box-shadow: none !important; padding: 8px 4px; min-height: 44px; flex: 1; min-width: 0; }
.search-large .search-field { padding: 8px 8px 8px 22px; }
.search-large .search-field input { font-size: 1.08rem; min-height: 52px; }
.search-large .btn { min-height: 50px; padding: 0 24px; }
@media (max-width: 520px) { .search-field .btn { padding: 0 14px; } .search-large .btn { padding: 0 16px; } }
.suggestions { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 24px 60px -20px rgba(0,0,0,.9); max-height: 380px; overflow: auto; }
.suggestions li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--surface-3); }
.suggestions .s-label { font-weight: 600; }
.suggestions .s-meta { color: var(--muted); font-size: .85rem; }
.suggestions .s-empty { color: var(--muted); cursor: default; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.link-more { font-size: .9rem; text-decoration: none; }
.home-section { padding: 36px 0 8px; }
.map-section { padding-top: 12px; }
.legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; margin: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-region { background: var(--green); }
.dot-district { background: var(--orange); border-radius: 2px; transform: rotate(45deg); margin-left: 10px; }

/* ---------- Carte ---------- */
.map-frame { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: radial-gradient(80% 80% at 50% 40%, var(--map-a), var(--map-b)); box-shadow: var(--shadow); }
.map { height: min(68vh, 620px); min-height: 360px; width: 100%; background: transparent; }
.map-frame-tall .map { height: min(75vh, 680px); }
.map-frame-small .map { height: 280px; min-height: 240px; }
.map-frame-picker .map { height: 320px; min-height: 260px; cursor: crosshair; }
.map-reset { position: absolute; right: 12px; top: 12px; z-index: 500; background: var(--overlay); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--text-2); margin: 0; }
.map-fallback[hidden] { display: none; }
.map-note { color: var(--muted); font-size: .84rem; margin: 10px 2px 18px; }
.leaflet-container { font: 13px/1.4 var(--font); background: transparent !important; }
.leaflet-control-attribution { background: var(--overlay) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bar a { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line-2) !important; }
.leaflet-bar a:hover { background: var(--surface-3) !important; }
.leaflet-tooltip.atlas-label { background: var(--overlay); color: var(--text); border: 1px solid var(--line-2); border-radius: 7px; box-shadow: none; padding: 3px 8px; font-weight: 600; font-size: 12px; }
.leaflet-tooltip.atlas-label::before { display: none; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -10px rgba(0,0,0,.8); }
.leaflet-popup-content a.popup-link { display: inline-block; margin-top: 6px; font-weight: 600; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.atlas-marker { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 2px solid var(--on-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); transition: transform .15s; }
.atlas-marker.district { background: var(--orange); border-radius: 3px; transform: rotate(45deg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 22%, transparent); border-color: var(--on-orange); }
.atlas-marker:hover, .atlas-marker:focus { transform: scale(1.3); }
.atlas-marker.district:hover { transform: rotate(45deg) scale(1.3); }
.leaflet-marker-icon:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

.region-details { margin: 6px 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.region-details > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.region-details > summary::after { content: "+"; color: var(--muted); }
.region-details[open] > summary::after { content: "–"; }
.region-details > summary::-webkit-details-marker { display: none; }
.region-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; padding: 4px 18px 20px; }
.region-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); margin: 0 0 6px; font-weight: 600; }
.region-group h3 .muted { font-weight: 500; }
.region-group-auto h3 { color: var(--text); }
.region-group ul { list-style: none; margin: 0; padding: 0; }
.region-group li { padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; }
.region-group a { color: var(--text); text-decoration: none; }
.region-group a:hover { color: var(--green); text-decoration: underline; }
.count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.explore-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.explore-list { max-height: min(75vh, 680px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding-top: 16px; }
.explore-list .region-index { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .explore-layout { grid-template-columns: 1fr; } .explore-list { max-height: none; } }
@media (max-width: 480px) { .explore-list .region-index { grid-template-columns: 1fr; } .map { min-height: 300px; height: 52vh; } }

/* ---------- Cartes ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-visual { height: 92px; background: linear-gradient(135deg, var(--green-deep), var(--surface) 70%); position: relative; }
.card-visual::after { content: attr(data-initial); position: absolute; right: 16px; bottom: -14px; font: 500 4.2rem/1 var(--display); color: var(--ghost); }
.card-visual.has-photo { height: 150px; background: var(--surface-2, var(--surface)); }
.card-visual.has-photo::after { display: none; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 16px 18px 18px; }
.card-meta { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.card-title { font-size: 1.1rem; margin: 0 0 6px; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.card-place { color: var(--text-2); font-size: .9rem; margin: 0 0 6px; }
.card-date { display: block; color: var(--green); font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.card-excerpt { color: var(--muted); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px 22px; text-align: center; color: var(--muted); }
.empty-title { color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.empty .btn { margin-top: 8px; }
.tile { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--green-2); color: var(--text); }
.tile strong { display: block; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: .9rem; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 28px; }

/* ---------- Pages ---------- */
.page-head { padding: 36px 16px 24px; }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 68ch; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span[aria-hidden] { color: var(--line-2); }
.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 18px 0 0; }
.facts dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.facts-col { flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.chip { display: inline-block; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .9rem; }
.chip:hover { border-color: var(--green); }
.source-note { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.filters .field { flex: 1 1 180px; margin-bottom: 12px; }
.filters .field-actions, .field-actions { display: flex; gap: 8px; flex: 0 0 auto; align-items: flex-end; flex-wrap: wrap; }
.filters-col { flex-direction: column; align-items: stretch; }
.filters-col .field { flex: none; }
.result-count { color: var(--muted); font-size: .9rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 28px 0; flex-wrap: wrap; }
.page-info { color: var(--muted); font-size: .9rem; }
.search-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .search-layout { grid-template-columns: 1fr; } }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.result-list a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); }
.result-list a:hover { border-color: var(--line-2); background: var(--surface-2); }
.result-list a.has-thumb { position: relative; padding-left: 132px; min-height: 104px; }
.result-thumb { position: absolute; left: 12px; top: 12px; width: 104px; height: calc(100% - 24px); max-height: 120px; object-fit: cover; border-radius: calc(var(--radius) - 4px); background: var(--surface-2); }
@media (max-width: 520px) { .result-list a.has-thumb { padding-left: 96px; } .result-thumb { width: 72px; height: 72px; } }
.result-name { font-weight: 650; font-size: 1.05rem; }
.result-meta { color: var(--muted); font-size: .88rem; }
.result-excerpt { flex-basis: 100%; color: var(--text-2); font-size: .92rem; }
.error-page { text-align: center; padding: 80px 16px; }
.error-code { font: 500 5rem/1 var(--display); color: var(--line-2); margin: 0 0 10px; }
.error-page .search { margin: 24px auto; }
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose h2 { margin-top: 1.6em; }
.plain { list-style: none; padding: 0; }
.plain li { margin-bottom: 8px; }

/* ---------- Fiche ---------- */
.demo-banner { background: var(--orange-deep); color: var(--orange-text); border-bottom: 1px solid var(--orange-line); padding: 10px 16px; text-align: center; font-size: .92rem; }
.fiche-head { padding-top: 32px; }
.fiche-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 8px; }
.variants { color: var(--muted); margin-bottom: 14px; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.fiche-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .fiche-hero { grid-template-columns: 1fr; } }
.cover { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.cover img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.cover figcaption { font-size: .8rem; color: var(--muted); padding: 8px 12px; background: var(--surface); }
.cover-empty { aspect-ratio: 2 / 1; display: grid; place-items: center; background: radial-gradient(70% 90% at 20% 10%, color-mix(in srgb, var(--green) 18%, transparent), transparent 60%), var(--surface); }
.cover-empty span { font: 500 7rem/1 var(--display); color: var(--ghost); }
.fiche-intro .lead p { color: var(--text); }
.section-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .82rem; color: var(--muted); }
.section-meta .badge { margin: 0; }
.refs a { text-decoration: none; }
.updated { color: var(--muted); font-size: .84rem; margin-top: 14px; }
.fiche-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; margin-top: 40px; align-items: start; }
@media (max-width: 960px) { .fiche-body { grid-template-columns: 1fr; gap: 20px; } }
.toc { position: sticky; top: 84px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
@media (max-width: 960px) { .toc { position: static; } }
.toc-title { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 5px 0; color: var(--text-2); text-decoration: none; font-size: .9rem; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--line-2); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--green); }
.group-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 32px 0 12px; font-weight: 700; }
.group-title:first-child { margin-top: 0; }
.doc-section { border-top: 1px solid var(--line); padding: 4px 0 8px; }
.doc-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.doc-section > summary::-webkit-details-marker { display: none; }
.doc-section > summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; }
.doc-section[open] > summary::after { content: "–"; }
.doc-section h2 { margin: 0; font-size: 1.25rem; }
.doc-section .prose { margin: 8px 0 12px; }
.doc-block { border-top: 1px solid var(--line); padding: 24px 0 8px; }
.undocumented p:first-of-type { color: var(--text-2); }
.references { padding-left: 1.4em; color: var(--text-2); font-size: .92rem; }
.references li { margin-bottom: 8px; }
.references li:target { background: var(--green-deep); border-radius: 6px; }
.authority-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.authority-list li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 2px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery .photo-open { display: block; }
.gallery .photo-open img { display: block; transition: opacity .15s; }
.gallery .photo-open:hover img { opacity: .9; }
.gallery figcaption, .gallery .muted, .gallery a { display: block; padding: 8px 12px; font-size: .82rem; }
.gallery audio { width: 100%; padding: 0 8px; }
.report details > summary { list-style: none; cursor: pointer; }
.report details > summary::-webkit-details-marker { display: none; }
.report details > summary h2 { display: inline; font-size: 1.05rem; color: var(--text-2); }
.report details > summary h2::before { content: "⚑  "; color: var(--muted); }
.report form { margin-top: 18px; max-width: 640px; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 20px; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-slogan { font: italic 500 1.2rem var(--display); color: var(--text); margin: 16px 0 6px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 5px 0; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--green); }
.footer-credit { margin-top: 14px; color: var(--text); }
.footer-credit a { color: var(--green); text-decoration: none; white-space: nowrap; }
.footer-credit a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.footer-bottom p { margin: 0; }

/* ---------- Impression ---------- */
@media print {
  :root { --bg: #fff; --text: #000; --text-2: #222; --muted: #555; --surface: #fff; --line: #ccc; }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .fiche-actions, .report, .toc, .map-frame, .skip, .preview-bar { display: none !important; }
  .fiche-body, .fiche-hero { display: block; }
  details > summary::after { display: none; }
  a { color: #000; }
  .badge { border-color: #999; background: #fff; color: #000; }
}

/* ---------- Aperçu ---------- */
.preview-bar { position: sticky; top: 0; z-index: 60; background: var(--orange); color: var(--on-orange); padding: 8px 16px; font-size: .9rem; font-weight: 600; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.preview-bar a { color: var(--on-orange); }
.preview-bar button { background: rgba(0,0,0,.15); border: 0; border-radius: 6px; padding: 4px 10px; font: inherit; cursor: pointer; color: inherit; }
body.preview-mobile { max-width: 390px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* Placement du bouton de thème */
.header-inner .site-nav { order: 2; }
.header-inner .theme-toggle { order: 3; margin-left: 4px; }
.header-inner .nav-toggle { order: 4; }
@media (max-width: 900px) {
  .header-inner .theme-toggle { margin-left: auto; }
  .header-inner .nav-toggle { margin-left: 8px; }
}

/* Fiche à 20 rubriques */
.rub-num { display: inline-block; min-width: 2.1em; margin-right: 10px; font: 600 .78rem/1 var(--font); color: var(--muted); letter-spacing: .05em; vertical-align: middle; }
.toc li.toc-empty span { display: block; padding: 5px 0; color: var(--muted); opacity: .55; font-size: .88rem; }
.toc ol { counter-reset: none; }
.toc a::before { content: none; }
.todo-rubriques { font-size: .86rem; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0 8px; }
.todo-rubriques span { font-weight: 600; color: var(--text-2); }
.todo-rubriques a { color: var(--muted); }
.todo-rubriques a:hover { color: var(--green); }
.prose h3 { font-size: 1rem; margin: 1.2em 0 .4em; color: var(--text); }
.prose h3:first-child { margin-top: .2em; }
.identity-card { margin-top: 16px; }
.identity-card div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; align-items: baseline; }
.identity-card dd { font-weight: 500; }
@media (max-width: 480px) { .identity-card div { grid-template-columns: 1fr; gap: 2px; } }
.cover-empty { position: relative; }
.cover-cta { position: absolute; bottom: 14px; left: 14px; font-size: .85rem; background: var(--overlay); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; }
.linked h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); margin: 20px 0 8px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.link-list li { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.link-list a { font-weight: 600; text-decoration: none; color: var(--text); }
.link-list a:hover { color: var(--green); }
.link-note { margin: 6px 0 0; font-size: .84rem; color: var(--text-2); }

/* Carte : Côte d'Ivoire en orange, repères contrastés */
:root { --map-country: #f2873a; --marker-region: #0c4a2d; --marker-region-ring: #ffffff; --marker-district: #ffffff; --marker-district-ring: #0c4a2d; }
:root[data-theme="light"] { --map-country: #ec7a2c; }
.map-highlight .atlas-marker { background: var(--marker-region); border: 2px solid var(--marker-region-ring); box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.map-highlight .atlas-marker.district { background: var(--marker-district); border-color: var(--marker-district-ring); box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.map-highlight .leaflet-tile-pane { opacity: .9; }
.dot-region { background: var(--marker-region); box-shadow: 0 0 0 2px var(--marker-region-ring), 0 0 0 3px var(--line-2); }
.dot-district { background: var(--marker-district); box-shadow: 0 0 0 2px var(--marker-district-ring); }
.legend .dot-country { display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: var(--map-country); margin-left: 10px; }
/* Calques de la carte nationale */
:root { --map-country-line: #ffb27a; --map-region-line: rgba(20, 10, 2, .55); --map-region-hover: #ffffff; --label-bg: rgba(8, 9, 10, .82); --label-text: #f4f6f5; --label-line: rgba(255, 255, 255, .14); }
:root[data-theme="light"] { --map-country-line: #9a3f0f; --map-region-line: rgba(60, 25, 5, .6); --map-region-hover: #ffffff; --label-bg: rgba(255, 255, 255, .92); --label-text: #14201a; --label-line: rgba(20, 30, 25, .18); }
.leaflet-tooltip.atlas-label { background: var(--label-bg); color: var(--label-text); border: 1px solid var(--label-line); border-radius: 6px; padding: 0 4px; font: 600 10px/1.35 var(--font); letter-spacing: .01em; box-shadow: 0 1px 3px rgba(0,0,0,.25); white-space: nowrap; }
.leaflet-tooltip.atlas-label-district { font-weight: 700; }
.leaflet-tooltip.label-hidden { visibility: hidden; }
.leaflet-popup-content .popup-meta { color: var(--muted); }
.map-highlight .leaflet-interactive { cursor: pointer; }
.result-snippet mark { background: color-mix(in srgb, var(--orange) 28%, transparent); color: var(--text); border-radius: 3px; padding: 0 2px; }
.snippet-label { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-right: 6px; }
.result-territories { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.doc-section-empty h2 { color: var(--text-2); }
.no-info { color: var(--muted); font-style: italic; margin: 6px 0 4px; }
.doc-section-empty .section-meta a { font-size: .85rem; }
.toc li.toc-empty a { color: var(--muted); }
.toc li.toc-empty a:hover { color: var(--green); }
.explore-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.explore-filter { margin: 0; }
.explore-side .explore-list { max-height: min(66vh, 600px); }
.region-group[hidden], .region-group li[hidden] { display: none; }
.doc-section, .doc-block, .fiche [id] { scroll-margin-top: 84px; }
.leaflet-tooltip.atlas-label::before { display: none; }
.leaflet-tooltip.atlas-label-crowded { opacity: .92 !important; }
.leaflet-tooltip.atlas-label:hover { z-index: 1000; }
@media (max-width: 640px) {
  .map-section .map, .map-frame-tall .map { height: 74vh; min-height: 460px; }
  .leaflet-control-attribution { font-size: 8.5px !important; line-height: 1.25; max-width: 62%; white-space: normal; padding: 2px 5px !important; }
  .leaflet-tooltip.atlas-label { font-size: 9.5px; padding: 0 3px; }
}

/* ---------- Icônes : une couleur par famille ---------- */
/* Rubriques et informations : vert de l’atlas. Types de localité : orange. */
:root { --ic-rub: var(--green); --ic-kind: var(--orange); }

/* ---------- Rubriques : icônes et mise en page des informations ---------- */
.rub-ico, .toc-ico, .info-ico, .info-head-ico {
  --ic: var(--ic-rub);
  display: inline-grid; place-items: center; flex: none; color: var(--ic);
  background: color-mix(in srgb, var(--ic) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ic) 22%, transparent);
}
.rub-ico svg, .toc-ico svg, .info-ico svg, .info-head-ico svg { width: 58%; height: 58%; }
.rub-ico { width: 40px; height: 40px; border-radius: 12px; }
.toc-ico { width: 22px; height: 22px; border-radius: 7px; }
.info-ico { width: 30px; height: 30px; border-radius: 9px; margin-top: 1px; }
.info-head-ico { width: 24px; height: 24px; border-radius: 7px; }

/* Carte de rubrique */
.rub-card {
  --rub: var(--ic-rub);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 2px 20px 10px; margin: 0 0 14px;
}
.rub-card > summary { padding: 14px 0 10px; gap: 12px; }
.rub-card h2 { display: flex; align-items: center; gap: 12px; font-size: 1.18rem; line-height: 1.25; }
.rub-card .rub-num { margin: 0; min-width: 0; color: var(--muted); font-size: .8rem; }
.rub-card .rub-label { flex: 1; }
.rub-card .section-meta { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.rub-card.doc-section-empty { background: transparent; }
.rub-card.doc-section-empty .rub-ico { --ic: var(--muted); opacity: .7; }
.rub-card .prose.rubric { max-width: none; margin: 4px 0 12px; }

/* Une information par ligne, précédée de son icône */
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.info { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info:last-child { border-bottom: 0; }
.info-text { color: var(--text-2); line-height: 1.65; max-width: 75ch; padding-top: 3px; }
.info-text strong { color: var(--text); }
.info-sub-item { padding: 7px 0; }
.info-sub-item .info-ico { width: 26px; height: 26px; border-radius: 8px; }
.info-sub-item { grid-template-columns: 26px 1fr; gap: 12px; }
.info-head { display: flex; align-items: center; gap: 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text); margin: 18px 0 4px; font-weight: 700; }
.info-head:first-child { margin-top: 6px; }

/* Repères généraux (synthèses par aire culturelle) */
.info-synth { margin-top: 14px; padding: 12px 16px 4px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px dashed var(--line-2); }
.info-synth-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 6px; font-size: .86rem; color: var(--muted); }
.info-synth-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--muted); }
.info-synth-note strong { color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; margin-right: 4px; }
.info-synth .info { border-bottom-color: transparent; padding: 8px 0; }
.info-synth .info-ico { opacity: .8; }
.info-synth .info-text { font-size: .95rem; }

/* Sommaire avec icônes */
.toc a { display: flex; align-items: center; gap: 10px; }
.toc li.toc-empty .toc-ico { --ic: var(--muted); opacity: .6; }

@media (max-width: 560px) {
  .rub-card { padding: 2px 14px 8px; }
  .rub-ico { width: 34px; height: 34px; border-radius: 10px; }
  .rub-card h2 { font-size: 1.05rem; gap: 10px; }
  .info { grid-template-columns: 26px 1fr; gap: 11px; }
  .info-ico { width: 26px; height: 26px; }
}
@media print { .rub-card { break-inside: avoid; } }

/* ---------- Sélecteur de langue ---------- */
.header-inner .lang-switch { position: relative; order: 3; margin-left: 4px; }
@media (max-width: 900px) {
  .header-inner .lang-switch { margin-left: auto; }
  .header-inner .lang-switch + .theme-toggle { margin-left: 8px; }
}
.lang-switch > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; color: var(--text-2); font-size: .82rem; font-weight: 700; letter-spacing: .06em; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { color: var(--text); border-color: var(--muted); }
.lang-switch svg { width: 17px; height: 17px; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 160px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lang-switch a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--text-2); text-decoration: none; font-size: .92rem; }
.lang-switch a:hover { background: var(--surface-2); color: var(--text); }
.lang-switch a[aria-current] { color: var(--green); font-weight: 600; }
.translation-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: 0 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: .9rem; }
.translation-note a { color: var(--green); }

/* ---------- Types de localité : une icône par type, couleur commune ---------- */
.kind-chip {
  --ic: var(--ic-kind);
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  padding: 3px 10px 3px 6px; border-radius: 999px; color: var(--ic);
  background: color-mix(in srgb, var(--ic) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--ic) 24%, transparent);
  font-size: .86rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.kind-chip svg { width: 17px; height: 17px; flex: none; }
.kind-label { display: inline-block; }
.kind-label::first-letter { text-transform: uppercase; }
.kind-chip-sm { padding: 1px 8px 1px 4px; gap: 4px; font-size: .74rem; }
.kind-chip-sm svg { width: 14px; height: 14px; }
.kind-count { font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
.kind-chip .kind-count { margin-left: 2px; }
.kind-detail { color: var(--muted); font-size: .92em; margin-left: 4px; }
.eyebrow .kind-chip { margin: -2px 0; }

/* Filtre par type (liste des localités) */
.kind-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.kind-filter a { text-decoration: none; border-radius: 999px; }
.kind-filter a .kind-chip { padding: 6px 13px 6px 9px; font-size: .9rem; transition: transform .12s, box-shadow .12s; }
.kind-filter a:hover .kind-chip { transform: translateY(-1px); }
.kind-filter a[aria-current] .kind-chip { box-shadow: 0 0 0 2px var(--ic); }
.kind-filter .kind-all { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line-2); color: var(--text); font-size: .9rem; font-weight: 600; }
.kind-filter .kind-all[aria-current] { box-shadow: 0 0 0 2px var(--text); }
.kind-filter a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Repère de carte et légende */
.kind-marker {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  color: #fff; background: var(--ic-kind);
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); transition: transform .15s;
}
.kind-marker svg { width: 15px; height: 15px; }
.kind-marker:hover { transform: scale(1.18); }
.leaflet-tooltip.atlas-label.atlas-label-loc { font-weight: 500; }
.kind-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }

/* Événements : à venir / éditions passées */
.when-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); }
.when-switch a { padding: 6px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--text-2); }
.when-switch a:hover { color: var(--text); }
.when-switch a[aria-current] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .18); }

/* Blocs masqués par défaut (Sources et contributions) */
.reveal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reveal-head h2 { margin: 0; }
.reveal-body { margin-top: 12px; }
.reveal-back { margin: 16px 0 0; }
@media print { .reveal-body[hidden] { display: block !important; } .reveal-toggle, .reveal-back { display: none !important; } }

/* Rubriques « Photos » et « Contenus partagés » */
.rub-count { margin-left: 10px; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.photo-gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 6px; }
.share-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); overflow: hidden; background: var(--surface); }
.share-preview { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.share-preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.share-preview:hover img { transform: scale(1.03); }
.share-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); }
.share-ph svg { width: 40px; height: 40px; }
.play-btn { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; background: rgba(0, 0, 0, .72); color: #fff; display: grid; place-items: center; transition: background .2s; }
.play-btn svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.video-facade:hover .play-btn, .video-facade:focus-visible .play-btn { background: var(--green); color: var(--on-green); }
.share-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.share-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.share-kind { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .78rem; }
.share-badge { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--green); }
.share-host { color: var(--muted); }
.share-body h3 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.share-body h3 a { color: var(--text); text-decoration: none; }
.share-body h3 a:hover { text-decoration: underline; }
.share-meta { margin: 0; font-size: .84rem; color: var(--text-2); }
.share-desc { margin: 0; font-size: .9rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
/* Couverture tirée d'un contenu partagé (localité sans photo) */
.cover-shared .cover-link { position: relative; display: block; }
.cover-shared .play-btn { width: 76px; height: 52px; }
.cover-shared .share-frame { aspect-ratio: 2 / 1; }
.cover-shared img { height: auto; display: block; }

/* ---------- Espaces publicitaires ---------- */
.ad-slot { margin: 28px 0; display: grid; gap: 6px; }
.ad-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad-link { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
/* La bannière garde ses proportions (rien n’est rogné) ; hauteur limitée pour les formats très hauts */
.ad-link img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; }
a.ad-link:hover, a.ad-link:focus-visible { border-color: var(--line-2); box-shadow: 0 2px 10px rgb(0 0 0 / .08); }
.ad-text { display: grid; gap: 4px; padding: 18px 20px; }
.ad-text strong { font-size: 1.15rem; color: var(--text); }
.ad-text .ad-adv { font-size: .85rem; color: var(--muted); }
.ad-house-link { display: grid; gap: 4px; padding: 16px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-decoration: none; color: var(--text-2); background: transparent; }
.ad-house-link strong { color: var(--text); font-size: 1.05rem; }
.ad-house-cta { font-weight: 600; color: var(--accent, var(--green)); font-size: .9rem; }
.ad-house-link:hover { border-style: solid; }
.ad-footer-wrap .ad-slot { margin: 36px 0 8px; }
.grid-cards + .ad-slot { margin-top: 24px; }
@media print { .ad-slot { display: none !important; } }
/* Administration */
.ad-progress { min-width: 150px; display: grid; gap: 4px; }
.ad-progress-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ad-progress-bar span { display: block; height: 100%; background: var(--green); }
.ad-cost-total { font-size: 1.05rem; margin: 4px 0 0; }
.ad-admin-preview img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- En-tête sur petit écran : le nom ne chevauche plus les boutons ---------- */
.brand { min-width: 0; }
@media (max-width: 560px) {
  .header-inner { gap: 10px; }
  .brand-name { font-size: .78rem; letter-spacing: .08em; line-height: 1.2; white-space: normal; }
  .brand-name strong { display: block; white-space: nowrap; }
  .lang-switch > summary { padding: 0 10px; }
  .lang-switch > summary svg { display: none; }
}
@media (max-width: 360px) { .brand-name { display: none; } }

/* Icônes devant chaque information : simple pictogramme, sans pastille */
.info-ico, .info-head-ico { background: transparent; border: 0; }
.info-ico svg { width: 72%; height: 72%; }
.info-sub-item .info-ico svg { width: 68%; height: 68%; }

/* Page « Faire de la publicité » et textes à tableaux */
.prose .table-wrap { overflow-x: auto; margin: .6em 0 1em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .55em .7em; border-bottom: 1px solid var(--line); color: var(--text-2); }
.prose th { color: var(--text); font-weight: 600; background: var(--surface-2, transparent); }
.prose td:first-child { white-space: nowrap; color: var(--text); }
@media (max-width: 560px) { .prose td:first-child { white-space: normal; } }
.ad-rules { padding-left: 1.3em; }
.ad-rules li { margin: .5em 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cgu-version { font-size: .9rem; opacity: .8; }
.cgu h2 { font-size: 1.15rem; }
