/* Cadran — tableau de bord d'administration (démonstration BinuxLabs).
   Interface précise et dense mais aérée : Inter (chiffres tabulaires), JetBrains Mono pour les identifiants.
   Thème clair et thème sombre (gris bleutés profonds, bleu électrique, touches de violet). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Couleurs : thème clair ---------- */
:root {
  --kit-bg: #f3f5fa;
  --kit-fg: #0d1321;
  --kit-accent: #1f5eff;
  --kit-surface: #ffffff;
  --kit-line: #e3e8f0;
  --kit-muted: #586276;
  --kit-radius: 14px;

  --surface-2: #f7f9fc;
  --surface-3: #edf1f7;
  --ligne-forte: #d2d9e5;
  --texte-2: #343d50;
  --accent-texte: #1d55e8;
  --accent-doux: rgba(31, 94, 255, 0.09);
  --accent-ligne: rgba(31, 94, 255, 0.35);
  --violet: #6d4aff;
  --violet-doux: rgba(109, 74, 255, 0.1);
  --primaire: linear-gradient(135deg, #1f5eff 0%, #5a3cf2 100%);
  --primaire-plein: #2a5df0;
  --danger: #bd2f1c;

  --ok: #0c7240;
  --ok-fond: #e3f5ea;
  --attente: #8a4f06;
  --attente-fond: #fcf0d9;
  --retard: #b42318;
  --retard-fond: #fdeceb;
  --neutre: #4b5568;
  --neutre-fond: #eceff5;

  /* Formules (palette validée : séparation pour les daltonismes, ordre fixe) */
  --s1: #2a78d6;
  --s2: #1baf7a;
  --s3: #6250d6;
  --s4: #eb6834;

  --courbe: #1f5eff;
  --courbe-haut: rgba(31, 94, 255, 0.22);
  --courbe-bas: rgba(31, 94, 255, 0);
  --courbe-prec: #8a94a8;
  --grille: #e8ecf3;

  /* Carte de chaleur : 5 niveaux, couleur du texte assortie (contraste AA) */
  --chaleur-1: #eef3ff;
  --chaleur-2: #d6e2ff;
  --chaleur-3: #a9c1ff;
  --chaleur-4: #3a66e8;
  --chaleur-5: #1c3fae;
  --chaleur-texte-clair: #0d1321;
  --chaleur-texte-fonce: #ffffff;

  --ombre-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.05);
  --ombre-2: 0 18px 40px -18px rgba(16, 24, 40, 0.22), 0 2px 6px rgba(16, 24, 40, 0.04);
  --ombre-3: 0 30px 80px -24px rgba(16, 24, 40, 0.35);
  --halo-1: rgba(31, 94, 255, 0.07);
  --halo-2: rgba(109, 74, 255, 0.05);

  --pad: 22px;
  --pad-cellule: 13px;
  --ecart: 20px;
  --barre-l: 256px;
  --entete-h: 64px;
  --police: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ---------- Couleurs : thème sombre ---------- */
:root[data-theme="dark"] {
  --kit-bg: #090d15;
  --kit-fg: #e8ecf4;
  --kit-accent: #5b8cff;
  --kit-surface: #101624;
  --kit-line: #1d2638;
  --kit-muted: #8d98ae;

  --surface-2: #0d1320;
  --surface-3: #172034;
  --ligne-forte: #2a3550;
  --texte-2: #bcc5d6;
  --accent-texte: #7aa2ff;
  --accent-doux: rgba(91, 140, 255, 0.13);
  --accent-ligne: rgba(91, 140, 255, 0.45);
  --violet: #a48bff;
  --violet-doux: rgba(164, 139, 255, 0.13);
  --primaire: linear-gradient(135deg, #2b62e6 0%, #6a46ee 100%);
  --primaire-plein: #2f63e0;
  --danger: #c0341f;

  --ok: #5ee39a;
  --ok-fond: rgba(52, 211, 120, 0.12);
  --attente: #f8c35a;
  --attente-fond: rgba(245, 180, 40, 0.12);
  --retard: #ff8a80;
  --retard-fond: rgba(248, 90, 80, 0.13);
  --neutre: #aab3c6;
  --neutre-fond: rgba(160, 172, 196, 0.12);

  --s1: #3987e5;
  --s2: #199e70;
  --s3: #9085e9;
  --s4: #d95926;

  --courbe: #5b8cff;
  --courbe-haut: rgba(91, 140, 255, 0.3);
  --courbe-bas: rgba(91, 140, 255, 0);
  --courbe-prec: #6b7690;
  --grille: #1a2234;

  --chaleur-1: #141c2e;
  --chaleur-2: #1a2a4f;
  --chaleur-3: #22418c;
  --chaleur-4: #2f5fd6;
  --chaleur-5: #8fb0ff;
  --chaleur-texte-clair: #e8ecf4;
  --chaleur-texte-fonce: #0a0e16;

  --ombre-1: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --ombre-2: 0 22px 50px -20px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --ombre-3: 0 40px 100px -30px rgba(0, 0, 0, 0.85);
  --halo-1: rgba(70, 120, 255, 0.11);
  --halo-2: rgba(140, 95, 255, 0.08);
}

:root[data-densite="compacte"] {
  --pad: 16px;
  --pad-cellule: 8px;
  --ecart: 14px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--kit-bg);
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--police);
  font-size: 14.5px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss03";
  color: var(--kit-fg);
  background:
    radial-gradient(1100px 520px at 18% -8%, var(--halo-1), transparent 62%),
    radial-gradient(900px 460px at 92% -6%, var(--halo-2), transparent 60%),
    var(--kit-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.015em;
  font-weight: 650;
}
a {
  color: var(--accent-texte);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
img,
svg {
  display: block;
}
.num,
td.num,
.tab {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "cv11";
}
.mono {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: -0.01em;
}
kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--ligne-forte);
  border-bottom-width: 2px;
  background: var(--kit-surface);
  color: var(--kit-muted);
  white-space: nowrap;
}
.ico {
  width: 18px;
  height: 18px;
  flex: none;
}
.discret {
  font-size: 12.5px;
  color: var(--kit-muted);
}
::selection {
  background: var(--accent-doux);
}

