/* =================================================================
   Pelican Brussels — pelican-app.css
   Styles ADDITIONNELS pour la couche dynamique (admin + formulaires
   riches + espace acheteur). Complete assets/style.css, ne le remplace
   pas : on reutilise ses tokens (--navy, --red, --green, --border...)
   et ses classes (.wrap .card .btn .badge .form-field .form-grid).
   Mobile-first. Aucune dependance externe.
   -----------------------------------------------------------------
   CLASSES A UTILISER DANS LES VUES
   -----------------------------------------------------------------
   Layout
     .adm-body            : <body> des pages admin (fond gris clair).
     .adm-nav             : barre de navigation admin (dans .site-header).
     .adm-nav__out        : lien Deconnexion (accent rouge).
     .adm-wrap            : conteneur principal des ecrans admin.
     .app-wrap            : conteneur des pages publiques dynamiques
                            (inscription, merci, espace).
     .adm-head            : entete d'ecran (titre + actions a droite).
     .adm-actions         : groupe de boutons aligne a droite.
   Cartes / chiffres
     .adm-cards           : grille de cartes.
     .adm-stat            : carte chiffre cle (.adm-stat__val + __lbl).
     .adm-panel           : panneau/section encadre (reutilise .card).
   Tableaux
     .adm-table           : tableau de donnees (responsive, scroll-x via
                            .adm-table-wrap).
     .adm-table-wrap      : wrapper scrollable horizontalement.
     .adm-table td.num    : cellule numerique (alignee a droite).
     .adm-table .row-act  : cellule d'actions.
   Formulaires
     .adm-form            : formulaire admin (reutilise .form-field).
     .form-row            : ligne de champs (grille auto-fit).
     .field-inline        : champ compact en ligne.
     .form-actions        : barre de boutons du formulaire.
     .form-hint           : aide grise sous un champ.
   Badges de statut (a poser sur .badge)
     .badge--payee        : commande payee (vert).
     .badge--attente      : en attente de paiement (ambre).
     .badge--facturer     : a facturer (bleu).
     .badge--facturee     : facturee (navy).
     .badge--annulee      : annulee/expiree/remboursee (gris).
     .badge--brouillon    : session brouillon (gris raye).
     .badge--ouvert       : session ouverte (vert).
     .badge--complet      : session complete (gris).
   Divers
     .flash               : message flash (.flash--ok / .flash--err).
     .pill                : petite etiquette d'info neutre.
     .muted-sm            : texte gris petit.
   Console V3 (statistiques + tri + filtres + graphes ; voir bloc V3
   plus bas pour le detail et l'usage exact)
     .grid-table--sessions/--catalogue/--commandes/--kv/--participants
                          : gabarits de colonnes des tableaux en grille.
     .sort-th (--num)     : en-tete de colonne triable (aria-sort + ▲▼).
     .adm-filter-bar      : barre de filtres admin (prefixee, ne heurte
                            pas .filter-bar public de style.css).
     .kpi-card / .kpi__sub: carte chiffre riche + sous-libelle.
     .stat-grid/.stat-tile: tuiles de repartition par statut.
     .stat-lines/.stat-line : lignes libelle → montant.
     .trend               : indicateur de variation (--up/--down/--flat).
     .meter               : jauge de remplissage (--v sur __fill).
     .bar-list            : barres horizontales classees (top cours).
     .bar-chart           : mini histogramme vertical (--h sur __bar).
     .adm-section-grid    : disposition des panneaux stats (--2 / --3).
   ================================================================= */

:root {
    --amber:   #b45309;
    --amber-bg: #fffbeb;
    --blue:    #1d4ed8;
    --blue-bg: #eff6ff;
}


/* -----------------------------------------------------------------
   1. LAYOUT ADMIN + PUBLIC DYNAMIQUE
   ----------------------------------------------------------------- */
.adm-body {
    background: var(--light);
}

.adm-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.adm-nav a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.adm-nav a:hover {
    background: rgba(26, 42, 64, 0.06);
    color: var(--navy);
}

.adm-nav a[aria-current="page"] {
    background: var(--navy);
    color: #fff;
}

