/* ==========================================================================
   Outil de pérennisation de poste — feuille de style unique
   Design system sobre, institutionnel, WCAG 2.1 AA.
   Aucun framework : zéro build, zéro dépendance réseau (intranet compatible).
   ========================================================================== */

/* --- 1. Jetons de design ------------------------------------------------ */
:root {
    color-scheme: light dark;

    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

    /* Échelle typographique (ratio 1.2, base 16 px) */
    --taille-xs: 0.75rem;
    --taille-sm: 0.875rem;
    --taille-base: 1rem;
    --taille-lg: 1.125rem;
    --taille-xl: 1.375rem;
    --taille-2xl: 1.75rem;
    --taille-3xl: 2.25rem;
    --taille-4xl: 3rem;

    --espace-1: 0.25rem;
    --espace-2: 0.5rem;
    --espace-3: 0.75rem;
    --espace-4: 1rem;
    --espace-5: 1.5rem;
    --espace-6: 2rem;
    --espace-7: 3rem;
    --espace-8: 4.5rem;

    --rayon-sm: 8px;
    --rayon-md: 12px;
    --rayon-lg: 18px;
    --rayon-xl: 26px;
    --rayon-plein: 999px;

    /* Ombres teintées de la couleur primaire : plus douces qu'un gris neutre */
    --ombre-1: 0 1px 2px rgb(16 32 64 / 0.05), 0 1px 3px rgb(16 32 64 / 0.06);
    --ombre-2: 0 2px 4px rgb(16 32 64 / 0.05), 0 8px 20px -6px rgb(16 32 64 / 0.12);
    --ombre-3: 0 24px 60px -14px rgb(16 32 64 / 0.28), 0 8px 20px -10px rgb(16 32 64 / 0.16);
    --ombre-primaire: 0 6px 20px -6px color-mix(in srgb, var(--primaire) 55%, transparent);

    /* Mouvement */
    --duree-rapide: 130ms;
    --duree-normale: 220ms;
    --duree-lente: 420ms;
    --sortie: cubic-bezier(0.16, 1, 0.3, 1);
    --entree: cubic-bezier(0.4, 0, 1, 1);
    --ressort: cubic-bezier(0.34, 1.4, 0.64, 1);

    --z-entete: 40;
    --z-modale: 100;
    --z-toast: 1000;

    /* --- Couleurs sémantiques — thème clair --- */
    --fond: #f4f7fc;
    --fond-voile: radial-gradient(1200px 620px at 12% -8%, #e2ebfb 0%, transparent 62%),
                  radial-gradient(980px 520px at 96% 0%, #e7e6fb 0%, transparent 58%);
    --surface: #ffffff;
    --surface-2: #f1f5fb;
    --surface-accent: #e8effc;
    --bordure: #dfe6f2;
    --bordure-forte: #b9c6dd;

    --texte: #0f1729;
    --texte-doux: #4a5872;
    --texte-inverse: #ffffff;

    --primaire: #1d4ed8;
    --primaire-clair: #2f6bf0;
    --primaire-doux: #e6edfe;
    --primaire-degrade: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
    --sur-primaire: #ffffff;

    --succes: #0a6b46;
    --succes-doux: #ddf4e9;
    --attention: #8a4b00;
    --attention-doux: #fdeed9;
    --danger: #a41f16;
    --danger-doux: #fdeceb;
    --info: #145273;
    --info-doux: #e0f0f8;

    /* Séries du graphique — palette catégorielle validée (ΔE CVD 24,7) */
    --serie-cout: #2a78d6;
    --serie-recette: #eb6834;
    --grille: #e3e9f4;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fond: #0b1018;
        --fond-voile: radial-gradient(1200px 620px at 12% -8%, #16233c 0%, transparent 62%),
                      radial-gradient(980px 520px at 96% 0%, #1b1c3a 0%, transparent 58%);
        --surface: #151c29;
        --surface-2: #1c2534;
        --surface-accent: #1f2c42;
        --bordure: #2a3648;
        --bordure-forte: #44546d;

        --texte: #eef3fb;
        --texte-doux: #a3b1c8;
        --texte-inverse: #0b1018;

        --primaire: #7ba5ff;
        --primaire-clair: #a6c2ff;
        --primaire-doux: #1b2b47;
        --primaire-degrade: linear-gradient(135deg, #3b6fe8 0%, #6d5ce0 100%);
        --sur-primaire: #08111f;

        --succes: #5fd3a6;
        --succes-doux: #0d2c22;
        --attention: #f0b464;
        --attention-doux: #33240f;
        --danger: #f89189;
        --danger-doux: #351816;
        --info: #7fc4e4;
        --info-doux: #102836;

        /* Mêmes teintes, pas plus claires : versions calibrées pour fond sombre */
        --serie-cout: #3987e5;
        --serie-recette: #d95926;
        --grille: #2c384c;

        --ombre-1: 0 1px 2px rgb(0 0 0 / 0.5);
        --ombre-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 10px 24px -8px rgb(0 0 0 / 0.6);
        --ombre-3: 0 26px 64px -16px rgb(0 0 0 / 0.75);
    }
}

/* --- 2. Base ------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: var(--taille-base);
    line-height: 1.55;
    color: var(--texte);
    background-color: var(--fond);
    background-image: var(--fond-voile);
    background-repeat: no-repeat;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.2;
    font-weight: 660;
    letter-spacing: -0.021em;
    text-wrap: balance;
}

p {
    margin: 0 0 var(--espace-3);
}

a {
    color: var(--primaire);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--primaire-clair);
    outline-offset: 3px;
    border-radius: var(--rayon-sm);
}

.lien-evitement {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: var(--z-toast);
    padding: var(--espace-3) var(--espace-4);
    background: var(--primaire);
    color: var(--sur-primaire);
    border-radius: 0 0 var(--rayon-md) 0;
}

.lien-evitement:focus {
    left: 0;
}

.visuellement-cache {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --- 3. En-tête --------------------------------------------------------- */
.entete {
    position: sticky;
    top: 0;
    z-index: var(--z-entete);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--bordure);
    box-shadow: var(--ombre-1);
}

/* Filet coloré sous l'en-tête : repère visuel du produit. */
.entete::after {
    content: "";
    position: absolute;
    inset: auto 0 -2px;
    height: 2px;
    background: var(--primaire-degrade);
    opacity: 0.9;
}

.entete__contenu {
    max-width: 1500px;
    margin: 0 auto;
    padding: var(--espace-3) var(--espace-4);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--espace-3);
}

.entete__marque {
    display: flex;
    align-items: center;
    gap: var(--espace-3);
    min-width: 0;
    margin-right: auto;
}

.entete__logo {
    flex: none;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--rayon-md);
    background: var(--primaire-degrade);
    color: #fff;
    box-shadow: var(--ombre-primaire);
}

.entete__titre {
    font-size: var(--taille-lg);
    letter-spacing: -0.025em;
}

.entete__sous-titre {
    margin: 0;
    font-size: var(--taille-xs);
    color: var(--texte-doux);
}

.entete__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--espace-2);
}

