/* ============================================================
   ALG CLUB — Espace : Formation, Portefeuille, Mon suivi, Clients, Équipe.
   Reprend la maquette validée (maquettes/formation.html) et les jetons
   de tokens.css : fonctionne en thème sombre et clair.
   ============================================================ */

[hidden] { display: none !important; }

/* ---------- Communs ---------- */
.esp-ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.esp-eyebrow { font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--alg-text-3); font-weight: 600; }
.esp-h1 { font-family: var(--alg-font-display); font-weight: 400; font-size: var(--fs-h1); line-height: var(--lh-h1); margin: var(--sp-2) 0 var(--sp-3); }
.esp-h2 { font-family: var(--alg-font-display); font-weight: 400; font-size: var(--fs-h2); line-height: var(--lh-h2); margin: 0 0 var(--sp-2); }
.esp-h3 { font-family: var(--alg-font-display); font-weight: 400; font-size: 21px; line-height: 1.25; margin: 0; }
.esp-p { color: var(--alg-text-2); max-width: 62ch; margin: 0; }
.esp-meta { font-size: var(--fs-caption); color: var(--alg-text-3); }
.esp-pre { white-space: pre-line; overflow-wrap: anywhere; }
.esp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.esp-head > div { min-width: 0; }
.esp-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.esp-back { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 40px; font-size: var(--fs-label); color: var(--alg-text-2); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; margin-bottom: var(--sp-3); }
.esp-back:hover { color: var(--alg-text); }
.esp-admin-tag { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--alg-gold); border: 1px solid var(--alg-gold-dim); border-radius: var(--r-pill); padding: 1px 7px; }
.esp-bar { height: 4px; background: var(--alg-surface-3); border-radius: var(--r-pill); overflow: hidden; }
.esp-bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--alg-emerald), var(--alg-emerald-bright)); transition: width var(--dur-slow) var(--ease-out); }
.esp-bar.gold > i { background: linear-gradient(90deg, var(--alg-gold-dim), var(--alg-gold)); }
.esp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-micro); padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--alg-border-strong); color: var(--alg-text-3); white-space: nowrap; }
.esp-chip .esp-ic { width: 12px; height: 12px; }
.esp-chip.done, .esp-chip.ok { color: var(--alg-emerald-bright); border-color: rgba(58,125,92,0.45); }
.esp-chip.cur, .esp-chip.gold { color: var(--alg-gold); border-color: var(--alg-gold-dim); }
.esp-chip.warn { color: var(--alg-warning); border-color: rgba(184,154,92,0.5); }
.esp-loading { display: flex; align-items: center; gap: var(--sp-3); color: var(--alg-text-3); font-size: var(--fs-label); padding: var(--sp-7) 0; justify-content: center; }
.esp-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--alg-border-strong); border-top-color: var(--alg-emerald-bright); animation: espSpin 0.8s linear infinite; }
@keyframes espSpin { to { transform: rotate(360deg); } }
.esp-error { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--alg-text-2); }
.esp-error .esp-ic { color: var(--alg-warning); width: 20px; height: 20px; margin-top: 2px; }
.esp-error p { margin: 0 0 var(--sp-3); }
.esp-empty { text-align: center; padding: var(--sp-7) var(--sp-5); color: var(--alg-text-3); }
.esp-empty .esp-h3 { color: var(--alg-text); margin-bottom: var(--sp-2); }
.esp-sec-t { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.esp-sec-t .ctit { margin: 0; }
.esp-link { color: var(--alg-gold); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.esp-link:hover { color: var(--alg-text); }
a.btn { text-decoration: none; }
.btn .esp-ic { width: 15px; height: 15px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.esp-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--alg-border-strong); background: transparent; color: var(--alg-text-2); cursor: pointer; }
.esp-iconbtn:hover { color: var(--alg-text); border-color: var(--alg-gold-dim); }
.esp-iconbtn[disabled] { opacity: 0.35; cursor: default; }
textarea.esp-ta { width: 100%; min-height: 96px; resize: vertical; background: var(--alg-surface-2); border: 1px solid var(--alg-border-strong); border-radius: var(--r-xs); color: var(--alg-text); font-size: var(--fs-label); padding: var(--sp-2) var(--sp-3); font-family: inherit; line-height: 1.5; outline: none; box-sizing: border-box; }
textarea.esp-ta:focus { border-color: var(--alg-emerald-bright); box-shadow: 0 0 0 3px var(--alg-emerald-glow); }
input[type=date], input[type=datetime-local], input[type=url] { width: 100%; background: var(--alg-surface-2); border: 1px solid var(--alg-border-strong); border-radius: var(--r-xs); color: var(--alg-text); font-size: var(--fs-label); padding: var(--sp-2) var(--sp-3); outline: none; font-family: inherit; color-scheme: dark; box-sizing: border-box; }
:root[data-theme="light"] input[type=date], :root[data-theme="light"] input[type=datetime-local] { color-scheme: light; }
input[type=date]:focus, input[type=datetime-local]:focus, input[type=url]:focus { border-color: var(--alg-emerald-bright); box-shadow: 0 0 0 3px var(--alg-emerald-glow); }
.esp-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.esp-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--sp-3); }
.esp-hint { font-size: var(--fs-caption); color: var(--alg-text-3); }
.esp-hint.ok { color: var(--alg-emerald-bright); }
.esp-hint.err { color: var(--alg-negative); }
.esp-check { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-label); color: var(--alg-text-2); cursor: pointer; }
.esp-check input { width: 16px; height: 16px; accent-color: var(--alg-emerald-bright); margin: 0; }

