@charset "UTF-8";
/* ==========================================================================
   saa-backend.css — socle de l'espace client / coach (/mon-compte/).
   Plugin selfie-app-api. Lot W0.

   Portee : enfile UNIQUEMENT sous is_account_page() (includes/web-assets.php).
   Le <body> des pages Mon compte porte la classe .mp-app ; la zone applicative
   porte .mp-screen (ou les conteneurs WooCommerce natifs).

   REGLES NON NEGOCIABLES
   - Aucune couleur, taille, rayon ou duree ne se declare hors du bloc :root.
   - Aucune ressource distante : polices auto-hebergees, chemins RELATIFS.
     ⛔ Aucun service de polices distant (RGPD projet : local + rien d'autre).
   - Aucun caractere-pictogramme : les sous-ensembles Poppins (~220 glyphes)
     n'en contiennent pas. Les icones sont des SVG en ligne (partials/icon.php).
   - Le focus n'est jamais supprime.

   Sommaire
     1.  Polices auto-hebergees (@font-face)
     2.  Tokens :root
     3.  Reprise de l'existant (h3.product-name)
     4.  Portee applicative et typographie
     5.  Focus
     6.  Liens (piege du contraste sur creme)
     7.  Boutons
     8.  Cartes
     9.  Badges
     10. Champs de formulaire
     11. Tableaux (+ responsive < 768 px)
     12. Pagination
     13. Barre de filtres et puces
     14. Etats vides
     15. Squelettes de chargement
     16. En-tetes de section et cartes de synthese
     17. Navigation laterale (sidebar 264 px / rail 64 px / tiroir mobile)
     18. Semantique de ligne contractuelle
     19. Utilitaires
     20. prefers-reduced-motion
   ========================================================================== */

/* ==========================================================================
   1. Polices auto-hebergees
   Chemins RELATIFS a cette feuille (assets/css/ -> assets/fonts/) : ils
   suivent le domaine servant le plugin, sans jamais coder d'URL en dur.
   ========================================================================== */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. Tokens — transposition EXACTE de theme-beyond3/style.css (:root, l.20-46)
      + tokens propres au back-office.
   ========================================================================== */
:root {
  /* — Marque ------------------------------------------------------------- */
  --mp-accent:        #e84e1b;  /* SEULE couleur d'action. Fonds/bordures.   */
  --mp-accent-hover:  #d14314;  /* Survol, ET tout TEXTE orange (cf. §6).    */
  --mp-gold:          #f39200;  /* Decoratif : eyebrow, grand chiffre.       */
  --mp-teal:          #02c39a;  /* Validation, reussite. Decoratif.          */
  --mp-teal-ink:      #01755e;  /* Le teal quand il doit porter du TEXTE.    */

  /* — Encre et neutres ---------------------------------------------------- */
  --mp-ink:           #23262d;  /* titres, surfaces sombres                  */
  --mp-ink-2:         #2c3038;  /* carte posee sur l'encre                   */
  --mp-body:          #494d56;  /* texte courant                             */
  --mp-muted:         #6e7076;  /* secondaire (subhead, aide) — 4,95:1       */
  --mp-faint:         #9a9da4;  /* DECORATIF UNIQUEMENT — 2,72:1             */
  --mp-paper:         #ffffff;
  --mp-cream:         #faf6f2;  /* fond alterne, en-tete de table, cartes    */
  --mp-line:          #e9e5e0;  /* filet 1 px clair — JAMAIS une bordure de champ */
  --mp-line-dark:     #3a3e47;  /* filet 1 px sur encre                      */
  --mp-on-ink:        #ffffff;
  --mp-on-ink-body:   #b9bcc4;  /* 7,97:1 sur --mp-ink                       */
  --mp-grad-warm:     linear-gradient(96deg, #f39200 0%, #e84e1b 78%);

  /* — Voiles alpha -------------------------------------------------------- */
  --mp-accent-wash:   rgba(232, 78, 27, .09);
  --mp-accent-chip:   rgba(232, 78, 27, .08);
  --mp-focus-halo:    rgba(232, 78, 27, .14);
  --mp-selection:     rgba(232, 78, 27, .16);
  --mp-teal-wash:     rgba(2, 195, 154, .11);
  --mp-gold-wash:     rgba(243, 146, 0, .12);
  --mp-scrim:         rgba(35, 38, 45, .55);

  /* — Typographie --------------------------------------------------------- */
  --mp-font-title:    Poppins, 'Segoe UI', sans-serif;
  --mp-font-body:     Inter, 'Segoe UI', sans-serif;

  /* Echelle back-office : 6 paliers, ratio ~1,2. PAS le clamp du site :
     une console de gestion ne doit pas grossir avec la fenetre.            */
  --mp-fs-xs:         0.75rem;   /* 12px — titre de groupe sidebar          */
  --mp-fs-sm:         0.8125rem; /* 13px — corps de tableau dense, aide     */
  --mp-fs-base:       0.875rem;  /* 14px — defaut back-office               */
  --mp-fs-md:         1rem;      /* 16px — corps des ecrans client final    */
  --mp-fs-lg:         1.25rem;   /* 20px — titre de section                 */
  --mp-fs-xl:         1.75rem;   /* 28px — chiffre de carte de synthese     */

  --mp-lh-tight:      1.2;
  --mp-lh-body:       1.5;
  --mp-lh-table:      1.4;

  --mp-tracking-title: -.01em;
  --mp-tracking-micro: .07em;

  /* — Rayons -------------------------------------------------------------- */
  --mp-r-field:       12px;
  --mp-r-card:        18px;
  --mp-r-bento:       28px;
  --mp-r-pill:        980px;
  --mp-r-sm:          8px;

  /* — Profondeur : le site est PLAT. Bordure 1 px, pas d'ombre. ----------- */
  --mp-shadow-1:      0 1px 2px rgba(35, 38, 45, .06);
  --mp-shadow-2:      0 14px 40px rgba(35, 38, 45, .12);
  --mp-shadow-modal:  0 30px 80px rgba(35, 38, 45, .30);

  /* — Espacement, base 8 -------------------------------------------------- */
  --mp-sp-1:          4px;
  --mp-sp-2:          8px;
  --mp-sp-3:          12px;
  --mp-sp-4:          16px;
  --mp-sp-5:          24px;
  --mp-sp-6:          32px;
  --mp-sp-7:          48px;
  --mp-sp-8:          64px;
  --mp-gutter:        24px;
  --mp-section:       40px;

  /* — Mouvement : UNE seule courbe pour tout ------------------------------ */
  --mp-ease:          cubic-bezier(.25, .7, .2, 1);
  --mp-d-fast:        120ms;
  --mp-d-base:        200ms;
  --mp-d-slow:        300ms;

  /* — Tokens propres au BACK-OFFICE --------------------------------------- */
  --mp-sidebar-w:     264px;  /* deployee — absorbe « Comptes-rendus »       */
  --mp-sidebar-w-rail: 64px;  /* repliee (rail d'icones)                     */
  --mp-nav-item-h:    44px;
  --mp-icon:          20px;
  --mp-control-h:     44px;   /* champs, boutons, selecteurs : IDENTIQUES    */
  --mp-touch-min:     24px;   /* [NORME] WCAG 2.5.8                          */

  --mp-row-dense:     36px;
  --mp-row-comfortable: 48px;
  --mp-row-spacious:  60px;
  --mp-cell-px:       16px;
  --mp-cell-py:       8px;

  --mp-form-max:      640px;
  --mp-focus-ring:    3px;
  --mp-focus-offset:  2px;

  --mp-skeleton-delay: 300ms;
  --mp-skeleton-min:  500ms;

  /* — Semantique de ligne A CONSERVER (contrainte projet n°5) ------------- */
  --mp-row-stock-ok:  #e8f5e9;  /* stock positif                             */
  --mp-row-never-seen: #fdecea; /* jamais connecte (prioritaire)             */
  --mp-row-expired:   #ede7f6;  /* licence expiree                           */
  --mp-row-highlight: #fff9c4;  /* surbrillance saa_hl                       */
  --mp-delegated:     #7a1fa2;  /* connexion deleguee — 8,25:1 sur blanc     */
}

/* ==========================================================================
   3. Reprise de l'existant — ⛔ contrainte projet n°2.
   Provenance : alex-fonctions-perso/includes/lmfwc-myaccount.php:78-81
   (bloc <style> supprime au profit de cette feuille). Valeurs INCHANGEES.
   ========================================================================== */
.woocommerce-MyAccount-content h3.product-name {
  font-size: 1.1rem;
  margin: 1.4em 0 .5em;
}
.woocommerce-MyAccount-content h3.product-name a {
  text-decoration: none;
}

/* ==========================================================================
   4. Portee applicative et typographie
   Le reset ne s'applique QU'A la zone applicative : l'en-tete et le pied de
   page du theme restent intacts (zero regression hors perimetre).
   ========================================================================== */
.mp-app ::selection {
  background: var(--mp-selection);
}

.mp-app .woocommerce-MyAccount-content,
.mp-app .woocommerce-MyAccount-navigation,
.mp-app .mp-screen {
  font-family: var(--mp-font-body);
  font-size: var(--mp-fs-base);
  line-height: var(--mp-lh-body);
  color: var(--mp-body);
}

.mp-app :is(.woocommerce-MyAccount-content, .mp-screen) :is(h1, h2, h3, h4) {
  font-family: var(--mp-font-title);
  color: var(--mp-ink);
  font-weight: 600;
  letter-spacing: var(--mp-tracking-title);
  line-height: var(--mp-lh-tight);
  margin: 0 0 var(--mp-sp-3);
}
.mp-app :is(.woocommerce-MyAccount-content, .mp-screen) h1 { font-size: var(--mp-fs-xl); }
.mp-app :is(.woocommerce-MyAccount-content, .mp-screen) h2 { font-size: var(--mp-fs-lg); }
.mp-app :is(.woocommerce-MyAccount-content, .mp-screen) h3 { font-size: var(--mp-fs-md); }

/* Gris secondaire systematique sous chaque titre. */
.mp-subhead {
  color: var(--mp-muted);
  font-weight: 400;
  margin: -4px 0 var(--mp-sp-4);
  max-width: 70ch;
}
.mp-eyebrow {
  display: block;
  font-family: var(--mp-font-title);
  font-size: var(--mp-fs-xs);
  font-weight: 600;
  color: var(--mp-gold);
  text-transform: uppercase;
  letter-spacing: var(--mp-tracking-micro);
  margin-bottom: var(--mp-sp-1);
}
/* OBLIGATOIRE sur tout nombre en tableau ou en carte de synthese. */
.mp-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ==========================================================================
   5. Focus — la valeur exacte du site. ⛔ Ne JAMAIS supprimer outline.
   ========================================================================== */
.mp-app :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--mp-focus-ring) solid var(--mp-accent);
  outline-offset: var(--mp-focus-offset);
  border-radius: 4px;
}
/* Anti-masquage par un en-tete collant [NORME] WCAG 2.4.11. */
.mp-app :is(a, button, input, select, textarea, summary, [tabindex]) {
  scroll-margin-top: calc(var(--mp-sp-8) + var(--mp-sp-4));
}
.mp-app .screen-reader-text,
.mp-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   6. Liens — ⛔ piege du contraste sur creme.
   #d14314 sur #faf6f2 ne fait que 4,32:1 : il ECHOUE en texte normal.
   Consequence : dans un tableau (en-tete creme, ligne alternee, ligne
   survolee, lignes teintees contractuelles), le lien est en --mp-ink souligne.
   L'orange n'est employe que sur fond --mp-paper (4,64:1).
   ⛔ Ne pas assombrir l'orange : il divergerait de la charte.
   ========================================================================== */
