/* static/style.css — Legacy Dashboard components (Inter + Geist Mono)
   NOTE: tokens (colors, fonts) are now in css/tokens.css via [data-theme].
   This file keeps only component-level rules for plan/analysis backward compat.
   The :root block below is a fallback for pages not using base_app.html.          */

/* ── NIGHT MODE (fallback — tokens.css [data-theme] takes precedence) ─── */
:root {
    --bg-main: #0a0a0a; --bg-card: #111111; --bg-card-alt: #181818;
    --border-color: #2a2a2a; --border-dash: #333;
    --text-main: #e8e8e8; --text-muted: #777; --text-dim: #444;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-code: 'Geist Mono', ui-monospace, monospace;

    --accent-blue: #4e88d8; --accent-green: #3daa74; --accent-red: #d85050; --accent-yellow: #c9a840;

    --sport-none-bg: #0a0a0a; --sport-none-dot: #333;
    --sport-swim-bg: rgba(78,136,216,0.18); --sport-swim-dot: #4e88d8;
    --sport-bike-bg: rgba(201,168,64,0.18); --sport-bike-dot: #c9a840;
    --sport-run-bg:  rgba(232,144,48,0.18); --sport-run-dot:  #e89030;
    --sport-renf-bg: rgba(160,100,220,0.18); --sport-renf-dot: #a064dc;

    --chart-line-1: #4e88d8; --chart-line-2: #c9a840; --chart-line-3: #d85050;
    --chart-fill: rgba(78,136,216,0.08); --chart-grid: rgba(255,255,255,0.08);

    --tsb-risk: #d85050; --tsb-optimal: #3daa74; --tsb-grey: #555; --tsb-transition: #c9a840; --tsb-fresh: #4e88d8;

    --status-green: #3daa74; --status-green-bg: rgba(61,170,116,0.10);
    --status-orange: #e89030; --status-orange-bg: rgba(232,144,48,0.10);
    --status-red: #d85050; --status-red-bg: rgba(216,80,80,0.10);
    --status-grey: #555; --status-grey-bg: rgba(85,85,85,0.08);
}

/* ── DAY MODE — dual compat: .light (old JS) AND [data-theme=light] (new) ── */
.light,
[data-theme="light"] {
    --bg-main: #f5f5f0; --bg-card: #ffffff; --bg-card-alt: #fafaf5;
    --border-color: #d0d0c8; --border-dash: #c0c0b8;
    --text-main: #1a1a1a; --text-muted: #5a5a5a; --text-dim: #888;

    --accent-blue: #2a60b0; --accent-green: #1e7a4e; --accent-red: #b03030; --accent-yellow: #8a6a10;

    --sport-none-bg: #fff; --sport-none-dot: #e0e0e0;
    --sport-swim-bg: rgba(42,96,176,0.14); --sport-swim-dot: #2a60b0;
    --sport-bike-bg: rgba(138,106,16,0.14); --sport-bike-dot: #8a6a10;
    --sport-run-bg:  rgba(184,96,16,0.14); --sport-run-dot:  #b86010;
    --sport-renf-bg: rgba(120,60,180,0.14); --sport-renf-dot: #783cb4;

    --chart-line-1: #2a60b0; --chart-line-2: #8a6a10; --chart-line-3: #b03030;
    --chart-fill: rgba(42,96,176,0.06); --chart-grid: rgba(0,0,0,0.08);

    --tsb-risk: #b03030; --tsb-optimal: #1e7a4e; --tsb-grey: #999; --tsb-transition: #8a6a10; --tsb-fresh: #2a60b0;

    --status-green: #1e7a4e; --status-green-bg: rgba(30,122,78,0.08);
    --status-orange: #b86010; --status-orange-bg: rgba(184,96,16,0.08);
    --status-red: #b03030; --status-red-bg: rgba(176,48,48,0.08);
    --status-grey: #999; --status-grey-bg: rgba(153,153,153,0.06);
}

/* ── BASE ────────────────────────────────────────────── */
/* When inside app-shell, body padding is 0 (reset.css handles it).
   When standalone (activity.html), the 20px padding is still useful. */
body:not(:has(.app-shell)) { padding: 20px; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: var(--font-ui); margin: 0; font-size: var(--text-base, 15px); line-height: 1.55; transition: background .25s, color .2s; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.container { max-width: 1400px; margin: 0 auto; }
.step-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: none; transition: background .25s, border-color .25s; }
.step-header { font-size: 13px; color: var(--text-muted); border-bottom: 1px dashed var(--border-color); padding-bottom: 8px; margin-bottom: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; font-family: var(--font-ui); }
.step-header::after { content: ''; flex: 1; margin-left: 10px; border-bottom: 1px dashed var(--border-color); }
.flex-row { display: flex; gap: 15px; flex-wrap: wrap; }
.flex-col { flex: 1; min-width: 230px; }
.metric-box { background: var(--bg-card-alt); border: 1px solid var(--border-color); padding: 10px 12px; border-radius: 6px; display: flex; flex-direction: column; transition: background .25s; }
.metric-val { font-size: 16px; font-weight: 800; color: var(--text-main); font-family: var(--font-code); }

.macro-editor { display: none; background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.macro-editor.active { display: block; }
.form-control { width: 100%; background: var(--bg-card-alt); border: 1px solid var(--border-color); color: var(--text-main); font-family: var(--font-ui); font-size: 12px; padding: 8px; border-radius: 4px; box-sizing: border-box; }

/* ── SLIDER (semantic gradient) ──────────────────────── */
.slider-container { position: relative; margin: 15px 0; }
input[type=range] { -webkit-appearance: none; -moz-appearance: none; appearance: none; width: 100%; background: transparent; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1px solid var(--border-color); background: linear-gradient(to right, var(--status-green) 0%, var(--status-green) 30%, var(--status-orange) 60%, var(--status-red) 100%); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: var(--bg-card); border: 3px solid var(--text-main); margin-top: -7px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.3); transition: transform .15s; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; border: 1px solid var(--border-color); background: linear-gradient(to right, var(--status-green) 0%, var(--status-green) 30%, var(--status-orange) 60%, var(--status-red) 100%); }
input[type=range]::-moz-range-thumb { height: 20px; width: 20px; border-radius: 50%; background: var(--bg-card); border: 3px solid var(--text-main); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.slider-ticks { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); font-weight: 600; margin-top: 5px; padding: 0 5px; font-family: var(--font-ui); }

/* ── CHARTS & DETAILS ────────────────────────────────── */
.chart-wrapper { height: 180px; width: 100%; margin-top: 15px; border-top: 1px dashed var(--border-color); padding-top: 10px; }
.split-box { margin-top: 8px; background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: 6px; padding: 8px 10px; font-size: 11px; color: var(--text-muted); font-family: var(--font-ui); }
.split-box strong { color: var(--text-main); font-size: 11px; }
ul.split-list { margin: 4px 0 0 0; padding-left: 15px; color: var(--text-main); font-weight: 700; font-size: 10px; }

/* ── CALENDRIER ──────────────────────────────────────── */
.grid-calendar { display: grid; grid-template-columns: 80px repeat(10, 1fr); gap: 6px; }
.grid-today-col { background: rgba(78,136,216,0.10) !important; border-color: var(--accent-blue) !important; }
.grid-nav-btn { background:var(--bg-card-alt); border:1px solid var(--border-color); color:var(--text-main); font-size:10px; padding:4px 10px; border-radius:4px; cursor:pointer; font-weight:700; font-family: var(--font-ui); transition: background .15s; }
.grid-nav-btn:hover { background: var(--bg-card); }
.grid-header { text-align: center; font-weight: 700; color: var(--text-muted); font-size: 11px; padding: 5px 0; font-family: var(--font-ui); }
.grid-row-label { display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: right; font-family: var(--font-ui); }

.slot-cell { background: var(--bg-card); border: 1px solid var(--border-color); height: 75px; border-radius: 6px; position: relative; display: flex; flex-direction: column; transition: background .2s, border-color .2s; }

