/* Outil HERA, charte HeraHub, interface façon application */
:root {
  --bg: #FAF8F4;
  --card: #FFFFFF;
  --alt: #F1ECE2;
  --border: #E6E1D5;
  --border-strong: #CFC8B7;
  --title: #1F2127;
  --body: #3F434B;
  --muted: #6B6F77;
  --faint: #9AA0A8;
  --accent: #6644D8;
  --accent-hover: #8064E8;
  --accent-pressed: #4A2FA0;
  --swoosh: #B8A2FF;
  --tint: #EFEAFB;
  --tint-ink: #4A2FA0;
  --success: #16A34A;
  --success-tint: #E6F4EA;
  --warning: #D97706;
  --warning-tint: #FCEFDC;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: none;
  --ombre-flottante: 0 16px 40px -16px rgba(31, 33, 39, .28); /* menus, panneaux et notifications, rien d'autre */
  --sidebar: 272px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums; /* les chiffres s'alignent d'une ligne à l'autre */
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--title); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; }
h2 { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.2; }
h3 { font-size: 16px; line-height: 1.3; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.hidden { display: none !important; }

/* ---------- Surfaces ----------
   Aplats seulement : pas de halo, de verre ni de flou. L'ombre est réservée à ce qui flotte (menus, panneaux). */
.glass { background: var(--card); border: 1px solid var(--border); }

/* ---------- Barre latérale : une colonne pleine, collée au bord ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar);
  padding: 20px 14px 14px; z-index: 30;
  display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.sidebar > * { flex-shrink: 0; }
.sb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--title); padding: 0 8px 6px; }
.sb-brand b { display: block; font-weight: 800; font-size: 14.5px; letter-spacing: -0.01em; line-height: 1.2; }
.sb-brand small { display: block; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.sb-logo { width: 28px; height: 28px; flex: none; object-fit: contain; }
.sb-profile {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; color: var(--title);
  transition: background .15s var(--ease);
}
.sb-profile:hover { background: rgba(255, 255, 255, .5); color: var(--title); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px;
  background: var(--tint); color: var(--tint-ink); font-weight: 800;
}
.sb-txt { display: flex; flex-direction: column; min-width: 0; }
.sb-txt b { font-weight: 600; font-size: 13.5px; color: var(--title); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.sb-nav { display: flex; flex-direction: column; gap: 1px; }
.sb-nav .sb-item .sb-txt small { display: none; }
.sb-label { font-weight: 600; font-size: 11.5px; color: var(--muted); padding: 12px 8px 6px; }
.sb-item {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; min-height: 36px;
  text-decoration: none; color: var(--body); transition: background .15s var(--ease);
}
.sb-item:hover { background: rgba(255, 255, 255, .5); color: var(--title); }
/* L'onglet actif : un fond un peu plus clair, rien de plus. */
.sb-item.active { background: rgba(255, 255, 255, .82); }
.sb-item.active .sb-txt b { color: var(--title); }
.sb-item .sb-txt b { font-weight: 600; color: var(--body); }
.sb-ico { width: 20px; height: 20px; display: grid; place-items: center; flex: none; color: var(--muted); }
.sb-item.active .sb-ico { color: var(--title); }
.sb-ico svg, .sb-letter svg, .sb-lock svg, .tab-ico svg, .lock-ico svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.sb-letter svg { width: 11px; height: 11px; stroke-width: 3; }
.sb-steps { position: relative; display: flex; flex-direction: column; gap: 1px; }
.sb-steps::before {
  content: ""; position: absolute; left: 18px; top: 22px; bottom: 22px; width: 1px;
  background: rgba(102, 68, 216, .18);
}
.sb-letter {
  position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 10.5px;
  background: #FFFFFF; color: var(--accent); border: 1px solid rgba(102, 68, 216, .45);
  transition: all .3s var(--ease);
}
.sb-step.fait .sb-letter { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.sb-item.verrou { opacity: .5; cursor: not-allowed; }
.sb-item.verrou:hover { background: transparent; }
.sb-step.verrou .sb-letter { background: rgba(255, 255, 255, .7); color: var(--muted); border-color: var(--border-strong); }
.sb-lock { margin-left: auto; color: var(--muted); display: grid; }
.sb-lock svg { width: 13px; height: 13px; }

.sb-progress { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid rgba(74, 47, 160, .1); }
.sb-progress-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 8px; color: var(--muted); }
.sb-progress-head b { color: var(--title); }
.sb-progress .bar { height: 4px; }
.sb-foot { display: flex; flex-direction: column; gap: 8px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; transition: background .15s var(--ease); }
.switch-row:hover { background: rgba(255, 255, 255, .5); }
.switch-row .sb-txt { flex: 1; }
.switch {
  position: relative; width: 36px; height: 22px; border-radius: 999px; flex: none;
  background: rgba(107, 111, 119, .28); transition: background .25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(31, 33, 39, .25); transition: transform .3s var(--ease);
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(14px); }
.sb-demo { display: flex; gap: 6px; padding: 0 8px; }
.sb-demo button {
  flex: 1; border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 5px 6px; font-size: 11px; font-weight: 700; color: var(--title); cursor: pointer; white-space: nowrap;
}
.sb-demo button:hover { border-color: var(--accent); color: var(--accent); }
.sb-note { font-size: 11.5px; color: var(--muted); padding: 0 8px; line-height: 1.5; }


/* Argos : une phrase en tête de page. Son nom en gras, puis ce qu'il conseille. */
.argos { margin: -8px 0 28px; max-width: 720px; font-size: 15px; line-height: 1.55; color: var(--body); }
.argos-nom { color: var(--title); font-weight: 700; margin-right: 8px; }
.argos.pense .argos-txt { color: var(--muted); }
.argos-attente { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); color: var(--title); font-size: 14px; }
.argos-attente .spin { border-color: var(--border); border-top-color: var(--accent); }
.dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: point 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes point { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ---------- Barres mobiles ---------- */
.mtop, .tabbar { display: none; }

/* ---------- Zone principale ---------- */
.main { margin-left: var(--sidebar); padding: 28px 48px 80px; min-height: 100vh; }
.view { max-width: 1040px; margin: 0 auto; }
.view.enter { animation: enter .3s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Changement de page ----------
   Pendant la transition, seul le contenu (#app) bouge : la barre latérale et le fond restent en place. */
.vt #app { view-transition-name: vue; }
.vt .toast.show { view-transition-name: toast; }
/* Les clics passent pendant la transition : on peut enchaîner les onglets sans attendre. */
::view-transition { pointer-events: none; }
::view-transition-old(root) { display: none; }
::view-transition-new(root) { animation: none; }
::view-transition-group(vue) { animation: none; }
::view-transition-old(vue) { animation: vt-sort .1s ease-in both; }
::view-transition-new(vue) { animation: vt-entre .3s var(--ease) .06s both; }
html[data-sens="avant"]::view-transition-old(vue) { animation-name: vt-sort-gauche; animation-duration: .18s; }
html[data-sens="avant"]::view-transition-new(vue) { animation-name: vt-entre-droite; animation-duration: .34s; }
::view-transition-group(toast), ::view-transition-new(toast) { animation: none; }
::view-transition-old(toast) { display: none; }
@keyframes vt-sort { to { opacity: 0; } }
@keyframes vt-entre { from { opacity: 0; transform: translateY(8px); } }
@keyframes vt-sort-gauche { to { opacity: 0; transform: translateX(-18px); } }
@keyframes vt-entre-droite { from { opacity: 0; transform: translateX(28px); } }

/* Traiter une tâche : la ligne se soulève, puis l'étape 1 s'annonce en plein écran. */
.souleve {
  position: relative; z-index: 2;
  animation: souleve .28s var(--ease) both;
}
@keyframes souleve { to { background-color: var(--tint); } }
.passage {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; cursor: pointer;
  background: var(--bg);
  animation: passage-in .2s ease-out .16s both;
}
.passage.sort { animation: passage-out .26s ease-in both; }
.passage.sort.vite { animation-duration: .12s; }
.passage-in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 520px; }
.passage-k { font-size: 14px; font-weight: 600; color: var(--muted); animation: monte .3s var(--ease) .12s both; }
.passage-nom { font-size: clamp(22px, 3vw, 28px); font-weight: 800; color: var(--title); letter-spacing: -0.02em; line-height: 1.2; animation: monte .3s var(--ease) .18s both; }
.passage-l { display: flex; gap: 12px; margin-top: 10px; }
.passage-l i {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 20px; font-weight: 800; color: var(--muted); background: var(--card);
  border: 1px solid var(--border-strong);
  animation: monte .3s var(--ease) both; animation-delay: calc(var(--j) * 50ms + 180ms);
}
.passage-l i.fait { color: var(--tint-ink); border-color: var(--tint); background: var(--tint); }
.passage-l i.on { animation: monte .3s var(--ease) both .18s, allume .4s var(--ease) .42s both; }
.passage-passer { margin-top: 14px; font-size: 12.5px; color: var(--muted); animation: monte .3s var(--ease) .4s both; }
@keyframes passage-in { from { opacity: 0; } }
@keyframes passage-out { to { opacity: 0; } }
@keyframes monte { from { opacity: 0; transform: translateY(8px); } }
@keyframes allume { to { background: var(--accent); color: var(--bg); border-color: var(--accent); } }
/* Version discrète, d'une étape à la suivante : une pastille en haut du contenu, qui ne bloque rien. */
.passage.discret {
  inset: 18px auto auto calc(50% + var(--sidebar) / 2); transform: translateX(-50%); padding: 8px 10px 8px 16px; cursor: default; pointer-events: none;
  border-radius: 999px; background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 8px 24px -16px rgba(31, 33, 39, .3);
  animation: pastille-in .3s var(--ease) both;
}
.passage.discret.sort { animation: pastille-out .26s ease-in both; }
.passage.discret .passage-in { flex-direction: row; gap: 12px; }
.passage.discret .passage-k { font-size: 11px; animation: none; }
.passage.discret .passage-l { margin: 0; gap: 5px; }
.passage.discret .passage-l i { width: 26px; height: 26px; font-size: 11px; border-width: 1px; animation-delay: calc(var(--j) * 40ms + 60ms); }
.passage.discret .passage-l i.on { animation: monte .25s var(--ease) both .06s, allume .4s var(--ease) .3s both; }
@keyframes pastille-in { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes pastille-out { to { opacity: 0; transform: translate(-50%, -6px); } }

.page-head { padding: 18px 0 26px; max-width: 760px; }
.page-head h1 { margin-top: 8px; }
.page-head .lead { margin-top: 10px; font-size: 15.5px; max-width: 640px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs > span:last-child { color: var(--title); font-weight: 600; }
.page-head .meta { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--bg);
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
  box-shadow: none;
  transition: background .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); color: var(--bg); }
.btn:active { background: var(--accent-pressed); transform: scale(.97); }
.btn.arrow::after { content: "→"; transition: transform .2s var(--ease); }
.btn.arrow:hover::after { transform: translateX(3px); }
.btn[disabled] { background: var(--border-strong); box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: var(--card); color: var(--title); border: 1px solid var(--border-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { padding: 7px 15px; font-size: 13px; }
.btn.link { background: none; color: var(--accent); padding: 8px 4px; box-shadow: none; }
.btn.link:hover { color: var(--accent-hover); }
.btn.locked { background: var(--alt); color: var(--muted); box-shadow: none; cursor: not-allowed; font-weight: 600; }
.btn .spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(250, 248, 244, .4); border-top-color: var(--bg);
  animation: spin .8s linear infinite;
}
.lock-ico { display: inline-grid; }
.lock-ico svg { width: 16px; height: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.shake { animation: shake .45s var(--ease); }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- Typo utilitaires ---------- */
.kicker { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.label { font-weight: 600; font-size: 13px; color: var(--muted); }
/* Pastille : un statut, en casse de phrase. Jamais une décoration. */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
  background: var(--alt); color: var(--muted);
}
.pill.violet { background: var(--tint); color: var(--tint-ink); }
.pill.ok { background: var(--success-tint); color: var(--success); }
.pill.warn { background: var(--warning-tint); color: var(--warning); }
.pill.outline { background: transparent; border: 1px solid var(--border); color: var(--body); }

.swoosh { position: relative; display: inline-block; white-space: nowrap; }
/* Un prénom très long passe à la ligne au lieu de faire déborder la page. */
.swoosh.long { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
h1 { overflow-wrap: break-word; }
.swoosh > svg { position: absolute; left: 0; width: 100%; height: 0.3em; bottom: -0.28em; overflow: visible; }

/* ---------- Cartes ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.chip {
  width: 24px; height: 24px; flex: none;
  display: inline-grid; place-items: center; color: var(--muted);
}
.chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.callout {
  background: var(--tint); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px;
  color: var(--title); font-weight: 600;
}
.callout p + p { margin-top: 8px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { position: relative; padding: 9px 0 9px 18px; border-bottom: 1px dashed var(--border); }
.list li:last-child { border-bottom: 0; }
.list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.grid { display: grid; gap: 16px; }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.section { margin-top: 36px; }
.section-head { margin-bottom: 16px; }
.section-head h2 { margin-top: 6px; }

/* ---------- Accueil (tableau de bord) ---------- */
.step-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--body); transition: border-color .2s var(--ease); }
.step-card:hover { border-color: var(--border-strong); color: var(--body); }
.step-card .top { display: flex; align-items: center; justify-content: space-between; }
.step-card .big { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -0.02em; }
.step-card .liv { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 14px; }
.step-card .liv b { display: block; font-weight: 600; font-size: 13px; color: var(--muted); }
.step-card.verrou { background: rgba(255, 255, 255, .55); cursor: not-allowed; box-shadow: none; }
.step-card.verrou:hover { transform: none; border-color: var(--border); box-shadow: none; }
.step-card.verrou .big, .step-card.verrou h3 { color: var(--faint); }
.state-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--alt); color: var(--muted); }
.state-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.state-ico.fait { background: var(--accent); color: var(--bg); }
.state-ico.encours { background: var(--tint); color: var(--tint-ink); }

/* ---------- Page d'étape ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; padding: 4px 0 0 22px; border-left: 1px solid var(--border); font-size: 14px; }
.aside h4 { font-size: 14px; }
.aside-mot { color: var(--title); font-weight: 600; line-height: 1.45; }
.aside-liste { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.aside-liste li { position: relative; padding-left: 14px; line-height: 1.5; }
.aside-liste li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.aside-piege { margin-top: 4px; line-height: 1.5; }
.aside-piege b { color: var(--title); }

.block { margin-bottom: 16px; transition: opacity .3s var(--ease); }
.card.block + .card.block { margin-top: 0; }
.block-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.num {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--alt); color: var(--muted); font-weight: 800; font-size: 15px; transition: all .3s var(--ease);
}
.num svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.block.ready .num { background: var(--accent); color: var(--bg); }
.block.complete .num { background: var(--tint); color: var(--tint-ink); }
.block-head p { margin-top: 4px; color: var(--muted); font-size: 15px; }
.block.locked { opacity: .6; box-shadow: none; background: rgba(255, 255, 255, .6); }
.block.locked .block-head { margin-bottom: 4px; }
.locked-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 15px; padding: 4px 0 4px 48px; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; color: var(--title); }
.input, .textarea, .select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--card);
  font-weight: 500; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.textarea { min-height: 200px; resize: vertical; line-height: 1.55; }
.textarea.short { min-height: 96px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; }

.dictee { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mic {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--accent); color: var(--bg); display: grid; place-items: center;
  transition: transform .15s var(--ease);
}
.mic:active { transform: scale(.94); }
.mic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mic.on { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(102, 68, 216, .35); } 50% { box-shadow: 0 0 0 14px rgba(102, 68, 216, 0); } }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--card); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--body);
  transition: all .2s var(--ease);
}
.choice:hover { border-color: var(--accent); }
.choice:active { transform: scale(.97); }
.choice.on { background: var(--tint); border-color: var(--accent); color: var(--tint-ink); }

.seg { display: inline-flex; border-radius: 999px; padding: 3px; background: var(--alt); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); transition: all .2s var(--ease); }
.seg button.on { background: #fff; color: var(--tint-ink); box-shadow: 0 1px 3px rgba(31, 33, 39, .12); }

/* Inventaire */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.kpi .v { font-size: 22px; font-weight: 800; color: var(--title); letter-spacing: -0.02em; line-height: 1.2; }
.kpi .t { font-size: 13px; color: var(--muted); }
.card.kpi { background: var(--card); }

.task { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--card); transition: border-color .2s; }
.task:hover { border-color: var(--border-strong); }
.task + .task { margin-top: 10px; }
.task-top { display: flex; gap: 10px; align-items: center; }
.task-top .input { font-weight: 700; color: var(--title); border-color: transparent; padding: 6px 8px; }
.task-top .input:hover { border-color: var(--border); }
.task-cost { margin-left: auto; text-align: right; white-space: nowrap; }
.task-cost b { display: block; font-size: 18px; font-weight: 800; color: var(--title); }
.task-cost span { font-size: 12px; color: var(--muted); }
.task-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; }
.task-line .input, .task-line .select { width: auto; padding: 6px 10px; font-size: 14px; }
.task-line .input.n { width: 72px; }
.task-why { margin-top: 8px; font-size: 14px; color: var(--muted); }
.x { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.x:hover { color: var(--title); background: var(--alt); }

.radio-task {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--card); cursor: pointer;
  transition: all .2s var(--ease);
}
.radio-task + .radio-task { margin-top: 8px; }
.radio-task:hover { border-color: var(--border-strong); }
.radio-task.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.radio-task .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; transition: all .2s var(--ease); }
.radio-task.on .dot { border: 6px solid var(--accent); }
.radio-task .nm { font-weight: 700; color: var(--title); }
.radio-task .cost { margin-left: auto; font-weight: 700; white-space: nowrap; }