/* ---------- Structure ---------- */
.app {
  display: grid;
  grid-template-columns: var(--barre-l) minmax(0, 1fr);
  min-height: 100dvh;
}
.principal {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.contenu {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 26px 32px 48px;
  outline: none;
}

/* ---------- Barre latérale ---------- */
.barre {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 14px 16px;
  border-right: 1px solid var(--kit-line);
  background: color-mix(in srgb, var(--kit-surface) 72%, transparent);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  z-index: 40;
}
.barre__tete {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 6px;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--kit-fg);
  border-radius: 10px;
}
.marque__logo .logo {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 6px 14px rgba(59, 130, 255, 0.35));
}
.marque__nom {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.espace-travail {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--kit-muted);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  white-space: nowrap;
}
.barre__fermer {
  display: none;
}
.barre__recherche {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 8px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--kit-line);
  background: var(--kit-surface);
  color: var(--kit-muted);
  text-align: left;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.barre__recherche:hover {
  border-color: var(--accent-ligne);
  box-shadow: 0 0 0 4px var(--accent-doux);
}
.barre__recherche .raccourci {
  margin-left: auto;
}
.barre__recherche > span:first-child {
  display: inline-flex;
}
.nav ul {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 2px;
}
.nav__titre {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kit-muted);
  padding: 8px 10px 6px;
}
.nav__lien {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--texte-2);
  text-decoration: none;
  font-weight: 520;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.nav__lien > span:first-child {
  display: inline-flex;
}
.nav__lien:hover {
  background: var(--surface-3);
  color: var(--kit-fg);
}
.nav__lien[aria-current="page"] {
  background: var(--accent-doux);
  color: var(--accent-texte);
  font-weight: 620;
}
.nav__lien[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primaire);
}
.nav__compte {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--kit-muted);
  font-variant-numeric: tabular-nums;
}
.nav__compte--alerte:not(:empty) {
  color: var(--retard);
  background: var(--retard-fond);
  padding: 1px 7px;
  border-radius: 999px;
}
.objectif {
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--kit-line);
  background:
    radial-gradient(160px 90px at 100% 0%, var(--violet-doux), transparent 70%),
    radial-gradient(160px 90px at 0% 100%, var(--accent-doux), transparent 70%),
    var(--kit-surface);
}
.objectif__titre {
  font-size: 12px;
  font-weight: 600;
  color: var(--kit-muted);
}
.objectif__valeur {
  margin-top: 4px;
  font-size: 13px;
  color: var(--kit-muted);
  font-variant-numeric: tabular-nums;
}
.objectif__valeur strong {
  font-size: 16px;
  color: var(--kit-fg);
}
.objectif__jauge {
  margin: 10px 0 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.objectif__jauge span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--primaire);
  transform-origin: left;
  transform: scaleX(var(--part, 0));
  transition: transform 1.1s var(--kit-ease);
}
.objectif__note {
  font-size: 12px;
  color: var(--kit-muted);
}
.barre__pied {
  border-top: 1px solid var(--kit-line);
  padding-top: 12px;
}
.moi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 12px;
  color: var(--kit-fg);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.moi:hover {
  background: var(--surface-3);
}
.moi__texte {
  display: grid;
  line-height: 1.3;
  min-width: 0;
}
.moi__texte strong {
  font-size: 13.5px;
  font-weight: 600;
}
.moi__texte small {
  font-size: 12px;
  color: var(--kit-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voile {
  display: none;
}

/* ---------- En-tête ---------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--entete-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  border-bottom: 1px solid var(--kit-line);
  background: color-mix(in srgb, var(--kit-bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
}
.entete__menu {
  display: none;
}
.fil {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--kit-muted);
  min-width: 0;
  white-space: nowrap;
}
.fil [data-fil] {
  color: var(--kit-fg);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fil__sep {
  opacity: 0.6;
}
.entete__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icone-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--kit-line);
  background: var(--kit-surface);
  color: var(--texte-2);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--kit-ease);
}
.icone-btn:hover {
  border-color: var(--ligne-forte);
  color: var(--kit-fg);
}
.icone-btn:active {
  transform: scale(0.96);
}

/* ---------- Cloche et notifications ---------- */
.cloche {
  position: relative;
}
.cloche__pastille {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: #c62f2f;
  border: 2px solid var(--kit-bg);
  transition:
    transform 0.3s var(--kit-ease),
    opacity 0.3s ease;
}
.cloche__pastille:empty {
  transform: scale(0.4);
  opacity: 0;
}
.notifs {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 380px;
  max-width: calc(100vw - 24px);
  border-radius: 16px;
  border: 1px solid var(--kit-line);
  background: var(--kit-surface);
  box-shadow: var(--ombre-3);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.22s ease,
    transform 0.26s var(--kit-ease);
}
.notifs.is-open {
  opacity: 1;
  transform: none;
}
.notifs__tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--kit-line);
}
.notifs__tete h2 {
  font-size: 14.5px;
}
.notifs__liste {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(420px, 60dvh);
  overflow-y: auto;
}
.notif {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}
.notif:hover {
  background: var(--surface-2);
}
.notif__icone {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-doux);
  color: var(--accent-texte);
}
.notif__icone--retard {
  background: var(--retard-fond);
  color: var(--retard);
}
.notif__icone--ok {
  background: var(--ok-fond);
  color: var(--ok);
}
.notif__icone--violet {
  background: var(--violet-doux);
  color: var(--violet);
}
.notif__icone .ico {
  width: 16px;
  height: 16px;
}
.notif__texte {
  font-size: 13.5px;
  line-height: 1.45;
}
.notif__texte small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--kit-muted);
}
.notif--nonlue .notif__texte::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--kit-accent);
  vertical-align: 1px;
}
.notif__lien {
  color: inherit;
  text-decoration: none;
}
.notif__lien:hover strong {
  text-decoration: underline;
}

