/* =====================================================================
   STUDIO YANNIS ULTIMATE — DESIGN SYSTEM
   Référence visuelle unique. Chaque valeur est un token à reprendre.
   ===================================================================== */

:root {
  /* Fondations sombres — graphite profond, jamais bleuté */
  --bg:              #09090b;
  --bg-elevated:     #0d0d10;
  --surface-1:       #141418;
  --surface-2:       #1b1b21;
  --surface-3:       #24242c;
  --surface-hover:   #222229;
  --surface-pressed: #2a2a33;

  /* Texte — hiérarchie stricte */
  --text-primary:    #f5f5f7;
  --text-secondary:  #b3b3bd;
  --text-tertiary:   #7a7a86;
  --text-muted:      #4d4d57;

  /* Bordures — fines, contrastées, jamais lourdes */
  --border-subtle:   rgba(255,255,255,0.06);
  --border-default:  rgba(255,255,255,0.10);
  --border-strong:   rgba(255,255,255,0.16);

  /* Accents — deux au maximum affichés en même temps */
  --violet:          #9187ff;   /* IA, création — la couleur de l'onction */
  --violet-soft:     #b3aaff;
  --violet-glow:     rgba(145,135,255,0.28);
  --violet-tint:     rgba(145,135,255,0.10);
  --orange:          #ff9557;   /* Action majeure, décision, urgence positive */
  --orange-soft:     #ffb185;
  --orange-tint:     rgba(255,149,87,0.12);

  /* Sémantique */
  --success:         #34c77b;
  --success-tint:    rgba(52,199,123,0.14);
  --warning:         #ffb340;
  --warning-tint:    rgba(255,179,64,0.14);
  --danger:          #ff5c70;
  --danger-tint:     rgba(255,92,112,0.14);
  --info:            #58a6ff;

  /* Focus */
  --focus-ring:      rgba(169,162,255,0.55);

  /* Ombres — sobres */
  --shadow-1:        0 1px 2px rgba(0,0,0,0.30);
  --shadow-2:        0 6px 20px rgba(0,0,0,0.32);
  --shadow-3:        0 20px 60px rgba(0,0,0,0.42);

  /* Typographie */
  --font-display:    "Fraunces", ui-serif, "Iowan Old Style", Georgia, serif;
  --font-sans:       "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono:       "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rayons */
  --radius-xs:  6px;
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* Espacements — échelle 4/8 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
  --sp-9: 48px; --sp-10: 64px; --sp-11: 80px; --sp-12: 96px;

  /* Hauteurs contrôles */
  --h-control: 44px;
  --h-input:   48px;
  --h-topbar:  64px;
  --h-dock:    72px;

  /* Motion */
  --ease:       cubic-bezier(.22,.61,.36,1);
  --ease-out:   cubic-bezier(.16,1,.3,1);
  --dur-fast:   160ms;
  --dur:        200ms;
  --dur-slow:   360ms;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html { color-scheme: dark; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display:block; max-width:100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--violet-tint); color: var(--text-primary); }

/* Focus visible universel */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =====================================================================
   MAQUETTE — l'HTML est une référence visuelle pour Codex.
   Chaque section = un écran ou un état.
   ===================================================================== */

.page { max-width: 1440px; margin: 0 auto; padding: 0 var(--sp-6); }
.page-wide { max-width: 1600px; margin: 0 auto; padding: 0 var(--sp-6); }

.spec-doc { padding: var(--sp-9) 0; }
.spec-hero { padding: var(--sp-12) 0 var(--sp-9); border-bottom: 1px solid var(--border-subtle); }
.spec-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.spec-eyebrow .dot { color: var(--violet); }
.spec-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: var(--sp-5) 0 var(--sp-4);
  color: var(--text-primary);
}
.spec-title em { font-style: italic; color: var(--violet-soft); font-weight: 300; }
.spec-lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 68ch;
  font-weight: 400;
}
.spec-meta {
  margin-top: var(--sp-8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-subtle);
}
.spec-meta dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-2);
}
.spec-meta dd {
  margin: 0;
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}
@media (max-width: 768px) {
  .spec-meta { grid-template-columns: repeat(2, 1fr); }
}