/* ---------- Formation : reprise + grille de modules ---------- */
.fo-resume { display: flex; flex-wrap: wrap; padding: 0; overflow: hidden; background: var(--card-sheen), var(--alg-olive); box-shadow: var(--hero-shadow); border-radius: var(--r-lg); margin-bottom: 0; }
.fo-resume::before { background: var(--hero-edge) !important; z-index: 1; }
.fo-thumb { flex: 1 1 420px; min-height: 260px; position: relative; border: 0; padding: 0; margin: 0; cursor: pointer; color: #f4f1e8; font-family: inherit; background: radial-gradient(120% 90% at 30% 20%, #1d2a22 0%, #121412 55%, #0b0b0b 100%) center / cover no-repeat; }
.fo-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.fo-mark { position: absolute; left: 32px; bottom: 20px; font-family: var(--alg-font-display); font-size: 150px; line-height: 1; color: rgba(227,214,177,0.07); pointer-events: none; }
.fo-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(227,214,177,0.45); background: rgba(16,16,16,0.55); backdrop-filter: blur(8px); display: grid; place-items: center; color: #f4f1e8; pointer-events: none; }
.fo-play .esp-ic { width: 24px; height: 24px; margin-left: 4px; }
.fo-resume-b { flex: 1 1 380px; min-width: 0; padding: var(--sp-6); display: flex; flex-direction: column; justify-content: center; gap: var(--sp-2); position: relative; z-index: 2; }
.fo-resume-b .esp-h1 { margin: 0; }
.fo-resume-p { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-4); }
.fo-resume-p > span:last-child { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.fo-resume-v { font-family: var(--alg-font-display); font-size: 36px; line-height: 1; color: var(--alg-gold); white-space: nowrap; }
.fo-resume .esp-bar { height: 5px; }
.fo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: var(--sp-4); }
.fo-card { display: flex; flex-direction: column; min-height: 220px; margin: 0; width: 100%; text-align: left; border: 0; font-family: inherit; color: inherit; cursor: pointer; font-size: var(--fs-body); }
.fo-card.cur::before { background: var(--hero-edge) !important; }
.fo-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.fo-num { font-family: var(--alg-font-display); font-size: 52px; line-height: 0.9; color: var(--alg-gold-dim); }
.fo-card.cur .fo-num { color: var(--alg-gold); }
.fo-card-t { font-family: var(--alg-font-display); font-size: 21px; line-height: 1.25; margin-top: var(--sp-5); color: var(--alg-text); transition: color var(--dur-fast); }
.fo-card:not(.locked):hover .fo-card-t { color: var(--alg-emerald-bright); }
.fo-card .esp-meta { margin-top: var(--sp-1); }
.fo-card-foot { margin-top: auto; padding-top: var(--sp-5); display: flex; align-items: center; gap: var(--sp-3); }
.fo-card-foot .esp-bar { flex: 1; }
.fo-card-foot > span:last-child { font-size: var(--fs-caption); color: var(--alg-text-2); font-variant-numeric: tabular-nums; }
.fo-card.locked { cursor: default; }
.fo-card.locked .fo-num { color: var(--alg-text-3); opacity: 0.45; }
.fo-card.locked .fo-card-t { color: var(--alg-text-3); }

