/* =============================================================================
   refonte.css — Nouveau design (« Corbel », DESIGN.md v11 ; maquettes validées le 26/10/2026 dans design-mockups/)
   Chargée APRÈS socle / ecrans / finitions (et le CSS propre à une page) : elle l'emporte à sélecteur égal.
   Livraison écran par écran (choix de l'utilisateur) :
     1. Jetons, police Urbanist locale, fond, ancienne palette réalignée sur le bleu nuit
     2. Cadre : en-tête à onglets, dock (ordinateur, tablette), barre d'onglets iPhone, menu ☰, bandeau « Voir comme »
     3. Composants communs restylés (boutons, cartes, indicateurs, tableaux, champs, onglets, badges, notifications)
     4. Écrans refaits : tableau de bord
   Mouvement : static/js/cadre.js (Mouvement). Graphiques : static/js/courbes.js.
   ============================================================================= */

@font-face {
  font-family: "Urbanist Variable";
  src: url("../fonts/urbanist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* =============================================================================
   1. Jetons (DESIGN.md § 4.2) et ancienne palette réalignée
   ============================================================================= */
:root {
  --font: "Urbanist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --glass-2: #ffffffc7;
  --glass-3: #fffffff0;

  --surface-2: #ffffff8c;

  --line-2: #2727572b;

  --navy: #272757;
  --navy-deep: #0f0e44;
  --navy-mid: #50507e;
  --navy-soft: #8686a9;
  --navy-wash: #e7e7eb;

  --primary-2: #8686a9;

  --tile-tint-1: #e2e2de;
  --tile-tint-2: #d2d2cd;

  --up-on-ink: #8fe3c4;    --up-soft-on-ink: #8fe3c429;
  --down-on-ink: #ffb3a1;  --down-soft-on-ink: #ffb3a129;

  --c1: #272757;  --c2: #b6b6cb;  --c3: #50507e;  --c4: #8686a9;  --c5: #d5d5e1;
  --an-wash: color-mix(in srgb, var(--c1) 40%, var(--surface));

  --r-xs: 8px;        --r-pill: 999px;

  --shadow-pop: 0 24px 60px -18px #27275757, 0 2px 6px #27275714;

  --gut: clamp(16px, 1.6vw, 28px);
  --app-max: 1840px;
  --dock-x: 20px;  --dock-w: 60px;
  --gap: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Ancienne palette (écrans pas encore refaits) : mêmes noms, valeurs du nouveau design */
  --couleur-bleu-nuit: #0f0e44;
  --couleur-bleu: #272757;
  --couleur-bleu-clair: #50507e;

  --couleur-gris: #616177;
  --couleur-gris-clair: #b6b6cb;
  --surface-0: #fcfcfb;
  --surface-1: #f6f6f4;

  --fonte: var(--font);
  --rayon-sm: 10px;
  --rayon-md: 14px;
  --rayon-lg: 22px;

  --couleur-accent: #272757;
}
@media (max-width: 1100px) { :root { --gap: 12px; } }
@media (max-width: 560px)  { :root { --gap: 10px; --gut: 14px; } }

html, html:has(body) { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Champs de saisie : pas de contour (Safari l'affiche dès qu'un champ est activé) ; leur propre focus suffit */
input:not([type="checkbox"]):not([type="radio"]):focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
.evitement { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--pill); color: var(--on-pill); padding: 10px 16px; border-radius: var(--r-pill); }
.evitement:focus { top: 12px; }
.sans-transition, .sans-transition * { transition: none !important; }

/* Halos flous du fond (effet « verre ») */
.halos { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.halos span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .95; }
.halos span:nth-child(1) { width: 55vw; height: 55vw; left: -12vw; top: -18vw; background: #e1e1de; }
.halos span:nth-child(2) { width: 50vw; height: 50vw; right: -10vw; bottom: -20vw; background: #f9f9f7; }
.halos span:nth-child(3) { width: 40vw; height: 40vw; right: 5vw; top: -15vw; background: #e6e6e3; }

/* =============================================================================
   2. Cadre : conteneur, en-tête, dock, barre d'onglets iPhone, menu ☰
   ============================================================================= */

@media (max-width: 1080px) { .app { padding-left: var(--gut); padding-bottom: 110px; } }
@media (max-width: 768px)  { .app { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); } }
.app .contenu { margin: 0; min-height: 0; display: block; }
.app .page { padding: 0;  margin: 0; }

/* En-tête : marque | onglets à pilule glissante | outils */
.entete { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "marque onglets outils"; align-items: center; gap: 16px; margin-bottom: 24px; }
.marque { grid-area: marque; display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.marque img { width: 40px; height: 40px; border-radius: 13px; flex: none; }

@property --bord-g { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --bord-d { syntax: "<length>"; inherits: false; initial-value: 0px; }

.rond { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--rim), inset 0 0 0 1px var(--line-2); color: var(--text); cursor: pointer; transition: background-color .2s, transform .12s var(--ease); }
.rond svg { width: 18px; height: 18px; }
.rond:active { transform: scale(.96); }

@media (hover: hover) and (pointer: fine) {
  .nav-onglet:hover, a.dock__bouton:hover, a.feuille__lien:hover, a.barre-onglets__lien:hover, a.marque:hover { text-decoration: none; }   /* pas de soulignement (règle a:hover de socle.css) */
  .rond:hover { background: var(--glass-3); }
}

@media (max-width: 1080px) {
  .entete { grid-template-columns: 1fr auto; grid-template-areas: "marque outils" "onglets onglets"; row-gap: 14px; }
}
@media (max-width: 768px) {    .entete { margin-bottom: 18px; } }

/* Dock : pages secondaires et outils ; s'élargit au survol pour montrer les noms (rectangle aux coins de 30 px) */

/* Barre d'onglets iPhone (≤ 768 px) : pilule bleu nuit très foncée, pastille qui glisse, bouton « + » rond */
.barre-onglets { display: none; }
@media (max-width: 768px) {
  .barre-onglets { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; width: min(calc(100% - 24px), 440px); }
  .barre-onglets__capsule { position: relative; flex: 1 1 0; min-width: 0; display: flex;  padding: 5px; transition: flex-grow .45s var(--ease-drawer), flex-basis .45s var(--ease-drawer); border-radius: var(--r-pill);  box-shadow: inset 0 0 0 1px #ffffff1f, 0 0 0 1px #0b0a3340, 0 18px 40px -10px #0b0a33a6; }
  .barre-onglets__pastille { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 5); border-radius: var(--r-pill);  transform: translateX(calc(var(--index, 0) * 100%)); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), width .45s var(--ease-drawer); }
  .barre-onglets__capsule.sans-transition .barre-onglets__pastille { transition: none; }
  .barre-onglets__lien { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 2px; color: var(--on-pill);  font-size: 10px; font-weight: 600; white-space: nowrap; text-decoration: none; -webkit-user-select: none; user-select: none; transition: opacity .2s, flex-grow .45s var(--ease-drawer), transform .12s var(--ease); }
  .barre-onglets__lien span { max-height: 14px; transition: opacity .2s, max-height .3s var(--ease-drawer); }
  .barre-onglets__lien svg { width: 20px; height: 20px; }
  .barre-onglets__lien.actif { opacity: 1; }
  .barre-onglets__ajout { flex: none;   display: grid; place-items: center; border: 0; border-radius: 50%;  color: var(--on-pill); box-shadow: inset 0 0 0 1px #ffffff1f, 0 0 0 1px #0b0a3340, 0 18px 40px -10px #0b0a33a6; transition: transform .12s var(--ease); }
  .barre-onglets__ajout svg { width: 22px; height: 22px; }
  .barre-onglets__ajout:active, .barre-onglets__lien:active { transform: scale(.95); }
  .barre-onglets__ajout { margin-left: auto; }                          /* reste à droite quand la barre se replie */
  /* Repliée au défilement (cadre.js, body.barre-reduite) : un rond sur l'onglet actif, de la taille du « + » */
  body.barre-reduite .barre-onglets__capsule {   padding: 5px; }
  body.barre-reduite .barre-onglets__lien:not(.actif) { padding: 0; }
  body.barre-reduite .barre-onglets__lien:not(.actif) { flex-grow: 0; opacity: 0; pointer-events: none; }
  body.barre-reduite .barre-onglets__lien span { opacity: 0; max-height: 0; }
  body.barre-reduite .barre-onglets__pastille { width: calc(100% - 10px); transform: none; }
}

/* Menu ☰ (iPhone) : feuille qui monte du bas, avec les pages du dock */
.voile { position: fixed; inset: 0; z-index: 60; background: #0f0e4433; opacity: 0; pointer-events: none; transition: opacity .2s; }
.feuille { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 86dvh; overflow-y: auto; padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: var(--surface); box-shadow: var(--shadow-pop); transform: translateY(105%); transition: transform .38s cubic-bezier(.32, .72, 0, 1); overscroll-behavior: contain; visibility: hidden; }

/* Bandeau « Voir comme » */
.bandeau-vue { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 10px 10px 12px; border: 0; border-radius: var(--r); background: var(--pill); color: var(--on-pill); font-size: 13.5px; box-shadow: var(--shadow-pop); }
.bandeau-vue__avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #ffffff24; color: var(--on-pill); font-size: 11px; font-weight: 700; flex: none; }
.bandeau-vue > span:nth-child(2) { flex: 1; min-width: 200px; }
.bandeau-vue b { font-weight: 700; color: var(--on-pill); }   /* l'ancien bandeau doré le mettait en brun (finitions.css) */
.bandeau-vue .btn.bandeau-vue__retour { background: #ffffff1f; color: var(--on-pill); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .bandeau-vue .btn.bandeau-vue__retour:hover { background: #ffffff38; } }

/* =============================================================================
   3. Composants communs restylés (tous les écrans)
   ============================================================================= */

/* En-tête de page et titres */
.page__entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 48px; margin: 0 0 20px; padding: 0; border: 0; }
@media (max-width: 640px) { .page__entete { align-items: stretch; } }   /* en colonne : titre à gauche, actions pleine largeur (27/10/2026) */
.page__titre, .titre-page { font-size: clamp(28px, 2.6vw, 38px); font-weight: 600; line-height: 1.04; letter-spacing: -.025em; color: var(--text); margin: 0; }
.page__sous-titre { font-size: 13.5px;  margin-top: 6px; }
.page__salut { font-size: 15px;  margin: 0 0 4px; }
.page__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--r-pill);
  background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
  cursor: pointer; transition: background-color .2s, color .2s, transform .12s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[disabled] { background: var(--well); color: var(--faint); box-shadow: none; cursor: default; transform: none; }

.btn--secondaire { background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--fantome { background: transparent; box-shadow: none; color: var(--muted); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--sm svg { width: 14px; height: 14px; }
.btn--icone { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--faint); }
.btn--icone svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  .btn--fantome:not(:disabled):hover, .btn--icone:not(:disabled):hover {  color: var(--text); }
  .btn--danger:not(:disabled):hover { background: #963521; color: #fff; }
  .btn--icone-danger:not(:disabled):hover { background: var(--down-soft); color: var(--down); }
}
@media (pointer: coarse) { .btn:not(.btn--icone):not(.btn--sm) { height: 44px; } }

/* Cartes */
.carte { border: 0; border-radius: var(--r-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); padding: 22px 24px; }
.carte__titre {   color: var(--text); letter-spacing: 0; text-transform: none; }
@media (max-width: 560px) { .carte { padding: 16px; border-radius: var(--r); } }
@media (hover: hover) and (pointer: fine) { .carte:hover { box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); transform: none; } }

/* Indicateurs (ancienne .kpi-card) : tuiles aux tons du template, la 1re en bleu nuit */
.kpi-card { position: relative; border: 0; border-radius: var(--r);   padding: 18px 20px 16px; color: var(--text); }

.kpi-card__label {   color: var(--muted); text-transform: none; letter-spacing: 0; }
.kpi-card__valeur { font-size: 26px;  line-height: 1.1; letter-spacing: -.025em; color: inherit; }
.kpi-card__note { font-size: 12.5px; color: var(--faint); }
.kpi-grille > .kpi-card:nth-child(1) { background: var(--tile-ink); box-shadow: none; color: #f3f7f8; }
.kpi-grille > .kpi-card:nth-child(1) .kpi-card__label, .kpi-grille > .kpi-card:nth-child(1) .kpi-card__note { color: #f3f7f8c7; }
.kpi-grille > .kpi-card:nth-child(4n+2) { background: var(--tile-white); }
.kpi-grille > .kpi-card:nth-child(4n+3) { background: var(--tile-tint-1); box-shadow: none; }
.kpi-grille > .kpi-card:nth-child(4n+4) { background: var(--tile-tint-2); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .kpi-card:hover { transform: none; } a.kpi-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-lift); } }
@media (max-width: 560px) { .kpi-card { padding: 14px 16px; } .kpi-card__valeur { font-size: 22px; } }

/* Tableaux */
.table-conteneur { border: 0;  background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); overflow-x: auto; overflow-y: hidden; }   /* défile au lieu de couper les colonnes (break-ui du 26/10/2026) */
.table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.table thead th {     text-transform: none; letter-spacing: 0;    }
   /* colonne triée : l'ancienne règle la mettait en blanc */
@media (hover: hover) and (pointer: fine) {  }

.table td { border-bottom: 1px solid var(--line); background-color: transparent; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr, .table tbody tr:nth-child(even) { background: transparent; }
.table tfoot td, .table .ligne-total td {    border-bottom: 0; }
@media (hover: hover) and (pointer: fine) {  }
.lien-discret { color: inherit; }
@media (hover: hover) and (pointer: fine) { .lien-discret:hover { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; } }

/* Champs */
.input, .select {
  height: 40px; padding: 0 14px;
  border: 0; border-radius: var(--r-sm);

  color: var(--text); font: inherit; font-size: 13.5px;
  transition: box-shadow .2s;
}
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus { outline: none; border: 0; box-shadow: inset 0 0 0 1.5px var(--text); }
.input--sm, .select--sm { height: 34px; font-size: 13px; }
input[type="search"].input { border-radius: var(--r-pill); }
@media (pointer: coarse) { .input, .select { height: 44px; font-size: 16px; } }

/* Barre de filtres : plus de cadre, une simple rangée */
.filter-bar { border: 0; background: transparent; box-shadow: none; padding: 0; margin-bottom: var(--gap); }

/* Onglets des pages (contrôle segmenté) */
.onglets { display: inline-flex; gap: 2px; padding: 3px; border: 0; border-radius: var(--r-pill);   }
.onglet { height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: color .2s, background-color .2s, box-shadow .2s; }
.onglet.actif, .onglet[aria-selected="true"] {   box-shadow: var(--shadow-seg); }

/* Badges, pastille de marge, barres dans les tableaux */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge--type-srv, .badge--type-dis, .badge--type-mixte { gap: 6px; padding-left: 8px; background: var(--well); color: var(--text); }
.badge--type-srv::before, .badge--type-dis::before, .badge--type-mixte::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.badge--type-srv::before { background: var(--type-srv); }
.badge--type-dis::before { background: var(--type-dis); }
.badge--type-mixte::before { background: var(--type-mixte); box-shadow: inset 0 0 0 1px #27275714; }
.pastille-marge { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pastille-marge--vert { color: var(--up); background: var(--up-soft); }
.pastille-marge--orange { color: var(--warn); background: var(--warn-soft); }
.pastille-marge--rouge { color: var(--down); background: var(--down-soft); }
.barre-inline__piste { height: 6px; border-radius: var(--r-pill); background: var(--well); }
.barre-inline__remplissage { border-radius: var(--r-pill); background: var(--an-wash); }
tr:first-child .barre-inline__remplissage { background: var(--c1); }

/* Notifications : pilule bleu nuit, en bas à droite (pleine largeur sur iPhone) */
.toast-conteneur { right: 24px; bottom: 24px; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: var(--r-pill); background: var(--pill); color: var(--on-pill); box-shadow: var(--shadow-pop); font-size: 13.5px; font-weight: 600; }
.toast > span:first-child { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #ffffff24; color: var(--on-pill); }
.toast--succes > span:first-child { background: var(--up-on-ink); color: var(--pill); }
.toast--alerte > span:first-child { background: #ffd59a; color: var(--pill); }
.toast--erreur > span:first-child { background: var(--down-on-ink); color: var(--pill); }
@media (max-width: 768px) { .toast-conteneur { left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }

/* Écran de chargement après la connexion : même durée, couleurs du nouveau design */
.ecran-chargement { background: var(--tile-ink); font-family: var(--font); }

/* =============================================================================
   4. Écran refait : tableau de bord
   ============================================================================= */
.titre-ligne { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 20px; }
.mot { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 .02em .08em; margin: 0 -.02em -.08em; }
.lettre { display: inline-block; transform-origin: 0 100%; }
.barre-outils { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: var(--gap); }
@media (max-width: 560px) {
  .barre-outils { flex-direction: column; align-items: stretch; }
  .barre-outils .segmented, .filtres .segmented { display: grid; grid-auto-columns: minmax(64px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .barre-outils .segmented::-webkit-scrollbar, .filtres .segmented::-webkit-scrollbar { display: none; }
}

/* Segmented control (pilule blanche qui glisse) */
.segmented { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: var(--r-pill);  }
.segmented button { position: relative; z-index: 1; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent;  font: inherit; font-size: 12.5px;  white-space: nowrap; cursor: pointer; transition: color .2s; }

.segmented__pilule { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: var(--r-pill);   transition: transform .36s cubic-bezier(.165,.84,.44,1), width .36s cubic-bezier(.165,.84,.44,1); }
@media (hover: hover) and (pointer: fine) { .segmented button:hover { color: var(--text); } }
@media (pointer: coarse) { .segmented button { height: 40px; } }

/* Tuiles du tableau de bord : 6 sur une ligne, puis 3, puis 2 */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis .kpi-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; transition: transform .45s cubic-bezier(.165,.84,.44,1), box-shadow .3s; }
.kpis .kpi-card:nth-child(1) { background: var(--tile-ink); box-shadow: none; color: #f3f7f8; }
.kpis .kpi-card:nth-child(1) .kpi-card__label { color: #f3f7f8c7; }
.kpis .kpi-card:nth-child(4n+2) { background: var(--tile-white); }
.kpis .kpi-card:nth-child(4n+3) { background: var(--tile-tint-1); box-shadow: none; }
.kpis .kpi-card:nth-child(4n+4) { background: var(--tile-tint-2); box-shadow: none; }

.kpis .kpi-card { container-type: inline-size; }
.kpis .kpi-card__valeur { white-space: nowrap; font-size: min(26px, calc(100cqi / (var(--caracteres, 8) * .6))); }   /* --caracteres : dashboard.js */
.kpi-card__lien { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 12.5px;   }
.kpi-card__lien span { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { a.kpi-card:hover .kpi-card__lien span { text-decoration-color: currentColor; } }
.kpis .kpi-card__bouton-masque { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--well); color: var(--muted); cursor: pointer; }
.kpis .kpi-card__bouton-masque svg { width: 16px; height: 16px; }
.kpis .kpi-card--verrou .kpi-card__verrou { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }
.kpis .kpi-card--verrou .kpi-card__verrou svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .kpis .kpi-card { gap: 8px; } .kpis .kpi-card__valeur { font-size: min(22px, calc(100cqi / (var(--caracteres, 8) * .6))); } .kpi-card__lien { padding-top: 8px; font-size: 12px; } }

/* Grille des cartes (12 colonnes) */
.grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .col-6 { grid-column: 1 / -1; } }
.carte__entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-titre { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 2px; }
.section-titre h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.section-titre p { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.legende-traits { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legende-traits span { display: inline-flex; align-items: center; gap: 7px; }
.legende-traits i { width: 16px; height: 0; border-top: 2.5px solid var(--c1); border-radius: 2px; }
.legende-traits i.tirets { border-top: 2px dashed var(--faint); }

/* Tableaux dans une carte : pleine largeur de la carte */
.table-bord { margin: 0 -24px; overflow-x: auto; }
.table-bord .table th:first-child, .table-bord .table td:first-child { padding-left: 24px; }
.table-bord .table th:last-child, .table-bord .table td:last-child { padding-right: 24px; }
@media (max-width: 560px) { .table-bord { margin: 0 -16px; overflow: visible; } }
.type { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--r-pill); background: var(--well); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.type::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px #27275714; }
.pastille-ecart { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pastille-ecart--hausse { color: var(--up); background: var(--up-soft); }
.pastille-ecart--baisse { color: var(--down); background: var(--down-soft); }
.pastille-ecart--stable { color: var(--muted); background: var(--well); }
.client { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vignette { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px;   font-size: 11px; font-weight: 700; }
.client a { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .client a:hover { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; } }
.rang { color: var(--faint); font-weight: 600; }
.barre-mini { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.barre-mini__piste { width: 26%; min-width: 90px; max-width: 150px; height: 6px; border-radius: var(--r-pill); background: var(--well); overflow: hidden; }
.barre-mini__rempli { height: 100%; border-radius: var(--r-pill);  transform-origin: 0 50%; }
tr:first-child .barre-mini__rempli { background: var(--c1); }
.barre-mini__valeur { min-width: 92px; text-align: right; }

.ligne-vide td { color: var(--faint); }
@media (max-width: 640px) {
  .vignette { width: 28px; height: 28px; font-size: 10px; border-radius: 8px; }
  .client { gap: 10px; }
  .table td[data-role="montant"] .barre-mini__piste, .table td[data-role="detail"] .barre-mini__piste { display: none; }
  .table td .barre-mini__valeur { min-width: 0; }
}

/* Carte jauge sombre : objectif de marge */
.jauge-carte { display: flex; flex-direction: column; background: var(--tile-ink); box-shadow: none; color: #f3f7f8; --t-faible: #f3f7f8b3; container: jauge / inline-size; }
.jauge-carte .carte__titre { color: #f3f7f8; }
.jauge-carte .carte__entete { margin-bottom: 4px; }
.etat { display: inline-flex; align-items: center; gap: 6px;   border-radius: var(--r-pill);   white-space: nowrap; }
.etat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.etat--gris { color: #f3f7f8c7; background: #ffffff1f; }
.jauge-carte__corps { display: flex; flex-direction: column; flex: 1; }
.cadran-zone { container-type: inline-size; --cadran-l: clamp(240px, 66cqi, 540px); }
.cadran { position: relative; width: var(--cadran-l); max-width: 100%; margin: 6px auto 0; container-type: inline-size; }
.cadran svg { width: 100%; height: auto; overflow: visible; }
.cadran .graduation { transition: opacity .25s; }
.cadran__centre { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.cadran__valeur { font-size: clamp(30px, 11.5cqi, 60px); font-weight: 600; line-height: 1; letter-spacing: -.035em; }
.cadran__valeur--long { font-size: clamp(22px, 7.5cqi, 40px); }   /* ex. « 10 591,2 % » (objectif mal saisi) */
.cadran__echelle { display: flex; justify-content: space-between; width: var(--cadran-l); max-width: 100%; margin: 8px auto 0; font-size: 11px; color: var(--t-faible); }
.jauge-carte__sous { text-align: center; font-size: 12.5px; color: var(--t-faible); margin-top: 10px; }
.jauge-carte__sous strong { color: #f3f7f8; font-weight: 600; }
.jauge-carte__texte { display: flex; flex-direction: column; margin-top: 16px; }
.jauge-carte__phrase { font-size: 14px; font-weight: 600; text-align: center; }

.jauge-carte__phrase--orange { color: #ffd59a; }
.jauge-carte__phrase--rouge { color: var(--down-on-ink); }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed #ffffff2e; }
.chiffres div { padding: 0 12px; }
.chiffres div + div { border-left: 1px solid #ffffff24; }
.chiffres dt { font-size: 12px;  display: flex; align-items: center; gap: 6px; }
.chiffres dd { margin: 4px 0 0; font-size: 17px;  letter-spacing: -.01em; white-space: nowrap; }
.chiffres dd.vert { color: var(--up-on-ink); }
.encoche { width: 3px; height: 12px; border-radius: 2px; background: #f3f7f8; box-shadow: 0 0 0 1.5px var(--tile-ink), 0 0 0 2.5px #f3f7f866; }
.jauge-carte__vide { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 10px; color: var(--t-faible); }
.jauge-carte__vide .btn { background: #ffffff1f; color: #f3f7f8; box-shadow: none; }
@container jauge (min-width: 600px) {
  .jauge-carte__corps { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
  .cadran-zone { --cadran-l: min(100%, 340px); }
  .jauge-carte__texte { margin-top: 0; }
  .jauge-carte__phrase { text-align: left; }
  .chiffres div:first-child { padding-left: 0; }
}
@media (max-width: 560px) { .chiffres div { padding: 0 8px; } .chiffres div:first-child { padding-left: 0; } .chiffres dd { font-size: 15px; } }

/* Répartition par type : barre segmentée + légende */
.repartition__barre { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--well); }
.repartition__seg { height: 100%; background: var(--c); transform-origin: 0 50%; }
.repartition__seg + .repartition__seg { box-shadow: inset 2px 0 0 var(--surface); }
.repartition__legende { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 12px 0 18px; padding: 0; font-size: 12.5px; color: var(--muted); }
.repartition__legende li { display: inline-flex; align-items: center; gap: 7px; }
.repartition__legende strong { color: var(--text); font-weight: 600; }
.carre {     background: var(--c);  }

/* Graphiques (SVG maison, courbes.js) */
.graphique { position: relative; height: 260px; outline: none; cursor: pointer; touch-action: pan-y; }
.graphique svg { width: 100%; height: 100%; overflow: visible; }
.graphique:focus-visible { outline: 2px solid var(--text); outline-offset: 6px; border-radius: 12px; }
@media (max-width: 700px) { .graphique { height: 230px; } }
.axe { font-size: 11px; fill: var(--faint); font-family: var(--font); font-weight: 500; }
.graphique .grille-ligne { transform-box: fill-box; transform-origin: 0 50%; }
.graphique .dernier, .graphique .rebond, .graphique .barre { transform-box: fill-box; transform-origin: center; }
.graphique .barre { transform-origin: 50% 100%; fill: var(--an-wash);  }
.graphique .colonne.active .barre { fill: var(--c1); }
.graphique .colonne-fond { fill: transparent; transition: fill .2s; }
.graphique .colonne.active .colonne-fond { fill: #27275712; }
.curseur { transition: opacity .2s; }
.curseur__ligne, .curseur__prec, .curseur__cour { transition: transform .35s cubic-bezier(.165,.84,.44,1); }
.bulle { position: absolute; left: 0; top: 0; z-index: 5; min-width: 164px; padding: 10px 12px; border-radius: 12px; font-size: 12px; pointer-events: none; box-shadow: var(--shadow-pop); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; opacity: 0; transition: left .45s cubic-bezier(.165,.84,.44,1), top .45s cubic-bezier(.165,.84,.44,1), opacity .2s; }
.bulle--sombre { background: var(--pill); color: var(--on-pill); }
.bulle--claire { background: var(--surface); color: var(--muted); min-width: 196px; font-size: 12.5px; }
.bulle__titre { font-weight: 600; margin-bottom: 6px; }
.bulle--claire .bulle__titre { color: var(--text); }
.bulle__ligne { display: flex; justify-content: space-between; gap: 18px; }
.bulle__ligne + .bulle__ligne { margin-top: 3px; }
.bulle--sombre .bulle__ligne span:first-child { opacity: .68; }
.bulle__ligne b { font-weight: 600; }
.bulle--claire .bulle__ligne b { color: var(--text); }
.bulle .hausse { color: var(--up); }
.bulle .baisse { color: var(--down); }

/* Mouvement réduit : tout s'affiche directement */
@media (prefers-reduced-motion: reduce) {
  .dock, .dock__bulle, .feuille, .nav-onglets__pilule, .segmented__pilule, .barre-onglets__pastille, .bulle, .curseur, .curseur__ligne, .curseur__prec, .curseur__cour { transition-duration: 0s !important; }
}

/* =============================================================================
   5. Fenêtres (toutes les pages) et fenêtre de commande (lot 2, 26/10/2026 ; maquette validée)
   ============================================================================= */
.modal-fond { background: #0f0e4447; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal { border: 0; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-pop); color: var(--text); }
.modal__entete { border-bottom: 0; padding: 20px 24px 8px; background: transparent; }
.modal__titre { font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.modal__fermer { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--rim), inset 0 0 0 1px var(--line-2); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .modal__fermer:hover { background: var(--glass-3); color: var(--text); } }
.modal__corps { color: var(--text); }
.modal__pied { gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.champ__label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.champ__label--obligatoire::after { color: var(--down); }

/* Formulaire « fc- » : blocs séparés par un trait plein bleu nuit léger, pastilles numérotées bleu nuit (choix du 27/10/2026) */
.modal--commande .modal__corps.fc { background: var(--surface); padding: 4px 24px 20px; gap: 0; }
.fc-bloc { gap: 12px; padding: 16px 0; border: 0; border-radius: 0; background: transparent; }
.fc-bloc + .fc-bloc { border-top: 1px solid #27275733; padding-top: 20px; margin-top: 4px; }
.fc-bloc__titre { font-size: 15px; font-weight: 600; color: var(--text); }
.fc-bloc__num { background: var(--pill); color: var(--on-pill); }
.fc-requis { color: var(--down); }
.fc-client__recherche .input { border-radius: var(--r-pill); }
.fc-client__recherche svg { color: var(--faint); }
.fc-recents__titre { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); }
.fc-recent { height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12.5px; transition: background-color .2s, color .2s, transform .12s var(--ease); }
@media (hover: hover) and (pointer: fine) { .fc-recent:hover { border: 0; background: var(--glass-3); color: var(--text); } }
.fc-client__liste { padding: 4px; border: 0; border-radius: var(--r-sm); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
.fc-client__liste li + li { border-top: 0; }
.fc-client__option { padding: 8px 10px; border-radius: 10px; background: transparent; color: var(--text); }
.fc-client__option:hover, .fc-client__option:focus-visible { background: var(--well); }
.fc-client__option--creer { color: var(--primary); }
.fc-client__choisi { border: 0; border-radius: var(--r-sm); background: var(--primary-soft); }
.fc-client__nom { font-size: 15px; font-weight: 600; color: var(--text); }
.fc-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--pill); color: var(--on-pill); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.fc-avatar--petit { width: 28px; height: 28px; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-text); font-size: 10.5px; }
.fc-avatar--plus { background: var(--primary-soft); color: var(--primary); font-size: 16px; }
.fc-alerte { color: var(--warn); }
.fc-puce { height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12.5px; transition: background-color .2s, color .2s, transform .12s var(--ease); }
.fc-puce--autre { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.fc-puce[aria-pressed="true"] { background: var(--pill); color: var(--on-pill); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .fc-puce:not([aria-pressed="true"]):hover { border: 0; background: var(--glass-3); color: var(--text); } }
.fc-montants__cartes { gap: 12px; }
.fc-montant-carte { gap: 10px; padding: 14px; border: 0; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), inset 0 0 0 1px var(--line); }
.fc-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; background: var(--well); color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.fc-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.fc-tag--srv, .fc-tag--dis { background: var(--well); color: var(--text); }
.fc-tag--srv::before { background: var(--type-srv); }
.fc-tag--dis::before { background: var(--type-dis); }
.fc-montant { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; }
.fc-montant > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fc-montant .input { font-size: 15px; font-weight: 600; background: var(--glass-2); }
.fc-euro__signe { color: var(--faint); font-size: 13px; }
.fc-marge-auto__bouton { padding: 0; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .fc-marge-auto__bouton:hover { background: none; color: var(--primary); text-decoration-color: currentColor; } }
.fc-total { margin-top: 2px; padding: 16px 20px; border-radius: var(--r); background: var(--tile-ink); box-shadow: none; color: #f3f7f8; }
.fc-total__libelle { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #f3f7f8c7; }
.fc-total__ca strong { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.fc-total__marge strong { font-size: 17px; font-weight: 600; }
.fc-total__marge strong.texte-rouge { color: var(--down-on-ink); }
.fc-total__pct { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; background: #ffffff1f; font-size: 11.5px; transition: background-color .2s, color .2s; }
.fc-total__pct--vert { color: var(--up-on-ink); background: var(--up-soft-on-ink); }
.fc-total__pct--orange { color: #ffd59a; background: #ffd59a29; }
.fc-total__pct--rouge { color: var(--down-on-ink); background: var(--down-soft-on-ink); }
.fc-options { border: 0; border-top: 1px solid #27275733; border-radius: 0; background: transparent; overflow: visible; }
.fc-options summary { padding: 14px 0; font-size: 14px; font-weight: 600; color: var(--text); }
.fc-options__resume { font-size: 12.5px; color: var(--faint); }
.fc-options__chevron { color: var(--faint); transition: transform .3s cubic-bezier(.165,.84,.44,1); }
.fc-options__corps { padding: 0 0 6px; }
.fc-interrupteur { color: var(--text); }
.fc-interrupteur__piste { background: var(--line-2); transition: background-color .25s; }
.fc-interrupteur__piste::after { top: 3px; left: 3px; width: 18px; height: 18px; box-shadow: 0 1px 3px #27275740; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.fc-interrupteur input:checked + .fc-interrupteur__piste { background: var(--c3); }
.fc-interrupteur input:focus-visible + .fc-interrupteur__piste { outline-color: var(--text); }
.modal--commande .modal__pied { justify-content: flex-end; }
.fc-bouton-total::before { content: " · "; }
.fc-total__marge { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 6px; }
.fc-total__marge .fc-total__libelle { flex-basis: 100%; text-align: right; }
.fc-total__pct { margin-left: 0; }
@media (max-width: 640px) {
  .modal--commande { border-radius: 26px; box-shadow: var(--shadow-pop); }
  .modal--commande .modal__entete { border-bottom: 0; background: var(--surface); }
  .modal--commande .modal__entete::before { background: var(--line-2); height: 4px; }
  .modal--commande .modal__titre { font-weight: 600; }
  .modal--commande .modal__fermer { background: var(--glass-2); color: var(--text); }
  .modal--commande .modal__corps { padding: 4px 16px 16px; }
  .modal--commande .modal__pied { background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
  .modal--commande .modal__pied .btn { border-radius: var(--r-pill); }
  .modal--commande .modal__pied .btn--primaire { flex-direction: column; gap: 0; line-height: 1.15; white-space: nowrap; }
  .modal--commande .modal__pied .btn--primaire .fc-bouton-total { font-size: 12.5px; font-weight: 600; opacity: .78; }
  .modal--commande .modal__pied .btn--primaire .fc-bouton-total::before { content: none; }
  .fc-total__ca strong { font-size: 22px; }
  .fc-montants__cartes { grid-template-columns: 1fr; }
  .fc-montant .input { height: 46px; font-size: 16px; }
  .fc-bloc { padding: 14px 0; }
}

/* =============================================================================
   6. Écran refait : Commandes (lot 2, 26/10/2026)
   ============================================================================= */
.filtres { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--gap); }
.filtres__ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filtres__ligne--outils { justify-content: space-between; }
.filtres__droite { display: flex; gap: 8px; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border: 0; border-radius: var(--r-pill); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s, transform .12s var(--ease); }
.puce:active { transform: scale(.97); }
.puce[aria-pressed="true"] { background: var(--pill); color: var(--on-pill); box-shadow: none; }
.puce__carre { width: 8px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px #27275714; }
.puce[aria-pressed="true"] .puce__carre { box-shadow: 0 0 0 1px #ffffff40; }
@media (hover: hover) and (pointer: fine) { .puce:not([aria-pressed="true"]):hover { background: var(--glass-3); color: var(--text); } }
@media (pointer: coarse) { .puce { height: 38px; } }
.filtres .search-field { position: relative; flex: 0 1 320px; min-width: 220px; max-width: none; }
.search-field__icone { color: var(--faint); }
.filtres-avances { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; margin: 0; padding: 18px 20px; border: 0; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.filtres-avances .champ { gap: 6px; }
.filtres-avances .input, .filtres-avances .select { width: 100%; height: 40px; }
@media (max-width: 720px) { .filtres .search-field { flex: 1 1 100%; } }
@media (max-width: 560px) {
  .filtres__ligne:first-child { flex-direction: column; align-items: stretch; }
  .puces { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
  .puces::-webkit-scrollbar { display: none; }
  .filtres__droite { flex: 1; }
  .filtres__droite .btn { flex: 1; }
}
.table-commandes td { height: 52px; padding-top: 9px; padding-bottom: 9px; }
.cellule-client { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cellule-client > span:last-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-text); font-size: 10.5px; font-weight: 700; }
@media (max-width: 640px) { .cellule-client .avatar { display: none; } .table-commandes td { height: auto; } }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 0 4px; font-size: 12.5px; color: var(--faint); }
.btn--page { min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-pill); background: transparent; box-shadow: none; color: var(--muted); font-size: 12.5px; }
.btn--page.actif { background: var(--pill); color: var(--on-pill); }
.btn--page:disabled { background: transparent; color: var(--line-2); }
@media (hover: hover) and (pointer: fine) { .btn--page:not(.actif):not(:disabled):hover { background: var(--well); color: var(--text); } }

/* =============================================================================
   7. Écran refait : Pipe (lot 3, 26/10/2026 ; maquette validée) — par-dessus pipe.css
   ============================================================================= */
.pp-actions { gap: 8px; }
.pp-kpis { gap: var(--gap); margin-bottom: var(--gap); }
.pp-kpis .kpi-card { display: flex; flex-direction: column; gap: 10px; }
.pp-kpis .kpi-card__note { margin-top: -4px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-kpis .kpi-card:nth-child(1) .kpi-card__note { color: #f3f7f8c7; }
.libelle-filtre { font-size: 12.5px; font-weight: 600; color: var(--faint); margin-left: 6px; }
.segmented--compact button { height: 28px; padding: 0 11px; font-size: 12px; }

/* Objectif : réalisé + pipe pondéré face à l'objectif */
.pp-objectif { margin-bottom: var(--gap); }
.pp-objectif__entete { align-items: center; }
.pp-objectif__verdict { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; }
.pp-objectif__verdict::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pp-objectif__verdict--ok { color: var(--up); background: var(--up-soft); }
.pp-objectif__verdict--ko { color: var(--warn); background: var(--warn-soft); }
.pp-objectif__verdict--neutre { color: var(--muted); background: var(--well); }
.pp-barre { height: 14px; margin: 34px 0 14px; border-radius: var(--r-pill); background: var(--well); }
.pp-barre__realise { border-radius: var(--r-pill) 0 0 var(--r-pill); background: linear-gradient(90deg, #50507e, var(--c1)); transform-origin: 0 50%; }
.pp-barre__pipe { background: var(--c4); border-left: 0; box-shadow: inset 2px 0 0 var(--surface); border-radius: 0 var(--r-pill) var(--r-pill) 0; transform-origin: 0 50%; }
.pp-barre__objectif { width: 3px; margin-left: -1.5px; background: var(--navy-deep); box-shadow: 0 0 0 2px var(--surface); }
.pp-barre__objectif span { top: auto; bottom: calc(100% + 6px); padding: 2px 8px; border-radius: 8px; background: var(--pill); font-size: 11.5px; font-weight: 600; }
.pp-legende { gap: 6px 22px; font-size: 12.5px; color: var(--muted); }
.pp-legende i { width: 10px; height: 10px; border-radius: 3px; }
.pp-legende span:first-child i { background: var(--c1) !important; }
.pp-legende span:nth-child(2) i { background: var(--c4) !important; }
.pp-legende b { color: var(--text); font-weight: 600; }

/* Tableau modifiable en place : « cases invisibles » (cadre au survol de la ligne) */
.pp-table td { padding-top: 6px !important; padding-bottom: 6px !important; }
.pp-case { height: 32px; padding: 0 7px; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px transparent; color: var(--text); font: 500 13.5px var(--font); transition: box-shadow .15s, background-color .15s; }
.pp-case:focus { outline: none; border: 0; background: var(--surface) !important; box-shadow: inset 0 0 0 1.5px var(--text); }
@media (hover: hover) and (pointer: fine) {
  .pp-table tbody tr:hover .pp-case { border: 0; background-color: var(--glass-3); box-shadow: inset 0 0 0 1px var(--line-2); }
  .pp-table tbody tr:hover select.pp-case { background: var(--glass-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23616177' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 6px center / 11px; }
  .pp-table tbody .pp-case:hover { border: 0; box-shadow: inset 0 0 0 1px var(--navy-soft); background-color: var(--surface); }
}
.pp-case--client { font-weight: 600; }
.pp-case--projet { color: var(--primary); font-weight: 600; }
.pp-auto { color: var(--faint); }
.pp-fiche-btn { width: 28px; height: 28px; border-radius: 50%; color: var(--faint); }
@media (hover: hover) and (pointer: fine) { .pp-fiche-btn:hover { background: var(--well); color: var(--text); } }
@keyframes pp-maj { from { background-color: var(--up-soft); } }
.pp-table thead th.pp-pond { background: transparent; color: var(--text); }
.pp-table tbody td.pp-pond, .pp-table tfoot td.pp-pond { background-color: #27275708; font-weight: 600; }
.pp-projet { color: var(--primary); }
.pp-motif { color: var(--down); font-weight: 600; }
.pp-commande { color: var(--up); font-weight: 600; }
.pp-aide { font-size: 12.5px; color: var(--faint); line-height: 1.5; margin-top: 10px; padding: 0 4px; }

/* Étapes : colonnes, cartes à glisser, zones Gagné / Perdu */
.pp-kanban { gap: 12px; }
.pp-col { min-height: 220px; padding: 12px; border-radius: var(--r); background: var(--well); transition: background-color .2s, box-shadow .2s; }
.pp-col--survol { background: var(--primary-soft); outline: 0; box-shadow: inset 0 0 0 2px var(--navy-soft); }
.pp-col__titre { font-size: 13.5px; font-weight: 600; align-items: center; }
.pp-col__titre small { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--glass-3); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pp-col__somme { font-size: 12px; color: var(--faint); }
.pp-carte { padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px #2727570d, 0 6px 16px -10px #2727574d; transition: box-shadow .3s, transform .45s cubic-bezier(.165,.84,.44,1); }
@media (hover: hover) and (pointer: fine) { .pp-carte:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } }
.pp-carte__client { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .03em; }
.pp-carte__projet { font-size: 14px; font-weight: 600; margin: 3px 0 10px; }
.pp-carte__bas { font-size: 12px; color: var(--muted); }
.pp-carte__bas b { color: var(--text); font-weight: 600; }
.pp-proba { height: 20px; padding: 0 8px; display: inline-flex; align-items: center; background: var(--primary-soft); color: var(--primary); }
.pp-issue { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 104px; border: 0; border-radius: var(--r); font-size: 14px; font-weight: 600; transition: background-color .2s, transform .2s; }
.pp-issue--gagne { color: var(--up); background: var(--up-soft); box-shadow: inset 0 0 0 1.5px #22735c40; }
.pp-issue--perdu { color: var(--down); background: var(--down-soft); box-shadow: inset 0 0 0 1.5px #b1412a40; }
.pp-issue.pp-col--survol { transform: scale(1.03); }

/* Fiche projet */
.pp-fiche__grille { gap: 14px 16px; }
.pp-fiche__montants { gap: 12px; }
.pp-fiche__bloc { padding: 14px; border: 0; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), inset 0 0 0 1px var(--line); }
.pp-fiche__bloc .champ { font-size: 12.5px; color: var(--muted); }
.pp-num { font-weight: 600; }
.pp-fiche__pied #fpSupprimer { background: transparent; box-shadow: none; color: var(--down); }
@media (hover: hover) and (pointer: fine) { .pp-fiche__pied #fpSupprimer:hover { background: var(--down-soft); color: var(--down); } }

/* Téléphone : filtres, cartes de projet */
@media (max-width: 640px) {
  .pp-actions .segmented { flex: 1; display: grid; }
  .pp-filtres { display: flex; padding: 0; }
  .pp-filtres .filtres__ligne { flex-direction: column; align-items: stretch; }
  .pp-filtres .segmented { display: grid; }
  .pp-filtres .libelle-filtre { display: none; }
  .pp-filtres .search-field { max-width: none; }
  .pm-carte { padding: 16px; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
  .pp-carte__client { font-size: 12px; }
  .pm-closing { font-size: 12px; color: var(--faint); }
  .pm-carte__projet { color: var(--primary); font-size: 16px; font-weight: 600; }
  .pm-carte__montants { margin: 12px 0; padding: 10px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
  .pm-carte__montants span { font-size: 11.5px; font-weight: 500; color: var(--faint); }
  .pm-carte__montants b { font-size: 14px; font-weight: 600; }
  .pm-carte__montants .pm-pond b { color: var(--text); font-weight: 600; }
  .pm-edition { border-top: 1px dashed var(--line-2); }
  .pm-champ { font-size: 12px; color: var(--muted); }
  .pm-total { color: var(--muted); }
  .pp-col, .pp-issue { border-radius: var(--r); }
}

/* =============================================================================
   8. Écran refait : Renouvellements (lot 4, 26/10/2026 ; maquette validée) — par-dessus ecrans.css / finitions.css
   ============================================================================= */
.titre-ligne--onglets { align-items: center; justify-content: flex-start; gap: 20px; flex-wrap: wrap; }
@media (max-width: 760px) { .titre-ligne--onglets { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* Sous-onglets (pages à plusieurs volets) : rangée « verre », pilule active qui glisse (cadre.js › placerPilule) */
.sous-onglets { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill);     max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.sous-onglets::-webkit-scrollbar { display: none; }
.sous-onglets__pilule { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: var(--r-pill);   transition: transform .36s cubic-bezier(.165,.84,.44,1), width .36s cubic-bezier(.165,.84,.44,1); }
.sous-onglet { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border: 0; border-radius: var(--r-pill); background: transparent;  font: inherit; font-size: 13.5px;  white-space: nowrap; cursor: pointer; transition: color .2s; }

@media (hover: hover) and (pointer: fine) { .sous-onglet:hover { color: var(--text); } }
@media (pointer: coarse) { .sous-onglet { padding: 11px 15px; } }
.compteur-onglet { min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--well); color: var(--faint); font-size: 11.5px; font-weight: 700; }
.compteur-onglet--alerte { background: var(--warn-soft); color: var(--warn); }

/* En-tête d'un volet, tuiles, notes */
.entete-volet { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: var(--gap); }
.entete-volet h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.entete-volet p { font-size: 12.5px; color: var(--faint); margin-top: 3px; max-width: 760px; line-height: 1.5; }
.entete-volet p strong { color: var(--muted); font-weight: 600; }
.kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1280px) { .kpis--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis .kpi-card__note { margin-top: -6px; min-height: 18px; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis .kpi-card:nth-child(1) .kpi-card__note { color: #f3f7f8c7; }
.volet > .grille, .volet > .carte + .carte, .volet .grille + .carte { margin-bottom: var(--gap); }
.volet > .grille + .carte { margin-top: 0; }
.aide-carte { font-size: 12px; color: var(--faint); font-weight: 500; }
.note-bas { font-size: 12.5px; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.note-bas:empty { display: none; }
.compte { font-size: 12.5px; color: var(--faint); font-weight: 500; }
@media (max-width: 640px) {
  .entete-volet .segmented { display: grid; grid-auto-columns: minmax(64px, 1fr); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .entete-volet .segmented::-webkit-scrollbar { display: none; }
}

/* Barres maison (courbes.js › barres) */
.legende-carre { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legende-carre span { display: inline-flex; align-items: center; gap: 7px; }
.carre { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.carre--ca { background: var(--c1); }
.carre--marge { background: var(--c4); }
.graphique .barre { transition: fill .2s, opacity .25s; }
.graphique .barre--negative { transform-origin: 50% 0; }
.graphique--double.survol .colonne:not(.active) .barre { opacity: .45; }

/* Clients de l'année : tableau qui défile dans sa carte, barre de part */
.rn-defile { max-height: 336px; overflow-y: auto; }
.rn-defile thead th { position: sticky; top: 0; z-index: 1;  }
@media (max-width: 560px) { .rn-defile { max-height: none; } }
.barre-inline__remplissage { transform-origin: 0 50%; }

/* Prochaines échéances */
.prochaines .carte__entete { align-items: baseline; margin-bottom: 8px; }
.prochaines__note { font-size: 12.5px; color: var(--faint); }
.prochaines__liste li + li { border-top: 0; }
.prochaine { grid-template-columns: 64px minmax(0, 1fr) auto 112px; gap: 14px; padding: 11px 12px; margin: 0 -12px; width: calc(100% + 24px); border-radius: var(--r-sm); }
.prochaines__liste li + li .prochaine { box-shadow: 0 -1px 0 var(--line); border-radius: 0; }
@media (hover: hover) and (pointer: fine) { .prochaine:hover { background: var(--surface-2); border-radius: var(--r-sm); box-shadow: none; } }
.prochaine:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.prochaine__date { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.prochaine__texte { display: flex; flex-direction: column; min-width: 0; }
.prochaine__client { font-weight: 600; color: var(--text); }
.prochaine__denomination { font-size: 12.5px; color: var(--faint); }
.prochaine__montant { font-weight: 600; color: var(--text); }
.prochaine__rebours { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.prochaine__rebours--rouge { color: var(--down); background: var(--down-soft); }
.prochaine__rebours--orange { color: var(--warn); background: var(--warn-soft); }
.prochaine__rebours--bleu { color: var(--primary); background: var(--primary-soft); }
@media (max-width: 640px) {
  .prochaine { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: none; gap: 12px; padding: 10px 12px; }
  .prochaine__date, .prochaine__texte, .prochaine__rebours { grid-area: auto; }
  .prochaine__date { font-size: 14px; }
  .prochaine__montant { display: none; }
  .prochaine__rebours { height: 22px; padding: 0 8px; font-size: 11.5px; }
}

/* Filtre et tableau de l'année, groupé par mois */
.rn-filtre { display: flex; align-items: center; gap: 12px; margin-bottom: var(--gap); }
.rn-filtre .search-field { position: relative; flex: 0 1 340px; min-width: 200px; max-width: none; }
@media (max-width: 640px) { .rn-filtre { flex-wrap: wrap; } .rn-filtre .search-field { flex: 1 1 100%; } }
.carte--tableau { padding: 0; overflow: hidden; margin-bottom: var(--gap); }
.carte--tableau .table-bord { margin: 0; }
.carte--tableau .table th:first-child, .carte--tableau .table td:first-child { padding-left: 24px; }
.carte--tableau .table th:last-child, .carte--tableau .table td:last-child { padding-right: 24px; }
.carte--tableau .table thead th { padding-top: 16px; padding-bottom: 12px; }
@media (max-width: 560px) { .carte--tableau { overflow: visible; } }
.table tbody tr.ligne-mois { background: var(--well); border-top: 0; }
.table tbody tr.ligne-mois td { font-weight: 600;  background: transparent; }
@media (hover: hover) and (pointer: fine) { .table tbody tr.ligne-mois:hover { background: var(--well); } }
.ligne-mois__titre { font-size: 14px; color: var(--text); }
.ligne-mois__compte { font-size: 12px; font-weight: 500; color: var(--faint); }
@keyframes rn-repere { from { background-color: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); } }
.ligne-mois--repere { animation: rn-repere 1.6s cubic-bezier(.165,.84,.44,1); }
.nature { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--well); font-size: 12px; font-weight: 600; color: var(--muted); }
.nature--premier { background: var(--primary-soft); color: var(--primary); }
.nature--suivant { background: var(--well); color: var(--muted); }
.nature--unique { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Méthode */
.carte--note { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.liste-regles { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.liste-regles li { margin: 0; }
.liste-regles strong { color: var(--text); font-weight: 600; }
.carte--note .alerte { margin-top: 14px; padding: 12px 16px; border: 0; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.carte--note .alerte .alerte__titre, .carte--note .alerte .alerte__contenu { color: var(--warn); }

/* Incertains : statut en trois boutons dans un rail */
.groupe-statut { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--r-pill); background: var(--well); }
.btn-statut { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; transition: background-color .2s, color .2s, box-shadow .2s; }
.btn-statut svg { width: 14px; height: 14px; }
.btn-statut--vu[aria-pressed="true"] { background: var(--up-soft); color: var(--up); box-shadow: var(--shadow-seg); }
.btn-statut--attente[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); box-shadow: var(--shadow-seg); }
.btn-statut--non[aria-pressed="true"] { background: var(--down-soft); color: var(--down); box-shadow: var(--shadow-seg); }
@media (hover: hover) and (pointer: fine) { .btn-statut[aria-pressed="false"]:hover { border: 0; background: var(--glass-3); color: var(--text); } }
.btn-statut:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.ligne-traitee td { opacity: .55; color: inherit; }
@media (max-width: 640px) {
  .groupe-statut { display: flex; width: 100%; flex-wrap: nowrap; gap: 2px; }
  .btn-statut { flex: 1; justify-content: center; height: 36px; padding: 0 6px; font-size: 12px; }
}

/* Contrôle : cartes de propositions */
.controle__entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: var(--gap); }
.controle__entete .carte__titre { font-size: 20px; margin-bottom: 2px; }
.controle__liste { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 560px) { .controle__liste { grid-template-columns: minmax(0, 1fr); } }
.controle__carte { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; }
.controle__haut { gap: 10px; margin: 0; }
.controle__type { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.controle__type::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.controle__type--bleu { color: var(--primary); background: var(--primary-soft); }
.controle__type--rouge { color: var(--down); background: var(--down-soft); }
.controle__type--orange { color: var(--warn); background: var(--warn-soft); }
.controle__type--gris { color: var(--muted); background: var(--well); }
.controle__client { font-size: 12.5px; font-weight: 600; color: var(--faint); }
.controle__effet { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.controle__effet--moins { color: var(--down); background: var(--down-soft); }
.controle__effet--plus { color: var(--up); background: var(--up-soft); }
.controle__effet--nul { color: var(--faint); background: var(--well); }
.controle__titre { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.controle__explication { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.controle__commandes { margin: 0; padding: 4px 12px; border: 0; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.controle__commande { grid-template-columns: 78px minmax(0, 1fr) auto auto 32px; gap: 10px; padding: 6px 0; background: transparent; font-size: 12.5px; }
.controle__commande:nth-child(even) { background: transparent; }
.controle__commande + .controle__commande { border-top: 1px solid var(--line); }
.controle__date { color: var(--muted); }
.controle__denomination { font-weight: 600; color: var(--text); }
.controle__periodicite { color: var(--faint); }
.controle__montant { font-weight: 600; color: var(--text); }
.controle__commande .btn--icone { width: 30px; height: 30px; border-radius: 50%; }
.controle__actions { gap: 6px; margin-top: 4px; }
@media (max-width: 640px) {
  .controle__carte { padding: 16px; }
  .controle__commande { grid-template-columns: minmax(0, 1fr) auto 32px; }
}

/* =============================================================================
   9 → 15. Derniers écrans refaits (lot 5, 26/10/2026 ; maquettes validées) — Clients, Explorer, Objectifs, Import,
   Réglages, Connexion (+ invitation, Face ID), Administration. Utilitaires communs d'abord.
   ============================================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.m-haut-md { margin-top: 12px; }
.discret { color: var(--faint); }
.titre-ligne__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .titre-ligne:has(.titre-ligne__actions) { flex-direction: column; align-items: stretch; }
  .titre-ligne__actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
}
/* Alertes (toutes pages) : pastille douce, sans filet coloré à gauche */
.alerte { gap: 12px; padding: 12px 16px; border: 0; border-radius: var(--r-sm); font-size: 13px; line-height: 1.5; }
.alerte .alerte__contenu, .alerte .alerte__titre { color: inherit; }
.alerte__titre { font-weight: 600; }
.alerte__icone { width: 18px; height: 18px; }
.alerte--info { background: var(--primary-soft); color: var(--primary); }

.alerte--alerte { background: var(--warn-soft); color: var(--warn); }
.alerte--erreur { background: var(--down-soft); color: var(--down); }
/* Carte qui contient une liste : en-tête rentré, tableau bord à bord */
.carte--liste { padding: 20px 0 0; overflow: hidden; margin-bottom: var(--gap); }
.carte--liste > .carte__entete { padding: 0 24px; align-items: center; flex-wrap: wrap; }
.carte--liste .table-bord { margin: 0; }
.carte--liste .table th:first-child, .carte--liste .table td:first-child { padding-left: 24px; }
.carte--liste .table th:last-child, .carte--liste .table td:last-child { padding-right: 24px; }
.carte--liste .search-field { position: relative; width: 260px; max-width: 100%; }
.carte--liste .search-field .input { height: 36px; border-radius: var(--r-pill); }
.actions { display: flex; gap: 2px; justify-content: flex-end; }
.btn--icone.desactive { opacity: .35; }
@media (max-width: 820px) { .carte--liste > .carte__entete { flex-direction: column; align-items: stretch; } .carte--liste .search-field { width: 100%; } }
@media (max-width: 560px) { .carte--liste { padding-top: 16px; } .carte--liste > .carte__entete { padding: 0 16px; } }

/* --- 9. Clients ---------------------------------------------------------------------------------------- */
.table-clients td { height: 52px; padding-top: 8px; padding-bottom: 8px; }
.table-clients .avatar { width: 32px; height: 32px; font-size: 11px; }
.lien-nom { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .lien-nom:hover { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; } }
.sans-commande { display: block; font-size: 12px; font-weight: 500; color: var(--faint); }
.cellule-client > span:last-child { min-width: 0; }
@media (max-width: 640px) { .table-clients td { height: auto; } }
.info-fusion { margin-bottom: 16px; }
#modalFusion .champ + .champ { margin-top: 12px; }
.modal--fiche { width: 100%; max-width: 800px; }
.modal--fiche .modal__entete { align-items: center; gap: 12px; }
.fiche__entete { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.fiche__entete > div { min-width: 0; }
.fiche__entete .avatar { width: 44px; height: 44px; font-size: 14px; background: var(--pill); color: var(--on-pill); }
.fiche__nom { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche__sous { font-size: 12.5px; color: var(--faint); }
.fiche__annees { padding: 0 24px 6px; }
.fiche__corps { max-height: 72vh; overflow-y: auto; }
.fiche__kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 0; --caracteres: 13; }
.fiche__kpis .kpi-card { padding: 14px 16px; gap: 6px; border-radius: 18px; }
.fiche__repartition { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fiche__repartition:empty { display: none; }
.part-type { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 4px 16px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.part-type .fc-tag { grid-row: 1 / 3; }
.part-type span:not(.fc-tag) { font-size: 12px; color: var(--faint); }
.part-type b { font-size: 15px; font-weight: 600; }
.fiche__titre-section { font-size: 15px; font-weight: 600; margin: 20px 0 10px; }
.fiche__commandes { max-height: 330px; overflow-y: auto; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  .fiche__kpis { grid-template-columns: 1fr 1fr; }
  .fiche__repartition { grid-template-columns: 1fr; }
  .fiche__commandes { max-height: none; }
  .fiche__annees { padding: 0 16px 6px; }
  .fiche__annees .segmented { display: grid; grid-auto-columns: minmax(56px, 1fr); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
}

/* --- 10. Explorer -------------------------------------------------------------------------------------- */
.ex-filtres { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--gap); }
.ex-filtres .libelle-filtre:first-child { margin-left: 0; }
@media (max-width: 560px) {
  .ex-filtres { flex-direction: column; align-items: stretch; }
  .ex-filtres .segmented { display: grid; grid-auto-columns: minmax(64px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .ex-filtres .libelle-filtre { margin: 4px 0 -4px; }
}
.ex-info { font-size: 13px; color: var(--faint); margin: -8px 0 16px; }
.matrice-zone { overflow-x: auto; margin: 0 -8px; padding: 4px 8px 8px; }
.matrice { border-spacing: 6px; margin: 0 auto 0 0; font-size: 13.5px; }
.matrice th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px 4px; }
.matrice tbody th { padding-right: 10px; }
.matrice td { min-width: 78px; height: 46px; padding: 0 8px; border: 0; border-radius: 12px; font-weight: 600; transition: box-shadow .2s; }
.matrice td.matrice__diagonale { background: var(--well); color: var(--faint); font-weight: 500; }
.matrice td.matrice__vide { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--faint); }
@media (hover: hover) and (pointer: fine) { .matrice td:not(.matrice__diagonale):not(.matrice__vide):hover { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--primary); } }
.echelle-matrice { max-width: 560px; margin-top: 18px; }
.echelle-matrice__barre { height: 10px; border-radius: var(--r-pill); background: linear-gradient(90deg, #b1412a, #ecebea 50%, #272757); }
.echelle-matrice__libelles { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.ex-explication { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 14px; max-width: 900px; }
.perimetres { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 900px) { .perimetres { grid-template-columns: 1fr; } }
.perimetre__titre { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cle { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
.cle--a { background: #616177; }
.cle--b { background: var(--c1); border-radius: 8px; }
.perimetre__champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.perimetre__champs .select { width: 100%; }
.champ-plage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 560px) { .perimetre__champs { grid-template-columns: 1fr; } }
#sectionComparaison .entete-volet { align-items: center; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.trait { display: inline-block; width: 18px; height: 0; flex: none; border-top: 2px solid var(--c1); }
.trait--a { border-top: 2px dashed #616177; }
#corpsComparaison .hausse { color: var(--up); font-weight: 600; }
#corpsComparaison .baisse { color: var(--down); font-weight: 600; }

/* --- 11. Objectifs ------------------------------------------------------------------------------------- */
.table-objectifs td { height: 60px; }
.annee-objectif { font-size: 15px; font-weight: 600; }
.pct-objectif { font-weight: 600; }
.ecart { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-top: 3px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; white-space: nowrap; }
.ecart--avance { color: var(--up); background: var(--up-soft); }
.ecart--retard { color: var(--down); background: var(--down-soft); }
.atteint { color: var(--up); }
.manque { color: var(--down); }
.col-progression { min-width: 170px; }
.progression { display: flex; align-items: center; gap: 10px; }
.progression__piste { flex: 1; height: 7px; border-radius: var(--r-pill); background: var(--well); overflow: hidden; }
.progression__rempli { height: 100%; border-radius: var(--r-pill); transform-origin: 0 50%; }
.progression__rempli--atteint { background: var(--up); }
.progression__rempli--proche { background: var(--primary); }
.progression__rempli--loin { background: var(--down); }
.progression__valeur { min-width: 40px; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.aide-tableau { margin: 0; padding: 12px 24px 16px; font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.modal--etroite { max-width: 460px; }
.modal--etroite .champ + .champ { margin-top: 12px; }
@media (max-width: 560px) { .table-objectifs td { height: auto; } .col-progression { min-width: 0; } .progression { width: 60%; } .aide-tableau { padding: 12px 16px 16px; } }

/* --- 12. Import & sauvegarde --------------------------------------------------------------------------- */
.grille-import { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
.grille-import > div, #sectionApercu { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.grille-import:has(#sectionApercu.cache) { align-items: stretch; }
.grille-import:has(#sectionApercu.cache) > div > .carte { flex: 1; }
@media (max-width: 900px) { .grille-import { grid-template-columns: 1fr; } }
.drop-zone { position: relative; gap: 6px; min-height: 220px; padding: 28px 20px; border: 0; border-radius: var(--r); background: var(--glass-2); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background-color .25s, box-shadow .25s; }
.drop-zone::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px dashed var(--navy-soft); opacity: .7; pointer-events: none; transition: border-color .25s, opacity .25s; }
.drop-zone.survol { background: var(--primary-soft); box-shadow: none; border: 0; }
.drop-zone.survol::before { border-color: var(--primary); opacity: 1; }
@media (hover: hover) and (pointer: fine) { .drop-zone:hover { background: var(--glass-3); border: 0; } }
.drop-zone__icone { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 18px; background: var(--pill); color: var(--on-pill); transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.drop-zone__icone svg { width: 26px; height: 26px; }
.drop-zone.survol .drop-zone__icone { transform: translateY(-4px) scale(1.06); }
.drop-zone__titre { font-size: 15px; font-weight: 600; color: var(--text); }
.drop-zone__ou { font-size: 12.5px; color: var(--faint); }
.drop-zone__bouton { margin-top: 4px; cursor: pointer; }
.drop-zone__format { margin-top: 6px; font-size: 12px; color: var(--faint); }
@media (pointer: coarse) { .drop-zone { min-height: 0; } }
.modele-import { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border: 0; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--muted); }
#chargementAnalyse { margin-top: 14px; }
.import-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.import-stat { padding: 12px 14px; border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.import-stat__label { margin: 0; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: none; letter-spacing: 0; }
.import-stat__valeur { margin-top: 2px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.import-stat--ok .import-stat__valeur { color: var(--up); }
.import-stat--erreur .import-stat__valeur { color: var(--down); }
.import-stat--alerte .import-stat__valeur { color: var(--warn); }
#carteResume .alerte { margin-top: 14px; }
#carteResume .alerte .texte-sm { margin-top: 4px; }
#etatVideAnomalies { padding: 24px; }
.confirmation { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.confirmation .champ { width: 120px; margin: 0; }
.confirmation .input { width: 100%; }
.confirmation__texte { flex: 1; min-width: 200px; margin: 0; padding-bottom: 10px; font-size: 13.5px; color: var(--muted); }
.boutons-import { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
#chargementImport { padding: 0; }
.infos-base { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.infos-base dt { margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--faint); }
.infos-base dd { margin: 0; font-size: 13px; }
.chemin-base { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px !important; word-break: break-all; color: var(--muted); }
.import-colonne-secondaire .diviseur { height: 1px; margin: 18px 0; border: 0; background: var(--line); }
.bouton-plein { width: 100%; justify-content: center; }
.bouton-plein + .bouton-plein { margin-top: 6px; }
.ip-section { margin-top: var(--gap); }
.ip-grille { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .ip-grille { grid-template-columns: 1fr; } }
.ip-bloc { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 0; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ip-bloc__titre { margin: 0; font-size: 14.5px; font-weight: 600; }
.ip-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.ip-apercu { font-size: 13.5px; line-height: 1.5; }
.ip-apercu:empty { display: none; }
.ip-apercu ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.ca-liste li { border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ca-liste small { color: var(--faint); }

/* --- 13. Mes réglages ---------------------------------------------------------------------------------- */
.rg-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); align-items: start; }
.rg-aide { margin: -6px 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.rg-lignes { display: flex; flex-direction: column; }
.rg-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; font-weight: 500; }
.rg-ligne + .rg-ligne { border-top: 1px solid var(--line); }
.rg-ligne__nom { display: inline-flex; align-items: center; gap: 10px; }
.rg-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; }
.rg-champ { position: relative; display: inline-flex; }
.rg-champ .input { width: 96px; padding-right: 30px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rg-champ > span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; pointer-events: none; }
.rg-fixes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rg-fixe { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.rg-fixe--perdu { color: var(--down); background: var(--down-soft); }
.rg-fixe--gagne { color: var(--up); background: var(--up-soft); }
.rg-donnees { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rg-donnees .rg-aide { margin: 0; }
.rg-donnees__icone { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--pill); color: var(--on-pill); }
.rg-donnees__icone svg { width: 22px; height: 22px; }
.rg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: var(--gap); }
@media (max-width: 640px) { .rg-actions .btn { width: 100%; } }

/* --- 14. Connexion, invitation, Face ID : fond bleu nuit, carte claire à bandeau (body.page-connexion.cx) ------ */
html:has(body.cx) { background: #121238; }
body.page-connexion.cx { background: transparent; color: var(--text); font-family: var(--font); }
body.page-connexion.cx::before { display: none; }
.cx .halos span:nth-child(1) { background: #272757; opacity: .75; }
.cx .halos span:nth-child(2) { background: #1d1d4f; opacity: .9; }
.cx .halos span:nth-child(3) { background: #2f2f66; opacity: .55; }
body.cx .connexion { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; max-width: none; min-height: 100dvh; padding: calc(32px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); text-align: left; }
@media (max-width: 560px) { body.cx .connexion { justify-content: flex-start; padding-top: calc(7vh + env(safe-area-inset-top)); } }
.cx__boite { width: min(420px, 100%); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px #ffffff14, 0 30px 70px -20px #05051acc; overflow: hidden; animation: cx-boite .5s var(--ease-out) both; }
@keyframes cx-boite { from { opacity: 0; transform: translateY(22px) scale(.98); } }
body.cx .connexion__marque { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 24px 24px; background: linear-gradient(180deg, #30306a, var(--tile-ink)); color: #f3f7f8; text-align: center; animation: none; }
body.cx .connexion__logo-marque { width: 168px; margin: 0; animation: cx-logo .4s var(--ease-out) .1s both; }
body.cx .connexion__accroche { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .01em; text-transform: none; color: #f3f7f8c7; animation: none; }
body.cx .connexion__accroche span { color: #f3f7f8; font-weight: 700; }
body.cx .connexion__carte { width: auto; max-width: none; margin: 0; padding: 24px; border: 0; border-radius: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; color: var(--text); text-align: left; animation: none; }
body.cx .connexion__carte.connexion__carte--secousse { animation: connexion-secousse .45s ease; }
body.cx .connexion__titre { margin: 0 0 16px; font-size: 24px; font-weight: 600; letter-spacing: -.025em; color: var(--text); }
body.cx .connexion__label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
body.cx .connexion__champ { height: 48px; border: 0; border-radius: 16px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); }
body.cx .connexion__champ:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--text); }
body.cx .connexion__champ--erreur { box-shadow: 0 0 0 1px var(--down), 0 0 0 4px var(--down-soft); }
body.cx .connexion__champ--identifiant { margin-bottom: 14px; }
body.cx .connexion__icone, body.cx .connexion__champ:focus-within .connexion__icone { width: 18px; height: 18px; margin: 0 2px 0 14px; stroke: var(--faint); stroke-width: 1.8; }
body.cx .connexion__champ input { padding: 0 12px; color: var(--text); letter-spacing: 0; }
body.cx .connexion__champ input::placeholder { color: var(--faint); letter-spacing: .04em; }
body.cx .connexion__oeil { width: 36px; height: 36px; margin-right: 6px; border-radius: 50%; color: var(--faint); }
body.cx .connexion__oeil svg { width: 18px; height: 18px; stroke-width: 1.8; }
@media (hover: hover) and (pointer: fine) { body.cx .connexion__oeil:hover { background: var(--well); color: var(--text); } }
body.cx .connexion__oeil:focus-visible { outline: 2px solid var(--text); }
body.cx .connexion__majuscules { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; color: var(--warn); }
body.cx .connexion__erreur { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px; border: 0; border-radius: var(--r-sm); background: var(--down-soft); color: var(--down); font-size: 13px; font-weight: 600; }
body.cx .connexion__bouton { width: 100%; height: 50px; margin-top: 18px; border: 0; border-radius: 16px; background: var(--pill); color: var(--on-pill); box-shadow: none; filter: none; font-size: 15px; font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { body.cx .connexion__bouton:hover { background: var(--navy-deep); box-shadow: none; filter: none; } }
body.cx .connexion__bouton:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
body.cx .connexion__bouton--cle, body.cx .connexion__carte--reduite .connexion__bouton--devoiler { margin-top: 0; }
body.cx .connexion__visage, body.cx .connexion__fleche { width: 18px; height: 18px; stroke-width: 1.8; }
body.cx .connexion__ou { margin: 18px 0; color: var(--faint); }
body.cx .connexion__ou::before, body.cx .connexion__ou::after { background: var(--line-2); }
body.cx .connexion__cle-message { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--down); text-align: center; }
body.cx .inv-etapes { gap: 6px; margin-bottom: 18px; }
body.cx .inv-etapes span { height: 5px; border-radius: var(--r-pill); background: var(--well); }
body.cx .inv-etapes span.ok { background: var(--primary); }
body.cx .inv-texte { margin: -6px 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
body.cx .inv-identifiant { display: inline-flex; align-items: center; height: 30px; margin-bottom: 16px; padding: 0 12px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
body.cx .inv-gros-face { width: 96px; height: 96px; display: grid; place-items: center; margin: 4px auto 20px; border-radius: 30px; background: var(--pill); color: var(--on-pill); animation: cx-visage 2.2s cubic-bezier(.2,.6,.3,1) infinite; }
body.cx .inv-gros-face svg { width: 48px; height: 48px; stroke-width: 1.6; }
@keyframes cx-visage { 0% { box-shadow: 0 0 0 0 #2727574d; } 80%, 100% { box-shadow: 0 0 0 18px #27275700; } }
body.cx .inv-petit { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--faint); }
body.cx .inv-petit a { color: var(--muted); font-weight: 600; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* Étape Face ID passable (27/10/2026) : « Plus tard » en bouton secondaire, sous l'activation */
body.cx .connexion__bouton.connexion__bouton--secondaire { margin-top: 10px; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (hover: hover) and (pointer: fine) { body.cx .connexion__bouton.connexion__bouton--secondaire:hover { background: var(--well); } }
body.cx .connexion__bouton.connexion__bouton--secondaire::before { display: none; }
body.cx .connexion__bouton:disabled { opacity: .5; cursor: default; }
body.cx .inv-plus-tard { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
body.cx .inv-plus-tard b { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .cx__boite, body.cx .connexion__logo-marque, body.cx .inv-gros-face { animation: none; } }

/* --- 15. Administration -------------------------------------------------------------------------------- */
.pastille { gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.pastille::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-vert { color: var(--up); background: var(--up-soft); }
.p-gris { color: var(--muted); background: var(--well); }
.p-orange { color: var(--warn); background: var(--warn-soft); }
.p-bleu { color: var(--primary); background: var(--primary-soft); }
.p-nuit { color: var(--on-pill); background: var(--pill); }
/* Comptes */
.ac-lien { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: center; margin-bottom: var(--gap); padding: 18px 20px; border: 0; border-radius: var(--r); background: var(--tile-ink); box-shadow: none; color: #f3f7f8; }
.ac-lien__texte b { display: block; font-size: 15px; font-weight: 600; }
.ac-lien__texte span { font-size: 12.5px; color: #f3f7f8b3; }
.ac-lien__adresse { order: 3; grid-column: 1 / -1; display: block; min-width: 0; padding: 10px 14px; border: 0; border-radius: var(--r-sm); background: #ffffff14; color: #f3f7f8; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; word-break: break-all; -webkit-user-select: all; user-select: all; }
.ac-lien__actions { order: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.ac-lien .btn { height: 34px; font-size: 12.5px; }
.ac-lien .btn--primaire { background: #f3f7f8; color: var(--navy); box-shadow: none; }
.ac-lien .ac-lien__clair, .ac-lien .ac-lien__fermer { background: #ffffff1f; color: #f3f7f8; box-shadow: none; }
.ac-lien__fermer { width: 34px; padding: 0; justify-content: center; }
@media (max-width: 560px) { .ac-lien { grid-template-columns: 1fr; } .ac-lien__actions .btn:not(.ac-lien__fermer) { flex: 1; } }
.ac-table td { height: 62px; }
.ac-personne { gap: 12px; min-width: 0; }
.ac-personne > div { font-weight: 600; }
.ac-personne small, .ac-sous { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--faint); }
.ac-avatar { width: 36px; height: 36px; background: var(--avatar-bg); color: var(--avatar-text); font-size: 12px; }
.ac-avatar--admin { background: var(--pill); color: var(--on-pill); }
.ac-actions { gap: 6px; }
.ac-plus { width: 32px; padding: 0; justify-content: center; font-size: 16px; font-weight: 700; }
.ac-menu { min-width: 260px; padding: 6px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); transform-origin: top right; }
.ac-menu button { border-radius: 10px; color: var(--text); font-family: var(--font); }
.ac-menu button[data-action-compte="desactiver"], .ac-menu button[data-action-compte="supprimer"] { color: var(--down); }
.ac-menu hr { margin: 6px 4px; border-top-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .ac-menu button:hover { background: var(--well); } }
.ac-journal { margin-top: var(--gap); }
.ac-journal__aide { margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
.ac-journal__liste { margin: 0; }
.ac-journal__liste li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 0; font-size: 13.5px; }
.ac-journal__liste li + li { border-top: 1px solid var(--line); }
.ac-journal__quand { width: auto; color: var(--faint); }
@media (max-width: 560px) { .ac-journal__liste li { grid-template-columns: 1fr; gap: 2px; } }
/* Équipe */
#tableEquipe td { height: 58px; }
.ae-barre { width: 140px; height: 8px; border-radius: var(--r-pill); background: var(--well); }
.ae-barre i { border-radius: var(--r-pill); background: var(--c4); }
.ae-barre--avance i { background: var(--up); }
.ae-barre em { top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--navy-deep); box-shadow: 0 0 0 1.5px var(--surface); }
.ae-pct { margin-left: 10px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.ae-test td { color: var(--faint); }
.ae-aide { margin-top: 12px; font-size: 12.5px; color: var(--faint); line-height: 1.5; }
/* Pipe d'équipe */
.ape-etapes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 900px) { .ape-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ape-etape { padding: 16px 18px; border-radius: var(--r); }
.ape-etape:first-child { background: var(--tile-ink); box-shadow: none; color: #f3f7f8; }
.ape-etape small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ape-etape:first-child small { color: #f3f7f8c7; }
.ape-etape b { margin: 8px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ape-etape span { color: var(--faint); }
.ape-etape:first-child span { color: #f3f7f8b3; }
.filtres.ape-filtres { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.ape-filtre { display: flex; align-items: center; gap: 8px; }
.ape-filtre .libelle-filtre { margin-left: 0; }
.ape-filtre .select { width: auto; min-width: 140px; height: 36px; }
.ape-filtres .search-field { position: relative; flex: 0 1 260px; min-width: 180px; }
.ape-filtres .search-field .input { height: 36px; border-radius: var(--r-pill); }
@media (max-width: 560px) { .filtres.ape-filtres { flex-direction: column; align-items: stretch; } .ape-filtre .select { flex: 1; } .ape-filtres .search-field { flex: 1 1 auto; } }
#tablePipeEquipe thead th.pp-pond { background: transparent; color: var(--muted); }
#tablePipeEquipe tbody td.pp-pond, #tablePipeEquipe tfoot td.pp-pond { background-color: #27275708; font-weight: 600; }
/* Activité */
.aa-grille { grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 1000px) { .aa-grille { grid-template-columns: 1fr; } }
.aa-liste li { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 12px; padding: 11px 0; border-bottom: 0; font-size: 13.5px; }
.aa-liste li + li { border-top: 1px solid var(--line); }
.aa-liste b { font-weight: 600; }
.aa-liste small { color: var(--faint); }
.aa-quand { width: auto; font-size: 12.5px; color: var(--faint); }
@media (max-width: 560px) { .aa-liste li { grid-template-columns: 1fr; gap: 2px; } }

/* =============================================================================================================
   16. Design v3 « contrasté » (29/10/2026, maquettes design-mockups/v3-contraste/ approuvées) — l'emporte sur tout
       ce qui précède : contrastes de la première version (fond gris franc, cartes blanches à contour, textes foncés,
       tableaux à en-tête bleu nuit et lignes alternées), barre latérale. Toutes les animations sont gardées.
   ============================================================================================================= */
:root {
  --bg: #e4e4eb;
  --glass: #ffffff;  --glass-2: #ffffff;  --glass-3: #ffffff;
  --rim: #d5d5e1;                       /* le liseré intérieur des cartes devient un vrai contour */
  --surface: #ffffff;  --surface-2: #f5f5f9;
  --well: #e9e9f1;
  --line: #e0e0ea;  --line-2: #c6c6d6;
  --text: #15153a;  --muted: #383852;  --faint: #5b5b74;
  --pill: #272757;  --on-pill: #ffffff;
  --primary: #272757;  --primary-soft: #e5e5f1;  --primary-ink: #1b1b42;  --primaire-vif: #4a4a92;
  --tile-ink: #272757;  --tile-white: #ffffff;  --tile-tint-1: #ffffff;  --tile-tint-2: #ffffff;
  --up: #1a7a4a;    --up-soft: #ddf1e6;
  --down: #c4283d;  --down-soft: #fbe3e6;
  --warn: #a85a12;  --warn-soft: #fcebd9;
  --avatar-bg: #e5e5f1;  --avatar-text: #272757;
  --barre: #15153a;  --barre-iphone: #15153a;
  --zebre: #f2f2f7;  --survol: #e5e5f1;  --total: #dcdcec;
  --r-sm: 12px;  --r: 16px;  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(21,21,58,.06), 0 6px 18px rgba(21,21,58,.09);
  --shadow-lift: 0 4px 10px rgba(21,21,58,.16), 0 18px 36px -8px rgba(21,21,58,.32);
  --shadow-seg: 0 4px 12px -4px rgba(39,39,87,.6);
  --lateral-l: 248px;
  /* Ancienne palette (écrans encore stylés par socle / ecrans / finitions) : valeurs v3 */
  --couleur-fond: #e4e4eb;  --fond-page: #e4e4eb;  --surface-0: #ffffff;  --surface-1: #f5f5f9;
  --bordure: #e0e0ea;  --bordure-forte: #c6c6d6;
  --texte-principal: #15153a;  --texte-secondaire: #383852;  --texte-tertiaire: #5b5b74;
  --tableau-entete: #272757;  --tableau-entete-texte: #ffffff;  --tableau-zebre: #f2f2f7;  --tableau-survol: #e5e5f1;
  --tableau-trait: #e0e0ea;  --tableau-total: #dcdcec;  --barre-haut: #15153a;
  --couleur-rouge: #c4283d;  --couleur-vert: #1a7a4a;  --couleur-orange: #a85a12;
  --couleur-succes: #1a7a4a;  --couleur-erreur: #c4283d;  --couleur-bordure: #e0e0ea;  --couleur-texte-secondaire: #383852;
  --ombre-indicateur: var(--shadow);  --ombre-bloc: var(--shadow);  --ombre-survol: var(--shadow-lift);  --ombre-survol-bloc: var(--shadow);
}
html, html:has(body), body { background: var(--bg); }
body:not(.cx) .halos span { background: #fff; filter: blur(80px); opacity: .45; }   /* halos blancs discrets dans l'appli ; la connexion garde ses halos bleu nuit (§ 14) */

/* ---------- Cadre : contenu à droite de la barre latérale ---------- */
.app { max-width: none; margin: 0; padding: 26px 32px 48px calc(var(--lateral-l) + 32px); }
.app .page { max-width: 1720px; }

/* ---------- Barre latérale (première version, modernisée) ---------- */
@property --haut { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --bas  { syntax: "<length>"; inherits: false; initial-value: 0px; }
.lateral { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--lateral-l); display: flex; flex-direction: column; padding: 22px 14px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: var(--barre); color: #fff; }
.lateral::-webkit-scrollbar { display: none; }
.lateral__logo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 18px; color: inherit; text-decoration: none; }
.lateral__logo img { width: 150px; height: auto; }
.lateral__logo span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.lateral__recherche { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; flex: none; padding: 0 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.72); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.lateral__recherche svg { width: 16px; height: 16px; flex: none; }
.lateral__recherche kbd { margin-left: auto; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.1); font: 600 11px var(--font); }
.lateral__section { margin: 26px 12px 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.lateral__recherche + .lateral__section { margin-top: 18px; }
.lateral__lien { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; flex: none; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.8); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; text-align: left; text-decoration: none; cursor: pointer; transition: color .2s, background-color .2s; }
.lateral__lien svg { width: 18px; height: 18px; flex: none; }
.lateral__lien[aria-current="page"] { color: #fff; }
.lateral__lien[aria-pressed="true"] { color: #8beab6; }
@media (hover: hover) and (pointer: fine) {
  .lateral__lien:hover { color: #fff; }
  .lateral__recherche:hover { background: rgba(255,255,255,.1); }
  a.lateral__logo:hover, a.haut-mobile__logo:hover { text-decoration: none; }
}
/* Page active : pilule qui glisse et s'étire (bord avant d'abord), héritière de la pilule des onglets */
.lateral__pilule { position: absolute; left: 14px; right: 14px; top: var(--haut); height: calc(var(--bas) - var(--haut)); border-radius: 12px; background: var(--primaire-vif); box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); pointer-events: none; }
.lateral > *:has(+ .lateral__pied) { margin-bottom: 24px; }
.lateral__pied { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.lateral__profil { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; color: rgba(255,255,255,.75); font-size: 12.5px; }
.lateral__profil b { display: block; color: #fff; font-size: 13.5px; }
.lateral__avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--primaire-vif); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
[data-commissions="non"] .lateral__lien--commissions { display: none; }

/* ---------- Barre du haut + tiroir (≤ 1100 px), barre d'onglets (≤ 768 px) ---------- */
.haut-mobile { display: none; }
.voile { display: none; }
@media (max-width: 1100px) {
  html, html:has(body) { background: var(--barre); }
  .app { padding: 0 var(--gut) 40px; }
  .haut-mobile { position: sticky; top: 0; z-index: 45; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 12px; margin: 0 calc(-1 * var(--gut)) 18px; padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 10px; background: var(--barre); }
  .haut-mobile__logo { justify-self: center; }
  .haut-mobile__logo img { height: 34px; width: auto; display: block; }
  .haut-mobile .rond { width: 40px; height: 40px; background: rgba(255,255,255,.1); box-shadow: none; color: #fff; }
  .lateral { width: min(300px, 84vw); z-index: 62; transform: translateX(-102%); visibility: hidden; transition: transform .38s cubic-bezier(.32,.72,0,1), visibility 0s .38s; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  body.lateral-ouvert .lateral { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.32,.72,0,1); }
  .voile { display: block; position: fixed; inset: 0; z-index: 61; background: rgba(10,10,40,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.lateral-ouvert .voile { opacity: 1; pointer-events: auto; }
}
@media (max-width: 768px) {
  .app { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
  .barre-onglets { width: min(calc(100% - 24px), 460px); }
  .barre-onglets__capsule { height: 60px; background: var(--barre-iphone); }
  .barre-onglets__pastille { background: var(--primaire-vif); }
  .barre-onglets__lien { opacity: .78; }
  .barre-onglets__ajout { width: 60px; height: 60px; background: var(--primaire-vif); }
  body.barre-reduite .barre-onglets__capsule { flex: 0 0 60px; width: 60px; }
}

/* ---------- Titres ---------- */
.page__titre, .titre-page, .page h1 { font-weight: 700; white-space: nowrap; }
.page__salut { color: var(--muted); font-weight: 600; }
.page__sous-titre { color: var(--faint); font-weight: 600; }
.titre-ligne, .page__entete { flex-wrap: wrap; row-gap: 12px; }

/* ---------- Cartes et tuiles : blanches, nettes ---------- */
.carte, .table-conteneur { background: #fff; box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.carte__titre { font-size: 16px; font-weight: 700; }
.kpi-card { background: #fff; box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.kpi-grille > .kpi-card:nth-child(n+2), .kpis .kpi-card:nth-child(n+2) { background: #fff; box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.kpi-grille > .kpi-card:nth-child(1), .kpis .kpi-card:nth-child(1) { background: var(--tile-ink); box-shadow: 0 8px 20px -10px rgba(39,39,87,.7); }
.kpi-card__label { font-size: 13px; font-weight: 700; }
.kpi-card__valeur { font-weight: 700; }
.kpi-card__lien { color: var(--primaire-vif); font-weight: 700; border-top-color: var(--line); }
.kpis .kpi-card:nth-child(1) .kpi-card__lien { color: #fff; }

/* ---------- Pilules (années, filtres, onglets de page) : bleu nuit pleine ---------- */
.segmented { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented__pilule { background: var(--pill); box-shadow: var(--shadow-seg); }
.segmented button { color: var(--muted); font-weight: 700; }
.segmented button[aria-pressed="true"] { color: #fff; }
.sous-onglets { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sous-onglets__pilule { background: var(--pill); box-shadow: var(--shadow-seg); }
.sous-onglet { color: var(--muted); font-weight: 700; }
.sous-onglet[aria-selected="true"] { color: #fff; }
.sous-onglet[aria-selected="true"] .compteur-onglet { background: rgba(255,255,255,.2); color: #fff; }
.onglets { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.onglet.actif, .onglet[aria-selected="true"] { background: var(--pill); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .segmented button:not([aria-pressed="true"]):hover, .sous-onglet:not([aria-selected="true"]):hover { color: var(--text); }
}

/* ---------- Boutons et champs ---------- */
.btn, .btn--secondaire { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 700; }
.btn--primaire { background: var(--pill); color: #fff; box-shadow: 0 6px 16px -6px var(--pill); }
.btn--fantome, .btn--icone { background: transparent; box-shadow: none; }
.btn--danger { background: var(--down); color: #fff; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { background: var(--surface-2); }
  .btn--primaire:not(:disabled):hover { background: var(--primary-ink); color: #fff; }
  .btn--fantome:not(:disabled):hover, .btn--icone:not(:disabled):hover { background: var(--well); }
}
.input, .select { background-color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Tableaux : en-tête bleu nuit, lignes alternées, survol teinté, total marqué (première version) ---------- */
.table thead th { background: var(--pill); color: #fff; font-size: 12.5px; font-weight: 700; border-bottom: 0; padding-top: 11px; padding-bottom: 11px; }
.table thead th.th-tri-asc, .table thead th.th-tri-desc { color: #fff; }
.table thead th.th-tri-asc::after, .table thead th.th-tri-desc::after, .table thead th.th-tri-asc.num::before, .table thead th.th-tri-desc.num::before { color: #a9a9db; }
@media (hover: hover) and (pointer: fine) { .table thead th.th-triable:hover { background-color: #34346b; color: #fff; } }
.table thead th.th-triable:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.table td { color: var(--text); border-bottom-color: var(--line); }
.table tbody tr:nth-child(even) { background: var(--zebre); }
@media (hover: hover) and (pointer: fine) { .table tbody tr:hover, .table tbody tr:hover td { background: var(--survol); } }
.table tfoot td, .table .ligne-total td { background: var(--total); font-weight: 700; border-top: 0; }
.table-conteneur { border-radius: var(--r-lg); }
.type, .badge--type-srv, .badge--type-dis, .badge--type-mixte { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.vignette { background: var(--primary-soft); color: var(--primary); }
.barre-mini__rempli { background: var(--primaire-vif); }
/* Téléphone : lignes compactes (tableaux.js), sans lignes alternées ; le total garde sa teinte sur toute la ligne */
@media (max-width: 640px) {
  .table tbody tr:nth-child(even) { background: transparent; }
  .table tfoot td, .table .ligne-total td { background: transparent; }
  .table tfoot tr, .table tr.ligne-total { background: var(--total); }
}

/* ---------- Types de commande : palette vérifiée (bleu nuit, orange, lavande ; lisible pour les daltoniens) ---------- */
:root { --type-srv: #4a4a92;  --type-dis: #e0774a;  --type-mixte: #a3a3c9;  --type-vide: #d6d6d0; }

/* ---------- Tableaux dans une carte : arrondis, dans la marge de la carte (plus bord à bord) ---------- */
.carte .table-bord { margin: 0; border-radius: 12px; }
.carte .table-bord .table th:first-child, .carte .table-bord .table td:first-child { padding-left: 14px; }
.carte .table-bord .table th:last-child, .carte .table-bord .table td:last-child { padding-right: 14px; }
.carte--tableau .table-bord, .carte--liste .table-bord { border-radius: 0; }
@media (max-width: 560px) { .carte .table-bord { margin: 0 -16px; border-radius: 0; } }
th, td.num, .pastille-marge, .type { white-space: nowrap; }

/* ---------- Tableau de bord (lot 2 du design v3) ---------- */
/* Tuiles : pastille d'icône colorée en haut à droite (sauf la commission, qui a son œil) */
.kpi-card__pastille { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.kpi-card__pastille svg { width: 18px; height: 18px; }
.kpi-card__pastille--vert { background: var(--up-soft); color: var(--up); }
.kpis .kpi-card:nth-child(1) .kpi-card__pastille { background: rgba(255,255,255,.16); color: #fff; }
.kpis .kpi-card__label { padding-right: 42px; }
@media (max-width: 560px) { .kpi-card__pastille { top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; } .kpi-card__pastille svg { width: 15px; height: 15px; } }
/* Chiffres des tuiles (29/10/2026) : taille calée sur la vraie largeur des chiffres d'Urbanist gras (≈ 0,45 em par caractère,
   espacement compris, mesuré sur la police) au lieu de 0,6 ; marges intérieures réduites. Seul le tableau de bord donne la
   longueur des montants (--caracteres, dashboard.js) : les autres pages gardent la marge de sécurité. Valeurs alignées d'une
   tuile à l'autre même quand un libellé passe sur deux lignes (« Nouveaux clients » en tuile étroite). */
#kpiGrille .kpi-card { padding: 16px 16px 14px; }
#kpiGrille .kpi-card__valeur { font-size: min(44px, calc(100cqi / (var(--caracteres, 8) * .5))); line-height: 1.05; }
/* Taille propre à chaque tuile (dashboard.js › caler, 30/10/2026) : chiffres posés sur une même ligne de base, en bas d'une
   zone de la hauteur du plus grand chiffre possible */
#kpiGrille .kpi-card__valeur { display: flex; align-items: flex-end; min-height: 46px; }
#kpiGrille .kpi-card__label { line-height: 1.3; }
@container (max-width: 210px) { #kpiGrille .kpi-card__label { min-height: 2.6em; } }
@media (max-width: 560px) { #kpiGrille .kpi-card__label { min-height: 0; } #kpiGrille .kpi-card { padding: 14px 14px 12px; } #kpiGrille .kpi-card__valeur { font-size: min(30px, calc(100cqi / (var(--caracteres, 8) * .5))); min-height: 32px; } }

/* Objectif : jauge graduée colorée (vert en avance / atteint, rouge en retard), halo qui monte du bas de la carte */
.carte.jauge-carte { position: relative; overflow: hidden; background: var(--tile-ink); color: #f3f7f8; box-shadow: 0 8px 22px -10px rgba(39,39,87,.7); }   /* la règle « cartes blanches » v3 ne s'y applique pas */
.jauge-carte::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s; }
.jauge-carte[data-ton="vert"]::before { opacity: 1; background: radial-gradient(90% 70% at 50% 108%, rgba(52,199,123,.38), transparent 70%); }
.jauge-carte[data-ton="rouge"]::before { opacity: 1; background: radial-gradient(90% 70% at 50% 108%, rgba(240,82,82,.4), transparent 70%); }
.jauge-carte > * { position: relative; }
.etat { height: 28px; padding: 0 12px; font-size: 13px; font-weight: 700; }
.etat--vert { background: #34c77b; color: #06301b; }
.etat--rouge { background: #f05252; color: #fff; }
.etat--orange { background: #f05252; color: #fff; }
/* Toujours en colonne : jauge en haut, message, puis les trois chiffres en cases (plus de chiffres serrés à côté) */
.jauge-carte__corps, .jauge-carte .jauge-carte__corps { display: flex; flex-direction: column; align-items: stretch; gap: 0; }   /* l'ancienne règle « grand écran » centrait : la jauge s'écrasait */
.cadran-zone, .jauge-carte .cadran-zone { --cadran-l: min(100%, 420px); }
.jauge-carte__texte, .jauge-carte .jauge-carte__texte { margin-top: 14px; align-items: stretch; }
.jauge-carte__phrase, .jauge-carte .jauge-carte__phrase { align-self: center; padding: 8px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700; text-align: center; }
.jauge-carte__phrase--vert { background: rgba(52,199,123,.18); color: #8beab6; }
.jauge-carte__phrase--rouge, .jauge-carte__phrase--orange { background: rgba(240,82,82,.2); color: #ffb0b0; }
.chiffres, .jauge-carte .chiffres { display: grid; grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 10px; margin: 14px 0 0; padding: 0; border: 0; }
.chiffres div, .chiffres div + div, .chiffres div:first-child { padding: 12px 14px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); }
.chiffres dt { font-weight: 600; color: rgba(255,255,255,.72); }
.chiffres dd { font-size: clamp(12px, 3.6cqi, 19px); font-weight: 700; }   /* cqi : largeur de la carte (conteneur « jauge ») */
@media (max-width: 560px) { .chiffres div, .chiffres div + div, .chiffres div:first-child { padding: 10px; } .chiffres dt { font-size: 11.5px; } }

/* Répartition : carte étroite (demi-écran, tablette) → la part du CA passe sous le type (la barre la montre déjà) */
.part-etroit { display: none; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--faint); }
#carteRepartition { container-type: inline-size; }
@container (max-width: 560px) {
  #carteRepartition .col-part { display: none; }
  #carteRepartition .part-etroit { display: block; }
}

/* ---------- Retouches écran par écran (lot 3 du design v3) ---------- */
/* Colonnes « pondéré » (Pipe, Pipe d'équipe) : même bandeau, un cran plus clair pour les repérer */
.table.pp-table thead th.pp-pond, #tablePipeEquipe thead th.pp-pond { background: #34346b; color: #fff; }
/* Renouvellements : en-tête figé de la liste des clients (fond bleu nuit), intertitres de mois plus marqués que les lignes alternées */
.rn-defile thead th { background: var(--pill); }
.table tbody tr.ligne-mois, .table tbody tr.ligne-mois:nth-child(even) { background: var(--total); }
.table tbody tr.ligne-mois td { color: var(--text); }

/* ---------- Survol : pas de soulignement dans les menus ; pastille de présélection qui glisse (cadre.js › Survol) ---------- */
a.lateral__lien, a.lateral__lien:hover, a.lateral__lien:focus, a.lateral__logo:hover, a.haut-mobile__logo:hover,
a.barre-onglets__lien:hover, .segmented a:hover, .sous-onglet:hover { text-decoration: none; }
.survol-fantome { position: absolute; z-index: 0; pointer-events: none; opacity: 0; will-change: transform;
  transition: transform .32s cubic-bezier(.165,.84,.44,1), width .32s cubic-bezier(.165,.84,.44,1), height .32s cubic-bezier(.165,.84,.44,1), opacity .2s; }
.survol-fantome.visible { opacity: 1; }
.segmented > .survol-fantome, .sous-onglets > .survol-fantome { top: 3px; left: 0; height: calc(100% - 6px); border-radius: var(--r-pill); background: var(--well); }
.sous-onglets > .survol-fantome { top: 4px; height: calc(100% - 8px); }
.lateral > .survol-fantome { left: 14px; right: 14px; top: 0; border-radius: 12px; background: rgba(255,255,255,.09); }
@media (prefers-reduced-motion: reduce) { .survol-fantome { transition: opacity .2s; } }

/* ---------- Répartition par type : deux barres comparées (CA / marge) + trois repères en bas, symétriques de l'objectif ---------- */
#carteRepartition { display: flex; flex-direction: column; }
.repartition__lignes { display: grid; gap: 8px; }
.repartition__ligne { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px; }
.repartition__libelle { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.repartition__lignes .repartition__barre { height: 12px; }
.repartition__chiffres { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin: auto 0 0; padding-top: 16px; }
.repartition__chiffres:empty { display: none; }
.repartition__chiffres > div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.repartition__chiffres dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.repartition__chiffres dd { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; font-size: clamp(14px, 3.4cqi, 19px); font-weight: 700; color: var(--text); white-space: nowrap; }
.repartition__chiffres dd .carre { width: 10px; height: 10px; }
.repartition__chiffres small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--faint); white-space: nowrap; }
@container (max-width: 420px) { .repartition__chiffres > div { padding: 10px; } .repartition__chiffres dt { font-size: 11.5px; } }

.repartition__legende-note { color: var(--faint); }

/* Cartes à fond propre : la règle « cartes blanches » v3 ne s'y applique pas (lien d'invitation bleu nuit, encadré de méthode) */
.carte.ac-lien { background: var(--tile-ink); box-shadow: 0 8px 22px -10px rgba(39,39,87,.7); color: #f3f7f8; }
.carte.carte--note { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }

/* Colonnes de pastilles (% marge, évolution) centrées sous leur titre (tableaux.js › centrerColonnesPastilles) */
@media (min-width: 641px) { .table th.col-pastille, .table td.col-pastille { text-align: center; } }

/* ---------- Téléphone : listes en lignes compactes (29/10/2026, retour sur Renouvellements ; vaut pour toutes les listes) ---------- */
@media (max-width: 640px) {
  /* Un seul trait, entre deux lignes : plus de trait sous chaque cellule (règle « .table td » des couches précédentes) */
  .table th, .table td, .table tfoot td, .table .ligne-total td { border: 0; }
  .table tr { padding: 11px 16px; }
  /* Ligne dépliée : détails aérés (libellé à gauche, valeur à droite), texte entier au lieu de « … » */
  .table tr.deplie td[data-role="detail"] { margin-top: 0; padding-top: 9px !important; font-size: 13px; line-height: 1.35; max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
  .table tr.deplie td[data-role="detail"]::before { font-weight: 600; color: var(--faint); }
  .table tr.deplie td[data-role="detail"] > div { white-space: normal; overflow: visible; text-overflow: clip; }
  /* Cellule à deux lignes (dénomination + périodicité) : les deux lignes l'une sous l'autre, à droite du libellé */
  .table tr.deplie td[data-role="detail"]:has(> div + div) { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: baseline; }
  .table tr.deplie td[data-role="detail"]:has(> div + div)::before { grid-row: span 2; }
  .table tr.deplie td[data-role="detail"]:has(> div + div) > div { grid-column: 2; text-align: right; }
  .table tr.deplie td[data-role="detail"]:has(> .groupe-statut) { gap: 8px; padding-top: 12px !important; }
  .table tr.deplie .groupe-statut { width: 100%; justify-content: stretch; }   /* trois boutons qui se partagent la ligne, sans déborder */
  .table tr.deplie .btn-statut { flex: 1 1 auto; min-width: 0; gap: 4px; padding: 0 4px; white-space: nowrap; }
  /* Barre de part dans le détail : piste lisible, pourcentage au bout */
  .table tr.deplie td[data-role="detail"] .barre-inline { flex: 0 1 62%; gap: 10px; }
  .table tr.deplie td[data-role="detail"] .barre-inline__piste { display: block; flex: 1; height: 6px; background: rgba(39,39,87,.13); }
  .table tr.deplie td[data-role="detail"] .barre-inline__libelle { min-width: 36px; text-align: right; }
  /* Années et onglets de page : pleine largeur, tous visibles */
  .entete-volet .segmented { width: 100%; }
  .sous-onglets { display: flex; width: 100%; }
  .sous-onglets .sous-onglet { flex: 1 1 auto; justify-content: center; gap: 5px; padding: 11px 6px; font-size: 13px; }
  .sous-onglets .compteur-onglet { min-width: 18px; padding: 0 5px; }
}
@media (max-width: 640px) {
  /* Pastille de type (Répartition du tableau de bord) en titre de ligne : elle garde sa forme et son carré de couleur
     (la règle « lien du titre en bloc coupé par … » l'étirait sur toute la ligne, 02/11/2026) */
  .table [data-role="titre"] > a.type { display: inline-flex; max-width: 100%; overflow: visible; }
  .table [data-role="titre"] > .part-etroit { margin-top: 4px; }
  /* En-têtes : la première lettre (« T » de « Type ») débordait d'un cheveu de la case et était rognée */
  .table thead th[data-role="titre"], .table thead th[data-role="montant"] { overflow: visible; }
}
.libelle-court { display: none; }
@media (max-width: 640px) { .libelle-long { display: none; } .libelle-court { display: inline; } }
/* Cartes « liste » / « tableau » (sans marge intérieure) : le tableau reste dans la carte, coins compris
   (la règle « .carte .table-bord » du téléphone le faisait déborder de 16 px de chaque côté) */
@media (max-width: 560px) {
  .carte.carte--tableau .table-bord, .carte.carte--liste .table-bord { margin: 0; }
  .carte.carte--tableau { overflow: hidden; }
}

/* ---------- Changement de page (30/10/2026) : plus d'à-coup avant l'entrée animée ----------
   Le contenu d'un écran refait reste caché jusqu'au départ de son entrée (classe posée dans <head> par base.html, retirée
   par cadre.js › Mouvement.entree ; filet : 2 s) ; avant, il s'affichait vide, disparaissait puis revenait. */
html.entree-attente .page[data-refonte] > :not(.titre-ligne):not(.page__entete):not(.barre-outils),
html.entree-attente .page[data-refonte] .sous-onglets { opacity: 0; }   /* le titre s'anime tout de suite, le contenu à l'arrivée des données */

/* =============================================================================================================
   17. Facturation (02/11/2026) — import des fichiers mensuels (page Import & sauvegarde, static/js/import_facturation.js)
   ============================================================================================================= */
#sectionFacturation .ip-grille { grid-template-columns: minmax(0, 1fr); }      /* aperçu large : tableau des clients */
.if-apercu { display: flex; flex-direction: column; gap: 10px; }
.if-apercu > p { margin: 0; }
.if-apercu .alerte ul { margin: 4px 0 0; padding-left: 18px; }
.if-ok { display: flex; align-items: center; gap: 8px; color: var(--up); font-weight: 600; }
.if-ok::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--up-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='4.5,8.5 7,11 11.5,5.5' fill='none' stroke='%231a7a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.if-remplace { padding: 8px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.if-note { font-size: 12.5px; color: var(--faint); }
.if-colonnes { border-radius: var(--r-sm); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.if-colonnes > summary { padding: 10px 14px; font-weight: 700; cursor: pointer; list-style: none; }
.if-colonnes > summary::-webkit-details-marker { display: none; }
.if-colonnes > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform .2s; }
.if-colonnes[open] > summary::before { transform: rotate(90deg); }
.if-colonnes > :not(summary) { margin: 0 14px 12px; }
.if-trouves { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.if-col { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 6px; background: var(--well); font-size: 11px; font-weight: 700; color: var(--faint); }
.if-douteux { padding-left: 18px; font-size: 12.5px; color: var(--warn); }
.if-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.if-champ { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.if-champ--obligatoire { color: var(--down); }
.if-sous-titre { margin: 4px 0 0; font-size: 14.5px; font-weight: 700; }
.if-bloc-clients { display: flex; flex-direction: column; gap: 8px; }
.if-bloc-clients .table-bord { margin: 0; border-radius: 12px; overflow: hidden; }
.if-clients .select { width: 100%; min-width: 200px; }
.if-statut { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.if-statut--nouveau { color: var(--warn); background: var(--warn-soft); }
.if-statut--propose { color: var(--primary); background: var(--primary-soft); }
.if-statut--identique, .if-statut--memorise { color: var(--up); background: var(--up-soft); }
.if-lots .table-bord { margin: 0; border-radius: 12px; overflow: hidden; }
@media (max-width: 640px) {
  .if-clients .select { min-width: 0; }
  .table tr.deplie td[data-role="detail"]:has(> .select) { flex-direction: column; align-items: stretch; gap: 6px; }
}

/* --- 17 b. Onglet Facturation (templates/facturation.html, static/js/facturation.js ; maquette validée le 02/11/2026) --- */
:root { --fa-commande: #c9c9dc; }                                   /* série « commandé » : barre claire à côté du facturé */
.fa-carre-commande { background: var(--fa-commande); }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
@media (max-width: 1100px) { .col-8, .col-4 { grid-column: 1 / -1; } }
.fa-annees { justify-content: flex-start; }
.carte--tableau > .fa-entete-tableau { padding: 18px 24px 12px; margin: 0; flex-wrap: wrap; align-items: baseline; }
@media (max-width: 560px) { .carte--tableau > .fa-entete-tableau { padding: 16px 16px 10px; } }
.fa-ecart--plus { color: var(--warn); font-weight: 600; }
.fa-ecart--moins { color: var(--muted); }
.fa-reste { font-weight: 700; }
.fa-avoir { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; color: var(--down); background: var(--down-soft); vertical-align: 1px; }
.table tbody tr.fa-non-importe td { color: var(--faint); }
.fa-part { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.fa-part__piste { position: relative; width: 110px; height: 8px; border-radius: var(--r-pill); background: var(--well); overflow: hidden; }
.fa-part__rempli { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill); background: var(--c1); transform-origin: 0 50%; }
.fa-part__rempli--depasse { background: var(--warn); }
.fa-part__valeur { min-width: 42px; text-align: right; font-weight: 600; }
@media (max-width: 640px) {
  .fa-part__piste { width: 64px; }
  .table tr.deplie td[data-role="detail"] .fa-part { flex: 0 1 62%; }
}

/* Objectif de marge sur le facturé : carte bleu nuit, barre verte (en avance) ou rouge (en retard), repère « attendu à date » */
.carte.fa-objectif { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--tile-ink); color: #f3f7f8; box-shadow: 0 8px 22px -10px rgba(39,39,87,.7); --ton: rgba(255,255,255,.35); --ton-texte: #15153a; container-type: inline-size; }
.fa-objectif[data-ton="vert"] { --ton: #34c77b; --ton-texte: #06301b; }
.fa-objectif[data-ton="rouge"] { --ton: #f05252; --ton-texte: #fff; }
.fa-objectif::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s; }
.fa-objectif[data-ton="vert"]::before { opacity: 1; background: radial-gradient(90% 70% at 50% 110%, rgba(52,199,123,.38), transparent 70%); }
.fa-objectif[data-ton="rouge"]::before { opacity: 1; background: radial-gradient(90% 70% at 50% 110%, rgba(240,82,82,.4), transparent 70%); }
.fa-objectif > * { position: relative; }
.fa-objectif .carte__titre { color: #f3f7f8; }
#objectifFa { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.fa-objectif__pct { font-size: clamp(34px, 16cqi, 50px); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.fa-objectif__sous { margin-top: -8px; font-size: 13px; color: #f3f7f8b8; }
.fa-objectif__piste { position: relative; height: 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); }
.fa-objectif__rempli { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill); background: var(--ton); transform-origin: 0 50%; }
.fa-objectif__repere { position: absolute; top: -6px; bottom: -6px; width: 3px; border-radius: 2px; background: #f3f7f8; box-shadow: 0 0 0 2px var(--tile-ink); }
.fa-objectif__echelle { display: flex; justify-content: space-between; margin-top: -6px; font-size: 11px; color: #f3f7f8a6; }
.fa-objectif__etat { align-self: flex-start; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; background: var(--ton); color: var(--ton-texte); }
.fa-objectif__chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: auto 0 0; }
.fa-objectif__chiffres div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); min-width: 0; }
.fa-objectif__chiffres dt { font-size: 11.5px; font-weight: 600; color: #f3f7f8b8; }
.fa-objectif__chiffres dd { margin: 3px 0 0; font-size: clamp(12px, 4.4cqi, 16px); font-weight: 700; white-space: nowrap; }
.fa-objectif__vide { margin: 0; color: #f3f7f8c7; }
.fa-objectif__lien { align-self: flex-start; }

/* =============================================================================================================
   18. Compte Direction commerciale (23/11/2026) — body[data-espace="direction"] : filtres Commercial / Département,
       sigles, lecture seule (commandes du fichier), page Commerciaux (commerciaux.js), import du fichier (import_direction.js)
   ============================================================================================================= */
.filtres-direction { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.filtres-direction__champ { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted, #5b5b78); }
.filtres-direction__champ .select { min-width: 150px; }
.filtres-direction--actif .select { box-shadow: 0 0 0 2px var(--c1, #272757); }
.barre-outils .filtres-direction { margin-left: auto; }
.carte__entete .filtres-direction__champ { margin-left: 12px; }
.sigle { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: #272757; color: #fff;
         font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.fiche__commercial { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.ae-barre + .ae-pct { margin-left: 6px; }
.dc-aide { margin: 6px 4px 18px; font-size: 13px; color: var(--muted, #5b5b78); }
.carte .dc-aide { margin: 0 0 12px; }
.dc-liens { white-space: nowrap; }
.dc-liens a { font-size: 13px; font-weight: 600; margin-right: 10px; }
.texte-xs.dc-liens { margin-top: 3px; }
.texte-xs.dc-liens a { font-size: 11.5px; font-weight: 600; color: var(--muted, #5b5b78); }
@media (hover: hover) and (pointer: fine) { .texte-xs.dc-liens a:hover { color: #272757; } }
.dc-objectif { min-width: 150px; }
.dc-objectif .lien-nom, .dc-objectif .dc-montant { display: block; font-weight: 600; }
.dc-objectif .ae-barre { display: inline-block; vertical-align: middle; width: 80px; margin: 6px 0 0; }
.dc-objectif .ae-pct { display: inline-block; vertical-align: middle; margin: 6px 0 0 8px; }
.dc-evol--hausse { color: var(--up, #1f8a4c); font-weight: 600; }
.dc-evol--baisse { color: var(--couleur-rouge); font-weight: 600; }
.carte--alerte { box-shadow: inset 4px 0 0 var(--couleur-orange), var(--ombre-bloc); }
.lien-nom .sigle { margin-right: 4px; }
/* Import du fichier de la Direction */
.id-apercu { display: flex; flex-direction: column; gap: 12px; }
.id-apercu > p, .id-apercu h4 { margin: 0; }
.id-titre { font-size: 14px; }
.id-alerte { color: var(--couleur-rouge); font-weight: 600; }
.id-anomalies { padding: 12px 14px; border-radius: 12px; background: rgba(224,123,42,.08); box-shadow: inset 3px 0 0 var(--couleur-orange); }
.id-anomalies h4 { color: #9a4a12; margin-bottom: 4px; }
.id-details summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.id-details[open] summary { margin-bottom: 8px; }
/* Lecture seule : rien ne modifie les commandes, les clients ni le suivi des renouvellements */
[data-espace="direction"] .actions--lecture .btn:not(:first-child),
[data-espace="direction"] .btn-statut,
[data-espace="direction"] #modalAnnee .btn--icone { display: none; }
@media (max-width: 640px) {
  .filtres-direction { width: 100%; }
  .filtres-direction__champ { flex: 1 1 100%; justify-content: space-between; }
  .filtres-direction__champ .select { flex: 1; }
  .barre-outils .filtres-direction { margin-left: 0; }
}
/* Commandes du compte Direction : colonnes Commercial, Dép., Jours avant Type (largeurs de finitions.css décalées) */
@media (min-width: 641px) {
  [data-espace="direction"] #tableCommandes { min-width: 1240px; }
  [data-espace="direction"] #tableCommandes th:nth-child(3)  { width: 13%; }     /* Dénomination */
  [data-espace="direction"] #tableCommandes th:nth-child(10) { width: 128px; }   /* Commercial */
  [data-espace="direction"] #tableCommandes th:nth-child(11) { width: 62px; }    /* Dép. */
  [data-espace="direction"] #tableCommandes th:nth-child(12) { width: 62px; }    /* Jours */
  [data-espace="direction"] #tableCommandes th:nth-child(13) { width: 112px; }   /* Type */
  [data-espace="direction"] #tableCommandes th:nth-child(14) { width: 12px; }
}

/* Tableau de bord : « Afficher tout » sous le top 10 clients (23/11/2026) */
.top-clients__pied { display: flex; justify-content: center; margin-top: 14px; }

/* Page Départements (compte Direction) : carte de France (24/11/2026, departements.js) */
#carteFrance .carte__entete { flex-wrap: wrap; gap: 4px 16px; }
.dc-carte { position: relative; }
.dc-carte__svg { max-width: 720px; margin: 0 auto; }
.dc-carte__svg svg { display: block; width: 100%; height: auto; }
.dc-dep { fill: #eceef4; stroke: rgba(255,255,255,.9); stroke-width: .8; stroke-linejoin: round; cursor: pointer; transition: fill .35s var(--ease-out); }
.dc-dep--vide { cursor: default; stroke: #cdd2df; }
/* Survol d'une région : les autres s'estompent, son contour passe en orange */
.dc-carte__svg svg .dc-dep { transition: fill .35s var(--ease-out), opacity .2s var(--ease-out); }
svg.dc-survol .dc-dep:not(.dc-dep--region) { opacity: .4; }
.dc-regions path.dc-region--active { stroke: #ff9f43; stroke-width: 3; }
.dc-regions path { fill: none; stroke: #15153a; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.dc-carte__info { position: absolute; z-index: 5; min-width: 280px; max-width: 380px; padding: 12px 14px; border-radius: 12px;
                  background: #15153a; color: #f3f7f8; box-shadow: 0 12px 30px -12px rgba(21,21,58,.6); pointer-events: none; font-size: 13px; }
.dc-carte__info b { display: block; font-size: 14.5px; }
.dc-carte__info small { display: block; color: #f3f7f8a8; margin-bottom: 8px; }
.dc-carte__info dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.dc-carte__info dt { color: #f3f7f8a8; }
.dc-carte__info dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-carte__info p { margin: 0; }
.dc-carte__info .dc-evol--hausse { color: #5fe39b; }
.dc-carte__info .dc-evol--baisse { color: #ff8a8a; }
.dc-carte__info--epingle { pointer-events: auto; box-shadow: 0 0 0 2px #ff9f43, 0 12px 30px -12px rgba(21,21,58,.6); }
.dc-carte__deps { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 12.5px; }
.dc-carte__deps th { padding: 0 0 4px; font-size: 11px; font-weight: 600; color: #f3f7f8a8; text-align: right; }
.dc-carte__deps th:first-child, .dc-carte__deps td:first-child { text-align: left; }
.dc-carte__deps td { padding: 3px 0; border-top: 1px solid rgba(255,255,255,.1); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-carte__deps td + td { padding-left: 12px; }
.dc-carte__deps td:first-child span { white-space: nowrap; }
.dc-carte__deps a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dc-carte__deps a:hover { text-decoration-color: #ff9f43; } }
.dc-carte__sans { margin: 6px 0 0 !important; font-size: 11.5px; color: #f3f7f8a8; }
.dc-carte__astuce { margin: 8px 0 0 !important; font-size: 11.5px; color: #ff9f43; }
.dc-carte__fermer { position: absolute; top: 6px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12);
                    color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.dc-legende { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted, #5b5b78); }
.dc-legende__barre { width: 180px; height: 10px; border-radius: 6px; }
.dc-legende__vide { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
.dc-legende__vide i { width: 14px; height: 10px; border-radius: 3px; background: #eceef4; box-shadow: inset 0 0 0 1px #d5d8e3; }
.dc-carte__hors { text-align: center; margin: 6px 0 0; }
.dc-carte__source { margin: 8px 0 0; font-size: 11px; color: var(--muted, #8a8aa3); text-align: right; }
@media (prefers-reduced-motion: reduce) { .dc-carte__svg svg .dc-dep { transition: none; } }
@media (prefers-reduced-motion: reduce) { .dc-dep { transition: none; } }

/* Classements (Commerciaux, Départements, Classement des clients) : tableau décollé des bords comme le top 10 du tableau de
   bord, titre près du tableau, lignes resserrées sur une seule ligne (24/11/2026) */
.dc-classement > .carte__entete, #carteFrance > .carte__entete { margin-bottom: 12px; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.dc-classement .carte__titre, #carteFrance .carte__titre { margin: 0; }
/* Même écart entre toutes les cartes de ces pages ; texte d'aide détaché de la carte, aligné sur son contenu */
#contenuCommerciaux > .carte, #contenuDepartements > .carte, #carteClassement { margin-bottom: var(--gap); }
.dc-aide { margin: -4px 24px var(--gap); }
.dc-classement .search-field { position: relative; width: 260px; max-width: 100%; margin-left: auto; }
#lienExportClassement { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dc-classement .search-field .input { height: 36px; border-radius: var(--r-pill); }
.dc-classement .table td { padding-top: 9px; padding-bottom: 9px; height: auto; }
.dc-classement .table th { padding-top: 11px; padding-bottom: 11px; }
.dc-classement .table td.dc-liens { width: 1%; text-align: right; }
.dc-classement .dc-liens a { font-size: 12.5px; margin: 0 0 0 12px; }
/* Objectif sur une ligne : montant, barre, pourcentage */
.dc-classement .dc-objectif { white-space: nowrap; }
.dc-classement .dc-objectif .lien-nom, .dc-classement .dc-objectif .dc-montant { display: inline-block; min-width: 72px; }
.dc-classement .dc-objectif .ae-barre { width: 64px; margin: 0 0 0 8px; }
.dc-classement .dc-objectif .ae-pct { margin: 0 0 0 8px; }
#carteFrance .dc-legende { margin-top: 4px; }
.dc-carte__hors { margin-top: 4px; }
.dc-carte__source { margin-top: 2px; }
@media (max-width: 640px) { .dc-classement .search-field { width: 100%; margin-left: 0; } }
.dc-classement .vignette { width: 26px; height: 26px; font-size: 10px; border-radius: 7px; }
.dc-classement .client { gap: 10px; }
.dc-carte__deps b { display: inline; font-size: inherit; margin-right: 4px; }