.mp-link {
  color: var(--mp-accent-hover);   /* valide sur --mp-paper uniquement */
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mp-link:hover { text-decoration-thickness: 2px; }

.mp-table a,
.mp-app .mp-tr a,
.mp-empty a:not(.mp-btn),
.mp-badge a {
  color: var(--mp-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mp-table a:hover,
.mp-app .mp-tr a:hover {
  color: var(--mp-ink);
  text-decoration-thickness: 2px;
}

/* ==========================================================================
   7. Boutons — hierarchie a 4 niveaux, tous a 44 px.
   ⛔ Un seul bouton rempli par ecran. Le bouton d'une ligne n'est JAMAIS
   rempli (utiliser .mp-btn--ghost ou .mp-btn--text).
   La classe WooCommerce `button` est CONSERVEE (ses scripts la ciblent).
   ========================================================================== */
.mp-app .mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mp-sp-2);
  min-height: var(--mp-control-h);
  padding: 0 var(--mp-sp-5);
  border-radius: var(--mp-r-pill);
  border: 1px solid transparent;
  font: 600 var(--mp-fs-md)/1.1 var(--mp-font-body);
  background: var(--mp-accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  text-shadow: none;
  transition: background var(--mp-d-fast) var(--mp-ease),
              transform var(--mp-d-fast) var(--mp-ease),
              border-color var(--mp-d-fast) var(--mp-ease);
}
.mp-app .mp-btn:hover { background: var(--mp-accent-hover); color: #fff; transform: translateY(-2px); }
.mp-app .mp-btn:active { transform: none; }
.mp-app .mp-btn[disabled],
.mp-app .mp-btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
/* Etat 6 : chargement. ⛔ anti double achat / double attribution. */
.mp-app .mp-btn[aria-busy="true"] {
  pointer-events: none;
  cursor: progress;
}
.mp-app .mp-btn[aria-busy="true"] .mp-btn__spinner { display: inline-flex; }
.mp-btn__spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: mp-spin 700ms linear infinite;
  flex: none;
}
@keyframes mp-spin { to { transform: rotate(360deg); } }

.mp-app .mp-btn--tonal {
  background: var(--mp-accent-chip);
  color: var(--mp-accent-hover);
}
.mp-app .mp-btn--tonal:hover { background: var(--mp-accent-wash); color: var(--mp-accent-hover); }
.mp-app .mp-btn--ghost {
  background: transparent;
  color: var(--mp-ink);
  border-color: var(--mp-muted);   /* 4,95:1 → [NORME] 1.4.11 satisfait */
}
.mp-app .mp-btn--ghost:hover { background: var(--mp-cream); color: var(--mp-ink); }
.mp-app .mp-btn--text {
  background: transparent;
  color: var(--mp-accent-hover);
  padding: 0 var(--mp-sp-2);
  min-height: var(--mp-control-h);
}
.mp-app .mp-btn--text:hover { background: var(--mp-accent-chip); color: var(--mp-accent-hover); }
/* Bouton destructeur : contour, jamais un aplat rouge. */
.mp-app .mp-btn--danger {
  background: transparent;
  color: var(--mp-accent-hover);
  border-color: var(--mp-accent-hover);
}
.mp-app .mp-btn--danger:hover { background: var(--mp-accent-chip); color: var(--mp-accent-hover); }
/* Connexion deleguee — contrainte n°5 : #7a1fa2 conserve, en contour. */
.mp-app .mp-btn--delegated {
  background: transparent;
  color: var(--mp-delegated);
  border-color: var(--mp-delegated);
}
.mp-app .mp-btn--delegated:hover { background: rgba(122, 31, 162, .08); color: var(--mp-delegated); }

.mp-app .mp-btn--sm {
  /* 40 px, pas 32. WCAG 2.2 AA n'exige que 24x24 px (2.5.8), mais la cible
     CONFORTABLE reste 44 px : un bouton d'action de ligne a 32 px se rate au
     pouce. On garde une marge verticale qui porte la zone cliquable a 44 px
     sans gonfler la hauteur de ligne du tableau. */
  min-height: 40px;
  font-size: var(--mp-fs-sm);
  padding: 0 var(--mp-sp-4);
}
.mp-app .mp-btn--block { display: flex; width: 100%; }
.mp-btn__icon { display: inline-flex; flex: none; }
.mp-btn__icon svg { width: var(--mp-icon); height: var(--mp-icon); }

.mp-actions {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-2);
  flex-wrap: wrap;
}
.mp-actions--end { justify-content: flex-end; }

/* ==========================================================================
   8. Cartes — la profondeur vient de la bordure, pas de l'ombre.
   ========================================================================== */
.mp-card {
  background: var(--mp-paper);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-r-card);
  padding: var(--mp-sp-5);
}
.mp-card--bento { border-radius: var(--mp-r-bento); padding: var(--mp-sp-6); }
.mp-card--reco  { border: 2px solid var(--mp-accent); }
.mp-card--cream { background: var(--mp-cream); }
.mp-card--center { max-width: var(--mp-form-max); margin-inline: auto; text-align: left; }
.mp-card + .mp-card { margin-top: var(--mp-sp-4); }