/* ---------- Formation : leçon ---------- */
.fo-lesson { display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: flex-start; }
.fo-lesson-main { flex: 999 1 560px; min-width: 0; }
.fo-side { flex: 1 1 300px; min-width: 0; position: sticky; top: 104px; }
.fo-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, #1d2a22 0%, #121412 55%, #0b0b0b 100%); box-shadow: var(--card-shadow); margin-bottom: var(--sp-5); }
.fo-video video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.fo-video-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); text-align: center; padding: var(--sp-5); color: #d9d5c8; font-size: var(--fs-label); background: rgba(10,10,10,0.72); }
.fo-video-msg .esp-ic { width: 26px; height: 26px; color: #b9b4a5; }
.fo-res { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.fo-res a { display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; color: var(--alg-text); text-decoration: none; font-size: var(--fs-label); padding: var(--sp-2) var(--sp-4); border: 1px solid var(--alg-border); border-radius: var(--r-sm); background: var(--alg-surface-2); box-sizing: border-box; }
.fo-res a:hover { border-color: var(--alg-gold-dim); }
.fo-res a span { margin-left: auto; color: var(--alg-text-3); font-size: var(--fs-caption); }
.fo-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-5); margin-top: var(--sp-5); }
.fo-callout > div { flex: 1 1 320px; min-width: 0; }
.fo-callout .ctit { margin-bottom: var(--sp-2); }
.fo-nav { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.fo-side-h { margin-bottom: var(--sp-4); }
.fo-side-h .esp-bar { margin-top: var(--sp-3); }
.fo-ls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fo-l { width: 100%; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-label); color: var(--alg-text-2); background: none; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.fo-l:hover:not([disabled]) { background: var(--alg-surface-2); }
.fo-l[disabled] { cursor: default; color: var(--alg-text-3); }
.fo-l.passed .fo-l-i { color: var(--alg-emerald-bright); }
.fo-l.on { background: var(--alg-surface-3); color: var(--alg-text); }
.fo-l.current .fo-l-i { color: var(--alg-gold); }
.fo-l-i { display: grid; place-items: center; }
.fo-l-d { font-size: var(--fs-caption); color: var(--alg-text-3); font-variant-numeric: tabular-nums; }

/* ---------- Formation : quiz ---------- */
.fo-quiz { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--sp-4); }
.fo-quiz-head { text-align: center; margin-bottom: var(--sp-2); }
.fo-rule { display: inline-block; font-size: var(--fs-caption); color: var(--alg-text-2); border: 1px solid var(--alg-border-strong); border-radius: var(--r-pill); padding: 4px 12px; }
.fo-q { margin: 0; padding: var(--sp-5) var(--sp-6); }
.fo-q.wrong { box-shadow: var(--card-shadow), 0 0 0 1px rgba(184,154,92,0.55); }
.fo-q-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.fo-q-t { font-family: var(--alg-font-display); font-size: 21px; line-height: 1.3; margin: 0 0 var(--sp-4); font-weight: 400; }
.fo-opts { display: flex; flex-direction: column; gap: var(--sp-2); }
.fo-opt { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--alg-border-strong); border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-label); color: var(--alg-text); background: var(--alg-surface-2); text-align: left; font-family: inherit; box-sizing: border-box; width: 100%; }
.fo-opt:hover { border-color: var(--alg-gold-dim); }
.fo-radio { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid var(--alg-text-3); display: grid; place-items: center; }
.fo-opt[aria-pressed="true"] { border-color: var(--alg-emerald); background: var(--alg-emerald-ghost); }
.fo-opt[aria-pressed="true"] .fo-radio { border-color: var(--alg-emerald-bright); }
.fo-opt[aria-pressed="true"] .fo-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--alg-emerald-bright); }
.fo-q.wrong .fo-opt[aria-pressed="true"] { border-color: var(--alg-warning); background: rgba(184,154,92,0.08); }
.fo-q.wrong .fo-opt[aria-pressed="true"] .fo-radio { border-color: var(--alg-warning); }
.fo-q.wrong .fo-opt[aria-pressed="true"] .fo-radio::after { background: var(--alg-warning); }
.fo-flag { font-size: var(--fs-caption); display: inline-flex; align-items: center; gap: 6px; }
.fo-flag.warn { color: var(--alg-warning); }
.fo-flag.ok { color: var(--alg-emerald-bright); }
.fo-quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.fo-result { display: flex; gap: var(--sp-4); align-items: flex-start; margin: 0; padding: var(--sp-5) var(--sp-6); }
.fo-result-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--alg-warning); border: 1px solid rgba(184,154,92,0.5); }
.fo-result-ic .esp-ic { width: 22px; height: 22px; }
.fo-win { max-width: 560px; margin: var(--sp-5) auto 0; text-align: center; padding: var(--sp-7) var(--sp-6); background: var(--card-sheen), var(--alg-olive); box-shadow: var(--hero-shadow); border-radius: var(--r-lg); }
.fo-win::before { background: var(--hero-edge) !important; }
.fo-win-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto var(--sp-5); display: grid; place-items: center; border: 1px solid var(--alg-gold-dim); color: var(--alg-gold); }
.fo-win-ic .esp-ic { width: 26px; height: 26px; }
.fo-win-score { font-family: var(--alg-font-display); font-size: var(--fs-display); color: var(--alg-gold); line-height: 1; margin: var(--sp-3) 0; }
.fo-unlock { display: flex; align-items: center; gap: var(--sp-3); text-align: left; border: 1px solid var(--alg-border-strong); border-radius: var(--r-md); padding: var(--sp-4); margin: var(--sp-5) 0; background: var(--alg-surface); }
.fo-unlock .esp-ic { color: var(--alg-emerald-bright); }