/* ---------- Boutons et champs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--ligne-forte);
  background: var(--kit-surface);
  color: var(--kit-fg);
  font-weight: 580;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--ombre-1);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s var(--kit-ease),
    filter 0.2s ease;
}
.btn:hover {
  border-color: var(--accent-ligne);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn--primaire {
  border-color: transparent;
  background: var(--primaire);
  color: #fff;
  box-shadow:
    0 10px 24px -12px rgba(48, 92, 255, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primaire:hover {
  border-color: transparent;
  filter: brightness(1.06) saturate(1.05);
  box-shadow:
    0 14px 30px -12px rgba(80, 92, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn--danger {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}
.btn--danger:hover {
  border-color: transparent;
  filter: brightness(1.08);
}
.btn--fantome {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--texte-2);
}
.btn--fantome:hover {
  background: var(--surface-3);
  border-color: transparent;
}
.btn--contour-danger {
  color: var(--retard);
  border-color: color-mix(in srgb, var(--retard) 35%, transparent);
  background: transparent;
  box-shadow: none;
}
.btn--contour-danger:hover {
  background: var(--retard-fond);
  border-color: var(--retard);
}
.btn--large {
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
}
.btn--petit {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 9px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.lien-btn {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--accent-texte);
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
}
.lien-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.champ {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.champ label,
.champ legend,
.etiquette-champ {
  font-size: 13px;
  font-weight: 600;
  color: var(--texte-2);
}
.facultatif {
  font-weight: 450;
  color: var(--kit-muted);
}
input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--ligne-forte);
  background: var(--kit-surface);
  color: var(--kit-fg);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}
select {
  appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--kit-muted) 50%),
    linear-gradient(135deg, var(--kit-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}
input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--kit-muted) 85%, transparent);
}
input:not([type="radio"]):not([type="checkbox"]):hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--kit-accent) 40%, var(--ligne-forte));
}
input:not([type="radio"]):not([type="checkbox"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--kit-accent);
  box-shadow: 0 0 0 4px var(--accent-doux);
}
[aria-invalid="true"] {
  border-color: var(--retard) !important;
  box-shadow: 0 0 0 4px var(--retard-fond) !important;
}
.champ__erreur {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--retard);
}
.champ__erreur .ico {
  width: 14px;
  height: 14px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.grille-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.recherche-champ {
  position: relative;
  min-width: 0;
}
.recherche-champ .ico {
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  color: var(--kit-muted);
  pointer-events: none;
}
.recherche-champ input {
  padding-left: 38px !important;
}

/* Choix de formule (cartes radio) */
.choix-formules__liste {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.choix {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--ligne-forte);
  background: var(--kit-surface);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.choix input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choix__nom {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 620;
  font-size: 13.5px;
}
.choix__prix {
  font-size: 12.5px;
  color: var(--kit-muted);
  font-variant-numeric: tabular-nums;
}
.choix:hover {
  border-color: var(--accent-ligne);
}
.choix:has(input:checked) {
  border-color: var(--kit-accent);
  background: var(--accent-doux);
  box-shadow: 0 0 0 3px var(--accent-doux);
}
.choix:has(input:focus-visible) {
  outline: 2px solid var(--kit-accent);
  outline-offset: 2px;
}

/* ---------- Pastilles (états, formules) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--neutre-fond);
  color: var(--neutre);
}
.badge .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.badge--ok {
  background: var(--ok-fond);
  color: var(--ok);
}
.badge--attente {
  background: var(--attente-fond);
  color: var(--attente);
}
.badge--retard {
  background: var(--retard-fond);
  color: var(--retard);
}
.badge--info {
  background: var(--accent-doux);
  color: var(--accent-texte);
}
.formule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 560;
  white-space: nowrap;
}
.pastille {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
  background: var(--s1);
}
.pastille--equipe {
  background: var(--s2);
}
.pastille--croissance {
  background: var(--s3);
}
.pastille--entreprise {
  background: var(--s4);
}

.avatar {
  --h: 220;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: hsl(var(--h) 72% 93%);
  color: hsl(var(--h) 60% 25%);
}
:root[data-theme="dark"] .avatar {
  background: hsl(var(--h) 32% 20%);
  color: hsl(var(--h) 85% 84%);
}
.avatar--moi {
  border-radius: 50%;
  background: var(--primaire) !important;
  color: #fff !important;
}
.avatar--grand {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 17px;
}

/* ---------- Cartes ---------- */
.carte {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--kit-line);
  background: var(--kit-surface);
  box-shadow: var(--ombre-1);
  padding: var(--pad);
  min-width: 0;
}
.carte__tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.carte__titre {
  font-size: 15px;
  font-weight: 640;
}
.carte__sous {
  margin-top: 2px;
  font-size: 13px;
  color: var(--kit-muted);
}

/* ---------- En-tête de vue ---------- */
.vue-tete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.vue-tete h1 {
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.025em;
  font-weight: 680;
}
.vue-tete__sous {
  margin-top: 4px;
  color: var(--kit-muted);
}
.vue-tete__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.etiquette {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-texte);
}

/* ---------- Transitions entre écrans ---------- */
.motion .vue {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.motion .vue.is-sortie {
  opacity: 0;
  transform: translateY(6px);
}
.motion .vue.is-entree > * {
  animation: kit-rise 0.5s var(--kit-ease) backwards;
}
.motion .vue.is-entree > :nth-child(2) {
  animation-delay: 50ms;
}
.motion .vue.is-entree > :nth-child(3) {
  animation-delay: 100ms;
}
.motion .vue.is-entree > :nth-child(4) {
  animation-delay: 150ms;
}
.motion .vue.is-entree > :nth-child(n + 5) {
  animation-delay: 200ms;
}

/* ---------- Sélecteur segmenté ---------- */
.segment {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-3);
  border: 1px solid var(--kit-line);
  isolation: isolate;
}
.segment__curseur {
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 9px;
  background: var(--kit-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 4px 12px -6px rgba(16, 24, 40, 0.2);
  transition:
    transform 0.38s var(--kit-ease),
    width 0.38s var(--kit-ease);
}
:root[data-theme="dark"] .segment__curseur {
  background: #222c44;
}
.segment label {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--kit-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segment label:has(input:checked) {
  color: var(--kit-fg);
}
.segment label:has(input:focus-visible) {
  outline: 2px solid var(--kit-accent);
  outline-offset: 1px;
}

/* ---------- Vue d'ensemble ---------- */
.indicateurs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ecart);
  margin-bottom: var(--ecart);
}
.kpi {
  display: grid;
  gap: 6px;
  overflow: hidden;
  transition:
    transform 0.3s var(--kit-ease),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre-2);
  border-color: var(--ligne-forte);
}
.kpi__libelle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 560;
  color: var(--kit-muted);
}
.kpi__libelle .ico {
  width: 16px;
  height: 16px;
}
.kpi__valeur {
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "cv11";
  white-space: nowrap;
}
.kpi__pied {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--kit-muted);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 4px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  background: var(--neutre-fond);
  color: var(--neutre);
}
.delta .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}
.delta--bien {
  background: var(--ok-fond);
  color: var(--ok);
}
.delta--mal {
  background: var(--retard-fond);
  color: var(--retard);
}
.kpi__mini {
  margin: 6px calc(var(--pad) * -1) calc(var(--pad) * -1);
  height: 44px;
}
.mini {
  width: 100%;
  height: 100%;
}
.mini__ligne {
  fill: none;
  stroke: var(--courbe);
  stroke-width: 1.75;
  vector-effect: non-scaling-stroke;
}
.mini__stop1 {
  stop-color: var(--courbe);
  stop-opacity: 0.22;
}
.mini__stop2 {
  stop-color: var(--courbe);
  stop-opacity: 0;
}
.kpi--violet .mini__ligne {
  stroke: var(--violet);
}
.kpi--violet .mini__stop1,
.kpi--violet .mini__stop2 {
  stop-color: var(--violet);
}

.grille-ensemble {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--ecart);
}
.grille-ensemble > .large {
  grid-column: 1;
}