/* ==========================================================================
   9. Badges — ⛔ couleur + LIBELLE, jamais la couleur seule (WCAG 1.4.1).
   ========================================================================== */
.mp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--mp-r-pill);
  font-size: var(--mp-fs-xs);
  font-weight: 600;
  line-height: 1.6;
  background: var(--mp-cream);
  color: var(--mp-ink);
  border: 1px solid var(--mp-line);
  white-space: nowrap;
}
.mp-badge--ok      { background: var(--mp-teal-wash);  color: var(--mp-teal-ink);     border-color: transparent; }
.mp-badge--warn    { background: var(--mp-gold-wash);  color: #6b4100;                border-color: transparent; }
.mp-badge--danger  { background: var(--mp-accent-chip); color: var(--mp-accent-hover); border-color: transparent; }
.mp-badge--info    { background: rgba(122, 31, 162, .08); color: var(--mp-delegated); border-color: transparent; }
.mp-badge--neutral { background: var(--mp-cream);      color: var(--mp-ink);          border-color: var(--mp-line); }
.mp-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.mp-badge + .mp-badge { margin-left: var(--mp-sp-1); }

/* ==========================================================================
   10. Champs — bordure >= 3:1 [NORME] 1.4.11.
   ⛔ --mp-line (1,25:1) est INTERDIT en bordure de champ : c'est --mp-muted.
   ========================================================================== */
.mp-field {
  display: block;
  margin-bottom: var(--mp-sp-4);
  max-width: var(--mp-form-max);
}
.mp-field > label,
.mp-field .mp-field__label {
  display: block;
  font-weight: 600;
  color: var(--mp-ink);
  margin-bottom: 6px;
}
.mp-app .mp-field :is(input, select, textarea) {
  width: 100%;
  min-height: var(--mp-control-h);
  padding: 0 var(--mp-sp-3);
  border: 1px solid var(--mp-muted);
  border-radius: var(--mp-r-field);
  background: var(--mp-paper);
  font: 400 var(--mp-fs-md)/1.4 var(--mp-font-body);
  color: var(--mp-ink);
  box-shadow: none;
}
.mp-app .mp-field textarea { padding: var(--mp-sp-3); min-height: 96px; line-height: var(--mp-lh-body); }
.mp-app .mp-field :is(input, select, textarea):focus {
  border-color: var(--mp-accent);
  box-shadow: 0 0 0 4px var(--mp-focus-halo);
}
.mp-app .mp-field :is(input, select, textarea)[disabled] {
  background: var(--mp-cream);
  color: var(--mp-muted);
  cursor: not-allowed;
}
.mp-field__help {
  display: block;
  color: var(--mp-muted);
  font-size: var(--mp-fs-sm);
  margin-top: 4px;
}
/* ⚠ L'erreur porte AUSSI une icone et un texte : la bordure seule est un
   echec WCAG 1.4.1. */
.mp-field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mp-accent-hover);
  font-size: var(--mp-fs-sm);
  font-weight: 600;
  margin-top: 4px;
}
.mp-field__error svg { width: 16px; height: 16px; flex: none; }
.mp-app .mp-field [aria-invalid="true"] {
  border-color: var(--mp-accent-hover);
  border-width: 2px;
}
.mp-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--mp-sp-5);
  max-width: var(--mp-form-max);
}
.mp-fieldset > legend {
  font-family: var(--mp-font-title);
  font-size: var(--mp-fs-md);
  font-weight: 600;
  color: var(--mp-ink);
  padding: 0;
  margin-bottom: var(--mp-sp-3);
}

/* ==========================================================================
   11. Tableaux — LE defaut n°1 du projet.
   WooCommerce (woocommerce-smallscreen.css) masque le <thead> sous 768 px et
   reaffiche le libelle par td::before { content: attr(data-title) " : " }.
   ⛔ Sans data-title le " : " s'affiche quand meme, VIDE.
   Le partiel templates/saa/partials/table.php derive data-title de la
   definition des colonnes : il est structurellement impossible de l'oublier.
   ========================================================================== */
.mp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--mp-fs-sm);
  line-height: var(--mp-lh-table);
}
.mp-table__wrap { width: 100%; overflow-x: auto; }
.mp-table__caption {
  text-align: left;
  font-family: var(--mp-font-title);
  font-weight: 600;
  color: var(--mp-ink);
  padding-bottom: var(--mp-sp-2);
}
.mp-app .mp-th,
.mp-app .mp-td {
  padding: var(--mp-cell-py) var(--mp-cell-px);
  border-bottom: 1px solid var(--mp-line);
  vertical-align: middle;
}
.mp-app .mp-th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--mp-cream);
  color: var(--mp-ink);
  font-weight: 600;
  white-space: nowrap;
}
/* En-tete de LIGNE : colonne d'identite. */
.mp-app th.mp-td {
  background: transparent;
  font-weight: 600;
  color: var(--mp-ink);
  position: static;
}
/* L'en-tete s'aligne COMME SA COLONNE. */
.mp-app .mp-th--right, .mp-app .mp-td--right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mp-app .mp-th--left,   .mp-app .mp-td--left   { text-align: left; }
.mp-app .mp-th--center, .mp-app .mp-td--center { text-align: center; }