/* Cell states — couleurs franches */
.slot-cell.cell-done { background: rgba(61,170,116,0.12); border: 2px solid var(--status-green); }
.slot-cell.cell-locked { background: rgba(61,170,116,0.06); border: 1px solid rgba(61,170,116,0.4); }
.slot-cell.cell-planned { background: rgba(78,136,216,0.06); border: 1px solid rgba(78,136,216,0.35); }
.slot-cell.cell-new-day { background: rgba(201,168,64,0.08); border: 1px dashed var(--accent-yellow); }
.slot-cell.cell-empty { background: var(--bg-card); border: 1px dashed var(--border-color); }

/* Column state overlays (applied to headers too) */
.grid-col-locked .grid-header { color: var(--status-green); }
.grid-col-new .grid-header { color: var(--accent-yellow); }
.weight-circle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--text-dim); opacity: 0.15; pointer-events: none; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* ── SPORT DISKS & CHECKBOX ──────────────────────────── */
.slot-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; padding: 4px; width: 100%; box-sizing: border-box; }
.sport-disk { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.15s ease; }
.sport-disk:hover { transform: scale(1.15); }
.slot-lock { accent-color: var(--text-muted); width: 14px; height: 14px; margin: 0; cursor: pointer; }

.slot-input { position: relative; z-index: 2; width: 40px; margin: auto; background: transparent; border: none; border-bottom: 1px solid var(--text-dim); text-align: center; font-family: var(--font-code); font-size: 12px; font-weight: 800; color: var(--text-main); transition: border-color .15s; }
.slot-input:focus { outline: none; border-bottom-color: var(--accent-blue); }

/* ── DAY CONSTRAINT BUTTONS ──────────────────────────── */
.day-constraint-btn { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px; font-size: 9px; font-weight: 700; color: var(--text-muted); cursor: pointer; padding: 4px 6px; transition: all 0.15s; font-family: var(--font-ui); }
.day-constraint-btn:hover { background: var(--bg-card-alt); color: var(--text-main); border-color: var(--text-dim); }
.active-free { background: var(--bg-card-alt) !important; border-color: var(--text-main) !important; color: var(--text-main) !important; box-shadow: 0 0 0 2px var(--text-dim) inset; }
.active-block { background: var(--bg-card-alt) !important; border-color: var(--text-muted) !important; color: var(--text-muted) !important; box-shadow: 0 0 0 2px var(--text-dim) inset; opacity: 0.6; }

/* ── BUTTONS & BOXES ─────────────────────────────────── */
.btn { font-family: var(--font-ui); font-weight: 600; font-size: 12px; padding: 10px 16px; border-radius: 6px; border: 1px solid var(--text-main); cursor: pointer; transition: all 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--text-main); color: var(--bg-main); }
.btn-primary:hover { opacity: 0.9; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.btn-warning { background: var(--bg-card-alt); color: var(--text-main); border: 1px dashed var(--text-muted); }
.alert-warn { background: var(--bg-card-alt); border: 1px dashed var(--text-muted); color: var(--text-main); padding: 12px; border-radius: 6px; margin-top: 15px; font-size: 11px; display: none; }
.alert-err  { background: var(--bg-card-alt); border: 1px solid var(--text-dim); color: var(--text-main); padding: 12px; border-radius: 6px; margin-top: 15px; font-size: 11px; display: none; }
.conflict-box { background: var(--bg-card-alt); border: 1px dashed var(--text-muted); color: var(--text-main); padding: 15px; border-radius: 6px; margin-top: 15px; display: none; }
.success-box { background: var(--bg-card-alt); border: 1px solid var(--status-green); color: var(--text-main); padding: 15px; border-radius: 6px; margin-top: 15px; display: none; }

.input-minimal {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-ui);
    font-size: 14px;
    padding: 6px 0;
    outline: none;
    color: var(--text-main);
    transition: border-color 0.2s;
    width: 100%;
}
.input-minimal:focus { border-bottom-color: var(--accent-blue); }
select.input-minimal { cursor: pointer; font-weight: 600; }

/* ==========================================================================
   DASHBOARD DIDACTIQUE — B&W
   ========================================================================== */

/* ── PALIERS & ROADMAP ───────────────────────────────── */
.step-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 11px; margin-bottom: 4px; font-family: var(--font-ui); }
.step-valid { background: var(--bg-card-alt); color: var(--text-muted); border: 1px solid var(--border-color); opacity: 0.7; border-left: 4px solid var(--status-green); }
.step-current { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--text-muted); font-weight: 700; border-left: 4px solid var(--accent-blue); }
.step-locked { background: var(--bg-card-alt); color: var(--text-dim); border: 1px dashed var(--border-color); }

/* ── FORM INDICATOR ──────────────────────────────────── */
.form-indicator { padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 10px; font-family: var(--font-ui); letter-spacing: 0.3px; }

/* ── READINESS STATUS (border-style differentiation) ── */
.status-box { font-size: 24px; font-weight: 800; padding: 20px; border-radius: 8px; border: 2px solid var(--text-main); text-align: center; font-family: var(--font-ui); }
.status-go     { background: var(--status-green-bg); color: var(--status-green); border: 2px solid var(--status-green); }
.status-adjust { background: var(--status-orange-bg); color: var(--status-orange); border: 2px solid var(--status-orange); }
.status-rest   { background: var(--status-red-bg); color: var(--status-red); border: 2px solid var(--status-red); }

/* legacy compat (used by template) */
.status-red    { background: var(--status-red-bg); color: var(--status-red); border: 2px solid var(--status-red); }
.status-orange { background: var(--status-orange-bg); color: var(--status-orange); border: 2px solid var(--status-orange); }
.status-green  { background: var(--status-green-bg); color: var(--status-green); border: 2px solid var(--status-green); }
.status-grey   { background: var(--status-grey-bg); color: var(--status-grey); border: 1px solid var(--status-grey); }

/* ── INDICATOR BOXES (Couzens) ───────────────────────── */
.indicator-box { padding: 8px 12px; border-radius: 6px; font-size: 11px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid var(--border-color); margin-bottom: 5px; background: var(--bg-card); transition: background .25s; font-family: var(--font-ui); }
.indicator-box.green  { border-left: 4px solid var(--status-green); }
.indicator-box.orange { border-left: 4px solid var(--status-orange); }
.indicator-box.red    { border-left: 4px solid var(--status-red); }
.indicator-box.grey   { border-left: 4px solid var(--status-grey); }

/* ── DIDACTIC & LOGIC ────────────────────────────────── */
.didactic-note { background: transparent; border-left: 2px solid var(--border-color); font-size: 10px; padding: 8px 12px; margin-top: 8px; margin-bottom: 8px; color: var(--text-dim); font-family: var(--font-ui); line-height: 1.5; border-radius: 0; }
.didactic-note strong { color: var(--text-muted); }
.didactic-note .ref { font-size: 9px; color: var(--text-dim); font-style: italic; display: block; margin-top: 4px; }
.logic-tree { background: var(--bg-card-alt); color: var(--text-muted); padding: 10px; border-radius: 6px; font-size: 9px; margin-top: 10px; font-family: var(--font-code); white-space: pre-wrap; border: 1px solid var(--border-color); }
.logic-highlight { color: var(--status-green); font-weight: bold; }
.logic-warn { color: var(--status-orange); font-weight: bold; }
.logic-err { color: var(--status-red); font-weight: bold; text-decoration: line-through; }

/* ── SCIENCE CALLOUT (new) ──────────────────────────── */
.science-callout { background: transparent; border: 1px solid var(--border-color); border-radius: 4px; padding: 8px 12px; margin: 8px 0; font-size: 10px; font-family: var(--font-ui); line-height: 1.55; color: var(--text-dim); }
.science-callout summary { font-weight: 500; color: var(--text-dim); font-size: 10px; cursor: pointer; user-select: none; padding: 2px 0; }
.science-callout summary::marker { color: var(--text-dim); }
.science-callout .ref { font-size: 9px; color: var(--text-dim); font-style: italic; margin-top: 4px; display: block; }

