/* Extra — design tokens v1.3 (17 octobre 2026) */
@font-face {
  font-family: 'Geist';
  src: url('/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Lampe à lave : les quatre lueurs de l'Aurore nuit dérivent lentement dans les boutons d'action.
   Propriétés enregistrées pour que le navigateur interpole leurs positions. */
@property --lava-a-x { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --lava-a-y { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --lava-b-x { syntax: '<percentage>'; inherits: false; initial-value: 75%; }
@property --lava-b-y { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --lava-c-x { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@property --lava-c-y { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@property --lava-d-x { syntax: '<percentage>'; inherits: false; initial-value: 6%; }
@property --lava-d-y { syntax: '<percentage>'; inherits: false; initial-value: 100%; }

:root {
  color-scheme: light;

  /* Neutres */
  --color-ink: #1D1D1F;
  --color-graphite: #424245;
  --color-slate: #4A4A4F;
  --color-muted: #6E6E73;
  --color-placeholder: #8A8A8F;
  --color-line: #E6E6EB;
  --color-line-soft: #EFEFF2;
  --color-stone: #F5F5F7;
  --color-stone-strong: #EFEFF2;
  --color-paper: #FFFFFF;

  /* Encre : surfaces fortes (menu, étiquette du héros, bandeau d'outils, appel final, pied de page) */
  --on-ink: #FFFFFF;
  --on-ink-muted: rgba(255, 255, 255, 0.72);
  --on-ink-faint: rgba(255, 255, 255, 0.6);
  --on-ink-line: rgba(255, 255, 255, 0.12);
  --on-ink-glass: rgba(255, 255, 255, 0.1);

  /* Accent et nuit */
  --color-accent: #4B3BD9;
  --color-accent-soft: #ECEAFB;
  --color-night: #12143F;
  --color-night-button: #14164A;

  /* Éclats */
  --spark-blue: #2E5BFF;
  --spark-indigo: #4B3BD9;
  --spark-violet: #8A3FFC;
  --spark-magenta: #C23CB0;
  --spark-rose: #E0457B;
  --spark-coral: #FF6A55;
  --spark-amber: #FF9F45;
  --spark-teal: #1FB5A8;

  /* Statuts */
  --status-pending-bg: #FFF1DD;  --status-pending-fg: #8A5300;
  --status-done-bg: #DDF3E3;     --status-done-fg: #1F6B45;
  --status-idle-bg: #EFEFF2;     --status-idle-fg: #4A4A4F;
  --status-error-bg: #FBE3DF;    --status-error-fg: #A32A1F;

  /* Agents : teinte / encre */
  --agent-marketing-tint: #DDF3E3;           --agent-marketing-ink: #1F6B45;
  --agent-seo-geo-tint: #DAF1F2;             --agent-seo-geo-ink: #13617A;
  --agent-website-builder-tint: #D9E8FC;     --agent-website-builder-ink: #2648A3;
  --agent-phone-support-tint: #E3E2FC;       --agent-phone-support-ink: #46359E;
  --agent-executive-assistant-tint: #EDE2FC; --agent-executive-assistant-ink: #71308F;
  --agent-finance-tint: #FCEBD3;             --agent-finance-ink: #8A5300;
  --agent-legal-tint: #FBDDD5;               --agent-legal-ink: #963A1C;
  --agent-reputation-tint: #FADDE7;          --agent-reputation-ink: #8E2443;

  /* Dégradés */
  --gradient-aurora:
    radial-gradient(70% 90% at 0% 0%, rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 60%),
    radial-gradient(60% 80% at 100% 0%, rgba(138, 63, 252, 0.9) 0%, rgba(138, 63, 252, 0) 62%),
    radial-gradient(65% 75% at 100% 100%, rgba(224, 69, 123, 0.85) 0%, rgba(224, 69, 123, 0) 60%),
    radial-gradient(55% 65% at 6% 100%, rgba(255, 128, 72, 0.7) 0%, rgba(255, 128, 72, 0) 60%),
    #12143F;
  --gradient-aurora-night:
    radial-gradient(90% 160% at 0% 0%, rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 60%),
    radial-gradient(70% 140% at 75% 0%, rgba(138, 63, 252, 0.85) 0%, rgba(138, 63, 252, 0) 60%),
    radial-gradient(90% 170% at 100% 100%, rgba(224, 69, 123, 0.8) 0%, rgba(224, 69, 123, 0) 55%),
    #14164A;
  --gradient-text: linear-gradient(100deg, #2E5BFF 0%, #8A3FFC 55%, #E0457B 100%);
  /* En mouvement (v1.3) : deux fois plus large que le mot, il glisse d'un bout à l'autre. */
  --gradient-text-flow: linear-gradient(100deg, #2E5BFF 0%, #8A3FFC 27%, #E0457B 50%, #FF6A55 75%, #8A3FFC 100%);
  --gradient-flow: linear-gradient(90deg, #2E5BFF, #8A3FFC, #E0457B, #FF6A55, #8A3FFC, #2E5BFF);
  /* Icône d'app (design/brand/app-icon) : anneau conique bleu, violet, rose, orange, cœur bleu nuit. */
  --gradient-icon:
    radial-gradient(64% 64% at 50% 50%, #12143F 0%, #12143F 20%, rgba(18, 20, 63, 0.55) 64%, rgba(18, 20, 63, 0.26) 100%),
    conic-gradient(from 315deg, #2E5BFF, #8A3FFC 25%, #E0457B 50%, #F27A4C 75%, #2E5BFF);

  /* Typographie */
  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-display: clamp(42px, 6.6vw, 96px);
  --text-closing: clamp(46px, 6.4vw, 96px);
  --text-h2: clamp(42px, 5.6vw, 80px);
  --text-h3-lg: 30px;
  --text-h3: 22px;
  --text-lead: clamp(19px, 1.8vw, 24px);
  --text-eyebrow: 19px;
  --text-body: 17px;
  --text-ui: 15px;
  --text-caption: 12.5px;
  --tracking-display: -0.05em;
  --tracking-h2: -0.048em;
  --tracking-h3: -0.04em;

  /* Espacement */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;
  --space-9: 56px; --space-10: 64px;
  --space-section: clamp(88px, 10vw, 140px);
  --space-hero: clamp(64px, 8vw, 112px);
  --gutter: clamp(12px, 2vw, 22px);
  --container-text: 1100px;
  --container-nav: 1180px;
  --container-wide: 1320px;

  /* Rayons */
  --radius-pill: 999px;
  --radius-stage: 44px;
  --radius-tile: 32px;
  --radius-window: 24px;
  --radius-card: 16px;
  --radius-field: 14px;
  --radius-bubble: 20px;
  --radius-portrait: 31%;

  /* Ombres */
  --shadow-nav: 0 1px 2px rgba(0, 0, 0, 0.03), 0 12px 32px -16px rgba(20, 22, 60, 0.18);
  --shadow-card: 0 18px 40px -24px rgba(20, 22, 60, 0.25);
  --shadow-portrait: 0 16px 28px -16px rgba(30, 30, 60, 0.45);
  --shadow-window: 0 40px 100px -30px rgba(8, 8, 40, 0.6);
  --shadow-button: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 30px -12px rgba(70, 50, 190, 0.7);

  /* Mouvement */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 200ms;
  --duration-base: 240ms;
  --duration-reveal: 480ms;
  --ease-lava: cubic-bezier(0.45, 0, 0.55, 1);
  --focus-ring: 0 0 0 3px var(--color-paper), 0 0 0 5px var(--color-accent);
}

/* Utilitaires de base */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 28px; border: 0; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  color: #fff; font: 600 17px/1 var(--font-sans); text-decoration: none;
  transition: transform var(--duration-fast) var(--ease), filter var(--duration-fast) var(--ease);
}
/* Aurore nuit en lampe à lave. Par défaut, le dégradé immobile. La page pose la classe has-lava sur
   <html> seulement si le navigateur sait interpoler les propriétés enregistrées : alors les lueurs
   suivent --lava-*. Pas de valeur de secours dans var() : avec une valeur de secours, Chrome garde le
   dégradé figé à sa position de départ dans la propriété raccourcie `background`. */
.btn-primary, .lava {
  background: var(--gradient-aurora-night);
}
html.has-lava .btn-primary, html.has-lava .lava {
  background:
    radial-gradient(70% 140% at var(--lava-a-x) var(--lava-a-y), rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 62%),
    radial-gradient(60% 125% at var(--lava-b-x) var(--lava-b-y), rgba(138, 63, 252, 0.9) 0%, rgba(138, 63, 252, 0) 62%),
    radial-gradient(70% 145% at var(--lava-c-x) var(--lava-c-y), rgba(224, 69, 123, 0.85) 0%, rgba(224, 69, 123, 0) 60%),
    radial-gradient(55% 120% at var(--lava-d-x) var(--lava-d-y), rgba(255, 106, 85, 0.7) 0%, rgba(255, 106, 85, 0) 62%),
    var(--color-night-button);
}
html.has-lava .btn-primary, html.has-lava .lava {
  animation:
    lava-a 8s var(--ease-lava) infinite alternate,
    lava-b 10s var(--ease-lava) infinite alternate,
    lava-c 12s var(--ease-lava) infinite alternate,
    lava-d 9s var(--ease-lava) infinite alternate;
}
@keyframes lava-a { 50% { --lava-a-x: 60%; --lava-a-y: 100%; } 100% { --lava-a-x: 100%; --lava-a-y: 0%; } }
@keyframes lava-b { 50% { --lava-b-x: 10%; --lava-b-y: 80%; } 100% { --lava-b-x: 50%; --lava-b-y: 100%; } }
@keyframes lava-c { 50% { --lava-c-x: 35%; --lava-c-y: 0%; } 100% { --lava-c-x: 0%; --lava-c-y: 70%; } }
@keyframes lava-d { 50% { --lava-d-x: 90%; --lava-d-y: 90%; } 100% { --lava-d-x: 25%; --lava-d-y: 0%; } }
.btn-primary:hover { filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.text-aurora {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-aurora { color: var(--color-accent); background: none; }
}
.surface-aurora { position: relative; overflow: hidden; background: var(--gradient-aurora); color: #fff; }
.surface-aurora > .grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.22; mix-blend-mode: overlay; pointer-events: none; }
.field { display: grid; gap: var(--space-2); }
.field label { font: 500 var(--text-ui)/1.3 var(--font-sans); color: var(--color-ink); }
.field input, .field select {
  height: 52px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-field);
  background: var(--color-stone); color: var(--color-ink); font: 400 16px/1.2 var(--font-sans);
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.field input::placeholder { color: var(--color-placeholder); }
.field input:focus-visible, .field select:focus-visible {
  outline: none; background: var(--color-paper); border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(75, 59, 217, 0.15);
}
.field [aria-invalid="true"] { border-color: var(--status-error-fg); }
.field .field-error { font: 400 14px/1.4 var(--font-sans); color: var(--status-error-fg); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font: 16px / 1.5 var(--font-sans);
}
[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: hidden must override component display rules. */
  display: none !important;
}
a {
  color: var(--color-accent);
  text-underline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: var(--color-ink);
  background: var(--color-stone);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  min-height: 44px;
  padding: 10px 18px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}
/* The prism before « Extra » (design system: Logo): 1em of the word, 0.225em away; white on dark grounds. */
.logo-mark {
  flex: none;
  width: 1em;
  height: 1em;
  margin-right: 0.225em;
}
.mark-white {
  display: none;
}
/* ---------- Shell: the menu on the left (at the bottom on phones) and the current view ---------- */
.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100dvh;
  padding: 24px 16px;
  border-right: 1px solid var(--color-line);
  background: var(--color-paper);
}
.brand {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--color-ink);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}
.brand small {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}
.nav {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--color-slate);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover {
  background: var(--color-stone);
  color: var(--color-ink);
}
.nav a[aria-current="page"] {
  background: var(--color-ink);
  color: var(--color-paper);
}
.nav svg,
.icon-button svg,
.kpi-icon svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  font-size: 12px;
  font-weight: 600;
}
.me {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--color-stone);
}
.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
}
.me-text {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}
.me-text strong {
  font-size: 14px;
}
.me-text span {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-muted);
}
.icon-button:hover {
  background: var(--color-paper);
  color: var(--color-ink);
}
.shell main {
  width: 100%;
  min-width: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 48px) 96px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin-bottom: 16px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 18px;
  margin-top: 28px;
}
.eyebrow {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.muted,
small {
  color: var(--color-muted);
  font-size: 14px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.page-head h1 {
  margin-bottom: 8px;
}
.page-head .muted {
  margin: 0;
}
h1:focus {
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Tiles: label, icon, the number, one line of context. */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.kpi {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-bubble);
  color: var(--color-ink);
  text-decoration: none;
}
a.kpi:hover {
  border-color: var(--color-muted);
}
.kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.kpi h3 {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}
.kpi-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.kpi-value {
  margin: 2px 0 0;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.kpi-sub {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}
.delta {
  font-weight: 600;
}
.delta.up {
  color: var(--status-done-fg);
}
.delta.down {
  color: var(--status-error-fg);
}
.delta.flat {
  color: var(--color-slate);
}
.panel {
  min-width: 0;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-bubble);
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.panel-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-grid .panel {
  margin: 0;
}
.more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
}
.period select {
  width: auto;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
}
/* Columns: past weeks in a lighter step, the current one in the accent, labelled on its cap. */
.chart {
  position: relative;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .col {
  fill: var(--color-accent);
  opacity: 0.35;
}
.chart .col.current,
.chart .week:hover .col,
.chart .week:focus-visible .col {
  opacity: 1;
}
.chart .base {
  stroke: var(--color-line);
  stroke-width: 1;
}
.chart .tick {
  fill: var(--color-muted);
  font-size: 11px;
  text-anchor: middle;
}
.chart .cap {
  fill: var(--color-ink);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
}
.chart .hit {
  fill: transparent;
}
.chart .week {
  outline: none;
}
.chart .week:focus-visible .hit {
  fill: var(--color-accent-soft);
}
.tip {
  position: absolute;
  top: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -100%);
}
/* Funnel: one track per step, its bar from the left edge with a rounded end. */
.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 16px;
}
.step-label {
  font-weight: 500;
}
.step-track {
  height: 24px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--color-stone);
}
.step-bar {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--color-accent);
}
.step-value {
  display: grid;
  font-weight: 600;
  text-align: right;
}
.step-value small {
  font-size: 12px;
  font-weight: 400;
}
.funnel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}
/* Three tiles in a row (revenue) and the second dashboard row (chart beside the funnel). */
.kpis.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dash-grid.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}
/* Alerts: one row per thing to call about, a dot for how urgent. */
.alerts {
  display: grid;
  gap: 8px;
}
.alert {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: transparent;
  text-align: left;
}
.alert:hover {
  border-color: var(--color-muted);
}
.alert span:last-child {
  grid-column: 2;
  color: var(--color-slate);
  font-size: 14px;
}
.alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-muted);
}
.alert.high .alert-dot {
  background: var(--status-error-fg);
}
.alert.medium .alert-dot {
  background: #ffb547;
}
/* Data tables: Usage and Billing, one row per client; they scroll sideways on a phone. */
.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th,
table.data td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  white-space: nowrap;
}
table.data thead th {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
}
table.data td.bad {
  color: var(--status-error-fg);
  font-weight: 600;
}
table.data td.warn {
  color: var(--status-pending-fg);
  font-weight: 600;
}
button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--color-line);
  text-underline-offset: 4px;
}
.steps.agents {
  gap: 10px;
}
.steps.agents li {
  grid-template-columns: 96px minmax(0, 1fr) 32px;
  gap: 12px;
}
.steps.agents .step-label {
  display: grid;
  line-height: 1.2;
}
.steps.agents small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 400;
}
.badge.sub-paye {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.badge.sub-en_retard {
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
.badge.sub-essai {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
/* Credits in the client record. */
.credit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.gesture {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.ledger {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
}
.ledger small {
  grid-column: 1 / -1;
}
#credit-error {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
.small {
  font-size: 13px;
}
/* Dashboard groups: Prospection, Clients. */
.group-title {
  margin: 8px 0 12px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
/* Clients: one row per app workspace; columns on a computer, stacked on a phone. */
.clients {
  display: grid;
  gap: 10px;
}
.client {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 96px minmax(0, 1.4fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: transparent;
  text-align: left;
}
.client:hover {
  border-color: var(--color-muted);
}
.client-name {
  display: grid;
  min-width: 0;
}
.client-name strong {
  font-size: 16px;
}
.client-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-name small,
.client-meta {
  color: var(--color-muted);
  font-size: 13px;
}
.client-state,
.client-agents,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.client-setup {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.client-meta {
  display: grid;
}
.meter {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--color-stone);
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--color-accent);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-stone);
  color: var(--color-slate);
  font-size: 12px;
  font-weight: 500;
}
.chip.agent {
  background: var(--tint);
  color: var(--ink);
}
.chip.tool-active {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.chip.tool-needs_consent,
.chip.tool-revoked {
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
.badge.state-nouveau {
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
}
.badge.state-installation {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.badge.state-actif {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.badge.state-resilie {
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
dialog.wide {
  width: min(1040px, calc(100% - 32px));
}
.client-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
}
.client-columns h3 {
  margin-top: 8px;
}
.client-columns section + section {
  margin-top: 24px;
}
.client-columns h4 {
  margin: 16px 0 8px;
  font-size: 14px;
}
.facts {
  display: grid;
  gap: 8px;
  margin: 0;
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-line-soft, var(--color-line));
}
.facts dt {
  color: var(--color-muted);
  font-size: 14px;
}
.facts dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}
.setup {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  border: 0;
}
.setup .checkbox {
  gap: 10px;
  margin: 0;
  min-height: 32px;
}
.setup legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}
#client-form {
  display: grid;
  align-content: start;
  gap: 14px;
}
#client-error {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.filters {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
}
.search {
  flex: 1;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  color: var(--color-ink);
  background: var(--color-stone);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-field);
  padding: 13px;
  font-size: 16px;
}
textarea {
  resize: vertical;
}
.prospects {
  display: grid;
  gap: 12px;
}
.prospect {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
}
.prospect.overdue {
  border-left: 4px solid var(--status-error-fg);
}
.prospect .open {
  display: block;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: 100%;
}
.prospect h3 {
  margin: 8px 0 4px;
  font-size: 20px;
}
.prospect p {
  margin: 4px 0 0;
  font-size: 14px;
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  background: var(--color-stone);
  color: var(--color-slate);
  border-radius: 20px;
  font-size: 12px;
}
.badge.late {
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
.badge.stage-a_rappeler {
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
}
.badge.stage-rendez_vous {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.badge.stage-client {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.prospects.compact .prospect {
  padding: 14px 16px;
}
.call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  text-decoration: none;
  font-weight: 600;
}
.empty {
  padding: 40px 24px;
  text-align: center;
  background: var(--color-stone);
  border-radius: var(--radius-card);
}
#notice,
#form-error,
#erase-error {
  padding: 16px;
  background: var(--status-error-bg);
  color: var(--status-error-fg);
  border-radius: 12px;
}
dialog {
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-window);
  padding: 28px;
  width: min(700px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.4);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox {
  display: flex;
  align-items: center;
  margin: 20px 0;
}
.checkbox input {
  width: 20px;
  height: 20px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
#history {
  font-size: 14px;
}
.event {
  padding: 16px 0;
  border-top: 1px solid var(--color-line);
}
.event p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0;
}
.privacy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}
.danger {
  color: var(--status-error-fg);
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 12px;
  background: var(--color-paper);
  z-index: 3;
}
.skip:focus {
  top: 12px;
}
body.is-signed-out .skip {
  display: none;
}
@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-grid,
  .dash-grid.reverse {
    grid-template-columns: 1fr;
  }
}
/* Phones: the brand and the account on top, the menu as a bar at the bottom of the screen. */
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    z-index: 5;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: auto;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }
  .brand {
    padding: 0;
    font-size: 22px;
  }
  .me {
    gap: 4px;
    margin: 0;
    padding: 0;
    background: none;
  }
  .me-text {
    display: none;
  }
  .avatar {
    width: 36px;
    height: 36px;
  }
  .sidebar nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-line);
    background: var(--color-paper);
  }
  .nav {
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
  }
  .nav a {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 6px;
    font-size: 12px;
  }
  .nav a[aria-current="page"] {
    background: var(--color-stone);
    color: var(--color-ink);
  }
  .count {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
  }
  .shell main {
    padding: 24px 16px calc(96px + env(safe-area-inset-bottom));
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 20px;
  }
  .page-head .btn-primary {
    width: 100%;
  }
  .steps li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }
  .step-track {
    grid-column: 1 / -1;
    order: 3;
  }
  .client {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }
  .client-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .kpis.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav a {
    font-size: 11px;
  }
  .gesture {
    grid-template-columns: 1fr 2fr;
  }
  .gesture button {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .kpis {
    gap: 10px;
  }
  .kpi {
    padding: 16px;
  }
  .kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  .kpi-value {
    font-size: 32px;
  }
}
/* Two tiles side by side on a phone: the label needs the icon's room. */
@media (max-width: 420px) {
  .kpi-icon {
    display: none;
  }
  .panel {
    padding: 18px 16px;
    border-radius: 18px;
  }
  .filters {
    flex-direction: column;
  }
  .prospect {
    gap: 10px;
    padding: 16px;
  }
  .prospect .call {
    padding: 12px 14px;
  }
  dialog {
    width: 100%;
    max-height: 96dvh;
    margin: auto 0 0;
    padding: 22px 16px;
    border-radius: 24px 24px 0 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    position: sticky;
    bottom: -22px;
    background: var(--color-paper);
    padding: 14px 0;
  }
  .form-actions > * {
    flex: 1;
  }
}
/* ---------- Sign-in ----------
   A stone stage with the prism as a solid (landing/src/components/gem.mjs), rolling onto a new tip every
   4 seconds (main.js), and the form beside it; the stage goes above the form on phones. */