.mp-table--dense       .mp-td { height: var(--mp-row-dense); }
.mp-table--comfortable .mp-td { height: var(--mp-row-comfortable); }
.mp-table--spacious    .mp-td { height: var(--mp-row-spacious); }

.mp-app .mp-tr:hover > :is(td, th) { background: var(--mp-cream); }

/* Tri : un <button> dans le <th>, jamais un onclick sur la cellule. */
.mp-th__sort {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  gap: var(--mp-sp-1);
  align-items: center;
  min-height: var(--mp-touch-min);
  font: inherit;
  color: inherit;
}
.mp-th__sort:focus-visible {
  outline: var(--mp-focus-ring) solid var(--mp-accent);
  outline-offset: var(--mp-focus-offset);
}
.mp-th__arrow { display: inline-flex; flex: none; color: var(--mp-muted); }
.mp-th__arrow svg { width: 14px; height: 14px; }
.mp-app [aria-sort="ascending"] .mp-th__arrow,
.mp-app [aria-sort="descending"] .mp-th__arrow { color: var(--mp-accent-hover); }

/* Colonne d'identite epinglee en defilement horizontal. */
.mp-table--pinned :is(th, td):first-child {
  position: sticky;
  left: 0;
  background: var(--mp-paper);
}
.mp-table--pinned thead :is(th, td):first-child { background: var(--mp-cream); z-index: 2; }

/* Sous 768 px : woocommerce-smallscreen.css masque le <thead> et reaffiche le
   libelle par td::before.
   ⛔ PIEGE : cette feuille masque AUSSI « table.shop_table_responsive tbody th »
   (display:none) et son ::before ne cible que les <td>. Notre colonne
   d'identite est un <th scope="row"> : sans les deux regles ci-dessous, elle
   DISPARAIT sur telephone. On reprend donc le libelle pour td ET th, avec un
   rendu identique. */
@media (max-width: 767px) {
  .mp-app .mp-table :is(td, th).mp-td {
    display: block;
    width: auto;
    height: auto;
    text-align: right;
  }
  .mp-app .mp-table :is(td, th).mp-td::before {
    content: attr(data-title) " : ";
    float: left;
    font-weight: 600;
    color: var(--mp-muted);
    text-align: left;
    padding-right: var(--mp-sp-3);
  }
  .mp-app .mp-table .mp-tr { display: block; border-bottom: 2px solid var(--mp-line); }
  .mp-app .mp-table--pinned :is(th, td):first-child { position: static; }
  .mp-app .mp-th { position: static; }
  .mp-app .mp-table thead { display: none; }
}

/* Variante « cartes empilees » — pour les tables de 7 colonnes et plus.
   ⛔ Une seule strategie par table : data-title OU cartes, jamais les deux. */
.mp-cards { display: grid; gap: var(--mp-sp-3); }
.mp-cards__item {
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-r-card);
  padding: var(--mp-sp-4);
  background: var(--mp-paper);
}
.mp-cards__dl { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: var(--mp-sp-2); margin: 0; }
.mp-cards__dl dt { color: var(--mp-muted); font-weight: 600; }
.mp-cards__dl dd { margin: 0; color: var(--mp-ink); }

/* ==========================================================================
   12. Pagination — les boutons desactives restent VISIBLES a 45 %.
   ========================================================================== */
.mp-pagination {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-4);
  flex-wrap: wrap;
  margin: var(--mp-sp-5) 0 var(--mp-sp-6);
}
.mp-pagination__count { margin: 0; color: var(--mp-muted); font-variant-numeric: tabular-nums; }
.mp-pagination ul.page-numbers { display: flex; flex-wrap: wrap; gap: var(--mp-sp-1); list-style: none; margin: 0; padding: 0; }
.mp-pagination ul.page-numbers li { margin: 0; }
.mp-app .mp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mp-sp-1);
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--mp-sp-2);
  border-radius: var(--mp-r-field);
  color: var(--mp-body);
  text-decoration: none;
  border: 1px solid transparent;
}
.mp-app .mp-pagination .page-numbers:hover { background: var(--mp-cream); color: var(--mp-ink); }
.mp-app .mp-pagination .page-numbers.current {
  background: var(--mp-accent);
  color: #fff;
  font-weight: 600;
}
.mp-app .mp-pagination [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.mp-pagination .page-numbers svg { width: 16px; height: 16px; }
/* Formulaire autonome du selecteur « lignes par page » : il ne doit pas
   introduire de boite dans la rangee flex de la pagination. */
.mp-pagination__form { display: contents; margin: 0; }
.mp-pagination__perpage { display: inline-flex; align-items: center; gap: var(--mp-sp-2); margin: 0; }
.mp-pagination__perpage label { color: var(--mp-muted); white-space: nowrap; }
.mp-app .mp-pagination__perpage select {
  min-height: 36px;
  border: 1px solid var(--mp-muted);
  border-radius: var(--mp-r-field);
  padding: 0 var(--mp-sp-2);
  background: var(--mp-paper);
  color: var(--mp-ink);
  font: 400 var(--mp-fs-sm)/1.4 var(--mp-font-body);
}

/* ==========================================================================
   13. Barre de filtres et puces retirables
   ========================================================================== */
.mp-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--mp-sp-3);
  padding: var(--mp-sp-4);
  background: var(--mp-cream);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-r-card);
  margin-bottom: var(--mp-sp-4);
}
.mp-filterbar__search { flex: 1 1 260px; margin-bottom: 0; max-width: 420px; }
.mp-filterbar__facets { display: flex; flex-wrap: wrap; gap: var(--mp-sp-3); }
.mp-filterbar__facet { margin-bottom: 0; min-width: 160px; }
.mp-search { position: relative; }
.mp-app .mp-search input { padding-right: 44px; }
.mp-search__clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mp-muted);
  cursor: pointer;
}
.mp-search__clear:hover { background: var(--mp-line); color: var(--mp-ink); }
.mp-search__clear svg { width: 16px; height: 16px; }