/* ── OLD THEME TOGGLE — hidden in app-shell, kept for activity.html standalone ── */
.app-shell ~ .theme-toggle,
.app-shell .theme-toggle-track { display: none; }
.theme-toggle {
    position: fixed; top: 12px; right: 16px; z-index: 100;
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 6px 14px;
    font-family: var(--font-ui); font-size: 9px; font-weight: 500; color: var(--text-muted);
    cursor: pointer; user-select: none;
    transition: background .2s, border-color .2s;
    backdrop-filter: blur(8px);
}
.theme-toggle:hover { border-color: var(--text-muted); }
.theme-toggle-track {
    width: 28px; height: 15px; border-radius: 8px;
    background: var(--text-dim); position: relative; transition: background .2s;
}
.light .theme-toggle-track,
[data-theme="light"] .theme-toggle-track { background: var(--text-muted); }
.theme-toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--text-main); transition: transform .2s;
}
.light .theme-toggle-thumb,
[data-theme="light"] .theme-toggle-thumb { transform: translateX(13px); }

/* ==========================================================================
   DASHBOARD — ANIMATIONS & DETAILS
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
details > summary::-webkit-details-marker { display: none; }
details > summary { list-style-type: none; }

.slot-cell { height: auto !important; min-height: 80px; padding-bottom: 10px; min-width: 0; }
.draggable-pill { max-width: 100%; box-sizing: border-box; overflow: hidden; }
.draggable-pill summary { flex-wrap: wrap; row-gap: 4px; }
.pill-type-label { white-space: normal; word-break: break-word; line-height: 1.1; }
.tsb-box { background: var(--bg-card); border: 1px solid var(--border-color); }

/* ── Pill states ── */
.draggable-pill { transition: opacity 0.15s, box-shadow 0.15s, transform 0.15s; }
.draggable-pill:not(.pill-locked):not(.ghost-pill) { box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.draggable-pill:not(.pill-locked):not(.ghost-pill):hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); transform: translateY(-1px); }
.pill-locked { opacity: 1; }
.pill-done { opacity: 0.85; }

.ghost-pill { opacity: 0.45; cursor: pointer; transition: all 0.2s ease; box-shadow: none !important; }
.ghost-pill:hover { opacity: 0.85; transform: scale(1.02); box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important; }
.ghost-pill::before { content: "Clic pour valider"; display: block; text-align: center; font-size: 8px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; background: var(--bg-card-alt); border-radius: 3px; font-family: var(--font-ui); padding: 1px 0; }

