/* Composants communs (lot DS-C0, refonte écran par écran « option C » de José, 26/10/2026).
   Importé une fois par assets/app.js, après app.css dont il reprend les jetons.
   Documentation et exemples Twig : docs/DESIGN-SYSTEM.md §9. Démonstration : /parametres/composants. */

:root {
    --duree-rapide: .12s;     /* survols, pastilles (120 ms) */
    /* --duree (150 ms) et --courbe : app.css. Aucune animation au-delà de 200 ms. */
}

/* ---------- 5. Micro-animations ---------- */

/* Barre latérale : survol et appui (fond gris pâle, icône indigo, app.css) ; l'entrée active garde son dégradé. */
.icone:not([aria-current='page']):not([aria-disabled='true']):active { background: var(--trait-3); }
.icone svg { transition: transform var(--duree-rapide) var(--courbe); }
html[data-nav='expanded'] .icone:not([aria-disabled='true']):hover svg { transform: translateX(1px); }
.tableau tbody tr { transition: background-color var(--duree-rapide) var(--courbe); }
.choix__option, .lien-secondaire, .fil a { transition: color var(--duree-rapide) var(--courbe), background-color var(--duree-rapide) var(--courbe); }

/* app.css coupe déjà toutes les transitions sous prefers-reduced-motion ; on retire aussi les déplacements. */
@media (prefers-reduced-motion: reduce) {
    html[data-nav='expanded'] .icone:hover svg { transform: none; }
}

/* ---------- 1. Choix multiple avec recherche ---------- */

.choix-multiple fieldset { min-width: 0; }
/* Dans les grilles de champs existantes (.grille-champs), le choix multiple prend toute la largeur. */
.grille-champs > .choix-multiple { grid-column: 1 / -1; }
.choix-multiple__liste {
    flex-direction: column; flex-wrap: nowrap; gap: 0;
    max-height: 232px; overflow-y: auto; overscroll-behavior: contain;
    padding: 4px; border: 1px solid var(--trait-champ); border-radius: var(--rayon-champ); background: var(--surface);
}
.choix-multiple__liste .choix__option { display: flex; min-height: 32px; padding: 0 8px; border-radius: var(--rayon-xs); cursor: pointer; }
.choix-multiple__liste .choix__option:hover { background: var(--surface-2); }
.choix-multiple__liste .choix__option:has(input:checked) { font-weight: 500; }
.choix-multiple__liste .choix__option:has(input:focus-visible) { background: var(--surface-4); }
.choix-multiple__liste .choix__option[hidden] { display: none; }
.champ--erreur .choix-multiple__liste { border-color: var(--danger-texte); }
.choix-multiple__barre { display: flex; align-items: center; gap: var(--e-3); margin-bottom: 6px; }
.choix-multiple__barre[hidden], .choix-multiple__retenus[hidden] { display: none; }
.choix-multiple__recherche {
    flex: 1 1 auto; min-width: 0; max-width: 360px; height: 32px; padding: 0 10px;
    border: 1px solid var(--trait-champ); border-radius: var(--rayon-champ); background: var(--surface);
    font: inherit; font-size: var(--t-sm); color: var(--encre);
    transition: border-color var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe);
}
.choix-multiple__recherche:focus { border-color: var(--primaire); outline: none; box-shadow: var(--anneau); }
.choix-multiple__statut { font-size: var(--t-xs); color: var(--encre-douce); white-space: nowrap; }
.choix-multiple__aucun { margin: 6px 0 0; }
.choix-multiple__retenus { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--e-2); }

/* Pastille d'un choix retenu : pilule grise, croix à droite ; le bouton entier retire le choix. */
.pastille-choix {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
    height: 24px; padding: 0 4px 0 10px;
    border: 1px solid var(--trait); border-radius: var(--rayon-pilule); background: var(--surface-4);
    font: 500 var(--t-xs)/1 var(--police); color: var(--encre); cursor: pointer;
    transition: background-color var(--duree-rapide) var(--courbe), border-color var(--duree-rapide) var(--courbe);
}
.pastille-choix span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille-choix svg { width: 16px; height: 16px; flex-shrink: 0; fill: var(--encre-douce); border-radius: 50%; transition: background-color var(--duree-rapide) var(--courbe); }
.pastille-choix:hover, .pastille-choix:focus-visible { border-color: var(--trait); background: var(--trait-2); }
.pastille-choix:hover svg, .pastille-choix:focus-visible svg { fill: var(--encre); background: var(--trait); }
.pastille-choix:disabled { cursor: default; opacity: .6; }