/* Séparateur de chapitre — signature éditoriale */
.chapter-mark {
  display: flex;
  align-items: baseline;
  gap: var(--sp-5);
  padding: var(--sp-11) 0 var(--sp-7);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--sp-7);
}
.chapter-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 72px;
  line-height: 1;
  color: var(--violet-soft);
  letter-spacing: -0.03em;
}
.chapter-body { flex: 1; }
.chapter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.chapter-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: var(--sp-2) 0 var(--sp-3);
  color: var(--text-primary);
}
.chapter-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.55;
}

.section-caption {
  margin: var(--sp-6) 0 var(--sp-4);
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-caption .rule {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* =====================================================================
   PANNEAU MAQUETTE — cadre autour de chaque écran illustré
   ===================================================================== */

.mock {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}
.mock-chrome {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}
.mock-chrome .dots { display: flex; gap: 6px; }
.mock-chrome .dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface-3);
}
.mock-chrome .url {
  flex: 1;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}
.mock-chrome .url .lock { color: var(--success); margin-right: 6px; }
.mock-viewport-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
}
.mock-body {
  background: var(--bg);
  overflow: hidden;
}

/* =====================================================================
   COMPOSANT — TOPBAR (barre supérieure calme et fixe)
   ===================================================================== */

.studio-topbar {
  display: flex;
  align-items: center;
  height: var(--h-topbar);
  padding: 0 var(--sp-6);
  background: rgba(9,9,11,0.88);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--sp-6);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 180px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(145,135,255,0.65), transparent 55%),
    linear-gradient(135deg, #1b1b21 0%, #24242c 100%);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--violet-soft);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.02em;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  pointer-events: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.brand-owner {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Segmented control — inspiration Apple, jamais copie */
.nav-segmented {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  flex: 0 1 auto;
  margin: 0 auto;
}
.nav-seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
}
.nav-seg:hover { color: var(--text-primary); }
.nav-seg svg { opacity: 0.75; }
.nav-seg[aria-current="page"] {
  background: var(--surface-3);
  color: var(--text-primary);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 1px 2px rgba(0,0,0,0.4);
}
.nav-seg[aria-current="page"] svg { opacity: 1; color: var(--violet-soft); }

/* Barre d'actions utilitaires à droite */
.topbar-utility {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 180px;
  justify-content: flex-end;
}
.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.util-btn:hover {
  background: var(--surface-1);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.util-btn.icon-only { width: 36px; padding: 0; justify-content: center; }
.util-badge {
  position: relative;
}
.util-badge::after {
  content: "";
  position: absolute;
  top: 8px; right: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--bg);
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #524a9e 0%, #b06a3c 100%);
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-strong);
}

/* =====================================================================
   ACCUEIL — layout principal
   ===================================================================== */

.studio-main {
  padding: var(--sp-8) var(--sp-9) var(--sp-11);
}

.greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
}
.greeting-block {}
.greeting-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.greeting-hello {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
  color: var(--text-primary);
}
.greeting-hello em { font-style: italic; color: var(--violet-soft); font-weight: 300; }
.greeting-sub {
  font-size: 15px;
  color: var(--text-secondary);
}
.greeting-status {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-secondary);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-tint);
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--success);
  opacity: 0.4;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.9); opacity: 0.5; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.status-value strong { color: var(--text-primary); font-weight: 600; }

/* =====================================================================
   CARTE — "Votre prochaine action" (SIGNATURE)
   La seule carte qui porte l'aura violette — l'onction.
   ===================================================================== */

.next-action {
  position: relative;
  border-radius: var(--radius-2xl);
  padding: var(--sp-8) var(--sp-8);
  background: linear-gradient(180deg, rgba(20,20,24,0.92) 0%, rgba(20,20,24,0.98) 100%);
  border: 1px solid var(--border-default);
  overflow: hidden;
  margin-bottom: var(--sp-8);
}
.next-action::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -10%;
  width: 60%;
  height: 180%;
  background:
    radial-gradient(closest-side at 30% 40%, rgba(145,135,255,0.28), transparent 70%),
    radial-gradient(closest-side at 60% 60%, rgba(255,149,87,0.10), transparent 70%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}
