/* =============================================================================
   ecrans.css — Adaptations tablette / téléphone d'origine et écrans de l'application : tableau de bord,
   filtres, Explorer, Renouvellements, commissions masquées, tableaux sur téléphone, mode téléphone,
   formulaire de commande (« fc- »), page de connexion, barre mobile, sélecteur d'année. Sections 25 à 40.
   Découpage du 07/10/2026 de l'ancien style.css (nettoyé : règles mortes et déclarations écrasées retirées,
   rendu vérifié identique). Chargés dans cet ordre par base.html et connexion.html : socle → ecrans →
   finitions. L'ordre compte : à sélecteur égal, la règle la plus loin l'emporte (une section plus loin
   peut volontairement en écraser une plus haute). Jetons (:root) : socle.css, section 1.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   25. Responsive — Tablette (≤ 1024px)
   ----------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root {
    --sidebar-largeur: 224px;
  }

  .page {
    padding: var(--espace-lg);
  }

  .kpi-grille {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* -----------------------------------------------------------------------------
   26. Responsive — Mobile (≤ 768px)
   ----------------------------------------------------------------------------- */

@media (max-width: 768px) {
  /* Sidebar transformée en tiroir */

  /* Contenu pleine largeur */
  .contenu {
    margin-left: 0;
  }

  .page {
    padding: var(--espace-md); /* espace pour le bouton hamburger */
  }

  /* KPI empilées */
  .kpi-grille {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-card__valeur {
    font-size: var(--taille-xl);
  }

  /* Formulaires */

  /* Tableaux défilants */
  .table-conteneur {
    border-radius: var(--rayon-md);
  }

  /* Titre de page */
  .page__titre {
    font-size: var(--taille-lg);
  }

  /* Modal pleine largeur */
  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--rayon-lg) var(--rayon-lg) 0 0;
  }

  .modal-fond {
    align-items: flex-end;
  }

  /* Toast position */

  .toast {
    max-width: 100%;
  }

  /* Boutons */
  .btn {
    min-height: 40px;
  }

  /* Inputs */
  .input, .select {
    height: 40px;
    font-size: 16px; /* évite le zoom iOS */
  }
}

/* -----------------------------------------------------------------------------
   27. Responsive — Très petit mobile (≤ 390px)
   ----------------------------------------------------------------------------- */