/* --- 4. Mise en page ---------------------------------------------------- */
.enveloppe {
    max-width: 1500px;
    margin: 0 auto;
    padding: var(--espace-5) var(--espace-4) var(--espace-7);
}

.grille-principale {
    display: grid;
    gap: var(--espace-5);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

/* Sans min-width: 0, un enfant de grille/flex s'élargit au contenu et
   provoque un débordement horizontal sur mobile. */
.grille-principale > *,
.pile > *,
.carte__corps > * {
    min-width: 0;
}

@media (min-width: 1100px) {
    .grille-principale {
        grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    }

    .colonne-formulaire {
        position: sticky;
        top: 84px;
        max-height: calc(100dvh - 104px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 2px var(--espace-2) var(--espace-5) 2px;
    }
}

.pile {
    display: flex;
    flex-direction: column;
    gap: var(--espace-5);
    min-width: 0;
}

/* --- 5. Cartes et panneaux ---------------------------------------------- */
.carte {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-xl);
    box-shadow: var(--ombre-1);
    transition: box-shadow var(--duree-normale) var(--sortie);
}

.carte:hover {
    box-shadow: var(--ombre-2);
}

/* Entrée en cascade des blocs principaux : donne le sentiment que
   l'interface se construit, sans retarder la lecture. */
@media (prefers-reduced-motion: no-preference) {
    .anime-entree {
        animation: monteeDouce var(--duree-lente) var(--sortie) both;
    }

    .anime-entree:nth-child(2) { animation-delay: 60ms; }
    .anime-entree:nth-child(3) { animation-delay: 120ms; }
    .anime-entree:nth-child(4) { animation-delay: 180ms; }
    .anime-entree:nth-child(5) { animation-delay: 240ms; }
}

@keyframes monteeDouce {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.carte__entete {
    display: flex;
    align-items: flex-start;
    gap: var(--espace-3);
    padding: var(--espace-5) var(--espace-5) var(--espace-4);
    border-bottom: 1px solid var(--bordure);
}

.carte__entete h2 {
    font-size: var(--taille-xl);
}

.carte__entete p {
    margin: var(--espace-1) 0 0;
    font-size: var(--taille-sm);
    color: var(--texte-doux);
}

.carte__corps {
    padding: var(--espace-5);
}

.carte__numero {
    flex: none;
    width: 30px;
    height: 30px;
    margin-top: 2px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primaire-doux);
    color: var(--primaire);
    font-size: var(--taille-sm);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primaire) 22%, transparent);
}

/* --- 6. Formulaire ------------------------------------------------------ */
.champ {
    display: flex;
    flex-direction: column;
    gap: var(--espace-2);
    margin-bottom: var(--espace-4);
}

.champ__etiquette {
    font-size: var(--taille-sm);
    font-weight: 600;
    color: var(--texte);
}

.champ__requis {
    color: var(--danger);
    margin-left: 2px;
}

.champ__aide {
    font-size: var(--taille-xs);
    color: var(--texte-doux);
}

.champ__erreur {
    display: none;
    font-size: var(--taille-xs);
    font-weight: 600;
    color: var(--danger);
}

.champ[data-invalide="true"] .champ__erreur {
    display: block;
}

.champ[data-invalide="true"] .controle {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-doux);
}

.controle {
    width: 100%;
    min-height: 46px;
    padding: var(--espace-2) var(--espace-3);
    font: inherit;
    font-size: var(--taille-base);
    color: var(--texte);
    background: var(--surface);
    border: 1px solid var(--bordure-forte);
    border-radius: var(--rayon-md);
    transition: border-color var(--duree-rapide) var(--sortie),
                box-shadow var(--duree-rapide) var(--sortie),
                background-color var(--duree-rapide) var(--sortie);
}