.mp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mp-sp-2); margin: 0 0 var(--mp-sp-3); }
.mp-app .mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--mp-sp-3);
  border-radius: var(--mp-r-pill);
  background: var(--mp-accent-chip);
  color: var(--mp-accent-hover);
  border: 1px solid transparent;
  font-size: var(--mp-fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.mp-app .mp-chip:hover { background: var(--mp-accent-wash); color: var(--mp-accent-hover); }
.mp-chip svg { width: 14px; height: 14px; flex: none; }
.mp-results { margin: 0 0 var(--mp-sp-3); color: var(--mp-muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   14. Etats vides — trois variantes, jamais un « Aucune donnee » gris centre.
   ========================================================================== */
.mp-empty {
  border: 1px dashed var(--mp-line);
  border-radius: var(--mp-r-card);
  background: var(--mp-paper);
  padding: var(--mp-sp-6) var(--mp-sp-5);
  text-align: center;
}
.mp-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--mp-r-field);
  background: var(--mp-accent-wash);
  color: var(--mp-accent-hover);
  margin-bottom: var(--mp-sp-3);
}
.mp-empty__icon svg { width: 24px; height: 24px; }
.mp-app .mp-empty__title { font-size: var(--mp-fs-lg); margin-bottom: var(--mp-sp-2); }
.mp-empty__text { color: var(--mp-muted); margin: 0 auto var(--mp-sp-4); max-width: 52ch; }
.mp-empty--error { border-style: solid; border-color: var(--mp-accent-chip); }
.mp-empty--error .mp-empty__icon { background: var(--mp-accent-chip); }
.mp-empty--filtered .mp-empty__icon { background: var(--mp-cream); color: var(--mp-muted); }

/* ==========================================================================
   15. Squelettes — geometrie REELLE. Rien avant 300 ms, maintien 500 ms.
   ========================================================================== */
.mp-skeleton { animation: mp-skeleton-in 1ms var(--mp-ease) var(--mp-skeleton-delay) both; }
@keyframes mp-skeleton-in { from { opacity: 0; } to { opacity: 1; } }
.mp-skeleton__row {
  display: flex;
  gap: var(--mp-sp-4);
  align-items: center;
  padding: var(--mp-cell-py) var(--mp-cell-px);
  border-bottom: 1px solid var(--mp-line);
}
.mp-skeleton__cell {
  height: 12px;
  border-radius: var(--mp-r-sm);
  background: linear-gradient(90deg, var(--mp-line) 25%, var(--mp-cream) 37%, var(--mp-line) 63%);
  background-size: 400% 100%;
  animation: mp-shimmer 1400ms var(--mp-ease) infinite;
}
@keyframes mp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* Largeurs de squelette : un pas de 5 %, pour ne jamais recourir a un
   attribut style= en ligne. */
.mp-skeleton__cell--w5 { width: 5%; }
.mp-skeleton__cell--w10 { width: 10%; }
.mp-skeleton__cell--w15 { width: 15%; }
.mp-skeleton__cell--w20 { width: 20%; }
.mp-skeleton__cell--w25 { width: 25%; }
.mp-skeleton__cell--w30 { width: 30%; }
.mp-skeleton__cell--w35 { width: 35%; }
.mp-skeleton__cell--w40 { width: 40%; }
.mp-skeleton__cell--w45 { width: 45%; }
.mp-skeleton__cell--w50 { width: 50%; }
.mp-skeleton__cell--w55 { width: 55%; }
.mp-skeleton__cell--w60 { width: 60%; }
.mp-skeleton__cell--w65 { width: 65%; }
.mp-skeleton__cell--w70 { width: 70%; }
.mp-skeleton__cell--w75 { width: 75%; }
.mp-skeleton__cell--w80 { width: 80%; }
.mp-skeleton__cell--w85 { width: 85%; }
.mp-skeleton__cell--w90 { width: 90%; }
.mp-skeleton__cell--w95 { width: 95%; }
.mp-skeleton__cell--w100 { width: 100%; }
.mp-table--dense       .mp-skeleton__row { min-height: var(--mp-row-dense); }
.mp-table--comfortable .mp-skeleton__row { min-height: var(--mp-row-comfortable); }
.mp-table--spacious    .mp-skeleton__row { min-height: var(--mp-row-spacious); }

/* ==========================================================================
   16. En-tetes de section et cartes de synthese
   ========================================================================== */
.mp-screen { max-width: 1160px; }
.mp-section { margin-bottom: var(--mp-section); }
.mp-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--mp-sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--mp-sp-4);
}
.mp-section__head > div { min-width: 0; }
.mp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--mp-sp-3);
  margin-bottom: var(--mp-sp-5);
}
.mp-stat {
  display: block;
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-r-card);
  padding: var(--mp-sp-4);
  background: var(--mp-paper);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--mp-d-fast) var(--mp-ease);
}
a.mp-stat:hover { border-color: var(--mp-accent); }
.mp-stat__label { display: block; color: var(--mp-muted); font-size: var(--mp-fs-sm); }
.mp-stat__value {
  display: block;
  font-family: var(--mp-font-title);
  font-size: var(--mp-fs-xl);
  font-weight: 700;
  color: var(--mp-ink);
  font-variant-numeric: tabular-nums;
  line-height: var(--mp-lh-tight);
  margin-top: var(--mp-sp-1);
}
.mp-notice {
  border: 1px solid var(--mp-line);
  border-left: 3px solid var(--mp-accent);
  border-radius: var(--mp-r-sm);
  background: var(--mp-cream);
  padding: var(--mp-sp-4);
  margin-bottom: var(--mp-sp-4);
}

/* ==========================================================================
   17. Navigation laterale
   264 px deployee, rail 64 px replie, entrees 44 px, sticky, scroll interne.
   Sous 768 px : tiroir plein ecran pilote par saa-backend.js.
   ========================================================================== */
@media (min-width: 768px) {
  .mp-app.woocommerce-account .woocommerce-MyAccount-navigation {
    width: var(--mp-sidebar-w);
    float: none;
    position: sticky;
    top: var(--mp-sp-4);
    max-height: calc(100vh - var(--mp-sp-8));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: var(--mp-sp-2);
  }
  .mp-app.woocommerce-account .woocommerce-MyAccount-content {
    width: auto;
    float: none;
    min-width: 0;
  }
  .mp-app.woocommerce-account .woocommerce {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-gutter);
  }
  .mp-app.woocommerce-account .woocommerce-MyAccount-content { flex: 1 1 auto; }
}

.mp-app .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mp-app .woocommerce-MyAccount-navigation li { margin: 0; }
.mp-app .woocommerce-MyAccount-navigation li > a {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-3);
  min-height: var(--mp-nav-item-h);
  padding: 0 var(--mp-sp-3);
  border-radius: var(--mp-r-sm);
  border-left: 3px solid transparent;
  color: var(--mp-body);
  text-decoration: none;
  font-size: var(--mp-fs-base);
  transition: background var(--mp-d-fast) var(--mp-ease);
}
.mp-app .woocommerce-MyAccount-navigation li > a:hover {
  background: var(--mp-accent-chip);
  color: var(--mp-ink);
}
/* Actif : barre gauche 3 px + graisse. ⛔ jamais la couleur seule. */
.mp-app .woocommerce-MyAccount-navigation li.is-active > a,
.mp-app .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--active > a,
.mp-app .woocommerce-MyAccount-navigation a[aria-current="page"] {
  border-left-color: var(--mp-accent);
  background: var(--mp-accent-chip);
  color: var(--mp-ink);
  font-weight: 600;
}
.mp-app .woocommerce-MyAccount-navigation li > a[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.mp-nav__icon { display: inline-flex; flex: none; width: var(--mp-icon); height: var(--mp-icon); color: var(--mp-muted); }
.mp-nav__icon svg { width: 100%; height: 100%; }
.mp-app .woocommerce-MyAccount-navigation a[aria-current="page"] .mp-nav__icon { color: var(--mp-accent-hover); }
.mp-nav__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-nav__count {
  margin-left: auto;
  font-size: var(--mp-fs-xs);
  font-weight: 600;
  color: var(--mp-muted);
  font-variant-numeric: tabular-nums;
}
.mp-nav__group {
  font-size: var(--mp-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--mp-tracking-micro);
  color: var(--mp-faint);      /* decoratif : le libelle est repete par l'entree */
  padding: var(--mp-sp-4) var(--mp-sp-3) var(--mp-sp-1);
}
.mp-nav__sep { border: 0; border-top: 1px solid var(--mp-line); margin: var(--mp-sp-3) 0; }

/* Bouton d'ouverture du tiroir — cree par saa-backend.js, masque au-dela. */
.mp-nav-toggle {
  display: none;
  align-items: center;
  gap: var(--mp-sp-2);
  min-height: var(--mp-control-h);
  padding: 0 var(--mp-sp-4);
  margin-bottom: var(--mp-sp-3);
  border: 1px solid var(--mp-muted);
  border-radius: var(--mp-r-pill);
  background: var(--mp-paper);
  color: var(--mp-ink);
  font: 600 var(--mp-fs-base)/1.1 var(--mp-font-body);
  cursor: pointer;
}
.mp-nav-toggle svg { width: var(--mp-icon); height: var(--mp-icon); }

@media (max-width: 767px) {
  .mp-app .mp-nav-toggle { display: inline-flex; }
  /* Sans JS le menu reste affiche : l'amelioration est progressive. */
  .mp-app.mp-has-js .woocommerce-MyAccount-navigation {
    position: fixed;
    inset: 0;
    z-index: 999;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--mp-sp-6) var(--mp-gutter);
    background: var(--mp-paper);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--mp-d-base) var(--mp-ease);
    visibility: hidden;
  }
  .mp-app.mp-has-js .woocommerce-MyAccount-navigation[data-mp-open="true"] {
    transform: none;
    visibility: visible;
  }
  .mp-app .woocommerce-MyAccount-navigation li > a { min-height: 48px; font-size: var(--mp-fs-md); }
}