/* Grande courbe */
.legende {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--kit-muted);
}
.legende span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legende__trait {
  width: 16px;
  height: 0;
  border-top: 2.5px solid var(--courbe);
  border-radius: 2px;
}
.legende__trait--prec {
  border-top: 2px dashed var(--courbe-prec);
}
.legende .is-cache {
  opacity: 0.35;
}
.revenu-titre {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.revenu-titre strong {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.courbe {
  position: relative;
  height: 300px;
  margin: 0 -6px;
  border-radius: 12px;
  touch-action: pan-y;
}
.courbe:focus-visible {
  outline-offset: 4px;
}
.courbe__svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.courbe__grille line {
  stroke: var(--grille);
  stroke-width: 1;
}
.courbe__grille line.courbe__base {
  stroke: var(--ligne-forte);
}
.courbe__grille text {
  font-size: 11.5px;
  fill: var(--kit-muted);
  font-variant-numeric: tabular-nums;
}
.courbe__stop1 {
  stop-color: var(--courbe);
  stop-opacity: 0.26;
}
.courbe__stop2 {
  stop-color: var(--courbe);
  stop-opacity: 0;
}
.courbe__ligne {
  fill: none;
  stroke: var(--courbe);
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.courbe__precedente {
  fill: none;
  stroke: var(--courbe-prec);
  stroke-width: 1.6;
  stroke-dasharray: 4 5;
  transition: opacity 0.4s ease;
}
.courbe__precedente.is-cache,
.courbe__point.is-cache {
  opacity: 0;
}
.courbe__repere {
  stroke: var(--ligne-forte);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.courbe__point {
  fill: var(--kit-surface);
  stroke: var(--courbe);
  stroke-width: 2.5;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.courbe__point--prec {
  stroke: var(--courbe-prec);
  stroke-width: 2;
}
.is-survol .courbe__repere,
.is-survol .courbe__point:not(.is-cache) {
  opacity: 1;
}
.courbe__axe-x {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 18px;
  font-size: 11.5px;
  color: var(--kit-muted);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.courbe__axe-x.is-in {
  opacity: 1;
}
.courbe__axe-x span {
  position: absolute;
  top: 0;
  translate: -50% 0;
  white-space: nowrap;
}
.courbe__bulle {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--kit-line);
  background: color-mix(in srgb, var(--kit-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--ombre-2);
  font-size: 12.5px;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.16s ease,
    transform 0.12s linear;
}
.courbe__bulle.is-in {
  opacity: 1;
}
.bulle__date {
  color: var(--kit-muted);
  margin-bottom: 6px;
}
.bulle__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}
.bulle__ligne strong {
  font-size: 14px;
}
.bulle__ligne span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.donnees-courbe {
  margin-top: 10px;
}
.donnees-courbe__corps {
  overflow: hidden;
}
.donnees-courbe .tableau-simple {
  margin-top: 10px;
}

/* Anneau */
.anneau {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}
.anneau__graphique {
  position: relative;
  width: 160px;
  height: 160px;
}
.anneau__svg {
  width: 100%;
  height: 100%;
}
.anneau__fond {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 14;
}
.anneau__arc {
  fill: none;
  stroke-width: 14;
  stroke-linecap: butt;
  stroke-dasharray: 0 400;
  transition:
    stroke-dasharray 0.9s var(--kit-ease),
    stroke-dashoffset 0.9s var(--kit-ease),
    opacity 0.25s ease,
    stroke-width 0.25s ease;
  cursor: pointer;
}
.anneau__arc.s1 {
  stroke: var(--s1);
}
.anneau__arc.s2 {
  stroke: var(--s2);
}
.anneau__arc.s3 {
  stroke: var(--s3);
}
.anneau__arc.s4 {
  stroke: var(--s4);
}
.anneau__arc.is-terne {
  opacity: 0.25;
}
.anneau__centre {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.anneau__centre small {
  font-size: 11.5px;
  color: var(--kit-muted);
}
.anneau__centre strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.repartition {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.repartition li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 10px;
  padding: 7px 8px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}
.repartition li:hover,
.repartition li.is-actif {
  background: var(--surface-2);
}
.repartition__nom {
  font-weight: 560;
  font-size: 13.5px;
}
.repartition__valeur {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13.5px;
  text-align: right;
}
.repartition__part {
  grid-column: 2 / 4;
  font-size: 12px;
  color: var(--kit-muted);
  font-variant-numeric: tabular-nums;
}

/* Derniers paiements */
.paiements {
  list-style: none;
  margin: 0;
  padding: 0;
}
.paiement {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--kit-line);
}
.paiement:first-child {
  border-top: 0;
}
.paiement__texte {
  min-width: 0;
}
.paiement__texte strong,
.paiement__texte button {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.paiement__texte small {
  font-size: 12px;
  color: var(--kit-muted);
}
.paiement__montant {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ok);
}

/* Cohortes */
.cohortes-zone {
  overflow-x: auto;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad) 4px;
  scrollbar-width: thin;
}
.cohortes {
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 12px;
  min-width: 640px;
  width: 100%;
}
.cohortes th {
  font-weight: 560;
  color: var(--kit-muted);
  text-align: left;
  white-space: nowrap;
  padding: 2px 8px 2px 0;
}
.cohortes thead th {
  text-align: center;
  padding-bottom: 6px;
}
.cohortes th small {
  display: block;
  font-size: 11px;
  font-weight: 450;
}
.cohortes td {
  height: 34px;
  min-width: 40px;
  border-radius: 7px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  transition:
    transform 0.2s var(--kit-ease),
    box-shadow 0.2s ease;
}
.cohortes td.n1 {
  background: var(--chaleur-1);
  color: var(--chaleur-texte-clair);
}
.cohortes td.n2 {
  background: var(--chaleur-2);
  color: var(--chaleur-texte-clair);
}
.cohortes td.n3 {
  background: var(--chaleur-3);
  color: var(--chaleur-texte-clair);
}
.cohortes td.n4 {
  background: var(--chaleur-4);
  color: #fff;
}
.cohortes td.n5 {
  background: var(--chaleur-5);
  color: var(--chaleur-texte-fonce);
}
:root:not([data-theme="dark"]) .cohortes td.n5 {
  color: #fff;
}
.cohortes td.vide {
  background: transparent;
}
.cohortes td:not(.vide):hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px -6px rgba(16, 24, 40, 0.35);
}
.motion .cohortes.is-in td:not(.vide) {
  animation: kit-fade 0.5s ease backwards;
  animation-delay: calc(var(--k, 0) * 18ms);
}
.chaleur-legende {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--kit-muted);
}
.chaleur-legende i {
  width: 18px;
  height: 10px;
  border-radius: 3px;
}
.chaleur-legende i:nth-of-type(1) {
  background: var(--chaleur-1);
  box-shadow: inset 0 0 0 1px var(--kit-line);
}
.chaleur-legende i:nth-of-type(2) {
  background: var(--chaleur-2);
}
.chaleur-legende i:nth-of-type(3) {
  background: var(--chaleur-3);
}
.chaleur-legende i:nth-of-type(4) {
  background: var(--chaleur-4);
}
.chaleur-legende i:nth-of-type(5) {
  background: var(--chaleur-5);
}

/* ---------- Tableaux ---------- */
.barre-outils {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.barre-outils .recherche-champ {
  flex: 1 1 260px;
  max-width: 380px;
}
.barre-outils select {
  width: auto;
  min-width: 160px;
}
.barre-outils__compte {
  margin-left: auto;
  font-size: 13px;
  color: var(--kit-muted);
  font-variant-numeric: tabular-nums;
}
.carte--tableau {
  padding: 0;
  overflow: hidden;
}
.tableau {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.tableau th {
  position: relative;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--kit-muted);
  padding: 11px var(--pad-cellule) 11px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--kit-line);
  white-space: nowrap;
}
.tableau th:first-child,
.tableau td:first-child {
  padding-left: 20px;
}
.tableau th:last-child,
.tableau td:last-child {
  padding-right: 20px;
}
.tableau td {
  padding: var(--pad-cellule);
  border-bottom: 1px solid var(--kit-line);
  vertical-align: middle;
  font-size: 13.8px;
}
.tableau tbody tr:last-child td {
  border-bottom: 0;
}
.tableau tbody tr {
  transition: background-color 0.18s ease;
}
.tableau tbody tr.cliquable {
  cursor: pointer;
}
.tableau tbody tr:hover {
  background: var(--surface-2);
}
.tableau .droite {
  text-align: right;
}
.tableau .terne {
  color: var(--kit-muted);
}
.tri-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.tri-btn:hover {
  color: var(--kit-fg);
}
.tri-btn .ico {
  width: 13px;
  height: 13px;
  opacity: 0.55;
  transition:
    transform 0.25s var(--kit-ease),
    opacity 0.2s ease;
}
th[aria-sort] .tri-btn {
  color: var(--kit-fg);
}
th[aria-sort] .tri-btn .ico {
  opacity: 1;
}
th[aria-sort="descending"] .tri-btn .ico {
  transform: rotate(180deg);
}
.droite .tri-btn {
  flex-direction: row-reverse;
}
.cellule-client {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cellule-client__texte {
  min-width: 0;
  display: grid;
}
.cellule-client__nom {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-weight: 600;
  color: var(--kit-fg);
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cellule-client__nom:hover {
  color: var(--accent-texte);
}
.cellule-client small {
  font-size: 12.5px;
  color: var(--kit-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.motion .ligne-entree {
  animation: kit-rise 0.42s var(--kit-ease) backwards;
}
.ligne-nouvelle {
  background: var(--accent-doux) !important;
}
.motion .ligne-nouvelle {
  animation: lueur 2.4s ease;
}
@keyframes lueur {
  0% {
    background: color-mix(in srgb, var(--kit-accent) 26%, transparent);
  }
  100% {
    background: var(--accent-doux);
  }
}
.vide-etat {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: var(--kit-muted);
}
.vide-etat strong {
  color: var(--kit-fg);
  font-size: 15px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--kit-line);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--kit-muted);
}
.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--texte-2);
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  display: inline-grid;
  place-items: center;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}
.page-btn:hover:not([disabled]) {
  background: var(--kit-surface);
  border-color: var(--kit-line);
}
.page-btn[aria-current="page"] {
  background: var(--kit-surface);
  border-color: var(--ligne-forte);
  color: var(--kit-fg);
  box-shadow: var(--ombre-1);
}
.page-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}
.page-btn .ico {
  width: 16px;
  height: 16px;
}
.tri-mobile {
  display: none;
}
.tableau-simple {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tableau-simple th,
.tableau-simple td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--kit-line);
  text-align: left;
}
.tableau-simple th {
  color: var(--kit-muted);
  font-weight: 600;
}
.tableau-simple td.num,
.tableau-simple th.num {
  text-align: right;
}