.controle:focus {
    border-color: var(--primaire);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primaire) 14%, transparent);
}

.controle:hover:not(:disabled) {
    border-color: var(--primaire);
}

.controle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Champ en lecture seule : le contraste du texte reste celui d'un champ normal,
   seul le fond et l'absence d'interaction signalent l'état. */
.controle--verrouille,
.controle[readonly] {
    background: var(--surface-2);
    border-style: dashed;
    cursor: default;
}

.controle--verrouille:hover,
.controle[readonly]:hover {
    border-color: var(--bordure-forte);
}

.champ__icone {
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    margin-right: 2px;
}

select.controle {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: var(--espace-6);
}

.groupe-champs {
    display: grid;
    gap: var(--espace-4);
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.interrupteur {
    display: flex;
    align-items: flex-start;
    gap: var(--espace-3);
    min-height: 44px;
    padding: var(--espace-2) 0;
    cursor: pointer;
}

.interrupteur input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--primaire);
    cursor: pointer;
}

.interrupteur__texte {
    font-size: var(--taille-sm);
}

.interrupteur__texte small {
    display: block;
    color: var(--texte-doux);
    font-size: var(--taille-xs);
}

fieldset {
    margin: 0 0 var(--espace-4);
    padding: 0;
    border: 0;
}

legend {
    padding: 0 0 var(--espace-2);
    font-size: var(--taille-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texte-doux);
}

/* --- 7. Boutons --------------------------------------------------------- */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--espace-2);
    min-height: 44px;
    padding: var(--espace-2) var(--espace-4);
    font: inherit;
    font-size: var(--taille-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    color: var(--texte);
    background: var(--surface);
    border: 1px solid var(--bordure-forte);
    border-radius: var(--rayon-md);
    cursor: pointer;
    transition: background-color var(--duree-rapide) var(--sortie),
                border-color var(--duree-rapide) var(--sortie),
                box-shadow var(--duree-rapide) var(--sortie),
                transform var(--duree-rapide) var(--sortie);
}

.bouton:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: var(--primaire);
    transform: translateY(-1px);
    box-shadow: var(--ombre-1);
}

.bouton:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
    box-shadow: none;
}

.bouton:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bouton--primaire {
    color: #fff;
    background: var(--primaire-degrade);
    border-color: transparent;
    box-shadow: var(--ombre-primaire);
}

.bouton--primaire:hover:not(:disabled) {
    filter: brightness(1.08);
    border-color: transparent;
    background: var(--primaire-degrade);
    box-shadow: var(--ombre-primaire), var(--ombre-2);
}

.bouton--discret {
    border-color: transparent;
    background: transparent;
    color: var(--texte-doux);
}

.bouton--discret:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--texte);
    border-color: transparent;
}

.bouton--danger:hover:not(:disabled) {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-doux);
}

.bouton--petit {
    min-height: 36px;
    padding: var(--espace-1) var(--espace-3);
    font-size: var(--taille-xs);
}

.bouton__icone {
    flex: none;
    width: 18px;
    height: 18px;
}

/* --- 8. Indicateurs clés ------------------------------------------------ */
.tuiles {
    display: grid;
    gap: var(--espace-3);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tuile {
    position: relative;
    overflow: hidden;
    padding: var(--espace-4) var(--espace-4) var(--espace-5);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    background: var(--surface);
    transition: transform var(--duree-normale) var(--sortie),
                box-shadow var(--duree-normale) var(--sortie),
                border-color var(--duree-normale) var(--sortie);
}

.tuile:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primaire) 35%, var(--bordure));
    box-shadow: var(--ombre-2);
}

/* Liseré supérieur : rappelle la couleur du produit sans bruit visuel. */
.tuile::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--bordure);
}

.tuile--accent {
    background: linear-gradient(180deg, var(--primaire-doux) 0%, var(--surface) 78%);
    border-color: color-mix(in srgb, var(--primaire) 30%, transparent);
}

.tuile--accent::before {
    background: var(--primaire-degrade);
}

.tuile--positif::before { background: var(--succes); }
.tuile--negatif::before { background: var(--danger); }

.tuile__libelle {
    display: flex;
    align-items: center;
    gap: var(--espace-1);
    margin: 0 0 var(--espace-2);
    font-size: var(--taille-xs);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texte-doux);
}

.tuile__valeur {
    font-size: var(--taille-2xl);
    font-weight: 720;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.tuile__detail {
    margin: var(--espace-2) 0 0;
    font-size: var(--taille-xs);
    color: var(--texte-doux);
    font-variant-numeric: tabular-nums;
}

/* Jauge de couverture : barre de progression sobre sous la valeur. */
.jauge {
    height: 6px;
    margin-top: var(--espace-3);
    border-radius: var(--rayon-plein);
    background: var(--surface-2);
    overflow: hidden;
}

.jauge__valeur {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primaire-degrade);
    transform-origin: left center;
    transition: width var(--duree-lente) var(--sortie);
}