/* ---------- 1 bis. Choix unique avec recherche ---------- */

.choix-recherche { position: relative; }
/* Select natif gardé dans la page (validation required), invisible et hors tabulation. */
.choix-recherche__natif { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.choix-recherche__boite { position: relative; }
.choix-recherche__saisie {
    width: 100%; height: 36px; padding: 0 32px 0 12px;
    border: 1px solid var(--trait-champ); border-radius: var(--rayon-champ); background: var(--surface);
    font: inherit; font-size: var(--t-base); color: var(--encre);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23707070' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: border-color var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe);
}
.choix-recherche__saisie:hover { border-color: var(--encre-douce); }
.choix-recherche__saisie:focus { border-color: var(--primaire); outline: none; box-shadow: var(--anneau); }
.choix-recherche__saisie:disabled { background-color: var(--surface-4); color: var(--encre-douce); }
.champ--erreur .choix-recherche__saisie { border-color: var(--danger-texte); }
.choix-recherche__liste, .choix-recherche__liste ul { list-style: none; margin: 0; padding: 0; }
.choix-recherche__liste {
    position: absolute; z-index: 60; top: calc(100% + 4px); left: 0;
    /* Plus large que la case si besoin, pour lire les libellés longs sur une ligne (José, 27/10). */
    min-width: max(100%, 280px); width: max-content; max-width: min(480px, 90vw);
    max-height: 320px; overflow-y: auto; overscroll-behavior: contain; padding: 4px;
    background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-carte);
    box-shadow: var(--ombre-menu);
}
.choix-recherche__liste[hidden], .choix-recherche__liste [hidden] { display: none; }
.choix-recherche__choix {
    display: flex; align-items: center; min-height: 34px; padding: 6px 10px; line-height: 1.35; border-radius: var(--rayon-xs);
    font-size: var(--t-sm); color: var(--encre); cursor: pointer;
}
.choix-recherche__choix--vide { color: var(--encre-douce); }
.choix-recherche__choix[aria-selected='true'] { font-weight: 500; }
.choix-recherche__choix[aria-selected='true']::after { content: ''; width: 6px; height: 10px; margin: -3px 2px 0 auto; border-right: 1.5px solid var(--primaire); border-bottom: 1.5px solid var(--primaire); transform: rotate(45deg); }
.choix-recherche__choix:hover { background: var(--surface-2); }
.choix-recherche__choix--actif, .choix-recherche__choix--actif:hover { background: var(--surface-4); }
.choix-recherche__choix[aria-disabled='true'] { color: var(--encre-pale); cursor: default; }
.choix-recherche__intertitre { padding: 8px 8px 2px; font: 500 var(--t-xs)/1.4 var(--police); color: var(--encre-douce); }

/* ---------- 2. Formulaire en sections ---------- */

.formulaire-sections { display: flex; flex-direction: column; gap: var(--e-3); min-width: 0; }
.section-formulaire {
    margin: 0; padding: var(--e-carte); min-width: 0;
    background: var(--surface); border: 1px solid var(--trait-2); border-radius: var(--rayon-carte);
}
.section-formulaire__titre { margin: 0; font-size: var(--t-titre-carte); font-weight: 500; color: var(--encre); }
.section-formulaire__intro { margin: 4px 0 0; font-size: var(--t-sm); color: var(--encre-douce); }
.section-formulaire__grille {
    display: grid; gap: 0 var(--e-5); margin-top: var(--e-4);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.section-formulaire__grille > .champ { min-width: 0; }
.section-formulaire__grille > .champ--large,
.section-formulaire__grille > .champ--choix,
.section-formulaire__grille > .choix-multiple { grid-column: 1 / -1; }
/* Une ligne masquée par afficher_si ne doit pas laisser de trou dans la grille. */
.section-formulaire__grille > [hidden] { display: none; }
.section-formulaire__grille > div:not(.champ):not([hidden]) { display: contents; }
/* Même garde pour les grilles existantes : un enveloppant masqué par afficher_si reste masqué. */
.grille-champs > div[hidden]:not(.champ) { display: none; }
.section-formulaire .champ input:not([type='checkbox']):not([type='radio']), .section-formulaire .champ select, .section-formulaire .champ textarea { width: 100%; }
.section-formulaire .aide { line-height: 1.45; }

/* Actions collantes : la barre reste visible en bas de la fenêtre tant que le formulaire défile.
   scroll-padding : un champ atteint au clavier n'est pas caché sous la barre (WCAG 2.4.11). */
html:has(.actions-collantes) { scroll-padding-bottom: 96px; }
.actions-collantes {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3);
    margin-top: var(--e-3); padding: var(--e-3) var(--e-4);
    background: rgba(255, 255, 255, .96); border: 1px solid var(--trait-2); border-radius: var(--rayon-carte);
    box-shadow: 0 -4px 12px rgba(31, 41, 55, .05);
}
@supports (backdrop-filter: blur(4px)) { .actions-collantes { background: rgba(255, 255, 255, .88); backdrop-filter: blur(4px); } }
.actions-collantes__aide { margin-left: auto; font-size: var(--t-xs); color: var(--encre-douce); }