.proc-step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.proc-step:last-child { border-bottom: 0; }
/* Étape changée par la dernière correction dictée. */
.proc-step.modifiee { background: var(--tint); border-radius: 12px; padding: 14px 12px; border-bottom-color: transparent; }
.proc-modif { align-self: flex-start; }
.proc-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--tint-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.proc-step .body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.proc-step .input { font-weight: 700; color: var(--title); }
.proc-step .textarea { min-height: 64px; font-size: 15px; }

.deliverable { border-color: var(--border-strong); }
.deliverable-k { flex-basis: 100%; font-size: 13px; font-weight: 600; color: var(--muted); }
.deliverable-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.deliverable-head .actions { margin-left: auto; }

.notice { padding: 12px 16px; border-radius: 12px; background: var(--alt); color: var(--body); font-size: 14px; margin-top: 12px; }
/* Un point d'attention : le fond reste neutre, seul un trait orange à gauche le signale. */
.notice.warn { background: var(--alt); box-shadow: inset 3px 0 0 var(--warning); }

.bar { height: 8px; border-radius: 999px; background: var(--alt); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s var(--ease); }
.sb-progress .bar { background: rgba(255, 255, 255, .7); }

/* Équiper */
.q + .q { margin-top: 22px; }
.q h4 { font-size: 16px; margin-bottom: 10px; }
.verdict { display: flex; gap: 16px; align-items: flex-start; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.check:last-child { border-bottom: 0; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 3px; flex: none; }

/* Réaliser */
.level { cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; width: 100%; font: inherit; color: inherit; transition: all .2s var(--ease); }
.level:hover { border-color: var(--border-strong); }
.level.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.fiche { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.fiche h4 { font-size: 14px; color: var(--title); margin: 18px 0 6px; }
.fiche h4:first-of-type { margin-top: 0; }
.fiche .ex { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 8px; font-size: 15px; }
.fiche .ex pre { white-space: pre-wrap; font: inherit; margin: 6px 0 0; color: var(--title); }
.fiche .titre-fiche { font-size: 20px; }

/* Analyser */
.entries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.entry { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--alt); font-size: 14px; font-weight: 600; }
.compare { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.compare .line { display: grid; grid-template-columns: 90px 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.compare .bar > span.before { background: var(--border-strong); }
.big-verdict { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.big-verdict.ok { color: var(--success); }
.big-verdict.warn { color: var(--warning); }
.big-verdict.cut { color: var(--title); }

.step-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Notifications ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--title); color: var(--bg); padding: 12px 20px; border-radius: 999px; box-shadow: var(--ombre-flottante);
  font-weight: 600; font-size: 14px; opacity: 0; transition: .3s var(--ease); pointer-events: none; z-index: 60;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 901px) { .toast { left: calc(50% + var(--sidebar) / 2); } }

.unlock {
  position: fixed; right: 24px; bottom: 24px; z-index: 55; width: min(420px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  padding: 16px; border-radius: var(--radius); box-shadow: var(--ombre-flottante);
  opacity: 0; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.unlock.show { opacity: 1; transform: none; }
.unlock-badge {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); font-weight: 800; font-size: 26px;
}
.unlock b { display: block; color: var(--title); font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.unlock small { display: block; font-size: 13px; color: var(--body); line-height: 1.4; margin-top: 2px; }
.unlock .actions { grid-column: 1 / -1; justify-content: flex-end; }
.unlock .x { position: absolute; top: 8px; right: 8px; }

/* Indicateurs */
.hero-kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 28px 32px; }
.hero-fig { font-size: clamp(40px, 4.4vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--title); margin-top: 14px; }
.hero-sub { margin-top: 8px; font-size: 17px; }
.hero-sub b { color: var(--title); }
.hero-side { display: flex; flex-direction: column; gap: 14px; min-width: 240px; padding-left: 28px; border-left: 1px solid var(--border); }
.hero-side b { display: block; font-size: 22px; font-weight: 800; color: var(--title); letter-spacing: -0.02em; margin-top: 2px; }
.kpi-section { margin: 30px 0 12px; }
.tile { padding: 18px 20px; }
.tile .t { font-size: 13px; color: var(--muted); line-height: 1.35; }
.tile .v { font-size: 22px; font-weight: 800; color: var(--title); letter-spacing: -0.02em; line-height: 1.2; margin-top: 6px; }
.tile .s { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.chart-card { margin-top: 16px; }
.chart-head { margin-bottom: 16px; }
.chart-head p { margin-top: 4px; }
.chart { width: 100%; min-height: 220px; }
.chart svg { display: block; overflow: visible; }
.chart .ax { font-size: 11px; fill: var(--muted); font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .ref { font-size: 12px; fill: var(--muted); font-weight: 600; font-family: var(--font); }
.chart .end { font-size: 12px; fill: var(--title); font-weight: 700; font-family: var(--font); }
.chart .hit { cursor: crosshair; }

.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { outline: none; }
.hbar-lab { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.hbar-lab b { color: var(--title); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-lab span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.hbar-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.hbar-fill { height: 14px; border-radius: 0 4px 4px 0; background: var(--accent); transition: width .6s var(--ease); }
.hbar:hover .hbar-fill, .hbar:focus .hbar-fill { background: var(--accent-pressed); }
.hbar-val { font-size: 13px; font-weight: 700; color: var(--title); white-space: nowrap; font-variant-numeric: tabular-nums; }

.meter { outline: none; }
.meter + .meter { margin-top: 14px; }
.meter-lab { display: flex; justify-content: space-between; font-size: 14px; }
.meter-lab b { color: var(--title); font-weight: 700; }
.meter-lab span { color: var(--muted); font-size: 13px; }
.meter-track { height: 10px; border-radius: 999px; background: var(--tint); margin-top: 6px; overflow: hidden; }
.meter-track span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.cols { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 210px; padding: 28px 4px 22px; margin-top: 8px; border-bottom: 1px solid var(--border); }
.cols-ref { position: absolute; left: 0; right: 0; top: 28px; bottom: 22px; pointer-events: none; }
.cols-ref::before { content: ""; position: absolute; left: 0; right: 0; bottom: var(--avant); border-top: 1.5px solid #9AA0A8; }
.cols-ref em { position: absolute; right: 0; bottom: calc(var(--avant) + 4px); font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.col { position: relative; flex: 1; max-width: 48px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; }
.col-bar { width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--accent); transition: background .2s; }
.col:hover .col-bar, .col:focus .col-bar { background: var(--accent-pressed); }
.col-lab { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.table-view { margin-top: 14px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.table-view table, .kpi-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.table-view th, .kpi-table th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
.table-view td, .kpi-table td { padding: 7px 8px 7px 0; border-bottom: 1px dashed var(--border); font-variant-numeric: tabular-nums; }
.table-view .r, .kpi-table .r { text-align: right; }

.tip {
  position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
  background: rgba(31, 33, 39, .94); color: var(--bg); font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 10px;
  white-space: nowrap; opacity: 0; transition: opacity .15s;
}
.tip.show { opacity: 1; }

/* Dossier */
.dossier table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dossier th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--border); }
.dossier td { padding: 9px 8px 9px 0; border-bottom: 1px dashed var(--border); vertical-align: top; }
.dossier td.r, .dossier th.r { text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 76px 16px calc(96px + env(safe-area-inset-bottom)); }
  /* Barres collées aux bords, pleines : pas de pilule flottante. */
  .mtop {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: fixed; top: 0; left: 0; right: 0; height: 58px; padding: 0 12px 0 16px; z-index: 30;
    border-width: 0 0 1px; background: var(--bg);
  }
  .mtop .sb-brand { padding: 0; }
  .mtop .sb-logo { width: 28px; height: 28px; }
  .mtop-demo {
    display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--card); border-radius: 999px;
    padding: 5px 5px 5px 12px; font-size: 12px; font-weight: 700; color: var(--title); cursor: pointer;
  }
  .mtop-demo .switch { width: 36px; height: 22px; }
  .mtop-demo .switch::after { width: 16px; height: 16px; }
  .mtop-demo .switch.on::after { transform: translateX(14px); }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-width: 1px 0 0; background: var(--bg);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 18px; min-width: 0;
    text-decoration: none; color: var(--muted); transition: color .2s var(--ease);
  }
  .tab.active { color: var(--accent); }
  .tab-ico {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: inherit;
  }
  .tab.step .tab-ico { background: #fff; border: 1.5px solid rgba(102, 68, 216, .35); }
  .tab.step.fait .tab-ico { background: var(--accent); color: var(--bg); border-color: var(--accent); }
  .tab.verrou { opacity: .5; }
  .tab.verrou .tab-ico { color: var(--muted); }
  .tab-l { font-size: 9.5px; font-weight: 700; letter-spacing: -0.01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab { padding: 6px 0; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .unlock { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .passage.discret { top: 80px; left: 50%; max-width: calc(100vw - 32px); }
  .passage.discret .passage-k { white-space: nowrap; }
  .vt .mtop { view-transition-name: mtop; }
  .vt .tabbar { view-transition-name: onglets; }
  ::view-transition-group(mtop), ::view-transition-group(onglets), ::view-transition-new(mtop), ::view-transition-new(onglets) { animation: none; }
  ::view-transition-old(mtop), ::view-transition-old(onglets) { display: none; }
  .hero-kpi { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .hero-side { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: 16px; flex-direction: row; flex-wrap: wrap; gap: 18px 28px; }
  .aside { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .page-head { padding: 10px 0 22px; }
  .page-head .lead { font-size: 16px; }
  .argos { gap: 10px; margin-top: -6px; }
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: minmax(0, 1fr); }
  .grid.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile .v { font-size: 20px; }
  .cols { gap: 6px; }
  .hbar-lab { flex-direction: column; gap: 0; }
  .hbar-lab b { white-space: normal; }
  .card { padding: 18px; }
  .card.block { padding: 16px 14px; }
  .kpis { gap: 8px; }
  .kpi { padding: 10px; }
  .kpi .v { font-size: 17px; }
  .kpi .t { font-size: 11px; line-height: 1.35; }
  .task { padding: 12px; }
  .task-top { flex-wrap: wrap; }
  .task-top .input { flex: 1 1 100%; order: -1; padding: 4px 0; font-size: 15px; }
  .task-cost { margin-left: 0; text-align: left; }
  .task-line .input.n { width: 60px; }
  .task-line .seg { margin-left: 0 !important; }
  .compare .line { grid-template-columns: 70px 1fr 56px; }
  .deliverable-head .actions { margin-left: 0; }
  .locked-note { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .mtop, .tabbar, .no-print, .step-nav, #unlock, .argos { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #FAF8F4; font-size: 12px; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ---------- Outil dans la durée : tâches, suivi, contact ---------- */
.section-sm { margin-top: 16px; }
.sb-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: var(--muted); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.sb-task { display: block; margin: 0 8px 6px; font-size: 13px; font-weight: 700; color: var(--title); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-task:hover { color: var(--accent); }
.sb-empty { display: block; margin: 0 4px; padding: 10px; border-radius: 10px; border: 1px dashed var(--border-strong); font-size: 13px; color: var(--body); text-decoration: none; line-height: 1.45; }
.sb-empty b { color: var(--accent); font-weight: 700; }
.sb-empty:hover { background: rgba(31, 33, 39, .04); }
.sb-more { display: block; margin: 2px 8px 0 38px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sb-progress-foot { margin-top: 6px; font-size: 12px; color: var(--muted); }

.crumbs { align-items: center; }
.crumbs a.pill { text-decoration: none; }
.crumb-sep { color: var(--faint); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
/* Les quatre étapes en texte : la lettre, le nom. L'étape ouverte est soulignée, sans pastille autour. */
.st { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: color .2s var(--ease); }
.st:hover { color: var(--title); }
.st-l { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); color: var(--muted); font-weight: 800; font-size: 10.5px; }
.st-l svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.st.fait .st-l { background: var(--accent); color: var(--bg); }
.st.fait .st-l { border-color: var(--accent); }
.st.active { color: var(--title); box-shadow: inset 0 -2px 0 var(--accent); }
.st.verrou { opacity: .5; cursor: not-allowed; }
.st.verrou .st-l { color: var(--faint); }
.st-sep { width: 12px; height: 1px; background: var(--border-strong); }

.how { display: flex; flex-direction: column; gap: 10px; }
.how-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--tint-ink); font-weight: 800; }


.conseil .kpi .label { display: block; margin-bottom: 6px; }
.conseil .small-v { font-size: 19px; line-height: 1.3; }
.filters { display: flex; flex-wrap: wrap; gap: 2px; }
.filters button span { margin-left: 4px; font-size: 12px; color: var(--faint); }
.filters button.on span { color: var(--tint-ink); }
.filters button[disabled] { opacity: .45; cursor: default; }
.task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.task-actions .grow { flex: 1 1 200px; }
.task-actions .btn.small { padding: 7px 14px; }
.ink { color: var(--title); font-weight: 700; }
.task.en_service, .task.arretee, .task.coupee, .task.de_cote { background: var(--bg); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .tl-d { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline li.fort span:last-child { color: var(--title); font-weight: 700; }

.fiche-details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; margin-bottom: 12px; }

.contact-card { display: flex; align-items: center; gap: 16px; }
.contact-av { width: 64px; height: 64px; padding: 6px; border-radius: 50%; background: var(--tint); flex: none; }
.apercu { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); color: var(--body); }

.tab-ico b { font-weight: 800; font-size: 14px; }

@media (max-width: 640px) {
  .stepper { gap: 4px; }
  .st { padding: 4px; }
  .st .st-n { display: none; }
  .st.active .st-n { display: inline; padding-right: 8px; }
  .st-sep { width: 8px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { white-space: nowrap; flex: none; }
  .task-actions .grow { flex-basis: 100%; order: -1; }
  .timeline li { grid-template-columns: 62px minmax(0, 1fr); }
  .hero-side { gap: 14px 20px; }
}
@media print {
  .fiche-details > summary { display: none; }
  .fiche-details:not([open]) > .fiche { display: block; }
}

/* ---------- Mes tâches : groupes, liste et panneau ---------- */
.tk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .8fr); gap: 14px; margin-top: 8px; }
.tk-tile {
  position: relative; text-align: left; font: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.tk-tile:hover { border-color: var(--border-strong); }
.tk-tile:active { transform: scale(.98); }
.tk-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.tk-tile-l { font-weight: 600; font-size: 13px; color: var(--muted); }
.tk-tile b { font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--title); letter-spacing: -.02em; }
.tk-tile-s { font-size: 13px; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tk-tile.ecartees { background: transparent; box-shadow: none; }
.tk-tile.ecartees b { color: var(--muted); }
.tk-tile.a_traiter::after, .tk-tile.en_cours::after {
  content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--accent); font-size: 13px; font-weight: 700;
}

.tk-bar { display: flex; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.tk-search { flex: 1 1 280px; position: relative; display: flex; align-items: center; }
.tk-search svg { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.tk-search input { width: 100%; padding: 11px 16px 11px 40px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font: inherit; font-size: 15px; color: var(--title); outline: none; transition: border-color .2s, box-shadow .2s; }
.tk-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.tk-tri { display: flex; align-items: center; gap: 8px; }
.tk-tri .select { width: auto; padding: 9px 12px; font-size: 14px; border-radius: 999px; }
.tk-bar .btn { padding: 11px 20px; }

.tk-cats, .dr-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tk-chip { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--body); transition: all .2s var(--ease); }
.tk-chip span { color: var(--faint); margin-left: 2px; }
.tk-chip:hover { border-color: var(--border-strong); }
.tk-chip.on { background: var(--tint); border-color: var(--tint); color: var(--tint-ink); }
.tk-chip.on span { color: var(--tint-ink); }

.tk-sec { margin-top: 28px; }
.tk-sec-head, .tk-sec > summary { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.tk-sec h3 { font-size: 18px; }
.tk-sec h3 span { color: var(--faint); font-weight: 700; margin-left: 4px; }
.tk-sec > summary { cursor: pointer; list-style: none; }
.tk-sec > summary::-webkit-details-marker { display: none; }
.tk-sec > summary h3::before { content: "›"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .2s var(--ease); }
.tk-sec[open] > summary h3::before { transform: rotate(90deg); }

.tk-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tk-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 120px auto 14px; align-items: center; gap: 16px;
  padding: 14px 18px; cursor: pointer; transition: background .15s var(--ease); outline: none;
}
.tk-row + .tk-row { border-top: 1px solid var(--border); }
.tk-row:hover, .tk-row:focus-visible { background: var(--bg); }
.tk-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.tk-row.flash { animation: flashRow 2.2s var(--ease); }
@keyframes flashRow { 0%, 35% { background: var(--tint); } 100% { background: transparent; } }
.tk-letter { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); font-weight: 800; font-size: 13px; }
.tk-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; color: var(--title); line-height: 1.35; }
.tk-name .pill { padding: 3px 9px; font-size: 10.5px; }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 4px; font-size: 13px; color: var(--muted); }
.tk-meta > * + *::before { content: "·"; margin: 0 8px; color: var(--faint); }
.tk-cat { color: var(--muted); }
.tk-steps { display: inline-flex; gap: 3px; }
.tk-steps i { font-style: normal; font-size: 11px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--alt); color: var(--faint); }
.tk-steps i.f { background: var(--tint); color: var(--tint-ink); }
.tk-steps i.c { background: var(--accent); color: var(--bg); }
.tk-val { text-align: right; line-height: 1.3; }
.tk-val b { display: block; font-size: 16px; font-weight: 800; color: var(--title); white-space: nowrap; }
.tk-val span { font-size: 12px; color: var(--muted); }
.tk-act { display: flex; justify-content: flex-end; min-width: 0; }
.tk-act .btn { white-space: nowrap; }
.tk-chev { color: var(--faint); font-size: 22px; line-height: 1; }
.tk-row.de_cote .tk-name, .tk-row.coupee .tk-name { color: var(--muted); }
.tk-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }

/* Panneau latéral */
body.drawer-open { overflow: hidden; }
.drawer-bg { position: fixed; inset: 0; z-index: 50; background: rgba(31, 33, 39, .32); }
.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 51; width: min(480px, calc(100vw - 24px));
  display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(31, 33, 39, .35); overflow: hidden;
}
.drawer-bg.anim { animation: fondu .25s ease both; }
.drawer.anim { animation: glisse .35s var(--ease) both; }
@keyframes fondu { from { opacity: 0; } }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } }
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; border-bottom: 1px solid var(--border); }
.dr-head h2 { font-size: 22px; margin-top: 4px; }
.dr-head .x { font-size: 26px; margin: -4px -8px 0 0; }
.dr-body { flex: 1; overflow-y: auto; padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 20px; overscroll-behavior: contain; }
.dr-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--card); }
.dr-f { display: flex; flex-direction: column; gap: 8px; }
.dr-f .dr-chips { margin-top: 2px; }
.dr-f .task-line { margin-top: 0; }
.dr-nom { font-weight: 700; color: var(--title); }
.dr-cost { font-size: 14px; color: var(--muted); margin: 0; }
.dr-cost b { color: var(--title); font-weight: 800; }
.dr-piles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dr-pile, .dr-evo {
  font: inherit; text-align: left; cursor: pointer; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card); display: flex; flex-direction: column; gap: 2px; transition: all .2s var(--ease);
}
.dr-pile b, .dr-evo b { font-size: 14px; color: var(--title); }
.dr-pile span, .dr-evo span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.dr-pile:hover, .dr-evo:hover { border-color: var(--border-strong); }
.dr-pile.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.dr-pile.on b { color: var(--tint-ink); }
.dr-evos { display: flex; flex-direction: column; gap: 8px; }
.dr-evo { position: relative; padding-right: 34px; }
.dr-evo::after { content: "→"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; }
.dr-evo:first-child { border-color: var(--accent); }
.dr-evo:first-child b { color: var(--tint-ink); }
.dr-evo[aria-expanded="true"]::after { content: "↓"; }
.dr-optim { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: var(--tint); font-size: 14px; color: var(--tint-ink); font-weight: 600; }
.dr-optim .input.n { width: 72px; padding: 6px 10px; display: inline-block; margin: 0 4px; }
.dr-etat { margin: 0; font-weight: 700; color: var(--title); }
.dr-etat b { font-weight: 800; }
.dr-f .actions { margin-top: 4px; }
.btn.link.danger { color: var(--muted); }
.btn.link.danger:hover { color: var(--title); text-decoration: underline; }