.adm-nav__out {
    color: var(--red);
}

.adm-nav__out:hover {
    color: #fff;
    background: var(--red);
}

.adm-wrap,
.app-wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 32px 40px 64px;
}

.app-wrap {
    max-width: 760px;
}

/* La page /inscription pose une grille 2 colonnes (formulaire + récap 380px) :
   il lui faut la largeur site complète, sinon la colonne formulaire est écrasée. */
.app-wrap:has(.checkout__grid) { max-width: var(--wrap); }

.adm-head {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.adm-head h1 {
    font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
    margin: 0;
}

.adm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 640px) {
    .adm-wrap,
    .app-wrap {
        padding: 24px 20px 48px;
    }
}


/* -----------------------------------------------------------------
   2. CARTES / CHIFFRES CLES
   ----------------------------------------------------------------- */
.adm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.adm-stat {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    border-left: 3px solid var(--red);
}

.adm-stat__val {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: var(--navy);
}

.adm-stat__lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-top: 6px;
}

.adm-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(18px, 2.2vw, 26px);
    margin-bottom: 24px;
}

.adm-panel > h2 {
    font-size: 1.2rem;
    text-transform: none;
    margin-bottom: 16px;
}


/* -----------------------------------------------------------------
   3. TABLEAUX
   ----------------------------------------------------------------- */
.adm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 560px;
}

.adm-table th,
.adm-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.adm-table thead th {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: var(--light);
    white-space: nowrap;
}

.adm-table tbody tr:last-child td {
    border-bottom: none;
}

.adm-table tbody tr:hover {
    background: rgba(26, 42, 64, 0.03);
}

.adm-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.adm-table .row-act {
    text-align: right;
    white-space: nowrap;
}

.adm-table a {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.adm-table a:hover {
    color: var(--red);
}


/* -----------------------------------------------------------------
   4. FORMULAIRES RICHES
   ----------------------------------------------------------------- */
.adm-form {
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 16px;
}

.field-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.field-inline input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}

/* Sélecteur de langue du formulaire catalogue (bascule titre/durée/résumé). */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}
.lang-toggle .lang-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .04em;
    padding: 6px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.lang-toggle .lang-btn.is-active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.lang-toggle__hint { font-size: 12px; color: var(--muted); }
.lang-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--navy);
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
}
.adm-form--i18n .lang-field[hidden] { display: none; }

/* Petits boutons pour les lignes de tableau et actions compactes. */
.btn-sm {
    min-height: 34px;
    padding: 6px 14px;
    font-size: 11px;
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}

.btn-danger:hover {
    background: var(--red);
    color: #fff;
}


/* -----------------------------------------------------------------
   5. BADGES DE STATUT
   ----------------------------------------------------------------- */
.badge--payee,
.badge--ouvert {
    background: #ecfdf5;
    color: var(--green);
    border-color: #a7f3d0;
}

.badge--attente {
    background: var(--amber-bg);
    color: var(--amber);
    border-color: #fde68a;
}

.badge--facturer {
    background: var(--blue-bg);
    color: var(--blue);
    border-color: #bfdbfe;
}