@media (max-width: 720px) {
    .section-formulaire__grille { grid-template-columns: minmax(0, 1fr); }
    .actions-collantes { border-radius: var(--rayon-champ); }
    .actions-collantes .bouton { flex: 1 1 auto; }
    .actions-collantes__aide { flex-basis: 100%; margin-left: 0; order: 3; }
}

/* ---------- 3. Fiche à onglets ---------- */

.onglets__liste {
    display: flex; gap: var(--e-5); margin: 0 0 var(--e-4); padding: 0;
    border-bottom: 1px solid var(--trait-2); overflow-x: auto; scrollbar-width: none;
}
.onglets__liste::-webkit-scrollbar { display: none; }
.onglets__onglet {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 2px; white-space: nowrap;
    color: var(--encre-douce); font-size: var(--t-base); font-weight: 500; text-decoration: none;
    transition: color var(--duree-rapide) var(--courbe);
}
.onglets__onglet::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0;
    background: var(--encre); transform: scaleX(0); transition: transform var(--duree) var(--courbe);
}
.onglets__onglet:hover { color: var(--encre); }
.onglets__onglet:focus-visible { outline-offset: -2px; border-radius: var(--rayon-xs); }
.onglets__onglet[aria-selected='true'] { color: var(--encre); }
.onglets__onglet[aria-selected='true']::after { transform: scaleX(1); }
.onglets__onglet .compteur { font-weight: 500; }
/* Sans script : panneaux empilés, chacun garde son titre de section. */
.onglets__panneau + .onglets__panneau { margin-top: var(--e-4); }
.onglets--actif .onglets__panneau + .onglets__panneau { margin-top: 0; }
.onglets__panneau:focus-visible { outline-offset: 4px; border-radius: var(--rayon-carte); }
.onglets--actif:not(.onglets--accordeon) .onglets__titre-panneau { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.onglets__accordeon { display: none; }

/* Sous 640 px : accordéon (le contrôleur ajoute .onglets--accordeon et un bouton par panneau). */
@media (max-width: 640px) {
    .onglets--accordeon .onglets__liste { display: none; }
    .onglets--accordeon { border: 1px solid var(--trait-2); border-radius: var(--rayon-carte); background: var(--surface); overflow: hidden; }
    .onglets--accordeon .onglets__accordeon {
        display: flex; align-items: center; justify-content: space-between; gap: var(--e-2);
        width: 100%; min-height: 48px; padding: 0 var(--e-4);
        border: 0; border-top: 1px solid var(--trait-2); background: var(--surface);
        font: 500 var(--t-base) var(--police); color: var(--encre); text-align: left; cursor: pointer;
        transition: background-color var(--duree-rapide) var(--courbe);
    }
    .onglets--accordeon .onglets__accordeon:first-of-type { border-top: 0; }
    .onglets--accordeon .onglets__accordeon:hover { background: var(--surface-2); }
    .onglets--accordeon .onglets__accordeon:focus-visible { outline-offset: -2px; }
    .onglets--accordeon .onglets__accordeon::after {
        content: ''; width: 8px; height: 8px; flex-shrink: 0; margin-right: 2px;
        border-right: 1.5px solid var(--encre-douce); border-bottom: 1.5px solid var(--encre-douce);
        transform: translateY(-2px) rotate(45deg); transition: transform var(--duree) var(--courbe);
    }
    .onglets--accordeon .onglets__accordeon[aria-expanded='true']::after { transform: translateY(2px) rotate(-135deg); }
    .onglets--accordeon .onglets__panneau { padding: 0 var(--e-4) var(--e-4); }
    .onglets--accordeon .onglets__panneau > .carte { border: 0; padding: 0; }
    .onglets--accordeon .onglets__titre-panneau { display: none; }
}

/* ---------- 4. Groupes de colonnes repliables ---------- */

.colonnes-repliables thead tr:first-child th { border-bottom: 1px solid var(--trait-2); }
.colonnes-repliables thead th[data-groupe] { padding: 0; text-align: left; }
.colonnes-repliables thead th[data-groupe] + th[data-groupe],
.colonnes-repliables .colonnes-repliables__debut { border-left: 1px solid var(--trait-2); }
.colonnes-repliables__bouton {
    position: relative; /* contient le .sr-only : sinon il échappe au défilement du conteneur */
    display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 0 12px;
    border: 0; background: none; cursor: pointer;
    font: 500 var(--t-xs)/1.2 var(--police); color: var(--encre); text-align: left; white-space: nowrap;
    transition: background-color var(--duree-rapide) var(--courbe);
}
.colonnes-repliables__bouton:hover { background: var(--trait-2); }
.colonnes-repliables__bouton:focus-visible { outline-offset: -2px; }
.colonnes-repliables__bouton::before {
    content: ''; width: 6px; height: 6px; flex-shrink: 0;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px); transition: transform var(--duree) var(--courbe);
}
.colonnes-repliables__bouton[aria-expanded='false']::before { transform: rotate(-45deg); }
.colonnes-repliables__nombre { color: var(--encre-douce); font-weight: 400; }
.colonnes-repliables__bouton[aria-expanded='true'] .colonnes-repliables__nombre { display: none; }
.colonnes-repliables__masquee { display: none; }
.colonnes-repliables__repli { width: 12px; min-width: 12px; padding: 0 !important; background: var(--surface-2); }
.colonnes-repliables__groupe--replie { width: 1%; }