@media (max-width: 900px) {
  .tk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-tile.en_cours::after { display: none; }
}
@media (max-width: 640px) {
  .tk-tiles { gap: 10px; }
  .tk-tile { padding: 12px 14px; }
  .tk-tile b { font-size: 22px; }
  .tk-tile.a_traiter::after { display: none; }
  .tk-bar { gap: 10px; }
  .tk-search { flex-basis: 100%; }
  .tk-tri { flex: 1; }
  .tk-tri .select { flex: 1; }
  .tk-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .tk-cats::-webkit-scrollbar { display: none; }
  .tk-chip { flex: none; }
  .tk-row { grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "i m m" ". v a"; gap: 8px 12px; padding: 14px; }
  .tk-row > :first-child { grid-area: i; align-self: start; margin-top: 2px; }
  .tk-main { grid-area: m; }
  .tk-val { grid-area: v; text-align: left; }
  .tk-val b, .tk-val span { display: inline; }
  .tk-val span { margin-left: 6px; }
  .tk-act { grid-area: a; }
  .tk-chev { display: none; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; border-bottom: 0; }
  @keyframes glisse { from { transform: translateY(60px); opacity: 0; } }
  .dr-head, .dr-body, .dr-foot { padding-left: 18px; padding-right: 18px; }
  .dr-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .dr-piles { grid-template-columns: 1fr; }
}
@media print { .tk-bar, .tk-cats, .tk-act, .tk-chev, .tk-foot, #panneau { display: none !important; } }
@media (min-width: 901px) { body.drawer-open .toast { left: calc((100vw - 492px) / 2); } }
@media (max-width: 640px) { .tk-tri > span { display: none; } body.drawer-open .toast { bottom: auto; top: 16px; } }

/* ---------- Tableau de bord, version Essentiel : listes groupées ---------- */
.es { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; padding-top: 18px; }
.es .argos { margin: -14px 0 0; }
.es-label { margin: 0 0 8px 16px; font-size: 13px; font-weight: 600; color: var(--muted); }
.es-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.es-foot { margin: 8px 16px 0; font-size: 12.5px; color: var(--muted); }
.es-pad { padding: 16px 18px; }
.es-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; min-height: 52px; border-top: 1px solid var(--border); }
.es-row:first-child { border-top: 0; }
.es-txt { min-width: 0; flex: 1; }
.es-txt b { display: block; font-size: 14px; font-weight: 600; color: var(--title); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-txt small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 1px; }
.es-act { flex: none; background: none; border: 0; padding: 6px 2px; font: inherit; font-size: 13px; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: none; }
.es-act:hover { color: var(--accent-pressed); }
.es-chev { margin-left: auto; color: var(--border-strong); font-size: 20px; line-height: 1; }
.es-chip { width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: var(--title); font-weight: 800; font-size: 14px; }
.es-row .btn { flex: none; }

.es-week { padding: 0 18px 16px 68px; }
.es-days { display: flex; gap: 6px; max-width: 320px; }
.es-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; outline: none; }
.es-day > span { width: 100%; height: 30px; border-radius: 5px; background: var(--alt); display: flex; align-items: flex-end; overflow: hidden; }
.es-day i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; }
.es-day.auj > span { box-shadow: inset 0 0 0 1.5px var(--accent); }
.es-day small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.es-day.futur { opacity: .5; }
.es-week p { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.es-week p b { color: var(--title); font-weight: 700; }

#profil .es-pad .row { gap: 12px; }

@media (max-width: 640px) {
  .es { gap: 26px; padding-top: 4px; }
  .es-row { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
  .es-row .btn { margin-left: 48px; }
  .es-week { padding-left: 14px; }
  .es-txt b { white-space: normal; }
}

/* ---------- Écrans plein écran : connexion et questionnaire ---------- */
.plein-ecran .sidebar, .plein-ecran .mtop, .plein-ecran .tabbar { display: none; }
.plein-ecran .main { margin-left: 0; padding: 48px 20px 64px; }
.plein-ecran .toast { left: 50%; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand img { width: 30px; height: 30px; }
.auth-brand b { display: block; font-size: 14.5px; font-weight: 800; color: var(--title); letter-spacing: -0.01em; line-height: 1.2; }
.auth-brand small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.auth { max-width: 420px; margin: 4vh auto 0; display: flex; flex-direction: column; gap: 24px; }
.auth-card { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 26px; }
.auth-card > p { font-size: 14px; }
.auth-card .notice { margin-top: 0; }
.auth-card .btn { align-self: stretch; }
.auth-aide { color: var(--muted); }
.auth-switch, .auth-demo { font-size: 13.5px; color: var(--muted); text-align: center; }
.auth-switch .es-act, .auth-demo .es-act { padding: 0; font-size: 13.5px; }

.cfg { max-width: 640px; margin: 0 auto; }
.cfg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cfg-pas { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cfg-barre { display: flex; gap: 6px; margin: 18px 0 40px; }
.cfg-barre span { flex: 1; height: 4px; border-radius: 4px; background: var(--alt); transition: background .3s var(--ease); }
.cfg-barre span.on { background: var(--accent); }
.cfg h1 { font-size: clamp(26px, 3vw, 30px); }
.cfg-intro { margin: 8px 0 24px; font-size: 15px; max-width: 540px; }
.cfg-julien { display: flex; align-items: center; gap: 14px; margin: -8px 0 20px; padding: 14px 16px; background: var(--tint); border-radius: var(--radius); }
.cfg-julien-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card); color: var(--tint-ink); }
.cfg-julien-t { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--title); }
.cfg-julien-t small { font-size: 13px; color: var(--body); }
.cfg-julien .btn { flex: none; }
@media (max-width: 560px) { .cfg-julien { flex-wrap: wrap; } .cfg-julien .btn { width: 100%; justify-content: center; } }
.cfg-qs { display: flex; flex-direction: column; gap: 24px; padding: 22px; }
.cfg-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.cfg-q legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--title); }
.cfg-q legend small { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.cfg-q .choice { font-size: 13.5px; padding: 8px 14px; }
.cfg-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.cfg-q .choice { min-height: 40px; }
.cfg-aide { margin: -4px 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Questionnaire : valeur de l'heure */
.vh-res { margin-top: 16px; padding: 22px; }
.vh-k { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.vh-grand { margin: 2px 0 8px; font-size: 17px; font-weight: 700; color: var(--title); line-height: 1.2; }
.vh-grand b { margin-right: 4px; font-size: clamp(40px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.vh-calc { margin: 0 0 10px; font-size: 13.5px; color: var(--title); font-variant-numeric: tabular-nums; }
.vh-expl { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }
.vh-seuil { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--alt); font-size: 13.5px; }
.vh-seuil .vh-k { margin-bottom: 2px; }
.vh-seuil b { color: var(--title); }
.vh-champ { max-width: 280px; }
.vh-vide { margin: 0; font-size: 14px; color: var(--muted); }
.vh-recalc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.vh-recalc p { flex: 1 1 260px; margin: 0; }
.vh-recalc .btn { min-height: 40px; }

/* Questionnaire : écran de fin */
.fin-ok { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; background: var(--success-tint); color: var(--success); animation: pop .5s var(--ease) both; }
.fin-resume { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 12px; align-items: start; }
.fin-heure { padding: 20px 22px; }
.fin-heure .small { margin: 0; }
.fin-heure .vh-grand b { font-size: 44px; }
.vh-grand span { white-space: nowrap; }
.fin-env { padding-top: 18px; }
.fin-env > .vh-k { padding: 0 18px 8px; }
.fin-env dl { margin: 0; }
.fin-env dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 18px; border-top: 1px solid var(--border); font-size: 13.5px; }
.fin-env dt { color: var(--muted); flex: none; }
.fin-env dd { margin: 0; color: var(--title); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.fin-alertes { margin-top: 34px; }
.fin-alertes h2 { font-size: 21px; margin-bottom: 4px; }
.fin-alertes > .small { margin: 0; }
.fin-groupe { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.fin-groupe > .pill { align-self: flex-start; }
.alerte { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); animation: monte .35s var(--ease) both; animation-delay: calc(80ms + var(--i, 0) * 60ms); }
.alerte-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--alt); color: var(--title); }
.alerte h3 { margin: 6px 0 4px; font-size: 15.5px; line-height: 1.3; letter-spacing: -0.01em; }
.alerte p { margin: 0; font-size: 14px; }
.alerte .btn { margin-top: 12px; gap: 6px; min-height: 40px; }
.fin-bravo { margin-top: 14px; }
.fin-bravo h3 { font-size: 16px; margin-bottom: 4px; }
.fin-bravo p { margin: 0; font-size: 14px; }

@media (max-width: 640px) {
  .plein-ecran .main { padding: 24px 16px 40px; }
  .auth { margin-top: 0; }
  .auth-card { padding: 22px 20px; }
  .cfg-barre { margin-bottom: 28px; }
  .cfg-qs { padding: 18px 16px; }
  .vh-res, .fin-heure { padding: 18px 16px; }
  .fin-resume { grid-template-columns: 1fr; }
  .fin-env > .vh-k { padding: 0 16px 8px; }
  .fin-env dl > div { padding: 9px 16px; }
  .alerte { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 16px 16px 16px 14px; }
  .alerte h3 { margin-top: 3px; }
  .alerte-ico { width: 28px; height: 28px; }
}


/* ---------- Pages H, E et R (lot 3) ---------- */
.layout.seul { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

/* H : ce qu'il faut faire, en un coup d'œil */
.h-route { padding: 20px 22px; margin-bottom: 16px; }
.h-maintenant { display: flex; flex-direction: column; gap: 4px; color: var(--title); font-weight: 600; font-size: 16px; line-height: 1.45; }
.h-maintenant .label { color: var(--muted); }
.h-etapes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.h-et { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); min-width: 0; }
.h-et > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.h-et b { color: var(--title); font-size: 14px; font-weight: 700; line-height: 1.25; }
.h-et small { font-size: 12px; color: var(--muted); }
.h-et-n { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--alt); color: var(--muted); font-weight: 800; font-size: 13px; }
.h-et-n svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.h-et.courant { border-color: var(--accent); background: var(--card); }
.h-et.courant .h-et-n { background: var(--accent); color: var(--bg); }
.h-et.courant small { color: var(--accent); font-weight: 700; }
.h-et.fait .h-et-n { background: var(--tint); color: var(--tint-ink); }
.h-et.fait small { color: var(--muted); }
.h-et.fin .h-et-n svg { stroke-width: 2.2; }
.h-fin { margin-top: 14px; font-size: 14px; color: var(--body); }
.h-fin b { color: var(--title); }
.h-tache { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 18px; margin-bottom: 16px; border-radius: 14px; border: 1px dashed var(--border-strong); font-size: 14px; }
.h-tache > b { color: var(--title); font-weight: 700; }
.h-aide { margin-bottom: 14px; }
.block.optionnel .num { background: var(--alt); color: var(--muted); }
.h-details > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; padding: 8px 0; min-height: 40px; }
.h-details[open] > summary { margin-bottom: 8px; }
.dictee-txt { color: var(--title); font-weight: 700; }
.dictee-absente { padding: 10px 14px; border-radius: 12px; background: var(--alt); color: var(--body); margin-bottom: 10px; }
.proc-corriger { margin-top: 22px; padding: 18px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); }
.proc-corriger h4 { font-size: 15px; margin-bottom: 4px; }
.proc-corriger .small.muted { margin-bottom: 12px; }
.proc-corriger .dictee { margin-bottom: 10px; }
.proc-corriger .mic { width: 48px; height: 48px; }
.h-valider { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.h-ok { display: flex; align-items: center; gap: 8px; color: var(--title); font-weight: 600; font-size: 14px; }
.h-ok svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--success); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* La procédure arrive : ses étapes entrent l'une après l'autre. */
.proc-liste.apparait .proc-step { animation: procEntre .42s var(--ease) both; animation-delay: calc(var(--i) * 140ms); }
@keyframes procEntre { from { opacity: 0; transform: translateY(10px); } }