.next-action::after {
  /* fine grille éditoriale */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
}
.next-action-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-8);
  align-items: center;
}
.next-action-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--violet-tint);
  border: 1px solid rgba(145,135,255,0.3);
  border-radius: var(--radius-pill);
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.next-action-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: var(--sp-4) 0 var(--sp-3);
  color: var(--text-primary);
  max-width: 34ch;
}
.next-action-reason {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 58ch;
}
.next-action-meta {
  display: flex;
  gap: var(--sp-6);
  margin: var(--sp-5) 0 var(--sp-6);
  flex-wrap: wrap;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.meta-chip svg { opacity: 0.7; }
.meta-chip strong { color: var(--text-primary); font-weight: 500; }
.next-action-cta {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.985); }
.btn-primary {
  background: linear-gradient(180deg, #ffa06a 0%, var(--orange) 100%);
  color: #1a0e05;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 6px 20px rgba(255,149,87,0.28);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 8px 28px rgba(255,149,87,0.38); }
.btn-violet {
  background: linear-gradient(180deg, #a19aff 0%, var(--violet) 100%);
  color: #0f0a2e;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 6px 20px rgba(145,135,255,0.28);
}
.btn-violet:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 8px 28px rgba(145,135,255,0.38); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn-ghost {
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--surface-1); }
.btn-danger {
  background: var(--danger-tint);
  color: var(--danger);
  border-color: rgba(255,92,112,0.28);
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-icon { width: 40px; padding: 0; }

/* Quick actions — 4 tuiles sobres */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.quick-tile {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  text-align: left;
  width: 100%;
}
.quick-tile:hover {
  background: var(--surface-hover);
  border-color: var(--border-default);
  transform: translateY(-1px);
}
.quick-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  flex-shrink: 0;
}
.quick-icon.violet { color: var(--violet-soft); background: var(--violet-tint); border-color: rgba(145,135,255,0.2); }
.quick-icon.orange { color: var(--orange-soft); background: var(--orange-tint); border-color: rgba(255,149,87,0.2); }
.quick-icon.info   { color: var(--info);        background: rgba(88,166,255,0.10); border-color: rgba(88,166,255,0.2); }
.quick-icon.success{ color: var(--success);     background: var(--success-tint);    border-color: rgba(52,199,123,0.22); }
.quick-body { flex: 1; min-width: 0; }
.quick-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.quick-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}
.quick-arrow { color: var(--text-muted); flex-shrink: 0; }

/* =====================================================================
   COLONNES DE TRAVAIL — 2/3 : 1/3
   ===================================================================== */

.work-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-6);
}

/* Panneau */
.panel {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--sp-4);
}
.panel-title-group { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}
.panel-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.05em;
}
.panel-actions { display: flex; gap: var(--sp-2); align-items: center; }
.panel-body { padding: var(--sp-3) 0; }
.panel-body.padded { padding: var(--sp-5); }