/* ---------- Largeur de colonnes ajustable (lot W3D, assets/redimensionnement_colonnes.js ; lot W3H, §9.14) ---------- */
/* Poignée au bord droit des en-têtes feuilles ; décorative (aria-hidden), souris et pointeur seulement.
   Lot W3H : un filet fin reste visible entre les en-têtes (sur la pastille vert pâle, la poignée transparente du W3D
   ne se voyait pas), plus sombre au survol de l'en-tête, vert et plus haut au survol de la poignée. Zone de prise 10 px. */
.tableau__poignee { position: absolute; top: 0; right: 0; bottom: 0; width: 10px; cursor: col-resize; touch-action: none; user-select: none; z-index: 3; }
.tableau__poignee::after { content: ''; position: absolute; top: 30%; bottom: 30%; right: 0; width: 1px; border-radius: 1px; background: var(--trait); transition: background-color var(--duree-rapide) var(--courbe), top var(--duree-rapide) var(--courbe), bottom var(--duree-rapide) var(--courbe); }
.tableau thead tr:first-child > th:last-child > .tableau__poignee::after { background: transparent; }
.tableau th:hover > .tableau__poignee::after { background: var(--trait-champ); }
.tableau__poignee:hover::after, .tableau__poignee--active::after { top: 12%; bottom: 12%; width: 2px; background: var(--primaire) !important; }
body.tableau--redimensionne { cursor: col-resize; user-select: none; }
.tableau__th--ajuste { white-space: nowrap; }

/* ---------- Lot W3H : tableau de liste sur une ligne (DESIGN-SYSTEM.md §9.14) ----------
   Chaque cellule tient sur une ligne ; seules les colonnes de texte libre (`.tableau__libre` sur la cellule
   d'en-tête et les cellules du corps) passent à la ligne. La cellule titre (nom et code) est bornée à
   --largeur-titre (16rem) et coupée par des points de suspension ; le texte complet vient en titre au survol
   (redimensionnement_colonnes.js). Une largeur choisie à la souris remplace ces bornes. */
