/* =========================================================
   GEW Algeria 2026 — charte issue des visuels officiels
   Anthracite #4A4A4A · Orange #FF7C10 · Blanc
   ========================================================= */
:root {
  --charcoal: #4A4A4A;
  --charcoal-2: #3E3E3E;
  --charcoal-3: #333333;
  --ink: #1F1F1F;
  --ink-2: #4B4B4B;
  --muted: #6B6B6B;
  --line: #E2E2E2;
  --line-2: #CFCFCF;
  --bg: #F2F2F2;
  --surface: #FFFFFF;
  --orange: #FF7C10;
  --orange-band: #F06A00;
  --orange-ink: #A64908;      /* orange lisible sur fond clair (AA) */
  --orange-on-dark: #FFB070;  /* orange lisible sur anthracite (AA, petit texte) */
  --orange-soft: #FFF1E5;
  --red: #C62828;
  --red-soft: #FDECEC;
  --green: #1E7B45;
  --green-soft: #E7F4EC;
  --dz-green: #006233;
  --dz-red: #D21034;
  --s0: #ECECEC; --s1: #FFE2C8; --s2: #FFC28F; --s3: #FF9B4E; --s4: #F07412; --s5: #B9520A;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 31, 31, .06), 0 8px 24px -12px rgba(31, 31, 31, .18);
  --font: 'Poppins', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-ar: 'Cairo', 'Poppins', 'Segoe UI', Tahoma, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[dir="rtl"] body, [lang="ar"] { font-family: var(--font-ar); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--orange); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.lead { font-size: 1.05rem; max-width: 62ch; margin-top: 10px; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 10px; }
[dir="rtl"] .kicker { letter-spacing: 0; font-size: .9rem; }
.kicker--light { color: var(--orange-on-dark); }
.h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; }
.h3 { font-size: 1.35rem; font-weight: 700; }
.h2 em, .h3 em { font-style: normal; color: var(--orange-ink); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 2px solid transparent; background: transparent; font-weight: 600; font-size: .95rem; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: #FF8F33; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghostLight { border-color: rgba(255,255,255,.9); color: #fff; }
.btn--ghostLight:hover { background: rgba(255,255,255,.14); }
.btn--outline { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); }
.btn--danger { color: var(--red); background: transparent; border-color: transparent; padding-inline: 10px; min-height: 36px; }
.btn--danger:hover { background: var(--red-soft); }
.btn--link { background: none; border: 0; min-height: auto; padding: 0 4px; color: var(--orange-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .88rem; }
.btn--lg { min-height: 54px; padding: 12px 30px; font-size: 1.02rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Patronage ---------- */
.patronage { background: #fff; border-bottom: 1px solid var(--line); }
.patronage__inner { display: flex; align-items: center; gap: 18px; min-height: 84px; }
.patronage__seal { width: 76px; height: auto; flex: none; }
.patronage__text { flex: 1; font-weight: 700; font-size: .98rem; line-height: 1.35; max-width: 62ch; }
[dir="rtl"] .patronage__text { font-size: 1.05rem; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; flex: none; background: #fff; margin-inline-start: auto; }
.lang button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--ink-2); min-height: 34px; }
.lang button[lang="ar"] { font-family: var(--font-ar); }
.lang button[aria-pressed="true"] { background: var(--charcoal); color: #fff; }
@media (max-width: 720px) {
  .patronage__inner { flex-wrap: wrap; gap: 10px 14px; padding-block: 10px; }
  .patronage__seal { width: 56px; }
  .patronage__text { font-size: .72rem; order: 3; flex-basis: 100%; }
  [dir="rtl"] .patronage__text { font-size: .9rem; }
  .lang { margin-inline-start: auto; }
}

/* ---------- Navigation ---------- */
.topnav { position: sticky; top: 0; z-index: 40; background: var(--charcoal); border-bottom: 1px solid rgba(255,255,255,.08); }
.topnav__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.topnav__brand img { height: 58px; width: auto; }
.topnav__links { display: flex; gap: 26px; margin-inline-start: auto; }
.topnav__links a { color: #fff; text-decoration: none; font-weight: 500; font-size: .93rem; opacity: .88; padding-block: 6px; border-bottom: 2px solid transparent; }
.topnav__links a:hover { opacity: 1; border-bottom-color: var(--orange); }
@media (max-width: 860px) { .topnav__links { display: none; } .topnav__inner > .btn { margin-inline-start: auto; } }
@media (max-width: 420px) { .topnav__brand img { height: 38px; } .topnav__inner > .btn { padding-inline: 14px; font-size: .8rem; } }

/* ---------- Hero ---------- */
.hero { background: var(--charcoal); color: #fff; position: relative; overflow: hidden; }
.hero::after { /* anneau décoratif inspiré du logo */
  content: ""; position: absolute; width: 560px; height: 560px; inset-inline-end: -180px; top: -200px; border-radius: 50%;
  background: conic-gradient(from 10deg, #E94B3C, #F39C12, #F7DC6F, #E5E5E5, #85C1E9, #5DADE2, #A569BD, #F5B7B1, #E94B3C);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 57.5%, #000 70%, transparent 70.5%);
  mask: radial-gradient(circle, transparent 57%, #000 57.5%, #000 70%, transparent 70.5%);
  opacity: .14; pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 48px; padding-block: 64px 48px; position: relative; z-index: 1; }
.hero__title { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; max-width: 13ch; }
[dir="rtl"] .hero__title { line-height: 1.3; letter-spacing: 0; font-weight: 800; }
.hero__title em { font-style: normal; color: var(--orange); }
.names { list-style: none; padding: 18px 0 0; margin: 30px 0 0; display: grid; gap: 4px; border-top: 1px solid rgba(255,255,255,.2); max-width: 520px; }
.names li { font-size: 1rem; color: rgba(255,255,255,.86); font-weight: 500; }
.names li[lang="ar"] { font-family: var(--font-ar); font-size: 1.1rem; font-weight: 700; }
[dir="ltr"] .names li[lang="ar"] { text-align: left; }
.hero__side { display: flex; flex-direction: column; gap: 22px; align-items: flex-end; }
[dir="rtl"] .hero__side { align-items: flex-start; }
.hero__dates { display: flex; flex-direction: column; align-items: flex-end; text-align: end; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
[dir="rtl"] .hero__dates { align-items: flex-start; letter-spacing: 0; text-transform: none; }
.hero__days { font-size: clamp(3rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; }
.hero__dates span:last-child { font-size: .95rem; margin-top: 6px; opacity: .9; }
.live { background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 20px 24px; min-width: 260px; }
.live__tag { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-on-dark); }
.live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255,124,16,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,124,16,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,124,16,0); } 100% { box-shadow: 0 0 0 0 rgba(255,124,16,0); } }
.live__num { font-size: 3.4rem; font-weight: 700; line-height: 1.05; margin-top: 6px; font-variant-numeric: tabular-nums; }
.live__lbl { font-weight: 500; opacity: .9; }
.live__sub { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem; opacity: .9; }
.live__sub strong { color: var(--orange-on-dark); font-size: 1.1rem; }
.hero__band { position: relative; z-index: 1; }
.hero__band::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: min(100%, calc(50% + 380px)); background: var(--orange-band); }
.hero__bandInner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 28px; }
.hero__bandInner p { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 600; line-height: 1.3; max-width: 30ch; color: #fff; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1100px) { .hero__band::before { width: 100%; } }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; padding-block: 44px 36px; }
  .hero__side { flex-direction: row; align-items: stretch; justify-content: space-between; flex-wrap: wrap; }
  .hero__dates { align-items: flex-start; text-align: start; }
  .hero__bandInner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) { .live { min-width: 0; width: 100%; } .hero__ctas .btn { flex: 1 1 100%; } }

/* ---------- Étapes ---------- */
.steps { background: var(--charcoal-2); color: #fff; padding-block: 52px; }
.steps .h2 em { color: var(--orange); }
.steps__list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps__list li { display: flex; gap: 16px; align-items: flex-start; }
.steps__list h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 6px; }
.steps__list p { color: rgba(255,255,255,.78); font-size: .93rem; }
.num { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--orange); color: var(--ink); font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; }
@media (max-width: 860px) { .steps__list { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Sections ---------- */
.section { padding-block: 72px; }
@media (max-width: 640px) { .section { padding-block: 52px; } }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.updated { font-size: .85rem; color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.kpi--main { background: var(--charcoal); color: #fff; border-color: var(--charcoal); position: relative; overflow: hidden; }
.kpi__num { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi__num small { font-size: max(.45em, 15px); font-weight: 600; color: var(--muted); margin-inline-start: 2px; }
.kpi--main .kpi__num { color: var(--orange); font-size: clamp(2.6rem, 4.6vw, 3.6rem); }
.kpi__lbl { margin-top: 6px; font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.kpi--main .kpi__lbl { color: rgba(255,255,255,.88); }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi--main { grid-column: 1 / -1; } }

/* ---------- Cartes & graphiques ---------- */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.card--wide { grid-column: 1 / -1; }
.card__head { margin-bottom: 16px; }
.card__head h3 { font-size: 1.05rem; font-weight: 600; }
.card__head p { font-size: .85rem; margin-top: 4px; }
.card__sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
[dir="rtl"] .card__sub { letter-spacing: 0; font-size: .9rem; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.bar__lbl { font-size: .87rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__val { font-size: .87rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar__val small { font-weight: 500; color: var(--muted); margin-inline-start: 6px; }
.bar__track { grid-column: 1 / -1; height: 10px; border-radius: 6px; background: var(--s0); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 6px; background: var(--orange); width: 0; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar--top .bar__fill { background: var(--charcoal); }
.bar--top:first-child .bar__fill { background: var(--orange); }
.empty { color: var(--muted); font-size: .9rem; padding: 18px 0; text-align: center; }

.wilaya-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
@media (max-width: 900px) { .wilaya-layout { grid-template-columns: 1fr; } }
/* Carte des 69 wilayas */
.dzmap-host { display: grid; gap: 8px; }
.dzmap { position: relative; aspect-ratio: 1 / 1; width: 100%; max-height: 640px; background: linear-gradient(180deg, #F3F7FA, #FBFBFA); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dzmap--loading { background: var(--bg); }
.dzmap__svg { display: block; width: 100%; height: 100%; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.dzmap.is-zoomed .dzmap__svg { cursor: grab; touch-action: none; }
.dzmap.is-dragging .dzmap__svg { cursor: grabbing; }
.dzmap__w { fill: var(--s0); stroke: #fff; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .25s, filter .15s; outline: none; }
.dzmap__w.s0 { fill: #E4E2DE; } .dzmap__w.s1 { fill: var(--s1); } .dzmap__w.s2 { fill: var(--s2); }
.dzmap__w.s3 { fill: var(--s3); } .dzmap__w.s4 { fill: var(--s4); } .dzmap__w.s5 { fill: var(--s5); }
.dzmap__w:hover, .dzmap__w.is-active { stroke: var(--ink); stroke-width: 2.2; filter: brightness(1.04) drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.dzmap__w:focus-visible { stroke: var(--ink); stroke-width: 3; }
.dzmap__tip { position: absolute; z-index: 2; pointer-events: none; display: grid; gap: 2px; min-width: 150px; max-width: 240px; padding: 9px 13px; border-radius: 10px; background: var(--charcoal); color: #fff; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); font-size: .84rem; line-height: 1.35; }
.dzmap__tip strong { font-size: .92rem; font-weight: 700; }
.dzmap__tip span { color: var(--orange-on-dark); font-weight: 600; }
.dzmap__tip--zero span { color: rgba(255,255,255,.72); font-weight: 500; }
.dzmap__tools { position: absolute; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.dzmap__btn { min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,.94); color: var(--ink); font: inherit; font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.dzmap__btn--txt { font-size: .78rem; font-weight: 700; }
.dzmap__btn:hover:not(:disabled) { border-color: var(--ink); }
.dzmap__btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; }
.dzmap__btn:disabled { opacity: .4; cursor: default; }
.dzmap__credit { font-size: .72rem; color: var(--muted); margin: 0; }
@media (max-width: 640px) {
  .dzmap { aspect-ratio: auto; max-height: none; }
  .dzmap__svg { aspect-ratio: 1 / 1; height: auto; }
  .dzmap__tools { position: static; flex-direction: row; justify-content: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line); background: #fff; }
  .dzmap__btn { min-width: 44px; height: 40px; box-shadow: none; }
  .dzmap__tip { min-width: 130px; }
}
.legend-scale { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.legend-scale i { width: 22px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-scale span:first-child { margin-inline-end: 4px; } .legend-scale span:last-child { margin-inline-start: 4px; }
.legend-scale .s0 { background: #E4E2DE; } .legend-scale .s1 { background: var(--s1); } .legend-scale .s2 { background: var(--s2); }
.legend-scale .s3 { background: var(--s3); } .legend-scale .s4 { background: var(--s4); } .legend-scale .s5 { background: var(--s5); }

.stack { display: flex; height: 22px; border-radius: 8px; overflow: hidden; background: var(--s0); gap: 2px; }
.stack span { height: 100%; transition: width .6s; }
.stack-legend { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.stack-legend li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.stack-legend i { width: 14px; height: 14px; border-radius: 4px; }
.stack-legend b { font-variant-numeric: tabular-nums; }
.c-0 { background: var(--orange); } .c-1 { background: var(--charcoal); } .c-2 { background: #A9A39A; }

.cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 210px; }
.col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.col__val { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.col__bar { width: 100%; max-width: 46px; background: var(--charcoal); border-radius: 6px 6px 2px 2px; min-height: 3px; height: 0; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.col--peak .col__bar { background: var(--orange); }
.col__lbl { font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.2; }
.col__lbl b { display: block; color: var(--ink); font-size: .85rem; }

/* ---------- Formulaire ---------- */
.section--form { background: var(--surface); border-block: 1px solid var(--line); }
.form-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 56px; align-items: start; }
.form-aside { position: sticky; top: 96px; }
.form-aside .h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 12px; }
.form-aside__logo { width: 220px; max-width: 100%; height: auto; margin-top: 32px; }
.progress { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 4px; }
.progress a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--ink-2); }
.progress a:hover { background: var(--bg); }
.progress__n { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: .82rem; font-weight: 700; flex: none; transition: all .2s; }
.progress li.done .progress__n { background: var(--green); border-color: var(--green); color: #fff; font-size: 0; }
.progress li.done .progress__n::before { content: "✓"; font-size: .9rem; }
.progress li.has-err .progress__n { border-color: var(--red); color: var(--red); }
@media (max-width: 960px) {
  .form-layout { grid-template-columns: 1fr; gap: 28px; }
  .form-aside { position: static; }
  .progress, .form-aside__logo { display: none; }
}

.form { display: grid; gap: 22px; }
.fs { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 28px; margin: 0; min-width: 0; background: #fff; }
.fs legend { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 700; padding: 0 10px; margin-inline-start: -10px; }
.fs__n { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
@media (max-width: 640px) { .fs { padding: 18px 16px 22px; } }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 14px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-2 { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } .grid--4 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.req { color: var(--orange-ink); font-weight: 700; }
.opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.opt::before { content: "("; } .opt::after { content: ")"; }
.hint { font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.count { font-variant-numeric: tabular-nums; flex: none; }
.count.over { color: var(--red); font-weight: 600; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A4A4A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
[dir="rtl"] select { background-position: left 14px center; }
input:hover, select:hover, textarea:hover { border-color: #ABABAB; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,124,16,.18); }
input::placeholder, textarea::placeholder { color: #737373; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #FFFBFB; }
.field.invalid .choice__opt { border-color: var(--red); }
.err { color: var(--red); font-size: .82rem; font-weight: 500; display: flex; gap: 6px; align-items: flex-start; }
.err::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }

.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice--sm { grid-template-columns: repeat(2, minmax(0, 220px)); }
.choice__opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 44px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
[dir="rtl"] .choice__opt { padding: 12px 44px 12px 14px; }
.choice__opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice__opt::before { content: ""; position: absolute; inset-inline-start: 14px; top: 14px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; transition: all .15s; }
.choice__opt strong { font-size: .95rem; font-weight: 600; }
.choice__opt span { font-size: .78rem; color: var(--muted); }
.choice__opt:hover { border-color: #ABABAB; }
.choice__opt:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.choice__opt:has(input:checked)::before { border-color: var(--orange); border-width: 6px; }
.choice__opt:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (max-width: 560px) { .choice { grid-template-columns: 1fr; } .choice--sm { grid-template-columns: 1fr 1fr; } }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400 !important; font-size: .9rem !important; line-height: 1.5; cursor: pointer; padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
.field.invalid .check { outline: 1.5px solid var(--red); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500 !important; }
.switch input { position: absolute; opacity: 0; }
.switch__ui { flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.switch__ui::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .switch__ui { background: var(--orange); }
.switch input:checked + .switch__ui::after { transform: translateX(20px); }
[dir="rtl"] .switch input:checked + .switch__ui::after { transform: translateX(-20px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--orange); outline-offset: 2px; }

.note { margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--orange-soft); color: #7A3606; font-size: .86rem; }
.virtual { padding-top: 18px; margin-top: 18px; border-top: 1px dashed var(--line-2); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 500; font-size: .93rem; }
.alert--error { background: var(--red-soft); color: #8E1B1B; border: 1px solid #F2B8B8; }
.alert--ok { background: var(--green-soft); color: #145232; border: 1px solid #B6DCC5; }

.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 4px; }
.form__foot .muted { flex: 1; min-width: 220px; }

.success { text-align: center; padding: 56px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: grid; gap: 12px; justify-items: center; }
.success:focus { outline: none; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin-bottom: 6px; }
.success h3 { font-size: 1.7rem; }
.success p { max-width: 48ch; }
.success__refLbl { margin-top: 10px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.success__ref { font-size: 2rem; font-weight: 700; color: var(--orange-ink); letter-spacing: .04em; font-family: var(--font); background: var(--orange-soft); padding: 6px 22px; border-radius: 10px; }
.success .btn { margin-top: 12px; }

/* ---------- Dernières activités ---------- */
.section--recent { padding-block: 56px; }
.recent { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.recent li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.recent .tag { justify-self: start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-ink); background: var(--orange-soft); padding: 3px 10px; border-radius: 999px; }
.recent h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent p { font-size: .84rem; color: var(--muted); }
.recent .empty { grid-column: 1 / -1; }
@media (max-width: 900px) { .recent { grid-template-columns: 1fr; } }

/* ---------- Visuels ---------- */
.posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.poster { display: grid; gap: 10px; text-decoration: none; }
.poster img { border-radius: 10px; box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; transition: transform .2s; }
.poster:hover img { transform: translateY(-3px); }
.poster span { font-size: .85rem; font-weight: 600; display: flex; justify-content: space-between; color: var(--ink-2); }
.poster span::after { content: "↓"; color: var(--orange-ink); font-weight: 700; }
@media (max-width: 900px) { .posters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Pied de page ---------- */
.footer { background: var(--charcoal); color: #fff; }
.footer__inner { display: flex; align-items: center; gap: 36px; padding-block: 40px; flex-wrap: wrap; }
.footer__logo { width: 220px; }
.footer__text { display: grid; gap: 8px; flex: 1; min-width: 260px; }
.footer__partner { font-weight: 600; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; font-size: .9rem; }
.footer__links a { color: rgba(255,255,255,.85); }
.footer__links a:hover { color: var(--orange); }
.footer .small { color: rgba(255,255,255,.78); }
.hashtags { background: var(--orange); color: var(--ink); font-weight: 700; font-size: .85rem; overflow: hidden; }
.hashtags__track { white-space: nowrap; padding: 9px 24px; text-align: center; overflow-x: auto; scrollbar-width: none; }
.hashtags__track::-webkit-scrollbar { display: none; }

/* =========================================================
   ESPACE ADMIN
   ========================================================= */
.admin-bar { background: var(--charcoal); color: #fff; }
.admin-bar__inner { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.admin-bar img { height: 40px; width: auto; }
.admin-bar__title { font-weight: 600; font-size: .95rem; padding-inline-start: 18px; border-inline-start: 1px solid rgba(255,255,255,.2); }
.admin-bar__right { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-bar .lang { background: transparent; border-color: rgba(255,255,255,.25); }
.admin-bar .lang button { color: rgba(255,255,255,.85); }
.admin-bar .lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.admin-bar a { color: rgba(255,255,255,.85); font-size: .88rem; }
.admin-main { padding-block: 32px 64px; display: grid; gap: 22px; }
.admin-main .h2 { font-size: 1.6rem; }
.login { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px 16px; }
.login__card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 32px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.login__card img { width: 72px; justify-self: center; }
.login__card h1 { font-size: 1.35rem; text-align: center; }
.login__card p { text-align: center; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.panel__head h2 { font-size: 1.15rem; font-weight: 700; }
.panel__head p { font-size: .87rem; max-width: 70ch; margin-top: 4px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.meter { display: grid; gap: 8px; margin-bottom: 18px; }
.meter__row { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; }
.meter__row b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.meter__track { height: 14px; border-radius: 999px; background: var(--s0); overflow: hidden; }
.meter__fill { height: 100%; background: var(--orange); border-radius: 999px; transition: width .5s; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; white-space: nowrap; }
[dir="rtl"] th { letter-spacing: 0; font-size: .82rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FCFBF9; }
td.num-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { white-space: nowrap; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .82rem; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.pill--orange { background: var(--orange-soft); color: var(--orange-ink); }
.pill--green { background: var(--green-soft); color: var(--green); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } .filters > :first-child { grid-column: 1 / -1; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: .87rem; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: start; font-weight: 600; color: var(--ink); }
.linkish:hover { color: var(--orange-ink); text-decoration: underline; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.export-list { display: grid; gap: 10px; }
.export-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; font-size: .92rem; }
.export-list a:hover { border-color: var(--orange); background: var(--orange-soft); }
.export-list a::after { content: "CSV ↓"; font-size: .75rem; font-weight: 700; color: var(--orange-ink); flex: none; }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(31,31,31,.55); }
.dlg__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.dlg__body { padding: 18px 24px 26px; }
.dl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 18px; font-size: .9rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 8px; } }
.toast { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 90; max-width: 420px; box-shadow: var(--shadow); }

/* ---------- Formulaire : saisie manuelle, sections, compteurs ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.notice { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: var(--radius-sm); background: var(--charcoal); color: #fff; font-size: .9rem; font-weight: 500; }
.notice svg { flex: none; color: var(--orange-on-dark); }
.paste-tip { font-size: .82rem; font-weight: 600; color: #7A3606; background: var(--orange-soft); padding: 6px 10px; border-radius: 6px; }
.fs__intro { font-size: .88rem; color: var(--muted); margin-top: 6px; max-width: 70ch; text-wrap: pretty; }
.step-tag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--charcoal); color: #fff; font-size: .8rem; font-weight: 700; margin-inline-end: 8px; vertical-align: 1px; }
.count.under { color: var(--orange-ink); font-weight: 600; }
.count.good { color: var(--green); font-weight: 600; }
.callout { font-size: .85rem; line-height: 1.5; color: #7A3606; background: var(--orange-soft); border-radius: var(--radius-sm); padding: 10px 14px; text-wrap: pretty; }
.choice__opt strong[lang="en"] { font-family: var(--font); letter-spacing: 0; }
.hint > span:first-child { text-wrap: pretty; }

/* ---------- Admin : IA, sécurité, audit, fiche ---------- */
.pill--red { background: var(--red-soft); color: #8E1B1B; }
.ai-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.ai-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.ai-count { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 2px; }
.ai-count strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ai-count span { font-size: .8rem; color: var(--muted); }
.ai-count.is-bad strong { color: var(--red); }
.ai-count.is-warn strong { color: var(--orange-ink); }
@media (max-width: 760px) { .ai-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guarantees { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; font-size: .86rem; color: var(--ink-2); }
.guarantees li { position: relative; padding-inline-start: 24px; text-wrap: pretty; }
.guarantees li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--green); font-weight: 700; }
@media (max-width: 760px) { .guarantees { grid-template-columns: 1fr; } }
.filters--5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 1000px) { .filters--5 { grid-template-columns: 1fr 1fr; } }
.admin-grid--flat { gap: 32px; }
.stack-form { display: grid; gap: 14px; align-content: start; }
.twofa { display: grid; gap: 12px; align-content: start; }
.h4 { font-size: 1rem; font-weight: 700; }
.twofa__state { font-size: .88rem; padding: 10px 14px; border-radius: var(--radius-sm); }
.twofa__state.is-on { background: var(--green-soft); color: #145232; }
.twofa__state.is-off { background: var(--orange-soft); color: #7A3606; }
.secret { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; background: var(--bg); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; overflow-wrap: anywhere; }
.table-wrap--short { max-height: 420px; overflow-y: auto; }
dialog { width: min(960px, calc(100vw - 32px)); }
.dlg__body { display: grid; gap: 22px; }
.dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dsec { display: grid; gap: 10px; }
.dsec__title { font-size: .78rem; font-weight: 700; color: var(--orange-ink); text-transform: none; letter-spacing: .02em; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.trform { display: grid; gap: 14px; }
.trgrid { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; align-items: start; font-size: .88rem; }
.trgrid__h { font-size: .75rem; font-weight: 700; color: var(--muted); }
.trgrid__lbl { font-weight: 600; color: var(--muted); padding-top: 8px; }
.trgrid__orig { background: var(--bg); border-radius: var(--radius-sm); padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 44px; }
.trgrid textarea { min-height: 44px; font-size: .9rem; }
@media (max-width: 720px) { .trgrid { grid-template-columns: 1fr; } .trgrid__h { display: none; } .trgrid__lbl { padding-top: 6px; } }

.conn-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* =========================================================
   Espace organisateurs
   ========================================================= */
.btn--block { width: 100%; }
.alert--warn { background: var(--orange-soft); color: #7A3606; border: 1px solid #F6C9A3; }

/* Accueil : bloc « Espace organisateurs » */
.section--space { background: var(--surface); border-block: 1px solid var(--line); }
.space-promo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.space-steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 22px; }
.space-steps li { display: flex; gap: 16px; align-items: flex-start; }
.space-steps h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 4px; }
.space-steps p { color: var(--ink-2); font-size: .93rem; max-width: 56ch; text-wrap: pretty; }
.space-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; }
.space-card__logo { width: 210px; justify-self: center; margin-bottom: 4px; }
@media (max-width: 900px) { .space-promo { grid-template-columns: 1fr; gap: 32px; } }

.gen-warning { border-inline-start: 0; background: var(--orange-soft); color: #5E2A05; border-radius: var(--radius-sm); padding: 16px 18px; display: grid; gap: 6px; font-size: .9rem; line-height: 1.55; }
.gen-warning__title { font-weight: 700; color: var(--ink); font-size: .98rem; }
.gen-warning--dark { background: rgba(255,255,255,.08); color: rgba(255,255,255,.88); border: 1px solid rgba(255,176,112,.45); }
.gen-warning--dark .gen-warning__title { color: var(--orange-on-dark); }
.gen-warning__more a { color: var(--orange-on-dark); font-weight: 600; }

/* Barre et page de connexion */
.esp-bar__site { white-space: nowrap; }
.auth { padding-block: 48px 72px; }
.auth__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: start; }
.auth__intro { background: var(--charcoal); color: #fff; border-radius: var(--radius); padding: 36px 34px; display: grid; gap: 18px; position: sticky; top: 24px; }
.auth__title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
.auth__title em { font-style: normal; color: var(--orange-on-dark); }
.auth__lead { color: rgba(255,255,255,.86); }
.auth__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.auth__perks li { position: relative; padding-inline-start: 26px; }
.auth__perks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--orange-on-dark); font-weight: 700; }
.auth__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px 30px; display: grid; gap: 20px; box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 999px; padding: 4px; }
.tabs button { border: 0; background: none; min-height: 44px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--charcoal); color: #fff; }
.grid--tight { margin-top: 0; gap: 14px 16px; }
@media (max-width: 900px) { .auth__grid { grid-template-columns: 1fr; } .auth__intro { position: static; } }
@media (max-width: 520px) { .auth__card, .auth__intro { padding: 22px 18px; } }

/* Espace connecté */
.esp-main { padding-block: 36px 72px; display: grid; gap: 22px; }
.esp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.esp-head .kicker { margin-bottom: 6px; }
.esp-kpis { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 14px; }
.esp-kpis .kpi { padding: 18px 20px; }
.esp-kpis .kpi__num { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.kpi--storage { display: grid; gap: 10px; align-content: center; }
.kpi--storage .kpi__lbl { margin-top: 0; }
@media (max-width: 760px) { .esp-kpis { grid-template-columns: 1fr 1fr; } .kpi--storage { grid-column: 1 / -1; } }
.esp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-2); overflow-x: auto; }
.esp-tabs a { padding: 12px 16px; text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.esp-tabs a:hover { color: var(--ink); }
.esp-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }

/* Historique */
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.act-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.act-card__date { display: grid; place-items: center; background: var(--charcoal); color: #fff; border-radius: var(--radius-sm); padding: 8px 4px; line-height: 1.1; }
.act-card__date strong { font-size: 1.45rem; }
.act-card__date span { font-size: .76rem; color: var(--orange-on-dark); font-weight: 600; }
.act-card__body { display: grid; gap: 4px; min-width: 0; }
.act-card__body h3 { font-size: 1.04rem; font-weight: 600; overflow-wrap: anywhere; }
.act-card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.act-card__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.act-empty { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px 20px; display: grid; gap: 16px; justify-items: center; text-align: center; color: var(--ink-2); }
@media (max-width: 680px) { .act-card { grid-template-columns: 56px minmax(0, 1fr); } .act-card__actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* Éditeur */
.editor-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.editor-head .h3 { margin-inline-end: auto; }
#viewEditor { display: grid; gap: 16px; }
#viewEditor[hidden] { display: none; }
.locked { background: var(--bg); border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); padding: 11px 14px; font-weight: 600; overflow-wrap: anywhere; }

/* Photos et vidéos */
.media-panel { display: grid; gap: 22px; }
.media-panel .panel__head { margin-bottom: 0; }
.media-block { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); justify-items: start; }
.media-block__head { display: flex; align-items: center; gap: 10px; }
.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; width: 100%; }
.media-grid--video { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.media-grid--admin { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.media-item { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); display: grid; }
.media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media-item video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.media-item--link { padding: 12px; gap: 6px; align-content: start; }
.media-item--link .mono { overflow-wrap: anywhere; white-space: normal; }
.media-item__size { font-size: .74rem; color: var(--muted); padding: 4px 8px; }
.media-del { position: absolute; top: 6px; inset-inline-end: 6px; border: 0; border-radius: 999px; background: rgba(31,31,31,.82); color: #fff; font-size: .76rem; font-weight: 600; padding: 5px 10px; cursor: pointer; }
.media-del:hover { background: var(--red); }
.media-item--link .media-del, .link-item .media-del { position: static; justify-self: start; }
.media-none { color: var(--muted); font-size: .88rem; grid-column: 1 / -1; list-style: none; }
.media-link { font-weight: 600; color: var(--orange-ink); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.link-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.link-item a { font-weight: 600; color: var(--orange-ink); }
.link-item .mono { white-space: normal; overflow-wrap: anywhere; flex: 1 1 200px; }
.link-form { display: flex; gap: 10px; width: 100%; max-width: 620px; }
.link-form input { flex: 1; }
.progress-bar { display: grid; gap: 6px; width: 100%; max-width: 420px; }

/* Admin : organisateurs, stockage */
.login__card .login__logo { width: 190px; }
.storage-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); margin-bottom: 14px; }
.meter__track--inline { display: block; width: 180px; height: 10px; }
.meter__track--inline .meter__fill { display: block; }
.meter__fill--warn { background: var(--red); }
.filters--1 { grid-template-columns: minmax(0, 420px); }
.org-act { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 8px; }
.org-act__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.secret-inline { background: var(--surface); padding: 2px 8px; border-radius: 6px; letter-spacing: .04em; }


/* =========================================================
   Organisateurs : profils publics (page d'accueil, aperçu, admin)
   ========================================================= */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--orange-soft); color: var(--orange-ink); font-weight: 700; line-height: 1; letter-spacing: .02em; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--sm { width: 34px; height: 34px; font-size: .78rem; }
.avatar--card { width: 104px; height: 104px; font-size: 2rem; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--orange); margin-bottom: 10px; }
.avatar--xl { width: 120px; height: 120px; font-size: 2.3rem; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--orange); }
.avatar-slot { display: inline-flex; flex: none; padding: 6px; }

.section--orgs { background: var(--surface); border-block: 1px solid var(--line); }
.orgs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.orgs-head > div { flex: 1 1 420px; }
.orgs-filter { display: flex; gap: 10px; flex: 0 1 520px; }
.orgs-filter input { flex: 1.4; min-width: 0; }
.orgs-filter select { flex: 1; min-width: 0; }
.orgs-count { margin: 26px 0 14px; font-size: .85rem; font-weight: 600; color: var(--muted); min-height: 1.4em; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.org-grid__empty { grid-column: 1 / -1; background: var(--bg); border-radius: var(--radius); padding: 36px 20px; }

.org-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px 20px;
  font: inherit; color: inherit; cursor: default; transition: border-color .18s, box-shadow .18s, transform .18s;
}
button.org-card { cursor: pointer; }
button.org-card:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-2px); }
button.org-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.org-card__name { font-size: 1.06rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.org-card__role { font-size: .84rem; font-weight: 600; color: var(--orange-ink); overflow-wrap: anywhere; }
.org-card__org { font-size: .88rem; font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; }
.org-card__bio { margin-top: 6px; font-size: .84rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.org-card__meta { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: .76rem; }
.org-card__meta span { background: var(--bg); color: var(--ink-2); padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.org-card__meta .org-card__count { background: var(--charcoal); color: #fff; }
.org-card__cta { margin-top: auto; padding-top: 14px; font-size: .85rem; font-weight: 700; color: var(--ink); }
.org-card__cta::after { content: " →"; color: var(--orange-ink); }
[dir="rtl"] .org-card__cta::after { content: " ←"; }
.orgs-more { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
@media (max-width: 640px) {
  .orgs-filter { flex-direction: column; flex-basis: 100%; }
  .org-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
}

/* Fiche détaillée */
.org-dlg { width: min(760px, calc(100vw - 32px)); }
.org-dlg .dlg__head .kicker { margin: 0; }
.org-hero { display: flex; align-items: center; gap: 24px; padding: 8px 6px 4px; }
.org-hero__txt { display: grid; gap: 4px; min-width: 0; }
.org-hero__txt h2 { overflow-wrap: anywhere; }
.org-hero__role { color: var(--orange-ink); font-weight: 600; }
.org-hero__org { color: var(--ink-2); font-weight: 500; }
.org-bio { margin: 20px 0 24px; padding: 16px 18px; background: var(--bg); border-radius: var(--radius-sm); white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; }
.org-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.org-act-item { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.org-act-item__body { display: grid; gap: 4px; min-width: 0; }
.org-act-item__body h4 { font-size: 1rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.org-act-item__body p { font-size: .87rem; overflow-wrap: anywhere; }
.org-act-item__body .btn--link { justify-self: start; padding-inline: 0; }
.org-act-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem !important; color: var(--muted); }
.tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-ink); background: var(--orange-soft); padding: 3px 10px; border-radius: 999px; }
@media (max-width: 560px) { .org-hero { flex-direction: column; text-align: center; } .org-act-item { grid-template-columns: 1fr; } .org-act-item .act-card__date { justify-self: start; padding: 6px 12px; } }

/* « Organisé par » sur les dernières activités */
.recent__by { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 12px 0 0; border: 0; border-top: 1px dashed var(--line-2); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; width: 100%; }
.recent__by span:last-child { display: grid; min-width: 0; line-height: 1.3; }
.recent__by small { font-size: .72rem; color: var(--muted); }
.recent__by strong { font-size: .86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent__by:hover strong { color: var(--orange-ink); text-decoration: underline; }
.recent__by:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Espace organisateurs : profil public */
.pub-form { display: grid; gap: 6px; }
.pub-form__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
.pub-preview { position: sticky; top: 16px; background: var(--bg); border-radius: var(--radius); padding: 18px 20px 22px; }
.pub-preview .org-card { box-shadow: var(--shadow); }
.avatar-edit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar-edit__side { display: grid; gap: 8px; flex: 1 1 220px; }
.avatar-edit__btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nudge { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--orange-soft); border: 1px solid #FFD3AE; border-radius: var(--radius); padding: 12px 16px; }
.nudge p { flex: 1 1 260px; font-size: .92rem; font-weight: 500; color: #6B2E04; }
.nudge__icon { background: var(--orange); color: var(--ink); font-size: 1.2rem; }
@media (max-width: 860px) { .pub-form__grid { grid-template-columns: 1fr; } .pub-preview { position: static; } }

/* Administration : profil public */
.admin-pub { display: flex; gap: 22px; align-items: flex-start; margin: 6px 0 14px; padding-inline-start: 6px; }
.admin-pub .avatar { margin-top: 6px; }
.admin-pub .dl { flex: 1; grid-template-columns: 140px 1fr; }
@media (max-width: 560px) { .admin-pub { flex-direction: column; } }

/* =========================================================
   Responsive : finitions tablette et mobile
   ========================================================= */
.tag { font-size: .74rem; }
.pager { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; text-align: center; }
.pager > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint { flex-wrap: wrap; }
.hint > span:first-child { flex: 1 1 200px; }
.hint .count { margin-inline-start: auto; white-space: nowrap; }
.btn--block, .btn--link { white-space: normal; text-align: center; }
.linkish { min-height: 32px; }
.media-grid--video { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.switch { min-height: 44px; }
.panel .pill--red { white-space: normal; max-width: 100%; }

/* Tablette : 2 colonnes pour les dernières activités */
@media (min-width: 600px) and (max-width: 900px) { .recent { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Grilles 1 colonne : jamais plus larges que l'écran */
@media (max-width: 900px) { .space-promo, .wilaya-layout, .auth__grid, .charts { grid-template-columns: minmax(0, 1fr); } }

/* Fenêtres : presque plein écran sur téléphone */
@media (max-width: 560px) {
  dialog, .org-dlg { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dlg__head { padding: 14px 16px; }
  .dlg__body { padding: 16px 16px 22px; }
  .dlg__head h2 { font-size: 1.15rem; }
}

/* Tableaux de l'admin : une fiche par ligne (2 fiches par rangée sur tablette) */
@media (max-width: 960px) {
  .table-wrap--cards { border: 0; border-radius: 0; overflow: visible; }
  .table-wrap--cards.table-wrap--short { max-height: 560px; overflow-y: auto; }
  .table-wrap--cards table, .table-wrap--cards tbody, .table-wrap--cards tr { display: block; width: 100%; }
  .table-wrap--cards thead { display: none; }
  .table-wrap--cards tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; margin-bottom: 10px; background: #fff; }
  .table-wrap--cards td { display: block; border: 0; padding: 6px 0; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap--cards td[data-label] { position: relative; padding-inline-start: 116px; min-height: 30px; }
  .table-wrap--cards td[data-label]::before { content: attr(data-label); position: absolute; inset-inline-start: 0; top: 8px; width: 104px; font-size: .7rem; font-weight: 700; line-height: 1.3; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .table-wrap--cards td .pill { margin: 2px 4px 2px 0; }
  .table-wrap--cards td[data-label] + td[data-label] { border-top: 1px dashed var(--line); }
  .table-wrap--cards td:not([data-label]):empty { display: none; }
  .table-wrap--cards td[colspan] { text-align: center; padding: 14px 0; }
  .filters, .filters--5 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 640px) and (max-width: 960px) {
  .table-wrap--cards tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .table-wrap--cards tr { margin-bottom: 0; }
  .table-wrap--cards tr:has(td[colspan]) { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager > span { grid-column: 1 / -1; order: -1; white-space: normal; }
  .pager .btn { width: 100%; }
}

/* Téléphone */
@media (max-width: 640px) {
  /* Organisateurs : cartes compactes (photo à côté du nom) */
  .org-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .org-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 16px; row-gap: 2px; align-items: center; text-align: start; padding: 16px; }
  .org-card > .avatar { grid-row: 1 / span 3; align-self: start; width: 72px; height: 72px; font-size: 1.4rem; margin: 2px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--orange); }
  .org-card > :not(.avatar) { grid-column: 2; }
  .org-card > .org-card__bio, .org-card > .org-card__meta, .org-card > .org-card__cta { grid-column: 1 / -1; }
  .org-card__bio { margin-top: 10px; -webkit-line-clamp: 2; }
  .org-card__meta { justify-content: flex-start; margin-top: 8px; }
  .org-card__cta { padding-top: 10px; }
  .pub-preview .org-card { max-width: 420px; }
  .orgs-more .btn { width: 100%; }

  /* Fiche organisateur */
  .org-hero { gap: 14px; padding: 4px 0 0; }
  .avatar--xl { width: 96px; height: 96px; font-size: 1.9rem; }
  .org-bio { margin: 16px 0 20px; padding: 14px; }
  .org-act-item { padding: 12px 14px; }

  /* Barres du haut (espace organisateurs et admin) */
  .admin-bar__inner { gap: 10px 14px; }
  .admin-bar img { height: 34px; }
  .admin-bar__title { font-size: .88rem; padding-inline-start: 12px; }
  .admin-bar__right { width: 100%; margin-inline-start: 0; justify-content: space-between; flex-wrap: nowrap; }
  .esp-bar__site { display: none; }

  /* Onglets de l'espace : toujours visibles, sans défilement */
  .esp-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; }
  .esp-tabs a { white-space: normal; text-align: center; padding: 12px 6px; font-size: .86rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; }

  /* Formulaires */
  .link-form { flex-direction: column; }
  .link-form .btn { width: 100%; }
  .nudge .btn { width: 100%; }
  .panel { padding: 18px 16px; }
  .space-card { padding: 20px 16px; }
  .space-card__logo { width: 170px; }
  .btn--lg { padding-inline: 20px; }
  .hashtags__track { white-space: normal; line-height: 1.7; padding-inline: 16px; }
}

@media (max-width: 380px) {
  .filters, .filters--5 { grid-template-columns: minmax(0, 1fr); }
  .esp-kpis .kpi { padding: 14px 14px; }
  .lang button { padding-inline: 9px; }
}

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