/* Ligne de décision */
.decision-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--dur) var(--ease);
}
.decision-item:last-child { border-bottom: 0; }
.decision-item:hover { background: var(--bg-elevated); }
.decision-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.decision-icon.risk-high { background: var(--danger-tint); border-color: rgba(255,92,112,0.28); color: var(--danger); }
.decision-icon.risk-mid  { background: var(--warning-tint); border-color: rgba(255,179,64,0.28); color: var(--warning); }
.decision-icon.risk-low  { background: var(--violet-tint); border-color: rgba(145,135,255,0.24); color: var(--violet-soft); }
.decision-body { min-width: 0; }
.decision-title { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.decision-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-tertiary); flex-wrap: wrap; }
.decision-meta .sep { color: var(--text-muted); }
.decision-actions { display: flex; gap: 8px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-verified { background: var(--success-tint); color: var(--success); border-color: rgba(52,199,123,0.24); }
.badge-partial  { background: var(--warning-tint); color: var(--warning); border-color: rgba(255,179,64,0.28); }
.badge-missing  { background: var(--surface-2);    color: var(--text-tertiary); border-color: var(--border-default); }
.badge-stale    { background: var(--warning-tint); color: var(--warning); border-color: rgba(255,179,64,0.28); }
.badge-error    { background: var(--danger-tint);  color: var(--danger);  border-color: rgba(255,92,112,0.28); }
.badge-ai       { background: var(--violet-tint);  color: var(--violet-soft); border-color: rgba(145,135,255,0.24); }
.badge-neutral  { background: var(--surface-2);    color: var(--text-secondary); border-color: var(--border-default); }
.badge-restrict { background: var(--surface-2);    color: var(--text-tertiary); border-color: var(--border-default); }

/* =====================================================================
   PRODUCTION ACTIVE — mini pipeline
   ===================================================================== */

.production-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}
.production-row:last-child { border-bottom: 0; }
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.stage-brief    { background: rgba(88,166,255,0.10); color: var(--info); }
.stage-draft    { background: var(--violet-tint);    color: var(--violet-soft); }
.stage-review   { background: var(--warning-tint);   color: var(--warning); }
.stage-approved { background: var(--success-tint);   color: var(--success); }
.stage-idea     { background: var(--surface-2);      color: var(--text-secondary); }
.production-title { font-size: 14.5px; color: var(--text-primary); font-weight: 500; }
.production-sub { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; }
.production-owner {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: white;
}
.owner-y { background: linear-gradient(135deg, #8b81ff, #ff9b6a); }
.owner-e { background: linear-gradient(135deg, #4a5f8f, #6a8fbf); }
.owner-m { background: linear-gradient(135deg, #6f5da0, #a06f9b); }
.production-time { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); }

/* =====================================================================
   SIDE PANEL — santé des connexions
   ===================================================================== */

.connector-line {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-6);
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}
.connector-line:last-child { border-bottom: 0; }
.connector-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  display: grid; place-items: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
}
.connector-mark.yt { background: #2a1516; color: #ff5c70; border-color: rgba(255,92,112,0.2); }
.connector-mark.br { background: #16221e; color: var(--success); border-color: rgba(52,199,123,0.2); }
.connector-mark.el { background: #1a1830; color: var(--violet-soft); border-color: rgba(145,135,255,0.2); }
.connector-mark.gd { background: #1e2130; color: var(--info); border-color: rgba(88,166,255,0.2); }
.connector-mark.dr { background: #24242c; color: var(--text-secondary); }
.connector-mark.st { background: #241e0d; color: var(--warning); border-color: rgba(255,179,64,0.2); }
.connector-mark.ga { background: #241a06; color: var(--orange); border-color: rgba(255,149,87,0.2); }
.connector-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}
.connector-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* =====================================================================
   CALENDRIER MINI
   ===================================================================== */

.mini-cal {
  padding: var(--sp-5) var(--sp-6);
}
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: var(--sp-3);
}
.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  color: var(--text-secondary);
}
.cal-day .dow { font-size: 10px; font-family: var(--font-mono); color: var(--text-tertiary); letter-spacing: 0.06em; text-transform: uppercase; }
.cal-day .num { font-size: 15px; font-weight: 600; color: var(--text-primary); font-family: var(--font-display); }
.cal-day.today { border-color: var(--violet); background: var(--violet-tint); }
.cal-day.today .num { color: var(--violet-soft); }
.cal-day.has-event::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange);
}
.cal-event-list { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: 8px; }
.cal-event {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}
.cal-event-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--violet-soft);
  font-weight: 500;
}
.cal-event-title { font-size: 13.5px; color: var(--text-primary); font-weight: 500; }
.cal-event-tag { font-size: 11px; color: var(--text-tertiary); }

/* =====================================================================
   PAGE CRÉER > YOUTUBE — atelier IA
   ===================================================================== */

.workshop-hero {
  padding: var(--sp-6) var(--sp-8) var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-8);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-1);
}
.workshop-breadcrumb {
  display: flex; gap: 6px; align-items: center;
  font-size: 12px; color: var(--text-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.workshop-breadcrumb a { color: var(--text-tertiary); }
.workshop-breadcrumb .sep { color: var(--text-muted); }
.workshop-breadcrumb .current { color: var(--text-secondary); }
.workshop-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}
.workshop-title em { font-style: italic; color: var(--violet-soft); font-weight: 300; }
.workshop-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 6px;
  max-width: 62ch;
}
.workshop-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

/* Stepper de phases IA */
.phase-stepper {
  display: flex;
  padding: var(--sp-4) var(--sp-8);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  gap: 0;
  overflow-x: auto;
}
.phase-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.phase-step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}
.phase-step.done .num { background: var(--success-tint); border-color: rgba(52,199,123,0.3); color: var(--success); }
.phase-step.done { color: var(--text-secondary); }
.phase-step.active .num { background: var(--violet); color: #1a1330; border-color: var(--violet); }
.phase-step.active { color: var(--text-primary); }
.phase-connector {
  width: 32px; height: 1px;
  background: var(--border-subtle);
  margin: 0 6px;
}
.phase-connector.done { background: rgba(52,199,123,0.4); }

/* Zone brief + sources */
.brief-bar {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-8);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
  align-items: flex-end;
}
.brief-field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
}
.field-input {
  height: 44px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14.5px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  width: 100%;
}
.field-input:focus { border-color: var(--violet); background: var(--bg-elevated); outline: 0; box-shadow: 0 0 0 3px var(--violet-tint); }
.field-input::placeholder { color: var(--text-muted); }
.field-select {
  height: 44px;
  padding: 0 36px 0 14px;
  background: var(--bg) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a86' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14.5px;
  appearance: none;
  width: 100%;
}
.source-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  height: 44px;
}
.source-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
}
.source-chip.violet { background: var(--violet-tint); color: var(--violet-soft); border-color: rgba(145,135,255,0.24); }
.source-chip .close { color: var(--text-tertiary); cursor: pointer; }

