/* Vie Agréable : feuille de style unique (site public + espace connecté).
   Direction « Épuré » : blanc, gris très clair, noir encre, orange du logo en touche. Contrastes AA. */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-tight-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-tight-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #111418;
  --ink-2: #3d434b;
  --ink-3: #5d646d;
  --brand: #c2410c;        /* orange du logo, version lisible (5,2:1 sur blanc) */
  --brand-hover: #9a3412;
  --brand-bright: #ea580c; /* décoratif */
  --brand-on-dark: #fb923c;
  --bg: #ffffff;
  --bg-2: #f6f7f8;         /* gris très clair, neutre */
  --bg-3: #eceef1;
  --line: #e3e5e8;
  --dark: #111418;
  --ok: #15803d; --ok-bg: #ecfdf3;
  --warn: #a16207; --warn-bg: #f6f7f8;
  --err: #b91c1c; --err-bg: #fef2f2;
  --display: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 10px; --r-sm: 8px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 8vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 1.0625rem/1.65 var(--text); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.3rem); line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 3px; border-radius: 4px; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section.alt { background: var(--bg-2); }
.section.dark { background: var(--dark); color: #d7dade; }
.section.dark h2, .section.dark h3 { color: #fff; }
.eyebrow { display: block; font: 650 .78rem/1.3 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .9rem; }
.dark .eyebrow { color: var(--brand-on-dark); }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }
.dark .lead { color: #c2c6cc; }
.muted { color: var(--ink-3); }
.head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 52px); }
.head.center { margin-inline: auto; text-align: center; }
.head.split { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.head.split h2 { margin: 0; max-width: 680px; }

/* Boutons */
.btn { --b: var(--brand); --f: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .7em 1.25em;
  font: 600 .98rem/1.2 var(--text); color: var(--f); background: var(--b); border: 2px solid var(--b); border-radius: var(--r-sm); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { --b: var(--brand-hover); color: var(--f); }
.btn.ghost { --f: var(--ink); background: transparent; border-color: var(--ink); }
.btn.ghost:hover { --f: #fff; background: var(--ink); }
.btn.light { --b: #fff; --f: var(--ink); }
.btn.light:hover { --b: #e9ebee; }
.btn.dark-btn { --b: var(--ink); }
.btn.dark-btn:hover { --b: #2b3038; }
.btn.sm { min-height: 36px; padding: .45em .9em; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.link .icon { transition: transform .15s; }
.link:hover .icon { transform: translateX(3px); }

/* Grilles et cartes */
.grid { display: grid; gap: clamp(16px, 2.2vw, 24px); }
.g2 { grid-template-columns: 1fr; }
.g3 { grid-template-columns: 1fr; }
.g4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .g3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .g4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: clamp(20px, 3vw, 28px); }
.feature .icon { width: 44px; height: 44px; color: var(--brand); margin-bottom: 16px; }
.feature p { color: var(--ink-2); margin: 0; }
.feature { transition: border-color .15s; }
.feature:hover { border-color: var(--ink); }
.photo-card { overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.photo-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.photo-card .body { padding: 20px 22px 24px; }
.photo-card p { color: var(--ink-2); margin: 0; }
.tag { display: inline-block; font: 600 .74rem/1 var(--text); letter-spacing: .04em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }

/* En-tête et méga-menu */
.topbar { background: var(--dark); color: #c2c6cc; font-size: .84rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--brand-on-dark); }
.topbar .contacts { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar .contacts > span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 720px) { .topbar .hide-sm { display: none; } }
.header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.header .bar { display: flex; align-items: center; gap: 14px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.brand img { width: 44px; height: 44px; }
.brand b { font: 700 1.2rem/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.brand small { display: block; font: 600 .66rem/1.2 var(--text); letter-spacing: .12em; color: var(--brand); text-transform: uppercase; }
.nav { display: none; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav-top { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 8px; border: 0; background: none; font: 550 .98rem/1 var(--text); color: var(--ink); text-decoration: none; cursor: pointer; }
.nav-top:hover, .nav li.open > .nav-top { background: var(--bg-2); color: var(--ink); }
.nav-top[aria-current="page"] { color: var(--brand); }
.nav-top .icon { width: 14px; height: 14px; transition: transform .15s; }
.nav li.open > .nav-top .icon { transform: rotate(180deg); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgb(17 20 24 / 8%); display: none; }
.nav li.open > .mega { display: block; }
.mega .wrap { display: grid; grid-template-columns: 1fr 1fr 300px; gap: 32px; padding-block: 28px 32px; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.mega a.item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.mega a.item:hover { background: var(--bg-2); }
.mega a.item .icon { width: 28px; height: 28px; color: var(--brand); margin-top: 2px; }
.mega a.item b { display: block; font-weight: 600; }
.mega a.item .d { display: block; color: var(--ink-3); font-size: .9rem; line-height: 1.45; }
.mega .promo { border-radius: var(--r); overflow: hidden; background: var(--bg-2); text-decoration: none; color: var(--ink); display: block; }
.mega .promo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mega .promo div { padding: 14px 16px 16px; }
.mega .promo b { display: block; font-family: var(--display); font-size: 1.05rem; }
.mega .promo span { font-size: .9rem; color: var(--ink-3); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn .icon { width: 22px; height: 22px; }
.menu-btn .i-close, body.menu-open .menu-btn .i-open { display: none; }
body.menu-open .menu-btn .i-close { display: block; }
.btn-don .lbl-sm { display: none; }
@media (max-width: 420px) { .btn-don .lbl { display: none; } .btn-don .lbl-sm { display: inline; } .brand small { display: none; } }
@media (min-width: 1020px) {
  .nav { display: block; }
  .menu-btn { display: none; }
  .header { position: sticky; }
  .header .bar { position: static; }
}
/* Menu mobile : panneau plein écran sous l'en-tête */
@media (max-width: 1019.98px) {
  .nav { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100dvh - 72px); overflow: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; }
  body.menu-open .nav { display: block; }
  .nav > ul { flex-direction: column; }
  .nav-top { width: 100%; justify-content: space-between; padding: 14px 8px; font-size: 1.08rem; }
  .mega { position: static; box-shadow: none; border: 0; }
  .mega .wrap { width: 100%; grid-template-columns: 1fr; gap: 0; padding: 0 0 8px; }
  .mega .promo { display: none; }
  .mega a.item { grid-template-columns: 32px 1fr; padding: 10px 8px; }
  .mega a.item .d { display: none; }
  .nav .mobile-extra { display: grid; gap: 10px; margin-top: 16px; }
}
@media (min-width: 1020px) { .nav .mobile-extra { display: none; } }

/* Héros */
.hero { padding-block: clamp(36px, 6vw, 88px) clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.hero .lead { margin-bottom: 1.6em; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; color: var(--ink-2); font-size: .97rem; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks .icon { color: var(--brand); width: 20px; height: 20px; }
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, minmax(38px, 1fr)); gap: 12px; aspect-ratio: 1 / .9; }
.mosaic figure { margin: 0; border-radius: var(--r); overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .m1 { grid-column: 1 / 5; grid-row: 1 / 5; }
.mosaic .m2 { grid-column: 4 / 7; grid-row: 3 / 7; border: 6px solid #fff; }
.mosaic .m3 { grid-column: 1 / 4; grid-row: 5 / 7; }
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line); padding-block: clamp(36px, 6vw, 80px); }
.page-hero .ph { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .page-hero .ph.with-photo { grid-template-columns: 1.1fr .9fr; } }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 20ch; }
.page-hero .lead { margin: 0; }
.page-hero figure { margin: 0; }
.page-hero figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }

/* Chiffres */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; background: rgb(255 255 255 / 12%); border-radius: var(--r); overflow: hidden; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: var(--dark); padding: 28px 16px; text-align: center; display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font: 700 clamp(2.1rem, 4vw, 3.1rem)/1 var(--display); color: var(--brand-on-dark); white-space: nowrap; }
.stats dt { margin-top: 10px; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: #c2c6cc; }
.stats-note { text-align: center; margin: 18px 0 0; font-size: .85rem; color: #9aa1a9; }

/* Mission / valeurs / équipe */
.split2 { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .split2 { grid-template-columns: 1fr 1.1fr; } .split2.rev > :first-child { order: 2; } }
.split2 figure { margin: 0; }
.split2 figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
figcaption { font-size: .85rem; color: var(--ink-3); margin-top: 8px; }
.values { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 14px 26px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .values { grid-template-columns: 1fr 1fr; } }
.values li { padding-inline-start: 14px; border-inline-start: 3px solid var(--brand); display: grid; gap: 2px; }
.values b { font-family: var(--display); font-size: 1.05rem; }
.values span { color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.team { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px 18px; grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 1000px) { .team { grid-template-columns: repeat(4, 1fr); } }
.team img { width: 148px; height: 148px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 auto 14px; }
@media (max-width: 420px) { .team img { width: 116px; height: 116px; } }
.team b { display: block; font: 700 1.02rem/1.3 var(--display); }
.team span { color: var(--ink-3); font-size: .92rem; }
.team-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .team-cards { grid-template-columns: 1fr 1fr; } }
.team-cards li { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: start; }
.team-cards img { width: 112px; height: 112px; border-radius: var(--r); object-fit: cover; object-position: top; }
.team-cards .role { color: var(--brand); font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.team-cards p:last-child { margin: 0; color: var(--ink-2); font-size: .97rem; }
@media (max-width: 480px) { .team-cards li { grid-template-columns: 1fr; } }

/* Bloc « Agir » */
.cta-box { display: grid; gap: clamp(24px, 4vw, 52px); padding: clamp(26px, 5vw, 60px); border-radius: calc(var(--r) + 6px); background: var(--dark); color: #d7dade; }
@media (min-width: 960px) { .cta-box { grid-template-columns: 1fr 1.15fr; align-items: center; } }
.cta-box h2 { color: #fff; }
.cta-box .eyebrow { color: var(--brand-on-dark); }
.cta-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cta-list a { display: grid; grid-template-columns: 30px 1fr 20px; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-sm); background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 12%); color: #d7dade; text-decoration: none; }
.cta-list a:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.cta-list .icon { width: 28px; height: 28px; color: var(--brand-on-dark); }
.cta-list span { display: grid; gap: 2px; font-size: .95rem; line-height: 1.45; }
.cta-list b { color: #fff; font-size: 1.05rem; }

/* FAQ */
details.qa { border: 1px solid var(--line); border-radius: var(--r); padding: 2px 20px; background: #fff; }
details.qa + details.qa { margin-top: 10px; }
details.qa summary { cursor: pointer; font-weight: 650; padding-block: 16px; padding-inline: 0 28px; list-style: none; position: relative; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); font: 400 1.5rem/1 var(--text); color: var(--brand); }
details.qa[open] summary::after { content: '–'; }
details.qa p { color: var(--ink-2); }

/* Galerie */
.gallery { list-style: none; padding: 0; margin: 0; columns: 3 280px; column-gap: 16px; }
.gallery li { break-inside: avoid; margin-bottom: 16px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.gallery figcaption { padding: 10px 14px 12px; margin: 0; }

/* Programmes (Nos actions) */
.prog { display: grid; gap: clamp(22px, 4vw, 60px); align-items: center; scroll-margin-top: 100px; }
.prog + .prog { margin-top: clamp(56px, 8vw, 96px); }
@media (min-width: 900px) { .prog { grid-template-columns: 1fr 1fr; } .prog.rev figure { order: 2; } }
.prog figure { margin: 0; }
.prog img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.prog .icon.big { width: 44px; height: 44px; color: var(--brand); margin-bottom: 12px; }
.prog p { color: var(--ink-2); }
.points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.points li { display: flex; gap: 10px; align-items: flex-start; }
.points .icon { color: var(--brand); width: 20px; height: 20px; margin-top: 3px; }
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 550; font-size: .94rem; }
.chips a:hover, .chips a[aria-current] { border-color: var(--ink); }

/* Blog */
.posts { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--ink-3); margin-top: 12px; }
.article { max-width: 760px; margin-inline: auto; }
.article .cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); margin: 24px 0 32px; }
.prose { font-size: 1.08rem; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding-block: 4px; padding-inline: 18px 0; border-inline-start: 3px solid var(--brand); color: var(--ink-2); }
.prose img { border-radius: var(--r); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: start; }

/* Rapports */
.reports { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.reports li { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; align-items: center; }
.reports .year { font: 700 1.6rem/1 var(--display); color: var(--brand); }
.reports h3 { margin: 0 0 4px; }
.reports p { margin: 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 640px) { .reports li { grid-template-columns: 1fr; gap: 8px; } }

/* Formulaires */
.form { display: grid; gap: 16px; }
.row2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: .94rem; }
.hint { font-size: .84rem; color: var(--ink-3); font-weight: 400; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: .65em .85em; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid #c9cdd2; border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.textarea.tall { min-height: 320px; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .92rem; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(234 88 12 / 18%); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--err); font-size: .88rem; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-weight: 500; border: 1px solid; }
.alert.ok { background: var(--ok-bg); color: #14532d; border-color: #bbf7d0; }
.alert.err { background: var(--err-bg); color: #7f1d1d; border-color: #fecaca; }
.alert.info { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.dictate { display: inline-flex; align-items: center; gap: 6px; }
.dictate.rec { --b: var(--err); }

/* Recherche */
.search-box { display: flex; gap: 10px; }
.search-box .input { flex: 1; }
.results { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.results a { display: block; text-decoration: none; color: inherit; }
.results b { color: var(--ink); display: block; }
.results span { font-size: .92rem; color: var(--ink-2); }
mark { background: #ffedd5; color: inherit; padding: 0 2px; border-radius: 3px; }

/* Pied de page */
.footer { background: var(--dark); color: #b9bec5; padding-top: clamp(48px, 7vw, 76px); font-size: .96rem; }
.footer a { color: #fff; text-decoration-color: rgb(255 255 255 / 35%); }
.footer a:hover { color: var(--brand-on-dark); }
.footer .cols { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 40px; }
@media (min-width: 640px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer .cols { grid-template-columns: 1.4fr .8fr .8fr 1.2fr; } }
.footer .f-brand { font: 700 1.3rem/1.2 var(--display); color: #fff; margin-bottom: .6em; }
.footer .reg { color: #9aa1a9; font-size: .88rem; }
.footer .f-title { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-on-dark); margin-bottom: 1em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer .contact li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.footer .contact .icon { color: var(--brand-on-dark); width: 20px; height: 20px; margin-top: 3px; }
.footer .newsletter { display: flex; gap: 8px; margin-top: 12px; }
.footer .newsletter .input { background: #1c2026; border-color: #3a4049; color: #fff; min-height: 42px; }
.footer .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid rgb(255 255 255 / 10%); padding-block: 20px; font-size: .86rem; }
.footer .legal p { margin: 0; }
.footer .legal ul { display: flex; flex-wrap: wrap; gap: 18px; }
/* Place pour le bouton « Une question ? » (en bas à droite ; à gauche en arabe) */
@media (min-width: 640px) { .footer .legal { padding-inline-end: 200px; } }
/* Bas de page sur téléphone : deux colonnes de liens côte à côte, espacements resserrés,
   et une marge en bas pour que le bouton « Une question ? » ne cache pas les derniers liens. */
@media (max-width: 639px) {
    .footer { padding-top: 36px; font-size: .92rem; }
    .footer .cols { grid-template-columns: 1fr 1fr; gap: 26px 18px; padding-bottom: 26px; }
    .footer .cols > div:first-child, .footer .cols > div:last-child { grid-column: 1 / -1; }
    .footer .f-brand { font-size: 1.15rem; margin-bottom: .4em; }
    .footer .cols > div:first-child p { margin: 0 0 .5em; }
    .footer .reg { font-size: .8rem; }
    .footer .f-title { margin-bottom: .5em; }
    .footer ul { gap: 0; }
    .footer .cols ul:not(.contact) a { display: inline-block; padding-block: 6px; }
    .footer .contact { gap: 10px; }
    .footer .legal { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-block: 16px 88px; font-size: .82rem; }
    .footer .legal ul { justify-content: center; gap: 6px 16px; }
}

/* Chat */
.chat-launch { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 80; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: 600 .95rem/1 var(--text); cursor: pointer; box-shadow: 0 8px 24px rgb(17 20 24 / 25%); }
.chat-launch .icon { width: 22px; height: 22px; color: var(--brand-on-dark); }
.chat-launch:hover { background: #2b3038; }
.chat { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 90; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 36px)); display: none; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgb(17 20 24 / 25%); overflow: hidden; }
body.chat-open .chat { display: flex; }
body.chat-open .chat-launch { display: none; }
.chat header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--ink); color: #fff; }
.chat header img { width: 32px; height: 32px; border-radius: 8px; background: #fff; }
.chat header b { display: block; font-size: .98rem; }
.chat header span { font-size: .8rem; color: #b9bec5; }
.chat header button { margin-inline-start: auto; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }
.chat .log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); }
.chat .msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: .94rem; line-height: 1.5; white-space: pre-wrap; }
.chat .msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-end-start-radius: 4px; }
.chat .msg.me { background: var(--ink); color: #fff; align-self: flex-end; border-end-end-radius: 4px; }
.chat .msg.typing { color: var(--ink-3); font-style: italic; }
.chat .quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chat .quick button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px; font: 500 .84rem/1.2 var(--text); cursor: pointer; color: var(--ink); }
.chat .quick button:hover { border-color: var(--ink); }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat form .input { min-height: 42px; }
.chat .note { font-size: .74rem; color: var(--ink-3); padding: 0 14px 10px; }

/* ===================== ESPACE CONNECTÉ ===================== */
.espace { background: var(--bg-2); min-height: 100dvh; }
.esp { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
@media (min-width: 1000px) { .esp { grid-template-columns: 260px minmax(0, 1fr); } }
.side { background: var(--dark); color: #b9bec5; padding: 18px 14px; display: none; }
@media (min-width: 1000px) { .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto; } }
body.side-open .side { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 100; overflow-y: auto; }
.side .brand { color: #fff; margin: 4px 6px 22px; }
.side .brand b { color: #fff; }
.side nav { display: grid; gap: 2px; }
.side .grp { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7b828c; margin: 18px 10px 6px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #d7dade; text-decoration: none; font-size: .95rem; }
.side a:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.side a[aria-current="page"] { background: rgb(255 255 255 / 10%); color: #fff; box-shadow: inset 3px 0 0 var(--brand-bright); }
.side a .icon { width: 20px; height: 20px; color: #9aa1a9; }
.side a[aria-current="page"] .icon { color: var(--brand-on-dark); }
.side .count { margin-inline-start: auto; background: var(--brand-bright); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.side .me { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgb(255 255 255 / 10%); display: flex; align-items: center; gap: 10px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 .8rem/1 var(--text); flex: none; }
.side .me b { color: #fff; font-size: .9rem; display: block; }
.side .me span { font-size: .78rem; }
.main { min-width: 0; }
.esp-top { display: flex; align-items: center; gap: 12px; padding: 14px clamp(16px, 3vw, 32px); background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.esp-top h1 { font-size: 1.35rem; margin: 0; }
.esp-top .grow { flex: 1; }
@media (min-width: 1000px) { .esp-top .side-btn { display: none; } }
.esp-body { padding: clamp(16px, 3vw, 32px); display: grid; gap: 22px; align-content: start; }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 18px; }
.kpi .icon { width: 30px; height: 30px; color: var(--brand); }
.kpi b { display: block; font: 700 1.9rem/1.1 var(--display); margin-top: 10px; }
.kpi span { color: var(--ink-3); font-size: .88rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel > header h2 { font-size: 1.08rem; margin: 0; }
.panel > .in { padding: 20px; }
.cols2 { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .cols2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.t th { text-align: start; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t a { font-weight: 600; text-decoration: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--bg-3); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: #166534; }
.badge.brand { background: #ffedd5; color: #9a3412; }
.badge.err { background: var(--err-bg); color: #991b1b; }
.badge.dark { background: var(--ink); color: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .icon { color: var(--brand); width: 22px; height: 22px; margin-top: 2px; }
.empty { padding: 28px 20px; text-align: center; color: var(--ink-3); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .input, .toolbar .select { min-height: 40px; width: auto; }
.ai-box { border: 1px dashed #c9cdd2; border-radius: var(--r); padding: 16px; background: var(--bg-2); }
.ai-box h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 6px; }
.ai-box h3 .icon { color: var(--brand); }
.pipeline { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pipeline { grid-template-columns: repeat(4, 1fr); } }
.pipeline .colk { background: var(--bg-3); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; align-content: start; }
.pipeline .colk h3 { font-size: .9rem; margin: 2px 4px; display: flex; justify-content: space-between; }
.pipeline .op { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; text-decoration: none; color: inherit; display: block; }
.pipeline .op:hover { border-color: var(--ink); }
.pipeline .op b { display: block; font-size: .95rem; }
.pipeline .op span { font-size: .82rem; color: var(--ink-3); }
.progress { height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand-bright); }
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg-2); }
.auth .card { width: min(440px, 100%); padding: clamp(24px, 5vw, 40px); }
.auth .brand { margin: 0 0 24px; }
.backdrop { display: none; }
body.side-open .backdrop { display: block; position: fixed; inset: 0; background: rgb(17 20 24 / 45%); z-index: 99; }
.preview-line { display: flex; flex-wrap: wrap; gap: 8px; }

a.feature, a.card { text-decoration: none; color: inherit; display: block; }
.mt-l { margin-top: 48px; }
.center { text-align: center; }
.center .btns { justify-content: center; }
.mt-s { margin-top: 10px; }
.h-auth { font-size: 1.5rem; }
.big-n { font: 700 2rem/1 var(--display); }
.pre { white-space: pre-wrap; }
.progress .w-0 { width: 2%; } .progress .w-25 { width: 25%; } .progress .w-50 { width: 50%; } .progress .w-75 { width: 75%; } .progress .w-100 { width: 100%; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { display: grid; gap: 4px; width: 120px; font-size: .8rem; }
.thumb img { width: 120px; height: 84px; object-fit: cover; border-radius: 6px; }
.steps { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; color: var(--ink-2); font-size: .95rem; }
.panel > .hint.in { padding: 12px 20px 0; margin: 0; }
details > summary.link { cursor: pointer; list-style: none; color: var(--brand); }
@media (min-width: 1020px) and (max-width: 1180px) { .nav-top { padding: 10px 9px; font-size: .94rem; } .brand small { display: none; } .header-actions .btn-don .lbl { display: none; } .header-actions .btn-don .lbl-sm { display: inline; } }
.esp-body > * { min-width: 0; }
.list li > .grow { overflow-wrap: anywhere; }
.toolbar .select { max-width: 100%; }
@media (max-width: 640px) { table.t td form.toolbar { flex-direction: column; align-items: stretch; } }
@media (max-width: 520px) { .header .search-btn { display: none; } .brand b { font-size: 1.08rem; } .header .bar { gap: 8px; } }
.btn.block { white-space: normal; text-align: center; }
.esp-top h1 { min-width: 0; flex: 1 1 auto; }
.esp-top .grow { display: none; }
@media (max-width: 640px) { .esp-top { flex-wrap: wrap; } .esp-top h1 { font-size: 1.1rem; flex-basis: calc(100% - 120px); } .esp-top .btn.sm { order: 5; } }

/* ---------- Langues ---------- */
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/noto-sans-arabic-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
.topbar .langs { display: flex; align-items: center; gap: 2px; }
.topbar .langs .icon { width: 16px; height: 16px; margin-inline-end: 4px; color: #9aa1a9; }
.topbar .langs a { padding: 3px 7px; border-radius: 6px; font-weight: 650; font-size: .78rem; color: #c2c6cc; letter-spacing: .02em; }
.topbar .langs a:hover { color: #fff; background: rgb(255 255 255 / 10%); }
.topbar .langs a[aria-current] { background: #fff; color: var(--ink); }
.topbar .contacts { gap: 16px; }
@media (max-width: 900px) { .topbar .contacts > .hide-md { display: none; } }
@media (max-width: 720px) { .topbar .contacts > .hide-sm { display: none; } }
@media (max-width: 380px) { .topbar .langs .icon { display: none; } .topbar .langs a { padding: 3px 5px; } }

/* Arabe : police dédiée, lecture de droite à gauche */
html[lang="ar"] { --display: 'Noto Sans Arabic', 'Inter Tight', system-ui, sans-serif; --text: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .eyebrow, html[lang="ar"] .tag, html[lang="ar"] .stats dt, html[lang="ar"] .footer .f-title { letter-spacing: 0; text-transform: none; }
html[lang="ar"] body { line-height: 1.8; }
[dir="rtl"] .i-arrow-right, [dir="rtl"] .i-caret-right, [dir="rtl"] .i-paper-plane-tilt, [dir="rtl"] .i-sign-in { transform: scaleX(-1); }
[dir="rtl"] .link:hover .i-arrow-right { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .mosaic .m2 { border-color: #fff; }
[dir="rtl"] .hp { left: auto; right: -9999px; }
[dir="rtl"] .arr { display: inline-block; transform: scaleX(-1); }

/* ===================== MENU DE L'ESPACE (v2) =====================
   Liens directs + groupes repliables (accordéon exclusif), mode compact sur ordinateur,
   tiroir animé sur mobile et tablette. */
:root { interpolate-size: allow-keywords; }
.side { --side-w: 248px; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; background: var(--dark); color: #b9bec5; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a4049 transparent; }
.side .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-head { display: flex; align-items: center; gap: 6px; padding: 2px 4px 12px; border-bottom: 1px solid rgb(255 255 255 / 8%); margin-bottom: 6px; }
.side-head .brand { margin: 0 auto 0 0; gap: 10px; min-width: 0; }
.side-head .brand img { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.side-head .brand b { color: #fff; font-size: 1.02rem; }
.side-tool { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #9aa1a9; cursor: pointer; flex: none; transition: background-color .15s, color .15s; }
.side-tool:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.side-tool .icon { width: 18px; height: 18px; }
.compact-btn .icon { transform: rotate(90deg); transition: transform .2s; }

.side-nav { display: grid; gap: 2px; align-content: start; }
.side-nav a, .side .grp > summary, .me-menu a, .me-menu button {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 10px; border-radius: 9px;
  color: #c9cdd2; text-decoration: none; font: 500 .94rem/1.2 var(--text); cursor: pointer; border: 0; background: none; width: 100%; text-align: start;
  transition: background-color .15s, color .15s; }
.side-nav a:hover, .side .grp > summary:hover, .me-menu a:hover, .me-menu button:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.side .icon { width: 20px; height: 20px; color: #8b929b; flex: none; transition: color .15s; }
.side a:hover .icon, .side summary:hover .icon { color: #d7dade; }
.side a[aria-current="page"] { background: rgb(234 88 12 / 16%); color: #fff; box-shadow: none; }
.side a[aria-current="page"] .icon { color: var(--brand-on-dark); }
.side .count { margin-inline-start: auto; min-width: 20px; text-align: center; background: var(--brand-bright); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 6px; border-radius: 999px; }

/* Groupes repliables */
.side .grp { border-radius: 10px; }
.side .grp > summary { list-style: none; }
.side .grp > summary::-webkit-details-marker { display: none; }
.side .grp > summary.has-current { color: #fff; }
.side .grp > summary .caret { width: 14px; height: 14px; margin-inline-start: auto; transition: transform .2s; }
.side .grp > summary .count.sum + .caret { margin-inline-start: 6px; }
.side .grp[open] > summary .caret { transform: rotate(180deg); }
.side .grp[open] > summary .count.sum { display: none; }
.side .grp[open] > summary .count.sum + .caret { margin-inline-start: auto; }
.side .grp::details-content { block-size: 0; overflow: hidden; transition: block-size .22s ease, content-visibility .22s allow-discrete; }
.side .grp[open]::details-content { block-size: auto; }
.grp-items { display: grid; gap: 1px; padding: 2px 0 6px; margin-inline-start: 19px; padding-inline-start: 10px; border-inline-start: 1px solid rgb(255 255 255 / 10%); }
.grp-items a { min-height: 36px; font-size: .9rem; }
.grp-items a .icon { width: 18px; height: 18px; }

/* Carte utilisateur avec petit menu */
.side .me { margin-top: auto; padding: 8px 0 0; border-top: 1px solid rgb(255 255 255 / 8%); display: block; }
.side .me > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.side .me > summary::-webkit-details-marker { display: none; }
.side .me > summary:hover { background: rgb(255 255 255 / 7%); }
.side .me .who { display: grid; gap: 1px; min-width: 0; }
.side .me .who b { color: #fff; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
.side .me .who small { font-size: .76rem; color: #9aa1a9; }
.side .me .caret { width: 14px; height: 14px; margin-inline-start: auto; transform: rotate(180deg); transition: transform .2s; }
.side .me[open] .caret { transform: none; }
.side .me::details-content { block-size: 0; overflow: hidden; transition: block-size .2s ease, content-visibility .2s allow-discrete; }
.side .me[open]::details-content { block-size: auto; }
.me-menu { display: grid; gap: 1px; padding: 4px 0 2px; }
.me-menu form { margin: 0; }

/* Mobile et tablette : tiroir qui glisse */
@media (max-width: 999.98px) {
  .side { display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 100; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 0 0 40px rgb(0 0 0 / 35%); }
  [dir="rtl"] .side { inset: 0 0 0 auto; transform: translateX(105%); }
  body.side-open .side { transform: none; }
  .backdrop { display: block; position: fixed; inset: 0; background: rgb(17 20 24 / 45%); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.side-open .backdrop { opacity: 1; pointer-events: auto; }
  .compact-btn { display: none; }
}
@media (min-width: 1000px) {
  .side { position: sticky; top: 0; height: 100dvh; transform: none; }
  .close-btn { display: none; }
  .esp { grid-template-columns: var(--side-w, 248px) minmax(0, 1fr); transition: grid-template-columns .22s ease; }
  /* Mode compact : uniquement les icônes */
  body.side-compact .esp { grid-template-columns: 72px minmax(0, 1fr); }
  body.side-compact .side { padding-inline: 10px; }
  body.side-compact .side .lbl, body.side-compact .side .caret, body.side-compact .side .count:not(.sum) { display: none; }
  body.side-compact .side-head { flex-direction: column; gap: 10px; }
  body.side-compact .side-head .brand { margin: 0; }
  body.side-compact .compact-btn .icon { transform: rotate(-90deg); }
  body.side-compact .side-nav a, body.side-compact .side .grp > summary, body.side-compact .me-menu a, body.side-compact .me-menu button { justify-content: center; padding-inline: 0; position: relative; }
  body.side-compact .grp-items { margin: 0; padding: 2px 0 6px; border: 0; }
  body.side-compact .side .count.sum { position: absolute; top: 2px; inset-inline-end: 2px; font-size: .62rem; padding: 1px 5px; min-width: 0; }
  body.side-compact .side .me > summary { justify-content: center; }
}
/* Neutralise l'ancien style « .grp » (intertitres en capitales) pour les groupes repliables */
.side details.grp { margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
.side details.grp > summary .lbl { font-weight: 550; }

/* ===================== STATISTIQUES ===================== */
.stats-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stats-filters .select { width: auto; min-height: 38px; padding-block: .35em; font-size: .92rem; }
.seg { display: inline-flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 7px; font-size: .9rem; font-weight: 550; color: var(--ink-2); text-decoration: none; }
.seg a:hover { background: var(--bg-2); color: var(--ink); }
.seg a[aria-current] { background: var(--ink); color: #fff; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { padding: 10px 14px; white-space: nowrap; font-weight: 600; font-size: .94rem; color: var(--ink-3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
.kpis-8 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .kpis-8 { grid-template-columns: repeat(4, 1fr); } }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.delta { font-size: .76rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.delta.up { background: var(--ok-bg); color: #166534; }
.delta.down { background: var(--err-bg); color: #991b1b; }
.chart { width: 100%; height: 220px; display: block; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-3); }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-inline-start: 8px; }
.legend .lg-cur { background: var(--brand); }
.legend .lg-prev { background: repeating-linear-gradient(90deg, #9aa1a9 0 4px, transparent 4px 7px); }
.bars, .funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-row { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; margin-bottom: 4px; }
.bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-val { font-weight: 650; white-space: nowrap; }
.bar-val small { font-weight: 500; color: var(--ink-3); margin-inline-start: 8px; }
.bars progress, .funnel progress { display: block; width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bars progress::-webkit-progress-bar, .funnel progress::-webkit-progress-bar { background: var(--bg-3); border-radius: 999px; }
.bars progress::-webkit-progress-value, .funnel progress::-webkit-progress-value { background: var(--brand-bright); border-radius: 999px; }
.bars progress::-moz-progress-bar, .funnel progress::-moz-progress-bar { background: var(--brand-bright); border-radius: 999px; }
.funnel progress { height: 14px; }
.heat-wrap { overflow-x: auto; }
.heat { width: 100%; min-width: 620px; height: auto; display: block; }
code { font-size: .85em; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.spark { width: 100%; height: 56px; display: block; }
.esp-body .grid > *, .esp-body .cols2 > * { min-width: 0; }
.grid.g2, .grid.g3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bars li, .funnel li { min-width: 0; }
.bar-row { min-width: 0; }
.bar-label { flex: 1 1 auto; min-width: 0; }
.kpi b { overflow-wrap: anywhere; }

/* ===================== PILOTAGE, FINANCES, BÉNÉVOLAT ===================== */
.row3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.proj-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .86rem; color: var(--ink-3); margin: 4px 0 6px; }
progress.prog-bar { display: block; width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
progress.prog-bar::-webkit-progress-bar { background: var(--bg-3); border-radius: 999px; }
progress.prog-bar::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
progress.prog-bar::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
progress.prog-bar.over::-webkit-progress-value { background: var(--err); }
progress.prog-bar.over::-moz-progress-bar { background: var(--err); }
td progress.prog-bar { display: inline-block; width: 90px; vertical-align: middle; margin-inline-end: 6px; }
.esp-body .crumbs { margin: 0; }
.add-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 16px 20px; font-weight: 650; color: var(--brand); }
.add-panel > summary::-webkit-details-marker { display: none; }
.icon-btn.sm-icon { width: 34px; height: 34px; }
.icon-btn.sm-icon .icon { width: 18px; height: 18px; }
.num-in { min-width: 80px; }
table.t .input { min-height: 38px; padding: .4em .6em; font-size: .9rem; }
.file-tile { display: grid; place-items: center; gap: 4px; width: 120px; height: 84px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink-2); font-size: .74rem; text-align: center; padding: 6px; }
.file-tile .icon { width: 26px; height: 26px; color: var(--brand); }
.link-btn { border: 0; background: none; color: var(--err); cursor: pointer; font: inherit; font-size: .8rem; padding: 0; }
.neg { color: var(--err); }
.pos { color: var(--ok); }
.nowrap { flex-wrap: nowrap; }
.nowrap .select { width: auto; flex: none; }
.legend .lg-in { background: #15803d; }
.badge-big { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #ffedd5; color: #9a3412; font-weight: 700; }
.badge-big .icon { color: var(--brand); }
.board li { align-items: center; }
.board .rank { width: 26px; text-align: center; font: 700 1rem/1 var(--display); color: var(--ink-3); }
.board li:nth-child(1) .rank { color: #b45309; }
.board li.is-me { background: #fff7ed; }
.steps-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .steps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step .in.grid { gap: 12px; }
.reports .year small { display: block; font: 600 .72rem/1.3 var(--text); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.plan-card h3 { margin-bottom: 8px; }
.plan-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.plan-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .95rem; }
.plan-list .icon { color: var(--brand); width: 20px; height: 20px; margin-top: 2px; }

/* ---------- Sécurité ---------- */
.alert.warn { background: #fff; color: var(--ink); border-color: var(--line); border-inline-start: 4px solid var(--brand); display: flex; gap: 10px; align-items: flex-start; }
.alert.warn .icon { color: var(--brand); width: 20px; height: 20px; flex: none; margin-top: 2px; }
.badge.warn { background: var(--bg-3); color: #9a3412; }
.btn.xs { min-height: 30px; padding: .3em .7em; font-size: .8rem; }
.btn.is-done { border-color: var(--ok); color: var(--ok); }
.link.xs, .link-btn.xs { font-size: .8rem; }
.link-btn.danger { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }
.link-btn.danger .icon { width: 16px; height: 16px; }
form.inline { display: inline; }
.auth.wide .card { width: min(760px, 100%); }
.auth .alert { margin: 0 0 16px; }
.auth h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.auth .h-auth { display: flex; align-items: center; gap: 10px; }
.auth .h-auth .icon { width: 28px; height: 28px; color: var(--brand); flex: none; }
.auth .hint .icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--ok); }
.code-input { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.steps, .steps-mini { counter-reset: st; list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 12px; }
.steps li, .steps-mini li { counter-increment: st; position: relative; padding-inline-start: 42px; line-height: 1.5; }
.steps li::before, .steps-mini li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.steps-mini { gap: 8px; font-size: .95rem; }
.rules { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); line-height: 1.5; }
.rules .icon { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 1px; }
.guide-compare { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); margin: 16px 0; }
.guide-compare .icon { width: 34px; height: 34px; color: var(--brand); flex: none; }
.guide-compare p { margin: 0; }
.auth .lead { font-size: 1.02rem; color: var(--ink-2); }
details.help { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; }
details.help summary { cursor: pointer; font-weight: 600; }
.sec-status { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-bottom: 18px; flex-wrap: wrap; border-inline-start: 4px solid var(--line); }
.sec-status > .icon { width: 30px; height: 30px; color: var(--ink-3); flex: none; }
.sec-status > .grow { flex: 1 1 260px; min-width: 0; }
.sec-status.is-ok { border-inline-start-color: var(--ok); }
.sec-status.is-ok > .icon { color: var(--ok); }
.sec-status.is-warn { border-inline-start-color: var(--brand); }
.sec-status.is-warn > .icon { color: var(--brand); }
.sec-status p { margin: 4px 0 0; }
.qr-setup { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; padding-top: 6px; }
.qr-setup .grow { flex: 1 1 260px; min-width: 0; }
.qr { padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); line-height: 0; flex: none; }
.qr svg { width: 200px; height: 200px; }
.secret code { font-size: 1rem; letter-spacing: .08em; background: var(--bg-2); padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.codes { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.codes code { display: block; text-align: center; font-size: 1.05rem; letter-spacing: .06em; padding: 8px; border: 1px dashed var(--ink-3); border-radius: 6px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.me-menu a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-bright); margin-inline-start: auto; flex: none; }
@media print {
  body * { visibility: hidden; }
  .recovery, .recovery * { visibility: visible; }
  .recovery { position: absolute; inset: 0 auto auto 0; width: 100%; }
  .recovery .actions-row, .recovery .hint { display: none; }
}

/* ---------- Sous-activités ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.task .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task .grow p { margin: 2px 0 0; font-size: .9rem; }
.task .proj-meta .icon { width: 15px; height: 15px; vertical-align: -2px; color: var(--ink-3); }
.task .proj-meta small { color: var(--ink-3); }
.task.is-done .task-title { text-decoration: line-through; color: var(--ink-3); }
.task-check { margin: 0; }
.tick { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; cursor: pointer; flex: none; }
.tick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tick span { width: 24px; height: 24px; border: 2px solid var(--ink-3); border-radius: 7px; background: #fff; transition: background-color .15s, border-color .15s; }
.tick input:checked + span { background-color: var(--ok); border-color: var(--ok); background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22white%22 stroke-width=%223%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12l5 5 9-10%22/%3E%3C/svg%3E"); background-size: 18px; background-position: center; background-repeat: no-repeat; }
.tick input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.tick:hover span { border-color: var(--ok); }
.task-edit { flex: none; }
.task-edit > summary { list-style: none; width: 36px; height: 36px; }
.task-edit > summary::-webkit-details-marker { display: none; }
.task:has(.task-edit[open]) { flex-wrap: wrap; }
.task-edit[open] { flex-basis: 100%; order: 3; }
.task-edit .form { margin-top: 10px; padding: 14px; background: var(--bg-2); border-radius: var(--r-sm); }
.task-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding-top: 14px; }
.add-task > summary { list-style: none; cursor: pointer; }
.add-task > summary::-webkit-details-marker { display: none; }
.add-task[open] { flex-basis: 100%; }
.add-task .form { margin-top: 12px; padding: 14px; background: var(--bg-2); border-radius: var(--r-sm); }
.task-summary { display: grid; gap: 8px; }
.task-summary p { margin: 0; }
.avail { margin-bottom: 18px; }
.avail.is-todo { border-inline-start: 4px solid var(--brand); }
.avail-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.avail-row > .icon { width: 28px; height: 28px; color: var(--brand); flex: none; }
.avail-row .grow { flex: 1 1 260px; min-width: 0; }
.avail-row p { margin: 2px 0 0; }
.avail-row .toolbar { align-items: center; }
.input.num-s { width: 90px; }

/* ---------- Capacité bénévole ---------- */
.cap-msg { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--bg-2); border-inline-start: 4px solid var(--line); }
.cap-msg.ok { border-inline-start-color: var(--ok); }
.cap-msg.warn { border-inline-start-color: var(--brand); }
.cap-msg.err { border-inline-start-color: var(--err); color: #7f1d1d; background: var(--err-bg); }
.cap-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cap-figs > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.cap-figs b { display: block; font: 700 1.35rem/1.2 var(--display); }
.cap-figs span { font-size: .84rem; color: var(--ink-3); }
.cap-figs .is-err b { color: var(--err); }
.cap-detail > summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.cap-months { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 24px; }
.cap-months li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.cap-m { color: var(--ink-3); text-transform: capitalize; }
.cap-v { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.cap-months progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.cap-months progress::-webkit-progress-bar { background: var(--bg-3); }
.cap-months progress::-webkit-progress-value { background: var(--ok); }
.cap-months progress::-moz-progress-bar { background: var(--ok); }
.cap-months .is-tight progress::-webkit-progress-value { background: var(--brand); }
.cap-months .is-tight progress::-moz-progress-bar { background: var(--brand); }
.cap-months .is-over progress::-webkit-progress-value { background: var(--err); }
.cap-months .is-over progress::-moz-progress-bar { background: var(--err); }
.cap-months .is-over .cap-v { color: var(--err); font-weight: 650; }
.capacity .hint .icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--brand); }

/* Afficher / masquer le mot de passe */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-inline-end: 48px; width: 100%; }
.pw-toggle { position: absolute; top: 50%; inset-inline-end: 4px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--ink); background: var(--bg-2); }
.pw-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.pw-toggle .icon { width: 22px; height: 22px; }

/* ---------- Formulaires (espace) ---------- */
.ai-box header h2 { display: flex; align-items: center; gap: 8px; }
.ai-box header .icon { color: var(--brand); }
.forms-list .toolbar { flex-wrap: nowrap; }
.form-status { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding: 14px 18px; margin-bottom: 18px; }
.form-status .grow { flex: 1 1 260px; min-width: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.form-status .toolbar { flex-wrap: wrap; }
.form-status .hint { flex-basis: 100%; margin: 0; }
.fb-list { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.fb-item { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.fb-item:nth-child(even) { background: var(--bg-2); }
.fb-head, .fb-foot { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.fb-head .grow, .fb-foot .grow { flex: 1 1 260px; min-width: 0; }
.fb-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.fb-type { flex: 0 1 230px; min-width: 180px; }
.fb-opts { display: none; }
.fb-item.is-choice .fb-opts { display: grid; }
.fb-foot .check { margin-bottom: 10px; }
.fb-tools { display: flex; gap: 6px; margin-inline-start: auto; }
.fb-tools .icon-btn { width: 38px; height: 38px; }
.crit-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.crit-item { display: flex; gap: 10px; align-items: flex-end; }
.crit-item .grow { flex: 1; min-width: 0; }
.crit-w { width: 90px; flex: none; }
.crit-item .icon-btn { width: 40px; height: 40px; flex: none; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 12px 0; background: linear-gradient(to top, var(--bg-2) 70%, transparent); }
.danger-text { color: var(--err); }
.form-filters { justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.form-filters .seg { flex-wrap: wrap; }
.form-filters .seg small { color: var(--ink-3); margin-inline-start: 3px; }
.form-filters .input { width: min(260px, 100%); }
.resp-list li { align-items: center; }
.quick-status { flex: none; }
.select.sm { min-height: 34px; padding-block: 4px; font-size: .85rem; width: auto; }
.badge-select.ok { border-color: var(--ok); color: #166534; }
.badge-select.err { border-color: #fecaca; color: #991b1b; }
.badge-select.brand { border-color: var(--brand); color: #9a3412; }
.badge-select.dark { border-color: var(--ink); }
.notify-box > summary { cursor: pointer; padding: 16px 20px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notify-box > summary .icon { color: var(--brand); }
.share-box .secret { margin: 0 0 12px; }
.qr-share { display: grid; justify-items: start; gap: 10px; }
.answers { margin: 0; padding: 4px 20px 16px; }
.answers > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.answers > div:last-child { border-bottom: 0; }
.answers dt { font-size: .84rem; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.answers dd { margin: 0; overflow-wrap: anywhere; }
.review .score { font: 700 1.3rem var(--display); color: var(--brand); }
.rate { border: 0; padding: 0; margin: 0 0 12px; }
.rate legend { font-weight: 600; margin-bottom: 6px; }
.rate legend small { color: var(--ink-3); font-weight: 500; margin-inline-start: 6px; }
.rate-row { display: flex; gap: 6px; flex-wrap: wrap; }
.rate-row label { position: relative; }
.rate-row input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rate-row span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; font-weight: 650; background: #fff; cursor: pointer; }
.rate-row input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.rate-row input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
@media print {
  body.print-qr * { visibility: hidden; }
  body.print-qr .qr, body.print-qr .qr * { visibility: visible; }
  body.print-qr .qr { position: absolute; inset: 20mm auto auto 20mm; border: 0; }
  body.print-qr .qr svg { width: 120mm; height: 120mm; }
}

/* ---------- Formulaires (site public) ---------- */
.calls { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.call { padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.call h2 { font-size: 1.35rem; margin: 0; }
.call h2 a { color: inherit; text-decoration: none; }
.call h2 a:hover { color: var(--brand); }
.call p { margin: 0; }
.call .btn { margin-top: auto; }
.call-meta { display: flex; gap: 6px; align-items: center; font-size: .9rem; color: var(--ink-2); }
.call-meta .icon { width: 18px; height: 18px; color: var(--brand); }
.empty-state { text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty-state .actions-row { justify-content: center; }
.form-intro .prose { margin-bottom: 20px; }
.public-form .choice-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.public-form .choice-group legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.public-form .choices { display: grid; gap: 8px; margin-top: 6px; }
.public-form .choices.inline { display: flex; gap: 20px; }
.public-form abbr { color: var(--err); text-decoration: none; }
.public-form .hint { display: block; }
.btn.is-busy { opacity: .6; cursor: progress; }
.thanks { display: grid; gap: 10px; justify-items: start; align-content: start; }
.thanks > .icon { width: 44px; height: 44px; color: var(--ok); }
.thanks.is-closed > .icon { color: var(--ink-3); }
.thanks h2 { margin: 0; font-size: 1.5rem; }
.thanks p { margin: 0; }

/* ---------- Présentation de l'espace (vidéo d'accueil) ---------- */
.welcome { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-bottom: 18px; border-inline-start: 4px solid var(--brand); }
.welcome > .icon { width: 32px; height: 32px; color: var(--brand); flex: none; }
.welcome p { margin: 4px 0 0; }
.pres { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; margin-bottom: 18px; }
.pres-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--dark); border-radius: var(--r); box-shadow: 0 10px 30px #1114181f; }
.pres-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.pres-progress progress { flex: 1; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.pres-progress progress::-webkit-progress-bar { background: var(--bg-3); }
.pres-progress progress::-webkit-progress-value { background: var(--brand); }
.pres-progress progress::-moz-progress-bar { background: var(--brand); }
.pres-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 12px; }
.pres-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
.chap-list { list-style: none; margin: 0; padding: 0; }
.chap-list button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; font-size: .92rem; text-align: start; cursor: pointer; color: var(--ink); }
.chap-list button:hover:not(:disabled) { background: var(--bg-2); }
.chap-list button:disabled { color: var(--ink-3); cursor: not-allowed; opacity: .6; }
.chap-list button.is-current { background: var(--bg-2); font-weight: 650; }
.chap-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--bg-3); }
.chap-list button.is-current .chap-num { background: var(--brand); color: #fff; }
.steps-check li.is-done a { color: var(--ink-3); }
.steps-check .i-check-circle { color: var(--ok); }
.first-steps .list li { padding-block: 8px; }
@media (max-width: 1023px) { .pres { grid-template-columns: 1fr; } }