/* Petits indicateurs en ligne (clients, factures) */
.resume {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ecart);
  margin-bottom: var(--ecart);
}
.resume--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.resume .carte {
  padding: 16px 18px;
}
.resume__libelle {
  font-size: 12.5px;
  color: var(--kit-muted);
  font-weight: 560;
}
.resume__valeur {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.resume__note {
  font-size: 12.5px;
  color: var(--kit-muted);
}
.resume__point {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.resume__point--ok {
  background: var(--ok);
}
.resume__point--attente {
  background: var(--attente);
}
.resume__point--retard {
  background: var(--retard);
}

/* ---------- Abonnements ---------- */
.formules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ecart);
  margin-bottom: var(--ecart);
}
.formule-carte {
  display: grid;
  gap: 14px;
  align-content: start;
  overflow: hidden;
  transition:
    transform 0.3s var(--kit-ease),
    box-shadow 0.3s ease;
}
.formule-carte:hover {
  transform: translateY(-3px);
  box-shadow: var(--ombre-2);
}
.formule-carte::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--s1);
}
.formule-carte--equipe::before {
  background: var(--s2);
}
.formule-carte--croissance::before {
  background: var(--s3);
}
.formule-carte--entreprise::before {
  background: var(--s4);
}
.formule-carte__tete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.formule-carte h2 {
  font-size: 17px;
}
.formule-carte__prix {
  font-size: 13px;
  color: var(--kit-muted);
}
.formule-carte__prix strong {
  font-size: 24px;
  color: var(--kit-fg);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.formule-carte dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  margin: 0;
  font-size: 13.5px;
}
.formule-carte dt {
  color: var(--kit-muted);
}
.formule-carte dd {
  margin: 0;
  text-align: right;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.part {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.part span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--s1);
  transform-origin: left;
  transform: scaleX(var(--part, 0));
  transition: transform 0.9s var(--kit-ease);
}
.formule-carte--equipe .part span {
  background: var(--s2);
}
.formule-carte--croissance .part span {
  background: var(--s3);
}
.formule-carte--entreprise .part span {
  background: var(--s4);
}
.formule-carte ul {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--kit-line);
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--texte-2);
}
.formule-carte li {
  display: flex;
  gap: 8px;
  align-items: center;
}
.formule-carte li .ico {
  width: 15px;
  height: 15px;
  color: var(--ok);
}
.grille-abos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: var(--ecart);
}
.changement {
  display: grid;
  gap: 16px;
}
.suggestions {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 228px;
  overflow-y: auto;
}
.suggestion {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  text-align: left;
  transition: background-color 0.2s ease;
}
.suggestion:hover {
  background: var(--surface-2);
}
.suggestion[aria-pressed="true"] {
  background: var(--accent-doux);
  border-color: var(--accent-ligne);
}
.suggestion .avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
}
.suggestion span {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}
.suggestion strong {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion small {
  color: var(--kit-muted);
  font-size: 12px;
}
.mouvements {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mouvement {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--kit-line);
}
.mouvement:first-child {
  border-top: 0;
}
.mouvement__texte {
  font-size: 13.5px;
  min-width: 0;
}
.mouvement__texte small {
  display: block;
  color: var(--kit-muted);
  font-size: 12px;
}
.mouvement__impact {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}
.impact--plus {
  color: var(--ok);
}
.impact--moins {
  color: var(--retard);
}

/* ---------- Réglages ---------- */
.reglages {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.reglages__sommaire {
  position: sticky;
  top: calc(var(--entete-h) + 20px);
  display: grid;
  gap: 2px;
}
.reglages__sommaire a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--texte-2);
  text-decoration: none;
  font-weight: 540;
  transition: background-color 0.2s ease;
}
.reglages__sommaire a:hover {
  background: var(--surface-3);
}
.reglages__sections {
  display: grid;
  gap: var(--ecart);
}
.reglage-section {
  scroll-margin-top: calc(var(--entete-h) + 16px);
}
.reglage-section .formulaire {
  display: grid;
  gap: 16px;
  max-width: 640px;
}
.reglage-ligne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 0;
  border-top: 1px solid var(--kit-line);
}
.reglage-ligne:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.reglage-ligne__texte strong {
  display: block;
  font-weight: 600;
}
.reglage-ligne__texte span {
  font-size: 13px;
  color: var(--kit-muted);
}
.membres {
  list-style: none;
  margin: 0;
  padding: 0;
}
.membre {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--kit-line);
  overflow: hidden;
}
.membre:first-child {
  border-top: 0;
}
.membre__texte {
  min-width: 0;
  display: grid;
  line-height: 1.35;
}
.membre__texte strong {
  font-weight: 600;
}
.membre__texte small {
  color: var(--kit-muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.motion .membre.is-sortie {
  opacity: 0;
  transform: translateX(16px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}
.zone-danger {
  border-color: color-mix(in srgb, var(--retard) 35%, var(--kit-line));
  background:
    linear-gradient(180deg, var(--retard-fond), transparent 70%),
    var(--kit-surface);
}
.enregistre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ok);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.enregistre.is-in {
  opacity: 1;
}
.enregistre .ico {
  width: 14px;
  height: 14px;
}

/* ---------- Fenêtres ---------- */
dialog.kit-dialog {
  border: 1px solid var(--kit-line);
}
:root[data-theme="dark"] dialog.kit-dialog::backdrop {
  background: rgba(2, 4, 10, 0.7);
}
.fenetre {
  max-width: min(640px, calc(100vw - 32px));
}
.fenetre--large {
  max-width: min(820px, calc(100vw - 32px));
}
.fenetre--etroite {
  max-width: min(460px, calc(100vw - 32px));
}
.fenetre__tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 4px;
}
.fenetre__tete h2 {
  font-size: 19px;
}
.fenetre__sous {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--kit-muted);
}
.fenetre__corps {
  display: grid;
  gap: 16px;
  padding: 18px 24px;
}
.fenetre__pied {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--kit-line);
  background: var(--surface-2);
}
.confirmation {
  justify-items: start;
  padding-top: 24px;
}
.confirmation h2 {
  font-size: 18px;
}
.confirmation p {
  color: var(--kit-muted);
}
.confirmation__icone {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--retard-fond);
  color: var(--retard);
}