/* Grille des 6 concepts YouTube */
.ideas-header {
  padding: var(--sp-7) var(--sp-8) var(--sp-4);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.ideas-title-block {}
.ideas-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.ideas-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 6px 0 4px;
}
.ideas-h2 em { color: var(--violet-soft); font-style: italic; font-weight: 300; }
.ideas-note { font-size: 13.5px; color: var(--text-tertiary); }

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  padding: 0 var(--sp-8) var(--sp-8);
}
.idea-card {
  position: relative;
  padding: var(--sp-6);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.idea-card:hover {
  border-color: rgba(145,135,255,0.25);
  transform: translateY(-2px);
  background: var(--bg-elevated);
}
.idea-card.selected {
  border-color: var(--violet);
  background: linear-gradient(180deg, rgba(145,135,255,0.06) 0%, var(--surface-1) 60%);
  box-shadow: 0 0 0 1px var(--violet-tint), 0 20px 60px rgba(145,135,255,0.14);
}
.idea-card.selected::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 6px; bottom: -1px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(180deg, var(--violet) 0%, var(--orange) 100%);
}
.idea-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.idea-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 40px;
  line-height: 1;
  color: var(--text-muted);
  letter-spacing: -0.03em;
}
.idea-card.selected .idea-num { color: var(--violet-soft); }
.idea-orig {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.idea-orig.low { background: var(--success-tint); color: var(--success); }
.idea-orig.mid { background: var(--warning-tint); color: var(--warning); }
.idea-orig.high { background: var(--danger-tint); color: var(--danger); }
.idea-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.idea-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.idea-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-4);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
}
.idea-meta-item {
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.idea-meta-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.idea-meta-val {
  font-size: 13px;
  color: var(--text-secondary);
}
.idea-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding-top: var(--sp-2);
}
.idea-btn-choose {
  flex: 1;
  height: 40px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  transition: all var(--dur) var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.idea-btn-choose:hover { background: var(--violet-tint); border-color: rgba(145,135,255,0.35); color: var(--violet-soft); }
.idea-card.selected .idea-btn-choose {
  background: linear-gradient(180deg, #a19aff 0%, var(--violet) 100%);
  color: #0f0a2e;
  border-color: transparent;
  font-weight: 600;
}

/* Barre de confirmation après sélection */
.selection-bar {
  position: sticky;
  bottom: 0;
  margin: var(--sp-4) var(--sp-8);
  padding: var(--sp-4) var(--sp-6);
  background: rgba(15,15,20,0.94);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  box-shadow: var(--shadow-3);
}
.selection-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--violet-tint);
  border: 1px solid rgba(145,135,255,0.28);
  border-radius: var(--radius-pill);
  color: var(--violet-soft);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.selection-body {}
.selection-title { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.selection-hint { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.selection-actions { display: flex; gap: 12px; }

/* =====================================================================
   PIPELINE CONTENUS — Kanban 5 colonnes
   ===================================================================== */

.pipeline-frame { padding: var(--sp-6) 0 var(--sp-9); }
.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 var(--sp-8);
  margin-bottom: var(--sp-5);
}
.pipeline-filters {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}
.filter-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.filter-pill[aria-current="true"] { background: var(--surface-3); color: var(--text-primary); }

.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: var(--sp-4);
  padding: 0 var(--sp-8);
  overflow-x: auto;
}
.kb-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
.kb-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}
.kb-col-head .name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}
.kb-col-head .count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--text-secondary);
}
.kb-col-head .dot {
  width: 6px; height: 6px; border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}