.badge--facturee {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.badge--annulee,
.badge--complet {
    background: #f3f4f6;
    color: var(--muted-2, #4b5563);
    border-color: #e5e7eb;
}

.badge--brouillon {
    background: repeating-linear-gradient(
        45deg, #f3f4f6, #f3f4f6 6px, #e9ebee 6px, #e9ebee 12px);
    color: #6b7280;
    border-color: #e5e7eb;
}


/* -----------------------------------------------------------------
   6. MESSAGES FLASH / DIVERS
   ----------------------------------------------------------------- */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.flash--ok {
    background: #f0fdf4;
    color: #166534;
    border-color: #a7f3d0;
}

.flash--err {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--light);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
}

.muted-sm {
    font-size: 0.82rem;
    color: var(--muted);
}

/* Ecran de connexion (admin + espace) centre et sobre. */
.auth-box {
    max-width: 420px;
    margin: 0 auto;
}
/* Page "Mon compte" : on réduit le rembourrage vertical du conteneur pour que
   header + carte + footer tiennent dans l'écran, sans barre de défilement. */
.app-wrap:has(.auth-box) {
    padding-top: 24px;
    padding-bottom: 28px;
}

/* Onglets « J'ai déjà un compte » / « Créer un compte » (écran /espace). */
.auth-tabs {
    display: flex;
    gap: 6px;
    margin: 22px 0 18px;
    padding: 5px;
    background: #f1f3f5;
    border-radius: 12px;
}
.auth-tab {
    flex: 1 1 0;
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.2;
    text-align: center;
    color: #5b6472;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.auth-tab:hover { color: var(--ink, #1a1f2b); }
.auth-tab.is-active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 1px 3px rgba(0,0,0,.09);
}
.auth-panel[hidden] { display: none; }
/* Hauteur réservée identique sur les deux onglets (connexion = 1 champ,
   création = 2 champs) : la carte ne change plus de taille au changement
   d'onglet, donc aucune barre de défilement n'apparaît. */
.auth-panel { min-height: 216px; }
/* Dans la carte "Mon compte", la barre d'actions n'a pas besoin du liséré
   dense de l'admin ; on laisse respirer et on évite de rogner les capitales
   accentuées (« CRÉER MON COMPTE »). */
.auth-box .form-actions {
    border-top: 0;
    padding-top: 0;
    margin-top: 14px;
}
.auth-box .btn-full {
    line-height: 1.4;
    min-height: 48px;
}


/* =================================================================
   V2 — Back-office dense + vues dynamiques (maquette écrans 10-12)
   Ajouts NON destructifs. Reutilise les tokens de style.css.
   ================================================================= */

/* -----------------------------------------------------------------
   7. SHELL ADMIN (sidebar navy + zone principale)
   ----------------------------------------------------------------- */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: var(--light);
}
.admin-sidebar {
    width: 212px;
    flex: 0 0 auto;
    background: var(--navy);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12.5px;
    color: #fff;
}
.admin-menu { display: flex; flex-direction: column; gap: 2px; }
.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9px;
    color: #8fa0b4;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12.5px;
    transition: background .2s, color .2s;
}
.admin-menu a:hover,
.admin-menu__item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-menu a[aria-current="page"],
.admin-menu__item.is-active,
.admin-menu__item[aria-current="page"] { background: var(--red); color: #fff; }
/* Item de menu utilisable sur <a>, <button> ou <span> (mêmes règles que .admin-menu a). */
.admin-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9px;
    color: #8fa0b4;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12.5px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .2s, color .2s;
}
/* Entrée « active mais pas page courante » (ex. section survolée en clair). */
.admin-menu__item--soft { background: rgba(255,255,255,.1); color: #fff; }

.admin-main { flex: 1; min-width: 0; background: var(--alt-1, #f7f9fb); }
.admin-topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.admin-topbar__title { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--navy); }
.admin-topbar__tools { display: flex; align-items: center; gap: 12px; }
.admin-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--input-bd, #d8dee6);
    border-radius: 9px;
    background: #fff;
    font-size: 12.5px;
    color: var(--muted);
}
.admin-search input { border: none; outline: none; font: inherit; width: 100%; background: transparent; }
/* Indicateur de focus clavier (l'outline natif de l'input est supprimé ci-dessus) */
.admin-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,42,64,.15); }
.admin-body { padding: 22px 24px; }

/* Sidebar repliée en barre haute sous 860px (cf. DESIGN-SPEC). */
@media (max-width: 860px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; }
    .admin-brand { border-bottom: none; padding: 0 8px; margin-right: auto; }
    .admin-menu { flex-direction: row; flex-wrap: wrap; }
    .admin-menu a,
    .admin-menu__item { height: 34px; }
    .admin-topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; }
    .admin-body { padding: 16px; }
}


/* -----------------------------------------------------------------
   8. TABLE DENSE EN GRILLE (variante visuelle du back-office)
   Alternative a .adm-table quand on veut le rendu « cartes/lignes »
   de la maquette. Chaque ligne = .grid-row ; l'entete = .grid-row--head.
   ----------------------------------------------------------------- */