/* Argos écrit : les étapes de son travail défilent, un squelette de procédure se dessine. */
.proc-attente { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 1000px) {
  .proc-attente { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .proc-attente > .argos-attente, .proc-attente > p { grid-column: 1 / -1; }
}
.phases { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 6px; }
.phases { padding-top: 6px; gap: 9px; }
.phases li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--title); animation: phaseEntre .35s var(--ease) both; animation-delay: var(--d); }
@keyframes phaseEntre { from { opacity: .38; } }
.ph-ico { position: relative; width: 18px; height: 18px; flex: none; }
.ph-en { position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--border-strong); animation: actif .01s linear both, tourne .9s linear infinite, phaseFin .2s ease both; animation-delay: var(--d), var(--d), var(--f); }
@keyframes actif { to { border-color: var(--tint); border-top-color: var(--accent); } }
.ph-ico svg { position: absolute; inset: 0; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; animation: phaseOk .25s ease both; animation-delay: var(--f); }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes phaseFin { to { opacity: 0; } }
@keyframes phaseOk { to { opacity: 1; } }
.squelette { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); }
.sq-ligne { display: flex; gap: 12px; align-items: center; min-height: 26px; animation: phaseEntre .35s var(--ease) both; animation-delay: calc(var(--i) * 1.6s + .3s); }
.sq-n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--tint); color: var(--tint-ink); font-weight: 800; font-size: 12px; }
.sq-barres { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sq-barres i { display: block; height: 9px; border-radius: 999px; width: 72%; background: linear-gradient(90deg, var(--border) 0%, var(--bg) 50%, var(--border) 100%) 0 0 / 200% 100%; animation: dessine 1.1s var(--ease) both, reflet 1.6s linear infinite; animation-delay: calc(var(--i) * 1.6s + .45s), 0s; }
.sq-barres i + i { width: 46%; height: 7px; animation-delay: calc(var(--i) * 1.6s + .75s), .3s; }
@keyframes dessine { from { width: 0; } }
@keyframes reflet { to { background-position: -200% 0; } }

/* E : les outils déclarés, puis l'ajout d'un outil */
.q-sous { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 10px 0 8px; }
.outil-ajout { display: flex; gap: 8px; margin-top: 14px; max-width: 460px; }
.outil-ajout .input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; }
.outil-ajout .btn { flex: none; min-height: 40px; }

/* R : le guide pas à pas */
.guide-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.guide-tete h4 { font-size: 18px; margin-top: 2px; }
.g-adresse { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.guide-tete .btn svg, .g-actions .btn svg { width: 14px; height: 14px; margin-left: 2px; }
.guide-choix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.guide-choix .choice { padding: 6px 13px; font-size: 13px; min-height: 36px; }
.g-etapes { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.g-etape { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 20px; align-items: center; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); transition: border-color .3s var(--ease), background .3s var(--ease); }
.g-etape.fait { background: var(--bg); }
@container (max-width: 640px) { .g-etape { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.g-titre { display: flex; align-items: center; gap: 12px; }
.g-titre h4 { font-size: 16px; }
.g-num { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--tint); color: var(--tint-ink); font-weight: 800; font-size: 14px; }
.g-num svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.g-etape.fait .g-num { background: var(--accent); color: var(--bg); }
.g-texte > p { margin-top: 8px; font-size: 14.5px; }
.g-mot { color: var(--title); font-weight: 700; }
.g-citation { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); color: var(--title); font-weight: 600; font-size: 14px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.g-actions .btn, .guide-tete .btn { min-height: 40px; }
.g-fait { padding: 8px 0 0; margin-top: 10px; border-bottom: 0; border-top: 1px dashed var(--border); font-weight: 600; color: var(--title); font-size: 14px; }
.g-aide { margin-top: 12px; }
.g-test { margin-top: 18px; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg); }
.g-test-cas { margin: 6px 0 6px; color: var(--title); font-weight: 700; }

/* Maquette schématique de l'écran : neutre, seule la cible est violette. */
.mq { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; font-size: 10.5px; line-height: 1.3; color: var(--muted); box-shadow: 0 10px 28px -20px rgba(31, 33, 39, .35); user-select: none; }
.mq-haut { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg); }
.mq-haut i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.mq-haut span { margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 9.5px; }
.mq-corps { display: flex; min-height: 156px; }
.mq-cote { width: 40%; flex: none; display: flex; flex-direction: column; gap: 5px; padding: 10px 8px; background: var(--bg); border-right: 1px solid var(--border); }
.mq-logo { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-strong); margin-bottom: 4px; }
.mq-item { position: relative; padding: 4px 6px; border-radius: 6px; line-height: 1.2; }
.mq-item.actif { background: var(--card); color: var(--title); font-weight: 700; }
.mq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.mq-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.mq-titre { color: var(--title); font-weight: 800; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mq-btn, .mq-pbtn { position: relative; flex: none; max-width: 100%; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--title); font-weight: 600; white-space: nowrap; }
.mq-menu { align-self: flex-end; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); box-shadow: 0 6px 16px -10px rgba(31, 33, 39, .4); margin-top: -4px; }
.mq-menu-i { position: relative; padding: 3px 8px; border-radius: 5px; color: var(--title); white-space: nowrap; }
.mq-onglets { display: flex; gap: 12px; border-bottom: 1px solid var(--border); }
.mq-onglet { position: relative; padding: 2px 0 4px; }
.mq-onglet.mq-cible { padding: 2px 6px 4px; }
.mq-onglet.actif { color: var(--title); font-weight: 700; box-shadow: inset 0 -2px 0 var(--border-strong); }
.mq-champ { position: relative; display: flex; flex-direction: column; gap: 3px; }
.mq-lab { font-weight: 600; color: var(--title); }
.mq-zone { height: 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); }
.mq-champ:last-child .mq-zone { height: 22px; }
.mq-trait { display: block; height: 6px; border-radius: 999px; background: var(--alt); width: 80%; }
.mq-trait.moyen { width: 56%; }
.mq-trait.court { width: 40%; }
.mq-saisie { position: relative; margin-top: auto; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--faint); }
.mq-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mq-saisie.mq-cible { color: var(--title); }
.mq-panneau { width: 36%; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-left: 1px solid var(--border); background: var(--bg); }
.mq-ptitre { font-weight: 700; color: var(--title); }
.mq-pbtn { align-self: flex-start; max-width: 100%; }
.mq-fichier { height: 16px; border-radius: 5px; border: 1px solid var(--border); background: var(--card); }
.mq-fichier + .mq-fichier { width: 70%; }
.mq-pbtn .mq-t { white-space: normal; }
.mq { container-type: inline-size; }
@container (max-width: 380px) {
  .mq-corps:has(.mq-panneau) .mq-cote { display: none; }
  .mq-panneau { width: 42%; }
}
/* La cible : halo et flèche violets */
.mq-cible { z-index: 1; color: var(--accent) !important; border-color: var(--accent) !important; background: var(--card); border-radius: 8px; box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(102, 68, 216, .16); animation: halo 1.8s ease-in-out infinite; }
.mq-item.mq-cible, .mq-menu-i.mq-cible, .mq-onglet.mq-cible { font-weight: 700; }
.mq-champ.mq-cible { background: none; box-shadow: none; animation: none; }
.mq-champ.mq-cible .mq-zone { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(102, 68, 216, .16); animation: halo 1.8s ease-in-out infinite; }
.mq-champ.mq-cible .mq-lab { color: var(--accent); }
@keyframes halo { 50% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 9px rgba(102, 68, 216, .08); } }
.mq-fleche { position: absolute; width: 14px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; animation: fleche 1.2s ease-in-out infinite; }
[data-f="haut"] > .mq-fleche { top: calc(100% + 5px); left: calc(50% - 7px); --dx: 0; --dy: -3px; }
[data-f="bas"] > .mq-fleche { bottom: calc(100% + 5px); left: calc(50% - 7px); transform: rotate(180deg); --dx: 0; --dy: 3px; }
[data-f="gauche"] > .mq-fleche { left: calc(100% + 10px); top: calc(50% - 11px); transform: rotate(-90deg); --dx: -3px; --dy: 0; }
[data-f="droite"] > .mq-fleche { right: calc(100% + 10px); top: calc(50% - 11px); transform: rotate(90deg); --dx: 3px; --dy: 0; }
[data-f="champ"] > .mq-fleche { top: -4px; right: 18px; transform: rotate(180deg); --dx: 0; --dy: 3px; }
@keyframes fleche { 50% { translate: var(--dx) var(--dy); } }

@media (max-width: 900px) {
  .h-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .h-route { padding: 16px; }
  .h-maintenant { font-size: 15px; }
  .h-et { padding: 8px 10px; gap: 8px; }
  .h-et b { font-size: 13px; }
  .h-tache { padding: 10px 14px; }
  .g-etape { padding: 14px; }
  .guide-choix .choice { min-height: 40px; }
  .outil-ajout { max-width: none; }
}

/* ---------- Mes tâches : ajouter (voix, documents, main), vérifier, carte ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.facultatif, .rp-f .label i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint); font-weight: 500; }

/* Trois portes d'entrée, égales */
.tk-portes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tk-porte {
  font: inherit; text-align: left; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 22px 20px; min-height: 214px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--body);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.tk-porte:hover { border-color: var(--border-strong); }
.tk-porte:active { transform: scale(.98); }
.tk-porte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk-porte.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.tk-porte-ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--title); margin-bottom: 6px; transition: transform .25s var(--ease); }
.tk-porte:hover .tk-porte-ico { transform: scale(1.06); }
.tk-porte b { font-size: 18px; font-weight: 800; color: var(--title); letter-spacing: -.01em; line-height: 1.25; }
.tk-porte-txt { font-size: 14px; color: var(--muted); line-height: 1.5; flex: 1; }
.tk-porte-go { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.tk-porte-go::after { content: " →"; }
.tk-porte.on .tk-porte-go::after { content: " ↓"; }
.tk-julien { margin-top: 12px; font-size: 14px; color: var(--muted); }
.tk-ajout { margin-top: 22px; padding: 22px 24px; scroll-margin-top: 96px; }
.rp-f .label { white-space: nowrap; }
.tk-ajout.ouvre { animation: ouvreAjout .35s var(--ease) both; }
@keyframes ouvreAjout { from { opacity: 0; transform: translateY(8px); } }
.tk-ajout-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-ajout-tete h3 { font-size: 18px; }
.tk-modes button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; }
.tk-ajout-corps { animation: fondu .25s ease both; }
/* Formulaire affiché par défaut (aucune façon choisie) : pas de fondu, il est là dès l'arrivée. */
.tk-ajout.replie .tk-ajout-corps { animation: none; }
.tk-conseils { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 28px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--border); align-items: start; font-size: 14px; }
.tk-conseils h4 { font-size: 14px; margin-bottom: 10px; }
.tk-conseils .aside-mot + .aside-mot { margin-top: 8px; }

/* Saisie rapide */
.rapide { display: grid; grid-template-columns: minmax(0, 2fr) auto auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.rp-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rp-f .label { font-size: 11px; }
.rp-in { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.rapide .input, .rapide .select, .rp-ok { min-height: 44px; }
.rapide .input.n, .verif .input.n { width: 68px; padding-left: 10px; padding-right: 6px; }
.rapide .select, .verif .select { width: auto; }
.rp-cout { margin-top: 10px; color: var(--muted); }
.rp-cout b { color: var(--title); font-weight: 800; }

/* Récit */
.recit-idees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.recit-idees .small { margin-right: 4px; }
.idee { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--alt); color: var(--body); }
.tk-attente { display: flex; flex-direction: column; gap: 14px; }

/* Import : dépôt, fichiers lus, confidentialité */
.imp-zone {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px; border-radius: 14px;
  border: 1.5px dashed var(--border-strong); background: var(--bg); transition: border-color .2s var(--ease), background .2s var(--ease);
}
.imp-ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--title); flex: none; }
.imp-txt { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.imp-txt b { color: var(--title); font-size: 16px; }
.imp-txt span { font-size: 13.5px; color: var(--muted); }
.imp-choisir { position: relative; overflow: hidden; min-height: 44px; }
.imp-choisir:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.imp-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; font-size: 0; }
body.depot-survol .imp-zone, body.depot-survol .tk-porte.depot { border-color: var(--accent); background: var(--tint); }
.tk-voile { display: none; }
body.depot-survol .tk-voile {
  display: grid; place-items: center; position: fixed; inset: 12px; z-index: 40; pointer-events: none;
  border: 2px dashed var(--accent); border-radius: 22px; background: rgba(239, 234, 251, .94);
  animation: fondu .2s ease both;
}
.tk-voile span { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--tint-ink); text-align: center; padding: 0 20px; }
.imp-fichiers { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.imp-f { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 12px 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); animation: ouvreAjout .3s var(--ease) both; }
.imp-f-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--tint-ink); }
.imp-f.erreur .imp-f-ico { background: var(--warning-tint); color: var(--warning); }
.imp-f-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imp-f-txt b { color: var(--title); overflow-wrap: anywhere; }
.imp-f-txt > span { font-size: 13.5px; color: var(--muted); }
.imp-f.erreur .imp-f-txt > span { color: var(--body); }
.imp-f .x { min-width: 40px; min-height: 40px; margin: -6px -4px 0 0; }
.imp-apercu summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 4px; width: fit-content; }
.imp-apercu pre { margin: 8px 0 0; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 12.5px/1.5 var(--font); color: var(--body); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.imp-confid { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0; font-size: 13.5px; color: var(--muted); }
.imp-confid svg { flex: none; margin-top: 2px; color: var(--tint-ink); }

/* Écran de vérification avant l'ajout */
.verif-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.verif-tete h3 { font-size: 20px; }
.verif-tete p { margin-top: 4px; }
.verif-note { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--tint); color: var(--tint-ink); font-size: 14px; }
.verif-note .argos-nom { display: block; margin-bottom: 2px; }
.verif-groupe { margin-top: 20px; }
.verif-groupe h4 { font-size: 15px; margin-bottom: 8px; }
.verif-groupe h4 span { color: var(--faint); margin-left: 4px; }
.verif-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.verif-t { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 14px 16px; transition: background .2s var(--ease), opacity .2s var(--ease); }
.verif-t + .verif-t { border-top: 1px solid var(--border); }
.verif-t.off { background: var(--bg); }
.verif-t.off .verif-champs { opacity: .55; }
.verif-coche { width: 22px; height: 22px; margin: 10px 0 0; accent-color: var(--accent); cursor: pointer; }
.verif-champs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.verif-nom { font-weight: 700; color: var(--title); }
.verif-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.verif-ligne .input, .verif-ligne .select { padding: 7px 10px; font-size: 14px; min-height: 40px; }
.verif-proc { flex: 1 1 160px; width: auto; }
.verif-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.verif-info b { color: var(--title); }
.verif-proche { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--body); }
.verif-proche svg { flex: none; margin-top: 2px; color: var(--warning); }
.verif-pq { font-size: 13px; color: var(--muted); }
.verif-pied { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--card); }

/* Pastilles : pile et état */
.pile-pill, .etat-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
/* Ce qu'on fait de la tâche : un mot, pas une pastille. */
.pile-pill { padding: 0; border-radius: 0; background: none; color: var(--body); font-weight: 600; font-size: 13px; }
/* L'état : une pastille neutre ; seule une tâche en cours prend le violet. Le vert et l'orange restent au tableau de bord. */
.etat-pill { background: var(--alt); color: var(--muted); }
.etat-pill.en_cours { background: var(--tint); color: var(--tint-ink); }
.tk-meta { gap: 6px 0; }
.tk-meta > .etat-pill + .pile-pill { margin-left: 10px; }
.tk-meta > .etat-pill::before, .tk-meta > .etat-pill + .pile-pill::before { content: none !important; }
.tk-row { grid-template-columns: 28px minmax(0, 1fr) 150px auto 14px; }
.tk-val .gain { color: var(--title); }
.tk-jauge { display: block; height: 4px; margin: 6px 0 0 auto; width: 100%; max-width: 120px; border-radius: 999px; background: var(--alt); overflow: hidden; }
.tk-jauge i { display: block; height: 100%; border-radius: inherit; background: var(--swoosh); }
.tk-row.flash .tk-jauge i { animation: jauge .6s var(--ease) both; }
@keyframes jauge { from { width: 0; } }