.kb-col.ideas .kb-col-head .dot     { background: var(--text-muted); }
.kb-col.brief .kb-col-head .dot     { background: var(--info); }
.kb-col.prod .kb-col-head .dot      { background: var(--violet); }
.kb-col.review .kb-col-head .dot    { background: var(--warning); }
.kb-col.ready .kb-col-head .dot     { background: var(--success); }

.kb-card {
  padding: var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.kb-card:hover { transform: translateY(-1px); border-color: var(--border-default); }
.kb-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  align-self: flex-start;
}
.tag-youtube    { background: rgba(255,92,112,0.10); color: var(--danger); }
.tag-podcast    { background: var(--violet-tint);    color: var(--violet-soft); }
.tag-punchline  { background: var(--orange-tint);    color: var(--orange-soft); }
.tag-prayer     { background: rgba(88,166,255,0.10); color: var(--info); }
.tag-writing    { background: var(--surface-2);      color: var(--text-secondary); }
.tag-email      { background: var(--success-tint);   color: var(--success); }
.kb-card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
.kb-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.kb-card-owner { display: inline-flex; align-items: center; gap: 6px; }
.kb-card-owner .avatar-sm {
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 9px; font-weight: 700;
  color: white;
  display: grid; place-items: center;
}
.kb-card-due { font-family: var(--font-mono); font-size: 11px; }
.kb-card-due.warn { color: var(--warning); }
.kb-card-due.danger { color: var(--danger); }

/* =====================================================================
   RAPPORT STATS COMPLÈTES
   ===================================================================== */

.report-page { padding: var(--sp-8) var(--sp-8) var(--sp-11); }
.report-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-8);
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}
.report-title-block {}
.report-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}
.report-title em { color: var(--violet-soft); font-style: italic; font-weight: 300; }
.report-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 8px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.report-subtitle .sep { color: var(--text-muted); }

