/*
Theme Name: Almarsad
Theme URI: https://almarsad.ma
Author: Alternative Vision
Description: Thème du site Almarsad (المرصد), observatoire citoyen des élections au Maroc : listes, candidats, calcul des sièges, résultats, puis suivi des élus et de leurs engagements. Conçu pour les extensions Almarsad Core, Almarsad Diffusion et Almarsad Suivi. Bilingue arabe et français, lecture de droite à gauche, thème clair et thème sombre.
Version: 3.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: almarsad
Tags: rtl-language-support, accessibility-ready, custom-logo, custom-menu, two-columns, featured-images
*/

/* ------------------------------------------------------------------
   1. Jetons
------------------------------------------------------------------ */
:root {
	--navy: #0B2141;
	--navy-2: #123256;
	--navy-3: #1B4471;
	--ink: #12233D;
	--ink-2: #33465F;
	--paper: #F1F5FA;
	--sheet: #FFFFFF;
	--sheet-2: #F7FAFD;
	--rule: #DFE7F0;
	--rule-strong: #C0CDDD;
	--muted: #5B6C85;
	--accent: #0C7FC4;
	--accent-2: #0A6AA6;
	--accent-soft: #E4F1FB;
	--accent-tint: #F2F8FD;
	--cyan: #3FD0F5;
	--red: #CE2033;
	--red-soft: #FBE7E9;
	--ok: #1A7A4C;
	--ok-soft: #E2F2EA;
	--warn: #8A5C00;
	--warn-soft: #FBF1DC;
	--danger: #A1352A;
	--danger-soft: #FBE8E5;
	--seat-empty: #CBD5E3;

	--font-text: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
	--font-display: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--font-script: "Caveat", "Aref Ruqaa", "Segoe Script", cursive;

	--s-1: .875rem;
	--s0: 1rem;
	--s1: 1.1875rem;
	--s2: 1.4375rem;
	--s3: 1.8125rem;
	--s4: 2.3125rem;
	--s5: 3rem;

	--w: 1280px;
	--w-content: 800px;
	--gutter: clamp(16px, 3.6vw, 34px);
	--radius: 14px;
	--radius-sm: 9px;
	--shadow: 0 1px 2px rgba(11, 33, 65, .05), 0 8px 24px rgba(11, 33, 65, .07);
	--shadow-hover: 0 2px 6px rgba(11, 33, 65, .07), 0 16px 36px rgba(11, 33, 65, .13);
	--head-bg: linear-gradient(105deg, #0B2141 0%, #123256 58%, #16406B 100%);
	--head-ink: #E6EEF8;
	--head-rule: rgba(255, 255, 255, .13);
	color-scheme: light;
}
[data-theme="dark"] {
	--ink: #E7EEF7;
	--ink-2: #BFCEDF;
	--paper: #0A1A30;
	--sheet: #10263F;
	--sheet-2: #143050;
	--rule: #21415F;
	--rule-strong: #2F587B;
	--muted: #9DB1C8;
	--accent: #4FB4EC;
	--accent-2: #7FCBF4;
	--accent-soft: #16354F;
	--accent-tint: #122C46;
	--red: #FF6B7C;
	--red-soft: #3A1B24;
	--ok: #5FCB97;
	--ok-soft: #113526;
	--warn: #E7B65C;
	--warn-soft: #3A2D12;
	--danger: #F09183;
	--danger-soft: #3A1E19;
	--seat-empty: #2B4761;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
	--shadow-hover: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 36px rgba(0, 0, 0, .45);
	--head-bg: linear-gradient(105deg, #061426 0%, #0C2440 60%, #123256 100%);
	color-scheme: dark;
}
[dir="rtl"] { --font-script: "Aref Ruqaa", "Caveat", cursive; }
body.fonts-system {
	--font-text: system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
	--font-display: system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
	--font-script: "Segoe Script", cursive;
}

/* ------------------------------------------------------------------
   2. Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: var(--s0); line-height: 1.62; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: var(--s4); font-weight: 700; }
h2 { font-size: var(--s3); font-weight: 600; }
h3 { font-size: var(--s1); font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--w); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--content { max-width: calc(var(--w-content) + 2 * var(--gutter)); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; z-index: 100; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.ico { flex: none; vertical-align: middle; }
.script { font-family: var(--font-script); font-weight: 600; color: var(--ink); line-height: 1.2; }
.section { padding-block: clamp(26px, 3.6vw, 42px); }
.section--find { padding-top: clamp(20px, 3vw, 34px); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.section__head h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.6rem); position: relative; padding-inline-start: 14px; }
.section__head h2::before, .card__title::before { content: ""; position: absolute; inset-inline-start: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 3px; background: var(--red); }

.button, .am-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	font: 600 var(--s0)/1.2 var(--font-text);
	background: var(--accent); color: #fff !important;
	border: 2px solid var(--accent); border-radius: 10px;
	padding: 11px 18px; cursor: pointer; text-decoration: none;
	transition: background .15s, border-color .15s, transform .15s;
}
.button:hover, .am-btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.button:active { transform: translateY(1px); }
.button--ghost, .am-btn.am-ghost { background: transparent; color: var(--accent) !important; border-color: var(--rule-strong); }
.button--ghost:hover, .am-btn.am-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.button--red { background: var(--red); border-color: var(--red); }
.button--red:hover { background: #B0192A; border-color: #B0192A; }
.button--on-dark { background: #fff; border-color: #fff; color: var(--navy) !important; }
.button--on-dark:hover { background: var(--cyan); border-color: var(--cyan); color: var(--navy) !important; }
[dir="rtl"] .button .ico, [dir="rtl"] .link-more::after, [dir="rtl"] .need__arrow .ico { transform: scaleX(-1); }
.link-more { font-weight: 600; font-size: var(--s-1); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link-more::after { content: "→"; }
.link-more:hover { text-decoration: underline; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
[dir="rtl"] .tag { letter-spacing: 0; }
.tag--resultats { background: var(--ok-soft); color: var(--ok); }
.tag--depeche { background: var(--accent-soft); color: var(--accent); }
.tag--suivi { background: var(--warn-soft); color: var(--warn); }
.tag--fiches { background: var(--accent-tint); color: var(--accent-2); }

.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__title { font-size: 1.12rem; margin: 0 0 4px; position: relative; padding-inline-start: 13px; }
.card__head .card__title { margin-bottom: 0; }
.card__note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.card__ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.card__ico--report { background: var(--red-soft); color: var(--red); }
.am-empty { color: var(--muted); font-size: .92rem; }

/* ------------------------------------------------------------------
   3. En-tête
------------------------------------------------------------------ */
.site-header { background: var(--head-bg); color: var(--head-ink); position: sticky; top: 0; z-index: 40; }
.site-header__top { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); padding-block: 12px; }
.brand { display: inline-flex; flex: none; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand__mark { width: 58px; height: auto; flex: none; }
.brand__text { display: grid; line-height: 1.05; }
.brand__ar { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.brand__lat { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.brand__tag { font-size: .68rem; color: #9FC0DE; margin-top: 4px; letter-spacing: .02em; }
[dir="rtl"] .brand__lat, [dir="rtl"] .brand__tag { letter-spacing: 0; }
.brand__logo { max-height: 56px; width: auto; }
.site-header__mid { flex: 1; min-width: 0; display: grid; gap: 7px; justify-items: center; }
.site-header__claim { margin: 0; font-size: .88rem; color: #B9D2E9; }
.top-search { display: flex; width: min(560px, 100%); background: var(--sheet); border-radius: 9px; overflow: hidden; border: 1px solid transparent; }
.top-search input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: .93rem; padding: 10px 14px; background: transparent; color: var(--ink); }
.top-search input:focus { outline: none; }
.top-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63, 208, 245, .35); }
.top-search button { flex: none; width: 46px; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.top-search button:hover { background: var(--accent-2); }
.site-header__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--head-ink); background: rgba(255, 255, 255, .08); border: 1px solid var(--head-rule); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.theme-toggle__light { display: none; }
[data-theme="dark"] .theme-toggle__dark { display: none; }
[data-theme="dark"] .theme-toggle__light { display: block; }
.lang-switch { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; }
.lang-switch a { display: block; padding: 7px 9px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .85rem; text-transform: uppercase; color: var(--head-ink); }
.lang-switch .current-lang a { background: rgba(255, 255, 255, .16); color: #fff; }
.button--cta { padding: 10px 15px; font-size: .93rem; background: var(--red); border-color: var(--red); }
.button--cta:hover { background: #B0192A; border-color: #B0192A; }
.nav-install { font: 600 .85rem var(--font-text); background: rgba(255, 255, 255, .08); color: var(--head-ink); border: 1px solid var(--head-rule); border-radius: 10px; padding: 9px 12px; cursor: pointer; white-space: nowrap; }
.nav-install:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.nav-toggle { display: none; align-items: center; gap: 9px; font: 600 var(--s0) var(--font-text); background: rgba(255, 255, 255, .08); border: 1px solid var(--head-rule); border-radius: 10px; padding: 9px 13px; color: var(--head-ink); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; border-radius: 2px; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.site-nav { border-top: 1px solid var(--head-rule); background: rgba(0, 0, 0, .12); }
.site-nav__in { display: flex; }
.site-nav .menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.site-nav .menu::-webkit-scrollbar { display: none; }
.site-nav .menu > li { position: relative; flex: none; }
.site-nav .menu > li > a { display: flex; align-items: center; gap: 8px; padding: 12px 13px; color: #CBDCEE; text-decoration: none; font-weight: 500; font-size: .93rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.site-nav .menu > li > a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.site-nav .menu > li > a .ico { color: var(--cyan); }
.site-nav .menu > .current-menu-item > a, .site-nav .menu > .current_page_item > a { color: #fff; border-bottom-color: var(--cyan); background: rgba(255, 255, 255, .07); }
.site-nav .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 50; }
.site-nav .menu-item-has-children:hover > .sub-menu, .site-nav .menu-item-has-children:focus-within > .sub-menu, .site-nav .menu-item-has-children.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.site-nav .sub-menu a:hover { background: var(--accent-tint); color: var(--accent); }
.sub-toggle { display: none; }

@media (max-width: 1180px) {
	.site-header__claim { display: none; }
	.brand__tag { display: none; }
	.site-nav .menu > li > a span { font-size: .88rem; }
}
@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.button--cta span, .nav-install { display: none; }
	.site-header__top { flex-wrap: wrap; padding-block: 10px; }
	.site-header__mid { order: 3; width: 100%; flex: 1 0 100%; }
	.site-header__tools { margin-inline-start: auto; }
	.site-nav { display: none; }
	.site-nav.is-open { display: block; max-height: 70vh; overflow: auto; }
	.site-nav__in { padding-block: 6px 12px; }
	.site-nav .menu { flex-direction: column; overflow: visible; width: 100%; }
	.site-nav .menu > li { flex: 1 1 auto; }
	.site-nav .menu > li > a { border-bottom: 1px solid var(--head-rule); padding: 13px 4px; }
	.site-nav .menu > .current-menu-item > a { border-bottom-color: var(--cyan); }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 8px 16px; display: none; }
	.site-nav .sub-menu a { color: #CBDCEE; }
	.site-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
	.sub-toggle { display: block; position: absolute; inset-inline-end: 0; top: 2px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; }
	.sub-toggle::before { content: ""; display: block; width: 9px; height: 9px; margin: auto; border-inline-end: 2px solid #CBDCEE; border-bottom: 2px solid #CBDCEE; transform: rotate(45deg); }
	.is-open > .sub-toggle::before { transform: rotate(-135deg); }
}
@media (max-width: 560px) { .brand__mark { width: 46px; } .brand__ar { font-size: 1.25rem; } .brand__lat { font-size: .92rem; } }

.phase-strip { background: var(--sheet); border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: var(--s-1); }
.phase-strip__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-block: 8px; }
.phase-strip p { margin: 0; }
.phase-strip__count { color: var(--red); font-weight: 700; }
.phase-silence .phase-strip { background: var(--warn-soft); color: var(--warn); border-color: #EBD9B2; }

/* ------------------------------------------------------------------
   4. Accueil
------------------------------------------------------------------ */
.hero3 { position: relative; background: var(--head-bg); color: #E9F1FA; overflow: hidden; }
.hero3__media { position: absolute; inset-block: 0; inset-inline-end: 0; width: 62%; background: var(--hero) center / cover no-repeat; }
.hero3::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #0B2141 0%, rgba(11, 33, 65, .94) 34%, rgba(11, 33, 65, .55) 56%, rgba(11, 33, 65, .25) 100%); }
[dir="rtl"] .hero3::before { background: linear-gradient(270deg, #0B2141 0%, rgba(11, 33, 65, .94) 34%, rgba(11, 33, 65, .55) 56%, rgba(11, 33, 65, .25) 100%); }
.hero3__grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 24px; padding-block: clamp(28px, 4.4vw, 56px); align-items: center; min-height: 380px; }
.hero3__title { font-size: clamp(1.9rem, 3.8vw, 3.05rem); line-height: 1.12; color: #fff; margin-bottom: 14px; }
.hero3__title span, .hero3__title em { display: block; font-style: normal; }
.hero3__title span { color: var(--cyan); }
.hero3__lead { font-size: var(--s1); color: #C6D9EC; max-width: 48ch; margin-bottom: 20px; }
.hero3__pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; max-width: 40rem; }
.hero3__pillars li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: .82rem; font-weight: 600; line-height: 1.3; color: #DCE9F6; }
@media (max-width: 560px) { .hero3__pillars { grid-template-columns: 1fr 1fr; } }
.hero3__ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(63, 208, 245, .14); border: 1px solid rgba(63, 208, 245, .4); color: var(--cyan); }
.hero3__side { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; }
.hero3__script { font-size: clamp(1.3rem, 2.1vw, 1.85rem); color: #fff; text-align: end; margin: 0; position: relative; }
.hero3__script::after { content: ""; display: block; width: 76%; height: 3px; margin-inline-start: auto; margin-top: 8px; border-radius: 3px; background: var(--red); }
.hero3__values { list-style: none; margin: 0; padding: 0 0 0 14px; border-inline-start: 3px solid var(--red); text-align: start; }
[dir="rtl"] .hero3__values { padding: 0 14px 0 0; }
.hero3__values li { padding: 5px 0; color: #DCE9F6; font-weight: 500; }
.hero3__live { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; width: min(420px, 100%); box-shadow: var(--shadow); }
@media (max-width: 900px) {
	.hero3 { display: flex; flex-direction: column; }
	.hero3__media { position: relative; inset: auto; width: 100%; height: 200px; order: -1; }
	.hero3::before { display: none; }
	.hero3__grid { grid-template-columns: 1fr; min-height: 0; }
	.hero3__side { align-items: flex-start; }
	.hero3__script { text-align: start; }
	.hero3__script::after { margin-inline-start: 0; width: 40%; }
	.hero3__values { display: flex; flex-wrap: wrap; gap: 4px 18px; }
}

.agenda { margin-top: -22px; position: relative; z-index: 3; }
@media (max-width: 900px) { .agenda { margin-top: 14px; } }
.agenda__in { display: grid; grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr); gap: 22px 30px; align-items: center; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; }
.agenda__title { display: flex; align-items: center; gap: 14px; }
.agenda__title strong { display: block; font-family: var(--font-display); font-size: 1.12rem; }
.agenda__title span span { color: var(--muted); font-size: .88rem; }
.agenda__ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); flex: none; }
.countdown { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.countdown li { text-align: center; min-width: 62px; }
.countdown strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .74rem; color: var(--muted); }
.countdown__fallback { display: none; }
.agenda__dates h2 { font-size: .95rem; font-family: var(--font-text); margin-bottom: 6px; }
.agenda__dates ul { list-style: none; margin: 0 0 6px; padding: 0; font-size: .88rem; }
.agenda__dates li { display: flex; gap: 10px; padding: 2px 0; }
.agenda__dates li::before { content: "●"; color: var(--accent); font-size: .6rem; line-height: 1.9; }
.agenda__dates li.is-passed { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.agenda__dates li.is-passed::before { color: var(--rule-strong); }
.agenda__d { font-weight: 600; white-space: nowrap; }
@media (max-width: 1100px) { .agenda__in { grid-template-columns: 1fr 1fr; } .agenda__dates { grid-column: 1 / -1; } }
@media (max-width: 620px) { .agenda__in { grid-template-columns: 1fr; } .countdown li { min-width: 0; flex: 1; } }

.find { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .find { grid-template-columns: 1fr 1fr; } .card--search { grid-column: 1 / -1; } }
@media (max-width: 620px) { .find { grid-template-columns: 1fr; } }
.find-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--sheet-2); border: 1px solid var(--rule); border-radius: 10px; padding: 4px; margin-bottom: 12px; }
.find-tab { flex: 1; min-width: 110px; border: 0; background: none; font: 500 .88rem var(--font-text); color: var(--ink-2); padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.find-tab:hover { color: var(--accent); }
.find-tab.is-on { background: var(--navy); color: #fff; }
.find-row { display: flex; gap: 10px; }
.find-row input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border: 1.5px solid var(--rule-strong); border-radius: 10px; background: var(--sheet); color: var(--ink); }
.find-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.find-note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.card--help { background: var(--accent-tint); border-color: var(--accent-soft); }
.card--help p { font-size: .92rem; color: var(--ink-2); }
.card--help .button { margin-top: auto; align-self: flex-start; }
@media (max-width: 620px) { .find-row { flex-direction: column; } .find-row .button { width: 100%; } }

.grid3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 1060px) { .grid3 { grid-template-columns: 1fr 1fr; } .card--map, .stack { grid-column: 1 / -1; } }
@media (max-width: 680px) { .grid3 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; align-content: start; }

.parties { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; max-height: 26rem; overflow-y: auto; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent 100%); }
.parties:last-child { -webkit-mask-image: none; mask-image: none; }
.parties li { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--rule); }
.parties li:last-child { border-bottom: 0; }
.parties__chip { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; flex: none; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); font-weight: 700; font-size: .72rem; letter-spacing: .02em; }
.parties__body { min-width: 0; display: grid; }
.parties__body strong { font-size: .95rem; }
.parties__body span { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parties__n { color: var(--accent) !important; font-weight: 600; }

.card--map .am-map-wrap { background: transparent; border: 0; padding: 0; margin: 0; }
.card--map .am-map-panel { font-size: .88rem; }
.card--map .am-map svg { max-height: 20rem; }

.kfigs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kfigs li { display: flex; align-items: center; gap: 10px; background: var(--sheet-2); border-radius: var(--radius-sm); padding: 12px; min-width: 0; }
.kfigs__ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.kfigs strong { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kfigs li span span { display: block; font-size: .76rem; color: var(--muted); line-height: 1.25; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.feed li:last-child { border-bottom: 0; }
.feed__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.feed__thumb { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feed__thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed__body { min-width: 0; display: grid; gap: 2px; flex: 1; }
.feed__body a { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; font-size: .95rem; }
.feed__body a:hover { color: var(--accent); }
.feed__body > span { font-size: .78rem; color: var(--muted); }
.feed__cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
[dir="rtl"] .feed__cat { letter-spacing: 0; }

.card--region .card__region-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 0 0 10px; }
.region-figs { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 10px; }
.region-figs li { flex: 1; background: var(--sheet-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.region-figs strong { display: block; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.1; }
.region-figs span { font-size: .76rem; color: var(--muted); line-height: 1.25; display: block; }
.card--region .button, .card--report .button { align-self: flex-start; }
.card--report { background: var(--sheet-2); }
.card--report p { font-size: .92rem; color: var(--ink-2); }

.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr 1fr; } }
.tools a { display: flex; align-items: center; gap: 11px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .88rem; line-height: 1.25; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tools a:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--accent); }
.tools__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex: none; }
.tools__script { font-size: 1.25rem; color: var(--ink-2); margin: 0; max-width: 22ch; text-align: end; }
@media (max-width: 700px) { .tools__script { display: none; } }

.band { background: var(--head-bg); color: #CFE0F0; }
.band__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 36px; padding-block: 30px; }
.band__kicker { color: var(--cyan); font-size: .85rem; font-weight: 600; margin: 0 0 2px; }
.band h2 { color: #fff; font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-bottom: 4px; }
.band p { margin: 0; max-width: 56ch; }

/* Recherche (pages) et hémicycle */
.search__label { display: block; font-weight: 500; margin-bottom: 8px; }
.search__row { display: flex; gap: 10px; }
.search__input { flex: 1; min-width: 0; font: inherit; font-size: var(--s1); padding: 12px 15px; border: 1.5px solid var(--rule-strong); border-radius: 10px; background: var(--sheet); color: var(--ink); }
.search--small .search__input { font-size: var(--s0); padding: 10px 12px; }
@media (max-width: 520px) { .search__row { flex-direction: column; } }
.hemicycle { margin: 0; }
.hemicycle__svg svg { display: block; width: 100%; }
.hemicycle.is-animated circle { animation: seat-in .4s cubic-bezier(.2, .7, .3, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes seat-in { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.hemicycle figcaption { margin-top: 12px; }
.hemicycle__cap { color: var(--muted); font-size: var(--s-1); max-width: 52ch; margin-bottom: 10px; }
.hemicycle__legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--s-1); }
.hemicycle__legend li { display: inline-flex; align-items: baseline; gap: 8px; }
.hemicycle__legend .swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; align-self: center; }
.hemicycle__legend .num { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------
   5. Pages et articles
------------------------------------------------------------------ */
.page-body { padding-block: clamp(32px, 5vw, 60px) clamp(48px, 7vw, 88px); }
.page-head { margin-bottom: 26px; }
.page-title { font-size: clamp(1.9rem, 3.6vw, var(--s4)); }
.page-meta { color: var(--muted); font-size: var(--s-1); margin: 0 0 8px; }
.entry > * { max-width: 70ch; }
.entry > .am-fiche, .entry > .am-calc, .entry > .am-social, .entry > .am-map-wrap, .entry > .am-table, .entry > .am-cards, .entry > .alignwide, .entry > .am-results,
.entry > .alms-tiles, .entry > .alms-list, .entry > .alms-bilan, .entry > .alms-filters, .entry > .stbar, .entry > .stlegend, .entry > .alms-elus, .entry > .alms-chamber, .entry > .alms-data { max-width: none; }
.entry h2 { font-size: var(--s2); margin-top: 1.6em; }
.entry ul, .entry ol { padding-inline-start: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry-figure { margin: 0 0 24px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 18px 0; border-top: 1px solid var(--rule); }
.post-list__title { font-size: var(--s1); font-weight: 600; text-decoration: none; }
.nav-links { display: flex; gap: 14px; margin-top: 24px; }

/* ------------------------------------------------------------------
   6. Composants de l'extension Almarsad Core
------------------------------------------------------------------ */
.am-meta { color: var(--muted); font-size: var(--s-1); }
.am-empty { color: var(--muted); background: var(--paper); border: 1px dashed var(--rule-strong); padding: 14px 16px; border-radius: var(--radius); }
.am-box { background: var(--paper); border-inline-start: 4px solid var(--accent); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 18px; }
[dir="rtl"] .am-box { border-radius: var(--radius) 0 0 var(--radius); }
.am-box.am-ok { border-color: var(--ok); background: var(--ok-soft); }
.am-box.am-warn { border-color: var(--warn); background: var(--warn-soft); }
.am-warn { color: var(--warn); }
.am-chip { display: inline-block; font-size: .8rem; line-height: 1.5; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 1px 10px; background: var(--sheet); color: var(--ink); vertical-align: 1px; white-space: nowrap; }
.am-chip.am-warn { border-color: #D9B46A; background: var(--warn-soft); }
.am-st-officiel { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.am-st-annonce_parti { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.am-st-presse, .am-st-a_verifier { border-style: dashed; color: var(--warn); border-color: #C9A35A; background: var(--sheet); }
.am-pchip { display: inline-block; font-size: .78rem; font-weight: 600; color: #fff; border-radius: 4px; padding: 1px 7px; }
.am-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 8px; }
.am-link { background: none; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font: inherit; padding: 0; }

.am-fiche { max-width: none; }
.am-title { font-size: clamp(1.9rem, 3.6vw, var(--s4)); margin-bottom: .2em; }
.am-title span[lang="ar"], .am-arname { color: var(--muted); font-weight: 600; }
.am-title span[lang="ar"] { display: block; font-size: .72em; margin-top: 4px; }
.am-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-top: 2px solid var(--ink); margin: 18px 0 30px; }
.am-kv > div { padding: 12px 18px 12px 0; border-bottom: 1px solid var(--rule); }
.am-kv dt { font-size: var(--s-1); color: var(--muted); }
.am-kv dd { margin: 0; font-size: var(--s1); font-weight: 600; }
.am-fiche h2 { font-size: var(--s2); margin-top: 1.6em; }

.am-cards { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--rule); }
.am-cards li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0 14px 14px; border-bottom: 1px solid var(--rule); border-inline-start: 5px solid var(--c, var(--muted)); padding-inline: 16px 0; }
.am-name { font-weight: 600; font-size: var(--s1); text-decoration: none; color: var(--ink); line-height: 1.35; }
.am-name:hover { color: var(--accent); text-decoration: underline; }
.am-name span[lang="ar"] { font-weight: 500; color: var(--muted); margin-inline-start: 8px; font-size: .9em; }
.am-cards .am-meta { margin-bottom: 2px; }
.am-photo, .am-thumb { flex: none; object-fit: cover; border-radius: 4px; background: #E9ECE9; display: inline-block; }
.am-photo { width: 132px; height: 164px; }
.am-thumb { width: 54px; height: 68px; }
.am-nophoto {
	border: 1.5px dashed var(--rule-strong);
	background: #EEF0EE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Ccircle cx='20' cy='18' r='8' fill='%23C3C9C5'/%3E%3Cpath d='M5 48c1-10 7-16 15-16s14 6 15 16z' fill='%23C3C9C5'/%3E%3C/svg%3E") no-repeat center 70% / 62%;
}
.am-id { display: flex; gap: 22px; align-items: flex-start; margin: 4px 0 22px; }
.am-id p { margin: 0 0 6px; }
@media (max-width: 560px) { .am-photo { width: 96px; height: 120px; } .am-id { gap: 14px; } }

.am-timeline { list-style: none; margin: 0 0 24px; padding: 0; border-top: 2px solid var(--ink); }
.am-timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.am-yr { font-weight: 600; font-variant-numeric: tabular-nums; }

.am-list { list-style: none; margin: 0 0 24px; padding: 0; }
.am-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.am-cols { columns: 2; column-gap: 36px; }
.am-cols li { break-inside: avoid; }
@media (max-width: 680px) { .am-cols { columns: 1; } }

.am-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: .97rem; }
.am-table th, .am-table td { text-align: start; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.am-table thead th { border-bottom: 2px solid var(--ink); font-weight: 600; font-size: var(--s-1); color: var(--muted); }
.am-table td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.am-table input { width: 100%; max-width: 190px; font: inherit; padding: 7px 9px; border: 1.5px solid var(--rule-strong); border-radius: 4px; background: var(--sheet); }

.am-news { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.am-news li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.am-news a { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.4; }
.am-news a:hover { color: var(--accent); text-decoration: underline; }
.am-news p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.am-news .am-meta { margin-top: 3px; }

.am-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 24px; }
.am-search label { flex: 1; min-width: 240px; }
.am-search input { display: block; width: 100%; font: inherit; font-size: var(--s1); padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--radius); margin-top: 6px; background: var(--sheet); }

.am-form p { margin: 0 0 16px; }
.am-form label { display: block; font-weight: 500; }
.am-form input[type=text], .am-form input[type=email], .am-form input[type=tel], .am-form input[type=url], .am-form select, .am-form textarea {
	display: block; width: 100%; max-width: 560px; font: inherit; padding: 11px 12px; margin-top: 6px;
	border: 1.5px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); color: var(--ink);
}
.am-form input:focus, .am-form select:focus, .am-form textarea:focus, .search__input:focus, .am-search input:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); outline-offset: 0; }
.am-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.am-form legend { font-weight: 600; margin-bottom: 8px; }
.am-check { font-weight: 400 !important; display: flex !important; gap: 10px; align-items: flex-start; margin: 8px 0; max-width: 64ch; }
.am-check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.am-inline { display: inline-flex !important; margin-inline-end: 18px; }
.am-hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.am-request { margin-top: 34px; border-top: 2px solid var(--ink); padding-top: 16px; }
.am-request summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.am-request[open] summary { margin-bottom: 16px; }

.am-map-wrap { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; margin: 0 0 20px; }
.am-map svg { display: block; width: 100%; height: auto; max-height: 64vh; }
.am-reg { cursor: pointer; }
.am-reg rect { stroke: rgba(0, 0, 0, 0); stroke-width: 1.6; transition: opacity .15s; }
.am-map.has-sel .am-reg:not(.sel) rect { opacity: .35; }
.am-reg.sel rect { stroke: var(--ink); stroke-width: 1.2; }
.am-sea { fill: #8C9BA8; font-size: 9px; font-style: italic; }
.am-map-panel { padding: 8px 6px 2px; }
.am-map-panel h3 { margin: .1em 0 .3em; }
.am-map-panel .am-btn { padding: 9px 16px; font-size: .95rem; }

.am-explain ol { padding-inline-start: 1.3em; }
.am-calc { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(16px, 3vw, 28px); margin: 0 0 24px; }
.am-calc-inputs { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.am-calc-inputs label { font-weight: 500; }
.am-calc-inputs input { display: block; font: inherit; padding: 9px 11px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius); margin-top: 6px; width: 170px; }
.am-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 10px; }
.am-calc-col h3 { font-size: var(--s0); }
@media (max-width: 760px) { .am-calc-grid { grid-template-columns: 1fr; } }

.am-social { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.am-social li { background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--c, var(--muted)); border-radius: var(--radius); padding: 16px 18px; }
.am-social h3 { margin-bottom: 6px; }
.am-social a { margin-inline-end: 12px; }
.am-embed { margin-top: 10px; }
.am-results { margin: 8px 0 26px; }


/* ------------------------------------------------------------------
   7. Pied de page
------------------------------------------------------------------ */
.site-footer { background: var(--head-bg); color: #B9CDE2; padding-top: 44px; font-size: .93rem; margin-top: clamp(20px, 4vw, 40px); }
.site-footer a { color: #D6E4F2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px; padding-bottom: 34px; }
@media (max-width: 1100px) { .site-footer__grid { grid-template-columns: 1fr 1fr 1fr; } .site-footer__about, .site-footer__alerts { grid-column: span 3; } }
@media (max-width: 620px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about, .site-footer__alerts { grid-column: 1 / -1; } }
.brand--footer { margin-bottom: 14px; }
.site-footer__h { font-family: var(--font-text); font-size: .92rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.site-footer .menu { list-style: none; margin: 0; padding: 0; }
.site-footer .menu li { padding: 3px 0; }
.site-footer .sub-menu { display: none; }
.follow-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.follow-list a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--head-rule); font-size: .85rem; background: rgba(255, 255, 255, .05); }
.follow-list a:hover { border-color: var(--cyan); text-decoration: none; }
.site-footer__alerts p { color: #A9C1D9; }
.site-footer__cta { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer__alerts .button { background: var(--cyan); border-color: var(--cyan); color: var(--navy) !important; }
.site-footer__alerts .button:hover { background: #fff; border-color: #fff; }
.site-footer__alerts .button--ghost { background: transparent; border-color: var(--head-rule); color: #D6E4F2 !important; }
.dotmap { width: 130px; fill: rgba(63, 208, 245, .38); margin-top: 16px; }
.site-footer__legal { border-top: 1px solid var(--head-rule); background: rgba(0, 0, 0, .18); }
.site-footer__legal-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-block: 14px 18px; font-size: .8rem; color: #91A9C2; }
.site-footer__legal p { margin: 0; max-width: 72ch; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }

/* ------------------------------------------------------------------
   10. Après les élections (extension Almarsad Suivi)
------------------------------------------------------------------ */
.alms-lead { font-size: var(--s1); color: var(--ink-2); max-width: 62ch; }
.st { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.st--non_commence { background: #EEF0F5; color: #4D5570; }
.st--en_cours { background: var(--accent-soft); color: var(--accent); }
.st--partiel { background: var(--warn-soft); color: var(--warn); }
.st--realise { background: var(--ok-soft); color: var(--ok); }
.st--abandonne { background: var(--danger-soft); color: var(--danger); }
.st--non_verifiable { background: var(--sheet); color: var(--muted); border: 1.5px dashed var(--rule-strong); padding: 2px 10px; }
.stbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #EEF0F5; margin: 10px 0; }
.stbar__seg { display: block; height: 100%; border: 0; padding: 0; border-radius: 0; }
.stbar__seg.st--non_commence { background: #B7BDCE; }
.stbar__seg.st--en_cours { background: var(--accent); }
.stbar__seg.st--partiel { background: #D9A441; }
.stbar__seg.st--realise { background: #2E9E66; }
.stbar__seg.st--abandonne { background: #C8574A; }
.stbar__seg.st--non_verifiable { background: repeating-linear-gradient(45deg, #D5D9E5 0 4px, #EEF0F5 4px 8px); }
.stlegend { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--muted); }
.stlegend li { display: inline-flex; align-items: center; gap: 7px; }
.stlegend__dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; padding: 0; border: 0; }
.stlegend__dot.st--non_commence { background: #B7BDCE; }
.stlegend__dot.st--en_cours { background: var(--accent); }
.stlegend__dot.st--partiel { background: #D9A441; }
.stlegend__dot.st--realise { background: #2E9E66; }
.stlegend__dot.st--abandonne { background: #C8574A; }
.stlegend__dot.st--non_verifiable { background: repeating-linear-gradient(45deg, #C3C8D8 0 3px, #EEF0F5 3px 6px); }

.alms-tiles { list-style: none; margin: 26px 0 34px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.alms-tiles li { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.alms-tiles h3 { font-size: 1.12rem; margin-bottom: 4px; }
.alms-tiles h3 a { text-decoration: none; }
.alms-tiles__fig { font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.alms-tiles p:last-child { color: var(--muted); font-size: .92rem; margin: 0; }
.alms-steps { list-style: none; counter-reset: s; margin: 0 0 30px; padding: 0; border-inline-start: 2px solid var(--accent-soft); }
.alms-steps li { counter-increment: s; position: relative; padding: 0 0 18px 26px; display: flex; flex-direction: column; gap: 2px; }
[dir="rtl"] .alms-steps li { padding: 0 26px 18px 0; }
.alms-steps li::before { content: counter(s); position: absolute; inset-inline-start: -13px; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.alms-steps span { color: var(--muted); }
.alms-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alms-rules li { background: var(--accent-tint); border-radius: var(--radius-sm); padding: 12px 16px; }

.alms-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; box-shadow: var(--shadow); }
.alms-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; }
.alms-filters select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1.5px solid var(--rule-strong); border-radius: 10px; background: var(--sheet); min-width: 180px; }
.alms-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.alms-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.alms-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.alms-theme { font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
[dir="rtl"] .alms-theme { letter-spacing: 0; }
.alms-card h3 { font-size: 1.08rem; margin-bottom: 4px; }
.alms-card h3 a { color: var(--ink); text-decoration: none; }
.alms-card h3 a:hover { color: var(--accent); }
.alms-card .am-meta { margin: 0; }
.alms-timeline { list-style: none; margin: 0 0 24px; padding: 0; border-top: 2px solid var(--ink); }
.alms-timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.alms-timeline p { margin: 6px 0 4px; }
.alms-bilan { width: 100%; border-collapse: collapse; margin-bottom: 28px; }
.alms-bilan th { text-align: start; font-weight: 600; padding: 10px 14px 10px 0; width: 32%; vertical-align: middle; }
.alms-bilan th a { color: var(--ink); text-decoration: none; }
.alms-bilan td { padding: 6px 0; vertical-align: middle; }
.alms-bilan__n { width: 50px; text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.alms-bilan tr + tr { border-top: 1px solid var(--rule); }
@media (max-width: 600px) { .alms-bilan th { width: 40%; font-size: .9rem; } }
.alms-chamber { max-width: 560px; margin: 0 0 20px; }
.alms-reg { font-size: 1.3rem; margin-top: 1.4em; }
.alms-elus { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.alms-elus__circ { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 14px 16px; }
.alms-elus__circ h3 { font-size: 1rem; margin-bottom: 6px; }
.alms-elus__circ ul { list-style: none; margin: 0; padding: 0; }
.alms-elus__circ li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0 5px 10px; border-inline-start: 3px solid var(--c, var(--ink)); margin-bottom: 4px; }
.alms-acts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.alms-acts li { background: var(--accent-tint); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; min-width: 120px; }
.alms-acts strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.alms-acts span { font-size: .82rem; color: var(--muted); }
.alms-data td:last-child a { display: inline-block; margin-inline-end: 8px; font-weight: 600; }
/* ------------------------------------------------------------------
   8. Élus et outils du super administrateur
------------------------------------------------------------------ */
.am-chip.am-elu { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.am-chip.am-elu-provisoire { background: var(--sheet); color: var(--ink); border: 1.5px solid var(--ink); }
.am-cards li.is-elu { background: #EEF0F6; }
.am-elus { margin: 6px 0 26px; }
.am-elus__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.am-elus__list li { background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--c, var(--ink)); border-radius: var(--radius); padding: 12px 14px; }
.am-elus__list .am-name { display: block; margin-bottom: 2px; }
.am-elus-nat { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 28px; margin-bottom: 28px; }
.am-elus-nat__circ { padding: 10px 0; border-top: 1px solid var(--rule); break-inside: avoid; }
.am-elus-nat__circ h3 { font-size: var(--s0); margin: 0 0 4px; }
.am-elus-nat__circ ul { list-style: none; margin: 0; padding: 0; }
.am-elu-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; background: #EEF0F6; border-inline-start: 4px solid var(--ink); padding: 10px 14px; border-radius: 4px; }
.am-news--resultat { background: #EEF0F6; padding-inline: 12px !important; }
.am-news--resultat a::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); margin-inline-end: 8px; vertical-align: 2px; }
.results-chamber { max-width: 560px; margin: 0 0 30px; }

.am-elu-check { display: inline-flex; align-items: center; gap: 6px; flex: none; font-weight: 600; font-size: var(--s-1); color: var(--accent); background: var(--accent-soft); border: 1.5px dashed var(--accent); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; align-self: center; }
.am-elu-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.am-elu-check:has(input:checked) { background: var(--accent); color: #fff; border-style: solid; }
.am-admin-bar { border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin: 4px 0 30px; }
.am-admin-bar__title { font-weight: 600; margin-bottom: 4px; }
.am-admin-bar__title .am-meta { font-weight: 400; margin-inline-start: 8px; }
.am-admin-bar__row { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.am-admin-bar label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: var(--s-1); }
.am-admin-bar input, .am-admin-bar select { font: inherit; padding: 8px 10px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); min-width: 200px; }
.am-admin-bar details { margin: 6px 0; }
.am-admin-bar summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.am-admin-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 10px 12px; border: 1.5px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.am-admin-toggle select { font: inherit; padding: 8px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius); }
.am-admin-toggle .am-btn { padding: 8px 14px; font-size: .95rem; }


/* ------------------------------------------------------------------
   9. Application, alertes, réseaux d'Almarsad
------------------------------------------------------------------ */
.results-alert { margin: -12px 0 28px; }
.am-alerts, .am-install { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 24px; }
.am-alerts h2, .am-install h2 { font-size: var(--s2); margin-top: 0; }
.am-alerts fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.am-alerts legend { font-weight: 600; margin-bottom: 6px; }
.am-alerts--inline { background: none; border: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.am-btn[disabled], .button[disabled] { opacity: .55; cursor: default; }
.am-install-help summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.am-dialog { border: 0; border-radius: 8px; padding: 24px; max-width: 26rem; color: var(--ink); }
.am-dialog { background: var(--sheet); }
.am-dialog::backdrop { background: rgba(11, 33, 65, .55); }
.am-dialog h2 { font-size: var(--s2); }
.am-accounts { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.am-account { display: inline-block; padding: 9px 16px; border: 1.5px solid var(--rule-strong); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; }
.am-account:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.am-own-posts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--accent); }
.am-own-posts li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.am-own-posts__text { margin: 6px 0; max-width: 70ch; }
.am-own-posts__links a { margin-inline-end: 14px; font-weight: 500; }

.am-elus-count { font-weight: 600; margin: 8px 0 0; }
.am-admin-bar .am-btn:disabled { opacity: .45; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
	.site-nav, .nav-toggle, .site-header__tools, .site-footer, .am-request, .search, .find, .agenda .countdown, .band, .tools { display: none !important; }
	body { background: #fff; }
	.site-header { position: static; }
	.countdown__fallback { display: block !important; }
}