/* Barre d'outils de la liste */
.tk-vues button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; }
.tk-bascule { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 6px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--title); cursor: pointer; border-radius: 10px; }
.tk-bascule:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk-renomme-l { margin-top: 8px; }
.tk-sec-head .tk-ren { margin-left: auto; }
.tk-renomme { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.tk-renomme .input { flex: 0 1 300px; padding: 8px 12px; font-weight: 700; min-height: 40px; }

/* Carte : le centre, une branche par process, une pastille par tâche */
.carte { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 28px 48px; align-items: center; margin-top: 22px; padding: 28px; border-radius: 22px; background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.carte.un-cote { grid-template-columns: 180px minmax(0, 1fr); }
.carte.un-cote .cm-g { display: none; }
.cm-liens { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.cm-liens path { fill: none; stroke: var(--border-strong); stroke-linecap: round; }
.cm-liens circle { fill: var(--card); stroke: var(--border-strong); stroke-width: 2; }
.cm-col { display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; z-index: 1; min-width: 0; }
.cm-centre { position: relative; z-index: 1; align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 22px 16px; border-radius: 50%; aspect-ratio: 1; justify-content: center; background: var(--tint); border: 1px solid rgba(102, 68, 216, .2); box-shadow: 0 0 0 10px rgba(239, 234, 251, .55); }
.cm-c-nom { font-weight: 800; color: var(--title); font-size: 17px; line-height: 1.2; }
.cm-c-metier { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-centre b { margin-top: 6px; font-size: 20px; font-weight: 800; color: var(--tint-ink); }
.cm-c-tot { font-size: 12px; color: var(--tint-ink); font-weight: 600; }
.cm-branche { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px 14px; animation: ouvreAjout .4s var(--ease) both; animation-delay: calc(var(--n, 0) * 60ms); }
.cm-branche.sans { border-style: dashed; background: var(--bg); }
.cm-tete { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.cm-tete > b { font-size: 15px; font-weight: 800; color: var(--title); line-height: 1.3; }
.cm-tete span { font-size: 12.5px; color: var(--muted); }
.cm-tete span b { color: var(--title); }
.cm-taches { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-t {
  font: inherit; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; padding: 5px 12px 5px 6px; cursor: pointer;
  border-radius: 22px; line-height: 1.3; border: 1px solid var(--border); background: var(--bg); color: var(--title); font-size: 13px; font-weight: 600; text-align: left;
  transition: border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.cm-t:hover, .cm-t.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.cm-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cm-t:active { transform: scale(.97); }
.cm-t.flash { animation: flashRow 2.2s var(--ease); }
.cm-nom { overflow: hidden; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* Niveaux d'optimisation : un rond, une icône. Vert et orange en contour, jamais en grand aplat. */
.mq { display: inline-grid; place-items: center; flex: none; width: var(--d); height: var(--d); border-radius: 50%; border: 2px solid var(--border-strong); background: var(--card); color: var(--muted); }
.mq svg { stroke-width: 3.2; max-width: 16px; max-height: 16px; }
.mq.aoptimiser { border-width: 1.5px; }
.mq.optimisee { border-color: var(--accent); color: var(--accent); }
.mq.encours { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.mq.aoptimiser { border-color: var(--border-strong); color: var(--muted); }
.mq.rien { border-style: dashed; border-color: var(--border-strong); background: transparent; color: var(--faint); }
.tk-mq { display: grid; place-items: center; }
.niv-filtre { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.niv { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 13px 4px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font: inherit; font-size: 13px; font-weight: 600; color: var(--body); cursor: pointer; transition: all .2s var(--ease); }
.niv span { color: var(--faint); }
.niv:hover { border-color: var(--border-strong); }
.niv.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); color: var(--tint-ink); }
.niv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.niv-aide { margin-top: 8px; max-width: 900px; line-height: 1.5; }
.niv-aide b { color: var(--body); font-weight: 700; }
.cm-t.rien { color: var(--muted); background: transparent; }
.cm-c-opt { font-size: 12px; font-weight: 700; color: var(--success); }
.cm-avance { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cm-jauge { display: flex; gap: 2px; height: 4px; margin-top: 5px; max-width: 220px; }
.cm-jauge i { display: block; border-radius: 999px; background: var(--border); }
.cm-jauge i.optimisee { background: var(--success); }
.cm-jauge i.encours { background: var(--accent); }
.cm-jauge i.aoptimiser { background: var(--warning); opacity: .75; }
.cm-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.cm-legende .cm-taille { display: inline-flex; align-items: center; gap: 6px; }
.cm-aide { margin-top: 6px; }

@media (max-width: 1100px) {
  .rapide { grid-template-columns: auto auto minmax(0, 1fr); }
  .rp-nom { grid-column: 1 / -1; }
  .rp-ok { grid-column: 1 / -1; justify-self: start; }
  .carte { grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr); gap: 24px 40px; padding: 22px; }
  .carte.un-cote { grid-template-columns: 170px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .verif-pied { bottom: calc(88px + env(safe-area-inset-bottom)); border-radius: 0 0 14px 14px; }
  .tk-portes { grid-template-columns: 1fr; gap: 12px; }
  .tk-porte { min-height: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; align-items: start; }
  .tk-porte-ico { grid-row: span 3; margin: 0; }
  .tk-conseils { grid-template-columns: 1fr; }
}
/* Carte en mobile : le centre en haut, les process empilés le long d'un fil. */
@media (max-width: 760px) {
  .carte, .carte.un-cote { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 14px 18px 14px; }
  .cm-liens { display: none; }
  .cm-col { display: contents; }
  .cm-centre { order: 0; aspect-ratio: auto; border-radius: 18px; padding: 14px 16px; box-shadow: none; }
  .cm-branche { position: relative; margin-left: 22px; }
  .cm-branche::before { content: ""; position: absolute; left: -16px; top: -16px; bottom: -16px; width: 2px; background: var(--border); }
  .cm-branche::after { content: ""; position: absolute; left: -16px; top: 22px; width: 14px; height: 2px; background: var(--border-strong); }
}
@media (max-width: 640px) {
  .tk-porte { padding: 16px; }
  .tk-porte b { font-size: 16.5px; }
  .tk-ajout { padding: 18px 16px; }
  .tk-ajout.replie .tk-ajout-corps { display: none; }
  .tk-ajout.replie .tk-ajout-tete { margin-bottom: 0; }
  .tk-ajout.replie .tk-modes button.on { background: transparent; box-shadow: none; color: var(--body); }
  .tk-modes { width: 100%; }
  .tk-modes button { flex: 1; justify-content: center; padding: 6px 8px; font-size: 12.5px; flex-direction: column; gap: 2px; min-height: 48px; }
  .rapide { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; }
  .rapide .rp-f:nth-child(3) { grid-column: 1 / -1; }
  .rapide .input.n, .verif .input.n { width: 56px; }
  .rp-in .select { flex: 1; min-width: 0; padding-left: 8px; padding-right: 4px; }
  .rp-in { gap: 5px; }
  .rp-proc { grid-column: 1 / -1; }
  .rp-ok { width: 100%; justify-content: center; }
  .imp-zone { padding: 16px; }
  .imp-choisir { width: 100%; }
  .verif-t { padding: 12px; gap: 10px; }
  .verif-pied .btn:last-child { flex: 1; justify-content: center; }
  .tk-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .tk-jauge { margin-left: 0; max-width: 90px; display: inline-block; vertical-align: middle; margin: 0 0 0 8px; }
  .tk-vues { flex: 1; }
  .tk-vues button { flex: 1; justify-content: center; }
  .tk-bascule { flex: 1 1 100%; }
  .cm-t { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-porte, .tk-porte-ico, .cm-t { transition: none; }
  .tk-porte:hover { transform: none; }
  .tk-ajout.ouvre, .tk-ajout-corps, .imp-f, .cm-branche, .tk-voile, .cm-t.flash, .tk-row.flash .tk-jauge i { animation: none !important; }
}
.tip { max-width: min(380px, calc(100vw - 16px)); white-space: normal; text-align: center; }
@media print { .tk-ajout, .tk-vues, .tk-bascule, .cm-aide, .tk-voile { display: none !important; } }

/* ---------- Lot 5 : tester plus tard, Suivi, ouvrir l'assistant ---------- */
.sb-badge.on { background: var(--tint); color: var(--tint-ink); }
.tab-ico { position: relative; }
.tab-badge {
  position: absolute; top: -3px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.btn-ext svg { width: 14px; height: 14px; flex: none; }

/* R : « Je testerai plus tard » */
.plus-tard { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 0 30px; }
.plus-tard .btn { min-height: 40px; }
.plus-tard-ok { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); animation: monte .3s var(--ease) both; }
.plus-tard-ok > p { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--body); }
.plus-tard-ok > p b { color: var(--title); }
.plus-tard-ok .actions { margin-top: 12px; }
.plus-tard-ok .actions .btn { min-height: 40px; }
.plus-tard-ok .small { margin-top: 8px; }
.pt-coche { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--success-tint); color: var(--success); }
.pt-coche svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

/* Lien du projet (guide R et Mes assistants) */
.g-lien, .as-lien { margin-top: 12px; }
.g-lien > summary, .as-lien > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13.5px; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.g-lien > p, .as-lien > p { margin: 4px 0 8px; }
.lien-projet { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.lien-lab { font-weight: 600; font-size: 13px; color: var(--title); }
.lien-lab .facultatif, .lien-projet .facultatif { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
.lien-ligne { display: flex; gap: 8px; }
.lien-ligne .input { flex: 1; min-width: 0; min-height: 42px; }
.lien-ligne .btn { flex: none; min-height: 42px; }
.lien-msg { font-size: 13px; color: var(--muted); min-height: 0; }
.lien-msg:empty { display: none; }
.lien-msg.erreur { color: var(--body); background: var(--warning-tint); padding: 8px 12px; border-radius: 10px; }
.lien-msg.ok { color: var(--success); font-weight: 600; }
.lien-projet .btn.link { align-self: flex-start; min-height: 40px; }

/* Page Suivi */
.sv { max-width: 860px; display: flex; flex-direction: column; gap: 28px; }
.sv-cpts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sv-cpt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: background .15s var(--ease); }
.sv-cpt + .sv-cpt { border-left: 1px solid var(--border); }
.sv-cpt:hover:not([disabled]) { background: var(--bg); }
.sv-cpt[disabled] { cursor: default; }
.sv-cpt-k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sv-cpt-k .sv-mq { width: 22px; height: 22px; border-radius: 7px; font-size: 11px; }
.sv-cpt-v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--title); line-height: 1.05; }
.sv-cpt.zero .sv-cpt-v { color: var(--faint); }
.sv-cpt-s { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.sv-mq { width: 24px; height: 24px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--title); }
.sv-mq svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Le statut se lit à l'icône seule, en couleur quand il porte une information : servi en vert, à revoir en orange. */
.sv-mq.mesure { color: var(--accent); }
.sv-mq.service { color: var(--success); }
.sv-mq.revoir { color: var(--warning); }
.sv-n { margin-left: 6px; color: var(--faint); }
.sv-row { align-items: flex-start; padding: 16px 18px; }
.sv-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sv-test { font-size: 13.5px; color: var(--title); font-weight: 600; padding: 10px 14px; border-radius: 10px; background: var(--alt); }
.sv-test .label { display: block; font-size: 12.5px; margin-bottom: 2px; }
.sv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sv-actions .btn { min-height: 40px; }
.sv-row .es-week { padding: 2px 0 0; }
.sv .es-row .btn { flex: none; min-height: 40px; }
.sv-aide { padding: 0 16px; }
.sv-vide { text-align: center; padding: 34px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sv-vide h2 { font-size: 22px; margin-top: 6px; }
.sv-vide > p { max-width: 520px; }
.sv-vide .actions { justify-content: center; }
.sv-etapes { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.sv-etapes li { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 132px; font-size: 13px; position: relative; }
.sv-etapes li + li::before { content: ""; position: absolute; top: 18px; right: calc(50% + 30px); width: 82px; height: 2px; border-radius: 2px; background: var(--border-strong); }
.sv-etapes b { color: var(--title); font-weight: 700; margin-top: 4px; }
.sv-etapes small { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* Mes assistants */
.as-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.as-actions .btn { min-height: 42px; }
.as-ou { margin-top: 8px; }
.as-url { color: var(--title); font-weight: 600; word-break: break-all; }
.as-tache { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(102, 68, 216, .35); text-align: left; }
.as-tache:hover { color: var(--accent-pressed); }
.as-carte .fiche-details { margin-top: 14px; }

@media (max-width: 640px) {
  .sv { gap: 22px; }
  .sv-cpts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-cpt { padding: 14px 16px; }
  .sv-cpt:nth-child(3) { border-left: 0; }
  .sv-cpt:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .sv-cpt-v { font-size: 26px; }
  .sv-row { padding: 14px; flex-wrap: nowrap; }
  .sv-row .sv-mq { width: 30px; height: 30px; font-size: 12px; }
  .sv .es-row .btn { margin-left: 0; }
  #sv-maintenant .es-txt { flex-basis: calc(100% - 60px); }
  #sv-maintenant .es-row .btn { margin-left: 48px; }
  .sv-etapes { gap: 6px; flex-wrap: nowrap; }
  .sv-etapes li { width: 88px; }
  .sv-etapes li + li::before { width: 46px; right: calc(50% + 24px); }
  .plus-tard { margin-left: 0; }
  .lien-ligne { flex-wrap: wrap; }
  .lien-ligne .input { flex-basis: 100%; }
  .as-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .plus-tard-ok { animation: none; } }
@media print { .sv-actions, .as-actions, .as-lien, .g-lien { display: none !important; } }

/* ---------- Tableau de bord (lot 6) : résultats, jauge, action du moment, courbe, suivi, chronologie ---------- */
.db { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.db .page-head { padding-bottom: 6px; max-width: 820px; }
.db > .argos { margin: 0; }
.db > .card + .card, .db-sec > .card + .card { margin-top: 0; }
.db-head-plein { padding: 10px 0 4px; }
.db-date { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.db-depuis { color: var(--muted); }
.db-head-plein h1 { margin-top: 6px; font-size: 32px; }
.db-sec { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.db-sec-head h2 { margin-top: 6px; }
.db-k { display: block; font-size: 12.5px; color: var(--muted); }
.db-s { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.db-s a { font-weight: 700; text-decoration: none; }

/* Indicateurs */
.db-inds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-ind { padding: 18px 22px; min-width: 0; }
.db-ind + .db-ind { border-left: 1px solid var(--border); }
.db-v { display: block; margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--title); line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-v small { font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.db-v i, .jg-v i, .jg-pv i { font-style: normal; color: var(--border-strong); }
.db-inds.vide .db-v small { color: var(--faint); }

/* Jauge sur 100 % */
.db-jauge { padding: 20px 22px 18px; }
.jg-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.jg-v { display: block; margin-top: 4px; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; color: var(--title); line-height: 1; font-variant-numeric: tabular-nums; }
.jg-pot { text-align: right; }
.jg-pv { display: block; margin-top: 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--title); line-height: 1.1; font-variant-numeric: tabular-nums; }
.jg-zone { position: relative; margin: 34px 0 40px; }
.jg-piste { position: relative; height: 14px; border-radius: 999px; background: var(--alt); overflow: hidden; }
.jg-acquis, .jg-possible { position: absolute; top: 0; bottom: 0; outline: none; }
.jg-acquis { left: 0; background: var(--accent); border-radius: 999px 0 0 999px; }
.jg-possible {
  border-left: 2px solid var(--card);
  background: repeating-linear-gradient(135deg, rgba(102, 68, 216, .38) 0 5px, rgba(102, 68, 216, .16) 5px 9px);
}
.jg-acquis:hover, .jg-acquis:focus-visible, .jg-possible:hover, .jg-possible:focus-visible { filter: brightness(.92); }
.jg-repere { position: absolute; top: -7px; height: 28px; width: 0; border-left: 2px solid var(--title); pointer-events: none; }
.jg-repere.pot { border-left: 2px dashed var(--accent); }
.jg-repere em { position: absolute; left: 0; transform: translateX(-50%); font-style: normal; font-size: 12px; font-weight: 700; color: var(--title); white-space: nowrap; }
.jg-repere.auj em { top: 32px; }
.jg-repere.pot em { bottom: 32px; }
.jg-repere.g em { transform: translateX(-4px); }
.jg-repere.d em { transform: translateX(calc(-100% + 4px)); }
.jg-ech { display: none; }
.jg-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.jg-legende span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
.sw.acquis { background: var(--accent); }
.sw.possible { background: repeating-linear-gradient(135deg, rgba(102, 68, 216, .45) 0 3px, rgba(102, 68, 216, .18) 3px 5px); }
.sw.hors { background: var(--alt); box-shadow: inset 0 0 0 1px var(--border); }
.jg-hyp { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.db-jauge.vide .jg-zone { margin: 18px 0 8px; min-height: 92px; }
.db-jauge.vide .jg-piste { position: absolute; left: 0; right: 0; top: 12px; background: transparent; border: 1.5px dashed var(--border-strong); }
.db-jauge.vide .jg-ech { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -2px; font-variant-numeric: tabular-nums; }

/* Voile d'un graphique vide : la mention et le bouton qui y mène */
.db-zone { position: relative; }
.db-voile {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 24px));
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .94); border: 1px solid var(--border);
  box-shadow: 0 12px 28px -20px rgba(31, 33, 39, .35);
}
.db-voile p { font-size: 13.5px; color: var(--title); font-weight: 600; line-height: 1.45; }
.db-jauge.vide .db-voile { top: 50%; padding: 10px 16px; flex-direction: row; justify-content: center; flex-wrap: wrap; width: min(560px, calc(100% - 16px)); }
.db-jauge.vide .db-voile p { flex: 1 1 220px; text-align: left; }

/* Maintenant, avec Argos */
.db-now { padding: 18px 22px 20px; }
.db-now .argos { margin: 0 0 14px; max-width: none; }
.db-now-act { display: flex; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.db-now-txt { flex: 1; min-width: 0; }
.db-now-txt h2 { margin-top: 4px; font-size: 19px; }
.db-now-txt p { margin-top: 4px; font-size: 13.5px; color: var(--body); }
.db-now-act .btn { flex: none; }
.db-now .es-week { padding: 14px 0 0 50px; }

/* Cartes à deux colonnes */
.db-duo { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.db-duo > :only-child { grid-column: 1 / -1; }
.db-carte { padding: 18px 20px; min-width: 0; }
.db-carte + .db-carte { margin-top: 0; }
.db-carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.db-carte-tete h3 { font-size: 15.5px; }
.db-carte-tete p { margin-top: 2px; }
.db-carte-tete .es-act { white-space: nowrap; padding: 10px 2px; margin: -8px 0; }
.chart.court { min-height: 190px; }

/* Suivi en bref */
.db-cpts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.db-cpt { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); text-decoration: none; color: var(--title); min-width: 0; transition: border-color .15s var(--ease); }
.db-cpt:hover { border-color: rgba(102, 68, 216, .4); color: var(--title); }
.db-cpt .sv-mq { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.db-cpt b { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.db-cpt small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-cpt.zero { opacity: .6; }
.db-revoir { margin-top: 10px; }
.db-liste { list-style: none; margin: 10px 0 0; padding: 0; }
.db-li { width: 100%; display: block; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 2px; min-height: 44px; cursor: pointer; font: inherit; color: inherit; }
.db-li:hover b { color: var(--accent); }
.db-li b { display: block; font-size: 13.5px; font-weight: 700; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-li small { display: block; font-size: 12px; color: var(--muted); }
.db-calme { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Chronologie */
.db-ch-k { margin: 4px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.db-ch-k + .db-chrono { margin-bottom: 10px; }
.db-chrono { list-style: none; margin: 0; padding: 0; position: relative; }
.db-chrono li { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13.5px; color: var(--body); }
.db-chrono li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.db-chrono li:first-child::before { top: 14px; }
.db-chrono li:last-child::before { bottom: calc(100% - 14px); }
.db-chrono li:only-child::before { display: none; }
.db-pt { position: relative; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--border-strong); align-self: center; }
.db-chrono li.fort .db-pt { background: var(--accent); border-color: var(--accent); }
.db-chrono li.fort .db-ch-txt { color: var(--title); font-weight: 700; }
.db-chrono li.futur .db-pt { border-style: dashed; border-color: var(--accent); }
.db-chrono li.futur .db-ch-txt { color: var(--title); }
.db-chrono time { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-chrono .es-act { padding: 4px 2px; font-size: 12.5px; }
.db-chrono.fantome li { padding: 12px 0; }
.db-chrono.fantome .db-ch-txt i { display: block; height: 9px; border-radius: 5px; background: var(--alt); }
.db-chrono.fantome time { color: var(--faint); }
.db-chrono-c.vide .db-zone { min-height: 200px; }
.db-courbe.vide .db-zone { min-height: 190px; }

/* Points d'attention en bref */
.db-al { list-style: none; margin: 0; padding: 0; }
.db-al li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.db-al li:first-child { border-top: 0; padding-top: 2px; }
.db-al .pill { flex: none; margin-top: 1px; }
.db-al b { display: block; font-size: 13.5px; color: var(--title); line-height: 1.35; }
.db-al p { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.db-al .es-act { padding: 6px 0 0; display: inline-flex; align-items: center; gap: 4px; }
.db-al-plus { border-top: 1px solid var(--border); }
.db-al-plus summary { cursor: pointer; padding: 10px 0 2px; font-size: 13px; font-weight: 700; color: var(--accent); min-height: 40px; display: flex; align-items: center; }

/* Première étape : la méthode en dessin, trois façons d'ajouter */
.db-premiere { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: center; padding: 26px; }
.db-premiere .pill svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.db-premiere h2 { margin-top: 12px; font-size: 24px; }
.db-premiere-txt > p { margin-top: 8px; max-width: 520px; }
.db-entrees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 18px; }
.db-entree {
  display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 12px; border-radius: 14px; cursor: pointer; font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--border); transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.db-entree:hover { border-color: var(--border-strong); }
.db-entree:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.db-entree-ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--title); }
.db-entree b { display: block; font-size: 13.5px; color: var(--title); line-height: 1.3; }
.db-entree small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.db-illu { position: relative; }
.db-illu svg { display: block; width: 100%; height: auto; overflow: visible; }
.il-chemin { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.il-rond { fill: var(--card); stroke: var(--border-strong); stroke-width: 1.6; stroke-dasharray: 3 4; }
.il-n.on .il-rond { fill: var(--tint); stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: none; }
.il-l { font-family: var(--font); font-size: 20px; font-weight: 800; fill: var(--faint); }
.il-n.on .il-l { fill: var(--accent); }
.il-nom { font-family: var(--font); font-size: 11.5px; font-weight: 600; fill: var(--muted); }
.il-n.on .il-nom { fill: var(--title); font-weight: 700; }
.il-ici { font-family: var(--font); font-size: 11px; font-weight: 600; fill: var(--accent); }
/* Comment ça marche et ressources */
.db-ress { padding: 20px; }
.db-res { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: center; }
.db-video { min-width: 0; }
.db-lecteur { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: var(--title); }
.db-bientot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px;
  background: var(--alt);
  border: 1px solid var(--border);
}
.db-bientot b { color: var(--title); font-size: 15px; }
.db-bientot small { color: var(--muted); font-size: 12.5px; }
.db-play { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: rgba(255, 255, 255, .85); border: 1px solid rgba(102, 68, 216, .25); margin-bottom: 4px; }
.db-how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.db-how li { display: flex; gap: 12px; align-items: flex-start; }
.db-how .how-n { width: 30px; height: 30px; flex: none; font-size: 14px; }
.db-how b { display: block; color: var(--title); font-size: 14px; }
.db-how small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.db-res-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.db-res-l { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); min-width: 0; }
.db-res-ico { width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: var(--title); }
.db-res-t { flex: 1; min-width: 0; }
.db-res-t b { display: block; font-size: 13.5px; color: var(--title); line-height: 1.3; }
.db-res-t small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.db-res-l .btn, .db-bientot-p { flex: none; }
.db-bientot-p { color: var(--muted); font-size: 11.5px; }
details.db-ress { padding: 0; }
details.db-ress > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 60px; cursor: pointer; }
details.db-ress > summary::-webkit-details-marker { display: none; }
details.db-ress > summary > span:nth-child(2) { flex: 1; min-width: 0; }
details.db-ress > summary b { display: block; font-size: 14.5px; color: var(--title); }
details.db-ress > summary small { display: block; font-size: 12.5px; color: var(--muted); }
details.db-ress > summary .es-chev { transition: transform .2s var(--ease); }
details.db-ress[open] > summary .es-chev { transform: rotate(90deg); }
details.db-ress[open] > summary { border-bottom: 1px solid var(--border); }
details.db-ress > .db-res, details.db-ress > .db-res-docs { margin: 18px; }
details.db-ress > .db-res-docs { margin-top: 0; }

.db-bas { display: flex; flex-direction: column; gap: 24px; margin-top: 8px; }

@media (max-width: 1100px) {
  .db-premiere { grid-template-columns: minmax(0, 1fr); }
  .db-illu { max-width: 360px; width: 100%; margin: 0 auto; order: -1; }
}
@media (max-width: 900px) {
  .db-duo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .db { gap: 16px; padding-top: 2px; }
  .db-head-plein h1 { font-size: 27px; }
  .db-ind { padding: 12px 10px 12px 12px; }
  .db-k { font-size: 11.5px; }
  .db-ind .db-s { font-size: 11px; margin-top: 4px; }
  .db-v { font-size: 21px; }
  .db-v small { display: block; margin: 4px 0 0; font-size: 12px; }
  .db-jauge, .db-carte, .db-now { padding: 16px; }
  .jg-v { font-size: 32px; }
  .db-jauge .jg-tete .db-s { font-size: 11.5px; }
  .db-date { font-size: 12.5px; }
  .jg-pv { font-size: 20px; }
  .db-now-act { flex-wrap: wrap; }
  .db-now-txt { flex: 1 1 calc(100% - 64px); }
  .db-now-act .btn { margin-left: 50px; }
  .db-now .es-week { padding-left: 0; }
  .db-premiere { padding: 18px; }
  .db-premiere h2 { font-size: 21px; }
  .db-entrees { grid-template-columns: minmax(0, 1fr); }
  .db-entree { flex-direction: row; align-items: center; }
  .db-res { grid-template-columns: minmax(0, 1fr); }
  .db-res-docs { grid-template-columns: minmax(0, 1fr); }
  .db-res-l { flex-wrap: wrap; }
  .db-res-l .btn, .db-bientot-p { margin-left: 48px; }
  .db-ress { padding: 16px; }
  details.db-ress > .db-res, details.db-ress > .db-res-docs { margin: 14px; }
  .db-cpt { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; }
  .db-chrono li { grid-template-columns: 14px minmax(0, 1fr); }
  .db-chrono .db-pt { align-self: start; margin-top: 6px; }
  .db-chrono time { grid-column: 2; margin-top: -6px; font-size: 11.5px; }
  .db-voile { width: calc(100% - 8px); padding: 12px 14px; }
  .db-jauge.vide .jg-zone { min-height: 128px; }
  .db-jauge.vide .db-voile p { text-align: center; }
  .db-res-t { flex: 1 1 170px; }
}
@media print { .db-ress, .db-now .btn { display: none; } }
.db .es-act, .db-al-plus summary { min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }
.db-carte-tete .es-act { padding: 0 2px; margin: -10px 0; }
.db-chrono .es-act { padding: 0 2px; margin: -8px 0; }
.db .btn.small, .db .btn.link { min-height: 40px; }

/* ---------- Correction n°1 ---------- */

/* Carte « Argos a débloqué » : opaque (le texte de la page ne se mêle plus au sien), et transparente aux clics
   hors de ses boutons. Sur téléphone, en haut sous la barre, pour ne jamais couvrir le bouton principal. */
.unlock.glass { background: #FFFFFF; border: 1px solid var(--border); }
.unlock { pointer-events: none; }
.unlock .btn, .unlock .x { pointer-events: auto; }
@media (min-width: 901px) {
  /* Correction n°2 : une seule ligne en haut à droite, sans la phrase de détail, pour ne couvrir presque rien. */
  .unlock { top: 20px; bottom: auto; width: auto; max-width: 420px; padding: 10px 10px 10px 12px; gap: 12px; grid-template-columns: auto minmax(0, 1fr) auto; transform: translateY(-12px); }
  .unlock.show { transform: none; }
  .unlock-badge { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
  .unlock small, .unlock .btn.ghost { display: none; }
  .unlock .actions { grid-column: auto; }
}
/* Correction n°2 : sur téléphone, la carte prend la place de la barre du haut, sur une seule ligne,
   et ne cache donc rien de la page. Elle reçoit les touchers pour ne rien déclencher dessous. */
@media (max-width: 900px) {
  .unlock {
    top: env(safe-area-inset-top); bottom: auto; left: 0; right: 0; width: auto; max-width: none; height: 58px;
    grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 12px 0 16px; gap: 10px; border-radius: 0; box-shadow: none;
    transform: translateY(-12px); pointer-events: auto;
  }
  .unlock.show { transform: none; }
  .unlock-badge { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; box-shadow: none; }
  .unlock .label { font-size: 10px; }
  .unlock b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .unlock small, .unlock .btn.ghost { display: none; }
  .unlock .actions { grid-column: auto; }
}

/* Bandeau des deux moments de la démo : seulement sur téléphone, où la barre latérale est masquée. */
.demo-bandeau { display: none; }
@media (max-width: 900px) {
  .demo-bandeau {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    margin: 0 0 14px; padding: 8px 8px 8px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--border);
  }
  .demo-b-t { font-size: 12.5px; font-weight: 700; color: var(--title); }
  .demo-bandeau .seg button { min-height: 40px; padding: 6px 12px; }
}

/* Remarque d'Argos après l'analyse du récit */
.notice.remarque { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--tint); margin: 0 0 18px; }
.notice.remarque p { flex: 1 1 260px; }
.notice.remarque .argos-nom { display: block; font-weight: 700; color: var(--tint-ink); font-size: 12.5px; margin-bottom: 2px; }

/* Vos données (tableau de bord) et lien de restauration */
.db-donnees-act { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; }
.db-donnees-act .es-act { min-height: 40px; }
.es-act.discret { color: var(--muted); font-weight: 600; }
.restaurer-l { margin-top: 12px; }
.restaurer-l .btn.link { min-height: 40px; }

/* Étapes de la procédure : le détail se lit en entier, le champ grandit avec le texte. */
.proc-step .textarea.auto { min-height: 52px; resize: vertical; overflow: hidden; field-sizing: content; }

/* Contraste de la barre latérale en verre : petits textes en couleur de corps (au moins 4,5),
   entrées verrouillées en gris secondaire sans transparence (au moins 3). */
.sidebar .sb-txt small, .sidebar .sb-label, .sidebar .sb-brand small, .sidebar .sb-note, .sidebar .sb-progress-head, .sidebar .sb-progress-foot { color: var(--body); }
.sidebar .sb-item.verrou { opacity: 1; }
.sidebar .sb-item.verrou .sb-txt b, .sidebar .sb-item.verrou .sb-txt small, .sidebar .sb-item.verrou .sb-ico, .sidebar .sb-item.verrou .sb-lock { color: var(--muted); }

/* Focus clavier visible sur les mesures d'Évolution */
.meter:focus-visible, .hbar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

/* Zones de toucher d'au moins 40 px sur téléphone */
@media (max-width: 900px) {
  .tk-chip, .niv, .chip, .choice, .btn.small, .tk-row .btn, .tk-act .btn, .sv-actions .btn, .seg button, .st, .crumbs .pill, .es-act, .tk-bascule, .mtop-demo, .btn.link { min-height: 40px; }
  .tk-chip, .niv, .btn.small, .crumbs .pill, .es-act, .btn.link, .mtop-demo { display: inline-flex; align-items: center; }
  .st-l { width: 30px; height: 30px; }
  .x { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; }
  .check { min-height: 40px; align-items: center; }
  .check input { width: 24px; height: 24px; margin-top: 0; }
  .verif-coche { width: 24px; height: 24px; }
  .h-tache a.small { display: inline-flex; align-items: center; min-height: 40px; }
  .auth-switch .es-act, .auth-demo .es-act { min-height: 40px; padding: 0 4px; }
}
@media (max-width: 900px) {
  .g-aide a, .db-ind .db-s a { display: inline-flex; align-items: center; min-height: 40px; }
}
.db-donnees { flex-wrap: wrap; }
.db-donnees .es-txt { flex: 1 1 260px; min-width: 0; }
.db-donnees .es-txt b { white-space: normal; }
@media (max-width: 640px) { .db-donnees-act { margin-left: 0; width: 100%; } }

/* Coûts de l'IA (lot 7) */
.ct { max-width: 980px; display: flex; flex-direction: column; gap: 34px; }
.ct-sec { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ct-sec > .card + .card, .ct-sec > .grid { margin-top: 0; }
.ct-h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.ct-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--tint); color: var(--tint-ink); font-size: 14px; font-weight: 800; flex: none; }
.ct-carte { padding: 20px 22px; min-width: 0; }
.ct-tete h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-tete p { margin-top: 4px; }
.ct-lignes { display: flex; flex-direction: column; margin-top: 14px; border-top: 1px solid var(--border); }
.ct-ligne { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(130px, 1fr) 84px 130px 96px 40px; gap: 12px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ct-ligne.autre { grid-template-columns: minmax(0, 1.6fr) minmax(150px, 1fr) 130px 40px; }
.ct-ligne .input { padding: 8px 10px; font-size: 14px; min-height: 40px; font-variant-numeric: tabular-nums; }
.ct-ligne .input:disabled { background: var(--alt); color: var(--muted); }
.ct-ligne .field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ct-outil { align-self: center; min-width: 0; }
.ct-outil b { display: block; color: var(--title); font-size: 15px; }
.ct-outil small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ct-outil a { font-weight: 700; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.ct-tot { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; min-height: 40px; }
.ct-tot span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ct-tot b { color: var(--title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-ligne.manque .ct-tot b { color: var(--warning); }
.ct-ligne.manque .ct-m .input { border-color: var(--warning); }
.ct-x { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; transition: color .15s, border-color .15s; }
.ct-x:hover { color: var(--title); border-color: var(--border-strong); }
.ct-x:focus-visible, .db-roi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ct-ajout { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ct-ajout .field { flex: 0 1 240px; }
.ct-ajout .field > span { font-size: 12px; color: var(--muted); }
.ct-ajout .input { padding: 8px 10px; font-size: 14px; min-height: 40px; }
.ct-ajout .btn, .ct-boutons .btn, .ct-releve .btn { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.ct-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ct-mention, .ct-liens { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ct-liens a { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; min-height: 32px; }
.ct-rien { margin-top: 12px; color: var(--body); font-size: 14px; }
.ct-ancien { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.ct-ancien p { flex: 1 1 260px; }
.ct-releve { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ct-releve .field { flex: 0 1 200px; }
.ct-releve .field > span { font-size: 12px; color: var(--muted); }
.ct-releve .input { padding: 8px 10px; font-size: 14px; min-height: 40px; }
.ct-msg { margin-top: 8px; font-size: 13px; color: var(--warning); min-height: 1px; }
.ct-msg.ok { color: var(--body); }
.ct-msg:empty { margin-top: 0; }
.ct-releves { list-style: none; margin: 10px 0 0; padding: 0; }
.ct-releves li { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: 14px; }
.ct-releves li span { flex: 1; }
.ct-releves li b { color: var(--title); font-variant-numeric: tabular-nums; }
.ct-total { display: flex; align-items: baseline; gap: 10px 22px; flex-wrap: wrap; padding: 16px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.ct-total-k { font-size: 13px; font-weight: 600; color: var(--muted); }
.ct-total b { font-size: 24px; font-weight: 800; color: var(--title); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ct-total b small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ct-total-m { font-size: 13px; color: var(--warning); font-weight: 600; }
.ct-verdict { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 18px 22px; border-left: 4px solid var(--border-strong); }
.ct-verdict.ok { border-left-color: var(--success); }
.ct-verdict.warn { border-left-color: var(--warning); }
.ct-verdict p { flex: 1 1 380px; color: var(--title); font-weight: 600; line-height: 1.5; }
.ct-tuiles .tile { min-width: 0; }
.ct-sans { font-size: 14px; color: var(--body); line-height: 1.55; }
.ct-sans b { color: var(--title); }
.ct-graph { margin-top: 0; }
.ct-legende { list-style: none; margin: -6px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--body); }
.ct-legende li { display: inline-flex; align-items: center; gap: 8px; }
.ct-cle { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ct-cle.cout { background: var(--muted); }
.ct-cle.valeur { background: var(--accent); }
.ct-note { margin-top: 8px; }
.ct-conseils { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ct-conseil { margin: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-conseils > .card + .card { margin-top: 0; }
/* Nombre impair de conseils : le dernier prend toute la largeur, aucune carte seule sur sa ligne. */
.ct-conseils > .ct-conseil:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ct-c-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ct-c-tete b { color: var(--title); font-size: 15px; line-height: 1.35; flex: 1 1 200px; }
.ct-conseil p { font-size: 14px; line-height: 1.55; }
.ct-conseil .es-act { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.ct-pied { margin-top: -2px; }
.kpi-cout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 44px; }
.kpi-cout b { color: var(--title); font-size: 16px; }
.kpi-cout a, .tile .s a { font-weight: 700; text-decoration: none; }

/* Tableau de bord : le retour de l'IA en une ligne */
.db-roi { display: flex; align-items: center; gap: 14px; padding: 12px 20px; min-height: 56px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); text-decoration: none; color: var(--body); transition: border-color .15s; }
.db-roi:hover { border-color: rgba(102, 68, 216, .45); }
.db-roi-ico { width: 24px; height: 24px; color: var(--title); display: inline-grid; place-items: center; flex: none; }
.db-roi-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-roi-txt b { color: var(--title); font-size: 14.5px; }
.db-roi-txt small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.db-roi-v { font-size: 20px; font-weight: 800; color: var(--title); white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-roi-v::after { content: "→"; margin-left: 10px; color: var(--accent); font-weight: 700; transition: margin .2s var(--ease); }
.db-roi:hover .db-roi-v::after { margin-left: 14px; }
.db-sec > .db-roi { margin-top: 0; }

@media (max-width: 900px) {
  .ct-ligne { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 10px 12px; }
  .ct-ligne .ct-outil { grid-column: 1 / -1; }
  .ct-ligne .ct-f { grid-column: 1 / -1; }
  .ct-ligne.autre { grid-template-columns: minmax(0, 1fr) 120px; }
  .ct-ligne.autre .ct-nom, .ct-ligne.autre .ct-f { grid-column: 1 / -1; }
  .ct-ligne .ct-tot { align-items: flex-start; }
  .ct-ligne .ct-x { justify-self: end; }
  .ct-conseils { grid-template-columns: minmax(0, 1fr); }
  .ct-liens a, .ct-outil a { min-height: 40px; }
}
@media (max-width: 640px) {
  .ct { gap: 28px; }
  .ct-h2 { font-size: 19px; }
  .ct-carte, .ct-verdict { padding: 16px; }
  .ct-total { padding: 14px 16px; }
  .ct-total b { font-size: 20px; }
  .ct-releve .field { flex: 1 1 140px; }
  .db-roi { padding: 10px 14px; gap: 10px; }
  .db-roi-v { font-size: 16px; }
  .db-roi-v::after { margin-left: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .db-roi, .db-roi-v::after, .ct-x { transition: none; }
}

/* Barre latérale : avec « Coûts de l'IA », elle tient encore sans défiler sur un écran de 860 px de haut. */
@media (min-width: 901px) and (max-height: 940px) {
  .sidebar { gap: 6px; padding-top: 16px; }
  .sb-item { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
  .sb-label { padding-top: 9px; padding-bottom: 5px; }
}
.sb-progress-head b { white-space: nowrap; }
@media (max-width: 900px) { .table-view summary { min-height: 40px; display: flex; align-items: center; } }
@media (max-width: 900px) { .kpi-cout a, .tile .s a { display: inline-flex; align-items: center; min-height: 40px; } }

/* ---------- Barre latérale réduite : 4 entrées, réglages dans le menu du prénom ---------- */
.sb-moi { position: relative; }
.sb-profile, .mtop-profil { font: inherit; border: 0; background: none; cursor: pointer; text-align: left; }
.sb-profile { width: 100%; }
.sb-profile[aria-expanded="true"] { background: rgba(255, 255, 255, .6); }
.sb-chev { margin-left: auto; display: grid; color: var(--muted); transition: transform .2s var(--ease); }
.sb-chev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[aria-expanded="true"] .sb-chev { transform: rotate(180deg); }
.menu-moi {
  display: flex; flex-direction: column; gap: 1px; margin: 6px 0 4px; padding: 6px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--ombre-flottante);
  animation: menu-in .18s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.mm-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 7px 8px; border: 0; border-radius: 10px;
  background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--body); text-align: left; text-decoration: none; cursor: pointer;
}
.mm-item:hover, .mm-item:focus-visible { background: var(--alt); color: var(--title); }
.mm-ico { width: 20px; display: grid; place-items: center; flex: none; color: var(--muted); }
.mm-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mm-t b { font-weight: 600; color: var(--title); }
.mm-t small { font-size: 12px; color: var(--muted); font-weight: 500; }
.mm-switch .switch { flex: none; }
.mm-sep { height: 1px; margin: 4px 6px; background: var(--border); }
.mm-danger:hover, .mm-danger:focus-visible { color: var(--title); }
.mm-note { font-size: 11.5px; color: var(--muted); padding: 6px 8px 2px; line-height: 1.45; }
.sb-nouveau {
  margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--tint-ink);
  font-size: 11.5px; font-weight: 700;
}
.sb-encours { margin: 2px 0 6px 18px; padding: 6px 0 2px 8px; border-left: 1px solid rgba(74, 47, 160, .14); }
.sb-encours .sb-task { margin: 0 8px 4px; }
.sb-encours .sb-more { margin-left: 30px; }
.sb-demo-t { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 12.5px; color: var(--title); }
.sb-demo-t b { font-weight: 700; }
.sb-demo .seg { width: 100%; }
.sb-demo .seg button { flex: 1; padding: 5px 6px; font-size: 12px; }
.sb-foot { padding-top: 10px; border-top: 1px solid rgba(74, 47, 160, .1); }

/* Onglets de Mes résultats */
.res-tabs {
  display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 0 18px; padding: 4px; border-radius: 999px;
  background: var(--alt); overflow-x: auto; scrollbar-width: none;
}
.res-tabs::-webkit-scrollbar { display: none; }
.res-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; transition: background .2s var(--ease), color .2s var(--ease);
}
.res-tab:hover { color: var(--title); }
.res-tab.on { background: var(--card); color: var(--tint-ink); box-shadow: 0 1px 3px rgba(31, 33, 39, .12); }
.res-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tint); color: var(--tint-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* Page Aide */
.aide-contact { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--body); }
.aide-contact:hover { border-color: var(--border-strong); }
.aide-c-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.aide-c-t b { color: var(--title); font-weight: 700; }
.aide-c-t small { color: var(--muted); font-size: 13px; }

/* Mobile : avatar en haut, quatre onglets en bas */
.mtop-moi { position: relative; }
.mtop-profil { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); min-height: 40px; }
.mtop-moi .menu-moi { position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 32px)); margin: 0; z-index: 40; }
.tab-ico { position: relative; }
.tab-lettre {
  position: absolute; right: -4px; top: -2px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--accent); color: var(--bg);
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
}
.tab-point { position: absolute; right: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
@media (max-width: 900px) {
  .tabbar { grid-template-columns: repeat(var(--n, 4), 1fr); }
  .tab-l { font-size: 11px; }
  .demo-b-t { display: inline-flex; align-items: center; gap: 6px; }
  .res-tabs { margin-bottom: 14px; }
}
.rt-court { display: none; }
@media (max-width: 900px) {
  .res-tabs { width: 100%; }
  .res-tab { flex: 1; justify-content: center; padding: 8px 6px; font-size: 13px; min-height: 40px; }
  .rt-long { display: none; }
  .rt-court { display: inline; }
}

/* ---------- Compétences Claude (skills) ---------- */
.sk-diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0; overflow: hidden; }
.sk-diff > div { padding: 18px 20px; }
.sk-diff > div + div { border-left: 1px solid var(--border); }
.sk-diff p { margin-top: 6px; }
.sk-lancer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 0 16px; }
.sk-lancer p { flex: 1 1 260px; }
.sk-liste { display: flex; flex-direction: column; gap: 16px; }
.sk-carte { display: flex; flex-direction: column; gap: 14px; }
.sk-tete { display: flex; align-items: flex-start; gap: 12px; }
.sk-titre { flex: 1; min-width: 0; }
.sk-titre h3 { margin: 0; }
.sk-titre code { font-family: inherit; font-weight: 700; color: var(--tint-ink); background: var(--tint); padding: 1px 7px; border-radius: 999px; font-size: 12px; }
.sk-ico { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--title); }
.sk-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.sk-3 > div { padding: 12px 14px; border-radius: 12px; background: var(--alt); }
.sk-3 dt { font-size: 13px; font-weight: 700; color: var(--tint-ink); }
.sk-3 dd { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--body); }
.sk-essai { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 12px 12px 0; }
.sk-essai p { flex: 1 1 240px; font-weight: 600; color: var(--title); }
.sk-contenu summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--accent); }
.sk-contenu pre { margin-top: 10px; max-height: 340px; overflow: auto; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font-family: inherit; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; color: var(--body); }
.sk-actions { align-items: center; }
.sk-installe { margin: 0; }
.sk-retirer { margin-left: auto; }
.sk-guide { margin-top: 16px; }
.sk-guide summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.sk-guide summary::-webkit-details-marker { display: none; }
.sk-guide summary b { display: block; color: var(--title); }
.sk-guide summary small { display: block; color: var(--muted); font-size: 13px; }
.sk-guide[open] .es-chev { transform: rotate(90deg); }
.sk-etapes { margin: 16px 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.sk-etapes li { line-height: 1.55; }
.sk-r { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
@media (max-width: 900px) {
  .sk-diff { grid-template-columns: minmax(0, 1fr); }
  .sk-diff > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .sk-3 { grid-template-columns: minmax(0, 1fr); }
  .sk-retirer { margin-left: 0; }
  .res-tab { padding: 8px 4px; font-size: 12.5px; }
}

/* ---------- Barre latérale sombre : encre teintée de violet, en aplat ----------
   Une seule couleur pleine, sans dégradé ni flou : le contraste avec l'ivoire suffit. */
.sidebar.glass {
  --sb-titre: #EDEDEF;
  --sb-corps: rgba(237, 237, 239, .82);
  --sb-doux: rgba(237, 237, 239, .62);
  --sb-trait: rgba(255, 255, 255, .1);
  border: 0;
  background: #1A1730;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.sidebar .sb-brand b, .sidebar .sb-txt b, .sidebar .sb-item .sb-txt b, .sidebar .sb-task, .sidebar .sb-demo-t, .sidebar .sb-progress-head b { color: var(--sb-titre); }
.sidebar .sb-brand small, .sidebar .sb-txt small, .sidebar .sb-progress-head, .sidebar .sb-progress-foot, .sidebar .sb-more { color: var(--sb-doux); }
.sidebar .sb-item { color: var(--sb-corps); }
.sidebar .sb-item .sb-txt b { color: var(--sb-corps); }
.sidebar .sb-ico, .sidebar .sb-chev, .sidebar .sb-lock { color: var(--sb-doux); }
.sidebar .sb-item:hover, .sidebar .sb-profile:hover, .sidebar .sb-profile[aria-expanded="true"] { background: rgba(255, 255, 255, .08); }
.sidebar .sb-item:hover .sb-txt b, .sidebar .sb-item:hover .sb-ico { color: var(--sb-titre); }
.sidebar .sb-item.active { background: rgba(255, 255, 255, .1); }
.sidebar .sb-item.active .sb-txt b, .sidebar .sb-item.active .sb-ico { color: #FFFFFF; }
.sidebar .sb-item.verrou .sb-txt b, .sidebar .sb-item.verrou .sb-txt small, .sidebar .sb-item.verrou .sb-ico, .sidebar .sb-item.verrou .sb-lock { color: rgba(237, 237, 239, .5); }
.sidebar .avatar { background: rgba(196, 162, 232, .24); color: #FFFFFF; }
.sidebar .sb-badge { background: rgba(255, 255, 255, .12); color: var(--sb-corps); }
.sidebar .sb-badge.on, .sidebar .sb-nouveau { background: rgba(196, 162, 232, .26); color: #FFFFFF; }
.sidebar .sb-encours { border-left-color: var(--sb-trait); }
.sidebar .sb-task:hover { color: #C4A2E8; }
.sidebar .sb-steps::before { background: rgba(255, 255, 255, .14); }
.sidebar .sb-letter { background: rgba(255, 255, 255, .06); color: #DCC8F5; border-color: rgba(196, 162, 232, .5); }
.sidebar .sb-step.fait .sb-letter { background: #8064E8; color: #FFFFFF; border-color: #8064E8; }
.sidebar .sb-step.verrou .sb-letter { background: transparent; color: rgba(237, 237, 239, .45); border-color: rgba(255, 255, 255, .18); }
.sidebar .sb-progress, .sidebar .sb-foot { border-top-color: var(--sb-trait); }
.sidebar .sb-progress .bar { background: rgba(255, 255, 255, .14); }
.sidebar .sb-progress .bar > span { background: #8064E8; }
.sidebar .btn.link { color: #C4A2E8; }
.sidebar .sb-demo .seg { background: rgba(255, 255, 255, .1); }
.sidebar .sb-demo .seg button { color: var(--sb-corps); }
.sidebar .sb-demo .seg button.on { background: #FFFFFF; color: var(--tint-ink); }
.sidebar a:focus-visible, .sidebar button:focus-visible { outline: 2px solid #C4A2E8; outline-offset: 2px; }
.sidebar .menu-moi :focus-visible { outline-color: var(--accent); }

/* Bouton pour réduire la barre */
.sb-haut { display: flex; align-items: center; gap: 6px; }
.sb-haut .sb-brand { flex: 1; min-width: 0; }
.sb-reduire {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; margin: 0 2px 6px 0; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: rgba(237, 237, 239, .75);
  transition: background .15s var(--ease), color .15s var(--ease), transform .3s var(--ease);
}
.sb-reduire:hover { background: rgba(255, 255, 255, .14); color: #FFFFFF; }
.sb-reduire svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Barre réduite aux icônes, sur ordinateur */
@media (min-width: 901px) {
  .sidebar { transition: width .3s var(--ease), padding .3s var(--ease); }
  .main { transition: margin-left .3s var(--ease); }
  html.sb-reduite { --sidebar: 96px; }
  .sb-reduite .sidebar { padding: 16px 10px 14px; overflow: visible; }
  .sb-reduite .sb-haut { flex-direction: column; gap: 8px; }
  .sb-reduite .sb-haut .sb-brand { flex: none; padding: 0; }
  .sb-reduite .sb-brand span, .sb-reduite .sidebar .sb-txt, .sb-reduite .sidebar .sb-chev, .sb-reduite .sidebar .sb-lock,
  .sb-reduite .sb-task, .sb-reduite .sb-more, .sb-reduite .sb-foot, .sb-reduite .sb-progress-head span, .sb-reduite .sb-progress-foot { display: none; }
  .sb-reduite .sb-reduire { margin: 0; transform: rotate(180deg); }
  .sb-reduite .sb-profile { justify-content: center; padding: 6px; }
  .sb-reduite .sidebar .sb-item { justify-content: center; padding: 8px; }
  .sb-reduite .sidebar .sb-badge, .sb-reduite .sidebar .sb-nouveau {
    position: absolute; top: 1px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; letter-spacing: 0;
  }
  .sb-reduite .sidebar .sb-nouveau { width: 10px; min-width: 0; height: 10px; padding: 0; top: 5px; right: 8px; font-size: 0; background: #C4A2E8; }
  .sb-reduite .sb-encours { margin: 0; padding: 4px 0; border-left: 0; }
  .sb-reduite .sb-steps::before { left: 50%; }
  .sb-reduite .sb-progress { padding: 10px 0 2px; text-align: center; }
  .sb-reduite .sb-progress-head { justify-content: center; margin-bottom: 6px; }
  .sb-reduite .sb-moi .menu-moi { position: absolute; left: calc(100% + 18px); top: 0; width: 280px; margin: 0; z-index: 50; }
}

/* Vidéo hébergée avec l'outil : lien de téléchargement sous le lecteur */
.db-telecharger { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--accent); }
.db-telecharger svg { width: 15px; height: 15px; }

/* ---------- Traiter un process d'un bloc ---------- */
.tk-sec-head .tk-proc-act { margin-left: auto; display: inline-flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.tk-sec-head .tk-proc-act .tk-ren { margin-left: 0; }
.tk-renomme-l { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; }
.tk-lot { color: var(--tint-ink); font-weight: 600; }
.pr-intro { margin: 0 0 16px; font-size: 15px; line-height: 1.55; }
.pr-liste { display: grid; gap: 8px; }
.pr-choix {
  font: inherit; text-align: left; cursor: pointer; display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--body);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pr-choix:hover { border-color: var(--border-strong); }
.pr-choix.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.pr-case { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; background: var(--card); }
.pr-choix.on .pr-case { background: var(--accent); border-color: var(--accent); }
.pr-case svg { width: 15px; height: 15px; fill: none; stroke: var(--bg); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pr-txt { display: grid; gap: 2px; min-width: 0; }
.pr-txt b { font-size: 14.5px; color: var(--title); font-weight: 700; }
.pr-txt span { font-size: 13px; color: var(--muted); }
.pr-total { margin: 14px 0 10px; font-size: 14px; color: var(--muted); }
.pr-total b { color: var(--title); }
.pr-membres { list-style: none; counter-reset: pr; margin: 6px 0 8px; padding: 0; display: grid; gap: 6px; flex-basis: 100%; }
.pr-membres li { counter-increment: pr; display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; font-size: 14px; }
.pr-membres li::before { content: counter(pr); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--tint); color: var(--tint-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.pr-membres b { color: var(--title); font-weight: 700; }
.pr-membres span { color: var(--muted); font-size: 13px; }
.h-tache .pr-membres { margin: 4px 0; }

/* ---------- Entretien avec Argos ---------- */
/* Comme une conversation : la discussion au centre, la réponse collée en bas, ce qu'Argos repère à droite. */
.ent-tete { padding-bottom: 18px; }
.ent-tete h1 { font-size: clamp(24px, 2.2vw, 28px); }
.ent { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.ent-chat { min-width: 0; max-width: 700px; }
.ent-cote { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 20px; }
.ent-cote > summary { list-style: none; display: flex; flex-direction: column; gap: 2px; cursor: default; }
.ent-cote > summary::-webkit-details-marker { display: none; }
.ent-cote-t { font-weight: 800; color: var(--title); font-size: 15px; }
.ent-cote-r { font-size: 13px; color: var(--muted); }
.ent-cote-corps { margin-top: 14px; display: flex; flex-direction: column; gap: 16px; }
.ent-cote-total { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ent-cote-total b { color: var(--title); }
.ent-proc h4, .ent-outils h4 { font-size: 13.5px; margin-bottom: 6px; color: var(--title); }
.ent-proc h4 span { color: var(--faint); font-weight: 700; margin-left: 4px; }
.ent-proc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ent-proc li { display: flex; flex-direction: column; padding: 7px 10px; margin: 0 -10px; border-radius: 10px; }
.ent-proc li b { font-size: 13.5px; font-weight: 600; color: var(--title); line-height: 1.35; }
.ent-proc li span { font-size: 12.5px; color: var(--muted); }
.ent-proc li.nouveau { animation: entNouveau 3s var(--ease) both; }
@keyframes entNouveau { 0%, 40% { background: var(--tint); } 100% { background: transparent; } }
.ent-outils div { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1100px) {
  .ent { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ent-cote { position: static; max-height: none; order: -1; margin-bottom: 18px; padding: 14px 16px; }
  .ent-cote > summary { cursor: pointer; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
}
.ent-etapes { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; font-weight: 600; color: var(--faint); counter-reset: ent; }
.ent-etapes li { counter-increment: ent; display: inline-flex; align-items: center; gap: 7px; }
.ent-etapes li::before { content: counter(ent); width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.ent-etapes li.fait { color: var(--muted); }
.ent-etapes li.fait::before { border-color: var(--accent); color: var(--accent); }
.ent-etapes li.courant { color: var(--title); }
.ent-etapes li.courant::before { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.ent-fil { display: flex; flex-direction: column; gap: 18px; }
.ent-msg { max-width: 640px; font-size: 15.5px; line-height: 1.6; }
.ent-msg p + p { margin-top: 10px; }
.ent-msg.argos { color: var(--title); }
.ent-qui { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.ent-msg.moi { align-self: flex-end; max-width: 560px; background: var(--card); border: 1px solid var(--border); border-radius: 16px 16px 4px 16px; padding: 10px 16px; color: var(--body); }
.ent-pense { color: var(--muted); }
.ent-composer {
  position: sticky; bottom: 0; z-index: 5; margin-top: 26px; padding: 16px 0 18px; background: var(--bg);
  border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px;
}
.ent-composer .dictee { margin-bottom: 0; }
.ent-sug { display: flex; flex-wrap: wrap; gap: 8px; }
.ent-sug .tk-chip { text-align: left; }
.ent-saisie { display: flex; gap: 10px; align-items: flex-end; }
.ent-saisie .textarea { flex: 1; min-height: 52px; resize: vertical; }
.ent-fin { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.ent-recommencer { margin-top: 8px; }
.ent-pret { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.ent-pret .argos { margin: 0; }
.ent-carte { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.ent-carte > div { flex: 1 1 360px; }
.ent-carte h3 { font-size: 18px; margin-bottom: 4px; }
.db-ou { margin: 20px 0 0; }

/* La cartographie, dans l'outil */
.carto { margin-top: 16px; }
.carto h3 { font-size: 18px; margin: 28px 0 12px; }
.carto h3:first-child { margin-top: 0; }
.carto h4 { font-size: 15.5px; margin-bottom: 8px; }
.carto-id { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.carto-id dt { color: var(--muted); font-weight: 600; }
.carto-id dd { margin: 0; color: var(--title); }
.carto-tab { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.carto-tab table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.carto-tab th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--alt); border-bottom: 1px solid var(--border); white-space: nowrap; }
.carto-tab td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.carto-tab tr:last-child td { border-bottom: 0; }
.carto-proc { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.carto-etapes { margin: 0; padding-left: 20px; font-size: 14px; }
.carto ol, .carto ul { margin: 0; padding-left: 20px; font-size: 14.5px; }
.carto li { margin: 4px 0; }
@media (max-width: 640px) {
  .ent-saisie { flex-direction: column; align-items: stretch; }
  .carto-id { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .carto-id dd { margin-bottom: 8px; }
  .ent-composer { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- Deux exemples : Julien et Thomas ---------- */
.cfg-julien { flex-wrap: wrap; }
.cfg-julien-act { display: flex; gap: 8px; flex-wrap: wrap; }
.sb-demo-t { flex-wrap: wrap; gap: 2px 8px; }
.sb-demo-t b, .sb-demo-act .btn { white-space: nowrap; }
.sb-demo-act { display: inline-flex; gap: 2px; align-items: center; margin-left: auto; }
.sb-demo-act .btn.link { padding: 4px; }
.demo-b-t .btn.link { padding: 4px 6px; }

/* ---------- Version essentielle : tableau de bord, dossier, accompagnement ---------- */
.ess-trois { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ess-un { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ess-un b { color: var(--title); font-size: 15.5px; }
.ess-un p { font-size: 14px; color: var(--muted); }
.ess-dossier-c, .ess-accomp-c { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.ess-dossier-c > div, .ess-accomp-c > div { flex: 1 1 380px; display: flex; flex-direction: column; gap: 6px; }
.ess-dossier-c h2, .ess-accomp-c h2 { font-size: 20px; }
.ess-dossier-c p, .ess-accomp-c p { font-size: 14.5px; color: var(--body); max-width: 620px; }
.ess-vide { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.ess-vide h2 { font-size: 20px; }
.ess-barre { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ess-synthese { font-size: 15.5px; color: var(--title); line-height: 1.6; margin: 4px 0 6px; max-width: 760px; }
.fp { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.fp-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; }
.fp-tete h4 { font-size: 16.5px; margin: 0; }
.fp-tete span { font-size: 14px; font-weight: 600; color: var(--muted); }
.fp-mission { margin: 6px 0 14px; color: var(--title); font-size: 15px; }
.fp-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.fp-grille > div { min-width: 0; }
.fp h5 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fp ul { margin: 0; padding-left: 18px; font-size: 14px; }
.fp li { margin: 3px 0; }
.carto-etapes b { color: var(--title); font-weight: 600; }
.ess-accomp { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.ess-accomp h2 { font-size: 20px; }
.ess-accomp > p { max-width: 680px; }
/* L'équipe : qui fait quoi */
.ess-equipe { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ess-equipe-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.ess-equipe-tete > div { display: flex; flex-direction: column; gap: 4px; }
.ess-equipe h2 { font-size: 20px; }
.ess-equipe > p { font-size: 14.5px; max-width: 680px; }
.eq-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.eq-l { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px dashed var(--border); }
.eq-l:first-child { border-top: 0; }
.eq-nom { display: flex; flex-direction: column; gap: 1px; flex: 1 1 260px; min-width: 0; }
.eq-nom b { color: var(--title); font-size: 15px; }
.eq-nom .muted { font-size: 13px; }
.eq-champs { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; }
.eq-champs .input { min-height: 40px; padding: 7px 10px; font-size: 14px; }
.eq-champs .input:first-child { flex: 0 1 150px; min-width: 0; }
.eq-champs .input:last-child { flex: 1 1 180px; min-width: 0; }
.eq-res { font-size: 13.5px; color: var(--muted); min-width: 170px; }
.eq-ajout { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }
.eq-ajout .input { flex: 1 1 160px; min-width: 0; min-height: 40px; padding: 7px 10px; font-size: 14px; }
.tk-qui { color: var(--tint-ink); font-weight: 600; }
.eq-replie { margin: 16px 0 0; padding: 0; gap: 0; }
.eq-replie > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-radius: var(--radius); }
.eq-replie > summary::-webkit-details-marker { display: none; }
.eq-replie > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eq-sum-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eq-sum-t b { color: var(--title); font-size: 15.5px; font-weight: 800; }
.eq-sum-t .muted { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-sum-act { flex: none; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.eq-replie[open] .eq-sum-act { color: var(--muted); }
.eq-replie[open] .eq-sum-act::after { content: " ▴"; }
.eq-corps { display: flex; flex-direction: column; gap: 12px; padding: 0 22px 18px; }
.eq-corps > p { font-size: 14.5px; max-width: 680px; }
.eq-voir { display: flex; justify-content: flex-end; }
.cm-qui { flex: none; align-self: center; font-size: 11px; font-weight: 600; line-height: 1.5; color: var(--tint-ink); background: var(--tint); border-radius: 999px; padding: 1px 7px; margin-left: 2px; }
.cm-poste { font-style: normal; font-weight: 600; font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.cm-l-qui { display: inline-flex; align-items: center; gap: 6px; }
.tk-rang button { min-height: 36px; padding: 6px 14px; }
.tk-pers .tk-sec-head h3 { color: var(--title); }
.dr-qui { margin-top: 0; }
.tk-chip-plus { display: inline-flex; align-items: center; gap: 4px; border-style: dashed; color: var(--muted); }
.dr-qui-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dr-qui-form .input { flex: 1 1 140px; min-width: 0; min-height: 40px; padding: 7px 10px; font-size: 14px; }
.dr-qui + .small, .dr-qui-form + .small { margin-top: 8px; }
.verif-qui { flex: 0 1 220px; }
.rp-nouveau { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.rp-nouveau .rp-f { flex: 1 1 200px; }
.rp-nouveau p { flex: 1 1 100%; margin: 0; }

@media (max-width: 760px) {
  .ess-trois, .fp-grille { grid-template-columns: minmax(0, 1fr); }
  .eq-res { min-width: 0; flex: 1 1 100%; }
}

/* Page du collaborateur : un lien reçu du dirigeant, sans compte */
.co { max-width: 720px; margin: 0 auto; padding: 22px 16px 64px; display: flex; flex-direction: column; gap: 16px; }
.co-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.co-logo { width: 34px; height: 34px; border-radius: 10px; }
.co-tete span { display: flex; flex-direction: column; line-height: 1.2; }
.co-tete b { color: var(--title); font-weight: 800; font-size: 15px; }
.co-tete small { color: var(--muted); font-size: 12px; }
.co-intro { display: flex; flex-direction: column; gap: 10px; padding: 8px 2px 4px; }
.co-h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; color: var(--title); margin: 0; }
.co-lead { font-size: 15.5px; color: var(--body); max-width: 640px; }
.co-carte { display: flex; flex-direction: column; gap: 10px; }
.co-carte h2 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 8px; }
.co-carte > p { font-size: 14.5px; margin: 0; }
.co-n { font-size: 12.5px; font-weight: 700; color: var(--tint-ink); background: var(--tint); border-radius: 999px; padding: 1px 9px; }
.co-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.co-note { font-size: 14px; color: var(--body); background: var(--tint); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin: 0; }
.co-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.co-t { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px dashed var(--border); }
.co-t:first-child { border-top: 0; padding-top: 4px; }
.co-t .input, .co-t .select { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.co-t-nom { width: 100%; font-weight: 600; }
.co-t-l { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.co-in { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.co-in .input.n { width: 64px; }
.co-in .select { width: auto; }
.co-suppr { margin-left: auto; color: var(--muted); }
.co-fin { align-items: flex-start; gap: 12px; padding: 28px 24px; }
.co-ok { width: 44px; height: 44px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; }
.co-ok svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) {
  .co-suppr { margin-left: 0; }
  .co-in .input.n { width: 56px; }
}

/* Lien d'une personne de l'équipe, et tâches reçues */
.eq-lien-b { white-space: nowrap; }
.eq-lien { flex: 1 1 100%; display: flex; flex-direction: column; gap: 10px; background: var(--alt); border-radius: 12px; padding: 14px 16px; margin-top: 4px; }
.eq-lien p { font-size: 14px; margin: 0; }
.eq-lien-url { display: flex; gap: 8px; flex-wrap: wrap; }
.eq-lien-url .input { flex: 1 1 260px; min-width: 0; min-height: 40px; padding: 7px 10px; font-size: 13.5px; color: var(--body); background: var(--card); }
.eq-lien .co-actions { margin-top: 0; }
.recus { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; }
.recu { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--card); }
.recu p { margin: 0; font-size: 14.5px; color: var(--body); }
.recu b { color: var(--title); }
.recu .actions { display: flex; gap: 8px; flex-wrap: wrap; }