.jauge__valeur--complet { background: linear-gradient(135deg, var(--succes), #12a06a); }
.jauge__valeur--partiel { background: linear-gradient(135deg, var(--attention), #d08a2a); }

/* --- 9. Tableaux -------------------------------------------------------- */
.tableau-defilant {
    overflow-x: auto;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--taille-sm);
    font-variant-numeric: tabular-nums;
}

caption {
    padding: var(--espace-3) var(--espace-4);
    text-align: left;
    font-size: var(--taille-sm);
    font-weight: 650;
    color: var(--texte-doux);
    background: var(--surface-2);
    border-bottom: 1px solid var(--bordure);
}

th, td {
    /* Ancrage des libellés `.visuellement-cache` : sans containing block
       positionné, ils s'échappent du conteneur défilant et créent un
       débordement horizontal du document sur mobile. */
    position: relative;
    padding: var(--espace-3);
    text-align: right;
    border-bottom: 1px solid var(--bordure);
    white-space: nowrap;
}

th:first-child,
td:first-child {
    text-align: left;
    white-space: normal;
    min-width: 180px;
}

#table-charges th:first-child,
#table-charges td:first-child,
#table-recettes th:first-child,
#table-recettes td:first-child,
#table-resultat th:first-child,
#table-resultat td:first-child {
    min-width: 150px;
    position: sticky;
    left: 0;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--bordure);
}

#table-charges .ligne-total td:first-child,
#table-recettes .ligne-total td:first-child,
#table-resultat .ligne-total td:first-child,
.ligne-sous-total td:first-child {
    background: var(--surface-2);
}

thead th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    font-size: var(--taille-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--texte-doux);
    z-index: 1;
}

tbody tr {
    transition: background-color var(--duree-rapide) var(--sortie);
}

tbody tr:hover {
    background: var(--surface-accent);
}

tbody tr:last-child td,
tbody tr:last-child th {
    border-bottom: 0;
}

.ligne-total td {
    font-weight: 700;
    background: var(--surface-2);
    border-top: 2px solid var(--bordure-forte);
}


.ligne-sous-total td {
    font-weight: 600;
    background: var(--surface-2);
}

td.negatif,
.negatif {
    color: var(--danger);
}

td.positif,
.positif {
    color: var(--succes);
}

.cellule-saisie {
    width: 108px;
    min-height: 38px;
    padding: var(--espace-1) var(--espace-2);
    font: inherit;
    font-size: var(--taille-sm);
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--texte);
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-sm);
    transition: border-color var(--duree-rapide) var(--sortie),
                box-shadow var(--duree-rapide) var(--sortie);
}

.cellule-saisie:hover {
    border-color: var(--primaire);
}

.cellule-saisie:focus {
    border-color: var(--primaire);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primaire) 16%, transparent);
}

/* --- 10. Messages ------------------------------------------------------- */
.messages {
    display: flex;
    flex-direction: column;
    gap: var(--espace-3);
}

.message {
    display: flex;
    gap: var(--espace-3);
    padding: var(--espace-4);
    border: 1px solid;
    border-radius: var(--rayon-lg);
    font-size: var(--taille-sm);
    animation: monteeDouce var(--duree-normale) var(--sortie) both;
}