/* ==========================================================================
   18. Semantique de ligne — ⛔ contrainte projet n°5.
   Les couleurs sont CONSERVEES telles quelles et TOUJOURS doublees d'un
   .mp-badge portant un libelle texte (WCAG 1.4.1).
   Priorite : never-seen > expired > stock-ok. La surbrillance est un repli.
   ========================================================================== */
.mp-app .mp-tr--stock-ok   > :is(td, th) { background: var(--mp-row-stock-ok); }
.mp-app .mp-tr--expired    > :is(td, th) { background: var(--mp-row-expired); }
.mp-app .mp-tr--never-seen > :is(td, th) { background: var(--mp-row-never-seen); }
.mp-app .mp-tr--highlight  > :is(td, th) { background: var(--mp-row-highlight); }
/* Le survol ne doit pas effacer l'information : on garde la teinte. */
.mp-app .mp-tr--stock-ok:hover   > :is(td, th) { background: var(--mp-row-stock-ok); }
.mp-app .mp-tr--expired:hover    > :is(td, th) { background: var(--mp-row-expired); }
.mp-app .mp-tr--never-seen:hover > :is(td, th) { background: var(--mp-row-never-seen); }
.mp-app .mp-tr--highlight:hover  > :is(td, th) { background: var(--mp-row-highlight); }

/* Banniere de connexion deleguee — #7a1fa2 conserve. */
.mp-delegated-banner {
  background: var(--mp-delegated);
  color: #fff;
}
.mp-delegated-banner a { color: #fff; }

/* ==========================================================================
   19. Utilitaires
   ========================================================================== */
.mp-stack   { display: grid; gap: var(--mp-sp-4); }
.mp-stack--sm { gap: var(--mp-sp-2); }
.mp-row     { display: flex; align-items: center; gap: var(--mp-sp-3); flex-wrap: wrap; }
.mp-grow    { flex: 1 1 auto; min-width: 0; }
.mp-muted   { color: var(--mp-muted); }
.mp-mt-0    { margin-top: 0; }
.mp-mb-0    { margin-bottom: 0; }
.mp-mb-4    { margin-bottom: var(--mp-sp-4); }
.mp-mb-5    { margin-bottom: var(--mp-sp-5); }
.mp-nowrap  { white-space: nowrap; }
.mp-form    { max-width: var(--mp-form-max); }
.mp-scroll-x { overflow-x: auto; }
/* Icones SVG en ligne (partials/icon.php) — jamais un caractere-pictogramme. */
.mp-icon { display: inline-flex; align-items: center; flex: none; }
.mp-icon svg { display: block; }
/* Formulaire de tri loge dans un <th> : il ne doit rien occuper visuellement. */
.mp-th__form { display: contents; margin: 0; }
/* Resume d'erreurs de formulaire, focusable. */
.mp-errors {
  border: 2px solid var(--mp-accent-hover);
  border-radius: var(--mp-r-card);
  padding: var(--mp-sp-4);
  margin-bottom: var(--mp-sp-4);
}
.mp-errors ul { margin: var(--mp-sp-2) 0 0; padding-left: var(--mp-sp-5); }

/* Onglets d'ecran (licences & stock, etc.) */
.mp-tabs { display: flex; gap: var(--mp-sp-1); flex-wrap: wrap; border-bottom: 1px solid var(--mp-line); margin-bottom: var(--mp-sp-5); }
.mp-app .mp-tabs a, .mp-app .mp-tabs button {
  display: inline-flex;
  align-items: center;
  gap: var(--mp-sp-2);
  min-height: var(--mp-control-h);
  padding: 0 var(--mp-sp-4);
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--mp-muted);
  font: 600 var(--mp-fs-base)/1.1 var(--mp-font-body);
  text-decoration: none;
  cursor: pointer;
}
.mp-app .mp-tabs [aria-selected="true"] { color: var(--mp-ink); border-bottom-color: var(--mp-accent); }

/* ==========================================================================
   20. Mouvement reduit [NORME] WCAG 2.3.3
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .mp-app *,
  .mp-app *::before,
  .mp-app *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================================================================
   20. NAVIGATION REPLIABLE (rail 64 px) — lot W2
   ---------------------------------------------------------------------------
   Le repli est un CONFORT : sans ces regles la navigation reste complete et
   correcte, seul le mode rail est inoperant. Il n'existe qu'a partir de
   768 px — sous ce seuil, le tiroir mobile a deja son propre mecanisme.
   =========================================================================== */

.mp-nav__collapse-form { margin: 0 0 var(--mp-sp-2); }

.mp-nav__collapse {
  display: flex; align-items: center; gap: var(--mp-sp-3);
  width: 100%; min-height: var(--mp-nav-item-h);
  padding: 0 var(--mp-sp-3);
  border: 0; border-radius: var(--mp-r-sm);
  background: transparent; color: var(--mp-muted);
  font: 600 var(--mp-fs-sm)/1.1 var(--mp-font-body);
  cursor: pointer;
}
.mp-nav__collapse:hover { background: var(--mp-accent-chip); color: var(--mp-ink); }

/* Pastille d'alerte du mode rail : masquee tant que la nav est deployee. */
.mp-nav__dot { display: none; width: 8px; height: 8px; border-radius: 50%;
               background: var(--mp-accent); }

@media (max-width: 767px) {
  /* Le tiroir mobile porte deja son bouton : pas de second declencheur. */
  .mp-app .mp-nav__collapse-form { display: none; }
}

@media (min-width: 768px) {
  .mp-app.woocommerce-account .woocommerce-MyAccount-navigation.mp-nav--collapsed {
    width: var(--mp-sidebar-w-rail);
  }
  /* Les libelles sont RETIRES DE L'AFFICHAGE mais restent lisibles par les
     lecteurs d'ecran : replier une navigation ne doit pas la rendre muette. */
  .mp-nav--collapsed .mp-nav__label,
  .mp-nav--collapsed .mp-nav__count,
  .mp-nav--collapsed .mp-nav__group {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%);
  }
  .mp-nav--collapsed li > a { position: relative; justify-content: center; padding: 0; }
  .mp-nav--collapsed .mp-nav__dot { display: block; position: absolute; top: 6px; right: 10px; }

  /* Infobulle : au survol ET au focus clavier — sinon le mode rail devient
     indechiffrable pour qui navigue au clavier. */
  .mp-nav--collapsed [data-mp-tip]:hover::after,
  .mp-nav--collapsed [data-mp-tip]:focus-visible::after {
    content: attr(data-mp-tip);
    position: absolute; left: calc(100% + 8px); z-index: 20;
    padding: 4px 8px; border-radius: var(--mp-r-sm);
    background: var(--mp-ink); color: #fff;
    font-size: var(--mp-fs-xs); white-space: nowrap;
  }
}

