/* Breach Lead — design tokens (v1, 15 sept. 2026)
   Source de vérité : 13-DA-BREACH-LEAD.md. Importer ce fichier tel quel ; ne pas redéfinir ces valeurs ailleurs.
   Police : <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap" rel="stylesheet"> */

:root {
  /* Couleurs */
  --teal: #163D3C;
  --teal-2: #1E5251;
  --teal-3: #0F2E2D;
  --brand: #00FF80;            /* action uniquement, jamais en texte sur fond clair */
  --brand-hover: #12E87A;
  --brand-tint: rgba(0, 255, 128, .16);
  --mint: #8FCFBF;
  --mint-2: #DDEFE9;
  --mint-3: #BFE3D8;
  --bg: #EEF2F0;
  --white: #FFFFFF;
  --ink: #10201F;
  --muted: #5B6B69;
  --line: #D5DDDA;
  --line-soft: #F0F3F2;
  --on-teal: rgba(255, 255, 255, .76);

  /* États */
  --ok: #1F6E4F;      --ok-bg: #DDF3E8;
  --warn: #8A5A12;    --warn-bg: #FBEBCF;
  --bad: #B4432E;     --bad-bg: #F8E1DC;
  --neutral: #5B6B69; --neutral-bg: #EEF2F0;

  /* Typographie */
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-h1: clamp(2.125rem, 8.4vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 5.6vw, 2.5rem);
  --fs-h3: 1.0625rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .75rem;
  --fs-col: .625rem;
  --fs-kpi: 2.25rem;
  --lh-tight: 1.05;
  --lh-title: 1.3;
  --lh-body: 1.5;
  --ls-h1: -.03em;
  --ls-h2: -.025em;
  --ls-h3: -.01em;
  --ls-kpi: -.04em;
  --ls-col: .06em;

  /* Espace et rayons */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;
  --r-card: 20px;
  --r-sub: 14px;
  --r-field: 12px;
  --r-chip: 8px;
  --r-pill: 999px;
  --w-landing: 1200px;
  --w-portal: 1160px;
  --w-admin: 1400px;

  /* Ombres (deux seulement) */
  --shadow-card: 0 18px 50px rgba(16, 32, 31, .14);
  --shadow-float: 0 30px 80px rgba(0, 0, 0, .4);
  --shadow-seg: 0 1px 2px rgba(16, 32, 31, .12);

  /* Mouvement */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --t-color: .3s;
  --t-move: .5s;
  --t-reveal: .9s;
  --t-count: .6s;

  /* Composants */
  --btn-h: 50px;
  --btn-h-sm: 46px;
  --btn-h-dense: 42px;
  --field-h: 46px;
  --touch-min: 44px;
  --logo-h: 20px;
  --logo-shift: -2.4px;   /* 12 % de --logo-h : recentre le corps visuel du logo */
}

/* Base */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-h1); }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: var(--ls-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-title); letter-spacing: var(--ls-h3); }
p { margin: 0; text-wrap: pretty; }
em, i { font-style: normal; }                 /* pas d'italique dans l'interface */
.num, td.num, .kpi b, time, output { font-variant-numeric: tabular-nums; }

/* Logo */
.logo img { height: var(--logo-h); width: auto; display: block; position: relative; top: var(--logo-shift); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--btn-h); padding: 0 22px; border-radius: var(--r-pill);
  font: 700 .9375rem/1 var(--font); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform var(--t-move) var(--ease), background var(--t-color), border-color var(--t-color);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-outline { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.14); }
.btn-sm { height: var(--btn-h-sm); padding: 0 18px; font-size: .875rem; }
.btn-dense { height: var(--btn-h-dense); padding: 0 16px; font-size: .875rem; }