/* ---------- Formation : administration ---------- */
.fo-adm { display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: flex-start; }
.fo-adm-tree { flex: 1 1 380px; min-width: 0; }
.fo-adm-edit { flex: 999 1 560px; min-width: 0; }
.fo-tm { border-top: 1px solid var(--alg-border); padding: var(--sp-2) 0; }
.fo-tm:first-of-type { border-top: 0; }
.fo-tr { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: var(--sp-2); align-items: center; border-radius: var(--r-sm); }
.fo-tr-b { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding: var(--sp-2); background: none; border: 0; color: var(--alg-text-2); font-family: inherit; font-size: var(--fs-label); text-align: left; cursor: pointer; border-radius: var(--r-sm); min-width: 0; }
.fo-tr-b span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-tr-b .esp-meta { white-space: nowrap; flex: none; }
.fo-tr.mod .fo-tr-b { color: var(--alg-text); font-weight: 500; }
.fo-tr.les { padding-left: var(--sp-5); }
.fo-tr.sel { background: var(--alg-surface-3); }
.fo-tr.sel .fo-tr-b { color: var(--alg-text); }
.fo-tr-mv { display: flex; gap: 2px; }
.fo-tr-mv .esp-iconbtn { width: 28px; height: 28px; border-color: transparent; }
.fo-tr-mv .esp-iconbtn:hover:not([disabled]) { border-color: var(--alg-border-strong); }
.fo-pill { font-size: 10px; letter-spacing: 0.06em; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--alg-border-strong); color: var(--alg-text-3); white-space: nowrap; }
.fo-pill.pub { color: var(--alg-emerald-bright); border-color: rgba(58,125,92,0.4); }
.fo-addrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.fo-addrow .btn { font-size: var(--fs-caption); padding: 6px 12px; }
.fo-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.fo-sec { border-top: 1px solid var(--alg-border); padding-top: var(--sp-5); }
.fo-aq { border: 1px solid var(--alg-border); border-radius: var(--r-md); padding: var(--sp-4); background: var(--alg-surface-2); margin: 0; }
.fo-aq + .fo-aq { margin-top: var(--sp-3); }
.fo-aq-top { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-2); }
.fo-aq-top b { font-family: var(--alg-font-display); font-weight: 400; color: var(--alg-gold-dim); font-size: 18px; }
.fo-aq input[type=text] { background: var(--alg-surface); }
.fo-ach { display: grid; grid-template-columns: 22px minmax(0,1fr) 32px; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
.fo-ach input[type=radio] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 50%; border: 1px solid var(--alg-text-3); background: transparent; display: grid; place-items: center; cursor: pointer; }
.fo-ach input[type=radio]:checked { border-color: var(--alg-emerald-bright); }
.fo-ach input[type=radio]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--alg-emerald-bright); }
.fo-ach.good input[type=text] { border-color: rgba(58,125,92,0.6); }
.fo-resrow { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr) 32px; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
.fo-save { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); border-top: 1px solid var(--alg-border); padding-top: var(--sp-5); flex-wrap: wrap; }
.fo-vidprev { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--alg-border); background: var(--alg-surface-2); margin-top: var(--sp-2); }