@media (max-width: 390px) {
  .kpi-grille {
    grid-template-columns: 1fr;
  }

  .page__entete {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* -----------------------------------------------------------------------------
   28. Zone de dépôt fichier (import)
   ----------------------------------------------------------------------------- */

.drop-zone {
  text-align: center;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover,
.drop-zone.survol {
  border-color: var(--couleur-bleu);
  background: rgba(31,78,140,0.03);
}

/* -----------------------------------------------------------------------------
   29. Classes supplémentaires Phase 3
   ----------------------------------------------------------------------------- */

/* Lien discret — texte cliquable sans apparence de lien */
.lien-discret {
  background: none;
  border: none;
  padding: 0;

  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: color var(--transition);
}
@media (hover: hover) and (pointer: fine) {  }

/* KPI card petite taille (fiche client SRV/DIS) */

/* Table petite taille (fiche client) */
.table--sm th,
.table--sm td {
  padding: 7px 10px;
  font-size: 12px;
}

/* Aide de champ de formulaire */
.champ__aide {
  font-size: 11px;
  color: var(--texte-tertiaire);
  margin-top: 4px;
}

/* Bouton désactivé visuellement mais cliquable (pour les messages) */
.btn.desactive {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Badge rouge (manquant) */
.badge--rouge {
  background: rgba(215,38,61,0.1);
  color: var(--couleur-rouge);
}

/* Grille 4 colonnes */

/* -----------------------------------------------------------------------------
   27 bis. Tableau de bord (Phase 4)
   ----------------------------------------------------------------------------- */

/* Rechargement : l'affichage précédent reste visible, atténué (pas de saut) */
.dashboard {
  transition: opacity var(--transition);
}
.rechargement {
  opacity: 0.5;
  pointer-events: none;
}

/* Grille 2 colonnes, une seule sous 1024px */

/* Conteneur de graphique Plotly : la hauteur inclut les axes */
.graphique {
  width: 100%;
  min-height: 240px;
}

/* Légende des séries (clé en trait, comme les courbes) */
.legende {
  align-items: center;
}

   /* série en barres */

/* .table--sans-survol (tableaux du tableau de bord) : pas de surlignage au survol, lignes alternées conservées */

/* Barre proportionnelle intégrée dans un tableau */

.barre-inline {
  display: flex;
  align-items: center;
  gap: var(--espace-sm);
}
.barre-inline__piste {
  flex: 1;

                   /* visible sur les lignes blanches comme grises */

  overflow: hidden;
}
.barre-inline__remplissage {
  height: 100%;
  min-width: 2px;
}
.barre-inline__libelle {
  min-width: 72px;
  text-align: right;
  font-size: 13px;
  color: var(--texte-principal);
  white-space: nowrap;
}

/* Objectif de marge (refonte du 03/10/2026) : lisible d'un coup d'œil */

/* Barre : piste claire, réalisé bleu, avance verte, retard hachuré */
.jauge {
  position: relative;
  height: 14px;
  margin-top: var(--espace-lg);
  background: var(--surface-2);
  border-radius: 99px;
}
               /* place pour l'étiquette « Attendu à date » */

/* Repère « Attendu à date » : trait sombre cerclé de blanc (visible sur toutes les couleurs) */

/* Trois chiffres clés côte à côte */

@media (max-width: 768px) {
  .section-header {
    flex-wrap: wrap;
  }
}

/* Drill-down : éléments cliquables menant à la page Commandes filtrée */

/* -----------------------------------------------------------------------------
   28 bis. Filtres avancés (page Commandes)
   ----------------------------------------------------------------------------- */

.filtres-avances {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));

  margin-bottom: var(--espace-md);
}

.champ-plage > * {
  flex: 1;
  min-width: 0;
}

/* -----------------------------------------------------------------------------
   29 bis. Explorer (Phase 5)
   ----------------------------------------------------------------------------- */

.onglets {
  border-bottom: 2px solid var(--bordure);
  overflow-x: auto;
}
.onglet {
  font-family: inherit;

  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
}
.onglet.actif {
  border-bottom-color: var(--couleur-bleu);
}

/* Matrice de corrélation : tableau dont les cases portent la couleur */

.matrice {
  border-collapse: separate;
              /* écart de 2 px couleur fond entre les cases */
}
.matrice th {
  white-space: nowrap;
}
.matrice thead th {
  text-align: center;
  vertical-align: bottom;
}
.matrice tbody th {
  text-align: right;
}
.matrice td {
  text-align: center;
  font-variant-numeric: tabular-nums;

  cursor: default;
}
.matrice__diagonale {
  background: var(--surface-2);
  color: var(--texte-tertiaire);
}
.matrice__vide {
  background: var(--surface-1);
  color: var(--texte-tertiaire);
}

/* Comparaison : deux périmètres */

@media (max-width: 768px) {
  .perimetre__champs {
    grid-template-columns: minmax(0, 1fr);
  }
  .echelle-matrice__libelles {
    font-size: 10px;
  }
}

/* -----------------------------------------------------------------------------
   30. Phase 6 — finitions visuelles
   ----------------------------------------------------------------------------- */

/* Nom long dans un tableau : une seule ligne, coupé avec « … » (nom complet au survol) */
.cellule-nom {
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Indicateurs du tableau de bord : 6 → 3 → 2 colonnes */

/* Grille 1/3 – 2/3 (n'est plus utilisée depuis le 15/10/2026 : objectif + répartition en 2 colonnes égales) */

/* Tableau dans une carte : défilement horizontal si l'écran est trop étroit */

/* Tableau à nombreuses colonnes (Commandes) : marges horizontales réduites */
.table--serre th,
.table--serre td {
  padding-left: 10px;
  padding-right: 10px;
}
.table--serre th:first-child,
.table--serre td:first-child {
  padding-left: 18px;
}
.table--serre .cellule-nom {
  max-width: 165px;
}
.table--serre td .btn--sm {
  padding: 6px;            /* boutons icônes (modifier / supprimer) */
}
.table--serre td .flex.gap-sm {
  gap: 2px;
}

/* Actions de l'en-tête de page (sélecteur + bouton principal) */

/* Commission : floutée par défaut sur le tableau de bord, visible à la demande */
.donnee-commission {
  display: inline-block;
  filter: blur(7px);
  user-select: none;
  transition: filter 200ms ease;
}
body.commissions-visibles .donnee-commission {
  filter: none;
  user-select: auto;
}
.kpi-card__bouton-masque {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--bordure);
  background: var(--surface-0);
  color: var(--texte-tertiaire);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
@media (hover: hover) and (pointer: fine) { .kpi-card__bouton-masque:hover {
  background: var(--surface-1);
} }
.kpi-card__bouton-masque:focus-visible {
  outline: 2px solid var(--couleur-bleu-clair);
  outline-offset: 2px;
}
.kpi-card__bouton-masque svg { width: 17px; height: 17px; }
.kpi-card__bouton-masque .icone-oeil-ferme { display: none; }
body.commissions-visibles .kpi-card__bouton-masque .icone-oeil { display: none; }
body.commissions-visibles .kpi-card__bouton-masque .icone-oeil-ferme { display: block; }

/* -----------------------------------------------------------------------------
   31. Renouvellements
   ----------------------------------------------------------------------------- */

/* Précision sous la valeur d'un indicateur */
.kpi-card__note {
  margin-top: 6px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Grille 2/3 – 1/3 (graphique + tableau) */

/* Ligne de tableau cliquable (filtre) */
.ligne-cliquable {
  cursor: pointer;
}
.ligne-cliquable:focus-visible td {
  background: var(--tableau-survol);
  outline: none;
}

/* Ligne de total */
.ligne-total td {
  font-weight: 700;
  border-top: 2px solid var(--tableau-entete);
  border-bottom: none;
  background: var(--tableau-total);
}

/* Encadré explicatif */

.liste-regles {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 12px;
}
.liste-regles li {
  margin-bottom: 4px;
}

/* Fenêtre large contenant un tableau (échéances d'une année) */
.modal--xl {
  max-width: 1120px;
}
.modal__corps--tableau {
  padding: 8px 12px 16px;
}

/* À vérifier : statut d'une échéance (icône + texte, la couleur n'est pas seule porteuse du sens) */
.groupe-statut {
  flex-wrap: nowrap;
}
.btn-statut {
  white-space: nowrap;

  cursor: pointer;
}
.btn-statut svg {   flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) { .btn-statut:hover { border-color: var(--bordure-forte); color: var(--texte-principal); } }

.btn-statut--vu[aria-pressed="true"]      {   border-color: rgba(26,122,74,0.45);   }
.btn-statut--attente[aria-pressed="true"] {  border-color: rgba(224,123,42,0.5);   }
.btn-statut--non[aria-pressed="true"]     {   border-color: rgba(215,38,61,0.45);   }

/* Échéance traitée (affichée à la demande) */

.ligne-traitee td a {
  color: inherit;
}

/* Cellule de nom sur plusieurs lignes : chaque ligne est coupée avec « … » */
.cellule-nom > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table--serre .cellule-nom--large {
  max-width: 250px;
}

/* Fenêtre « tableau » : seul le corps défile ; en-têtes de colonnes et ligne de total restent visibles */
.modal--xl {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal--xl .modal__corps--tableau {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-top: 0;
}
.modal__corps--tableau thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--tableau-entete);
}
.modal__corps--tableau .ligne-total td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  box-shadow: 0 -1px 0 var(--bordure);
}

/* -----------------------------------------------------------------------------
   32. Commissions masquées sur toutes les pages (app.js › Commissions)
   ----------------------------------------------------------------------------- */

/* Matrice : la couleur d'une case Commission trahirait le coefficient → case neutre */
body:not(.commissions-visibles) .matrice td.cellule-commission {
  background: var(--surface-2) !important;
}

/* Formulaire : commission existante verrouillée (modification sans mot de passe) */
.commission-verrouillee {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}
.lien-souligne {
  color: var(--couleur-bleu);
  text-decoration: underline;
}

/* Bouton de la barre latérale */

/* Petite fenêtre (mot de passe) */

/* -----------------------------------------------------------------------------
   33. Téléphone (≤ 640 px) : tableaux en fiches, en-têtes et cartes compacts
   ----------------------------------------------------------------------------- */

@media (max-width: 640px) {
  /* En-tête de page : titre, puis actions sur toute la largeur */
  .page__entete {
    flex-direction: column;

    gap: 12px;
    margin-bottom: 20px;
  }
  .page__entete > :last-child:not(:first-child) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .page__entete > :last-child:not(:first-child) > * {
    flex: 1 1 140px;
    width: auto !important;
  }

  /* Indicateurs plus compacts */
  .kpi-card__entete { gap: 8px; }

  .kpi-card__bouton-masque { top: 10px; right: 10px; width: 30px; height: 30px; }
  .carte { padding: 16px; }

  /* Barres de filtres : un champ par ligne, pleine largeur */
  .filter-bar { padding: 12px; }

  .filter-bar .search-field { max-width: none !important; }
  .filter-bar > .btn { flex: 1 1 auto; }

  /* Matrice de corrélation : cases plus petites (défilement horizontal si besoin) */
  .matrice { font-size: 11px; border-spacing: 1px; }
  .matrice td { min-width: 40px; height: 34px; }
  .matrice th { padding: 4px; white-space: normal; }

  /* En-tête de fenêtre : titre et bouton de fermeture sur la 1re ligne, filtre éventuel dessous */
  .modal__entete { flex-wrap: wrap; gap: 8px; }
  .modal__entete .select,
  .modal__entete .input { order: 3; flex: 1 1 100%; width: 100% !important; }

  /* Fenêtres : pleine largeur, contenu défilant */
  .modal--xl .modal__corps--tableau { padding: 0 4px 8px; }
  .modal__corps { padding: 16px; }
  .modal__entete { padding: 16px; }
}

/* Fiche client : 4 indicateurs dans une fenêtre de 760 px → chiffres un peu plus petits */
#ficheKpi .kpi-card__valeur { font-size: 22px; }

/* Indicateurs (≤ 768 px) : nombre impair → le dernier occupe toute la largeur ; notes sur plusieurs lignes */
@media (max-width: 768px) {
  .kpi-card__note { white-space: normal; }
}

/* -----------------------------------------------------------------------------
   Tableaux sur téléphone (≤ 640 px) : lignes compactes dépliables
   Chaque ligne n'affiche qu'un libellé (titre + sous-titre éventuel) et un montant ;
   un toucher déplie les autres colonnes dessous (« libellé : valeur »).
   Rôles posés par etiqueterTableau() (app.js) : data-role = titre | sous-titre | montant
   | detail | plein, d'après data-mobile sur les <th> (sinon : 1re colonne + colonne CA).
   Au-delà de 640 px (tablette, ordinateur) : tableau complet.
   ----------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .table,
  .table thead,
  .table tbody,
  .table tfoot {
    display: block;
    width: 100%;
  }
  .table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content 14px;
    column-gap: 10px;
    align-items: center;

    border-bottom: 1px solid var(--tableau-trait);
  }
  .table tbody tr:last-child { border-bottom: none; }
  .table th,
  .table td {
    display: none;
    padding: 0 !important;          /* annule les marges propres aux colonnes (1re, dernière…) */
    border: none;
    min-width: 0;
    position: static;
    box-shadow: none;
  }
  .table thead tr { padding-top: 8px; padding-bottom: 8px; }
  .table thead [data-role="sous-titre"] { display: none !important; }
  .table thead [data-role="montant"] { grid-row: 1; }

  /* Ligne visible : titre (et sous-titre dessous) à gauche, montant à droite, chevron */
  .table [data-role="titre"] {
    display: block;
    grid-column: 1;
    grid-row: 1;
    text-align: left;
    font-weight: 650;
    max-width: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .table td[data-role="sous-titre"] {
    display: block;
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: var(--taille-xs);
    font-weight: 400;
    color: var(--texte-tertiaire);
    max-width: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .table td[data-role="sous-titre"] * { font-size: inherit; font-weight: inherit; color: inherit; }
  .table [data-role="montant"] {
    display: block;
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: right;
    white-space: nowrap;
    font-weight: 650;
  }
  .table [data-role="plein"] { display: block; grid-column: 1 / -1; }
  .table [data-role="montant"] .barre-inline__piste { display: none; }   /* barre : dans le détail seulement */
  /* Nom trop long : coupé avec « … » (y compris quand il est dans un lien) */
  .table [data-role="titre"] > a,
  .table [data-role="sous-titre"] > a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .table [data-role="montant"] .barre-inline { display: block; }
  /* Sous-lignes secondaires (petit texte, badge d'écart) : masquées, visibles une fois la ligne dépliée */
  .table td:is([data-role="titre"], [data-role="sous-titre"], [data-role="montant"]) > div.texte-xs,
  .table td[data-role="montant"] > div + .badge { display: none; }
  .table tr.deplie td:is([data-role="titre"], [data-role="sous-titre"], [data-role="montant"]) > div.texte-xs,
  .table tr.deplie td[data-role="montant"] > div + .badge { display: block; white-space: normal; }
  .table tr.deplie td[data-role="montant"] > div + .badge { display: inline-block; margin-top: 2px; }

  .table tr[data-depliable] { cursor: pointer; }
  .table tr[data-depliable]::after {
    content: '';
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: center;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--texte-tertiaire);
    border-bottom: 2px solid var(--texte-tertiaire);
    transform: rotate(-45deg);
    transition: transform 0.15s;
  }
  .table tr[data-depliable].deplie::after { transform: rotate(45deg); }

  /* Ligne dépliée : colonnes masquées en « libellé : valeur » sur toute la largeur */
  .table tr.deplie { background: var(--tableau-survol); }
  .table tr.deplie td[data-role="detail"] {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    text-align: right;
  }
  .table tr.deplie td[data-role="detail"]::before {
    content: attr(data-label);
    flex-shrink: 0;
    text-align: left;
  }
  .table tr.deplie td[data-role="detail"][data-label=""],
  .table tr.deplie td[data-role="detail"][data-label="Actions"] { justify-content: flex-end; }
  .table tr.deplie td[data-role="detail"][data-label=""]::before,
  .table tr.deplie td[data-role="detail"][data-label="Actions"]::before { display: none; }
  .table tr.deplie td[data-role="detail"]:has(> .groupe-statut) { flex-direction: column; align-items: stretch;  }
  .groupe-statut {  justify-content: flex-end;  }

  .table td .barre-inline { flex: 0 1 60%; }
  .col-barre, .col-part { width: auto; min-width: 0; }

  .ligne-total { border-top: 2px solid var(--tableau-entete); }

  .carte .table thead th { border-radius: 0; }
}

/* =============================================================================
   34. Mode téléphone (page /telephone, visible uniquement sur le Mac)
   ============================================================================= */

/* =============================================================================
   35. Renouvellements : échéances d'une année (groupes par mois, clients, nature)
   ============================================================================= */

/* Classement des clients : hauteur alignée sur le graphique voisin, en-tête fixe */

/* Ligne-titre d'un mois avec ses sous-totaux */

.table tbody tr.ligne-mois td {   padding-top: 9px; padding-bottom: 9px; }
@media (hover: hover) and (pointer: fine) {  }

.ligne-mois__compte { margin-left: 8px;    }

@keyframes repere-mois {
  0%, 30% { box-shadow: inset 4px 0 0 var(--couleur-orange); background: rgba(224,123,42,0.18); }
  100%    { box-shadow: inset 0 0 0 transparent; }
}

/* Nature de l'échéance */
.nature {
  white-space: nowrap;
}

/* Fiches (≤ 768 px) : une seule colonne, le mois forme un intertitre */
@media (max-width: 640px) {
  .table tbody tr.ligne-mois td { padding: 0; }
}

/* Classement des clients : barre de part compacte ; notes d'indicateurs sur deux lignes si besoin */
.col-part { width: 110px; }
.col-part .barre-inline__piste { min-width: 36px; }
#corpsClientsAnnee .cellule-nom { max-width: 150px; }
#detailAnnee + .kpi-grille .kpi-card__note { white-space: normal; }
@media (max-width: 640px) {
  #corpsClientsAnnee .cellule-nom { max-width: none; }
}

/* Top 10 clients : la cellule CA porte une barre proportionnelle au CA, visible seulement sur
   téléphone (où le CA est le montant affiché) ; sur ordinateur, la barre est celle de la marge */

/* =============================================================================
   36. Formulaire de commande (fenêtre partagée, préfixe « fc- ») — refonte du 04/10/2026
   « Le cœur de l'app : rapide, fluide, qui donne envie ». Trois blocs numérotés en cartes blanches sur fond
   gris clair (1. Client · 2. Détails · 3. Montants, ordre du 19/10/2026), options repliées, bouton « Enregistrer · total ».
   Ordinateur : fenêtre centrée. Téléphone (≤ 640 px) : feuille haute qui monte du bas, pied fixé.
   ============================================================================= */
.modal--commande { max-width: 720px; }

.fc { display: flex; flex-direction: column; gap: 14px; }
.fc input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.fc input[type="number"]::-webkit-inner-spin-button,
.fc input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Blocs */
.fc-bloc {
  display: flex;
  flex-direction: column;

  margin: 0;

  min-width: 0;
}
.fc-bloc__titre {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.fc-bloc__num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;

  font-size: 12px;
  font-weight: 700;
}
.fc-requis { margin-left: -6px;  }

/* 1. Client */
.fc-client { gap: 10px; }
.fc-client__recherche { position: relative; }
.fc-client__recherche svg {
  position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px;
   pointer-events: none;
}
.fc-client__recherche .input { padding-left: 40px; }
.fc-recents { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.fc-recents:empty { display: none; }
.fc-recents__titre { margin-right: 2px;      }
.fc-recent {
  max-width: 100%;

  font: inherit;

  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .fc-recent:hover { border-color: var(--couleur-bleu-clair);  } }
.fc-recent:active { transform: scale(0.97); }
.fc-client__liste { list-style: none; margin: 8px 0 0;   overflow: hidden; }
.fc-client__liste:empty { display: none; }

.fc-client__option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  border: 0;

  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.fc-client__option:hover, .fc-client__option:focus-visible {  outline: none; }

.fc-client__choisi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 12px;
}
.fc-client__nom { flex: 1; min-width: 0;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-avatar {
  flex: none;
  display: grid;
  place-items: center;
}

/* 2. Montants : total en direct (bandeau bleu nuit) + cartes SRV / DIS */
.fc-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.fc-total__libelle { display: block;      }
.fc-total__ca strong { display: block; margin-top: 2px;    font-variant-numeric: tabular-nums; }
.fc-total__marge { text-align: right; }
.fc-total__marge strong {   font-variant-numeric: tabular-nums; }

.fc-total__pct {
  border-radius: 999px;

  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fc-montants__cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));  }