/* Cartes */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.card-featured { background: var(--mint-2); border-color: var(--mint-3); }
.card-dark { background: var(--teal); border-color: var(--teal); color: #fff; }
.card-dark .muted { color: var(--on-teal); }
.card-link { transition: transform var(--t-move) var(--ease), box-shadow var(--t-move) var(--ease); }
@media (hover:hover) { .card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); } }
.sub { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sub); padding: 18px; }
.card-dark .sub { border: 0; box-shadow: var(--shadow-float); }
.muted { color: var(--muted); }
.lab { font-size: .6875rem; letter-spacing: var(--ls-col); font-weight: 800; color: var(--muted); text-transform: uppercase; }

/* Puces d'état */
.st { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-pill);
      padding: 3px 9px; font-size: var(--fs-col); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.st-ok      { border-color: var(--mint-3); background: var(--ok-bg); color: var(--ok); }      .st-ok::before { background: #2E9E6F; }
.st-warn    { border-color: #F1D9A8; background: var(--warn-bg); color: var(--warn); }       .st-warn::before { background: var(--warn); }
.st-bad     { border-color: #EFC2B8; background: var(--bad-bg); color: var(--bad); }         .st-bad::before { background: var(--bad); }
.st-neutral { background: var(--neutral-bg); color: var(--neutral); }                        .st-neutral::before { background: var(--neutral); }
.st-win     { border-color: var(--teal); background: var(--teal); color: #fff; }             .st-win::before { background: var(--brand); }

/* Champs */
.field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
.field .hint { margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.field .error { margin-top: 6px; font-size: .75rem; color: var(--bad); }
.input, select.input, textarea.input {
  width: 100%; height: var(--field-h); padding: 0 14px; font: 500 .9375rem var(--font); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-field); outline: none;
  transition: border-color var(--t-color), box-shadow var(--t-color);
}
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.5; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--mint-2); }
.input[aria-invalid="true"] { border-color: var(--bad); }

/* Contrôle segmenté */
.seg { display: inline-flex; background: var(--bg); border-radius: var(--r-chip); padding: 3px; gap: 2px; }
.seg > * { font-size: .6875rem; font-weight: 600; padding: 4px 9px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.seg > [aria-pressed="true"], .seg > .on { background: #fff; color: var(--ink); box-shadow: var(--shadow-seg); }
.card-dark .seg { background: rgba(0,0,0,.28); }
.card-dark .seg > [aria-pressed="true"], .card-dark .seg > .on { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }

/* Curseur */
input[type=range].range { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--teal) var(--p, 50%), var(--mint-2) var(--p, 50%)); outline: none; }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--teal); box-shadow: 0 2px 6px rgba(16,32,31,.18); cursor: pointer; }
input[type=range].range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--teal); cursor: pointer; }
input[type=range].range:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }

/* Tableaux */
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .8125rem; min-width: 520px; }
.table th { text-align: left; font-size: var(--fs-col); letter-spacing: var(--ls-col); color: var(--muted); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table td:first-child { font-weight: 700; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Agenda */
.cal { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cal .day { border-right: 1px solid var(--line); min-height: 220px; padding: 8px; }
.cal .day:last-child { border-right: 0; }
.cal .dh { font-size: .6875rem; font-weight: 700; color: var(--muted); padding: 2px 4px 8px; }
.cal .dh b { color: var(--ink); font-size: .8125rem; margin-left: 4px; }
.ev { background: var(--mint-2); border-left: 3px solid var(--teal); border-radius: var(--r-chip); padding: 7px 8px; margin-bottom: 6px; font-size: .6875rem; line-height: 1.3; }
.ev b { display: block; font-size: .75rem; color: var(--teal); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .cal { grid-template-columns: repeat(5, 1fr); } }

/* Barre de progression (pack) */
.bar { height: 8px; border-radius: var(--r-pill); background: var(--mint-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: var(--r-pill); }

/* Bandeau admin */
.banner-admin { background: var(--teal-3); color: #fff; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 20px; font-size: .875rem; }
.banner-admin strong { color: var(--brand); font-weight: 700; }

/* Squelette de chargement */
.skeleton { background: var(--mint-2); border-radius: var(--r-chip); animation: sk 1.2s var(--ease) infinite alternate; }
@keyframes sk { to { opacity: .45; } }

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