/* =====================================================================
   Learn & Share — système de design (identité FLUORALPHA)
   Couleurs de marque : bleu FLUORALPHA #3F55A2, marine #1A2457, accent cyan #12B5D6
   Propriétés logiques (inline/block) : compatible écriture de droite à gauche.
   ===================================================================== */
:root {
  color-scheme: light;
  --brand: #3F55A2;
  --brand-600: #34488C;
  --brand-50: #EEF1FA;
  --brand-100: #DDE3F4;
  --navy-950: #0D1433;
  --navy-900: #131C45;
  --navy-800: #1A2457;
  --accent: #12B5D6;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --border: #E1E5F0;
  --border-strong: #C8CFE2;
  --text: #121933;
  --text-2: #3B4566;
  --muted: #5F6A88;
  --focus: #12B5D6;

  --c-problem: #D9541F;  --c-problem-bg: #FDEEE7;
  --c-idea: #6250D6;     --c-idea-bg: #EFEDFC;
  --c-question: #0E8A5E; --c-question-bg: #E4F6EE;
  --c-article: #3F55A2;  --c-article-bg: #EEF1FA;
  --c-document: #2A6FB0; --c-document-bg: #E7F0FA;
  --c-equipment: #0B8C88; --c-equipment-bg: #E2F5F4;

  --ok: #0E7A3B;     --ok-bg: #E3F5EA;
  --warn: #8F5D00;   --warn-bg: #FDF3DC;
  --danger: #B42318; --danger-bg: #FDE8E7;
  --info: #34488C;   --info-bg: #EEF1FA;
  --neutral-bg: #EEF0F6;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(19, 28, 69, .06), 0 2px 8px rgba(19, 28, 69, .05);
  --shadow-lg: 0 16px 48px rgba(19, 28, 69, .22);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sidebar-w: 252px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--navy-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { inset-inline-start: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: 14px; align-content: start; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.stack-lg { display: grid; gap: 20px; align-content: start; }
.mt { margin-top: 12px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Coquille applicative ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--navy-950) var(--sidebar-w), var(--bg) var(--sidebar-w)); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; color: #E6EAF7;
  background: linear-gradient(185deg, var(--navy-800) 0%, var(--navy-950) 100%); padding: 18px 12px 12px; }