.fc-montant-carte {
  display: flex;
  flex-direction: column;

  min-width: 0;
}
.fc-tag { align-self: flex-start;  border-radius: 999px;    }
.fc-tag--srv { background: rgba(31,78,140,0.12); color: var(--couleur-bleu); }
.fc-tag--dis { background: rgba(224,123,42,0.14); color: #B85F14; }
.fc-montant {  flex-direction: column;  min-width: 0; }
.fc-montant > span { font-size: 12px; font-weight: 600; color: var(--texte-tertiaire); }
.fc-montant .input { text-align: right;   font-variant-numeric: tabular-nums;  }
/* Montants en texte mis en forme « 1 500,00 » (05/10/2026), signe « € » posé dans le champ, à droite */
.fc-euro { position: relative; display: block; min-width: 0; }
.fc-euro .input { width: 100%; padding-right: 30px; }
.fc-euro__signe {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%); pointer-events: none;
   font-weight: 600;
}
/* Marge SRV pré-remplie (mention + bouton pour revenir au taux par défaut) */
.fc-marge-auto {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 18px;
  margin-top: -4px; font-size: var(--taille-xs); color: var(--texte-tertiaire); text-align: right;
}
.fc-marge-auto__bouton {
     white-space: nowrap; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {  }

/* 3. Détails : périodicités courantes en puces */
.fc-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.fc-puce {
  font-weight: 600;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .fc-puce:hover { border-color: var(--couleur-bleu); color: var(--couleur-bleu); } }
.fc-puce--autre { border-style: dashed; }
.fc-puce[aria-pressed="true"] {  border-color: var(--couleur-bleu);  }
.fc-periodicite__libre { display: none; margin-top: 6px; }
.fc-periodicite--libre .fc-periodicite__libre { display: block; }
.fc-date { max-width: 240px; }

/* Plus d'options (nouveau client, commission) */

.fc-options summary {
  display: flex; align-items: center; gap: 10px;  cursor: pointer; list-style: none;
}
.fc-options summary::-webkit-details-marker { display: none; }
.fc-options__resume { flex: 1;  font-weight: 500;  }
.fc-options__chevron { width: 14px; height: 14px;   }
.fc-options[open] .fc-options__chevron { transform: rotate(180deg); }
.fc-options__corps { display: flex; flex-direction: column; gap: 12px;  }
.fc-commission { max-width: 420px; }
.fc-commission .fc-euro { max-width: 260px; }
.fc-commission .input { text-align: right; font-variant-numeric: tabular-nums; }
.fc-commission-auto { justify-content: flex-start; flex-wrap: wrap; margin-top: 2px; text-align: left; }
/* Commission pré-remplie en création, commissions masquées : chiffres floutés tant qu'on n'est pas dans le champ */
body:not(.commissions-visibles) .fc #champCommission:not(:focus):not(.commission-verrouillee) {
  color: transparent; text-shadow: 0 0 8px var(--texte-principal);
}