/* ---------- Mon suivi / Clients ---------- */
.su-hero { display: flex; flex-wrap: wrap; gap: var(--sp-6); align-items: center; padding: var(--sp-6); background: var(--card-sheen), var(--alg-olive); box-shadow: var(--hero-shadow); border-radius: var(--r-lg); }
.su-hero::before { background: var(--hero-edge) !important; }
.su-hero > div { flex: 1 1 260px; min-width: 0; }
.su-hero .su-next { border-left: 1px solid var(--alg-border-strong); padding-left: var(--sp-6); }
.su-big { font-family: var(--alg-font-display); font-size: 44px; line-height: 1; color: var(--alg-gold); }
.su-big small { font-size: 22px; color: var(--alg-gold-dim); margin-left: 4px; }
.su-hero .esp-bar { margin: var(--sp-3) 0 var(--sp-2); height: 5px; }
.su-cols { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-start; margin-top: var(--sp-5); }
.su-cols > .su-main { flex: 999 1 520px; min-width: 0; }
.su-cols > .su-aside { flex: 1 1 300px; min-width: 0; }
.su-calls { list-style: none; margin: 0; padding: 0; }
.su-call { border-top: 1px solid var(--alg-border); padding: var(--sp-4) 0; }
.su-call:first-child { border-top: 0; padding-top: 0; }
.su-call-h { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.su-call-n { font-family: var(--alg-font-display); font-size: 24px; color: var(--alg-gold-dim); width: 34px; flex: none; }
.su-call-t { flex: 1 1 200px; min-width: 0; }
.su-call-t b { font-weight: 500; }
.su-call-body { margin: var(--sp-3) 0 0 46px; display: flex; flex-direction: column; gap: var(--sp-2); }
.su-notes { font-size: var(--fs-label); color: var(--alg-text-2); background: var(--alg-surface-2); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); }
.su-edit { margin: var(--sp-3) 0 0 46px; padding: var(--sp-4); border: 1px solid var(--alg-border-strong); border-radius: var(--r-md); background: var(--alg-emerald-ghost); display: flex; flex-direction: column; gap: var(--sp-3); }
.su-fiche { display: flex; flex-direction: column; gap: var(--sp-4); }
.su-fiche h4 { margin: 0 0 var(--sp-1); font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--alg-text-3); font-weight: 600; }
.su-fiche p { margin: 0; font-size: var(--fs-label); color: var(--alg-text); }
.su-agenda { list-style: none; margin: 0; padding: 0; }
.su-day { font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--alg-text-3); font-weight: 600; margin: var(--sp-4) 0 var(--sp-2); }
.su-day:first-child { margin-top: 0; }
.su-ag { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; font-size: var(--fs-label); flex-wrap: wrap; }
.su-ag-time { font-variant-numeric: tabular-nums; color: var(--alg-gold); width: 48px; flex: none; }
.su-ag-who { flex: 1 1 160px; min-width: 0; }
.su-search { max-width: 320px; }
.su-tbl td { vertical-align: middle; }
.su-tbl tbody tr { cursor: pointer; }
.su-tbl .su-name { font-weight: 500; color: var(--alg-text); }
.su-tbl-wrap { overflow-x: auto; }
.su-switch { display: flex; align-items: center; gap: var(--sp-2); }
.su-switch select { width: auto; min-width: 220px; }
.su-mod { display: grid; grid-template-columns: minmax(0,1fr) 56px 34px; gap: var(--sp-3); align-items: center; padding: var(--sp-2) 0; font-size: var(--fs-label); border-top: 1px solid var(--alg-border); }
.su-mod:first-child { border-top: 0; }
.su-mod span:last-child { text-align: right; color: var(--alg-text-2); font-variant-numeric: tabular-nums; font-size: var(--fs-caption); }