.sidebar .brand { padding: 2px 8px 14px; display: grid; gap: 10px; }
.sidebar .brand .company-logo { max-height: 42px; width: auto; max-width: 170px; }
.brand-name { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 750; font-size: 1.12rem; color: #fff; letter-spacing: -.01em; }
.brand-name .amp { color: var(--accent); }
.brand-mark { width: 22px; height: 22px; flex: none; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #D5DBF0; font-weight: 550; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(63,85,162,.45); }
.nav .count { margin-inline-start: auto; background: rgba(255,255,255,.16); border-radius: 99px; font-size: .72rem; padding: 1px 7px; }
.nav-section { margin: 16px 12px 6px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #8F9AC2; font-weight: 650; }
.sidebar-foot { margin-top: auto; padding: 12px 6px 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 8px; }
.sidebar-foot .who { display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who strong { color: #fff; display: block; font-size: .92rem; }
.sidebar-foot .who span { color: #A9B3D6; font-size: .8rem; }
.sidebar-foot button { background: none; border: 0; color: #C9D0EA; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; justify-content: center; }
.sidebar-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.icon-btn.menu-btn { display: none; }
main { padding: 26px 28px 48px; max-width: 1320px; width: 100%; margin: 0 auto; }
main:focus, main:focus-visible { outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- Recherche globale ---------- */
.search-box { position: relative; flex: 1; min-width: 0; max-width: 460px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 0 10px; }
.search-box input { border: 0; outline: none; background: none; padding: 9px 0; flex: 1; min-width: 0; }
.search-box kbd { font: .75rem var(--mono); color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.search-panel { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 70vh; overflow: auto; z-index: 30; }
.search-panel .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; font-weight: 650; }
.search-panel a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-panel a:hover, .search-panel a:focus { background: var(--brand-50); text-decoration: none; }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 8px 15px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text); line-height: 1.3; text-decoration: none !important; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(63,85,162,.28); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--brand); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--neutral-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: none; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-bg); }
.btn-sm { padding: 5px 10px; font-size: .86rem; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer; position: relative; color: var(--text-2); }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn .dot { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.field { display: grid; gap: 6px; align-content: start; }
.label { font-weight: 600; font-size: .9rem; color: var(--text-2); }
.label .req { color: var(--danger); margin-inline-start: 2px; }
.hint { font-size: .82rem; color: var(--muted); }
.field-error { font-size: .82rem; color: var(--danger); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 11px; background: var(--surface); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(63,85,162,.16); }
.select:disabled, .input:disabled { background: var(--surface-2); color: var(--muted); }
.textarea { min-height: 110px; resize: vertical; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-inline-start: 36px; }
.input-icon .toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 6px; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 12px; }
.form-section > h3 { display: flex; align-items: center; gap: 8px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2); }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }

/* ---------- Cartes, badges, listes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 14px 20px 18px; }
.badge { width: fit-content; display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; font-size: .78rem; font-weight: 650; white-space: nowrap; background: var(--neutral-bg); color: var(--text-2); }
.badge::before { content: none; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-danger { background: var(--danger-bg); color: var(--danger); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-neutral { background: var(--neutral-bg); color: var(--text-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .78rem; color: #fff; flex: none; background: var(--brand); }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.05rem; }
.avatar.anon { background: #8A93AD; }
.type-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; }
.type-icon.sm { width: 28px; height: 28px; border-radius: 8px; }
.t-problem { background: var(--c-problem-bg); color: var(--c-problem); }
.t-idea { background: var(--c-idea-bg); color: var(--c-idea); }
.t-question { background: var(--c-question-bg); color: var(--c-question); }
.t-article { background: var(--c-article-bg); color: var(--c-article); }
.t-document { background: var(--c-document-bg); color: var(--c-document); }
.t-equipment { background: var(--c-equipment-bg); color: var(--c-equipment); }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .t { font-weight: 600; color: var(--text); }
.list-item a.t:hover { color: var(--brand); }
.meta { color: var(--muted); font-size: .84rem; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; display: grid; gap: 8px; justify-items: center; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .person { display: flex; gap: 10px; align-items: center; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--info); font-size: .9rem; align-items: flex-start; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.danger { background: var(--danger-bg); color: var(--danger); }
.notice .icon { margin-top: 1px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-50); color: var(--brand-600); border-radius: 99px; padding: 2px 6px 2px 10px; font-size: .82rem; font-weight: 600; }
.chip button { border: 0; background: none; cursor: pointer; color: inherit; padding: 2px; border-radius: 50%; display: inline-grid; }
.chip button:hover { background: rgba(63,85,162,.15); }
.tag { display: inline-block; background: var(--neutral-bg); color: var(--text-2); border-radius: 6px; padding: 1px 8px; font-size: .8rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 12px; overflow-x: auto; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 12px 12px; border: 0; background: none; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--brand); text-decoration: none; }
.tabs [aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .select, .filters .input { width: auto; min-width: 160px; }
.filters .input { flex: 1; min-width: 200px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 12px; }
.grid { display: grid; gap: 18px; }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Tableau de bord ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); color: #fff; padding: 26px 30px; min-height: 132px; display: flex; align-items: center;
  background: linear-gradient(105deg, var(--navy-800) 0%, var(--brand) 62%, #6F86D6 120%); }
.hero h1 { color: #fff; font-size: 1.5rem; }
.hero p { margin: 6px 0 0; color: #E3E8FA; }
.hero .hero-art { position: absolute; inset-inline-end: 0; bottom: 0; height: 100%; width: 46%; opacity: .95; pointer-events: none; }
.stat { border-radius: var(--radius-lg); padding: 18px; color: #fff; display: flex; gap: 14px; align-items: center; text-decoration: none !important; box-shadow: var(--shadow); }
.stat .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .88rem; opacity: .95; }
.s-docs { background: linear-gradient(120deg, #3F55A2, #5B70C0); }
.s-eq { background: linear-gradient(120deg, #0B8C88, #12A99F); }
.s-ideas { background: linear-gradient(120deg, #5947C9, #7C6BE0); }
.s-problems { background: linear-gradient(120deg, #D9541F, #F08A3C); }
.quick { display: grid; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; color: #fff; font-weight: 650; text-decoration: none !important; }
.quick .q-problem { background: var(--c-problem); }
.quick .q-idea { background: var(--c-idea); }
.quick .q-question { background: var(--c-question); }
.quick .q-article { background: var(--brand); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.kpi b { display: block; font-size: 1.4rem; }
.kpi span { color: var(--muted); font-size: .84rem; }

/* ---------- Fiche contribution ---------- */
.detail-head { display: flex; gap: 14px; align-items: flex-start; }
.detail-head h1 { font-size: 1.4rem; }
.content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 9px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment.answer { background: var(--surface-2); border-radius: 12px; padding: 14px; border: 1px solid var(--border); margin-bottom: 10px; }
.comment.accepted { border-color: var(--ok); background: var(--ok-bg); }
.steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 0 8px; }
.step { flex: 1; min-width: 96px; text-align: center; position: relative; font-size: .8rem; color: var(--muted); }
.step::before { content: ""; position: absolute; top: 11px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.step:first-child::before { display: none; }
.step .sdot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; margin: 0 auto 6px; position: relative; z-index: 1; font-size: .7rem; font-weight: 700; }
.step.done .sdot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.done::before, .step.current::before { background: var(--brand); }
.step.current .sdot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.step.current { color: var(--text); font-weight: 650; }

/* ---------- Audience et identité ---------- */
.audience-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.aud-opt { position: relative; }
.aud-opt input { position: absolute; opacity: 0; }
.aud-opt label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600; background: var(--surface); height: 100%; }
.aud-opt input:checked + label { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand); }
.aud-opt input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.unit-checklist { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; background: var(--surface); }
.unit-checklist .kind { font-size: .72rem; color: var(--muted); margin-inline-start: 6px; }