.message__icone {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.message__titre {
    font-weight: 700;
    margin: 0 0 2px;
}

.message__texte {
    margin: 0;
}

.message--erreur {
    color: var(--danger);
    background: var(--danger-doux);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.message--attention {
    color: var(--attention);
    background: var(--attention-doux);
    border-color: color-mix(in srgb, var(--attention) 35%, transparent);
}

.message--info {
    color: var(--info);
    background: var(--info-doux);
    border-color: color-mix(in srgb, var(--info) 35%, transparent);
}

.message--succes {
    color: var(--succes);
    background: var(--succes-doux);
    border-color: color-mix(in srgb, var(--succes) 35%, transparent);
}

/* --- 11. États de chargement -------------------------------------------- */
.squelette {
    border-radius: var(--rayon-sm);
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-accent) 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: chatoiement 1.4s ease-in-out infinite;
    color: transparent !important;
}

@keyframes chatoiement {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

[data-etat="chargement"] .zone-resultats {
    opacity: 0.55;
    transition: opacity var(--duree-normale) var(--sortie);
}

.indicateur-calcul {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    font-size: var(--taille-xs);
    font-weight: 600;
    color: var(--texte-doux);
}

.indicateur-calcul[hidden] {
    display: none;
}

.rotateur {
    width: 14px;
    height: 14px;
    border: 2px solid var(--bordure-forte);
    border-top-color: var(--primaire);
    border-radius: 50%;
    animation: rotation 700ms linear infinite;
}

@keyframes rotation {
    to { transform: rotate(360deg); }
}

/* --- 12. Graphique ------------------------------------------------------ */
.graphique-bloc {
    position: relative;
}

.graphique {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.graphique__legende {
    display: flex;
    flex-wrap: wrap;
    gap: var(--espace-2);
    margin-bottom: var(--espace-4);
    font-size: var(--taille-sm);
}

.graphique__cle {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    padding: var(--espace-1) var(--espace-3);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-plein);
    background: var(--surface-2);
    font-weight: 600;
    color: var(--texte-doux);
}

.graphique__pastille {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex: none;
}

.pastille--cout {
    background: var(--serie-cout);
}

.pastille--recette {
    background: var(--serie-recette);
}

.graphique__axe {
    font-size: 11px;
    fill: var(--texte-doux);
    font-variant-numeric: tabular-nums;
}

.graphique__unite {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 650;
}

/* Barres : extrémités arrondies côté valeur, ancrées à la ligne de base. */
.graphique__barre {
    transition: opacity var(--duree-rapide) var(--sortie);
}

.graphique-bloc:hover .graphique__groupe:not(:hover) .graphique__barre {
    opacity: 0.4;
}

.graphique__groupe:focus {
    outline: none;
}

.graphique__groupe:focus .graphique__zone-survol {
    stroke: var(--primaire);
    stroke-width: 2;
}

.graphique__zone-survol {
    fill: transparent;
    cursor: default;
}

.graphique__groupe:hover .graphique__zone-survol,
.graphique__groupe:focus .graphique__zone-survol {
    fill: color-mix(in srgb, var(--primaire) 7%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
    .graphique__barre {
        transform-box: fill-box;
        transform-origin: bottom center;
        animation: pousseBarre var(--duree-lente) var(--sortie) both;
    }
}

@keyframes pousseBarre {
    from { transform: scaleY(0); opacity: 0.4; }
    to   { transform: none; opacity: 1; }
}

/* Infobulle du graphique, positionnée en JS. */
.infobulle {
    position: absolute;
    z-index: 5;
    min-width: 180px;
    padding: var(--espace-3);
    border-radius: var(--rayon-md);
    background: var(--surface);
    border: 1px solid var(--bordure-forte);
    box-shadow: var(--ombre-2);
    font-size: var(--taille-xs);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity var(--duree-rapide) var(--sortie);
}

.infobulle[data-visible="true"] {
    opacity: 1;
}

.infobulle__titre {
    margin: 0 0 var(--espace-2);
    font-weight: 700;
    font-size: var(--taille-sm);
}

.infobulle__ligne {
    display: flex;
    align-items: center;
    gap: var(--espace-2);
    margin: 0 0 var(--espace-1);
    font-variant-numeric: tabular-nums;
}

.infobulle__ligne:last-child {
    margin-bottom: 0;
}

.infobulle__valeur {
    margin-left: auto;
    font-weight: 650;
}

.etat-vide {
    padding: var(--espace-6);
    text-align: center;
    color: var(--texte-doux);
    border: 1px dashed var(--bordure-forte);
    border-radius: var(--rayon-lg);
    background: var(--surface-2);
}

/* --- 13. Détails repliables --------------------------------------------- */
details.bloc-repliable {
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-md);
    background: var(--surface);
}

details.bloc-repliable > summary {
    display: flex;
    align-items: center;
    gap: var(--espace-2);
    min-height: 48px;
    padding: var(--espace-3) var(--espace-4);
    font-size: var(--taille-sm);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

details.bloc-repliable > summary::-webkit-details-marker {
    display: none;
}

details.bloc-repliable > summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform var(--duree-normale) var(--sortie);
}

details.bloc-repliable[open] > summary::before {
    transform: rotate(45deg);
}

details.bloc-repliable > .bloc-repliable__corps {
    padding: 0 var(--espace-4) var(--espace-4);
}

/* --- 14. Boîte de dialogue ---------------------------------------------- */
dialog {
    width: min(580px, calc(100vw - 2rem));
    padding: 0;
    color: var(--texte);
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-xl);
    box-shadow: var(--ombre-3);
}

@media (prefers-reduced-motion: no-preference) {
    dialog[open] {
        animation: ouvertureDialogue var(--duree-normale) var(--sortie) both;
    }
}

@keyframes ouvertureDialogue {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

dialog::backdrop {
    background: rgb(6 11 20 / 0.55);
    backdrop-filter: blur(3px);
}

.dialogue__entete {
    display: flex;
    align-items: center;
    gap: var(--espace-3);
    padding: var(--espace-4) var(--espace-5);
    border-bottom: 1px solid var(--bordure);
}

.dialogue__entete h2 {
    font-size: var(--taille-lg);
    margin-right: auto;
}

.dialogue__corps {
    padding: var(--espace-5);
    max-height: 60vh;
    overflow-y: auto;
}

.dialogue__pied {
    display: flex;
    justify-content: flex-end;
    gap: var(--espace-2);
    padding: var(--espace-4) var(--espace-5);
    border-top: 1px solid var(--bordure);
}

.liste-scenarios {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--espace-2);
}

.liste-scenarios li {
    display: flex;
    align-items: center;
    gap: var(--espace-3);
    padding: var(--espace-3);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-md);
}

.liste-scenarios__info {
    margin-right: auto;
    min-width: 0;
}

.liste-scenarios__nom {
    font-weight: 600;
}

.liste-scenarios__meta {
    font-size: var(--taille-xs);
    color: var(--texte-doux);
}

/* --- 15. Notifications -------------------------------------------------- */
.zone-toasts {
    position: fixed;
    right: var(--espace-4);
    bottom: var(--espace-4);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--espace-2);
    max-width: min(420px, calc(100vw - 2rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--espace-3);
    padding: var(--espace-3) var(--espace-4);
    border-radius: var(--rayon-lg);
    box-shadow: var(--ombre-3);
    font-size: var(--taille-sm);
    animation: apparition var(--duree-normale) var(--ressort) both;
}