.tableau--une-ligne :is(td, th) { white-space: nowrap; }
/* Les intitulés d'en-tête, eux, passent à la ligne entre les mots quand la place manque (jamais sinon : la
   disposition automatique leur donne leur largeur entière dès qu'elle tient). */
.tableau--une-ligne thead th { white-space: normal; }
.tableau--une-ligne :is(td, th).tableau__libre { white-space: normal; min-width: var(--largeur-libre, 11rem); }
.tableau--une-ligne :is(td, th):has(> .cellule-titre) { max-width: var(--largeur-titre, 16rem); }
.tableau--une-ligne .cellule-titre > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 375 px : un long bouton de tête de liste (« Créer les exercices et jalons manquants ») passe à la ligne au lieu
   de faire défiler la page. */
@media (max-width: 560px) {
    .tete-liste__actions { min-width: 0; max-width: 100%; }
    .tete-liste__actions .bouton { white-space: normal; height: auto; min-height: 36px; padding-block: 6px; text-align: center; }
}

/* ---------- Lot W3G : en-tête de liste compact (DESIGN-SYSTEM.md §9.12) ----------
   Une ligne : titre + compteur, « ? » d'aide, vues segmentées, actions à droite. Puis filtres sur une ligne,
   bande de pastilles d'indicateurs, tableau. */
.tete-liste { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2) var(--e-3); min-height: 36px; margin: 0 0 var(--e-1); }
.tete-liste > h1 { margin: 0; line-height: 1.2; }
.tete-liste > nav.actions:has(> [aria-current='page']) { margin: 0; }
.tete-liste > form { margin: 0; }
.tete-liste__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2) var(--e-3); margin-left: auto; }
.tete-liste__actions > form { margin: 0; }

/* Bulle d'aide « ? » sans script : <details> dont le contenu flotte sous le bouton. */
.aide-bulle { position: relative; display: inline-flex; }
.aide-bulle__bouton {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0;
    border: 1px solid var(--trait); border-radius: var(--rayon-pilule); background: var(--surface);
    font: 600 var(--t-xs)/1 var(--police); color: var(--encre-douce); cursor: pointer; list-style: none;
}
.aide-bulle__bouton::-webkit-details-marker { display: none; }
.aide-bulle__bouton:hover, .aide-bulle[open] > .aide-bulle__bouton { border-color: var(--encre-douce); color: var(--encre); }
.aide-bulle__contenu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(440px, calc(100vw - 2 * var(--gouttiere)));
    padding: var(--e-3) var(--e-4); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-carte);
    box-shadow: var(--ombre-menu); font-size: var(--t-sm); font-weight: 400; color: var(--encre); line-height: 1.5;
}
.aide-bulle__contenu p { margin: 0 0 var(--e-2); }
.aide-bulle__contenu > :last-child { margin-bottom: 0; }
.aide-bulle__contenu ul { margin: var(--e-2) 0 0; padding-left: 18px; display: grid; gap: var(--e-1); }
.aide-bulle__contenu .aide { font-size: inherit; color: inherit; }

/* Indicateurs : bande de pastilles d'une ligne (libellé gris, valeur encre), à la place des grandes cartes. */
.indicateurs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2); list-style: none; margin: 0 0 var(--e-2); padding: 0; }
.indicateur { display: inline-flex; align-items: baseline; gap: 6px; height: 28px; padding: 0 12px; border: 1px solid var(--trait-2); border-radius: var(--rayon-pilule); background: var(--surface); font-size: var(--t-xs); line-height: 26px; white-space: nowrap; }
.indicateur__libelle { color: var(--encre-douce); }
.indicateur__valeur { font-weight: 600; font-size: var(--t-sm); color: var(--encre); font-variant-numeric: tabular-nums; }
.indicateur--attention { background: var(--attention-fond); border-color: transparent; }
.indicateur--attention .indicateur__libelle, .indicateur--attention .indicateur__valeur { color: var(--attention-texte); }
.filtres .choix-recherche__saisie { height: 32px; font-size: var(--t-sm); }
.filtres + .carte, .prospects-filtres + .carte { margin-top: var(--e-2); }