.step-item { padding: 8px 12px; border-radius: 6px; margin-bottom: 5px; font-size: 11px; background: var(--bg-card); border: 1px solid var(--border-color); font-family: var(--font-ui); }
.step-valid   { border-left: 4px solid var(--status-green); opacity: 0.72; }
.step-current { border-left: 4px solid var(--accent-blue); }
.step-locked  { border-left: 4px solid var(--text-dim); opacity: 0.45; }
.step-row1    { display: flex; align-items: center; gap: 7px; }
.step-row2    { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.step-badge   { font-size: 9px; padding: 2px 6px; border-radius: 3px; font-weight: 600; white-space: nowrap; font-family: var(--font-code); }
.badge-zone   { background: var(--bg-card-alt); color: var(--text-muted); }
.badge-time   { background: var(--bg-card-alt); border: 1px solid var(--border-color); color: var(--text-main); }
.badge-dec    { background: var(--bg-card-alt); border: 1px solid var(--border-color); color: var(--text-muted); }
.badge-ok     { background: var(--status-green-bg); color: var(--status-green); border: 1px solid var(--status-green); }
.badge-nok    { background: var(--bg-card-alt); color: var(--text-dim); border: 1px dashed var(--text-dim); }

.steps-tabs   { display: flex; gap: 0; margin-bottom: 10px; border-bottom: 2px solid var(--border-color); }
.steps-tab    { padding: 6px 16px; font-size: 11px; font-weight: 600; cursor: pointer; border: none; background: none; color: var(--text-dim); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; font-family: var(--font-ui); }
.steps-tab.active { color: var(--text-main); border-bottom-color: var(--accent-blue); }
.steps-panel  { display: none; }
.steps-panel.active { display: block; }
.step-item details[open] summary span { display: inline-block; transform: rotate(90deg); }

.weight-period-btn { padding:4px 10px; font-size:10px; font-weight:600; cursor:pointer; border:1px solid var(--border-color); background:var(--bg-card); color:var(--text-dim); border-radius:4px; transition:all .15s; font-family:var(--font-ui); }
.weight-period-btn.active { background:var(--accent-blue); color:var(--bg-main); border-color:var(--accent-blue); }
.weight-period-btn:hover:not(.active) { border-color:var(--accent-blue); color:var(--text-main); }

.grid-calendar { display: grid; grid-template-columns: 110px repeat(10, minmax(0, 1fr)); gap: 6px; align-items: start; }
.grid-row-label { font-size: 10px; font-weight: 600; display: flex; align-items: center; color: var(--text-main); font-family: var(--font-ui); }

/* ── ICS Agenda row ── */
.ics-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; position: relative; min-height: 22px; }
.ics-cell { font-size: 8px; color: var(--text-muted); overflow: hidden; max-height: 40px; line-height: 1.2; padding: 2px; z-index: 1; }
.ics-event { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ics-span {
    position: absolute; top: 0; height: 100%;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding: 0 6px; z-index: 0; pointer-events: auto;
    box-sizing: border-box;
    border: 1px solid;
}
.ics-span:hover { filter: brightness(1.15); }

#coachFeedbackContent h2 { font-size: 12px; margin: 16px 0 6px 0; color: var(--accent-blue); text-transform: uppercase; font-family: var(--font-ui); font-weight: 800; letter-spacing: 0.4px; padding-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--accent-blue) 25%, transparent); }
#coachFeedbackContent h2:first-child { margin-top: 0; }
#coachFeedbackContent p { margin: 0 0 10px 0; font-family: var(--font-ui); line-height: 1.7; }
#coachFeedbackContent ul { margin: 0 0 10px 20px; padding: 0; font-family: var(--font-ui); line-height: 1.7; }
#coachFeedbackContent li { margin-bottom: 4px; }
#coachFeedbackContent strong { color: var(--text-main); }
#coachFeedbackContent hr { border: none; border-top: 1px dashed var(--border-color); margin: 12px 0; }

.conclusion-go    { background: var(--status-green-bg); border-left: 4px solid var(--status-green); }
.conclusion-adjust{ background: var(--status-orange-bg); border-left: 4px solid var(--status-orange); }
.conclusion-rest  { background: var(--status-red-bg); border-left: 4px solid var(--status-red); }
.sig-critical { background: var(--status-red-bg); border-left: 4px solid var(--status-red); font-family: var(--font-ui); }
.sig-high     { background: var(--status-orange-bg); border-left: 4px solid var(--status-orange); font-family: var(--font-ui); }
.sig-medium   { background: var(--status-green-bg); border-left: 4px solid var(--status-green); font-family: var(--font-ui); }

.dc-badge-ok  { font-family: var(--font-code); font-size: 9px; background: var(--status-green-bg); color: var(--status-green); padding: 2px 6px; border-radius: 3px; border: 1px solid var(--status-green); }
.dc-badge-nok { font-family: var(--font-code); font-size: 9px; background: var(--bg-card-alt); color: var(--text-dim); padding: 2px 6px; border-radius: 3px; }
.dec-color-green { font-family: var(--font-code); font-size: 11px; font-weight: 700; color: var(--status-green); }
.dec-color-red   { font-family: var(--font-code); font-size: 11px; font-weight: 700; color: var(--status-red); }
.dec-color-grey  { font-family: var(--font-code); font-size: 11px; font-weight: 700; color: var(--text-dim); }

.ls-m { display:inline-flex; align-items:center; gap:4px; background:var(--bg-card-alt); border:1px solid var(--border-color); padding:3px 8px; border-radius:4px; font-family:var(--font-ui); }
.ls-l { color:var(--text-dim); font-size:9px; font-weight:500; }
.ls-v { color:var(--text-main); font-weight:700; font-size:11px; font-family:var(--font-code); }
.ls-hi { color:var(--text-main); }

.di-good   { font-weight: 700; color: var(--status-green); }
.di-ok     { font-weight: 700; color: var(--status-orange); }
.di-bad    { font-weight: 700; color: var(--status-red); }
.di-none   { color: var(--text-dim); }
.dc-progress-track { flex: 1; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden; }
.dc-progress-bar   { height: 100%; border-radius: 2px; transition: width 0.3s; }
.dc-bar-green  { background: var(--status-green); }
.dc-bar-yellow { background: var(--status-orange); }
.dc-bar-red    { background: var(--status-red); }

/* Gap Analysis — Race Readiness */
.gap-score-gauge { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.gap-score-num { font-size:28px; font-weight:800; line-height:1; font-family:var(--font-code); }
.gap-score-label { font-size:10px; font-weight:600; text-transform:uppercase; color:var(--text-muted); font-family:var(--font-ui); letter-spacing:0.3px; }
.gap-dim { display:flex; align-items:center; gap:8px; padding:5px 10px; border-radius:4px; margin-bottom:2px; background:transparent; border-bottom:1px solid var(--border-color); font-family:var(--font-ui); }
.gap-dim:last-child { border-bottom:none; }
.gap-dim-icon { font-size:10px; flex-shrink:0; width:14px; text-align:center; }
.gap-dim-name { font-size:10px; font-weight:600; min-width:110px; color:var(--text-muted); }
.gap-dim-bar-track { flex:1; height:4px; background:var(--border-color); border-radius:2px; overflow:hidden; min-width:60px; }
.gap-dim-bar-fill { height:100%; border-radius:2px; transition:width .4s ease; }
.gap-dim-pct { font-size:10px; font-weight:700; min-width:32px; text-align:right; font-family:var(--font-code); }
.gap-dim-detail { font-size:9px; color:var(--text-dim); min-width:140px; font-family:var(--font-code); }
.gap-recs { margin-top:8px; padding:8px 12px; background:var(--bg-card-alt); border:1px solid var(--border-color); border-radius:4px; }
.gap-rec-item { font-size:10px; padding:2px 0; line-height:1.5; font-family:var(--font-ui); color:var(--text-muted); }
.gap-rec-urgency-high { color:var(--text-main); }
.gap-rec-urgency-medium { color:var(--text-muted); }
.gap-rec-urgency-low { color:var(--text-dim); }

/* ==========================================================================
   DASHBOARD — SUIVI QUOTIDIEN
   ========================================================================== */
.missing-tag { display:inline-block; font-size:8px; padding:2px 6px; border-radius:3px; background:rgba(216,80,80,0.15); color:var(--status-red); font-weight:700; margin-left:4px; cursor:pointer; font-family:var(--font-ui); transition: opacity .15s; }
.missing-tag:hover { opacity: 0.8; }
.filled-tag { display:inline-block; font-size:8px; padding:2px 6px; border-radius:3px; background:rgba(61,170,116,0.15); color:var(--status-green); font-weight:700; margin-left:4px; font-family:var(--font-ui); }
.sq-input { width:100%; box-sizing:border-box; max-width:100%; background:var(--bg-card); border:1px solid var(--border-color); border-radius:4px; padding:6px 8px; color:var(--text-main); font-family:var(--font-ui); font-size:11px; transition: border-color .15s; }
.sq-input:focus { border-color: var(--accent-blue); outline: none; }
.sq-input-auto { width: auto; max-width: 100%; }
.sq-label { color:var(--text-muted); font-size:10px; display:block; margin-bottom:3px; font-family:var(--font-ui); font-weight:500; }
.sq-label-inline { display: inline; margin: 0; }
.sq-btn { font-size:10px; padding:6px 12px; margin-top:4px; }
.sq-btn-inline { margin: 0; }
.sq-col { flex:1; min-width:0; background:var(--bg-card-alt); border:1px solid var(--border-color); border-radius:6px; padding:12px; display:flex; flex-direction:column; gap:6px; overflow:hidden; }
.sq-col > * { max-width: 100%; }
.sq-col-wide { flex: 1.5; }
.sq-title { font-size:10px; font-weight:700; text-transform:uppercase; color:var(--text-muted); margin-bottom:2px; letter-spacing:0.3px; font-family:var(--font-ui); }
.sq-title-inline { margin: 0; }
.rpe-badge { display:inline-block; font-size:10px; font-weight:800; font-family:var(--font-code); padding:2px 8px; border-radius:4px; }

/* ==========================================================================
   DASHBOARD — UTILITY CLASSES (extracted from inline styles)
   ========================================================================== */

/* ── Layout helpers ── */
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-center { display: flex; align-items: center; }
.flex-baseline { display: flex; align-items: baseline; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col-layout { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-1-5 { flex: 1.5; }
.flex-2 { flex: 2; }
.min-w-0 { min-width: 0; }
.min-w-320 { min-width: 320px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.gap-15 { gap: 15px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-15 { margin-bottom: 15px; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-15 { margin-top: 15px; }
.pt-6 { padding-top: 6px; }
.pt-8 { padding-top: 8px; }
.pt-10 { padding-top: 10px; }
.p-8 { padding: 8px; }

/* ── Semantic dashboard classes ── */
.ascii-banner { font-family: var(--font-code); font-size: 9px; color: var(--text-dim); margin: 0 0 5px 0; line-height: 1.15; letter-spacing: 1px; }
.pipeline-header { font-size: 11px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 8px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-ui); }
.meth-link { font-size: 10px; color: var(--text-muted); text-decoration: none; font-weight: 600; border: 1px solid var(--border-color); padding: 4px 12px; border-radius: 4px; transition: border-color .15s; }
.macro-banner { background: var(--accent-blue); color: var(--bg-main); padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-ui); }
.macro-date { font-size: 10px; opacity: 0.8; font-family: var(--font-code); }
.metric-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.metric-label-xs { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.metric-val-lg { font-family: var(--font-code); font-size: 19px; font-weight: 800; }
.metric-val-xl { font-family: var(--font-code); font-size: 21px; font-weight: 800; margin-top: 2px; }
.metric-val-xxl { font-family: var(--font-code); font-size: 29px; font-weight: 800; line-height: 1; }
.metric-val-xxxl { font-family: var(--font-code); font-size: 37px; font-weight: 900; line-height: 1; }
.gauge-track { height: 4px; border-radius: 2px; background: var(--bg-card-alt); overflow: hidden; }
.gauge-bar { height: 100%; border-radius: 2px; }
.gauge-labels { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.gauge-pct { font-size: 9px; font-weight: 600; }
.gauge-detail { font-size: 9px; font-family: var(--font-code); color: var(--text-dim); }
.sep-dashed { margin-top: 10px; padding-top: 6px; border-top: 1px dashed var(--border-color); }
.sep-dashed-lg { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--border-color); }
.sport-stats { font-size: 11px; margin-top: 8px; font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; }
.sport-trend { color: var(--text-dim); font-weight: 400; font-size: 10px; }
.tiz-block { font-family: var(--font-code); font-size: 9px; margin-top: 10px; padding-top: 6px; border-top: 1px dashed var(--border-color); line-height: 1.5; }
.vol-dim { font-size: 10px; color: var(--text-dim); }
.section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.3px; }
.section-label-xs { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 0.3px; }
.durability-label { font-size: 9px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.durability-detail { font-size: 10px; margin-top: 4px; line-height: 1.7; }
.durability-link { font-size: 9px; color: var(--text-dim); margin-top: 3px; cursor: pointer; }
.di-inline { font-size: 9px; font-family: var(--font-code); }

/* ── Decision / Readiness ── */
.decision-box { font-size: 22px; font-weight: 800; padding: 16px; border-radius: 8px; font-family: var(--font-ui); }
.decision-score { font-size: 14px; font-family: var(--font-code); opacity: 0.8; }
.action-box { margin-top: 10px; padding: 12px 14px; border-radius: 6px; }
.action-box-sm { margin-top: 10px; padding: 10px 12px; border-radius: 6px; }
.action-title { font-size: 13px; font-weight: 700; font-family: var(--font-ui); }
.action-desc { font-size: 11px; color: var(--text-main); margin-top: 4px; line-height: 1.5; }
.impact-box { margin-top: 8px; padding: 8px; background: var(--bg-card); border-radius: 4px; border: 1px solid var(--border-color); }
.impact-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.impact-original { text-decoration: line-through; color: var(--text-muted); }
.impact-arrow { font-weight: 800; }
.impact-new { font-weight: 800; font-family: var(--font-code); }
.impact-zone-badge { background: var(--bg-card-alt); padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 800; }
.impact-desc { font-size: 10px; color: var(--text-muted); margin-top: 6px; }
.impact-session-row { padding: 6px 0; border-bottom: 1px dashed var(--border-color); }
.impact-session-row:last-of-type { border-bottom: none; }
.impact-session-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.impact-slot-tag { font-size: 9px; font-weight: 700; color: var(--text-muted); background: var(--bg-card-alt); padding: 1px 5px; border-radius: 3px; letter-spacing: 0.3px; }
.impact-class-tag { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.3px; }
.impact-class-intense { background: var(--status-red-bg); color: var(--status-red); }
.impact-class-moderate { background: var(--status-orange-bg); color: var(--status-orange); }
.impact-class-easy { background: var(--status-green-bg); color: var(--status-green); }
.impact-zone-tag { background: var(--bg-card-alt); padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 800; }
.impact-new-reduced { color: var(--status-orange); }
.impact-new-cancelled { color: var(--status-red); }
.impact-new-kept { color: var(--status-green); }
.impact-total-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border-color); font-size: 11px; }
.impact-actions { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.btn-apply-adjustment { background: var(--status-orange); color: #fff; border: none; padding: 8px 12px; border-radius: 4px; font-size: 11px; font-weight: 800; cursor: pointer; text-transform: uppercase; letter-spacing: 0.3px; font-family: var(--font-ui); }
.btn-apply-adjustment:hover { filter: brightness(1.1); }
.btn-apply-adjustment:disabled { opacity: 0.5; cursor: not-allowed; }
.impact-actions-hint { font-size: 9px; color: var(--text-muted); font-style: italic; }
.conclusion-box { margin-top: 12px; padding: 12px 14px; border-radius: 6px; text-align: left; }
.tss-reco-box { margin-top: 8px; padding: 6px 8px; background: var(--bg-card); border-radius: 4px; border: 1px solid var(--border-color); font-size: 11px; }
.signals-col { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.signal-item { padding: 7px 9px; border-radius: 4px; font-size: 10px; }
.signal-rationale { margin-top: 3px; color: var(--text-muted); font-style: italic; }
.signal-action { margin-top: 3px; color: var(--text-main); }
.indicators-col { margin-top: 12px; border-top: 1px dashed var(--border-color); padding-top: 10px; display: flex; flex-direction: column; }
.indicator-key { text-transform: uppercase; font-size: 10px; }
.indicator-detail { color: var(--text-muted); font-family: var(--font-code); font-size: 10px; }
.signal-card { padding: 6px 10px; border-radius: 4px; background: var(--bg-card-alt); border: 1px solid var(--border-color); font-size: 10px; font-family: var(--font-ui); line-height: 1.5; }

/* Toggles "Méthode & science" — visibles et cliquables */
.toggle-method { margin-top: 6px; }
.toggle-method > summary {
    cursor: pointer;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-dim);
    list-style: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    transition: color 0.15s, border-color 0.15s;
    font-family: var(--font-ui);
}
.toggle-method > summary:hover {
    color: var(--text-muted);
    border-color: var(--text-dim);
}
.toggle-method > summary::-webkit-details-marker { display: none; }
.toggle-method > summary::before { content: "▸"; font-size: 9px; transition: transform 0.15s; display: inline-block; }
.toggle-method[open] > summary::before { transform: rotate(90deg); }
.toggle-method > div {
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.55;
    padding: 6px 10px;
    margin-top: 4px;
    background: var(--bg-card);
    border-left: 2px solid var(--border-color);
    border-radius: 0 4px 4px 0;
}
.toggle-method > div strong { color: var(--text-muted); }

/* Toggle "[?]" — variante compacte inline */
.toggle-inline { display: inline-block; margin-left: 4px; }
.toggle-inline > summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-blue);
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 50%;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
    vertical-align: middle;
}
.toggle-inline > summary:hover { background: rgba(74, 144, 226, 0.25); }
.toggle-inline > summary::-webkit-details-marker { display: none; }
.toggle-inline > summary::before { content: "?"; }
.toggle-inline > div {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-top: 6px;
    padding: 8px 10px;
    background: var(--bg-card);
    border-left: 3px solid var(--accent-blue);
    border-radius: 0 4px 4px 0;
}
.toggle-inline > div strong { color: var(--text-main); }
.confidence-note { font-size: 10px; color: var(--text-dim); margin-top: 4px; font-style: italic; }
.no-data-msg { padding: 20px; text-align: center; color: var(--text-dim); font-size: 12px; }
.sub-desc { font-size: 11px; font-weight: 400; color: var(--text-dim); margin: -10px 0 10px 0; line-height: 1.45; max-width: 80ch; }
.font-bold { font-weight: 700; }
.font-800 { font-weight: 800; }
.font-code { font-family: var(--font-code); }
.font-ui { font-family: var(--font-ui); }
.color-main { color: var(--text-main); }
.color-muted { color: var(--text-muted); }
.color-dim { color: var(--text-dim); }
.color-green { color: var(--status-green); }
.color-orange { color: var(--status-orange); }
.color-red { color: var(--status-red); }
.color-blue { color: var(--accent-blue); }
.fs-9 { font-size: 11px; }
.fs-10 { font-size: 12px; }
.fs-11 { font-size: 13px; }
.fs-12 { font-size: 14px; }
.fs-13 { font-size: 15px; }
.fs-16 { font-size: 18px; }
.fs-22 { font-size: 24px; }
.lh-1-5 { line-height: 1.5; }
.lh-1-6 { line-height: 1.6; }
.lh-1-7 { line-height: 1.7; }

/* ── Roadmap ── */
.roadmap-container { display: flex; height: 35px; border-radius: 6px; overflow: visible; background: var(--bg-card-alt); position: relative; }
.race-marker { position: absolute; right: 0; top: -35px; background: var(--text-main); color: var(--bg-main); padding: 5px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; z-index: 20; font-family: var(--font-ui); }
.race-marker-arrow { position: absolute; bottom: -5px; right: 20px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--text-main); }
.roadmap-wrapper { position: relative; margin: 40px 0 20px 0; }

/* ── Phase rules ── */
.phase-rules { flex: 1.5; background: var(--bg-card); border: 1px solid var(--border-color); padding: 14px; border-radius: 6px; font-size: 11px; }
.phase-title { font-weight: 700; color: var(--text-main); margin-bottom: 10px; font-size: 12px; text-transform: uppercase; font-family: var(--font-ui); letter-spacing: 0.3px; }
.phase-rule-line { margin-bottom: 6px; line-height: 1.5; }
.phase-rule-label { font-weight: 600; }
.phase-rule-value { font-family: var(--font-code); font-size: 10px; }

/* ── Coach IA card ── */
.coach-card { position: relative; border: 1px solid color-mix(in srgb, var(--accent-blue) 40%, transparent); background: linear-gradient(135deg, var(--bg-card) 0%, color-mix(in srgb, var(--accent-blue) 4%, var(--bg-card)) 100%); }
.coach-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.coach-badge { font-size: 8px; font-weight: 700; padding: 3px 8px; border-radius: 3px; background: color-mix(in srgb, var(--accent-blue) 20%, transparent); color: var(--accent-blue); letter-spacing: 0.5px; text-transform: uppercase; font-family: var(--font-code); }
.coach-btn { background: var(--accent-blue); color: #fff; font-size: 10px; padding: 8px 18px; font-weight: 700; border: none; letter-spacing: 0.3px; display: flex; align-items: center; gap: 8px; }
.coach-cost { font-size: 8px; opacity: 0.7; font-family: var(--font-code); background: rgba(255,255,255,0.15); padding: 2px 6px; border-radius: 3px; }
.coach-desc { font-size: 10px; font-weight: 500; color: var(--text-dim); margin-top: 6px; line-height: 1.4; }
.coach-result { display: none; margin-top: 15px; }
.coach-content { font-size: 12px; color: var(--text-main); line-height: 1.7; font-family: var(--font-ui); }
.coach-timestamp { font-size: 8px; color: var(--text-dim); font-family: var(--font-code); }
.coach-loading { display: none; text-align: center; padding: 30px 0; }
.coach-loading-text { font-size: 11px; color: var(--text-muted); font-family: var(--font-ui); }
.coach-spinner { margin-top: 8px; width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--accent-blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 12px auto 0; }
.coach-history-summary { cursor: pointer; font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-family: var(--font-ui); user-select: none; }
.coach-history-content { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* ── Solver ── */
.solver-wrapper { background: var(--bg-main); border: 1px solid var(--border-color); padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.solver-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.tss-display { font-weight: 800; font-size: 22px; color: var(--text-main); line-height: 1; font-family: var(--font-code); }
.time-display { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.weekly-display { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.slider-warning { font-size: 10px; font-weight: 800; text-align: center; color: var(--text-muted); }
.resize-btn { background: var(--bg-card-alt); border: 1px solid var(--border-color); color: var(--text-muted); font-size: 11px; padding: 2px 8px; border-radius: 4px; cursor: pointer; font-weight: 700; line-height: 1.2; }
.chart-legend { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: nowrap; margin-top: 6px; font-size: 9px; font-weight: 600; color: var(--text-muted); white-space: nowrap; font-family: var(--font-ui); }
.proj-feedback { padding: 8px 12px; border-radius: 4px; font-size: 11px; margin-top: 8px; border-left: 4px solid; font-weight: 600; }
.deploy-desc { font-size: 10px; color: var(--text-muted); margin-bottom: 15px; line-height: 1.6; font-family: var(--font-ui); }
.rules-details { margin-top: 10px; font-size: 11px; font-family: var(--font-ui); }
.rules-content { padding: 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px; margin-top: 6px; }
.rules-textarea { width: 100%; border: 1px solid var(--border-color); border-radius: 4px; font-family: var(--font-ui); font-size: 11px; padding: 8px; box-sizing: border-box; background: var(--bg-card-alt); color: var(--text-main); }
.sport-targets { min-height: 100px; padding: 10px; background: var(--bg-card-alt); border: 2px dashed var(--border-color); border-radius: 8px; margin-top: 10px; }
.tiz-profile-box { margin-top: 15px; background: var(--bg-card-alt); padding: 12px; border-radius: 6px; font-family: var(--font-code); font-size: 10px; color: var(--text-main); line-height: 1.5; border: 1px solid var(--border-color); }
.grid-footer { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color); display: flex; justify-content: flex-end; font-weight: 700; font-family: var(--font-ui); font-size: 12px; }
.live-tss { font-size: 16px; font-family: var(--font-code); font-weight: 800; }
.deploy-btns { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.btn-lock { background: var(--bg-card-alt); color: var(--text-main); border: 2px solid var(--text-main); font-weight: 700; }
.btn-auto { font-size: 10px; padding: 8px 14px; }
.btn-reopt { font-size: 10px; padding: 8px 14px; background: var(--bg-card-alt); color: var(--text-main); border: 1px solid var(--text-muted); }
.reset-reco-btn { display: none; font-size: 9px; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--text-muted); background: var(--bg-card-alt); color: var(--text-main); font-weight: 800; cursor: pointer; white-space: nowrap; }

/* ── Calendar legend ── */
.cal-legend { display: flex; gap: 14px; font-size: 10px; font-weight: 500; margin-bottom: 8px; color: var(--text-muted); font-family: var(--font-ui); flex-wrap: wrap; }
.cal-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.cal-dot-done { border: 2px solid var(--status-green); background: rgba(61,170,116,0.20); }
.cal-dot-locked { border: 1px solid rgba(61,170,116,0.5); background: rgba(61,170,116,0.10); }
.cal-dot-planned { border: 1px solid rgba(78,136,216,0.5); background: rgba(78,136,216,0.12); }
.cal-dot-auto { border: 1px dashed var(--accent-yellow); background: rgba(201,168,64,0.12); }
.cal-dot-empty { border: 1px dashed var(--border-color); background: var(--bg-card); }
.cal-dot-today { border: 1px solid var(--accent-blue); background: rgba(78,136,216,0.10); border-radius: 2px; }

/* ── Readiness dots ── */
.readiness-dots { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 8px; }
.readiness-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Step details (paliers) ── */
.step-desc { font-size: 10px; color: var(--text-muted); margin: 2px 0 2px 22px; line-height: 1.4; }
.step-detail-toggle summary { cursor: pointer; color: var(--accent-blue); font-size: 9px; font-weight: 600; list-style: none; display: inline; }
.step-detail-toggle summary .arrow { font-size: 8px; }
.step-detail-body { margin-top: 3px; padding: 4px 8px; background: var(--bg-card-alt); border-radius: 4px; color: var(--text-main); font-size: 10px; line-height: 1.5; }
.step-source { font-size: 9px; color: var(--text-dim); margin-top: 3px; font-style: italic; }
.step-no-data { font-size: 10px; color: var(--text-muted); padding: 8px; background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: 4px; }
.steps-rationale { display: flex; gap: 8px; align-items: flex-start; font-size: 10px; line-height: 1.5; color: var(--text-dim); padding: 6px 10px; margin-bottom: 8px; background: transparent; border-left: 2px solid var(--border-color); border-radius: 0; }
.steps-rationale-icon { font-size: 12px; flex-shrink: 0; }

/* ── Weight panel ── */
.weight-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.weight-stat { text-align: center; padding: 8px; }
.weight-chart-wrapper { position: relative; height: 220px; }
.weight-chart-hint { font-size: 8px; color: var(--text-dim); margin-top: 4px; text-align: center; }

/* ── Session feedback ── */
.session-nav { display: flex; gap: 4px; align-items: center; }
.session-nav-btn { font-size: 9px; padding: 2px 6px; }
.session-index { font-size: 9px; color: var(--text-muted); font-family: var(--font-code); }
.session-loading { font-size: 9px; color: var(--text-dim); }
.session-feedback { padding-top: 6px; border-top: 1px dashed var(--border-color); display: none; font-size: 10px; }
.session-feedback-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.session-feedback-field { display: flex; align-items: center; gap: 4px; min-width: 0; }
.session-feedback-field select { max-width: 100%; }
.session-result { font-size: 9px; color: var(--status-green); display: none; }
.deep-stats-toggle { margin-top: 4px; }
.deep-stats-summary { font-family: var(--font-code); font-size: 9px; color: var(--text-muted); cursor: pointer; padding: 3px 0; user-select: none; }
.deep-stats-body { padding-top: 8px; border-top: 1px dashed var(--border-color); }

/* ── Grid layouts for dashboard ── */
.grid-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid-2col > * { min-width: 0; }
.grid-4col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ── Misc dashboard ── */
.step-card-yellow { border-left: 4px solid var(--accent-yellow); }
.step-card-muted { border-left: 4px solid var(--text-muted); }
.tabs-flush { margin-bottom: 0; flex: 1; }
.mc-result { font-size: 9px; color: var(--status-green); }
.rpe-badge-default { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); }
.sq-input-mb { margin-bottom: 4px; }

/* ==========================================================================
   METHODOLOGY PAGE
   ========================================================================== */
.meth-section { margin-bottom: 28px; }
.meth-section h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-blue); border-bottom: 2px solid var(--border-color); padding-bottom: 6px; margin: 0 0 12px 0; }
.meth-section h3 { font-size: 11px; font-weight: 700; color: var(--text-main); margin: 14px 0 6px 0; }
.meth-section p { font-size: 11px; color: var(--text-muted); margin: 0 0 8px 0; line-height: 1.6; }
.meth-section p strong { color: var(--text-main); }

.meth-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px 0; font-size: 10px; }
.meth-table th { text-align: left; padding: 5px 8px; background: var(--bg-card-alt); border: 1px solid var(--border-color); color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 9px; letter-spacing: 0.5px; }
.meth-table td { padding: 5px 8px; border: 1px solid var(--border-color); color: var(--text-main); vertical-align: top; }
.meth-table tr:nth-child(even) td { background: var(--bg-card-alt); }

.ref { font-size: 10px; color: var(--text-dim); font-style: italic; display: block; margin: 2px 0; padding-left: 12px; border-left: 2px solid var(--border-color); }
.critique { background: transparent; border-left: 2px solid var(--text-dim); padding: 6px 10px; border-radius: 0; margin: 8px 0; font-size: 10px; color: var(--text-dim); }
.critique strong { color: var(--text-muted); }
.choix { background: transparent; border-left: 2px solid var(--text-dim); padding: 6px 10px; border-radius: 0; margin: 8px 0; font-size: 10px; color: var(--text-dim); }
.choix strong { color: var(--text-muted); }

.back-link { font-size: 10px; color: var(--text-dim); text-decoration: none; font-weight: 700; }
.back-link:hover { color: var(--text-main); }

.meth-banner { font-size: 11px; font-weight: 800; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 8px; margin-bottom: 16px; }
.meth-intro { font-size: 11px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.7; }
.meth-footer { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--border-color); font-size: 9px; color: var(--text-dim); }

/* ==========================================================================
   RESPONSIVE — MOBILE & TABLET
   ========================================================================== */

/* ── Tablet / phone landscape ───────────────────────── */
@media (max-width: 768px) {
    body { padding: 12px; }
    .grid-calendar { overflow-x: auto; }
    .flex-row { gap: 10px; }
    .chart-wrapper { height: 150px; }
}

/* ── Phone portrait ─────────────────────────────────── */
@media (max-width: 480px) {
    body { padding: 8px; font-size: 14px; }
    .step-card { padding: 12px; margin-bottom: 12px; }
    .step-card > [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .flex-row { flex-direction: column; gap: 10px; }
    .flex-col { min-width: 100%; }

    /* Typography floor */
    .slider-ticks, .day-constraint-btn, .logic-tree,
    ul.split-list, .step-badge, .theme-toggle { font-size: 11px; }
    .split-box, .didactic-note, .form-indicator, .step-item { font-size: 12px; }

    /* Touch targets */
    .btn { padding: 12px 16px; font-size: 13px; min-height: 44px; }
    .day-constraint-btn { padding: 6px 8px; min-height: 36px; }
    .sport-disk { width: 28px; height: 28px; }
    .slot-lock { width: 18px; height: 18px; }
    .theme-toggle { padding: 8px 14px; }

    /* Slider thumb bigger for touch */
    input[type=range]::-webkit-slider-thumb { height: 24px; width: 24px; margin-top: -9px; }
    input[type=range]::-moz-range-thumb { height: 24px; width: 24px; }

    /* Status box readable */
    .status-box { font-size: 18px; padding: 14px; }

    /* Journal responsive */
    .journal-grid { grid-template-columns: 1fr !important; }
    .journal-nav { flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════════════════
   JOURNAL — vue hebdomadaire prevu / realise / coach
   ══════════════════════════════════════════════════════════ */

.journal-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 18px; padding: 10px 0; }
.journal-week-label { font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: var(--text-main); min-width: 240px; text-align: center; }

.journal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.journal-loading { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--text-muted); font-size: 12px; }

.journal-week-summary { grid-column: 1 / -1; display: flex; gap: 20px; justify-content: center; padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px; margin-bottom: 4px; }
.journal-week-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.journal-stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); font-weight: 600; }
.journal-stat-val { font-family: var(--font-code); font-size: 16px; font-weight: 800; color: var(--text-main); }

.journal-day { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-height: 180px; transition: background .25s, border-color .25s; }
.journal-day-today { border-color: var(--accent-blue); background: rgba(78,136,216,0.06); }
.journal-day-future { opacity: 0.5; }

.journal-day-header { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--border-color); }
.journal-day-name { font-weight: 800; font-size: 12px; color: var(--text-main); font-family: var(--font-ui); }
.journal-day-date { font-family: var(--font-code); font-size: 11px; color: var(--text-muted); }
.journal-today-badge { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: var(--accent-blue); color: #fff; text-transform: uppercase; letter-spacing: 0.3px; }
.journal-morning-badge { font-size: 9px; font-weight: 700; font-family: var(--font-code); padding: 1px 5px; border-radius: 3px; margin-left: auto; }
.journal-morning-badge.badge-good { background: var(--status-green-bg); color: var(--status-green); }
.journal-morning-badge.badge-mid { background: var(--status-orange-bg); color: var(--status-orange); }
.journal-morning-badge.badge-low { background: var(--status-red-bg); color: var(--status-red); }

.journal-section { padding: 4px 0; }
.journal-section-title { font-size: 8px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 3px; }

/* Planned */
.journal-section-planned { border-left: 2px solid var(--text-dim); padding-left: 6px; }
.journal-planned-item { display: flex; flex-direction: column; gap: 1px; margin-bottom: 3px; }
.journal-planned-detail { font-size: 9px; color: var(--text-muted); font-family: var(--font-code); }

/* Activities */
.journal-section-actual { border-left: 2px solid var(--status-green); padding-left: 6px; }
.journal-activity-item { margin-bottom: 4px; }
.journal-activity-detail { font-size: 9px; color: var(--text-muted); font-family: var(--font-code); line-height: 1.4; }

/* Sport badges */
.journal-sport-badge { font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; white-space: nowrap; }
.journal-sport-badge.sport-swim { background: var(--sport-swim-bg); color: var(--sport-swim-dot); }
.journal-sport-badge.sport-bike { background: var(--sport-bike-bg); color: var(--sport-bike-dot); }
.journal-sport-badge.sport-run { background: var(--sport-run-bg); color: var(--sport-run-dot); }
.journal-sport-badge.sport-renf { background: var(--sport-renf-bg); color: var(--sport-renf-dot); }

/* Delta prevu/realise */
.journal-delta { font-size: 9px; font-family: var(--font-code); padding: 3px 6px; border-radius: 4px; text-align: center; }
.journal-delta-ok { background: var(--status-green-bg); color: var(--status-green); }
.journal-delta-over { background: var(--status-orange-bg); color: var(--status-orange); }
.journal-delta-under { background: var(--status-orange-bg); color: var(--status-orange); }
.journal-delta-miss { background: var(--status-red-bg); color: var(--status-red); }
.journal-delta-extra { background: var(--sport-bike-bg); color: var(--sport-bike-dot); }

/* Session feedback */
.journal-section-feedback { font-size: 9px; color: var(--text-muted); }
.journal-feedback-item { padding: 2px 0; }

/* Nutrition */
.journal-section-nutri { display: flex; align-items: center; gap: 8px; font-size: 9px; font-family: var(--font-code); padding: 3px 0; }
.journal-nutri-val { font-weight: 700; color: var(--text-main); }
.journal-nutri-macros { color: var(--text-muted); }

/* Coach IA */
.journal-section-coach { background: var(--bg-card-alt); border: 1px solid var(--border-color); border-radius: 4px; padding: 6px; }
.journal-coach-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.journal-coach-text { font-size: 10px; line-height: 1.5; color: var(--text-main); max-height: 120px; overflow-y: auto; }
.journal-coach-text p { margin: 0 0 4px 0; }
.journal-coach-text ul, .journal-coach-text ol { margin: 2px 0; padding-left: 16px; }
.journal-coach-text li { margin-bottom: 2px; }

.journal-readiness-badge { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.3px; }
.journal-readiness-push { background: var(--status-green-bg); color: var(--status-green); }
.journal-readiness-maintain { background: var(--status-orange-bg); color: var(--status-orange); }
.journal-readiness-absorb { background: var(--status-red-bg); color: var(--status-red); }
.journal-decision-badge { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Notes */
.journal-section-note { margin-top: auto; }
.journal-note-input { width: 100%; box-sizing: border-box; min-height: 44px; background: var(--bg-card-alt); border: 1px solid var(--border-color); border-radius: 4px; padding: 5px 7px; color: var(--text-main); font-family: var(--font-ui); font-size: 10px; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.journal-note-input:focus { border-color: var(--accent-blue); outline: none; box-shadow: 0 0 0 2px rgba(78,136,216,0.15); }
.journal-note-input.journal-note-saved { border-color: var(--status-green); }
.journal-note-readonly { font-size: 10px; color: var(--text-muted); font-style: italic; padding: 4px 0; }
.journal-note-empty { font-size: 9px; color: var(--text-dim); }

/* ── GLYCOGÈNE BAR ─────────────────────────────────── */
.glyco-bar {
    width: 100%; height: 10px;
    background: var(--bg-card-alt);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.glyco-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease, background 0.3s ease;
}
.glyco-projected .glyco-fill {
    opacity: 0.5;
}
.glyco-projected {
    border-style: dashed;
}
.glyco-label {
    display: block;
    text-align: center;
    font-size: 8px;
    font-weight: 700;
    font-family: var(--font-code);
    margin-top: 1px;
    line-height: 1.2;
}

/* ── Tendance semaine synthèse (3 niveaux) ────────────────────────────── */
.ts-action { padding: 10px 14px; border-radius: 6px; background: var(--bg-card-alt, var(--bg-card)); border-left: 3px solid var(--text-muted); font-family: var(--font-ui); margin-top: 4px; }
.ts-action-red    { border-left-color: var(--status-red); }
.ts-action-orange { border-left-color: var(--status-orange); }
.ts-action-green  { border-left-color: var(--status-green); }
.ts-action-neutral{ border-left-color: var(--text-muted); }
.ts-action-title  { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.ts-action-body   { font-size: 11px; color: var(--text-muted); line-height: 1.55; }
.ts-action-body strong { color: var(--text-main); }
.ts-target-val    { color: var(--text-main); font-size: 12px; font-weight: 800; }
.ts-note-dim      { font-size: 10px; color: var(--text-dim); font-style: italic; }

.ts-decorr-badge {
    font-size: 10px; color: var(--text-muted); margin-top: 6px;
    padding: 5px 10px; background: var(--bg-card-alt);
    border-left: 2px solid var(--text-dim); border-radius: 4px;
    font-family: var(--font-ui); line-height: 1.5;
}

.ts-toggle {
    margin-top: 8px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.ts-toggle > summary {
    cursor: pointer;
    padding: 10px 12px;
    font-size: 12px;
    font-family: var(--font-ui);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    list-style: none;
    gap: 10px;
}
.ts-toggle > summary::-webkit-details-marker { display: none; }
.ts-toggle > summary::after {
    content: '▾';
    font-size: 10px;
    color: var(--text-dim);
    margin-left: 6px;
    transition: transform 0.15s ease;
}
.ts-toggle[open] > summary::after { transform: rotate(180deg); }
.ts-toggle-label { font-weight: 700; color: var(--text-muted); }
.ts-toggle-val   { font-family: var(--font-code); font-weight: 800; font-size: 13px; margin-left: auto; }
.ts-toggle-body  {
    padding: 10px 12px 12px 12px;
    border-top: 1px dashed var(--border-color);
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.55;
}
.ts-toggle-red    { border-left: 3px solid var(--status-red); }
.ts-toggle-orange { border-left: 3px solid var(--status-orange); }

.ts-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    font-size: 12px;
    font-family: var(--font-ui);
}
.ts-kv-row + .ts-kv-row { border-top: 1px dashed var(--border-color); }
.ts-kv-row > span { color: var(--text-dim); }
.ts-kv-note {
    margin-top: 8px;
    padding: 6px 10px;
    background: var(--bg-card);
    border-left: 2px solid var(--text-dim);
    border-radius: 0 4px 4px 0;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.5;
}

.ts-formula-footer {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--bg-card);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.55;
    font-family: var(--font-ui);
}

.ts-rebuild-gap {
    background: var(--bg-card);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 2px solid var(--border-color);
    margin-bottom: 10px;
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--text-muted);
}
.ts-rebuild-gap strong { color: var(--text-main); }

.ts-block-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 8px 0 4px 0;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ts-plan-list {
    margin: 0 0 10px 0;
    padding-left: 16px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
    font-family: var(--font-ui);
}
.ts-plan-list strong { color: var(--text-main); }
.ts-plan-list-muted { color: var(--text-muted); }
.ts-plan-list-muted strong { color: var(--text-main); }

.ts-warning-box {
    padding: 8px 10px;
    background: var(--bg-card);
    border-left: 2px solid var(--text-dim);
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.55;
    font-family: var(--font-ui);
}
.ts-warning-box strong { color: var(--text-main); }
.ts-warning-box ul { margin: 4px 0 0 0; padding-left: 14px; }

.ts-leviers-list {
    margin: 0;
    padding-left: 16px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
    font-family: var(--font-ui);
}
.ts-leviers-list > li + li { margin-top: 4px; }
.ts-levier-actions { color: var(--text-dim); font-size: 10px; }
.ts-impact { color: var(--text-dim); font-size: 9px; }
.ts-principle {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-color);
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.55;
    font-family: var(--font-ui);
}
.ts-confidence-note {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 4px;
    font-style: italic;
}

/* Responsive: tablette */
@media (max-width: 1100px) {
    .journal-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .journal-grid { grid-template-columns: repeat(2, 1fr); }
    .journal-day { min-height: 140px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAV TOP 3-tabs — partagé entre /today, /plan, /analysis
   ═══════════════════════════════════════════════════════════════════════════ */
.main-nav {
    display: flex;
    gap: 6px;
    margin: 12px 0 18px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-ui);
}
.main-nav-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.main-nav-tab:hover {
    color: var(--text-main);
    background: var(--bg-card-alt);
}
.main-nav-tab.active {
    color: var(--accent-yellow);
    background: var(--bg-card-alt);
    box-shadow: inset 0 -2px 0 var(--accent-yellow);
}
.main-nav-ico { font-size: 14px; }
@media (max-width: 600px) {
    .main-nav-lbl { display: none; }
    .main-nav-ico { font-size: 18px; }
    .main-nav-tab { padding: 12px 10px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERT BANNERS — partials _global_alerts.html
   ═══════════════════════════════════════════════════════════════════════════ */
.alert-banner {
    margin: 12px 0;
    padding: 14px 18px;
    border-radius: 8px;
    font-family: var(--font-ui);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.alert-banner-success { background: var(--status-green-bg); border: 2px solid var(--status-green); }
.alert-banner-danger  { background: var(--status-red-bg);   border: 2px solid var(--status-red); }
.alert-banner-ico { font-size: 22px; flex-shrink: 0; }
.alert-banner-body { flex: 1; }
.alert-banner-title {
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 4px;
}
.alert-banner-success .alert-banner-title { color: var(--status-green); }
.alert-banner-danger  .alert-banner-title { color: var(--status-red); }
.alert-banner-text {
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 8px;
}
.alert-banner-meta { font-size: 10px; color: var(--text-dim); }
.alert-banner-reason {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}
.alert-banner-effect {
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.5;
    padding: 6px 8px;
    background: var(--bg-card);
    border-radius: 4px;
    border-left: 2px solid var(--accent-blue);
    margin-bottom: 10px;
}
.alert-banner-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.alert-btn {
    padding: 6px 14px;
    background: var(--bg-card-alt);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-ui);
}
.alert-btn-warn   { border-color: var(--status-orange); }
.alert-btn-mute   { color: var(--text-muted); }
.alert-btn-danger {
    padding: 8px 16px;
    background: var(--status-red);
    color: #fff;
    border: none;
    font-weight: 800;
}
.text-muted-strong   { color: var(--text-muted); }
.text-warn-strong    { color: var(--status-orange); }
.text-success-strong { color: var(--status-green); }

/* Footer partagé /plan et /analysis */
.dashboard-footer {
    margin-top: 24px;
    padding: 16px 0;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-ui);
    border-top: 1px dashed var(--border-color);
}
.dashboard-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}
.dashboard-footer a:hover { color: var(--accent-yellow); }