/* Ligne masquee par le filtre en direct (module `clients-filter`). Une classe
   plutot qu'un style en ligne : le CSS reste la seule autorite de rendu. */
.mp-app .mp-row--hidden { display: none; }

/* Actions alignees a droite dans la colonne d'actions des comptes-rendus. */
.mp-app .mp-dl .mp-td--right .mp-actions { justify-content: flex-end; }


/* ===========================================================================
   21. CORRECTIFS DE RENDU — constates a l'ecran apres le premier deploiement
   =========================================================================== */

/* ⛔ REGRESSION corrigee. Twenty Twenty-Four contraint le contenu de page a sa
   `content-size` (~620 px). L'espace compte y etait enferme : la table des
   coaches (7 colonnes, ~960 px) debordait de son conteneur de 680 px et le
   bouton d'action passait HORS CHAMP, alors que la page laissait 400 px de
   marge vide a droite. On rend a l'espace compte la largeur « wide » du theme.
   Porte uniquement a l'espace compte : le reste du site garde sa mise en page. */
.woocommerce-account .wp-block-post-content,
.woocommerce-account .entry-content {
  max-width: var(--wp--style--global--wide-size, 1280px);
}
.woocommerce-account .wp-block-post-content > .woocommerce,
.woocommerce-account .entry-content > .woocommerce,
.mp-app.woocommerce-account .woocommerce { max-width: none; width: 100%; }

/* Le H1 generique de la page (« Mon espace client », ~50 px) ecrasait le vrai
   titre d'ecran rendu en 20 px : sur la plupart des ecrans, le plus gros texte
   de la page ne disait rien. On le ramene au rang de sur-titre. */
.woocommerce-account .wp-block-post-title,
.woocommerce-account .entry-title {
  font-family: var(--mp-font-title);
  font-size: var(--mp-fs-lg);
  font-weight: 600;
  color: var(--mp-muted);
  text-align: left;
  letter-spacing: 0;
  margin-bottom: var(--mp-sp-4);
}

/* La charte s'arretait aux tableaux : le titre de page et la navigation
   restaient sur la pile systeme du theme. */
.woocommerce-account .wp-block-post-title,
.mp-app .woocommerce-MyAccount-navigation,
.mp-app .woocommerce-MyAccount-navigation li > a { font-family: var(--mp-font-body); }
.mp-app .mp-nav__group { font-family: var(--mp-font-title); }

/* Le compteur d'une entree active heritait du soulignement du libelle. */
.mp-app .woocommerce-MyAccount-navigation .mp-nav__count { text-decoration: none; }

/* Mobile : rien ne marquait la frontiere entre deux fiches empilees — le
   zebrage alternait CELLULE par cellule a l'interieur d'un meme enregistrement. */
@media (max-width: 767px) {
  .mp-app .mp-table.shop_table_responsive tbody tr {
    display: block;
    margin-bottom: var(--mp-sp-4);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-r-md);
    overflow: hidden;
    background: var(--mp-paper);
  }
  .mp-app .mp-table.shop_table_responsive tbody tr > :is(td, th) { border-bottom: 0; }
  .mp-app .mp-table.shop_table_responsive tbody tr > :is(td, th) + :is(td, th) {
    border-top: 1px solid var(--mp-line);
  }
}


/* ---------------------------------------------------------------------------
   Contraste des pastilles POSEES SUR UNE LIGNE TEINTEE.
   Mesure a l'ecran : « jamais connecte » (texte --mp-accent-hover sur un fond
   accent a 8 %, lui-meme compose sur la ligne rose #fdecea) tombait a 3,68:1
   en 12 px — sous le seuil AA de 4,5:1. Le fond alpha du badge se melange a la
   couleur de la LIGNE, ce qui n'etait pas prevu au calcul initial.
   Parade : sur une ligne teintee, la pastille reprend un fond OPAQUE et un
   texte encre. La couleur reste porteuse (fond + pastille ronde), mais le mot
   redevient lisible — et le sens, lui, est de toute facon double par le
   libelle (WCAG 1.4.1).
   --------------------------------------------------------------------------- */
.mp-app :is(.mp-tr--never-seen, .mp-tr--expired, .mp-tr--stock-ok, .mp-tr--highlight) .mp-badge {
  background: var(--mp-paper);
  color: var(--mp-ink);
  border-color: var(--mp-line);
}
/* La pastille ronde conserve la couleur d'etat : c'est elle qui porte le code
   chromatique, et elle n'a pas d'exigence de contraste de TEXTE. */
.mp-app .mp-tr--never-seen .mp-badge__dot { background: var(--mp-gold); }
.mp-app .mp-tr--expired    .mp-badge__dot { background: var(--mp-accent); }
.mp-app .mp-tr--stock-ok   .mp-badge__dot { background: var(--mp-teal); }


/* ===========================================================================
   22. LARGEUR UTILE DE L'ESPACE COMPTE — 2e passe
   ---------------------------------------------------------------------------
   Mesure a 1440 px apres la 1re passe : il manquait encore 124 px et la
   colonne « Actions » de « Mes coaches » restait hors champ.
     .entry-content  1440  (max-width 1280 + padding 104 de chaque cote) -> 1232
       ├ nav       370 px  = 30 % — la valeur NATIVE de WooCommerce, PAS notre
       │                     token de 264 px : `width` seul se fait reprendre
       │                     des que le conteneur reste un bloc flottant
       └ contenu   838 px                       la table en demande 962
   Deux gisements, on prend les deux : la gouttiere du theme (dimensionnee
   pour de la LECTURE, pas pour un tableau de bord) et la sidebar, ramenee a
   son token et FIGEE par flex-basis.
   Vise a 1440 px : 1376 utiles - 264 - 24 = 1088 px pour la table.
   =========================================================================== */
@media (min-width: 768px) {
  .woocommerce-account .wp-block-post-content,
  .woocommerce-account .entry-content {
    padding-left: var(--mp-sp-6);
    padding-right: var(--mp-sp-6);
  }

  /* ⛔ Selecteur volontairement plus specifique que celui de
     woocommerce-layout.css, ET flex-basis pose : `width` seul ne suffit pas. */
  .mp-app.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
    flex: 0 0 var(--mp-sidebar-w);
    width: var(--mp-sidebar-w);
    max-width: var(--mp-sidebar-w);
    float: none;
  }
  .mp-app.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation.mp-nav--collapsed {
    flex-basis: var(--mp-sidebar-w-rail);
    width: var(--mp-sidebar-w-rail);
    max-width: var(--mp-sidebar-w-rail);
  }

  /* `min-width: 0` est indispensable : sans lui un enfant flex refuse de
     passer sous la largeur de son contenu, et le tableau pousse la colonne. */
  .mp-app.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    float: none;
  }

  /* ⛔ Contrepartie MESUREE de l'elargissement : a 838 px les paragraphes
     faisaient deja 104 a 110 caracteres ; a 1088 px ils passeraient a ~135,
     bien au-dela du confort de lecture (~90). On borne donc la MESURE du
     texte courant — sans borner les tableaux, qui eux ont besoin de tout
     l'espace. Echanger un debordement contre une ligne illisible ne serait
     pas un progres. */
  .mp-app .woocommerce-MyAccount-content > p,
  .mp-app .mp-screen > p,
  .mp-app .mp-prose { max-width: 74ch; }
}