/* ---------- Lot DS-B : blocs de synthèse (DESIGN-SYSTEM.md §9.13) ----------
   Inspiration validée par José le 30/10/2026 (maquettes « Projects / Overview » et ByeWind), transposée
   en vert forêt et sans ombre : carte à trait fin, grand chiffre en encre, couleur portée par l'anneau.
   Macros : templates/composants/_blocs.html.twig. Réservé aux tableaux de bord et aux synthèses ;
   les pages de liste gardent la bande d'indicateurs (§9.12). */
.blocs { display: grid; gap: var(--e-3); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); align-items: stretch; }
.blocs > .bloc--large { grid-column: span 2; }
.blocs + .bloc, .bloc + .blocs, .bloc + .bloc { margin-top: var(--e-3); }
/* Dans une grille, l'espacement vient du gap : pas de marge haute, sinon les blocs suivants descendent
   et perdent l'alignement avec le premier (recette DS-B N°1, Ma journée). */
.blocs > .bloc, .pil-grille > .bloc { margin-top: 0; }
@media (max-width: 720px) { .blocs > .bloc--large { grid-column: auto; } }

/* Bloc : une carte, avec une tête facultative (titre à gauche, lien ou action à droite). */
.bloc { display: flex; flex-direction: column; gap: var(--e-3); min-width: 0; }
.bloc__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e-2) var(--e-3); }
.bloc__tete > h2, .bloc__tete > h3 { margin: 0; font-size: var(--t-titre-carte); font-weight: 700; }
.bloc__tete > :last-child:not(:first-child) { font-size: var(--t-sm); }
/* Variante teintée pour un chiffre mis en avant : fond indigo pâle, sans trait ni ombre. */
.bloc--teinte { background: var(--primaire-pale); border-color: transparent; box-shadow: none; border-radius: var(--rayon-carte); }
.bloc--teinte-info { background: var(--neutre-fond); border-color: transparent; box-shadow: none; border-radius: var(--rayon-carte); }

/* Chiffre : libellé, grand nombre, ligne de contexte, anneau à droite. Plusieurs chiffres côte à côte
   dans un même bloc (paires liées : prévu et réalisé). */
.chiffres { display: flex; flex-wrap: wrap; gap: var(--e-4) var(--e-6); }
.chiffre { flex: 1 1 180px; display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); min-width: 0; }
.chiffre__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chiffre__libelle { font-size: var(--t-sm); font-weight: 500; color: var(--encre); }
/* Chiffre-clé (§5) : 28 px 800 en dégradé indigo → menthe. */
.chiffre__valeur { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; background: var(--degrade-chiffre); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chiffre__contexte { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); color: var(--encre-douce); }
.chiffre__contexte--hausse { color: var(--succes-texte); }
.chiffre__contexte--baisse { color: var(--danger-texte); }
.chiffre__contexte--attention { color: var(--attention-texte); }

/* Anneau : SVG à 100 unités de périmètre (pathLength), piste grise, remplissage selon le ton.
   Le pourcentage écrit au centre porte l'information ; l'anneau est décoratif. */
.anneau { --taille-anneau: 64px; --couleur-anneau: var(--primaire); position: relative; flex: none; width: var(--taille-anneau); height: var(--taille-anneau); }
.anneau svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau__piste { fill: none; stroke: var(--surface-4); stroke-width: 4; }
.anneau__valeur { fill: none; stroke: var(--couleur-anneau); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray var(--duree) var(--courbe); }
.anneau__texte { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--t-xs); font-weight: 600; color: var(--encre); font-variant-numeric: tabular-nums; }
.anneau--petit { --taille-anneau: 44px; }
.anneau--petit .anneau__texte { font-size: 11px; }
.anneau--info { --couleur-anneau: var(--marque-3); }
.anneau--attention { --couleur-anneau: var(--attention); }
.anneau--erreur { --couleur-anneau: var(--graphe-depasse); }
.anneau--neutre { --couleur-anneau: var(--graphe-4); }
.bloc--teinte .anneau__piste, .bloc--teinte-info .anneau__piste { stroke: rgba(255, 255, 255, .8); }

/* Équipe du dossier : pastilles d'initiales qui se chevauchent (EC, CDM, ASS), « +N » au-delà. */
.equipe { display: inline-flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.equipe > li + li { margin-left: -6px; }
.avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
    border: 2px solid var(--surface); border-radius: var(--rayon-pilule); background: var(--surface-4);
    font: 600 11px/1 var(--police); color: var(--encre); letter-spacing: .01em; cursor: default;
}
/* Infobulle immédiate au survol (rôle et nom) : le `title` natif tarde et ne s'affiche pas partout.
   Au-dessus de la pastille, en dessous sur la première ligne d'un tableau (conteneur défilant). */