.period-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}
.period-tab {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.period-tab[aria-current="true"] { background: var(--surface-3); color: var(--text-primary); }

/* Grille KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
}
.kpi-card {
  padding: var(--sp-5);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.kpi-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.kpi-value.missing { color: var(--text-muted); }
.kpi-unit {
  font-size: 15px;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-left: 6px;
  font-family: var(--font-sans);
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--text-tertiary); }
.kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}
.kpi-foot .sep { color: var(--text-muted); }

/* Chart card */
.chart-card {
  padding: var(--sp-6);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-6);
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-6);
  margin-bottom: var(--sp-5);
}
.chart-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.chart-legend {
  display: flex;
  gap: var(--sp-5);
  align-items: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch {
  width: 10px; height: 10px; border-radius: 3px;
  display: inline-block;
}
.chart-canvas {
  position: relative;
  width: 100%;
  height: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.chart-canvas svg { display: block; width: 100%; height: 100%; }
.chart-caption {
  margin-top: var(--sp-3);
  font-size: 12.5px;
  color: var(--text-tertiary);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Report data grid — 2 col */
.report-two {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-5);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.data-table thead th {
  text-align: left;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-1);
}
.data-table thead th.num { text-align: right; }
.data-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 13px;
}
.data-table tbody td.muted { color: var(--text-tertiary); }
.data-table tbody tr:hover { background: var(--bg-elevated); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* =====================================================================
   RÉGLAGES > CONNEXIONS
   ===================================================================== */

.settings-frame {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 720px;
}
.settings-side {
  background: var(--surface-1);
  border-right: 1px solid var(--border-subtle);
  padding: var(--sp-6) var(--sp-3);
}
.settings-side-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 var(--sp-3) var(--sp-3);
  font-weight: 500;
}
.settings-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.settings-nav a:hover { background: var(--surface-2); color: var(--text-primary); }
.settings-nav a[aria-current="page"] { background: var(--surface-3); color: var(--text-primary); }
.settings-nav a[aria-current="page"] svg { color: var(--violet-soft); }
.settings-nav a svg { color: var(--text-tertiary); }

.settings-main { padding: var(--sp-8); }
.settings-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.settings-title em { color: var(--violet-soft); font-style: italic; font-weight: 300; }
.settings-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 60ch;
}
.settings-section {
  margin-top: var(--sp-8);
}