/* Si un tableau reste plus large que sa colonne (ecran etroit, police
   agrandie), le debordement doit se VOIR : une coupe franche laisse croire
   que le contenu s'arrete la. Attribut pose par le module `table-overflow`. */
.mp-app .mp-table__wrap { position: relative; }
.mp-app .mp-table__wrap::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(35, 38, 45, .10));
}
.mp-app .mp-table__wrap[data-mp-overflow="1"]::after { opacity: 1; }


/* ===========================================================================
   23. LARGEUR UTILE — 3e passe, apres correction des selecteurs morts
   ---------------------------------------------------------------------------
   ⛔ CAUSE RACINE des deux passes precedentes : `.mp-app` et
   `.woocommerce-account` sont la MEME classe, sur <body>. Ecrites avec un
   espace, les 9 regles etaient des combinateurs DESCENDANTS et ne matchaient
   AUCUN element. Toute la section 17 (« navigation laterale 264 px, sticky »)
   n'a donc jamais rien fait : la page tournait encore sur le float natif
   WooCommerce 30 % / 68 %, d'ou une sidebar a 384 px.
   Elles sont desormais composees (sans espace). Il restait deux defauts
   mesures a corriger dans le meme geste :
     • `.entry-content` est en `content-box` : max-width 1280 + padding ne
       pouvait PAS donner les 1376 px utiles esperes ;
     • a 32 px de gouttiere, la boite (1344) devient plus etroite que le
       viewport (1440) et se pose a gauche -> 96 px orphelins a droite, et
       l'espace compte desaligne de l'en-tete et du pied de page.
   =========================================================================== */
@media (min-width: 768px) {
  .mp-app.woocommerce-account .wp-block-post-content,
  .mp-app.woocommerce-account .entry-content {
    box-sizing: border-box;      /* sinon le padding s'AJOUTE au max-width */
    max-width: 1400px;
    margin-inline: auto;         /* recentre : plus de 96 px orphelins */
  }
  /* Le titre de page vit hors du bloc de contenu : on l'aligne dessus,
     faute de quoi il demarrait 116 px plus a droite que le reste. */
  .mp-app.woocommerce-account .wp-block-post-title,
  .mp-app.woocommerce-account .entry-title {
    box-sizing: border-box;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: var(--mp-sp-6);
  }

  /* ⛔ La borne de mesure du texte ne visait que `> p` : sur les ecrans
     REFONDUS les paragraphes sont enfants de .mp-section / .mp-card, donc
     elle ne les atteignait pas — et la ligne y passait de 110 a 115
     caracteres. On vise desormais le texte courant la ou il se trouve
     reellement, sans jamais borner un tableau. */
  .mp-app .mp-section > p,
  .mp-app .mp-card > p,
  .mp-app .mp-empty__text,
  .mp-app .mp-field__help { max-width: 74ch; }
}


/* ===========================================================================
   24. LARGEUR UTILE — 4e passe : les 56 px qui manquaient encore
   ---------------------------------------------------------------------------
   Contre-mesure du 29/07 apres la correction des selecteurs (section 23).
   Le calcul annoncait ~1046 px utiles ; la MESURE en donnait 992, et la table
   des coaches en demande 1001,4 -> 9 px de debordement residuel dans
   `.mp-table__wrap`, colonne « Actions » rabotee de 8 px.
   Deux fuites, trouvees en remontant la chaine des boites (aucune deduite
   d'une soustraction) :

   • 48 px — le CLEARFIX de WooCommerce. `.woocommerce::before/::after`
     (`content:" "; display:table`) sont des PSEUDO-ELEMENTS, donc de vrais
     ELEMENTS FLEX des lors que `.woocommerce` passe en `display:flex`
     (section 17). Larges de 0, ils n'en consomment pas moins un `gap` de
     24 px chacun : 0 +24+ nav +24+ contenu +24+ 0 = la boite entiere, et les
     enfants se retrouvent centres a 24 px des bords. Le clearfix n'a plus
     d'objet ici : en contexte flex il n'y a plus de flottant a contenir.
   • 8 px — la sidebar. `width/max-width/flex-basis: 264px` sur une boite en
     `content-box` a laquelle la section 17 ajoute `padding-right: 8px` :
     la boite mesurait 272 px, soit 8 de plus que son propre token.

   Mesure apres correction, a 1440 px (sonde wpshot.py, profil neuf) :
     nav 264 (token respecte, posee a x=52) | contenu 1048 | table 1048
     debordement du wrap 0 | debordement de page 0 | bouton « Editer » entier.
   =========================================================================== */
@media (min-width: 768px) {
  /* ⛔ Ne pas remplacer par `content: none` : d'autres feuilles reposent sur
     l'existence du pseudo. On le sort du FLUX FLEX, rien de plus. */
  .mp-app.woocommerce-account .woocommerce::before,
  .mp-app.woocommerce-account .woocommerce::after {
    display: none;
  }

  /* Le token de 264 px doit designer la boite VISIBLE, padding compris. */
  .mp-app.woocommerce-account .woocommerce-MyAccount-navigation {
    box-sizing: border-box;
  }
}


/* ===========================================================================
   25. UTILITAIRES DE MISE EN FORME — lot W6/W7
   ---------------------------------------------------------------------------
   Contrepartie des 13 derniers `style=` en dur de `web-groups.php` et des 2 de
   `web-supervisor.php` (objectif G2 : zero attribut de style dans le PHP).
   Ces classes ne creent AUCUN effet nouveau : elles portent exactement les
   declarations qui etaient ecrites sur place, a la valeur pres.
   =========================================================================== */

/* Liste sans puce ni retrait (recapitulatif de membres d'un groupe). */
.mp-app .mp-list--bare { list-style: none; margin-left: 0; }

/* Choix radio empiles : un par ligne, respiration entre deux. */
.mp-app .mp-radio-row { display: block; margin: 0 0 var(--mp-sp-1); }
.mp-app .mp-radio-row:last-child { margin-bottom: 0; }

/* Etiquette posee AVANT son champ sur la meme ligne. */
.mp-app .mp-label--inline {
  display: inline-block;
  margin: 0 var(--mp-sp-2) 0 0;
}

/* Champ de saisie a largeur mesuree (et jamais debordant sur petit ecran). */
.mp-app .mp-input--inline { display: inline-block; width: 18em; max-width: 100%; }
.mp-app .mp-input--wide   { display: inline-block; width: 22em; max-width: 100%; }

/* Aide sous un champ. */
.mp-app .mp-hint { display: block; margin-top: var(--mp-sp-1); }

/* Rangee d'actions qui se replie au lieu de deborder. */
.mp-app .mp-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mp-sp-2);
  align-items: center;
}

/* Case a cocher suivie de son libelle, dans une rangee d'actions. */
.mp-app .mp-check-inline { margin-right: var(--mp-sp-2); }