.grid-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.grid-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid-row {
    display: grid;
    gap: 8px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft, #f0f2f5);
    font-size: 12.5px;
    color: var(--ink-2, #374151);
    min-width: 720px;
}
.grid-row:last-child { border-bottom: none; }
.grid-row--head {
    padding: 12px 18px;
    background: #fafbfc;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--faint, #9aa3af);
}
.grid-row--alt { background: #fbfcfd; }
.grid-row--muted { color: var(--faint, #9aa3af); }
.grid-row .strong { font-family: var(--font-display); font-weight: 700; color: var(--navy); }
/* Cellule de grille (optionnelle : les enfants directs de .grid-row sont aussi acceptés). */
.grid-cell { min-width: 0; display: flex; align-items: center; }
.grid-cell--strong { font-family: var(--font-display); font-weight: 700; color: var(--navy); }
.grid-cell--muted  { color: var(--muted, #6b7280); }
.grid-cell--num    { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.grid-cell--center { justify-content: center; }
.grid-cell--end    { justify-content: flex-end; }


/* -----------------------------------------------------------------
   9. BADGES SUPPLEMENTAIRES (monde + statut de session admin)
   ----------------------------------------------------------------- */
.badge--planifiee {
    background: var(--tint, #eef2f7);
    color: var(--navy);
    border-color: var(--tint-bd, #dce3ec);
}
.badge--public {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e7eaee;
}
.badge--entreprise {
    background: var(--tint, #eef2f7);
    color: var(--navy);
    border-color: var(--tint-bd, #dce3ec);
}
.badge--last {
    background: #fff1f1;
    color: #b30000;
    border-color: #f6cdcd;
}


/* -----------------------------------------------------------------
   10. STAT COMPACTE (dashboard admin, 4 colonnes)
   Variante plate de .adm-stat, sans filet rouge.
   ----------------------------------------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.kpi__lbl { font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, #9aa3af); }
.kpi__val { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--navy); margin-top: 4px; }
.kpi__val--alert,
.kpi--alert .kpi__val { color: #b30000; }
/* Sous-libellé optionnel sous la valeur (contexte, période, delta). */
.kpi__sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
/* Variantes de densité de la grille KPI (défaut = 4 colonnes). */
.kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid--auto { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (max-width: 860px) { .kpi-grid, .kpi-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-grid, .kpi-grid--3 { grid-template-columns: 1fr; } }


/* =================================================================
   V3 — Console admin lisible (statistiques, tri, filtres, graphes)
   Ajouts NON destructifs. Réutilise les tokens de style.css + les
   composants V2 (.grid-table / .kpi / .adm-panel). AUCUN impact sur la
   branche publique : les classes de filtres/graphes sont préfixées
   (.adm-filter-bar, .bar-chart…) pour ne pas entrer en collision avec
   les classes publiques (ex. .filter-bar de style.css / page /dates).
   -----------------------------------------------------------------
   CLASSES V3
     Colonnes de tableaux en grille (templates par écran) :
       .grid-table--sessions / --catalogue / --commandes / --kv /
       --participants  (à poser sur .grid-table ; définissent les
       colonnes des .grid-row enfants — plus besoin de style inline).
     En-têtes triables :
       .sort-th        : lien d'en-tête de colonne triable (▲▼).
                         État courant via aria-sort="ascending|descending".
       .sort-th--num   : aligné à droite (colonnes numériques).
     Barre de filtres admin :
       .adm-filter-bar (+ __group / label / __count / __actions).
     Cartes chiffres enrichies :
       .kpi__sub                : sous-libellé d'une .kpi.
       .kpi-grid--3 / --auto    : variantes de densité.
       .kpi-card (+ --accent)   : carte KPI riche (__lbl/__val/__sub).
       .stat-grid               : grille compacte de tuiles.
       .stat-tile (+ __val/__lbl, variantes de statut --ok/--warn/
                   --info/--muted/--danger) : répartition par statut.
       .stat-lines / .stat-line (.k/.v) : lignes libellé → montant.
       .trend (+ --up/--down/--flat) : indicateur de variation.
     Jauges & graphes CSS (sans dépendance) :
       .meter (+ __fill ; variantes --warn/--full/--danger) : jauge de
               remplissage. Niveau via --v (0-100 %) sur __fill.
       .bar-list (+ __row/__lbl/__val) : barres horizontales classées
               (top cours). Utilise .meter en interne.
       .bar-chart (+ __col/__bar/__lbl/__val) : mini histogramme
               vertical (série mensuelle). Hauteur via --h (0-100 %)
               sur __bar — seul crochet de donnée admis en inline.
     Sections :
       .adm-section-grid (+ --2 / --3) : disposition des panneaux stats.
   ================================================================= */

/* -----------------------------------------------------------------
   11. COLONNES DES TABLEAUX EN GRILLE (lisibilité back-office)
   Chaque modificateur pose le gabarit de colonnes des .grid-row qu'il
   contient + une largeur mini cohérente (scroll-x via .grid-table-wrap).
   ----------------------------------------------------------------- */
.grid-table--sessions .grid-row {
    grid-template-columns: 56px minmax(150px, 1.7fr) 132px 108px 92px 84px 96px 108px 78px 210px;
    min-width: 1120px;
}
.grid-table--catalogue .grid-row {
    grid-template-columns: 58px 148px minmax(160px, 1.6fr) 128px 92px 92px 200px;
    min-width: 920px;
}
.grid-table--commandes .grid-row {
    grid-template-columns: 128px 118px minmax(180px, 1.4fr) minmax(150px, 1.2fr) 102px 122px 128px;
    min-width: 980px;
}
.grid-table--participants .grid-row {
    grid-template-columns: minmax(130px, 1.3fr) minmax(150px, 1.5fr) minmax(120px, 1fr) 118px 128px 180px;
    min-width: 940px;
}
/* Table clé/valeur (fiche commande) : deux colonnes fluides, pas de scroll. */
.grid-table--kv .grid-row {
    grid-template-columns: 150px 1fr;
    min-width: 0;
}


/* -----------------------------------------------------------------
   12. EN-TÊTES DE COLONNE TRIABLES (indicateur ▲▼)
   À poser sur un <a>/<button> DANS une cellule d'en-tête
   (.grid-row--head > div ou .adm-table thead th). L'état courant est
   porté par aria-sort ; l'indicateur neutre invite au tri.
   ----------------------------------------------------------------- */
.sort-th {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    font: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-transform: inherit;
    letter-spacing: inherit;
}
.sort-th:hover { color: var(--navy); }
.sort-th::after {
    content: "↕";
    font-size: 9px;
    line-height: 1;
    opacity: .4;
    transition: opacity .15s, color .15s;
}
.sort-th:hover::after { opacity: .7; }
.sort-th[aria-sort="ascending"] { color: var(--navy); }
.sort-th[aria-sort="ascending"]::after { content: "▲"; opacity: 1; color: var(--red); }
.sort-th[aria-sort="descending"] { color: var(--navy); }
.sort-th[aria-sort="descending"]::after { content: "▼"; opacity: 1; color: var(--red); }
.sort-th--num { justify-content: flex-end; }
.adm-table thead th.sort-th,
.adm-table thead th:has(.sort-th) { padding-top: 0; padding-bottom: 0; }


/* -----------------------------------------------------------------
   13. BARRE DE FILTRES ADMIN (préfixée pour ne pas heurter le public)
   ----------------------------------------------------------------- */
.adm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.adm-filter-bar__group { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.adm-filter-bar__group > label,
.adm-filter-bar label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint, #9aa3af);
}
.adm-filter-bar select,
.adm-filter-bar input {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--input-bd, #d8dee6);
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    color: var(--ink, #1a2a40);
}
.adm-filter-bar__actions { display: flex; align-items: flex-end; gap: 8px; }
.adm-filter-bar__count { margin-left: auto; align-self: center; font-size: 13px; color: var(--faint, #9aa3af); }


/* -----------------------------------------------------------------
   14. CARTES CHIFFRES ENRICHIES + TUILES + INDICATEUR DE VARIATION
   ----------------------------------------------------------------- */
.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
}
.kpi-card--accent { border-left: 3px solid var(--red); }
.kpi-card__lbl { font-family: var(--font-display); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, #9aa3af); }
.kpi-card__val { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--navy); }
.kpi-card__sub { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Grille de tuiles compactes (répartition des commandes par statut, etc.). */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 12px;
}
.stat-tile__val { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-tile__lbl { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stat-tile--ok     { border-left-color: var(--green, #16a34a); }
.stat-tile--warn   { border-left-color: var(--amber, #b45309); }
.stat-tile--info   { border-left-color: var(--blue, #1d4ed8); }
.stat-tile--danger { border-left-color: var(--red); }
.stat-tile--muted  { border-left-color: #cbd2da; }
.stat-tile--muted .stat-tile__val { color: var(--muted); }

/* Lignes « libellé → montant » (CA payé / à facturer). */
.stat-lines { display: flex; flex-direction: column; gap: 2px; }
.stat-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft, #f0f2f5);
}
.stat-line:last-child { border-bottom: none; }
.stat-line .k { color: var(--muted); font-size: 13px; }
.stat-line .v { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }

/* Indicateur de variation (delta). */
.trend { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-display); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.trend--up   { color: var(--green, #16a34a); }
.trend--down { color: var(--red-strong, #b30000); }
.trend--flat { color: var(--faint, #9aa3af); }
.trend--up::before   { content: "▲"; font-size: 8px; }
.trend--down::before { content: "▼"; font-size: 8px; }
.trend--flat::before { content: "–"; font-weight: 700; }


/* -----------------------------------------------------------------
   15. JAUGES & GRAPHES CSS (sans dépendance, accessibles)
   ----------------------------------------------------------------- */
/* Jauge de remplissage : niveau via --v (0-100 %) posé sur __fill. */
.meter {
    height: 8px;
    border-radius: 999px;
    background: var(--line, #edeff2);
    overflow: hidden;
}
.meter__fill {
    height: 100%;
    width: var(--v, 0%);
    border-radius: inherit;
    background: var(--navy);
    transition: width .3s ease;
}
.meter__fill--warn   { background: var(--amber, #b45309); }
.meter__fill--full,
.meter__fill--danger { background: var(--red); }

/* Barres horizontales classées (top cours). */
.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-list__row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(90px, 1.6fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.bar-list__lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2, #374151); }
.bar-list__val { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; text-align: right; min-width: 30px; }

/* Histogramme vertical (série mensuelle). Hauteur via --h (0-100 %) sur __bar. */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    padding-top: 10px;
}
.bar-chart__col {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.bar-chart__val { font-family: var(--font-display); font-weight: 700; font-size: 10px; color: var(--navy); font-variant-numeric: tabular-nums; }
.bar-chart__bar {
    width: 100%;
    max-width: 34px;
    height: var(--h, 0%);
    min-height: 3px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #34557a 0%, var(--navy) 100%);
    transition: height .3s ease;
}
.bar-chart__col:hover .bar-chart__bar { background: linear-gradient(180deg, var(--red) 0%, var(--red-strong, #b30000) 100%); }
.bar-chart__lbl { font-size: 10px; letter-spacing: .02em; color: var(--faint, #9aa3af); white-space: nowrap; }


/* -----------------------------------------------------------------
   16. GRILLE DE SECTIONS STATS (panneaux côte à côte)
   ----------------------------------------------------------------- */
.adm-section-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
.adm-section-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-section-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .adm-section-grid--2,
    .adm-section-grid--3 { grid-template-columns: 1fr; }
    .bar-list__row { grid-template-columns: minmax(90px, 1fr) minmax(70px, 1.4fr) auto; }
}

/* =================================================================
   REFRESH ADMIN 2026 — polish visuel (couche additive en fin de
   feuille, non destructive : reprend les tokens de style.css).
   Espacement, panneaux, stat cards, tables, formulaires, boutons.
   ================================================================= */

/* Cadre : plus d'air, largeur de lecture bornée */
.admin-body { padding: 28px clamp(18px, 3vw, 40px); }
.admin-body > * { max-width: 1180px; }

/* Sidebar : items un peu plus grands, actif souligné */
.admin-brand { font-size: 13px; letter-spacing: .01em; padding-bottom: 18px; }
.admin-menu a, .admin-menu__item { font-size: 13px; height: 42px; color: #9fb0c4; }
.admin-menu a[aria-current="page"], .admin-menu__item.is-active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }

/* Topbar un chouïa plus haute */
.admin-topbar { height: 64px; }
.admin-topbar__title { font-size: 19px; }

/* Panneaux : coins doux, ombre tendre, en-tête net */
.adm-panel {
    border: 1px solid var(--line, #edeff2);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 20px 40px -28px rgba(16,24,40,.22);
    padding: clamp(20px, 2.4vw, 28px);
    margin-bottom: 22px;
}
.adm-panel > h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    color: var(--navy);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line, #edeff2);
}

/* Stat cards : carte moderne, accent rouge discret en haut (plus la barre latérale) */
.adm-cards { gap: 18px; margin-bottom: 26px; }
.adm-stat {
    border: 1px solid var(--line, #edeff2);
    border-left: 1px solid var(--line, #edeff2);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(26,42,64,.05);
    padding: 22px 22px 20px;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.adm-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -12px rgba(16,24,40,.28); }
.adm-stat::before {
    content: "";
    position: absolute; left: 22px; top: 0;
    width: 26px; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--red);
}
.adm-stat__val { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
.adm-stat__lbl { font-size: .7rem; letter-spacing: .1em; margin-top: 8px; }

/* Tables .adm-table : conteneur arrondi + lignes aérées + hover doux */
.adm-table-wrap { border: 1px solid var(--line, #edeff2); border-radius: 14px; box-shadow: 0 2px 8px rgba(26,42,64,.05); }
.adm-table th, .adm-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft, #f0f2f5); }
.adm-table thead th {
    background: #fbfcfd;
    font-size: .68rem; letter-spacing: .08em; color: var(--faint, #9aa3af);
    border-bottom: 1px solid var(--line, #edeff2);
}
.adm-table tbody tr:hover { background: #fafbfd; }
.adm-table a { text-decoration: none; font-weight: 600; }
.adm-table a:hover { text-decoration: underline; }

/* Grid-table (sessions/catalogue) : mêmes coins/ombre + hover ligne */
.grid-table { border-radius: 14px; box-shadow: 0 2px 8px rgba(26,42,64,.05); }
.grid-row { padding: 15px 18px; }
.grid-table .grid-row:not(.grid-row--head):hover { background: #fafbfd; }

/* Formulaires : titres de section + libellés display + barre d'actions */
.adm-section {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--red);
    margin: 28px 0 16px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line, #edeff2);
}
.adm-section:first-of-type { margin-top: 2px; }
.adm-form label { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--navy); margin-bottom: 5px; display: inline-block; }
.form-actions { margin-top: 24px; padding-top: 18px; gap: 12px; }

/* Journal de mails (page debug) : bloc pré-formaté défilant */
.debug-log {
    margin: 0;
    max-height: 360px;
    overflow: auto;
    background: #0f1729;
    color: #cdd6e4;
    border-radius: 12px;
    padding: 14px 16px;
    font: 12px/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Boutons de ligne : coins doux */
.btn-sm { border-radius: 8px; }

/* -----------------------------------------------------------------
   QA visuelle 2026-07 — correctifs additifs
   ----------------------------------------------------------------- */
/* /espace mobile : les libellés des onglets d'authentification tiennent
   sur une ligne sans être rognés (le nowrap de .auth-tab a été retiré ;
   le normal explicite neutralise le nowrap du style UA des <button>,
   les libellés peuvent se replier sur 2 lignes aux très petites largeurs). */
.auth-tab { white-space: normal; }
@media (max-width: 430px) {
    .auth-tab { font-size: .8rem; padding: 10px 6px; }
}

/* /espace : un seul « Mon compte » (l'eyebrow doublonnait le H1) et
   titre à taille contenue pour tenir sur une ligne dans la carte. */
.auth-box .section-eyebrow { display: none; }
.auth-box h1 { font-size: clamp(26px, 6vw, 32px); }