/* Grille connecteurs */
.connectors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
.connector-card {
  padding: var(--sp-5) var(--sp-6);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: var(--sp-4);
  align-items: center;
}
.cn-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  border: 1px solid var(--border-subtle);
}
.cn-logo.yt { background: #2a1516; color: #ff5c70; }
.cn-logo.br { background: #16221e; color: var(--success); }
.cn-logo.el { background: #1a1830; color: var(--violet-soft); }
.cn-logo.gd { background: #1e2130; color: var(--info); }
.cn-logo.st { background: #241e0d; color: var(--warning); }
.cn-logo.ga { background: #241a06; color: var(--orange); }
.cn-logo.ap { background: #24242c; color: var(--text-secondary); }
.cn-logo.gp { background: #16261e; color: #6ec78a; }
.cn-body { min-width: 0; }
.cn-name {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 3px;
}
.cn-status-line {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-tertiary);
}
.cn-status-line .sep { color: var(--text-muted); }

/* =====================================================================
   MOBILE — mockup iPhone
   ===================================================================== */

.mobile-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
}
.phone {
  aspect-ratio: 375/812;
  max-width: 380px;
  margin: 0 auto;
  background: #000;
  border-radius: 44px;
  padding: 12px;
  border: 8px solid #1a1a1e;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.phone-inner {
  position: relative;
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 26px;
  background: #000;
  border-radius: 999px;
  z-index: 10;
}
.phone-status {
  padding: 14px 20px 6px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.phone-status-right { display: flex; gap: 5px; align-items: center; }

.mobile-topbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
  background: rgba(9,9,11,0.9);
  backdrop-filter: blur(20px);
}
.mobile-topbar .brand-name { font-size: 14px; }
.mobile-topbar .brand-mark { width: 26px; height: 26px; font-size: 13px; }

.mobile-scroll {
  flex: 1;
  overflow: hidden;
  padding: 14px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-hello {
  padding: 6px 4px;
}
.mobile-hello .eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.mobile-hello h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 3px 0 4px;
}
.mobile-hello h1 em { color: var(--violet-soft); font-style: italic; font-weight: 300; }
.mobile-hello p {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin: 0;
}

.mobile-next {
  position: relative;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  overflow: hidden;
}
.mobile-next::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side at 20% 30%, var(--violet-glow), transparent 70%),
    radial-gradient(closest-side at 80% 90%, rgba(255,149,87,0.14), transparent 70%);
  pointer-events: none;
  filter: blur(16px);
}
.mobile-next > * { position: relative; z-index: 1; }
.mobile-next .tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--violet-tint);
  border: 1px solid rgba(145,135,255,0.3);
  border-radius: 999px;
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 8px;
}
.mobile-next h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.mobile-next p {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.mobile-next .cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffa06a 0%, var(--orange) 100%);
  color: #1a0e05;
  font-weight: 600;
  font-size: 12.5px;
}

.mobile-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mobile-quick-tile {
  padding: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.mobile-quick-tile .ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
}
.mobile-quick-tile .ico.violet { background: var(--violet-tint); color: var(--violet-soft); }
.mobile-quick-tile .ico.orange { background: var(--orange-tint); color: var(--orange-soft); }
.mobile-quick-tile .ico.info   { background: rgba(88,166,255,0.10); color: var(--info); }
.mobile-quick-tile .ico.success{ background: var(--success-tint);   color: var(--success); }
.mobile-quick-tile .name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.mobile-quick-tile .hint { font-size: 10.5px; color: var(--text-tertiary); }

.mobile-panel-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 4px 4px 0;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-decision {
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
}
.mobile-decision .icn {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
}
.mobile-decision .icn.high { background: var(--danger-tint); color: var(--danger); }
.mobile-decision .icn.mid  { background: var(--warning-tint); color: var(--warning); }
.mobile-decision .icn.low  { background: var(--violet-tint);  color: var(--violet-soft); }
.mobile-decision .t { font-size: 12.5px; color: var(--text-primary); font-weight: 500; line-height: 1.25; }
.mobile-decision .m { font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; }
.mobile-decision .arrow { color: var(--text-muted); }

/* Dock mobile */
.mobile-dock {
  padding: 8px 12px 22px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: rgba(9,9,11,0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 6px;
  border-radius: 12px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 500;
}
.dock-item svg { opacity: 0.65; }
.dock-item[aria-current="page"] { color: var(--violet-soft); background: var(--violet-tint); }
.dock-item[aria-current="page"] svg { opacity: 1; }

/* Sheet Plus */
.mobile-sheet {
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sheet-handle {
  width: 40px; height: 5px;
  background: var(--surface-3);
  border-radius: 999px;
  margin: 4px auto 12px;
}
.sheet-h {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  padding: 0 4px 4px;
}
.sheet-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.sheet-item .icn {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-secondary);
}
.sheet-item .icn.v { color: var(--violet-soft); background: var(--violet-tint); }
.sheet-item .icn.o { color: var(--orange-soft); background: var(--orange-tint); }
.sheet-item .icn.i { color: var(--info); background: rgba(88,166,255,0.1); }
.sheet-item .icn.s { color: var(--success); background: var(--success-tint); }
.sheet-item .icn.w { color: var(--warning); background: var(--warning-tint); }
.sheet-item .name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.sheet-item .hint { font-size: 11px; color: var(--text-tertiary); }
.sheet-item .arrow { margin-left: auto; color: var(--text-muted); }

/* =====================================================================
   DESIGN TOKEN SHOWCASE — appendice
   ===================================================================== */

.tokens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
}
.token-card {
  padding: var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.swatch {
  aspect-ratio: 4/3;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}
.token-info { display: flex; flex-direction: column; gap: 2px; }
.token-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.token-var { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
.token-hex { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }

.type-spec {
  padding: var(--sp-5) var(--sp-6);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-4);
}
.type-spec .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.type-spec .sample.title-page {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}
.type-spec .sample.title-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.type-spec .sample.body {
  font-size: 18px;
  line-height: 28px;
  color: var(--text-primary);
  max-width: 62ch;
}
.type-spec .sample.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* =====================================================================
   FOOTER NOTES
   ===================================================================== */

.footer-notes {
  padding: var(--sp-9) 0 var(--sp-11);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-11);
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.6;
}
.footer-notes h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.01em;
}
.footer-notes ul { padding-left: 20px; margin: 8px 0 0; }
.footer-notes li { margin-bottom: 6px; }

/* Utility */
.hide-mobile { }
@media (max-width: 900px) {
  .page, .page-wide { padding: 0 var(--sp-4); }
  .work-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .ideas-grid, .connectors-grid, .kpi-grid { grid-template-columns: 1fr; }
  .next-action-inner { grid-template-columns: 1fr; }
  .settings-frame { grid-template-columns: 1fr; }
  .settings-side { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .studio-main { padding: var(--sp-5); }
  .greeting { flex-direction: column; align-items: flex-start; }
  .mobile-showcase { grid-template-columns: 1fr; }
}
