/* ── Tokens ─────────────────────────────────────────────────────────────── */
/* Direction « Capsules » : fond pastel de l'onglet, blocs blancs, UN bloc plein (--deep) par écran.
   Chaque onglet = un trio deep / mid / light. L'accueil est neutre et ses blocs
   empruntent la couleur de l'onglet auquel ils appartiennent (.t-freelance, .t-cdi…). */
:root {
  --deep: #26262b; --mid: #d6d4cc; --light: #eeede8;
  --bg: var(--light);
  --card: #ffffff;
  --card-2: #f4f3ef;
  --line: rgba(20, 20, 24, .10);
  --text: #16161a;
  --text-2: #5d5c5a;
  --text-3: #8d8b87;
  --on-deep: #ffffff;
  --radius: 26px;
  --radius-s: 16px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar: 232px;
  color-scheme: light;
}
body[data-tab="accueil"],       .t-accueil       { --deep: #26262b; --mid: #d6d4cc; --light: #eeede8; }
body[data-tab="echeancier"],    .t-echeancier    { --deep: #26262b; --mid: #d6d4cc; --light: #eeede8; }
body[data-tab="finances"],      .t-finances      { --deep: #2f9e74; --mid: #c9ef5a; --light: #e3d9bc; }
body[data-tab="freelance"],     .t-freelance     { --deep: #e04a2b; --mid: #f28ab2; --light: #ebe6c6; }
body[data-tab="cdi"],           .t-cdi           { --deep: #3d2a7a; --mid: #b5a3ff; --light: #ece8ff; }
body[data-tab="impots"],        .t-impots        { --deep: #1b2f6b; --mid: #3a46c4; --light: #8fc9f2; }
body[data-tab="simulations"],   .t-simulations   { --deep: #0f5e5a; --mid: #7ff0cf; --light: #e2f7ee; }
body[data-tab="documents"],     .t-documents     { --deep: #3b3f46; --mid: #c08a4a; --light: #e6e2da; }
body[data-tab="francetravail"], .t-francetravail { --deep: #15213f; --mid: #d8c7a0; --light: #efe8d6; }
/* Sur le fond --mid, le texte est --deep, sauf quand le contraste est insuffisant : blanc. */
body[data-tab="impots"], .t-impots, body[data-tab="freelance"], .t-freelance, body[data-tab="documents"], .t-documents { --on-mid: #ffffff; }
body[data-tab="accueil"], .t-accueil, body[data-tab="echeancier"], .t-echeancier { --on-mid: #16161a; }

/* ── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans);
  min-height: 100dvh; touch-action: manipulation; transition: background .25s;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, select, textarea { font: inherit; color: var(--text); }
.hidden { display: none !important; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); margin: 0 0 6px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 22px 14px; background: var(--card);
  display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 6px 10px; line-height: 1.05; font-size: 15px; }
.brand b { font-family: var(--serif); font-weight: 600; font-size: 19px; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--deep); flex: none; transition: background .25s; }
#nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.navbtn, #nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 44px; border-radius: 999px;
  text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 14.5px; width: 100%;
  transition: background .15s, color .15s;
}
.navbtn:hover, #nav a:hover { background: var(--card-2); color: var(--text); }
#nav a.active { background: var(--c); color: #fff; }
#nav a .ic, .navbtn svg { width: 20px; height: 20px; flex: none; }
#nav a .ic { color: var(--c); }
#nav a.active .ic { color: #fff; }
#nav a .badge { margin-left: auto; background: var(--text); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
#nav a.active .badge { background: #fff; color: var(--c); }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { margin-top: auto; }
.main { padding: 22px 28px 60px; min-width: 0; }
.view { max-width: 1240px; margin: 0 auto; }

/* ── Alertes (barre haute) : plein = critique / vigilance, blanc = sanity / info ── */
.alerts { max-width: 1240px; margin: 0 auto 18px; display: flex; flex-direction: column; gap: 8px; }
.alert {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--card);
  font-size: 14px; color: var(--text);
}
.alert.level-1, .alert.level-2 { background: var(--mid); color: var(--on-mid, var(--deep)); }
.alert .lvl { flex: none; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1.5px solid currentColor; }
.alert.level-1 .lvl, .alert.level-2 .lvl { background: var(--deep); color: var(--on-deep); border-color: transparent; }
.alert.level-1 .lvl::before { content: "critique"; } .alert.level-2 .lvl::before { content: "vigilance"; }
.alert.level-3 .lvl::before { content: "sanity"; } .alert.level-4 .lvl::before { content: "info"; }
.alert .t { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.alert .t b { font-weight: 500; }
.alert .t span { opacity: .7; font-size: 12.5px; }
.alert a.go { color: inherit; text-decoration: none; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.alert .more { color: var(--text-2); font-size: 13px; padding: 8px 10px; }
.alert .btn { background: var(--card); color: var(--text); border-color: transparent; border-radius: 999px; }
.alert.level-1 .btn, .alert.level-2 .btn { background: rgba(255,255,255,.85); }

/* ── Titres ─────────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 4px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 48px); margin: 0; letter-spacing: -.02em; line-height: 1.05; }
.page-head h1 em { font-style: italic; color: var(--deep); }
.page-head .sub { color: var(--text-2); margin: 6px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2.sec { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 28px 0 12px; }
h3 { font-size: 12px; margin: 0 0 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }

/* ── Cartes & grilles ───────────────────────────────────────────────────── */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
/* Aplats francs, jamais de dégradé : accent = bloc plein, accent2 = bloc secondaire */
.card.accent, .card.danger { background: var(--deep); color: var(--on-deep); --line: rgba(255,255,255,.18); }
.card.accent .label, .card.accent .foot, .card.danger .label, .card.danger .foot, .card.accent h3, .card.accent .muted { color: inherit; opacity: .78; }
.card.accent2, .card.warn { background: var(--mid); color: var(--on-mid, var(--deep)); --line: rgba(0,0,0,.12); }
.card.accent2 .label, .card.accent2 .foot, .card.warn .label, .card.warn .foot { color: inherit; opacity: .8; }
.card.ok { background: var(--card); }
.tile .label { font-size: 12px; color: var(--text-2); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tile .big { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; margin: 8px 0 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .big.sans { font-family: var(--mono); font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); }
.tile .foot { font-size: 13px; color: var(--text-2); }
.stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.stat-row:first-of-type { border-top: 0; }
.stat-row b { font-family: var(--mono); font-weight: 600; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card-2); color: var(--text-2); white-space: nowrap; }
.chip.s-payee, .chip.s-paye, .chip.s-declaree, .chip.s-ok, .chip.s-actif { background: var(--deep); color: var(--on-deep); }
.chip.s-envoyee, .chip.s-en_cours, .chip.s-livre, .chip.s-a_faire, .chip.s-prospect { background: var(--mid); color: var(--on-mid, var(--deep)); }
.chip.s-retard, .chip.s-ko { background: var(--text); color: #fff; }
.chip.s-brouillon, .chip.s-devis, .chip.s-annule, .chip.s-annulee, .chip.s-archive { color: var(--text-3); }
.chip.s-facture { border: 1.5px solid var(--deep); background: transparent; color: var(--deep); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.empty { color: var(--text-2); padding: 18px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius-s); font-size: 14px; }
.note { font-size: 13px; color: var(--text-2); background: var(--card-2); border-radius: var(--radius-s); padding: 12px 14px; }
.note.red { color: var(--on-deep); background: var(--deep); }

/* ── Boutons & formulaires ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: var(--card-2); border: 1px solid transparent; font-weight: 600; font-size: 14px; transition: background .15s, transform .1s; color: var(--text); }
.btn:hover { background: #e9e8e3; } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--deep); color: var(--on-deep); }
.btn.primary:hover { filter: brightness(1.12); background: var(--deep); }
.btn.danger { color: var(--text); text-decoration: underline; background: transparent; }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn.icon { min-width: 40px; padding: 8px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.card.accent .btn, .card.danger .btn { background: rgba(255,255,255,.16); color: inherit; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea { background: var(--card-2); border: 1px solid transparent; border-radius: 14px; padding: 10px 14px; min-height: 44px; width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--deep); border-color: transparent; }
.field .help { font-size: 12px; color: var(--text-3); }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.field.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--deep); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.inline-form .field { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: #d9d8d3; position: relative; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--deep); } .switch input:checked::after { transform: translateX(18px); }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-s); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 600; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.act { white-space: nowrap; text-align: right; }
td.act .btn { margin-left: 4px; }
tr.done td { opacity: .5; text-decoration: line-through; }
tr.report td { color: var(--text-2); font-style: italic; }

/* ── Jauges & graphiques ────────────────────────────────────────────────── */
.ring { display: flex; align-items: center; gap: 22px; }
.ring svg { width: 170px; height: 170px; flex: none; fill: none; stroke: none; transform: rotate(-90deg); }
.ring .track { stroke: var(--card-2); stroke-width: 10; fill: none; }
.ring .arc { stroke-width: 10; fill: none; stroke-linecap: round; transition: stroke-dashoffset .6s ease-out; }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring .center b { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; }
.ring .center span { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.ring .wrap { position: relative; width: 170px; height: 170px; flex: none; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend b { font-family: var(--mono); margin-left: auto; padding-left: 10px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 150px; margin-top: 12px; }
.bars .b { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: var(--deep); min-height: 3px; transition: height .4s ease-out; }
.bars .b.empty-bar i { background: var(--card-2); }
.bars .b span { font-size: 11px; color: var(--text-3); }
.bars .b .v { font-size: 10px; font-family: var(--mono); color: var(--text-2); }
.prog { height: 10px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 99px; background: var(--deep); transition: width .4s ease-out; }
.prog.thin { height: 6px; }
.prog.red i { background: var(--text); } .prog.green i { background: var(--mid); }
.pl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.pl b { font-family: var(--mono); }

/* ── Niveaux : forme plutôt que couleur (plein / secondaire / contour / gris) ── */
.lv { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; vertical-align: middle; }
.lv.l1 { background: var(--deep); }
.lv.l2 { background: var(--mid); }
.lv.l3 { background: transparent; box-shadow: inset 0 0 0 2px var(--deep); }
.lv.l4 { background: #c9c7c1; }

/* ── Gantt / échéancier ─────────────────────────────────────────────────── */
.gantt { display: grid; grid-template-columns: 150px repeat(12, 1fr); gap: 4px 0; font-size: 12px; }
.gantt .hd { color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; text-align: center; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.gantt .hd.now { color: var(--deep); font-weight: 700; }
.gantt .rl { color: var(--text-2); padding: 8px 8px 8px 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt .cell { position: relative; height: 36px; border-left: 1px solid var(--line); }
.gantt .cell.now { background: var(--card-2); }
.gantt .ev { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--card); cursor: pointer; background: var(--deep); }
.gantt .ev.l2 { background: var(--mid); }
.gantt .ev.l3 { background: var(--card); box-shadow: inset 0 0 0 2px var(--deep); }
.gantt .ev.l4 { background: #c9c7c1; }
.gantt .ev.done { opacity: .3; }
.gantt .ev:hover::after, .gantt .ev:focus::after { content: attr(data-t); position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; background: var(--text); color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 11px; z-index: 5; }
.month-block h3 { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 22px 0 8px; text-transform: none; letter-spacing: 0; color: var(--text); }
.month-block h3 small { font-family: var(--sans); font-size: 12px; color: var(--text-3); }
.ev-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: var(--card); margin-bottom: 6px; }
.ev-row.done { opacity: .45; } .ev-row.done .t { text-decoration: line-through; }
.ev-row.past:not(.done) { box-shadow: inset 0 0 0 1.5px var(--deep); }
.ev-row .d { font-family: var(--mono); font-size: 13px; color: var(--text-2); width: 56px; flex: none; }
.ev-row .t { flex: 1; min-width: 0; font-size: 14px; }
.ev-row .t small { display: block; color: var(--text-3); font-size: 12px; }
.ev-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--deep); margin: 0; flex: none; }

/* ── Sous-onglets ───────────────────────────────────────────────────────── */
.subtabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.subtabs a { padding: 9px 16px; min-height: 40px; border-radius: 99px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14px; background: var(--card); display: inline-flex; align-items: center; }
.subtabs a.active { background: var(--deep); color: var(--on-deep); }

/* ── Candidats / listes ─────────────────────────────────────────────────── */
.cand { padding: 12px 14px; border-radius: var(--radius-s); background: var(--card-2); margin-bottom: 8px; font-size: 14px; }
.cand b { display: block; margin-bottom: 2px; }
.cand .meta { color: var(--text-2); font-size: 12px; margin-bottom: 8px; }
.cand .row { display: flex; gap: 6px; flex-wrap: wrap; }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: var(--card-2); font-size: 14px; }
.li .grow { flex: 1; min-width: 0; }
.li small { color: var(--text-3); display: block; font-size: 12px; }
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.kcol h3 { display: flex; justify-content: space-between; }
.kcard { background: var(--card-2); border-left: 4px solid var(--cc, var(--deep)); border-radius: 14px; padding: 12px; margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.kcard small { color: var(--text-3); display: block; }
.kcard .amt { font-family: var(--mono); font-weight: 600; margin-top: 4px; }

/* ── Modal & toast ──────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; background: rgba(20,20,24,.45); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 100; padding: 0; }
.modal .box { background: var(--card); border-radius: 26px 26px 0 0; width: min(680px, 100%); max-height: 92dvh; overflow: auto; padding: 22px 22px 32px; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .box h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 16px; display: flex; justify-content: space-between; align-items: center; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.modal .foot .danger { margin-right: auto; }
@media (min-width: 760px) { .modal { align-items: center; padding: 20px; } .modal .box { border-radius: 26px; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #b3261e; color: #fff; }

/* ── Login ──────────────────────────────────────────────────────────────── */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--light); }
.login-card { width: min(380px, 100%); background: var(--card); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.login-card h1 { font-size: 36px; margin: 0 0 10px; }
.login-card label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.login-card input { background: var(--card-2); border: 1px solid transparent; border-radius: 14px; padding: 12px 14px; min-height: 48px; font-size: 16px; }
.login-card .error { color: #b3261e; min-height: 1.4em; margin: 0; font-size: 14px; }

/* ── Simulations ────────────────────────────────────────────────────────── */
.sim .res { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.sim .res .big { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.1; margin-bottom: 6px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .c3 { grid-column: span 6; } .c4 { grid-column: span 6; } .c5, .c7, .c8 { grid-column: span 12; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; align-items: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 0; z-index: 50; box-shadow: 0 -1px 0 var(--line); }
  .brand, .sidebar-foot span { display: none; }
  .sidebar-foot { margin: 0; }
  #nav { flex-direction: row; overflow-x: auto; flex: 1; gap: 2px; scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  #nav a, .navbtn { flex-direction: column; gap: 3px; font-size: 10px; padding: 6px 8px; min-width: 64px; width: auto; border-radius: 14px; }
  #nav a .badge { position: absolute; margin: 0; transform: translate(14px, -22px); }
  #nav a { position: relative; }
  .main { padding: 16px 16px 110px; }
  .c3, .c4, .c6 { grid-column: span 12; }
  .ring { flex-direction: column; align-items: flex-start; }
  .gantt { grid-template-columns: 90px repeat(12, 1fr); }
  .gantt .rl { font-size: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dt { margin-top: 8px; }
  .page-head h1 { font-size: 32px; }
  .alert { border-radius: 20px; flex-wrap: wrap; }
}

/* ── Alertes cliquables + marche à suivre ───────────────────────────────── */
.alert button.t { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font: inherit; color: inherit; min-height: 32px; }
.alert button.t:hover b { text-decoration: underline; }
.alert button.t:focus-visible { outline: 2px solid currentColor; border-radius: 8px; }
.steps { margin: 0 0 14px; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: flex; gap: 12px; font-size: 14px; line-height: 1.5; padding: 10px 14px; background: var(--card-2); border-radius: 16px; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--deep); color: var(--on-deep); font-family: var(--mono); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.modal .box .chip { background: var(--mid); color: var(--on-mid, var(--deep)); }
.gantt .rl .lv { width: 8px; height: 8px; }

.prog.over i { background: var(--text); }