.equipe > li { position: relative; }
.equipe > li:hover { z-index: 3; }
.avatar[data-infobulle] { position: relative; cursor: help; }
.avatar[data-infobulle]:hover::after {
    content: attr(data-infobulle);
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3;
    width: max-content; max-width: 240px; padding: 4px 8px; border-radius: var(--rayon-xs);
    background: var(--infobulle); color: #fff; font: 400 var(--t-xs)/1.4 var(--police); letter-spacing: 0;
    white-space: normal; text-align: left; pointer-events: none;
}
.tableau tbody tr:first-child .avatar[data-infobulle]:hover::after { bottom: auto; top: calc(100% + 6px); }
.avatar--ec { background: var(--succes-fond); color: var(--succes-texte); }
.avatar--cdm { background: var(--neutre-fond); color: var(--neutre-texte); }
.avatar--ass { background: var(--attention-fond); color: var(--attention-texte); }
.avatar--plus { background: var(--surface); color: var(--encre-douce); box-shadow: inset 0 0 0 1px var(--trait); }
.tableau tbody tr:hover .avatar { border-color: var(--surface-2); }

/* Cellule titre : nom en 500, détail gris dessous (SIREN, dernière mise à jour). */
.cellule-titre { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cellule-titre__nom { font-weight: 500; color: var(--encre); }
a.cellule-titre__nom { color: var(--encre); text-decoration: none; }
a.cellule-titre__nom:hover { color: var(--primaire); text-decoration: underline; }
.cellule-titre__detail { font-size: var(--t-xs); color: var(--encre-douce); }

/* Statut discret : point coloré et texte gris, pour les tableaux aérés (les badges restent la règle ailleurs). */
.statut { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--encre-douce); white-space: nowrap; }
.statut::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: var(--rayon-pilule); background: var(--graphe-4); }
.statut--succes::before { background: var(--succes); }
.statut--info::before { background: var(--neutre); }
.statut--attention::before { background: var(--attention); }
.statut--erreur::before { background: var(--graphe-depasse); }

/* Avancement : jauge fine et pourcentage, dans une cellule ou sous un chiffre. */
.avancement { display: flex; align-items: center; gap: var(--e-2); min-width: 120px; }
.avancement > .jauge { flex: 1; margin: 0; }
.avancement__texte { flex: none; min-width: 3.2em; text-align: right; font-size: var(--t-xs); color: var(--encre-douce); font-variant-numeric: tabular-nums; }
.jauge--fine { height: 4px; border-radius: var(--rayon-pilule); }
.jauge--fine > .jauge__barre { border-radius: var(--rayon-pilule); }
.jauge--info > .jauge__barre { background: var(--marque-3); }
.jauge--attention > .jauge__barre { background: var(--attention); }
.jauge--erreur > .jauge__barre { background: var(--graphe-depasse); }

/* Bloc tableau : le tableau occupe la carte bord à bord, tête et pied gardent le padding. */
.bloc--tableau { padding: 0; gap: 0; overflow: hidden; }
.bloc--tableau > .bloc__tete { padding: var(--e-4) var(--e-carte); }
.bloc--tableau > .tableau-conteneur { margin: 0; border: 0; border-top: 1px solid var(--trait-2); border-radius: 0; max-height: none; }
.bloc__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e-2) var(--e-3); padding: var(--e-3) var(--e-carte); border-top: 1px solid var(--trait-2); font-size: var(--t-xs); color: var(--encre-douce); }
.bloc__pied a { font-size: var(--t-sm); }

/* Tableau aéré : lignes d'environ 56 px pour les synthèses de 5 à 10 lignes. Les listes longues restent denses. */
.tableau--aere th { padding: 10px 16px; background: var(--surface); }
.tableau--aere td, .tableau--aere tbody th { padding: 12px 16px; }
@media (max-width: 720px) {
    .tableau--aere th { padding: 8px 12px; }
    .tableau--aere td, .tableau--aere tbody th { padding: 10px 12px; }
    .bloc--tableau > .bloc__tete, .bloc__pied { padding-left: var(--e-4); padding-right: var(--e-4); }
}