/* Interrupteur « Nouveau client » */
.fc-interrupteur {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 36px;
  font-size: 14px; font-weight: 600;  white-space: nowrap; cursor: pointer; user-select: none;
}
.fc-interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fc-interrupteur__piste {
  position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px;
}
.fc-interrupteur__piste::after {
  content: ''; position: absolute;     border-radius: 50%;
  background: #fff;
}

.fc-interrupteur input:checked + .fc-interrupteur__piste::after { transform: translateX(16px); }
.fc-interrupteur input:focus-visible + .fc-interrupteur__piste { outline: 2px solid var(--couleur-bleu-clair); outline-offset: 2px; }

/* Bouton Enregistrer : total de la commande */
.fc-bouton-total { font-variant-numeric: tabular-nums; opacity: 0.9; }
.fc-bouton-total:empty { display: none; }   /* vide (aucun montant) : ne réserve pas d'espace, « Enregistrer » reste centré (22/10/2026) */

@media (max-width: 640px) {
  /* Champs : 16 px (sinon iOS zoome au toucher) et hauteur confortable au doigt */
  input[type="date"].input {
    -webkit-appearance: none; appearance: none; display: block; min-width: 0; line-height: 42px; text-align: left;
  }
  input[type="date"].input::-webkit-date-and-time-value { text-align: left; }

  /* Feuille haute qui monte du bas (« le meilleur des deux mondes » : fenêtre flottante, mais grande et aérée) */
  .modal-fond--commande { align-items: flex-end; padding: calc(16px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); }
  .modal--commande {
    max-width: none;
    width: 100%;
    max-height: 100%;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    animation: fc-montee 380ms var(--ease-drawer);    /* tiroir iOS depuis le bas (22/10/2026) */
  }
  .modal--commande .modal__entete { position: relative; flex: none; padding: 22px 16px 12px;   }
  .modal--commande .modal__entete::before {           /* poignée */
    content: ''; position: absolute; top: 8px; left: 50%; width: 40px;  margin-left: -20px;
    border-radius: 999px;
  }
  .modal--commande .modal__titre { font-size: 20px;  letter-spacing: -0.01em; }
  .modal--commande .modal__fermer { width: 34px; height: 34px; border-radius: 50%;   }
  .modal--commande .modal__corps {
    flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .modal--commande .modal__pied {
    flex: none; padding: 12px 14px 14px;
     border-radius: 0 0 26px 26px;
  }
  .modal--commande .modal__pied .btn { flex: 1; height: 50px; font-size: 16px; justify-content: center;  }
  .modal--commande .modal__pied .btn--primaire { flex: 2.2; }

  .fc { gap: 10px; }
  .fc-bloc {  border-radius: 18px; }
  .fc-bloc .input, .fc-bloc .select { height: 46px; }
  .fc .champ { gap: 4px; }
  .fc-recent { padding: 8px 14px; font-size: 14px; }
  .fc-client__option { padding: 11px 12px; }
  .fc-total { padding: 14px; }

  .fc-montant-carte { padding: 10px; }

  /* Deux cartes côte à côte : marges intérieures réduites pour que « 1 250 000,00 € » tienne */
  .fc-euro .input { padding-left: 8px; padding-right: 24px; }
  .fc-euro__signe { right: 9px; font-size: 15px; }
  .fc-commission .fc-euro { max-width: none; }
  .fc-puce { flex: none; padding: 9px 14px; font-size: 14px; }
  /* Puces sur une seule ligne, défilement horizontal au doigt si l'écran est étroit */
  .fc-puces { flex-wrap: nowrap; overflow-x: auto; margin: 2px -12px 0; padding: 2px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fc-puces::-webkit-scrollbar { display: none; }
  .fc-date { max-width: none; }
  .fc-commission { max-width: none; }
  .fc-interrupteur { height: 44px; }
}

@keyframes fc-montee {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .modal--commande { animation: none; }
}

/* =============================================================================
   37. Page de connexion (mode serveur) et lien « Se déconnecter »
   ============================================================================= */

/* Refonte du 03/10/2026 : fond bleu nuit animé (halos), panneau de marque + carte.
   Ordinateur (≥ 900 px) : deux colonnes. Téléphone : logo en haut, carte en feuille ancrée en bas. */
.page-connexion {
  --cx-cyan: #4FD6E8;
  --cx-bleu: #2D6BC4;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow-x: hidden;
}
html:has(.page-connexion) { background: #0B1F3A; }

/* Décor : halos flous qui dérivent lentement + trame de points */

.connexion {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
  padding: calc(40px + env(safe-area-inset-top)) 40px 24px;
}

/* Panneau de marque */
.connexion__marque { animation: connexion-entree 0.9s var(--ease-out) both; }
.connexion__logo-marque { width: 200px; height: auto; display: block; margin-bottom: 36px; }
.connexion__accroche {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.connexion__accroche span {
  background: linear-gradient(90deg, var(--cx-cyan), #8FB3E6);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* Carte */
.connexion__carte {
  width: 100%;
  max-width: 420px;
  justify-self: end;
  display: flex;
  flex-direction: column;
  padding: 36px 34px 26px;
  border-radius: 24px;
  background: #fff;
  color: var(--texte-principal);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.6) inset;
  animation: connexion-entree 0.9s 0.12s var(--ease-out) both;
}

.connexion__titre { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }

.connexion__erreur {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(215,38,61,0.08);
  border: 1px solid rgba(215,38,61,0.22);
  color: var(--couleur-rouge);
  font-size: 13px;
  font-weight: 600;
}
.connexion__erreur svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.connexion__label { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--texte-secondaire); }
.connexion__champ {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  border-radius: 14px;
  background: var(--surface-1);
  border: 1.5px solid var(--bordure);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.connexion__champ:focus-within {
  background: #fff;
  border-color: var(--couleur-bleu-clair);
  box-shadow: 0 0 0 4px rgba(45,107,196,0.16);
}
.connexion__champ--erreur { border-color: rgba(215,38,61,0.55); }
.connexion__icone {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0 4px 0 16px;
  fill: none;
  stroke: var(--texte-tertiaire);
  stroke-width: 2;
  stroke-linecap: round;
}
.connexion__champ:focus-within .connexion__icone { stroke: var(--couleur-bleu-clair); }
.connexion__champ input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;                       /* pas de zoom automatique sur iPhone */
  color: var(--texte-principal);
  letter-spacing: 0.04em;
}
.connexion__champ input::placeholder { color: var(--couleur-gris-clair); letter-spacing: 0.15em; }
.connexion__oeil {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--texte-tertiaire);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .connexion__oeil:hover { background: var(--surface-2); color: var(--texte-principal); } }
.connexion__oeil:focus-visible { outline: 2px solid var(--couleur-bleu-clair); outline-offset: -2px; }
.connexion__oeil svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.connexion__oeil-ferme { display: none; }
.connexion__oeil[aria-pressed="true"] .connexion__oeil-ouvert { display: none; }
.connexion__oeil[aria-pressed="true"] .connexion__oeil-ferme { display: block; }
.connexion__majuscules { margin: 8px 0 0; font-size: 12px; font-weight: 600; color: var(--couleur-orange); }

.connexion__bouton {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  margin-top: 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2D6BC4 0%, #1F4E8C 55%, #163C6E 100%);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(31,78,140,0.35), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
@media (hover: hover) and (pointer: fine) { .connexion__bouton:hover { filter: brightness(1.08); box-shadow: 0 14px 30px rgba(31,78,140,0.45), inset 0 1px 0 rgba(255,255,255,0.18); } }
.connexion__bouton:active { transform: scale(0.98); }
.connexion__bouton:focus-visible { outline: 3px solid rgba(79,214,232,0.7); outline-offset: 3px; }
.connexion__fleche { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .connexion__bouton:hover .connexion__fleche { transform: translateX(3px); } }
.connexion__rouage {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: connexion-rotation 0.7s linear infinite;
}
.connexion__carte--envoi .connexion__bouton { pointer-events: none; }
.connexion__carte--envoi .connexion__bouton-texte,
.connexion__carte--envoi .connexion__fleche { display: none; }
.connexion__carte--envoi .connexion__rouage { display: block; }

.connexion__carte.connexion__carte--secousse { animation: connexion-secousse 0.45s ease; }
@keyframes connexion-secousse {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@keyframes connexion-entree {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes connexion-rotation { to { transform: rotate(360deg); } }

/* Tablette : une colonne, marque au-dessus */
@media (max-width: 900px) {
  .connexion { grid-template-columns: 1fr; gap: 36px; justify-items: center; text-align: center; max-width: 520px; }
  .connexion__logo-marque { margin: 0 auto 24px; }
  .connexion__carte { justify-self: center; text-align: left; }
}

/* Téléphone (refonte du 03/10/2026, « plus léger, pensé pour le clavier ») :
   tout tient dans la moitié haute de l'écran → à l'ouverture du clavier, le champ est déjà visible et iOS
   ne fait plus remonter la page. Carte en verre dépoli sur le fond (plus de feuille blanche).
   Clavier : plus d'animation maison depuis le 04/10/2026 (rendu saccadé avec le défilement d'iOS). */
@media (max-width: 560px) {
  .page-connexion { --cx-courbe: cubic-bezier(.32,.72,0,1); }      /* courbe des animations système iOS */
  .connexion {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
    padding: calc(7vh + env(safe-area-inset-top)) 16px 24px;
    transition: padding 0.45s var(--cx-courbe);
  }
  .connexion__marque { padding: 0 8px; }
  .connexion__logo-marque {
    width: 150px;
    margin: 0 auto 16px;
    transition: width 0.45s var(--cx-courbe), margin 0.45s var(--cx-courbe);
  }
  .connexion__accroche { font-size: 28px; }

  /* Carte en verre dépoli */
  .connexion__carte {
    max-width: none;
    padding: 22px 20px 18px;
    border-radius: 24px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.13);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
            backdrop-filter: blur(24px) saturate(140%);
    box-shadow: 0 20px 50px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.10);
    color: #fff;
  }

  .connexion__titre { font-size: 21px; margin-bottom: 16px; color: #fff; }
  .connexion__label { color: rgba(255,255,255,0.72); }
  .connexion__champ {
    background: rgba(5,15,32,0.45);
    border-color: rgba(255,255,255,0.16);
  }
  .connexion__champ:focus-within {
    background: rgba(5,15,32,0.6);
    border-color: var(--cx-cyan);
    box-shadow: 0 0 0 4px rgba(79,214,232,0.18);
  }
  .connexion__champ--erreur { border-color: rgba(255,120,140,0.7); }
  .connexion__champ input { color: #fff; }
  .connexion__champ input::placeholder { color: rgba(255,255,255,0.35); }
  .connexion__icone { stroke: rgba(255,255,255,0.55); }
  .connexion__champ:focus-within .connexion__icone { stroke: var(--cx-cyan); }
  .connexion__oeil { color: rgba(255,255,255,0.6); }
  @media (hover: hover) and (pointer: fine) { .connexion__oeil:hover { background: rgba(255,255,255,0.08); color: #fff; } }
  .connexion__bouton {
    margin-top: 16px;
    background: linear-gradient(135deg, #3E8BE0 0%, #2D6BC4 50%, #1F4E8C 100%);
    box-shadow: 0 10px 26px rgba(45,107,196,0.45), inset 0 1px 0 rgba(255,255,255,0.22);
  }
  .connexion__erreur {
    background: rgba(215,38,61,0.16);
    border-color: rgba(255,120,140,0.35);
    color: #FFB3BE;
  }
  .connexion__majuscules { color: #FFC07A; }

  /* Clavier ouvert : marque compacte, carte remontée en douceur */

  /* Décor plus discret ; haut d'écran uni, raccord avec la zone de l'heure */
}

@media (prefers-reduced-motion: reduce) {
   .connexion__marque, .connexion__carte, .connexion__carte--secousse { animation: none; }
  .connexion, .connexion__logo-marque { transition: none; }
  .connexion__rouage { animation-duration: 2s; }
}

/* Écran de chargement après la connexion (html.accueil ; retiré en fondu par html.accueil--fin) */
.ecran-chargement {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
     /* bords = zone de l'heure */
  transition: opacity 0.4s ease;
}
html.accueil .ecran-chargement { display: flex; }
html.accueil--fin .ecran-chargement { opacity: 0; pointer-events: none; }
.ecran-chargement__logo {
  width: 180px;
  height: auto;
  animation: ecran-chargement-logo 0.6s ease-out both;
}
.ecran-chargement__barre {
  position: relative;
  width: 140px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
}
.ecran-chargement__barre span {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4FD6E8, #ffffff);
  animation: ecran-chargement-barre 1.1s ease-in-out infinite;
}
.ecran-chargement__texte {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.7);
}
@keyframes ecran-chargement-logo {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ecran-chargement-barre {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}
@media (prefers-reduced-motion: reduce) {
  .ecran-chargement__logo, .ecran-chargement__barre span { animation: none; }
}

/* =============================================================================
   38. Barre d'application mobile (≤ 768 px, demande du 02/10/2026)
   Bandeau bleu nuit fixé en haut de toutes les pages : bouton ☰ à gauche (posé par-dessus),
   logo AVA6 au centre. Sous l'overlay et le tiroir du menu (z-index 90 < 99 / 100).
   ============================================================================= */

@media (max-width: 768px) {
     /* proportions d'origine (largeur automatique) */

  /* Bouton menu : dans la barre, sans fond flottant */

  /* Contenu sous la barre */
  .page {
    padding-top: calc(60px + env(safe-area-inset-top) + var(--espace-md));
  }

  /* Menu en tiroir : logo centré dans l'espace à gauche de la croix (écart franc avec elle),
     bas du menu au-dessus de la barre d'accueil et des coins arrondis de l'iPhone */
}

/* =============================================================================
   39. Sélecteur d'année (en-tête du tableau de bord) — liste native habillée
   ============================================================================= */

.page__actions .btn--primaire { height: 38px; }

@media (max-width: 640px) {
      /* 16 px : pas de zoom iOS au toucher */
  .page__actions .btn--primaire { height: 44px; font-size: 15px; }
}

/* =============================================================================
   40. Tableau de l'évolution mensuelle : année en cours puis année précédente
   ============================================================================= */
.table td.evol-precedente { color: var(--texte-tertiaire); }
.table thead th.evol-precedente { color: rgba(255,255,255,0.72); font-weight: 500; }
.table .evol-precedente--debut { border-left: 1px solid var(--tableau-trait); }
.evol-pastille { display: none; }

@media (max-width: 640px) {
  .table .evol-precedente--debut { border-left: none; }
  /* Détail d'un mois : marge de l'année en cours mise en avant… */
  .table tr.deplie td.evol-courante { font-size: 14px; font-weight: 700; color: var(--texte-principal); }
  .table tr.deplie td.evol-courante::before { color: var(--texte-secondaire); }
  /* …puis la comparaison avec l'année précédente, plus discrète, sous un trait pointillé */
  .table tr.deplie td.evol-precedente { font-size: var(--taille-xs); color: var(--texte-tertiaire); font-weight: 400; }
  .table tr.deplie td.evol-precedente::before { font-weight: 500; }
  .table tr.deplie td.evol-precedente--debut {
    margin-top: 8px;
    padding-top: 8px !important;
    border-top: 1px dashed var(--bordure-forte);
  }
  .table tr.deplie td.evol-precedente { justify-content: flex-start; }
  .table tr.deplie td.evol-precedente::before { margin-right: auto; }
  .evol-pastille {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
  }
  .evol-pastille--hausse { background: rgba(26,122,74,0.10); color: var(--couleur-vert); }
  .evol-pastille--baisse { background: rgba(215,38,61,0.08); color: var(--couleur-rouge); }
  .evol-pastille--stable { background: var(--surface-2); color: var(--texte-secondaire); }
}