@keyframes apparition {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* --- 16. Utilitaires (remplacent les attributs style en ligne, interdits
       par la directive CSP style-src 'self') ------------------------------- */
.espacement-haut {
    margin-top: var(--espace-5);
}

.espacement-haut-court {
    margin-top: var(--espace-4);
}

.selecteur-large {
    max-width: 340px;
}

th.cellule-libelle {
    font-weight: inherit;
    text-align: left;
}

.squelette--ligne {
    height: 56px;
}

.graphique__axe {
    font-size: var(--taille-xs);
    fill: var(--texte-doux);
}

/* --- 17. Divers --------------------------------------------------------- */
.barre-outils {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--espace-2);
    margin-bottom: var(--espace-4);
}

.barre-outils__espace {
    margin-left: auto;
}

.etiquette {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-1);
    padding: 3px var(--espace-2);
    font-size: var(--taille-xs);
    font-weight: 600;
    border-radius: var(--rayon-plein);
    background: var(--surface-2);
    color: var(--texte-doux);
    border: 1px solid var(--bordure);
}

.note-bas {
    font-size: var(--taille-xs);
    color: var(--texte-doux);
    margin-top: var(--espace-4);
}

.mesure {
    max-width: 68ch;
}

/* --- 17b. Écrans d'accès et back-office --------------------------------- */
.page-centree {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: var(--espace-5) var(--espace-4);
}

.carte--accueil {
    position: relative;
    width: min(580px, 100%);
    padding: var(--espace-7) var(--espace-6) var(--espace-6);
    display: flex;
    flex-direction: column;
    gap: var(--espace-4);
    box-shadow: var(--ombre-3);
    overflow: hidden;
    animation: monteeDouce var(--duree-lente) var(--sortie) both;
}

/* Halo coloré au sommet de la carte d'accès. */
.carte--accueil::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: var(--rayon-xl) var(--rayon-xl) 0 0;
    background: var(--primaire-degrade);
}

.accueil__marque {
    display: flex;
    align-items: flex-start;
    gap: var(--espace-3);
}

.accueil__titre {
    font-size: var(--taille-xl);
    letter-spacing: -0.03em;
}

.carte--accueil .accueil__titre {
    font-size: var(--taille-2xl);
    max-width: 18ch;
}

.accueil__organisation {
    margin: 2px 0 0;
    font-size: var(--taille-sm);
    color: var(--texte-doux);
}

.accueil__intro {
    margin: 0;
    font-size: var(--taille-sm);
    color: var(--texte-doux);
}

.accueil__formulaire {
    display: flex;
    flex-direction: column;
    gap: var(--espace-3);
}

.accueil__pied {
    margin: 0;
    padding-top: var(--espace-3);
    border-top: 1px solid var(--bordure);
    text-align: center;
}

.lien-discret {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    min-height: 44px;
    padding: var(--espace-2) var(--espace-3);
    font-size: var(--taille-sm);
    font-weight: 600;
    color: var(--texte-doux);
    text-decoration: none;
    border-radius: var(--rayon-sm);
}

.lien-discret:hover {
    color: var(--primaire);
    background: var(--surface-2);
}

.champ__etiquette--large {
    font-size: var(--taille-base);
}

.controle--large {
    min-height: 60px;
    font-size: var(--taille-xl);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    text-align: center;
}

.bouton--large {
    min-height: 54px;
    font-size: var(--taille-base);
}

.liste-etapes {
    margin: 0;
    padding-left: var(--espace-5);
    display: flex;
    flex-direction: column;
    gap: var(--espace-3);
    font-size: var(--taille-sm);
}

.bloc-code {
    margin: var(--espace-2) 0 0;
    padding: var(--espace-3);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--taille-sm);
    background: var(--surface-2);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-sm);
}

.liste-erreurs {
    margin: var(--espace-2) 0 0;
    padding-left: var(--espace-5);
    font-size: var(--taille-xs);
}

/* Onglets du back-office : de simples liens, donc navigables au clavier
   et fonctionnels sans JavaScript. */
.onglets {
    display: flex;
    flex-wrap: wrap;
    gap: var(--espace-1);
    margin-bottom: var(--espace-5);
    padding-bottom: 2px;
    border-bottom: 2px solid var(--bordure);
}

.onglet {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    min-height: 46px;
    padding: var(--espace-2) var(--espace-4);
    font-size: var(--taille-sm);
    font-weight: 600;
    color: var(--texte-doux);
    text-decoration: none;
    border-radius: var(--rayon-sm) var(--rayon-sm) 0 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -4px;
}

.onglet:hover {
    color: var(--texte);
    background: var(--surface-2);
}

.onglet--actif {
    color: var(--primaire);
    border-bottom-color: transparent;
    background: var(--surface);
}

.onglet--actif::after {
    content: "";
    position: absolute;
    inset: auto 12px -4px;
    height: 3px;
    border-radius: var(--rayon-plein);
    background: var(--primaire-degrade);
    animation: apparitionOnglet var(--duree-normale) var(--sortie) both;
}