/* Bienvenue */
.bienvenue {
  max-width: min(520px, calc(100vw - 32px));
  overflow: hidden;
}
.bienvenue__halo {
  position: absolute;
  inset: -40% -20% auto;
  height: 320px;
  background:
    radial-gradient(closest-side at 30% 60%, rgba(59, 130, 255, 0.35), transparent),
    radial-gradient(closest-side at 72% 50%, rgba(139, 92, 246, 0.3), transparent);
  filter: blur(20px);
  pointer-events: none;
}
.motion .bienvenue__halo {
  animation: respirer 7s ease-in-out infinite alternate;
}
@keyframes respirer {
  from {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
  to {
    transform: translateY(14px) scale(1.08);
    opacity: 1;
  }
}
.bienvenue__corps {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 34px 32px 30px;
}
.bienvenue__logo .logo {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 12px 26px rgba(59, 130, 255, 0.45));
}
.bienvenue h2 {
  font-size: 26px;
  letter-spacing: -0.03em;
}
.bienvenue__intro {
  color: var(--texte-2);
}
.bienvenue__astuces {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.bienvenue__astuces li {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--texte-2);
}
.bienvenue__astuces kbd {
  justify-self: start;
}
.bienvenue__puce {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-doux);
  color: var(--accent-texte);
}
.bienvenue__puce .ico {
  width: 16px;
  height: 16px;
}

/* Panneau latéral (fiche client) */
dialog.kit-dialog.panneau {
  margin: 0 0 0 auto;
  width: min(500px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 22px 0 0 22px;
  border-right: 0;
  transform: translateX(48px);
  transition:
    opacity 0.28s ease,
    transform 0.28s var(--kit-ease);
}
dialog.kit-dialog.panneau.is-open {
  transform: none;
}
.panneau__contenu {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.fiche__tete {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 22px 22px 18px;
  background: color-mix(in srgb, var(--kit-surface) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--kit-line);
}
.fiche__tete h2 {
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fiche__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--kit-muted);
}
.fiche__corps {
  display: grid;
  gap: 22px;
  padding: 20px 22px 28px;
}
.fiche__section h3 {
  font-size: 13px;
  font-weight: 650;
  color: var(--kit-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.fiche__chiffres {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fiche__chiffre {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--kit-line);
}
.fiche__chiffre small {
  display: block;
  font-size: 12px;
  color: var(--kit-muted);
}
.fiche__chiffre strong {
  font-size: 16px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.fiche__formule {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.fiche__formule .champ {
  flex: 1;
}
.coordonnees {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 13.8px;
}
.coordonnees li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.coordonnees .ico {
  width: 16px;
  height: 16px;
  color: var(--kit-muted);
}
.note-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.historique {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--kit-line);
  border-radius: 12px;
  overflow: hidden;
}
.historique li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--kit-line);
  font-size: 13.5px;
}
.historique li:first-child {
  border-top: 0;
}
.historique small {
  display: block;
  color: var(--kit-muted);
  font-size: 12px;
}
.historique .montant {
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.historique__btn {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: inherit;
  border-radius: 4px;
}
.historique__btn:hover .mono {
  color: var(--accent-texte);
  text-decoration: underline;
}
.fiche__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--kit-line);
}

/* Palette de commandes */
dialog.kit-dialog.palette {
  margin: 12vh auto auto;
  max-width: min(640px, calc(100vw - 24px));
  border-radius: 18px;
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
}
dialog.kit-dialog.palette.is-open {
  transform: none;
}
.palette__champ {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--kit-line);
}
.palette__champ > span {
  color: var(--kit-muted);
  display: inline-flex;
}
.palette__champ input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 52px !important;
  padding: 0 !important;
  font-size: 16px;
  outline: none;
}
.palette__liste {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: min(420px, 55dvh);
  overflow-y: auto;
  scroll-padding: 8px;
}
.palette__groupe {
  padding: 10px 10px 4px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kit-muted);
}
.palette__option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 11px;
  cursor: pointer;
  color: var(--texte-2);
  transition: background-color 0.12s ease;
}
.palette__option .ico {
  color: var(--kit-muted);
}
.palette__option small {
  margin-left: auto;
  font-size: 12px;
  color: var(--kit-muted);
  white-space: nowrap;
}
.palette__option[aria-selected="true"] {
  background: var(--accent-doux);
  color: var(--kit-fg);
}
.palette__option[aria-selected="true"] .ico {
  color: var(--accent-texte);
}
.palette__option .avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 10.5px;
}
.palette__vide {
  padding: 26px 12px;
  text-align: center;
  color: var(--kit-muted);
}
.palette__pied {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--kit-line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--kit-muted);
}
.palette__pied kbd {
  margin-right: 3px;
}
.motion .palette__liste.is-maj > * {
  animation: kit-fade 0.22s ease backwards;
}

