/* Ventes staff MAGICFIT : outil interne, saisie rapide au comptoir, lisible sur téléphone */
:root {
  --encre: #1f2328;
  --encre-douce: #5b636b;
  --craie: #f5f6f3;
  --blanc: #ffffff;
  --acier: #d5dade;
  /* Couleur MAGICFIT #b0c41f et déclinaisons (contrastes vérifiés WCAG AA) */
  --marque: #b0c41f;          /* aplats : boutons, onglet actif, badges, jauges atteintes (texte --encre, 8,1:1) */
  --marque-survol: #9aad18;   /* survol des aplats (texte --encre, 6,3:1) */
  --marque-texte: #566210;    /* liens et texte vert sur fond clair (6,2:1) */
  --marque-fonce: #3f4a0a;    /* survol des liens */
  --marque-pale: #f3f7dc;     /* lignes et cartes mises en avant */
  --rouge: #a8332a;
  --vert: #2f6b45;
  --etroit: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rayon: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--craie); color: var(--encre); font: 1rem/1.5 var(--texte); }
a { color: var(--marque-texte); }
a:hover { color: var(--marque-fonce); }
:focus-visible { outline: 3px solid var(--marque-texte); outline-offset: 2px; }
.barre :focus-visible { outline-color: var(--marque); }
h1, h2 { font-family: var(--etroit); font-stretch: condensed; line-height: 1.1; margin: 0 0 1rem; }
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; }
small { display: block; color: var(--encre-douce); font-size: .85rem; }
code.details { font-size: .78rem; white-space: pre-wrap; word-break: break-word; color: var(--encre-douce); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.attenue { color: var(--encre-douce); }
.aide { color: var(--encre-douce); font-size: .9rem; max-width: 70ch; }

/* Barre */
.barre { background: var(--encre); color: var(--blanc); border-bottom: 4px solid var(--marque); }
.barre-in { max-width: 72rem; margin: 0 auto; padding: .6rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.marque { color: var(--blanc); text-decoration: none; font-family: var(--etroit); font-stretch: condensed; font-size: 1.3rem; }
.marque strong { letter-spacing: .02em; }
.marque span { color: var(--marque); font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.nav a { color: #cfd5da; text-decoration: none; padding: .4rem .7rem; border-radius: var(--rayon); }
.nav a:hover { color: var(--blanc); background: rgba(176, 196, 31, .16); }
.nav a[aria-current="page"] { color: var(--encre); background: var(--marque); }
.compte { display: flex; gap: .75rem; align-items: center; font-size: .9rem; color: #cfd5da; }
.compte a { color: #cfd5da; }

.page { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.etroit { max-width: 36rem; }

/* Messages */
.flash { padding: .7rem 1rem; border-radius: var(--rayon); border-left: 4px solid var(--marque-texte); background: var(--marque-pale); margin: 0 0 1.25rem; }
.flash-erreur { border-color: var(--rouge); background: #f7e4e2; }
.vide { background: var(--blanc); border: 1px dashed var(--acier); border-radius: var(--rayon); padding: 2rem; text-align: center; }

/* Formulaires */
.formulaire { background: var(--blanc); border: 1px solid var(--acier); border-radius: var(--rayon); padding: 1.25rem; }
.champ { margin-bottom: 1rem; }
.champ label { display: block; font-weight: 600; margin-bottom: .3rem; }
.facultatif { font-weight: 400; color: var(--encre-douce); font-size: .85rem; }
.rangee { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], input[type="number"], input:not([type]), select {
  width: 100%; font: inherit; color: inherit; background: var(--blanc);
  border: 1px solid #b9c0c6; border-radius: var(--rayon); padding: .6rem .7rem; min-height: 2.75rem;
}
input.court { max-width: 7rem; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--rouge); box-shadow: 0 0 0 1px var(--rouge); }
.champ-erreur { color: var(--rouge); font-size: .9rem; margin: .3rem 0 0; }
#montant { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

.bouton { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid #b9c0c6; background: var(--blanc); color: var(--encre); border-radius: var(--rayon);
  padding: .55rem 1rem; min-height: 2.75rem; text-decoration: none; }
.bouton:hover { border-color: var(--encre); color: var(--encre); }
.bouton-principal { background: var(--marque); border-color: var(--marque); color: var(--encre); width: 100%; font-size: 1.05rem; }
.bouton-principal:hover { background: var(--marque-survol); border-color: var(--marque-survol); color: var(--encre); }
.bouton-danger { color: var(--rouge); border-color: var(--rouge); }
.bouton-danger:hover { background: var(--rouge); color: var(--blanc); }
.bouton-discret { border-color: transparent; color: var(--marque-texte); }
.zone-danger { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--acier); }

/* Mise en page */
.deux-colonnes { display: grid; gap: 2rem; }
.entete-page { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.entete-page h1 { margin: 0; }
.filtres { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.filtres label { font-size: .85rem; color: var(--encre-douce); display: grid; gap: .2rem; }
.filtres select { min-width: 8rem; }

.resume { margin: 0 0 1.5rem; display: grid; }
.resume-chiffre { font-family: var(--etroit); font-stretch: condensed; font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--acier); }

/* Mois */
.mois { display: flex; gap: .25rem; overflow-x: auto; margin: 0 0 1.25rem; padding-bottom: .25rem; }
.mois a { flex: 0 0 auto; display: grid; text-decoration: none; color: var(--encre); background: var(--blanc);
  border: 1px solid var(--acier); border-radius: var(--rayon); padding: .35rem .6rem; min-width: 4.5rem; }
.mois a span { font-size: .8rem; color: var(--encre-douce); }
.mois a strong { font-variant-numeric: tabular-nums; font-size: .9rem; }
.mois a.mois-vide strong { color: var(--encre-douce); font-weight: 400; }
.mois a[aria-current="page"] { background: var(--encre); border-color: var(--encre); color: var(--marque); }
.mois a[aria-current="page"] span { color: #cfd5da; }

/* Tableaux */
.tableau-conteneur { overflow-x: auto; background: var(--blanc); border: 1px solid var(--acier); border-radius: var(--rayon); }
.tableau { width: 100%; border-collapse: collapse; }
.tableau caption { text-align: left; padding: .75rem 1rem; color: var(--encre-douce); font-size: .9rem; }
.tableau th, .tableau td { padding: .55rem .9rem; border-top: 1px solid var(--acier); text-align: left; vertical-align: top; }
.tableau thead th { font-size: .85rem; color: var(--encre-douce); font-weight: 600; background: var(--craie); }
.tableau th.nombre, .tableau td.nombre { text-align: right; }
.tableau tfoot th, .tableau tfoot td { font-weight: 700; border-top: 2px solid var(--encre); }
.tableau .actions { text-align: right; white-space: nowrap; }
.tableau-mois td, .tableau-mois th { font-size: .9rem; padding: .5rem .6rem; }
.tableau-edition td { vertical-align: middle; }
.tableau-edition input:not([type="checkbox"]), .tableau-edition select { min-height: 2.4rem; padding: .35rem .5rem; }
.tableau-edition input[type="checkbox"] { width: 1.25rem; height: 1.25rem; }
.ligne-nouvelle td { background: #f1f3ea; }

.onglets { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--encre); margin-bottom: 1.25rem; }
.onglets a { padding: .5rem .9rem; text-decoration: none; color: var(--encre-douce); border-radius: var(--rayon) var(--rayon) 0 0; }
.onglets a[aria-current="page"] { background: var(--encre); color: var(--marque); }

/* Classement : le tableau des scores, comme au mur de la salle */
.regle { color: var(--encre-douce); margin: 0 0 1.25rem; }
.podium { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .5rem; }
.podium li { display: grid; grid-template-columns: 3.5rem 1fr auto; grid-template-areas: "rang nom score" "rang detail detail" "rang jauge jauge" "rang badge badge";
  align-items: center; column-gap: 1rem; background: var(--blanc); border: 1px solid var(--acier); border-left: 6px solid var(--acier);
  border-radius: var(--rayon); padding: .75rem 1rem; }
.podium .rang { grid-area: rang; font-family: var(--etroit); font-stretch: condensed; font-size: 3rem; font-weight: 700; line-height: 1; color: var(--acier); text-align: center; font-variant-numeric: tabular-nums; }
.podium .nom { grid-area: nom; font-weight: 600; font-size: 1.1rem; }
.podium .score { grid-area: score; font-family: var(--etroit); font-stretch: condensed; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.podium .detail { grid-area: detail; color: var(--encre-douce); font-size: .9rem; }
.podium .jauge { grid-area: jauge; height: .4rem; background: var(--craie); border-radius: 1rem; overflow: hidden; margin-top: .4rem; }
.podium .jauge span { display: block; height: 100%; background: var(--marque-texte); }
.podium .badge-prime { grid-area: badge; justify-self: start; margin-top: .4rem; font-size: .85rem; font-weight: 600; background: var(--marque); color: var(--encre); padding: .15rem .55rem; border-radius: 1rem; }
.podium li.prime { border-left-color: var(--marque); background: var(--marque-pale); border-color: #d9e39a; }
.podium li.prime .rang { color: var(--encre); }
.podium li.prime .jauge span { background: var(--marque); }

@media (min-width: 40rem) {
  .rangee { grid-template-columns: 1fr 1fr; }
  .bouton-principal { width: auto; }
}
@media (min-width: 60rem) {
  .deux-colonnes { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); align-items: start; }
  .colonne-cote { padding-top: 3.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* V2 : primes et paramétrage */
.bloc { margin-bottom: 2.5rem; }
.regles { margin: 0 0 .75rem; padding-left: 1.2rem; max-width: 75ch; }
.regles li { margin-bottom: .4rem; }
.regles strong { margin-right: .35rem; }
.ligne-prime td, .ligne-prime th { background: var(--marque-pale); }
.tableau .badge-prime, .podium .badge-prime { display: inline-block; font-size: .85rem; font-weight: 600; background: var(--marque); color: var(--encre); padding: .1rem .55rem; border-radius: 1rem; }
.en-ligne { display: inline; margin: 0; }
.actions .bouton + .en-ligne, .actions .en-ligne { margin-left: .35rem; }
.conditions { border: 1px solid var(--acier); border-left: 4px solid var(--marque); border-radius: var(--rayon); padding: .75rem 1rem .25rem; margin: 0 0 1rem; }
.conditions legend { font-weight: 700; padding: 0 .35rem; }
.champ-case { display: flex; align-items: end; }
.champ-case label { display: flex; gap: .5rem; align-items: center; font-weight: 600; min-height: 2.75rem; }
.champ-case input { width: 1.25rem; height: 1.25rem; }
.liste-primes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.liste-primes li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem;
  background: var(--blanc); border: 1px solid var(--acier); border-left: 6px solid var(--marque); border-radius: var(--rayon); padding: .75rem 1rem; }
.liste-primes li p { margin: .2rem 0 0; color: var(--encre-douce); max-width: 70ch; }
.liste-primes li.inactive { border-left-color: var(--acier); opacity: .75; }
.etiquette { font-size: .8rem; background: var(--craie); border: 1px solid var(--acier); border-radius: 1rem; padding: 0 .5rem; color: var(--encre-douce); }
.entete-page .aide { margin: 0; }

/* V3 : objectifs, planning d'accueil */
[hidden] { display: none !important; }
h3 { font-size: 1.05rem; margin: 0 0 .75rem; }
.choix-mode, .jours { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.choix-mode legend, .jours legend { font-weight: 600; margin-bottom: .3rem; }
.choix-mode label, .jours label { display: flex; gap: .5rem; align-items: center; }
.jours { grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); }
.semaine { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .5rem; margin-bottom: 1.25rem; }
.jour { background: var(--blanc); border: 1px solid var(--acier); border-radius: var(--rayon); padding: .6rem; }
.jour h3 { font-family: var(--etroit); font-stretch: condensed; font-size: 1.15rem; border-bottom: 2px solid var(--encre); padding-bottom: .25rem; margin-bottom: .5rem; }
.jour p { margin: 0; font-size: .9rem; }
.creneau { display: grid; gap: .1rem; padding: .45rem .5rem; margin-bottom: .4rem; border-left: 4px solid var(--marque-texte); background: var(--craie); border-radius: 0 var(--rayon) var(--rayon) 0; font-size: .9rem; }
.creneau strong { font-variant-numeric: tabular-nums; }
.creneau .bouton { min-height: 2rem; padding: .15rem .5rem; font-size: .8rem; justify-self: start; margin-top: .25rem; }
.creneau.inactive { opacity: .6; }
.alerte { border: 1px solid var(--rouge); border-left-width: 6px; background: #fbeeed; border-radius: var(--rayon); padding: 1rem 1.25rem; }
.liste-simple li .en-ligne .bouton { min-height: 2rem; padding: .15rem .6rem; font-size: .85rem; }

/* V4 : prime collective */
.collectif { background: var(--blanc); border: 1px solid var(--acier); border-left: 6px solid var(--marque-texte); border-radius: var(--rayon); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.collectif.atteint { border-left-color: var(--marque); background: var(--marque-pale); }
.collectif p { margin: .5rem 0 0; }
.collectif-chiffres { font-size: 1.05rem; }
.collectif-chiffres strong { font-family: var(--etroit); font-stretch: condensed; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; margin-right: .35rem; }
.collectif .jauge { display: block; height: .55rem; background: var(--craie); border-radius: 1rem; overflow: hidden; margin-top: .6rem; }
.collectif .jauge span { display: block; height: 100%; background: var(--marque-texte); }
.collectif.atteint .jauge span { background: var(--marque); }

/* V5 : objectifs par période */
.tableau-objectifs input { max-width: 9rem; text-align: right; font-variant-numeric: tabular-nums; }
.tableau-objectifs thead th small { font-weight: 400; }
.actions-formulaire { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.actions-formulaire .bouton-principal { width: auto; }

/* V11 : page Primes centrée, règles en cartes */
.page-primes { max-width: 62rem; margin: 0 auto; }
.entete-centree { flex-direction: column; align-items: center; text-align: center; gap: .75rem; margin-bottom: 2rem; }
.entete-centree h1 { font-size: 2.6rem; }
.entete-centree .filtres { justify-content: center; }
.titre-section { text-align: center; font-size: 1.6rem; margin: 0 auto 1.25rem; max-width: 40rem; }
.aide-centree { text-align: center; margin: 1.25rem auto 0; max-width: 60ch; }
.page-primes .bloc { margin-bottom: 3rem; }

.cartes-primes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.carte-prime { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem;
  background: var(--blanc); border: 1px solid var(--acier); border-top: 6px solid var(--marque); border-radius: var(--rayon); padding: 1.25rem 1.25rem 1rem; }
.carte-prime h3 { font-family: var(--etroit); font-stretch: condensed; font-size: 1.35rem; font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; }
.carte-type { margin: 0; font-size: .82rem; color: var(--marque-texte); font-weight: 600; }
.carte-montant { display: block; font-family: var(--etroit); font-stretch: condensed; font-size: 2.6rem; font-weight: 700; line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.carte-sous-montant { margin: 0; color: var(--encre-douce); font-size: .9rem; }
.carte-condition { margin: .5rem 0 0; line-height: 1.45; max-width: 26rem; }
.paliers { display: flex; justify-content: center; gap: 0; width: 100%; }
.palier { display: grid; justify-items: center; gap: .1rem; flex: 1 1 0; padding: .25rem .75rem; font-size: .92rem; }
.palier + .palier { border-left: 1px solid var(--acier); }
.palier .carte-montant { font-size: 2.2rem; margin-bottom: .2rem; }
.palier-nom { font-weight: 600; }
.carte-pied { margin-top: auto; padding-top: .85rem; width: 100%; border-top: 1px solid var(--acier); display: grid; gap: .1rem; font-size: .85rem; color: var(--encre-douce); }
.carte-collectif { border-top-color: var(--marque-texte); }
.carte-classement { border-top-color: var(--encre); }

.page-primes .collectif { text-align: center; padding: 1.5rem; }
.page-primes .collectif-chiffres strong { display: block; font-size: 3rem; margin: 0 0 .25rem; }
.page-primes .collectif .jauge { max-width: 32rem; margin: 1rem auto 0; height: .7rem; }
.page-primes .podium li { text-align: left; }
.page-primes .tableau caption { text-align: center; }

/* V12 : adaptation complète aux téléphones et tablettes */
img, svg, input, select, textarea, button { max-width: 100%; }
h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
.entete-centree h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
.carte-objectif { margin: .6rem 0 0; padding: .35rem .75rem; background: var(--marque-pale); border-radius: 1rem; font-size: .9rem; }
.tableau-mois thead th:first-child, .tableau-mois tbody th { position: sticky; left: 0; z-index: 1; }
.tableau-mois tbody th { background: var(--blanc); box-shadow: 1px 0 0 var(--acier); }
.tableau-mois thead th:first-child { background: var(--craie); box-shadow: 1px 0 0 var(--acier); }
.onglets a, .nav a { white-space: nowrap; }

@media (max-width: 48rem) {
  .barre-in { gap: .35rem .75rem; padding: .5rem .75rem; }
  .compte { margin-left: auto; font-size: .82rem; gap: .5rem; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -.75rem; padding: 0 .75rem .25rem; }
  .nav::-webkit-scrollbar { display: none; }
  .onglets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .onglets::-webkit-scrollbar { display: none; }
  .page { padding: 1rem .75rem 3rem; }
  .entete-page { flex-direction: column; align-items: stretch; }
  .entete-centree { align-items: center; }
  .filtres { width: 100%; }
  .filtres label { flex: 1 1 9rem; }
  .filtres select { min-width: 0; width: 100%; }
  .filtres .bouton { flex: 1 1 auto; }
  .formulaire { padding: 1rem; }
  .actions-formulaire .bouton { flex: 1 1 100%; }
  .liste-primes li .actions { width: 100%; display: flex; gap: .5rem; flex-wrap: wrap; }
}

@media (max-width: 40rem) {
  .tableau-empile thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tableau-empile, .tableau-empile tbody, .tableau-empile tfoot, .tableau-empile tr { display: block; width: 100%; }
  .tableau-empile caption { display: block; }
  .tableau-empile tbody tr { border-top: 1px solid var(--acier); padding: .5rem 0; }
  .tableau-empile td, .tableau-empile tbody th, .tableau-empile tfoot th, .tableau-empile tfoot td {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 0; padding: .3rem 1rem; text-align: right; }
  .tableau-empile [data-label]::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; font-size: .82rem; font-weight: 600; color: var(--encre-douce); }
  .tableau-empile .cellule { min-width: 0; overflow-wrap: anywhere; }
  .tableau-empile td:empty, .tableau-empile td:has(> .cellule:empty) { display: none; }
  .tableau-empile tbody th { font-size: 1.05rem; }
  .tableau-empile tfoot tr { border-top: 2px solid var(--encre); }
  .tableau-empile tfoot th, .tableau-empile tfoot td { border-top: 0; }
  .tableau-empile .actions { justify-content: flex-end; flex-wrap: wrap; }
  .tableau-empile .actions .cellule { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
  .tableau-edition.tableau-empile td { display: grid; grid-template-columns: minmax(6rem, 38%) 1fr; text-align: left; }
  .tableau-edition.tableau-empile td .cellule { display: block; }
  .tableau-edition.tableau-empile input:not([type="checkbox"]), .tableau-edition.tableau-empile select { width: 100%; max-width: none; }
  .tableau-edition.tableau-empile td.actions { grid-template-columns: 1fr; }
  .tableau-objectifs.tableau-empile input { max-width: none; text-align: left; }
  .podium li { grid-template-columns: 2.75rem 1fr; grid-template-areas: "rang nom" "rang score" "rang detail" "rang jauge" "rang badge"; }
  .podium .rang { font-size: 2.4rem; }
  .podium .score { font-size: 1.5rem; }
  .paliers { flex-wrap: wrap; }
  .collectif-chiffres strong, .page-primes .collectif-chiffres strong { font-size: 2.4rem; }
  .cartes-primes { grid-template-columns: 1fr; }
}

/* V13 : notifications */
textarea { width: 100%; font: inherit; color: inherit; background: var(--blanc); border: 1px solid #b9c0c6; border-radius: var(--rayon); padding: .6rem .7rem; resize: vertical; }
.etat-notif { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; }
.etat-notif li { padding: .45rem .75rem; border-radius: var(--rayon); border-left: 4px solid var(--acier); background: var(--blanc); font-size: .92rem; }
.etat-notif li.ok { border-left-color: var(--marque-texte); background: var(--marque-pale); }
.etat-notif li.ko { border-left-color: #c98a1a; background: #fbf3e2; }
.bloc-action { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--acier); }
.apercu-email { width: 100%; height: 70vh; min-height: 32rem; border: 1px solid var(--acier); border-radius: var(--rayon); background: #f5f6f3; }
.statut { display: inline-block; padding: 0 .5rem; border-radius: 1rem; font-size: .85rem; background: var(--craie); border: 1px solid var(--acier); }
.statut-envoye { background: var(--marque-pale); border-color: #d9e39a; }
.statut-erreur { background: #f7e4e2; border-color: #e3b5b0; color: var(--rouge); }
.filtres input[type="month"], .filtres input[type="email"] { min-width: 10rem; }

/* V14 : attestations */
.attestation { display: grid; gap: 1.5rem; margin-bottom: 2.5rem; }
.etroit-large { max-width: 48rem; }
.tampon-apercu { max-width: 12rem; border: 1px solid var(--acier); border-radius: var(--rayon); background: #fff; padding: .5rem; }
.sous-titre { margin-top: 2rem; }
code { font-size: .85em; background: var(--craie); padding: 0 .25rem; border-radius: 3px; }
input[type="file"] { font: inherit; }


/* V16 : sélection des clubs */
.selection-rapide { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .5rem; }
.case-club { width: 1.3rem; height: 1.3rem; }

/* V19 : attestation, présentation */
.carte-attestation { background: var(--blanc); border: 1px solid var(--acier); border-top: 5px solid var(--marque); border-radius: var(--rayon); padding: 1.25rem 1.25rem 0; }
.club-unique { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 1rem; padding: .55rem .8rem; background: var(--marque-pale); border-radius: var(--rayon); }
.club-unique span { font-size: .85rem; color: var(--marque-texte); font-weight: 600; }
.club-unique strong { font-family: var(--etroit); font-stretch: condensed; font-size: 1.3rem; }
.etape { padding: 1rem 0 .25rem; border-top: 1px solid var(--acier); }
.etape h2 { font-family: var(--texte); font-stretch: normal; font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem; }
.rangee-civilite { grid-template-columns: 1fr; }
.champ-euro { position: relative; }
.champ-euro input { padding-right: 2rem; font-variant-numeric: tabular-nums; }
.champ-euro span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--encre-douce); pointer-events: none; }
.etape-options { padding: .75rem 0; }
.etape-options summary { cursor: pointer; color: var(--marque-texte); font-weight: 600; font-size: .95rem; }
.etape-options[open] summary { margin-bottom: .75rem; }
.actions-attestation { position: sticky; bottom: 0; display: grid; gap: .5rem; margin: 0 -1.25rem; padding: 1rem 1.25rem; background: var(--blanc); border-top: 1px solid var(--acier); border-radius: 0 0 var(--rayon) var(--rayon); }
.actions-attestation .bouton { width: 100%; }
.actions-attestation .aide { margin: 0; text-align: center; font-size: .82rem; }
.attestation-apercu { display: grid; gap: .5rem; }
.apercu-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.apercu-entete h2 { margin: 0; }
.apercu-entete span { font-size: .85rem; color: var(--encre-douce); }
.apercu-entete mark { background: var(--marque-pale); color: var(--marque-texte); border-bottom: 2px solid var(--marque); padding: 0 2px; }
.attestation-apercu iframe { width: 100%; aspect-ratio: 210 / 312; height: auto; border: 1px solid var(--acier); border-radius: var(--rayon); background: #dfe3dc; display: block; }
@media (min-width: 30rem) {
  .rangee-civilite { grid-template-columns: 9rem 1fr; }
}
@media (min-width: 70rem) {
  .attestation { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); align-items: start; }
  .attestation-apercu { position: sticky; top: 1rem; }
  .attestation-apercu iframe { max-height: calc(100vh - 5rem); aspect-ratio: auto; height: calc(100vh - 5rem); }
}

/* V22 : reprise des objectifs d'une autre année */
.reprise-objectifs { margin: 0 0 2rem; padding: .75rem 1rem; background: var(--blanc); border: 1px dashed var(--acier); border-radius: var(--rayon); }
.reprise-objectifs label { flex-direction: row; align-items: center; gap: .5rem; display: flex; flex-wrap: wrap; color: var(--encre); font-size: .95rem; }
.reprise-objectifs select { width: auto; min-width: 6rem; }

/* V23 : contact de l'adhérent */
.contact-adherent a { color: var(--marque-texte); text-decoration: none; overflow-wrap: anywhere; }
.contact-adherent a:hover { text-decoration: underline; }

/* V24 : statistiques comparées */
.comparaison-titre { font-family: var(--texte); font-stretch: normal; font-size: 1rem; font-weight: 400; color: var(--encre-douce); }
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; margin: 1rem 0 2rem; }
.indicateur { display: grid; gap: .15rem; padding: .85rem 1rem; background: var(--blanc); border: 1px solid var(--acier); border-top: 4px solid var(--acier); border-radius: var(--rayon); text-decoration: none; color: var(--encre); }
.indicateur:hover { border-color: var(--marque-texte); color: var(--encre); }
.indicateur.actif { border-top-color: var(--marque); background: var(--marque-pale); }
.indicateur-libelle { font-size: .85rem; color: var(--encre-douce); }
.indicateur-valeur { font-family: var(--etroit); font-stretch: condensed; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.indicateur-comparaison { font-size: .82rem; color: var(--encre-douce); }
.evolution { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.evolution.hausse { color: var(--marque-texte); }
.evolution.baisse { color: var(--rouge); }
.evolution.stable { color: var(--encre-douce); }
.graphique-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.legende { margin: 0 0 .5rem; display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.pastille { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-left: .5rem; }
.pastille-n1, .graphique .barre-n1 { background: #c3cad0; fill: #c3cad0; }
.pastille-n, .graphique .barre-n { background: var(--marque); fill: var(--marque); }
.graphique { background: var(--blanc); border: 1px solid var(--acier); border-radius: var(--rayon); padding: .75rem .5rem .25rem; }
.graphique svg { width: 100%; height: auto; display: block; }
.graphique .grille { stroke: #e3e7ea; stroke-width: 1; }
.graphique .axe { font-size: 11px; fill: var(--encre-douce); font-family: var(--texte); }
.graphique .barre-n.en-cours { fill: var(--marque); opacity: .55; }
.tableau-comparatif .mois-futur th, .tableau-comparatif .mois-futur td { color: var(--encre-douce); }
.tableau-comparatif tbody th small { font-weight: 400; }

/* V26 : connexion */
.page-connexion { background: #1f2328; min-height: 100vh; }
.connexion { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1rem; box-sizing: border-box; }
.connexion-carte { width: 100%; max-width: 25rem; background: var(--blanc); border-radius: 10px; border-top: 6px solid var(--marque); padding: 1.75rem 1.5rem 1.5rem; box-shadow: 0 12px 40px rgba(0,0,0,.35); box-sizing: border-box; }
.connexion-entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.connexion-entete img { width: 9.5rem; height: auto; }
.connexion-entete span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-douce); }
.connexion-carte h1 { font-size: 1.7rem; margin: 0 0 .75rem; }
.connexion-texte { color: var(--encre-douce); margin: 0 0 1rem; overflow-wrap: anywhere; }
.connexion-formulaire { gap: .9rem; }
.bouton-large { width: 100%; justify-content: center; padding-top: .8rem; padding-bottom: .8rem; font-size: 1.05rem; }
.connexion-lien { text-align: center; margin: 1.1rem 0 0; font-size: .95rem; }
.connexion-lien a { color: var(--marque-texte); font-weight: 600; }
.connexion-secondaire { margin-top: 1rem; font-size: .9rem; color: var(--encre-douce); text-align: center; }
.connexion-pied { color: #aab2b9; font-size: .82rem; text-align: center; max-width: 25rem; margin: 1.25rem 0 0; }
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 5.5rem; }
.afficher-mdp { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--marque-texte); font: inherit; font-size: .85rem; font-weight: 600; padding: .4rem .5rem; cursor: pointer; }
.champ-code { font-size: 1.8rem; letter-spacing: .5rem; text-align: center; font-variant-numeric: tabular-nums; }
.lien-bouton { border: 0; background: none; padding: 0; font: inherit; color: var(--marque-texte); font-weight: 600; text-decoration: underline; cursor: pointer; }
.form-deconnexion { display: inline; margin: 0; }
.barre .lien-bouton { color: inherit; font-weight: inherit; }
.form-inline { display: inline; margin: 0; }
.alerte-mdp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1rem; margin: 0 0 1rem; background: var(--marque-pale); border-left: 4px solid var(--marque); border-radius: var(--rayon); }
.etat-connexion small { display: block; }
.texte-erreur { color: var(--rouge); }
.infos-compte { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.infos-compte dt { color: var(--encre-douce); }
.infos-compte dd { margin: 0; overflow-wrap: anywhere; }
.activite-compte { list-style: none; padding: 0; margin: 0 0 .75rem; }
.activite-compte li { padding: .35rem 0; border-bottom: 1px solid var(--acier); }
.activite-compte span { font-variant-numeric: tabular-nums; color: var(--encre-douce); margin-right: .5rem; }

.connexion-formulaire { border: 0; padding: 0; background: none; display: grid; }
.connexion-entete span { white-space: nowrap; font-size: .72rem; }

/* V27 : mot de passe commun */
.mdp-commun { margin: 0 0 1.5rem; }
.mdp-commun .formulaire { max-width: 46rem; }
.choix-cible { border: 0; padding: 0; margin: .25rem 0 1rem; display: grid; gap: .4rem; }
.choix-cible label { display: flex; align-items: center; gap: .5rem; font-weight: 400; }

/* V28 : réglage de connexion */
.reglage-connexion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1rem; margin: 0 0 1.25rem; background: var(--blanc); border: 1px solid var(--acier); border-left: 4px solid var(--marque); border-radius: var(--rayon); }

/* V31 : trésorerie */
.onglets { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--encre); margin: 0 0 1.25rem; }
.onglets a { padding: .55rem .9rem; text-decoration: none; color: var(--encre); border-radius: var(--rayon) var(--rayon) 0 0; }
.onglets a[aria-current="page"] { background: var(--encre); color: var(--marque); }
.barre-outils { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 .5rem; }
.barre-outils-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.tableau-treso-conteneur { overflow-x: auto; background: var(--blanc); border: 1px solid var(--acier); border-radius: var(--rayon); }
.tableau-treso { border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 72rem; width: 100%; }
.tableau-treso th, .tableau-treso td { padding: .3rem .45rem; border-bottom: 1px solid #edf0f2; white-space: nowrap; }
.tableau-treso thead th { position: sticky; top: 0; background: var(--craie); z-index: 2; font-weight: 700; }
.tableau-treso thead th a { color: inherit; text-decoration: none; }
.tableau-treso thead th a:hover { text-decoration: underline; }
.tableau-treso thead th.mois-clos { border-bottom: 3px solid var(--marque); }
.tableau-treso .treso-libelle { position: sticky; left: 0; background: var(--blanc); z-index: 1; text-align: left; font-weight: 400; min-width: 15rem; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.tableau-treso thead .treso-libelle { background: var(--craie); z-index: 3; }
.tableau-treso .treso-libelle small { color: var(--encre-douce); }
.tableau-treso .treso-section th { background: var(--encre); color: #fff; text-align: left; font-weight: 700; position: sticky; left: 0; }
.tableau-treso .treso-sous-total th, .tableau-treso .treso-sous-total td { font-weight: 700; background: #f7f8f5; }
.tableau-treso .treso-total th, .tableau-treso .treso-total td { font-weight: 700; background: var(--marque-pale); border-top: 2px solid var(--marque); }
.tableau-treso .treso-solde th, .tableau-treso .treso-solde td { font-weight: 700; }
.tableau-treso .treso-solde-fin th, .tableau-treso .treso-solde-fin td { background: #1f2328; color: #fff; }
.tableau-treso .treso-solde-fin td.negatif { color: #ff9b91; }
.tableau-treso td.val-prevu { color: #7a8288; font-style: italic; }
.tableau-treso .treso-solde-fin td.val-prevu { color: #c5cbd0; }
.tableau-treso td.total { font-weight: 700; border-left: 2px solid var(--acier); }
.tableau-treso td.hausse { color: var(--marque-texte); font-weight: 600; }
.tableau-treso td.baisse { color: var(--rouge); font-weight: 600; }
.tableau-treso .ligne-inactive th, .tableau-treso .ligne-inactive td { color: #9aa1a7; }
.navigation-mois { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.navigation-mois h2 { margin: 0; text-align: center; }
.navigation-mois small { font-size: .8rem; color: var(--marque-texte); font-weight: 600; margin-left: .4rem; }
.tableau-saisie-treso th small { display: block; font-weight: 400; color: var(--encre-douce); font-size: .78rem; }
.tableau-saisie-treso input { max-width: 9.5rem; text-align: right; font-variant-numeric: tabular-nums; min-height: 2.3rem; padding: .35rem .5rem; }
.tableau-saisie-treso .treso-section th { background: var(--encre); color: #fff; }
.tableau-saisie-treso .treso-total th, .tableau-saisie-treso .treso-total td { font-weight: 700; background: var(--marque-pale); }
.tableau-saisie-treso td.hausse { color: var(--marque-texte); font-weight: 600; }
.tableau-saisie-treso td.baisse { color: var(--rouge); font-weight: 600; }
.recalage-treso { margin: 1.25rem 0; border: 1px solid var(--acier); border-radius: var(--rayon); padding: 1rem; background: var(--blanc); }
.barre-enregistrer { position: sticky; bottom: 0; background: var(--craie); padding: .75rem 0; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; z-index: 2; }
.outils-mois { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 2rem; }
.liste-aide { margin: 0; padding-left: 1.1rem; }
.liste-aide li { margin-bottom: .4rem; }

/* V35 : salaires */
.tableau-paie { font-size: .85rem; }
.tableau-paie th small { display: block; font-weight: 400; color: var(--encre-douce); font-size: .75rem; }
.tableau-paie td small { display: block; font-size: .75rem; }
.tableau-paie input { width: 6.2rem; text-align: right; padding: .3rem .4rem; min-height: 2.1rem; font-variant-numeric: tabular-nums; }
.tableau-paie .groupe-estime { background: var(--marque-pale); }
.tableau-paie .groupe-reel { background: #eef3f8; }
.tableau-paie td.total { font-weight: 700; }
.tableau-paie .hausse { color: var(--marque-texte); }
.tableau-paie .baisse { color: var(--rouge); }
.tableau-fiches input.court { max-width: 6.5rem; }
.tableau-fiches input[type="date"] { max-width: 9.5rem; }
.rangee-5 { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }

/* V36 : IBAN, virements, identifiants */
.champ-iban { width: 14rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.tableau-paie td small { color: var(--encre-douce); }

.cartes-identifiants { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .75rem; }
.carte-identifiant { background: var(--blanc); border: 1px solid var(--acier); border-left: 4px solid var(--marque); border-radius: var(--rayon); padding: .9rem 1rem; }
.carte-identifiant header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.carte-identifiant h3 { margin: 0; font-size: 1rem; }
.carte-identifiant .lien-identifiant { margin: .25rem 0 .5rem; font-size: .85rem; overflow-wrap: anywhere; }
.carte-identifiant dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .75rem; margin: .5rem 0; }
.carte-identifiant dt { color: var(--encre-douce); font-size: .85rem; }
.carte-identifiant dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.secret-valeur { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.secret-valeur.visible { background: #fff7d6; padding: 0 .25rem; border-radius: 3px; }
.carte-identifiant details { margin-top: .5rem; }
.formulaire-identifiant { margin: .75rem 0; }
.ajout-identifiant summary { display: inline-flex; list-style: none; cursor: pointer; }
.ajout-identifiant summary::-webkit-details-marker { display: none; }
.groupe-identifiants h2 small { font-size: .9rem; font-weight: 400; }

.carte-identifiant .lien-identifiant a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.court-date { max-width: 12rem; }

/* Compte rendu d'un outil d'import lancé depuis une page (02/11/2026) */
.compte-rendu { max-height: 24rem; overflow: auto; white-space: pre; font-size: .8rem; line-height: 1.35; padding: .75rem; border-radius: 6px; background: rgba(127,127,127,.08); }