@keyframes apparitionOnglet {
    from { transform: scaleX(0.4); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.onglet__compteur {
    padding: 1px var(--espace-2);
    font-size: var(--taille-xs);
    font-variant-numeric: tabular-nums;
    background: var(--surface-2);
    border: 1px solid var(--bordure);
    border-radius: 999px;
}

.onglet--actif .onglet__compteur {
    background: var(--primaire-doux);
    border-color: color-mix(in srgb, var(--primaire) 35%, transparent);
}

.sous-titre {
    margin: var(--espace-5) 0 var(--espace-3);
    font-size: var(--taille-base);
}

.sous-titre:first-child {
    margin-top: 0;
}

.formulaire-en-ligne {
    display: inline;
}

.cellule-numero {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.cellule-texte {
    text-align: left;
    white-space: normal;
}

.cellule-actions {
    display: flex;
    gap: var(--espace-2);
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
}

.etiquette--succes {
    color: var(--succes);
    background: var(--succes-doux);
    border-color: color-mix(in srgb, var(--succes) 35%, transparent);
}

.etiquette--danger {
    background: var(--danger-doux);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
    color: var(--danger);
}
.etiquette--neutre {
    color: var(--texte-doux);
}

.interrupteur--compact {
    min-height: 44px;
    padding: 0;
    align-items: center;
}

.interrupteur--compact .interrupteur__texte {
    font-size: var(--taille-sm);
}

.controle--tableau {
    min-width: 180px;
    min-height: 38px;
    padding: var(--espace-1) var(--espace-2);
    font-size: var(--taille-sm);
}

.case-tableau {
    width: 22px;
    height: 22px;
    accent-color: var(--primaire);
    cursor: pointer;
}

.erreur-inline {
    margin: 0 0 var(--espace-4);
    font-size: var(--taille-sm);
    font-weight: 600;
    color: var(--danger);
}

.erreur-inline[hidden] {
    display: none;
}

/* Aperçu d'import : les colonnes retenues sont teintées, mais l'information
   reste portée par le texte de l'en-tête (« → n° club », « → nom »). */
#apercu-import td.colonne-numero,
#apercu-import th.colonne-numero {
    background: var(--primaire-doux);
    box-shadow: inset 2px 0 0 var(--primaire), inset -2px 0 0 var(--primaire);
}

#apercu-import td.colonne-nom,
#apercu-import th.colonne-nom {
    background: var(--succes-doux);
    box-shadow: inset 2px 0 0 var(--succes), inset -2px 0 0 var(--succes);
}

#apercu-import thead th.colonne-numero,
#apercu-import thead th.colonne-nom {
    color: var(--texte);
}

.ligne-entete-source td,
.ligne-entete-source th {
    font-style: italic;
    color: var(--texte-doux);
}

/* Bandeau de contact du Service Accompagnement des Clubs. */
.bandeau-contact {
    display: flex;
    align-items: flex-start;
    gap: var(--espace-3);
    padding: var(--espace-3) var(--espace-4);
    border: 1px solid color-mix(in srgb, var(--primaire) 24%, transparent);
    border-radius: var(--rayon-lg);
    background: var(--primaire-doux);
    color: var(--texte);
    font-size: var(--taille-sm);
}

.bandeau-contact__icone {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--primaire);
}

.bandeau-contact__texte {
    margin: 0;
    line-height: 1.5;
}

.bandeau-contact a {
    color: var(--primaire);
    font-weight: 650;
    text-underline-offset: 2px;
}

.bandeau-contact__separateur {
    margin: 0 var(--espace-1);
    color: var(--texte-doux);
}

/* Blason de la Ligue. */
.entete__blason {
    flex: none;
    height: 48px;
    width: auto;
}

.accueil__blason {
    flex: none;
    height: 80px;
    width: auto;
}

/* Résultats masqués tant que le taux horaire n'est pas conforme. */
.tuile--masquee {
    background: var(--surface-2);
    border-style: dashed;
}

.tuile--masquee::before {
    background: var(--bordure-forte);
}

.tuile__valeur--masquee {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    color: var(--texte-doux);
}

.icone-cadenas {
    width: 20px;
    height: 20px;
}

.bloc-verrouille {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--espace-3);
    padding: var(--espace-6) var(--espace-4);
    color: var(--texte-doux);
    text-align: left;
}

.bloc-verrouille__icone {
    flex: none;
    width: 22px;
    height: 22px;
}

.bloc-verrouille__texte {
    margin: 0;
    font-size: var(--taille-sm);
    max-width: 46ch;
}

.message--bloquant {
    border-width: 2px;
}

.message--bloquant .bouton {
    margin-top: var(--espace-1);
}

.bandeau-club {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    padding: var(--espace-1) var(--espace-3);
    font-size: var(--taille-xs);
    font-weight: 600;
    color: var(--primaire);
    background: var(--primaire-doux);
    border: 1px solid color-mix(in srgb, var(--primaire) 30%, transparent);
    border-radius: 999px;
}

.bandeau-club strong {
    font-variant-numeric: tabular-nums;
}