/* Facture (aperçu et impression) */
.facture {
  padding: 30px 32px;
  display: grid;
  gap: 24px;
}
.facture__tete {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.facture__emetteur {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.facture__emetteur .logo {
  width: 40px;
  height: 40px;
}
.facture__emetteur p,
.facture__client p {
  font-size: 13px;
  color: var(--kit-muted);
}
.facture__emetteur strong,
.facture__client strong {
  display: block;
  color: var(--kit-fg);
  font-size: 15px;
}
.facture__numero {
  text-align: right;
}
.facture__numero h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.facture__numero p {
  font-size: 13px;
  color: var(--kit-muted);
}
.facture__infos {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--kit-line);
}
.facture__infos small {
  display: block;
  font-size: 12px;
  color: var(--kit-muted);
}
.facture__lignes {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.facture__lignes th {
  text-align: left;
  font-size: 12px;
  color: var(--kit-muted);
  font-weight: 600;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--kit-line);
}
.facture__lignes td {
  padding: 12px 0;
  border-bottom: 1px solid var(--kit-line);
}
.facture__lignes .num {
  text-align: right;
}
.facture__totaux {
  margin-left: auto;
  width: min(300px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.facture__totaux dt {
  color: var(--kit-muted);
}
.facture__totaux dd {
  margin: 0;
  text-align: right;
}
.facture__totaux .total {
  padding-top: 10px;
  border-top: 1px solid var(--kit-line);
  font-size: 17px;
  font-weight: 700;
  color: var(--kit-fg);
}
.facture__mentions {
  font-size: 12px;
  color: var(--kit-muted);
}
.zone-impression {
  display: none;
}

/* ---------- Pied de page ---------- */
.pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 32px 90px;
  border-top: 1px solid var(--kit-line);
  font-size: 13px;
  color: var(--kit-muted);
}
.pied p:first-child {
  color: var(--texte-2);
}
.pied a {
  color: var(--accent-texte);
  font-weight: 600;
  text-underline-offset: 3px;
}
.pied__note {
  flex-basis: 100%;
  order: 3;
  font-size: 12.5px;
}
.pied .signe-binuxlabs {
  opacity: 1;
  color: var(--kit-muted);
}
.pied .signe-binuxlabs a {
  color: var(--kit-fg);
}

/* ---------- Page introuvable ---------- */
.introuvable {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 18px;
  padding: 8vh 16px;
}
.introuvable__cadran {
  width: min(260px, 70vw);
  height: auto;
}
.introuvable__cadran .arc {
  fill: none;
  stroke: var(--grille);
  stroke-width: 10;
  stroke-linecap: round;
}
.introuvable__cadran .arc-plein {
  fill: none;
  stroke: url(#intro-deg);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}
.motion .introuvable__cadran .arc-plein {
  animation: tracer 1.6s 0.2s var(--kit-ease) forwards;
}
:root:not(.motion) .introuvable__cadran .arc-plein {
  stroke-dashoffset: 120;
}
@keyframes tracer {
  to {
    stroke-dashoffset: 120;
  }
}
.introuvable__cadran .aiguille {
  stroke: var(--kit-fg);
  stroke-width: 5;
  stroke-linecap: round;
  transform-origin: 130px 130px;
  transform: rotate(-58deg);
}
.motion .introuvable__cadran .aiguille {
  animation: osciller 3.2s ease-in-out infinite alternate;
}
@keyframes osciller {
  from {
    transform: rotate(-70deg);
  }
  to {
    transform: rotate(-40deg);
  }
}
.introuvable__cadran .moyeu {
  fill: var(--kit-fg);
}
.introuvable__cadran text {
  fill: var(--kit-muted);
  font-size: 13px;
  font-family: var(--mono);
}
.introuvable h1 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}
.introuvable p {
  max-width: 460px;
  color: var(--kit-muted);
}
.introuvable__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Écrans moyens ---------- */
@media (max-width: 1240px) {
  .indicateurs,
  .formules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grille-ensemble,
  .grille-abos {
    grid-template-columns: minmax(0, 1fr);
  }
  .anneau {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

/* ---------- Tablette et téléphone : la barre latérale devient un menu qui glisse ---------- */
@media (max-width: 960px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .barre {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    height: 100dvh;
    background: var(--kit-surface);
    box-shadow: var(--ombre-3);
    transform: translateX(-104%);
    visibility: hidden;
    transition:
      transform 0.34s var(--kit-ease),
      visibility 0s linear 0.34s;
    z-index: 70;
  }
  .barre.is-open {
    transform: none;
    visibility: visible;
    transition:
      transform 0.34s var(--kit-ease),
      visibility 0s;
  }
  .barre__fermer {
    display: inline-grid;
  }
  .espace-travail {
    display: none;
  }
  .barre__fermer {
    margin-left: auto;
  }
  .voile {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(6, 8, 16, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .voile.is-in {
    opacity: 1;
  }
  .entete__menu {
    display: inline-grid;
  }
  .entete,
  .contenu {
    padding-left: 20px;
    padding-right: 20px;
  }
  .pied {
    padding-left: 20px;
    padding-right: 20px;
  }
  .reglages {
    grid-template-columns: minmax(0, 1fr);
  }
  .reglages__sommaire {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }
  .reglages__sommaire a {
    white-space: nowrap;
    background: var(--surface-3);
  }
  .resume {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Téléphone : tableaux en cartes, cibles de 44 px ---------- */
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  .contenu {
    padding: 18px 16px 40px;
  }
  .entete {
    padding: 0 12px;
    gap: 8px;
  }
  .fil__racine,
  .fil__sep {
    display: none;
  }
  .icone-btn,
  .kit-theme {
    width: 44px;
    height: 44px;
  }
  .btn {
    min-height: 44px;
  }
  .btn--petit {
    min-height: 40px;
  }
  .nav__lien {
    height: 46px;
  }
  .page-btn {
    min-width: 44px;
    height: 44px;
  }
  .segment {
    display: flex;
    width: 100%;
  }
  .segment label {
    flex: 1;
    min-height: 40px;
    padding: 0 6px;
    font-size: 13px;
  }
  .vue-tete__actions {
    width: 100%;
  }
  .vue-tete__actions .btn {
    flex: 1;
  }
  .indicateurs {
    gap: 12px;
  }
  .kpi {
    padding: 14px;
    --pad: 14px;
  }
  .kpi__valeur {
    font-size: 21px;
  }
  .kpi__libelle {
    font-size: 12.5px;
  }
  .kpi__pied .kpi__contexte {
    display: none;
  }
  .courbe {
    height: 230px;
  }
  .anneau {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
  .repartition {
    width: 100%;
  }
  .barre-outils .recherche-champ {
    flex-basis: 100%;
    max-width: none;
  }
  .barre-outils select {
    flex: 1 1 140px;
    min-width: 0;
    min-height: 44px;
  }
  .barre-outils__compte {
    margin-left: 0;
    flex-basis: 100%;
  }
  .tri-mobile {
    display: block;
    flex: 1 1 140px;
  }
  .carte--tableau {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .tableau thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .tableau,
  .tableau tbody {
    display: block;
  }
  .tableau tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--kit-line);
    border-radius: 16px;
    background: var(--kit-surface);
    box-shadow: var(--ombre-1);
  }
  .tableau tbody tr:hover {
    background: var(--kit-surface);
  }
  .tableau td,
  .tableau td:first-child,
  .tableau td:last-child {
    display: block;
    padding: 0;
    border: 0;
  }
  .tableau td[data-libelle]::before {
    content: attr(data-libelle);
    display: block;
    font-size: 11.5px;
    font-weight: 560;
    color: var(--kit-muted);
    margin-bottom: 1px;
  }
  .tableau td.pleine {
    grid-column: 1 / -1;
  }
  .tableau td.cache-mobile {
    display: none;
  }
  .tableau .droite {
    text-align: left;
  }
  .tableau td.coin {
    justify-self: end;
    align-self: start;
  }
  .pagination {
    border: 1px solid var(--kit-line);
    border-radius: 14px;
    padding: 10px 12px;
    justify-content: center;
  }
  .grille-2,
  .resume--3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .choix-formules__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .formules {
    grid-template-columns: minmax(0, 1fr);
  }
  .fenetre__tete,
  .fenetre__corps,
  .fenetre__pied {
    padding-left: 18px;
    padding-right: 18px;
  }
  .fenetre__pied .btn {
    flex: 1;
  }
  dialog.kit-dialog.panneau {
    border-radius: 0;
    width: 100vw;
  }
  .fiche__tete {
    padding: 16px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .fiche__tete .avatar--grand {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }
  .fiche__corps {
    padding: 18px 16px 28px;
  }
  .facture {
    padding: 22px 18px;
  }
  .facture__infos {
    grid-template-columns: 1fr 1fr;
  }
  .facture__numero {
    text-align: left;
  }
  .membre {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }
  .membre .badge {
    grid-column: 2;
    justify-self: start;
  }
  .membre .btn {
    grid-row: 1;
    grid-column: 3;
  }
  .reglage-ligne {
    grid-template-columns: minmax(0, 1fr);
  }
  .palette__pied {
    display: none;
  }
  dialog.kit-dialog.palette {
    margin-top: 10px;
  }
  .notifs {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--entete-h) + 6px);
    width: auto;
    max-width: none;
  }
  .pied {
    padding-bottom: 96px;
  }
}

@media (max-width: 400px) {
  .resume {
    grid-template-columns: minmax(0, 1fr);
  }
  .kpi__valeur {
    font-size: 19px;
  }
}

/* ---------- Compléments de l'application ---------- */
.motion .fondu-maj {
  animation: kit-fade 0.35s ease;
}
.champ__erreur {
  transition: opacity 0.2s ease;
}
.champ__erreur.is-sortie {
  opacity: 0;
}
.lien-nu {
  display: block;
  max-width: 100%;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
}
.lien-nu:hover {
  color: var(--accent-texte);
  text-decoration: underline;
  text-underline-offset: 3px;
}
td .lien-nu.mono {
  font-weight: 600;
  color: var(--kit-fg);
}
td .lien-nu.mono:hover {
  color: var(--accent-texte);
}
.mouvement__texte .lien-nu {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lien-discret {
  color: var(--accent-texte);
  font-weight: 600;
  text-underline-offset: 3px;
}
.page-ellipse {
  min-width: 22px;
  text-align: center;
  color: var(--kit-muted);
}
.pagination__position {
  padding: 0 8px;
  color: var(--texte-2);
}
.icone-btn--petit {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.icone-btn--petit .ico {
  width: 16px;
  height: 16px;
}
.tableau .fort {
  font-weight: 620;
}
.tableau .texte-retard {
  color: var(--retard);
  font-weight: 600;
}
@media (min-width: 761px) {
  .tableau--clients td:nth-child(2) {
    width: 1%;
  }
}
.voile[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .tableau thead {
    display: block;
    top: 0;
    left: 0;
  }
}
.fiche__identite {
  min-width: 0;
}
.fiche__identite h2 {
  white-space: nowrap;
}
.note-pied__actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.fiche__impact {
  margin-top: 8px;
}
.formulaire__pied {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.impact-texte {
  font-size: 13.5px;
  color: var(--texte-2);
  line-height: 1.6;
  min-height: 44px;
}
.impact-texte .formule {
  font-weight: 620;
}
.mouvement .notif__icone {
  width: 32px;
  height: 32px;
}
.facture-fenetre {
  position: relative;
}
.facture-fenetre__fermer {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}
.facture-fenetre .facture__tete {
  padding-right: 44px;
}
.facture__etat {
  margin-top: 6px;
}
.notifs .vide-etat {
  padding: 28px 12px;
}
.reglages__sommaire a[aria-current] {
  background: var(--accent-doux);
  color: var(--accent-texte);
  font-weight: 620;
}
.membre {
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}
.segment {
  flex: none;
}

/* Page 404 autonome */
.page-simple {
  display: flex;
  flex-direction: column;
}
.page-simple .contenu {
  display: grid;
  place-items: center;
}
.entete--simple .marque__svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 6px 14px rgba(59, 130, 255, 0.35));
}

@media (max-width: 760px) {
  .note-pied {
    flex-wrap: wrap;
  }
  .paiement__texte .lien-nu {
    min-height: 24px;
  }
  .formulaire__pied .btn {
    flex: 1 1 auto;
  }
  .reglage-ligne .segment {
    width: 100%;
  }
  .fiche__formule {
    flex-wrap: wrap;
  }
  .fiche__formule .btn {
    flex: 1;
  }
}

/* Boutons propres au téléphone : masqués sur grand écran (le sélecteur l'emporte sur .icone-btn). */
.barre .barre__fermer,
.entete .entete__menu {
  display: none;
}
@media (max-width: 960px) {
  .barre .barre__fermer,
  .entete .entete__menu {
    display: inline-grid;
  }
}

/* Anneau : dans la colonne étroite, le graphique passe au-dessus de sa légende. */
.anneau {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}
.anneau .repartition {
  width: 100%;
}
@media (max-width: 1240px) and (min-width: 761px) {
  .anneau {
    grid-template-columns: 180px minmax(0, 1fr);
    justify-items: stretch;
  }
}
.formule-carte__prix small {
  display: block;
  margin-top: 2px;
}
.changement .choix-formules__liste {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* L'attribut hidden l'emporte toujours sur les display des composants. */
[hidden] {
  display: none !important;
}
.fiche__formule .btn {
  min-height: 42px;
}
.facture__totaux {
  column-gap: 0;
}
.facture__totaux dd {
  padding-left: 16px;
}
@media (max-width: 760px) {
  .fiche__formule .champ {
    flex: 1 1 100%;
  }
}
/* Point « non lu » placé devant le titre de la notification. */
.notif--nonlue .notif__texte::before {
  display: none;
}
.notif--nonlue .notif__lien strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--kit-accent);
  vertical-align: 2px;
}
.notif__lien strong {
  display: block;
}
