/* ==========================================================
   Aurelac V3 : styles par page
   ========================================================== */

/* =================== ACCUEIL =================== */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; align-items: end; color: #fff; overflow: hidden; background: #0B1A22; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,18,25,.15) 0%, rgba(8,18,25,.25) 45%, rgba(8,18,25,.82) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: 110px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6.2vw, 4.8rem); font-weight: 600; max-width: 18ch; letter-spacing: -.02em; }
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #E1EBEE; max-width: 52ch; margin-top: 16px; }
.hero .actions { margin-top: 28px; }
.hero .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.18); }
.hero-search { display: flex; align-items: center; gap: 12px; width: min(520px, 100%); margin-top: 28px; padding: 6px 6px 6px 18px; border-radius: 12px; text-align: left; font-weight: 500; color: var(--mute); border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.94); }
.hero-search svg { width: 18px; height: 18px; fill: currentColor; }
.hero-search span:first-of-type { flex: 1; }
.hero-search .go { background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.livebar { position: relative; z-index: 5; margin-top: -54px; }
.livebar .in { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.live { padding: 18px 22px; border-right: 1px solid var(--line); }
.live:last-child { border-right: 0; }
.live span { display: block; font-size: .78rem; color: var(--mute); font-weight: 600; }
.live b { font: 600 1.2rem/1.3 var(--f-display); color: var(--ink); }
@media (max-width: 760px) { .livebar .in { grid-template-columns: 1fr 1fr; } .live:nth-child(2) { border-right: 0; } .live:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .hero .wrap { padding-bottom: 90px; } }
.figures { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figures div { padding: 22px 16px; border-right: 1px solid var(--line); }
.figures div:last-child { border-right: 0; }
.figures b { display: block; font: 600 clamp(1.5rem, 2.6vw, 2.1rem)/1 var(--f-display); color: var(--brand); }
.figures span { font-size: .84rem; color: var(--mute); }
@media (max-width: 900px) { .figures { grid-template-columns: repeat(3, 1fr); } .figures div:nth-child(3) { border-right: 0; } .figures div:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
.newsgrid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.newsgrid .side { display: grid; gap: 14px; align-content: start; }
@media (max-width: 860px) { .newsgrid { grid-template-columns: 1fr; } }
.nfeat { position: relative; border-radius: var(--r); overflow: hidden; min-height: 380px; display: grid; align-items: end; color: #fff; text-decoration: none; background: var(--brand); }
.nfeat > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nfeat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(8,18,25,.82)); }
.nfeat .tx { position: relative; z-index: 2; padding: 28px; display: grid; gap: 10px; }
.nfeat h3 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.nfeat p { color: #DCE6E9; max-width: 56ch; }
.ncat { font-size: .78rem; font-weight: 700; color: var(--accent); }
.nfeat .ncat { color: var(--accent-2); }
.nitem { display: grid; grid-template-columns: 110px 1fr; gap: 16px; text-decoration: none; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.nitem:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.nitem .th { border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--brand); }
.nitem .th svg { width: 100%; height: 100%; display: block; }
.nitem h3 { font-size: 1.08rem; margin: 3px 0; }
.nitem time { font-size: .8rem; color: var(--mute); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.rail-nav { display: flex; gap: 8px; align-items: center; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.promo { border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: 170px 1fr; background: var(--surface); border: 1px solid var(--line); }
.promo .art { position: relative; background: var(--brand); }
.promo .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.promo .tx { padding: 24px; display: grid; gap: 12px; align-content: start; }
.promo h2 { font-size: 1.6rem; }
.promo p { color: var(--mute); }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; background: var(--sunk); border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 7px; font-weight: 600; font-size: .9rem; color: var(--mute); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.dem li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); list-style: none; font-weight: 500; }
.dem li:last-child { border: 0; }
.dem ul { margin: 0; padding: 0; }
.dem span { color: var(--mute); white-space: nowrap; }
.ev { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ev:last-child { border: 0; }
.ev time { text-align: center; padding: 8px 0; border-radius: 9px; border: 1px solid var(--line-2); font: 600 1.4rem/1 var(--f-display); color: var(--brand); }
.ev time small { display: block; font: 600 .7rem var(--f-ui); margin-top: 3px; color: var(--mute); }
.ev h3 { font-size: 1.08rem; }
.ev p { color: var(--mute); font-size: .86rem; }
@media (max-width: 560px) { .ev { grid-template-columns: 56px 1fr; } .ev .tag { grid-column: 2; justify-self: start; } }
.form { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* =================== CARTE =================== */
.map-page .footer { display: none; }
.mapshell { display: grid; grid-template-columns: 360px 1fr; gap: 14px; height: calc(100dvh - 112px); padding: 14px; max-width: 1800px; margin: 0 auto; }
.mpanel { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-lg); min-height: 0; background: var(--surface); border: 1px solid var(--line); }
.mpanel-head { display: flex; align-items: baseline; justify-content: space-between; }
.mpanel-head h1 { font-size: 1.9rem; }
.count { color: var(--mute); font-weight: 600; font-size: .86rem; }
.mpanel .chip { padding: 6px 11px; font-size: .82rem; }
.mpanel-row { display: flex; gap: 16px; flex-wrap: wrap; }
.results { list-style: none; margin: 0 -8px; padding: 0 8px; overflow: auto; flex: 1; min-height: 120px; display: grid; gap: 1px; align-content: start; scrollbar-width: thin; }
.res { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; border: 0; background: transparent; text-align: left; }
.res:hover { background: var(--sunk); }
.res.on { background: var(--brand-tint); }
.res .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--c); flex: none; }
.res .ic svg { width: 16px; height: 16px; fill: #fff; }
.res .txt { flex: 1; min-width: 0; }
.res b { display: block; font-weight: 600; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res small { color: var(--mute); font-size: .78rem; }
.led { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.led.open { background: var(--ok); } .led.closed { background: var(--ko); opacity: .55; }
.results .none { color: var(--mute); padding: 20px 8px; }
.stage {
  --m-land: #EDF0EA; --m-contour: #D8DED5; --m-marsh: #DDE6D6; --m-marshline: #AFC3A6; --m-park: #D3E2CC; --m-forest: #C2D6BA; --m-tree: #ABC6A2;
  --m-sand: #EEE5CF; --m-bld: #DADFDB; --m-road: #FFFFFF; --m-roadedge: #D4DBD7; --m-rail: #8D9A9E;
  --m-water: #A7CDD6; --m-water2: #6FA6B6; --m-shore: #EEF5F4; --m-ripple: #fff; --m-ferry: #123E4D; --m-label: #33495A; --m-dist: #123E4D;
  position: relative; overflow: hidden; border-radius: var(--r-lg); perspective: 1500px; perspective-origin: 50% 30%;
  background: #E3E8E4; cursor: grab; touch-action: none; outline: none; border: 1px solid var(--line);
}
:root[data-theme="dark"] .stage {
  --m-land: #102029; --m-contour: #18303A; --m-marsh: #12302B; --m-marshline: #22574A; --m-park: #133A30; --m-forest: #11362A; --m-tree: #1A503E;
  --m-sand: #383224; --m-bld: #1B3640; --m-road: #26434D; --m-roadedge: #0B1B21; --m-rail: #3E5A62;
  --m-water: #134C5C; --m-water2: #082C37; --m-shore: #2B6676; --m-ripple: #8EC0CD; --m-ferry: #C9A774; --m-label: #A9C5CB; --m-dist: #C9A774;
  background: #071116;
}
.stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.stage.grabbing { cursor: grabbing; }
#tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 55%; transition: transform .9s var(--ease); }
.plane { position: absolute; left: 0; top: 0; width: 1600px; height: 1000px; transform-origin: 0 0; transform-style: preserve-3d; }
.plane > svg { position: absolute; inset: 0; display: block; border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.3); }
.stage.anim .plane, .stage.anim #tilt, .stage.anim .mk-wrap { transition: transform .9s var(--ease); }
.m-labels text { font-family: var(--f-ui); fill: var(--m-label); text-anchor: middle; paint-order: stroke; stroke: var(--m-land); stroke-width: 4px; stroke-linejoin: round; }
.m-lake { font: italic 600 30px var(--f-display); fill: #fff !important; stroke: none !important; opacity: .92; letter-spacing: .04em; }
:root[data-theme="dark"] .m-lake { fill: #CFEFF4 !important; }
.m-dist { font: 600 38px var(--f-display); fill: var(--m-dist) !important; letter-spacing: .02em; opacity: .85; }
.m-small { font-size: 15px; font-weight: 700; }
.m-ferry { fill: var(--m-ferry) !important; stroke: none !important; font-style: italic; }
.m-street { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-anchor: start !important; stroke-width: 3px !important; }
#markers { position: absolute; inset: 0; transform-style: preserve-3d; }
.mk-wrap { position: absolute; width: 0; height: 0; transform: scale(var(--inv, 1)); transform-style: preserve-3d; z-index: 1; }
.mk-wrap.off { display: none; }
.mk-shadow { position: absolute; left: -9px; top: -4px; width: 18px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.28); filter: blur(2px); opacity: 0; transition: opacity .4s; }
.is3d .mk-shadow { opacity: 1; }
.mk { position: absolute; left: -17px; bottom: 0; width: 34px; height: 42px; padding: 0; border: 0; background: none; transform-origin: 50% 100%; transform: rotateZ(calc(-1 * var(--rot, 0deg))) rotateX(calc(-1 * var(--tilt, 0deg))); transition: transform .9s var(--ease); }
.mk-pin { position: absolute; inset: 0 0 8px; display: grid; place-items: center; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 4px 12px -3px rgba(0,0,0,.45); transition: transform .25s var(--ease); }
.mk-pin::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 9px; height: 9px; background: var(--c); border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0; z-index: -1; }
.mk-pin svg { width: 15px; height: 15px; fill: #fff; }
.mk-label { position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%) translateY(4px); white-space: nowrap; padding: 5px 10px; border-radius: 7px; background: #fff; color: #132331; font: 600 .76rem var(--f-ui); box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.mk:hover .mk-label, .mk:focus-visible .mk-label, .mk-wrap.sel .mk-label { opacity: 1; transform: translateX(-50%); }
.mk:hover .mk-pin { transform: translateY(-3px) scale(1.06); }
.mk-wrap:hover, .mk-wrap.sel { z-index: 5; }
.mk-wrap.sel .mk-pin { transform: translateY(-4px) scale(1.25); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent), 0 10px 22px -6px rgba(0,0,0,.5); }
.far .mk-wrap:not(.sel) .mk { width: 15px; height: 15px; left: -7.5px; bottom: -7.5px; }
.far .mk-wrap:not(.sel) .mk-pin { inset: 0; border-width: 2px; }
.far .mk-wrap:not(.sel) .mk-pin::after, .far .mk-wrap:not(.sel) .mk-pin svg { display: none; }
.far.is3d .mk-wrap:not(.sel) .mk { bottom: 0; }
.ctrl { position: absolute; top: 14px; right: 14px; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; }
.zl { font-size: .7rem; font-weight: 700; color: var(--mute); }
.b3d { font: 700 .8rem var(--f-ui); }
.b3d[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.maphint { position: absolute; left: 14px; top: 14px; z-index: 10; padding: 7px 12px; border-radius: 9px; font-size: .8rem; font-weight: 600; color: var(--mute); }
.detail { position: absolute; left: 14px; bottom: 14px; z-index: 12; width: min(370px, calc(100% - 28px)); border-radius: var(--r-lg); overflow: hidden; cursor: default; max-height: calc(100% - 28px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.detail.pop { animation: rise .4s var(--ease); }
.dt-cover { position: relative; height: 112px; }
.dt-cover > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail .fav { right: 54px; }
.dt-close { position: absolute; top: 10px; right: 10px; color: #fff; background: rgba(12,26,34,.35); border-color: rgba(255,255,255,.3); width: 34px; height: 34px; }
.dt-body { padding: 16px 18px 18px; display: grid; gap: 8px; justify-items: start; }
.dt-body h2 { font-size: 1.6rem; }
.dt-body p { color: var(--mute); font-size: .92rem; }
.dt-cat { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; color: var(--accent); }
.dt-addr { display: flex; align-items: center; gap: 8px; }
.dt-addr svg { width: 15px; height: 15px; fill: var(--accent); flex: none; }
@media (max-width: 900px) {
  .mapshell { grid-template-columns: 1fr; grid-template-rows: 62dvh auto; height: auto; padding: 10px; }
  .stage { order: -1; }
  .results { max-height: 50dvh; }
  .maphint { display: none; }
  .detail { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 70%; }
  .dt-cover { height: 80px; }
}

/* =================== CATALOGUES =================== */
.filterbar { position: sticky; top: 84px; z-index: 20; margin-top: 30px; padding: 14px; border-radius: var(--r); display: grid; gap: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.filterbar .top { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.filterbar .opts { display: flex; gap: 14px 20px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .filterbar { position: static; } .filterbar .top { grid-template-columns: 1fr; } }
.resultline { margin: 22px 0 14px; color: var(--mute); font-weight: 600; font-size: .9rem; }
.planner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.slot { padding: 20px 22px; display: grid; gap: 5px; text-align: left; border: 0; border-right: 1px solid var(--line); background: transparent; }
.slot:last-child { border-right: 0; }
.slot:hover { background: var(--sunk); }
.slot span { font-size: .78rem; font-weight: 700; color: var(--accent); }
.slot b { font: 600 1.25rem/1.2 var(--f-display); }
.slot small { color: var(--mute); }
@media (max-width: 760px) { .planner { grid-template-columns: 1fr; } .slot { border-right: 0; border-bottom: 1px solid var(--line); } }

/* =================== ACTUALITÉS =================== */
.newslist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ncard { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s, box-shadow .3s, transform .3s var(--ease); }
.ncard:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.ncard .th { aspect-ratio: 16 / 8; position: relative; background: var(--brand); }
.ncard .th svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ncard .bd { padding: 16px 18px 20px; display: grid; gap: 8px; }
.ncard h3 { font-size: 1.25rem; }
.ncard p { color: var(--mute); font-size: .92rem; }
.ncard time { font-size: .8rem; color: var(--soft); }
.article { max-width: 760px; margin: 0 auto; }
.article .cover { aspect-ratio: 16 / 7; border-radius: var(--r); overflow: hidden; position: relative; background: var(--brand); margin: 26px 0; }
.article .cover svg, .article .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.article .chapo { font: 400 1.25rem/1.55 var(--f-display); color: var(--ink-2); margin-top: 16px; }
.article .meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--mute); font-size: .88rem; margin-top: 16px; }
.article .text p { font-size: 1.07rem; line-height: 1.75; margin-bottom: 1.1em; color: var(--ink-2); }
.newsletter { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: var(--brand); color: #E1EBEE; border-radius: var(--r); padding: clamp(22px, 4vw, 36px); }
:root[data-theme="dark"] .newsletter { background: #0E2A34; }
.newsletter h2 { color: #fff; font-size: 1.7rem; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter .input { min-width: 260px; border-color: transparent; }
.newsletter .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.newsletter .form-msg { grid-column: 1 / -1; color: #fff; }
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; } .newsletter .input { min-width: 0; flex: 1; } }

/* =================== ANNONCES =================== */
.adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ad { display: grid; gap: 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .3s; }
.ad:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.ad .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.ad h3 { font-size: 1.2rem; }
.ad p { color: var(--mute); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad .foot { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--soft); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.ad .amount { font: 600 1.15rem var(--f-display); color: var(--brand); }
.badge-type { font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.badge-type.vente { background: var(--brand-tint); color: var(--brand); }
.badge-type.pret { background: #E7E4F2; color: #4B4380; }
.badge-type.don { background: #E2EFE5; color: #2B6B45; }
.badge-type.recherche { background: var(--accent-tint); color: var(--accent); }
:root[data-theme="dark"] .badge-type.pret { background: #29253F; color: #C4BDF0; }
:root[data-theme="dark"] .badge-type.don { background: #193326; color: #9BD8B0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--accent-tint); color: var(--ink-2); font-size: .92rem; }
.notice svg { width: 18px; height: 18px; fill: var(--accent); flex: none; margin-top: 2px; }

/* =================== COMPTE =================== */
.auth { max-width: 520px; margin: 40px auto 0; }
.auth .panel { padding: clamp(22px, 4vw, 36px); }
.auth form { display: grid; gap: 14px; }
.auth .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth .switch { text-align: center; color: var(--mute); font-size: .9rem; margin-top: 6px; }
.auth .switch button { border: 0; background: none; color: var(--brand); font-weight: 600; text-decoration: underline; padding: 0; }
.dash { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 30px; align-items: start; }
.dash nav { display: grid; gap: 2px; position: sticky; top: 100px; }
.dash nav button, .dash nav a { text-align: left; border: 0; background: none; padding: 10px 14px; border-radius: 8px; font-weight: 600; color: var(--ink-2); text-decoration: none; display: flex; justify-content: space-between; }
.dash nav button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.dash nav .count { background: var(--accent); color: #fff; border-radius: 9px; padding: 0 7px; font-size: .74rem; line-height: 18px; }
@media (max-width: 820px) { .dash { grid-template-columns: 1fr; } .dash nav { position: static; display: flex; flex-wrap: wrap; } }
.idcard { display: flex; gap: 16px; align-items: center; }
.idcard .av { width: 58px; height: 58px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 600 1.3rem var(--f-display); }
.rows { display: grid; }
.rowitem { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rowitem:last-child { border: 0; }
.rowitem b { display: block; }
.rowitem small { color: var(--mute); }
.msg { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 6px; margin-bottom: 10px; background: var(--surface); }
.msg.unread { border-left: 3px solid var(--accent); }
.msg small { color: var(--mute); }

/* =================== ÉQUIPE =================== */
.mayor { display: grid; grid-template-columns: 320px 1fr; border-radius: var(--r-lg); overflow: hidden; margin-top: 36px; background: var(--surface); border: 1px solid var(--line); }
.mayor .ph { position: relative; min-height: 360px; background: var(--brand-tint); }
.mayor .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mayor .tx { padding: clamp(24px, 4vw, 48px); display: grid; gap: 14px; align-content: center; }
.mayor .role { color: var(--accent); font-weight: 700; font-size: .88rem; }
.mayor h2 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.mayor blockquote { margin: 0; padding-left: 18px; border-left: 2px solid var(--accent); font: italic 400 clamp(1.2rem, 2vw, 1.5rem)/1.4 var(--f-display); color: var(--ink-2); max-width: 34ch; }
@media (max-width: 820px) { .mayor { grid-template-columns: 1fr; } .mayor .ph { min-height: 280px; } }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.member { border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, box-shadow .3s; }
.member:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.member .ph { aspect-ratio: 1 / 1; overflow: hidden; background: var(--brand-tint); }
.member .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member .bd { padding: 14px 16px 18px; display: grid; gap: 4px; }
.member h3 { font-size: 1.22rem; }
.member .r { color: var(--accent); font-weight: 700; font-size: .8rem; }
.member p { color: var(--mute); font-size: .86rem; }
.org { overflow-x: auto; }
.org svg { min-width: 760px; width: 100%; height: auto; display: block; }
.org text { font-family: var(--f-ui); fill: var(--ink); }
.member-dlg .dlg-cover { height: 260px; background: var(--brand-tint); }
.member-dlg .dlg-cover img { object-position: 50% 30%; }

/* =================== VILLE, MAIRIE, QUARTIERS, HISTOIRE =================== */
.idgrid { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.idgrid .arms { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 30px; display: grid; place-items: center; }
.idgrid .arms img { width: 160px; }
.deflist { display: grid; grid-template-columns: 180px 1fr; border-top: 1px solid var(--line); }
.deflist dt, .deflist dd { padding: 13px 0; border-bottom: 1px solid var(--line); margin: 0; }
.deflist dt { color: var(--mute); font-weight: 600; font-size: .9rem; }
@media (max-width: 760px) { .idgrid, .deflist { grid-template-columns: 1fr; } .deflist dt { border-bottom: 0; padding-bottom: 0; } }
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: minmax(150px, 260px) 1fr 52px; gap: 14px; align-items: center; font-size: .92rem; }
.bar .tr { height: 12px; background: var(--sunk); border-radius: 6px; overflow: hidden; }
.bar .tr i { display: block; height: 100%; background: var(--brand-2); border-radius: 6px; transform-origin: left; animation: grow 1s var(--ease) both; }
.bar:nth-child(even) .tr i { background: var(--accent); }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleX(0); } }
@media (max-width: 560px) { .bar { grid-template-columns: 1fr 52px; } .bar .tr { grid-column: 1 / -1; grid-row: 2; } }
.openbadge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px; margin-top: 24px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.openbadge i { width: 10px; height: 10px; border-radius: 50%; background: var(--soft); }
.openbadge.open i { background: var(--ok); } .openbadge.closed i { background: var(--ko); }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .cards2 { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); padding: 15px 2px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--f-display); color: var(--mute); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mute); margin-top: 8px; }
.timeline { list-style: none; margin: 40px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 112px; top: 10px; bottom: 10px; width: 1px; background: var(--line-2); }
.timeline li { display: grid; grid-template-columns: 90px 1fr; gap: 44px; padding-bottom: 18px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 107px; top: 22px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline .yr { font: 600 1.8rem/1 var(--f-display); text-align: right; padding-top: 14px; color: var(--brand); }
.timeline .panel { padding: 18px 22px; }
.timeline h3 { font-size: 1.3rem; margin-bottom: 4px; }
.timeline p { color: var(--mute); }
@media (max-width: 640px) { .timeline::before { left: 5px; } .timeline li { grid-template-columns: 1fr; gap: 6px; padding-left: 26px; } .timeline li::after { left: 0; top: 6px; } .timeline .yr { text-align: left; padding: 0; font-size: 1.4rem; } }
.qgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 34px; }
@media (max-width: 760px) { .qgrid { grid-template-columns: 1fr; } }
.qcard { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.qcard .cv { height: 150px; position: relative; }
.qcard .cv svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.qcard .bd { padding: 22px 24px 24px; display: grid; gap: 12px; }
.qcard h2 { font-size: 1.9rem; }
.qcard p { color: var(--mute); }
.qcard .nums { display: flex; gap: 26px; flex-wrap: wrap; }
.qcard .nums b { font: 600 1.4rem var(--f-display); display: block; color: var(--brand); }
.qcard .nums span { color: var(--mute); font-size: .8rem; }
.lost { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.lost h1 { font-size: clamp(5rem, 18vw, 11rem); color: var(--brand); }
.lost p { color: var(--mute); margin: 10px auto 24px; max-width: 40ch; }