/* ---------- Organigramme ---------- */
.orgchart { padding: 18px; display: grid; gap: 14px; justify-items: center; background: linear-gradient(180deg, #EEF1FA, #F7F8FC); border-radius: 12px; }
.org-node { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.org-node.root { border-top: 4px solid var(--brand); min-width: 280px; text-align: center; justify-items: center; }
.org-node.inactive { opacity: .55; }
.org-node strong { font-size: .93rem; }
.org-level { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; width: 100%; align-items: start; }
.org-children { margin-top: 4px; padding-inline-start: 10px; border-inline-start: 2px solid var(--brand-100); display: grid; gap: 6px; }
.org-children .org-node { box-shadow: none; background: var(--surface-2); padding: 8px 10px; }
.org-connector { width: 2px; height: 16px; background: var(--border-strong); }
.org-count { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; color: var(--text-2); background: var(--neutral-bg); border-radius: 99px; padding: 1px 8px; width: fit-content; }
.admin-list { display: grid; gap: 8px; }
.admin-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }

/* ---------- Fenêtres, notifications ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(13,20,51,.5); display: grid; place-items: center; padding: 16px; z-index: 60; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.toasts { position: fixed; bottom: 18px; inset-inline-end: 18px; display: grid; gap: 8px; z-index: 80; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--navy-900); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); }
.toast.error { background: var(--danger); }
.dropdown { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(380px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 40; }
.dropdown .head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dropdown ul { list-style: none; margin: 0; padding: 4px; max-height: 60vh; overflow: auto; }
.dropdown li a { display: grid; gap: 2px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.dropdown li a:hover { background: var(--brand-50); text-decoration: none; }
.dropdown li.unread a { background: var(--brand-50); }
.notif-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif-row.unread .t { font-weight: 700; }

/* ---------- Pages d'authentification ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; background: var(--navy-900); }
.auth-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-art > *:not(.scene) { position: relative; }
.art-brand-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.art-brand-row .brand-name { font-size: 2.4rem; }
.art-brand-row .brand-mark { width: 34px; height: 34px; }
.art-divider { width: 1px; height: 38px; background: rgba(255,255,255,.45); }
.art-logo { max-height: 40px; width: auto; }
.tagline { font-size: 1.12rem; margin: 12px 0 10px; color: #EEF2FF; }
.motto { display: flex; gap: 14px; font-weight: 700; flex-wrap: wrap; }
.motto span:not(:last-child)::after { content: "·"; margin-inline-start: 14px; color: var(--accent); }
.art-bottom p { font-size: 1.05rem; max-width: 440px; color: #F1F4FF; }
.art-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin-top: 12px; }
.art-features div { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .85rem; color: #F1F4FF; }
.auth-side { display: grid; place-items: center; padding: 32px 24px; background: #F7F8FD; }
.auth-box { width: min(440px, 100%); display: grid; gap: 16px; }
.auth-box .card-logo { max-height: 50px; width: auto; justify-self: start; }
.auth-box .brand-name { color: var(--navy-800); font-size: 1.6rem; }
.auth-box .brand-name .amp { color: #8EA0E0; }
.auth-foot { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .86rem; }
.auth-wide { width: min(640px, 100%); }

/* ---------- Divers ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--neutral-bg); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px; align-items: center; font-size: .88rem; }
.strength { display: flex; gap: 4px; }
.strength span { flex: 1; height: 5px; border-radius: 99px; background: var(--neutral-bg); }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] span:nth-child(-n+2) { background: #E8A13A; }
.strength[data-level="3"] span:nth-child(-n+3) { background: #7CB342; }
.strength[data-level="4"] span { background: var(--ok); }
.file-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.file-row:last-child { border-bottom: 0; }
.secret { font-family: var(--mono); font-size: 1.05rem; padding: 10px; background: var(--surface-2); border-radius: 8px; word-break: break-all; user-select: all; }
.logo-chip { display: inline-block; background: #fff; border-radius: 8px; padding: 4px 8px; }
.logo-chip img { max-height: 32px; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 50; transform: translateX(-105%); transition: transform .2s; }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .icon-btn.menu-btn { display: inline-grid; }
  .app { background: var(--bg); }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar .icon-btn { flex: none; }
  main { padding: 18px 14px 40px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; padding: 26px 22px; justify-content: flex-start; }
  .auth-art .art-bottom, .auth-art .tagline, .art-divider, .art-logo { display: none; }
  .art-brand-row .brand-name { font-size: 1.8rem; }
  .hide-sm { display: none !important; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .hero .hero-art { width: 70%; opacity: .35; }
  .bar-row { grid-template-columns: 110px 1fr 34px; }
  .filters .select, .filters .input { min-width: 0; width: 100%; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px; }
  .stat b { font-size: 1.35rem; }
  .search-box kbd { display: none; }
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app { display: block; }
  main { padding: 0; }
}