/* --- 18. Mouvement réduit ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- 19. Impression / PDF ----------------------------------------------- */
@media print {
    @page {
        size: A4 portrait;
        margin: 14mm 12mm;
    }

    :root {
        --fond: #ffffff;
        --surface: #ffffff;
        --surface-2: #f2f4f8;
        --surface-accent: #ffffff;
        --bordure: #9aa6ba;
        --bordure-forte: #6b7789;
        --texte: #000000;
        --texte-doux: #33383f;
        --primaire: #16345f;
        --primaire-doux: #eef3fa;
    }

    body {
        background: #fff;
        font-size: 10pt;
    }

    .entete {
        position: static;
        box-shadow: none;
    }

    .entete__actions,
    .colonne-formulaire,
    .zone-toasts,
    .indicateur-calcul,
    .sans-impression,
    .infobulle,
    .graphique__zone-survol,
    dialog {
        display: none !important;
    }

    /* Aucune animation à l'impression : les barres doivent être à leur
       hauteur finale dès le premier rendu. */
    .anime-entree,
    .graphique__barre,
    .carte--accueil,
    .message,
    .toast {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .entete {
        backdrop-filter: none;
        background: #fff;
    }

    .entete::after,
    .tuile::before,
    .carte--accueil::before,
    .onglet--actif::after {
        display: none;
    }

    /* Les aplats de série sont porteurs de sens : on force leur impression. */
    .graphique__barre,
    .graphique__pastille {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* La jauge fait double emploi avec la ligne « taux de couverture » du
       tableau de résultat, et s'imprime mal. */
    .jauge {
        display: none;
    }

    .grille-principale {
        display: block;
    }

    .carte {
        box-shadow: none;
        break-inside: auto;
        margin-bottom: 6mm;
    }

    .carte__entete {
        break-after: avoid;
        page-break-after: avoid;
    }

    .tableau-defilant {
        overflow: visible;
    }

    thead {
        display: table-header-group;
    }

    /* Le positionnement collant casse la pagination : on le neutralise. */
    thead th,
    #table-charges th:first-child,
    #table-charges td:first-child,
    #table-recettes th:first-child,
    #table-recettes td:first-child,
    #table-resultat th:first-child,
    #table-resultat td:first-child {
        position: static;
        box-shadow: none;
        background: transparent;
    }

    thead th {
        background: var(--surface-2);
    }

    /* Tableaux de projection : sept colonnes chiffrées doivent tenir en A4. */
    #table-charges,
    #table-recettes,
    #table-resultat {
        font-size: 7.5pt;
        table-layout: fixed;
        width: 100%;
    }

    #table-charges th,
    #table-charges td,
    #table-recettes th,
    #table-recettes td,
    #table-resultat th,
    #table-resultat td {
        padding: 3pt 4pt;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #table-charges th:first-child,
    #table-charges td:first-child,
    #table-recettes th:first-child,
    #table-recettes td:first-child,
    #table-resultat th:first-child,
    #table-resultat td:first-child {
        width: 22%;
    }

    /* Les champs de saisie s'impriment comme du texte. */
    .cellule-saisie {
        width: 100%;
        min-height: 0;
        padding: 0;
        border: 0;
        text-align: right;
        background: transparent;
        appearance: none;
        -webkit-appearance: none;
        font-size: 8pt;
    }

    .etiquette {
        border: 0;
        background: transparent;
        padding: 0;
        font-size: 7pt;
    }

    .bandeau-contact {
        border: 1px solid var(--bordure-forte);
        background: transparent;
        font-size: 8.5pt;
        padding: 2mm 3mm;
    }

    .entete__blason {
        height: 14mm;
    }

    /* Légende du graphique : chips allégés pour tenir sur une ligne. */
    .graphique__legende {
        gap: 5mm;
        margin-bottom: 2mm;
        font-size: 8pt;
    }

    .graphique__cle {
        padding: 0;
        border: 0;
        background: transparent;
    }

    /* La taille de police des tableaux de projection prime sur toute règle
       posée au niveau de la ligne. */
    #table-charges tr, #table-charges td, #table-charges th,
    #table-recettes tr, #table-recettes td, #table-recettes th,
    #table-resultat tr, #table-resultat td, #table-resultat th {
        font-size: 7.5pt;
    }

    .tuiles {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 3mm;
    }

    .tuile {
        min-width: 0;
        padding: 3mm;
        border-radius: 3mm;
        background: #fff;
    }

    .tuile--accent {
        background: var(--primaire-doux);
    }

    .tuile__libelle {
        font-size: 7pt;
    }

    .tuile__valeur {
        font-size: 13pt;
    }

    .carte__corps {
        padding: 4mm;
    }

    details.bloc-repliable > .bloc-repliable__corps {
        display: block;
    }

    tr,
    .tuile,
    .message {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    details.bloc-repliable {
        break-inside: auto;
    }

    details.bloc-repliable > summary {
        font-weight: 700;
    }

    .recapitulatif-impression {
        display: block !important;
    }

    a[href]::after {
        content: "";
    }
}

.recapitulatif-impression {
    display: none;
}

/* --- Case « Dossier FAFA » de la liste des clubs ------------------------- */
.coche-fafa {
    display: flex;
    align-items: center;
    gap: var(--espace-2);
}
.coche-fafa[aria-busy="true"] {
    opacity: 0.55;
    pointer-events: none;
}
.coche-fafa__label {
    display: inline-flex;
    align-items: center;
    gap: var(--espace-2);
    min-height: 44px;
    padding: 0 var(--espace-2) 0 var(--espace-1);
    border-radius: var(--rayon-sm);
    cursor: pointer;
    white-space: nowrap;
}
.coche-fafa__label:hover { background: var(--surface-2); }
.coche-fafa__label:focus-within {
    outline: 3px solid var(--primaire);
    outline-offset: 1px;
}
.coche-fafa__label input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex: none;
    accent-color: var(--primaire);
    cursor: pointer;
}
.coche-fafa__texte {
    font-size: var(--taille-sm);
    font-weight: 600;
    color: var(--texte-doux);
}
.coche-fafa__label input:checked ~ .coche-fafa__texte { color: var(--succes); }

@media print {
    .coche-fafa__valider { display: none; }
}