.signin {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 100dvh;
  padding: 16px;
}
.signin-stage {
  position: relative;
  overflow: hidden;
  container-type: size;
  border-radius: var(--radius-stage);
  background: var(--color-stone);
}
/* Aurora behind the solid, drifting slowly like the site's glows. */
.signin-halo {
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: conic-gradient(from 220deg, #2e5bff, #8a3ffc, #e0457b, #ff8048, #2e5bff);
  opacity: 0.3;
  filter: blur(64px);
  animation: halo 12s var(--ease-lava) infinite alternate;
}
@keyframes halo {
  to {
    transform: translate(4%, -3%) scale(1.12);
  }
}
.signin-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88cqmin;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1.5px dashed rgba(29, 29, 31, 0.14);
  border-radius: 50%;
  animation: ring 120s linear infinite;
}
@keyframes ring {
  to {
    rotate: 1turn;
  }
}
/* The solid: its tips --gem-r away from the centre, so the diamond spans half the stage. */
.signin-gem {
  --gem-r: 29cqmin;
  --gem-light: rgba(255, 255, 255, 0.07);
  --gem-dark: rgba(18, 20, 63, 0.12);
  position: absolute;
  top: 50%;
  left: 50%;
  perspective: calc(var(--gem-r) * 5.7);
}
.gem {
  position: absolute;
  transform-style: preserve-3d;
}
.gem-face,
.gem-face i {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--gem-r);
  height: var(--gem-r);
  transform-origin: 0 0;
  background:
    linear-gradient(var(--shade), var(--shade)), radial-gradient(145% 145% at 80% 80%, var(--glow)), var(--color-night);
}
.gem-face {
  clip-path: polygon(0 0, 100% 0, 0 100%);
  backface-visibility: hidden;
}
.gem-face i {
  opacity: 0;
  transition: opacity 1500ms cubic-bezier(0.65, 0, 0.2, 1);
}
.gem.is-x .gem-face [data-tip="x"],
.gem.is-y .gem-face [data-tip="y"] {
  opacity: 1;
}
.signin-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 28px;
}
.signin-brand {
  display: flex;
  align-items: center;
  margin-bottom: 56px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.signin-brand small {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
.signin h1 {
  font-size: clamp(34px, 3.6vw, 46px);
  margin-bottom: 12px;
}
.signin form {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}
.signin input {
  padding: 15px 16px;
}
.signin input:focus-visible {
  outline: none;
  background: var(--color-paper);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(75, 59, 217, 0.18);
}
.signin [aria-invalid="true"] {
  border-color: var(--status-error-fg);
}
.signin .btn-primary {
  width: 100%;
  margin-top: 6px;
}
.signin .btn-primary:disabled {
  cursor: wait;
  filter: saturate(0.6);
}
.field {
  display: grid;
  gap: 7px;
}
.secret {
  position: relative;
  display: block;
}
.secret input {
  padding-right: 56px;
}
.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  translate: 0 -50%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-muted);
}
.reveal:hover {
  color: var(--color-ink);
}
.reveal svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reveal .eye-shut,
.reveal[aria-pressed="true"] .eye-open {
  display: none;
}
.reveal[aria-pressed="true"] .eye-shut {
  display: block;
}
.form-alert,
.signin-status {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
}
.form-alert {
  background: var(--status-error-bg);
  color: var(--status-error-fg);
}
.signin-status {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.signin-help {
  margin: 28px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}
@media (max-width: 860px) {
  .signin {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 12px;
  }
  .signin-stage {
    height: clamp(200px, 28vh, 300px);
    border-radius: var(--radius-tile);
  }
  .signin-panel {
    justify-content: flex-start;
    padding: 28px 4px 40px;
  }
  .signin-brand {
    margin-bottom: 28px;
  }
  .signin form {
    margin-top: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .signin-halo,
  .signin-ring {
    animation: none;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --color-ink: #f5f5f7;
    --color-paper: #171719;
    --color-stone: #242427;
    --color-line: #3b3b40;
    --color-slate: #d0d0d5;
    --color-muted: #aaaab3;
    --color-accent: #b9b0ff;
    --color-accent-soft: #34304b;
    --status-error-bg: #432521;
    --status-error-fg: #ffb3a7;
    --status-done-bg: #1e3a2a;
    --status-done-fg: #9fe3bd;
    --status-pending-bg: #3d2f12;
    --status-pending-fg: #ffd28a;
  }
  /* Dark grounds take the white logo (design system: Logo). The solid keeps its colours, as on the site
     (Rayan, 18 October 2026). */
  .mark-colour {
    display: none;
  }
  .mark-white {
    display: block;
  }
  .signin-stage {
    background: #1f1f22;
  }
  .signin-halo {
    opacity: 0.34;
  }
  .signin-ring {
    border-color: rgba(255, 255, 255, 0.14);
  }
}