/* ---------- Portefeuille ---------- */
.pf-head { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: flex-end; margin-bottom: var(--sp-5); }
.pf-alloc { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--alg-surface-2); margin: var(--sp-3) 0 var(--sp-3); }
.pf-alloc span { height: 100%; }
.pf-legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-size: var(--fs-caption); color: var(--alg-text-2); }
.pf-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pf-c-crypto { background: var(--alg-emerald-bright); }
.pf-c-or { background: var(--alg-gold); }
.pf-c-autre { background: var(--alg-debt); }
.pf-tbl td.num, .pf-tbl th.num { text-align: right; }
.pf-sym { color: var(--alg-text-3); font-size: var(--fs-caption); margin-left: 6px; }
.pf-weight { display: flex; align-items: center; gap: var(--sp-2); justify-content: flex-end; }
.pf-weight .esp-bar { width: 64px; }
.pf-comment { font-size: var(--fs-label); color: var(--alg-text-2); background: var(--alg-surface-2); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-3); }
.pf-edit-wrap { overflow-x: auto; }
.pf-edit { width: 100%; border-collapse: collapse; min-width: 860px; }
.pf-edit th { font-size: var(--fs-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--alg-text-2); text-align: left; padding: var(--sp-2); font-weight: 600; }
.pf-edit td { padding: var(--sp-1) var(--sp-1); }
.pf-edit input, .pf-edit select { min-height: 38px; }
.pf-edit select[data-k="asset_class"] { min-width: 108px; }
.pf-edit select[data-k="currency"] { min-width: 84px; }
.pf-hist { list-style: none; margin: 0; padding: 0; }
.pf-hist li { display: flex; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-2) 0; border-top: 1px solid var(--alg-border); font-size: var(--fs-label); }
.pf-hist li:first-child { border-top: 0; }
.pf-hist time { color: var(--alg-text-2); min-width: 180px; }

/* ---------- Équipe ---------- */
.eq-tbl select, .eq-tbl input { min-height: 36px; }
.eq-tbl td { vertical-align: middle; }
.eq-tbl .eq-who b { font-weight: 500; display: block; }
.eq-tbl .eq-row-act { white-space: nowrap; }
.eq-dirty td { background: var(--alg-emerald-ghost); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .fo-side { position: static; }
  .fo-resume-b { padding: var(--sp-5); }
  .fo-thumb { min-height: 200px; }
  .fo-mark { font-size: 110px; }
  .fo-q { padding: var(--sp-4); }
  .fo-result { padding: var(--sp-4); }
  .fo-win { padding: var(--sp-6) var(--sp-4); }
  .su-hero { padding: var(--sp-5); gap: var(--sp-5); }
  .su-hero .su-next { border-left: 0; padding-left: 0; border-top: 1px solid var(--alg-border-strong); padding-top: var(--sp-5); }
  .su-call-body, .su-edit { margin-left: 0; }
  .su-switch select { min-width: 0; width: 100%; }
  .su-switch { flex-wrap: wrap; }
  .fo-resrow { grid-template-columns: minmax(0,1fr) 32px; }
  .fo-resrow input[type=url] { grid-column: 1 / 2; }
}

/* ---------- Clients : patrimoine du client (lecture seule) ---------- */
.su-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.su-kpi { background: var(--alg-surface-2); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); min-width: 0; }
.su-kpi .klb { margin-bottom: var(--sp-1); }
.su-kpi-v { font-family: var(--alg-font-display); font-size: 21px; color: var(--alg-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.su-kpi-v.gold { color: var(--alg-gold); }
.su-kpi-v.g { color: var(--alg-emerald-bright); }
.su-kpi-v.debt { color: var(--alg-debt); }
.su-pat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--sp-5); }
.su-pat-h { margin: 0 0 var(--sp-2); font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--alg-text-3); font-weight: 600; }
.su-pat-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: var(--sp-3); align-items: baseline; padding: 6px 0; border-top: 1px solid var(--alg-border); font-size: var(--fs-label); }
.su-pat-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-pat-row span:last-child { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.su-fiche .esp-hint { margin-top: -2px; }
.eq-off td { opacity: 0.6; }

/* ---------- Onglets sur téléphone ----------
   app.css fait tenir les 4 onglets historiques à l'écran (flex: 1). Une fois connecté, l'Espace en ajoute
   jusqu'à 4 : les onglets reprennent leur largeur naturelle et la barre défile horizontalement. */
@media (max-width: 480px) {
  body[data-role] .tab { flex: 0 0 auto; padding: var(--sp-3) 10px; }
}

/* Formation › Gérer les contenus : reprise de la progression LearnyBox */
.fo-pr-res { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--alg-border); border-bottom: 1px solid var(--alg-border); }
.fo-pr-res .esp-p { margin: 0; }
.fo-pr-d summary { min-height: 32px; display: flex; align-items: center; cursor: pointer; color: var(--alg-text-2); font-size: var(--fs-label); }
.fo-pr-d ul { margin: 4px 0 0; padding-left: 18px; max-height: 220px; overflow: auto; font-size: 13px; color: var(--alg-text-2); }
