/**
 * MWS Coaching CRM — Portal Front-end Styles
 * Design Liquid Glass — Phase 3
 *
 * Variables héritées du thème ou surchargées via les réglages.
 */

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --mws-cp:           #667eea;
  --mws-ca:           #764ba2;
  --mws-glass-bg:     rgba(255,255,255,0.24);
  --mws-glass-border: rgba(255,255,255,0.22);
  --mws-glass-blur:   18px;
  --mws-radius:       10px;
  --mws-radius-sm:    10px;
  --mws-shadow:       0 8px 32px rgba(31,38,135,0.12);
  --mws-text:         #1e293b;
  --mws-text-muted:   #64748b;
  --mws-gap:          20px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
.mws-portal *,
.mws-my-sessions *,
.mws-my-progress *,
.mws-my-documents *,
.mws-my-messages *,
.mws-prestations-grid * {
  box-sizing: border-box;
  margin-bottom: 1%;
}

/* ── Liquid Glass card ────────────────────────────────────────────────────── */
.mws-glass-card {
  background:          var(--mws-glass-bg);
  backdrop-filter:     blur(var(--mws-glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--mws-glass-blur)) saturate(180%);
  border:              1px solid var(--mws-glass-border);
  border-radius:       var(--mws-radius);
  padding:             24px;
  box-shadow:          var(--mws-shadow);
  position:            relative;
  overflow:            hidden;
  transition:          transform .2s ease, box-shadow .2s ease;
}
.mws-glass-card::before {
  content:    '';
  position:   absolute;
  inset:      0;
  border-radius: inherit;
  background: linear-gradient(135deg,rgba(255,255,255,.18) 0%,rgba(255,255,255,0) 60%);
  pointer-events: none;
}

/* ── Portail principal ────────────────────────────────────────────────────── */
.mws-portal {
  display:        flex;
  flex-direction: column;
  gap:            var(--mws-gap);
  /*max-width:      880px;*/
  margin:         0 auto;
  padding:        0 0 40px;
  color:          var(--mws-text);
  font-family:    -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

/* En-tête ─────────────────────────────────────────────────────────────────── */
.mws-portal__header {
  display:     flex;
  align-items: center;
  gap:         16px;
}

.mws-portal__avatar {
  flex-shrink:     0;
  width:           52px;
  height:          52px;
  border-radius:   50%;
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           #fff;
  font-size:       22px;
  font-weight:     700;
  letter-spacing:  0;
}

.mws-portal__welcome { flex: 1; min-width: 0; }

.mws-portal__greeting {
  margin:      0 0 4px;
  font-size:   20px;
  font-weight: 700;
  line-height: 1.2;
}

.mws-portal__subtitle {
  margin:    0;
  font-size: 14px;
  color:     var(--mws-text-muted);
}

.mws-portal__badge {
  flex-shrink:     0;
  background:      #ef444422;
  color:           #ef4444;
  border:          1px solid #ef444433;
  border-radius:   20px;
  padding:         4px 12px;
  font-size:       13px;
  font-weight:     600;
  display:         flex;
  align-items:     center;
  gap:             4px;
}

/* Stats ──────────────────────────────────────────────────────────────────── */
.mws-portal__stats {
  display:               grid;
  grid-template-columns: repeat(4,1fr);
  gap:                   var(--mws-gap);
}

.mws-stat {
  display:     flex;
  align-items: center;
  gap:         14px;
  padding:     20px;
}

.mws-stat__icon {
  flex-shrink:     0;
  width:           44px;
  height:          44px;
  border-radius:   12px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       20px;
}

.mws-stat__value {
  font-size:   26px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}

.mws-stat__label {
  font-size: 12px;
  color:     var(--mws-text-muted);
  font-weight: 500;
}

/* Barres de progression ──────────────────────────────────────────────────── */
.mws-progress-header {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-bottom:   8px;
  font-size:       13px;
  color:           var(--mws-text-muted);
}
.mws-progress-header strong { color: var(--mws-text); }

.mws-progress-bar {
  width:         100%;
  height:        8px;
  background:    rgba(0,0,0,.07);
  border-radius: 99px;
  overflow:      hidden;
}
.mws-progress-bar--lg { height: 12px; }

.mws-progress-bar__fill {
  height:        100%;
  border-radius: 99px;
  transition:    width .6s ease;
}

/* Prochaine session ──────────────────────────────────────────────────────── */
/* Prochaine session — portail home ──────────────────────────────────────── */
.mws-portal__next-session {
  padding: 18px 22px;
}
.mws-portal__next-session__label {
  font-size:   12px;
  font-weight: 600;
  color:       var(--mws-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
  display:     flex;
  align-items: center;
  gap:         8px;
}
.mws-portal__next-session__title {
  margin:      0 0 10px;
  font-size:   16px;
  font-weight: 700;
}
.mws-portal__next-session__meta {
  display:   flex;
  flex-wrap: wrap;
  gap:       10px 20px;
  align-items: center;
  font-size: 14px;
}
.mws-portal__next-session__meta small {
  display:    block;
  font-size:  12px;
  color:      var(--mws-text-muted);
  margin-top: 2px;
}

/* Prochaine session hero — page [mws_crm_my_sessions] ───────────────────── */
.mws-next-session-hero {
  padding:       22px 24px;
  margin-bottom: 0;
}
.mws-next-session-hero__label {
  display:      flex;
  align-items:  center;
  gap:          10px;
  font-size:    12px;
  font-weight:  600;
  color:        var(--mws-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.mws-next-session-hero__title {
  margin:      0 0 14px;
  font-size:   20px;
  font-weight: 700;
  line-height: 1.3;
}
.mws-next-session-hero__meta {
  display:   flex;
  flex-wrap: wrap;
  gap:       12px 28px;
  align-items: flex-start;
}
.mws-next-session-hero__info {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  font-size:   15px;
  line-height: 1.5;
}
.mws-next-session-hero__info-icon {
  font-size:   20px;
  flex-shrink: 0;
  margin-top:  1px;
}
.mws-next-session-hero__dur {
  font-size: 13px;
  color:     var(--mws-text-muted);
}
.mws-next-session-hero__addr {
  display:   block;
  font-size: 13px;
  color:     var(--mws-text-muted);
}
.mws-next-session-hero__desc {
  margin:    14px 0 0;
  font-size: 14px;
  color:     var(--mws-text-muted);
  border-top: 1px solid var(--mws-glass-border, rgba(0,0,0,.07));
  padding-top: 12px;
}

/* Titre de section ───────────────────────────────────────────────────────── */
.mws-portal__section-title {
  margin:      0 0 16px;
  font-size:   16px;
  font-weight: 700;
  display:     flex;
  align-items: center;
  gap:         8px;
}

/* Programmes ─────────────────────────────────────────────────────────────── */
.mws-portal__prog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mws-prog-card { padding: 20px; }

.mws-prog-card__head {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  gap:             12px;
  margin-bottom:   16px;
}

.mws-prog-card__title {
  margin:      0 0 4px;
  font-size:   15px;
  font-weight: 700;
}

.mws-prog-card__prestation {
  font-size: 12px;
  color:     var(--mws-text-muted);
}

.mws-prog-card__progress { margin-top: 4px; }

/* Badges ─────────────────────────────────────────────────────────────────── */
.mws-badge {
  display:       inline-flex;
  align-items:   center;
  gap:           4px;
  padding:       3px 10px;
  border-radius: 20px;
  font-size:     12px;
  font-weight:   600;
  white-space:   nowrap;
  flex-shrink:   0;
}

.mws-badge--pending {
  background: #f59e0b22;
  color:      #f59e0b;
}

.mws-count-badge {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-width:       22px;
  height:          22px;
  padding:         0 6px;
  border-radius:   99px;
  background:      rgba(0,0,0,.07);
  font-size:       12px;
  font-weight:     700;
}

.mws-count-badge--unread {
  background: #ef444422;
  color:      #ef4444;
}

/* ── Sessions ─────────────────────────────────────────────────────────────── */
.mws-sessions-list {
  display:        flex;
  flex-direction: column;
  gap:            10px;
}

.mws-session-row {
  display:     flex;
  align-items: flex-start;
  gap:         14px;
  padding:     16px 20px;
}

.mws-session-row--past { opacity: .72; }

.mws-session-row__num {
  flex-shrink:     0;
  width:           36px;
  height:          36px;
  border-radius:   50%;
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           #fff;
  font-weight:     700;
  font-size:       14px;
}

.mws-session-row--next {
  box-shadow: 0 0 0 2px var(--mws-color-primary, #667eea) !important;
}

.mws-session-row__body { flex: 1; min-width: 0; }

.mws-session-row__head {
  display:       flex;
  align-items:   flex-start;
  gap:           10px;
  flex-wrap:     wrap;
  margin-bottom: 6px;
  justify-content: space-between;
}
.mws-session-row__title {
  font-weight: 600;
  font-size:   14px;
  flex:        1;
  min-width:   0;
}

.mws-session-row__date {
  font-size: 13px;
  color:     var(--mws-text-muted);
  margin-top: 3px;
}
.mws-session-row__dur {
  color: var(--mws-text-muted);
}
.mws-session-row__location {
  font-size:  13px;
  color:      var(--mws-text-muted);
  margin-top: 4px;
  display:    flex;
  align-items: center;
  gap:         6px;
}
.mws-session-row__join {
  font-size:   12px;
  font-weight: 600;
  color:       var(--mws-color-primary, #667eea);
  text-decoration: none;
  border:      1px solid var(--mws-color-primary, #667eea);
  padding:     2px 8px;
  border-radius: 4px;
  transition:  background .15s, color .15s;
}
.mws-session-row__join:hover {
  background: var(--mws-color-primary, #667eea);
  color:      #fff;
}
.mws-session-row__note {
  font-size:  13px;
  color:      var(--mws-text-muted);
  margin-top: 4px;
  font-style: italic;
}
/* v2.8.0-alpha.99 — Note partagée du coach : picto SVG + libellé (plus d'emoji). */
.mws-session-row__coach-note {
  display:        flex;
  align-items:    flex-start;
  gap:            9px;
  margin-top:     10px;
  padding-top:    10px;
  border-top:     1px dashed rgba(102,126,234,.22);
  font-size:      13px;
}
.mws-session-row__coach-note-ic {
  flex-shrink: 0;
  color:       var(--mws-color-secondary, #764ba2);
  display:     inline-flex;
  margin-top:  1px;
}
.mws-session-row__coach-note-body { display: flex; flex-direction: column; gap: 2px; }
.mws-session-row__coach-note-lbl {
  font-size:      11px;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color:          var(--mws-color-secondary, #764ba2);
}
.mws-session-row__coach-note-txt { color: var(--mws-text-secondary, #4a5568); }
.mws-session-row__participants {
  font-size:   12px;
  color:       var(--mws-text-muted, #718096);
  font-style:  italic;
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
  max-width:   200px;
  flex-shrink: 0;
}

.mws-session-row__attendance {
  flex-shrink: 0;
  font-size:   20px;
  margin-top:  4px;
}

/* ── Progression ──────────────────────────────────────────────────────────── */

/* Résumé global (multi-programmes) */
.mws-progress-summary {
  display:         flex;
  justify-content: space-around;
  align-items:     center;
  padding:         16px 24px;
  gap:             16px;
  margin-bottom:   4px;
}
.mws-progress-summary__stat {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            2px;
}
.mws-progress-summary__val {
  font-size:   24px;
  font-weight: 800;
  line-height: 1;
}
.mws-progress-summary__label {
  font-size:      11px;
  color:          var(--mws-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align:     center;
}

/* Carte par programme */
.mws-prog-progress {
  display:        flex;
  flex-direction: column;
  gap:            14px;
  padding:        22px;
}

/* En-tête */
.mws-prog-progress__head {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  gap:             12px;
}
.mws-prog-progress__titles {
  display:        flex;
  flex-direction: column;
  gap:            2px;
  flex:           1;
  min-width:      0;
}
.mws-prog-progress__title {
  margin:      0;
  font-size:   15px;
  font-weight: 700;
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}
.mws-prog-progress__sub {
  font-size: 12px;
  color:     var(--mws-text-muted);
}
.mws-prog-progress__meta {
  display:     flex;
  align-items: center;
  gap:         10px;
  flex-shrink: 0;
}
.mws-prog-progress__pct {
  font-size:   22px;
  font-weight: 800;
}

/* Corps : donut + barre + compteurs côte à côte */
.mws-prog-progress__body {
  display:     flex;
  align-items: center;
  gap:         20px;
}
.mws-prog-progress__right {
  flex:           1;
  display:        flex;
  flex-direction: column;
  gap:            12px;
  min-width:      0;
}

/* Donut SVG */
.mws-donut {
  flex-shrink: 0;
  color:       var(--mws-text-muted);
}

/* Compteurs */
.mws-prog-progress__counters {
  display:   flex;
  flex-wrap: wrap;
  gap:       8px 20px;
}
.mws-prog-counter {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            1px;
  min-width:      70px;
}
.mws-prog-counter__val {
  font-size:   18px;
  font-weight: 800;
  line-height: 1;
}
.mws-prog-counter--done  .mws-prog-counter__val { color: #10b981; }
.mws-prog-counter--coming .mws-prog-counter__val { color: #f59e0b; }
.mws-prog-counter--cancelled .mws-prog-counter__val { color: #ef4444; }
.mws-prog-counter--time  .mws-prog-counter__val { color: #667eea; }
.mws-prog-counter__label {
  font-size:  11px;
  color:      var(--mws-text-muted);
  white-space: nowrap;
}

/* ── Documents ────────────────────────────────────────────────────────────── */
.mws-docs-grid {
  display:               grid;
  grid-template-columns: repeat(3,1fr);
  gap:                   var(--mws-gap);
}

.mws-doc-card {
  display:    flex;
  gap:        12px;
  padding:    16px 20px;
  transition: transform .2s ease;
}

.mws-doc-card:hover { transform: translateY(-2px); }

.mws-doc-card__icon {
  font-size:   28px;
  flex-shrink: 0;
  line-height: 1.2;
}

.mws-doc-card__body { flex: 1; min-width: 0; }

.mws-doc-card__title {
  font-weight: 600;
  font-size:   14px;
  margin-bottom: 4px;
}

.mws-doc-card__title a {
  color:           inherit;
  text-decoration: none;
}
.mws-doc-card__title a:hover { text-decoration: underline; }

.mws-doc-card__desc {
  font-size: 12px;
  color:     var(--mws-text-muted);
  margin-bottom: 6px;
}

.mws-doc-card__meta {
  font-size: 11px;
  color:     var(--mws-text-muted);
}

.mws-doc-card__dl {
  flex-shrink:     0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           32px;
  height:          32px;
  border-radius:   8px;
  background:      rgba(0,0,0,.05);
  color:           var(--mws-text);
  text-decoration: none;
  font-size:       16px;
  transition:      background .15s;
}
.mws-doc-card__dl:hover { background: rgba(0,0,0,.10); }

/* ── Messages ─────────────────────────────────────────────────────────────── */
.mws-messages-section__title {
  margin:    0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color:     var(--mws-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mws-messages-list {
  display:        flex;
  flex-direction: column;
  gap:            8px;
}

.mws-msg-row {
  display:     flex;
  align-items: center;
  gap:         12px;
  padding:     14px 18px;
}

.mws-msg-row--unread {
  border-left: 3px solid var(--mws-cp);
}

.mws-msg-row__avatar {
  flex-shrink:     0;
  width:           36px;
  height:          36px;
  border-radius:   50%;
  background:      linear-gradient(135deg,var(--mws-cp),var(--mws-ca));
  color:           #fff;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-weight:     700;
  font-size:       14px;
}

.mws-msg-row__body  { flex: 1; min-width: 0; }
.mws-msg-row__author { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.mws-msg-row__content { font-size: 13px; color: var(--mws-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mws-msg-row__date { flex-shrink: 0; font-size: 11px; color: var(--mws-text-muted); }

/* ── Prestations ──────────────────────────────────────────────────────────── */
.mws-prestations-grid {
  display: grid;
  gap:     24px;
  margin:  0 0 32px;
}

.mws-prestation-card {
  display:        flex;
  flex-direction: column;
  padding:        28px 24px;
}

.mws-prestation-card__stripe {
  position:      absolute;
  top:           0; left: 0; right: 0;
  height:        3px;
  border-radius: var(--mws-radius) var(--mws-radius) 0 0;
}

.mws-prestation-card__cat {
  display:       inline-block;
  padding:       3px 12px;
  border-radius: 20px;
  font-size:     11px;
  font-weight:   700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
  width:         fit-content;
  border:        1px solid transparent;
}

.mws-prestation-card__title {
  margin:      0 0 10px;
  font-size:   18px;
  font-weight: 700;
  line-height: 1.3;
}

.mws-prestation-card__desc {
  margin:    0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color:     var(--mws-text-muted);
  flex:      1;
}

.mws-prestation-card__meta {
  display:       flex;
  flex-wrap:     wrap;
  gap:           12px;
  margin-bottom: 20px;
  padding:       12px 0;
  border-top:    1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.15);
  font-size:     13px;
  color:         var(--mws-text-muted);
}

.mws-prestation-card__price {
  font-size:   14px;
  font-weight: 700;
  color:       var(--mws-text);
}

.mws-prestation-card__cta { margin-top: auto; }

/* ── Connexion ──────────────────────────────────────────────────────────────
   v2.8.0-beta.17 — le pill « connecté » du shortcode [mws_crm_login] peut être
   posé n'importe où par le thème, y compris dans un pied de page sombre. Ses
   surfaces se dérivent donc de currentColor (tokens --mws-ink-* émis par
   Core\Theme::css_root_vars()), avec les valeurs historiques en secours si la
   feuille est chargée sans le bloc :root du plugin. */
.mws-crm-login--connected {
  display:     inline-flex;
  align-items: center;
  gap:         10px;
  padding:     5px 14px 5px 5px;
  border-radius: 40px;
  border:      1px solid var(--mws-ink-line, rgba(102,126,234,.28));
  background:  var(--mws-ink-fill, rgba(102,126,234,.08));
  font-size:   13px;
  font-family: inherit;
}

.mws-login-avatar {
  flex-shrink:     0;
  width:           30px;
  height:          30px;
  border-radius:   50%;
  display:         flex;
  align-items:     center;
  justify-content: center;
  /* Encre calculée sur le milieu du dégradé de marque (cf. NavMenuHook). */
  color:           var(--mws-ink-on-brand, #fff);
  font-weight:     700;
  font-size:       13px;
}

.mws-login-name { font-weight: 600; }

.mws-login-sep {
  width:      1px;
  height:     16px;
  /* opacity .2 sur currentColor disparaissait sur fond sombre. */
  background: var(--mws-ink-line-strong, rgba(102,126,234,.48));
}

/* `opacity` sur du texte = dette de contraste : .65 tombait sous 4,5:1 sur un
   fond sombre. On atténue par la couleur, à un taux conforme des deux côtés. */
.mws-login-logout {
  display:     inline-flex;
  align-items: center;
  gap:         4px;
  color:       var(--mws-ink-soft, inherit);
  text-decoration: none;
  font-size:   13px;
  transition:  color .15s;
}
/* Survol : encre à 100 % + soulignement — l'affordance ne repose pas sur la
   couleur (aucun rouge ne tient 4,5:1 sur un fond gris moyen). Le rouge ne
   porte plus que le picto, qui n'est pas seul porteur de sens. */
.mws-login-logout:hover,
.mws-login-logout:focus-visible {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mws-login-logout:hover svg,
.mws-login-logout:focus-visible svg { color: var(--mws-ink-danger, #ef4444); }
.mws-login-logout:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 6px;
}

.mws-crm-login--form { max-width: 420px; margin: 0 auto; }
.mws-crm-login--form .login { margin: 0; }

/* Formulaire de connexion custom (email identifier) */
.mws-login-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }

.mws-login-field { display: flex; flex-direction: column; gap: 6px; }
.mws-login-field label {
  font-size:   13px;
  font-weight: 600;
  color:       var(--mws-text-secondary, #4a5568);
  letter-spacing: .02em;
}
.mws-login-field input[type="email"],
.mws-login-field input[type="password"] {
  width:         100%;
  padding:       10px 14px;
  border:        1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  font-size:     14px;
  background:    rgba(255,255,255,.7);
  transition:    border-color .15s, box-shadow .15s;
  box-sizing:    border-box;
}
.mws-login-field input:focus {
  outline:      none;
  border-color: var(--mws-cp, #667eea);
  box-shadow:   0 0 0 3px rgba(102,126,234,.15);
}

.mws-login-footer {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  font-size:       13px;
}
.mws-login-remember { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--mws-text-muted, #718096); }
.mws-login-lost { color: var(--mws-cp, #667eea); text-decoration: none; font-size: 13px; }
.mws-login-lost:hover { text-decoration: underline; }

.mws-login-notice {
  margin:        0 0 16px;
  padding:       10px 16px;
  border-radius: 8px;
  font-size:     14px;
  background:    rgba(102,126,234,.1);
  border:        1px solid rgba(102,126,234,.22);
}
.mws-login-notice--warn {
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.22);
}

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.mws-btn-cta {
  display:         inline-block;
  padding:         11px 24px;
  background:      var(--mws-cp);
  color:           #fff !important;
  border-radius:   var(--mws-radius-sm);
  font-size:       14px;
  font-weight:     600;
  text-decoration: none;
  transition:      opacity .15s, transform .15s;
}
.mws-btn-cta:hover { opacity: .88; transform: translateY(-1px); }

.mws-btn-logout {
  display:         inline-flex;
  align-items:     center;
  gap:             6px;
  padding:         8px 18px;
  border-radius:   40px;
  border:          1px solid rgba(0,0,0,.1);
  background:      rgba(0,0,0,.04);
  color:           var(--mws-text-muted);
  font-size:       13px;
  text-decoration: none;
  transition:      color .15s, border-color .15s;
}
.mws-btn-logout:hover { color: #ef4444; border-color: #ef444433; }

/* ── Portail Coach ────────────────────────────────────────────────────────── */
.mws-coach-kpi {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   16px;
  margin-bottom:         24px;
}
.mws-coach-kpi-card {
  background:    var(--mws-glass-bg, rgba(255,255,255,.85));
  border:        1px solid var(--mws-glass-border, rgba(255,255,255,.3));
  border-radius: var(--mws-radius, 16px);
  padding:       20px;
  text-align:    center;
}
.mws-coach-kpi-card__value {
  font-size:   28px;
  font-weight: 800;
  color:       var(--mws-cp, #667eea);
  line-height: 1;
  margin:      0 0 4px;
}
.mws-coach-kpi-card__label {
  font-size:      12px;
  color:          var(--mws-text-muted, #718096);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Grille participants (coach) */
.mws-participants-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap:                   16px;
  margin-top:            8px;
}
.mws-participant-card {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            8px;
  background:     var(--mws-glass-bg, rgba(255,255,255,.85));
  border:         1px solid var(--mws-glass-border, rgba(255,255,255,.3));
  border-radius:  var(--mws-radius, 16px);
  padding:        20px 16px;
  text-align:     center;
  transition:     box-shadow .15s, transform .15s;
}
.mws-participant-card:hover {
  box-shadow: 0 6px 20px rgba(102,126,234,.15);
  transform:  translateY(-2px);
}
.mws-participant-card__avatar {
  width:           48px;
  height:          48px;
  border-radius:   50%;
  background:      linear-gradient(135deg, var(--mws-cp, #667eea), var(--mws-cs, #764ba2));
  color:           #fff;
  font-size:       20px;
  font-weight:     700;
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
}
.mws-participant-card__name {
  font-weight: 600;
  font-size:   14px;
  color:       var(--mws-text, #1a202c);
  line-height: 1.3;
}
.mws-participant-card__email {
  font-size:  12px;
  color:      var(--mws-text-muted, #718096);
  word-break: break-all;
}
.mws-participant-card__body {
  flex:           1;
  display:        flex;
  flex-direction: column;
  gap:            4px;
  min-width:      0;
}
.mws-participant-card__stat {
  font-size:      11px;
  background:     rgba(102, 126, 234, .08);
  color:          var(--mws-cp, #667eea);
  padding:        3px 10px;
  border-radius:  20px;
  font-weight:    600;
  letter-spacing: .02em;
  align-self:     flex-start;
}

/* ── Empty states ─────────────────────────────────────────────────────────── */
.mws-portal-empty {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  padding:        40px 24px;
  text-align:     center;
  gap:            12px;
}
.mws-portal-empty__icon { font-size: 40px; }
.mws-portal-empty p { margin: 0; color: var(--mws-text-muted); font-size: 14px; }

/* ── Utilitaires ──────────────────────────────────────────────────────────── */
.mws-mt-16 { margin-top: 16px; }
.mws-portal__footer { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mws-portal__stats           { grid-template-columns: repeat(2,1fr); }
  .mws-docs-grid               { grid-template-columns: 1fr; }
  .mws-prestations-grid        { grid-template-columns: 1fr !important; }
  .mws-portal__greeting        { font-size: 17px; }
  /* Sur mobile : corps progression passe en colonne, donut masqué */
  .mws-prog-progress__body     { flex-direction: column; align-items: stretch; }
  .mws-donut                   { display: none; }
  .mws-progress-summary        { flex-wrap: wrap; gap: 12px; }
  .mws-prog-progress__counters { gap: 8px 14px; }
  /* Coach */
  .mws-coach-kpi               { grid-template-columns: repeat(2, 1fr); }
  .mws-participants-grid       { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .mws-portal__stats        { grid-template-columns: 1fr 1fr; }
  .mws-glass-card           { padding: 16px; }
  .mws-portal__header       { flex-wrap: wrap; }
  .mws-coach-kpi            { grid-template-columns: 1fr; }
  .mws-participants-grid    { grid-template-columns: 1fr; }
}

/* v2.8.0-beta.24 — un fragment TRONQUÉ occupait cet emplacement :

       @media (max-width: 900px) {
         .mws-prestations-grid { grid-template-columns: repea

   Coupé en plein milieu de « repeat( », ni la règle ni le @media refermés :
   le parseur CSS avalait donc les 806 lignes suivantes (43 % de la feuille),
   à TOUTES les largeurs d'écran — tout [mws_crm_my_tasks], [mws_crm_my_messages]
   et [mws_crm_my_documents] s'affichaient sans style.

   Le fragment n'a pas été reconstitué mais SUPPRIMÉ, car il était redondant :
   .mws-prestations-grid reçoit ses colonnes d'un style inline posé par
   ShortcodeRegistry (repeat($cols,1fr)), et le @media (max-width: 768px)
   ci-dessus force déjà 1fr !important sur mobile. Ne rien réintroduire ici. */

/* ══════════════════════════════════════════════════════════════════════════════
   [mws_crm_my_tasks] — Portail participant V2
   ══════════════════════════════════════════════════════════════════════════════ */

.mws-my-tasks *,
.mws-my-tasks *::before,
.mws-my-tasks *::after { box-sizing: border-box; }

.mws-my-tasks { display: flex; flex-direction: column; gap: 16px; }

/* ── En-tête + onglets ────────────────────────────────────────────────────── */
.mws-my-tasks__header {
  display:         flex;
  flex-wrap:       wrap;
  align-items:     center;
  gap:             12px;
  justify-content: space-between;
}

.mws-tasks-tabs {
  display:      flex;
  flex-wrap:    wrap;
  gap:          6px;
}

.mws-tasks-tab {
  display:       inline-flex;
  align-items:   center;
  gap:           5px;
  padding:       5px 13px;
  border:        1.5px solid var(--mws-glass-border, rgba(255,255,255,.22));
  border-radius: 20px;
  background:    transparent;
  cursor:        pointer;
  font-size:     13px;
  color:         var(--mws-text-muted, #64748b);
  transition:    all .18s ease;
}
.mws-tasks-tab:hover {
  border-color: var(--mws-cp, #667eea);
  color:        var(--mws-cp, #667eea);
}
.mws-tasks-tab--active {
  background:   var(--mws-cp, #667eea);
  border-color: var(--mws-cp, #667eea);
  color:        #fff;
  font-weight:  600;
}

.mws-tab-count {
  display:       inline-flex;
  align-items:   center;
  justify-content: center;
  min-width:     18px;
  height:        18px;
  padding:       0 5px;
  border-radius: 9px;
  font-size:     11px;
  font-weight:   700;
  background:    rgba(255,255,255,.25);
  color:         inherit;
}
.mws-tasks-tab:not(.mws-tasks-tab--active) .mws-tab-count {
  background: var(--mws-cp, #667eea);
  color:      #fff;
}

/* ── Liste des tâches ─────────────────────────────────────────────────────── */
.mws-tasks-list {
  display:        flex;
  flex-direction: column;
  gap:            12px;
}

/* ── Carte tâche ──────────────────────────────────────────────────────────── */
.mws-task-card {
  display:       flex;
  align-items:   stretch;
  gap:           0;
  position:      relative;
  overflow:      hidden;
  padding:       0;
  transition:    opacity .2s, transform .2s;
}
.mws-task-card--done {
  opacity: .72;
}
.mws-task-card--late {
  border-color: rgba(239,68,68,.3);
}
.mws-task-card--urgent {
  box-shadow: 0 0 0 2px rgba(239,68,68,.25), var(--mws-shadow, 0 8px 32px rgba(31,38,135,.12));
}

/* Bande de priorité à gauche */
.mws-task-card__priority-bar {
  width:           4px;
  flex-shrink:     0;
  border-radius:   var(--mws-radius, 10px) 0 0 var(--mws-radius, 10px);
}

/* Corps */
.mws-task-card__main {
  flex:    1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap:     10px;
}

/* Ligne du haut : icône + titre + badges */
.mws-task-card__top {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  flex-wrap:   wrap;
}
.mws-task-type-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.mws-task-card__title {
  flex:        1;
  font-size:   15px;
  font-weight: 600;
  color:       var(--mws-text, #1e293b);
  margin:      0;
  line-height: 1.35;
}
.mws-task-title--done {
  text-decoration: line-through;
  color:           var(--mws-text-muted, #64748b);
}

.mws-task-card__badges {
  display:    flex;
  flex-wrap:  wrap;
  gap:        5px;
  flex-shrink: 0;
}

/* Description */
.mws-task-card__desc {
  margin:    0;
  font-size: 13.5px;
  color:     var(--mws-text-muted, #64748b);
  line-height: 1.5;
}

/* Méta (date d'échéance, etc.) */
.mws-task-card__meta {
  display:     flex;
  flex-wrap:   wrap;
  gap:         10px;
  font-size:   12.5px;
  color:       var(--mws-text-muted, #64748b);
}
.mws-task-meta--late {
  color:       #ef4444;
  font-weight: 600;
}

/* Commentaires */
.mws-task-card__comment {
  border-radius: 6px;
  padding:       10px 14px;
  font-size:     13px;
  line-height:   1.5;
}
.mws-task-card__comment strong {
  display:     block;
  font-size:   11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}
.mws-task-card__comment p { margin: 0; }
.mws-task-card__comment--mine {
  background: rgba(102,126,234,.08);
  border:     1px solid rgba(102,126,234,.18);
}
.mws-task-card__comment--coach {
  background: rgba(16,185,129,.07);
  border:     1px solid rgba(16,185,129,.18);
}

/* Boutons d'action */
.mws-task-card__actions {
  display:   flex;
  flex-wrap: wrap;
  gap:       8px;
  align-items: center;
}
.mws-btn-task-action {
  padding:       6px 14px;
  border-radius: 20px;
  border:        1.5px solid currentColor;
  background:    transparent;
  font-size:     12.5px;
  font-weight:   600;
  cursor:        pointer;
  transition:    background .15s, color .15s;
}
.mws-btn-task-start  { color: #667eea; }
.mws-btn-task-done   { color: #10b981; }
.mws-btn-task-comment-toggle { color: #64748b; }
.mws-btn-task-comment-save   { color: #667eea; }

.mws-btn-task-action:hover {
  background: currentColor;
  color:      #fff;
}
.mws-btn-task-action:disabled {
  opacity: .5;
  cursor:  not-allowed;
}

/* Zone de saisie commentaire */
.mws-task-comment-form {
  display:        flex;
  flex-direction: column;
  gap:            8px;
  width:          100%;
  margin-top:     4px;
}
.mws-task-comment-input {
  width:       100%;
  border:      1.5px solid var(--mws-glass-border, rgba(255,255,255,.22));
  border-radius: 8px;
  padding:     8px 12px;
  font-size:   13.5px;
  background:  var(--mws-glass-bg, rgba(255,255,255,.24));
  color:       var(--mws-text, #1e293b);
  resize:      vertical;
  transition:  border-color .15s;
}
.mws-task-comment-input:focus {
  outline:      none;
  border-color: var(--mws-cp, #667eea);
}

/* ── Badge "En retard" ────────────────────────────────────────────────────── */
.mws-badge--late {
  background: rgba(239,68,68,.12) !important;
  color:      #ef4444 !important;
  font-weight: 700;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mws-my-tasks__header { flex-direction: column; align-items: flex-start; }
  .mws-tasks-tabs       { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .mws-task-card__top   { flex-direction: column; }
  .mws-task-card__badges { align-self: flex-start; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   [mws_crm_my_documents] V2 — documents téléchargeables avec dossiers
   ══════════════════════════════════════════════════════════════════════════════ */

.mws-my-documents-v2 { display: flex; flex-direction: column; gap: 20px; }

.mws-my-documents__header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  flex-wrap:       wrap;
  gap:             10px;
}

/* Dossier */
.mws-docs-folder { display: flex; flex-direction: column; gap: 12px; }
.mws-docs-folder__title {
  display:      flex;
  align-items:  center;
  gap:          8px;
  font-size:    13px;
  font-weight:  700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color:        var(--mws-text-muted, #64748b);
  padding:      0 2px;
}

/* Grille V2 */
.mws-docs-grid-v2 {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:                   12px;
}

/* Carte V2 */
.mws-doc-card-v2 {
  display:       flex;
  align-items:   center;
  gap:           14px;
  padding:       14px 16px;
  transition:    transform .18s, box-shadow .18s;
}
.mws-doc-card-v2:hover {
  transform:  translateY(-2px);
  box-shadow: 0 12px 36px rgba(31,38,135,.16);
}

.mws-doc-card-v2__icon {
  width:          44px;
  height:         44px;
  border-radius:  10px;
  display:        flex;
  align-items:    center;
  justify-content: center;
  font-size:      20px;
  flex-shrink:    0;
}

.mws-doc-card-v2__body {
  flex:    1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap:     5px;
}

.mws-doc-card-v2__title {
  font-size:   14px;
  font-weight: 600;
  color:       var(--mws-text, #1e293b);
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}
.mws-doc-card-v2__title a {
  color:           inherit;
  text-decoration: none;
}
.mws-doc-card-v2__title a:hover {
  color:           var(--mws-cp, #667eea);
  text-decoration: underline;
}

.mws-doc-card-v2__desc {
  font-size:      12.5px;
  color:          var(--mws-text-muted, #64748b);
  overflow:       hidden;
  text-overflow:  ellipsis;
  white-space:    nowrap;
}

.mws-doc-card-v2__meta {
  display:     flex;
  flex-wrap:   wrap;
  gap:         6px;
  align-items: center;
  font-size:   11.5px;
  color:       var(--mws-text-muted, #64748b);
}
.mws-doc-meta-size,
.mws-doc-meta-date { font-size: 11.5px; }

/* Bouton téléchargement */
.mws-doc-card-v2__dl {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           36px;
  height:          36px;
  border-radius:   8px;
  background:      var(--mws-cp, #667eea);
  color:           #fff;
  flex-shrink:     0;
  transition:      background .15s, transform .15s;
  text-decoration: none;
}
.mws-doc-card-v2__dl:hover {
  background:  #4f5bd5;
  transform:   scale(1.08);
}
.mws-doc-card-v2__dl svg { display: block; }

@media (max-width: 600px) {
  .mws-docs-grid-v2 { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   [mws_crm_my_messages] V2 — messagerie asynchrone en bulles de chat
   ══════════════════════════════════════════════════════════════════════════════ */

.mws-my-messages-v2 { display: flex; flex-direction: column; gap: 16px; }

.mws-my-messages__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Onglets multi-fils */
.mws-msg-tabs {
  display:    flex;
  flex-wrap:  wrap;
  gap:        8px;
}
.mws-msg-tab {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       6px 16px;
  border:        1.5px solid var(--mws-glass-border, rgba(255,255,255,.22));
  border-radius: 20px;
  background:    transparent;
  cursor:        pointer;
  font-size:     13px;
  color:         var(--mws-text-muted, #64748b);
  transition:    all .18s;
}
.mws-msg-tab:hover       { border-color: var(--mws-cp, #667eea); color: var(--mws-cp, #667eea); }
.mws-msg-tab--active     { background: var(--mws-cp, #667eea); border-color: var(--mws-cp, #667eea); color: #fff; font-weight: 600; }
/* alpha.246 (M1 multi-coachs) — onglet = nom du coach + programme en sous-libellé */
.mws-msg-tab__coach      { font-weight: 700; }
.mws-msg-tab__prog       { font-size: 11px; opacity: .75; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mws-msg-tab__prog::before { content: "· "; }

/* Fil de discussion */
.mws-msg-thread { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.mws-msg-thread--hidden { display: none !important; }

/* En-tête du fil */
.mws-msg-thread__head {
  display:       flex !important;
  flex-direction: row !important;
  align-items:   center !important;
  gap:           12px;
  padding:       14px 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background:    rgba(255,255,255,.6);
}
.mws-msg-thread__avatar {
  width:         38px !important;
  height:        38px !important;
  min-width:     38px;
  border-radius: 50% !important;
  display:       flex !important;
  align-items:   center !important;
  justify-content: center !important;
  font-size:     16px;
  font-weight:   700;
  color:         #fff;
  flex-shrink:   0 !important;
  flex-grow:     0 !important;
}
.mws-msg-thread__info  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mws-msg-thread__coach { font-weight: 700; font-size: 14px; color: var(--mws-text, #1e293b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mws-msg-thread__prog  { font-size: 12px; color: var(--mws-text-muted, #64748b); }

/* Zone de messages scrollable */
.mws-msg-thread__messages {
  flex:       1;
  overflow-y: auto;
  max-height: 400px;
  padding:    16px 18px;
  display:    flex;
  flex-direction: column;
  gap:        12px;
  scroll-behavior: smooth;
}

/* État vide */
.mws-msg-bubble-empty {
  text-align: center;
  padding:    40px 20px;
  color:      var(--mws-text-muted, #64748b);
  display:    flex;
  flex-direction: column;
  align-items: center;
  gap:         8px;
}
.mws-msg-bubble-empty span { font-size: 36px; }
.mws-msg-bubble-empty p    { margin: 0; font-size: 13.5px; }

/* Bulle générique */
.mws-msg-bubble {
  display:     flex;
  align-items: flex-end;
  gap:         10px;
  max-width:   82%;
}

/* Bulle moi → droite */
.mws-msg-bubble--me {
  align-self:      flex-end;
  flex-direction:  row-reverse;
}

/* Bulle coach → gauche */
.mws-msg-bubble--them { align-self: flex-start; }

.mws-msg-bubble__avatar {
  width:       30px;
  height:      30px;
  border-radius: 50%;
  display:     flex;
  align-items: center;
  justify-content: center;
  font-size:   13px;
  font-weight: 700;
  color:       #fff;
  flex-shrink: 0;
}

.mws-msg-bubble__inner { display: flex; flex-direction: column; gap: 3px; }

.mws-msg-bubble__text {
  padding:       10px 14px;
  border-radius: 14px;
  font-size:     13.5px;
  line-height:   1.5;
  word-break:    break-word;
}
.mws-msg-bubble--me .mws-msg-bubble__text {
  background:    var(--mws-cp, #667eea);
  color:         #fff;
  border-bottom-right-radius: 4px;
}
.mws-msg-bubble--them .mws-msg-bubble__text {
  background:    var(--mws-glass-bg, rgba(255,255,255,.24));
  color:         var(--mws-text, #1e293b);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--mws-glass-border, rgba(255,255,255,.22));
}

.mws-msg-bubble__time {
  font-size:  11px;
  color:      var(--mws-text-muted, #64748b);
  display:    flex;
  gap:        4px;
  align-items: center;
}
.mws-msg-bubble--me .mws-msg-bubble__time { justify-content: flex-end; }

.mws-msg-read   { color: var(--mws-cp, #667eea); font-size: 12px; }
.mws-msg-unread { color: var(--mws-text-muted, #94a3b8); font-size: 12px; }

/* Compteur non lus */
.mws-count-badge--unread {
  background: #ef4444;
}

/* Formulaire d'envoi */
.mws-msg-compose {
  padding:       14px 18px;
  border-top:    1px solid rgba(0,0,0,.08);
  background:    rgba(255,255,255,.7);
  display:       flex;
  flex-direction: column;
  gap:           10px;
}
.mws-msg-compose__field { flex: 1; }
.mws-msg-compose__input {
  width:         100%;
  box-sizing:    border-box;
  border:        1.5px solid #d1d5db;
  border-radius: 10px;
  padding:       10px 14px;
  font-size:     13.5px;
  background:    #fff;
  color:         #1e293b;
  resize:        vertical;
  transition:    border-color .15s;
  font-family:   inherit;
}
.mws-msg-compose__input:focus  { outline: none; border-color: var(--mws-cp, #667eea); box-shadow: 0 0 0 3px rgba(102,126,234,.15); }
.mws-msg-compose__actions      { display: flex; justify-content: flex-end; }
.mws-msg-compose__send {
  display:       inline-flex;
  align-items:   center;
  gap:           7px;
  padding:       9px 22px;
  border-radius: 20px;
  border:        none;
  background:    var(--mws-cp, #667eea);
  color:         #fff;
  font-size:     13.5px;
  font-weight:   600;
  cursor:        pointer;
  transition:    background .15s, transform .15s;
}
.mws-msg-compose__send:hover    { background: #4f5bd5; transform: scale(1.03); }
.mws-msg-compose__send:disabled { opacity: .6; cursor: not-allowed; transform: none; }

@media (max-width: 600px) {
  .mws-msg-thread__messages { max-height: 280px; }
  .mws-msg-bubble           { max-width: 92%; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   [mws_crm_my_progress] V2 — panels additionnels
   ══════════════════════════════════════════════════════════════════════════════ */

/* Prochaine séance inline */
.mws-prog-next-session {
  display:       flex;
  flex-wrap:     wrap;
  align-items:   center;
  gap:           10px;
  padding:       10px 14px;
  border-radius: 8px;
  background:    rgba(102,126,234,.07);
  border:        1px solid rgba(102,126,234,.15);
  font-size:     13px;
}
.mws-prog-next-session__label {
  font-weight:    700;
  font-size:      12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color:          var(--mws-cp, #667eea);
  flex-shrink:    0;
}
.mws-prog-next-session__info {
  display:     flex;
  flex-wrap:   wrap;
  gap:         6px;
  align-items: center;
  font-size:   13px;
  color:       var(--mws-text, #1e293b);
}

/* Résumé tâches */
.mws-prog-tasks-summary {
  display:        flex;
  flex-direction: column;
  gap:            6px;
  padding:        10px 14px;
  border-radius:  8px;
  background:     rgba(16,185,129,.06);
  border:         1px solid rgba(16,185,129,.15);
}
.mws-prog-tasks-summary__head {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  font-size:       13px;
  font-weight:     600;
  color:           var(--mws-text, #1e293b);
}
.mws-prog-tasks-summary__active {
  font-size: 12px;
  color:     var(--mws-text-muted, #64748b);
  margin-top: 2px;
}

/* Objectif courant */
.mws-prog-objective {
  display:        flex;
  flex-direction: column;
  gap:            4px;
  padding:        10px 14px;
  border-radius:  8px;
  background:     rgba(245,158,11,.07);
  border:         1px solid rgba(245,158,11,.2);
}
.mws-prog-objective__label {
  font-size:     11.5px;
  font-weight:   700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color:          #f59e0b;
}
.mws-prog-objective__title {
  font-size:   14px;
  font-weight: 600;
  color:       var(--mws-text, #1e293b);
}
.mws-prog-objective__due {
  font-size: 12px;
  color:     var(--mws-text-muted, #64748b);
}

/* Mini-timeline */
.mws-prog-timeline {
  display:        flex;
  flex-direction: column;
  gap:            8px;
}
.mws-prog-timeline__label {
  font-size:     11.5px;
  font-weight:   700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color:          var(--mws-text-muted, #64748b);
}
.mws-prog-timeline__list {
  display:        flex;
  flex-direction: column;
  gap:            6px;
  padding-left:   12px;
  border-left:    2px solid var(--mws-cp, #667eea);
}
.mws-prog-timeline__item {
  display:     flex;
  align-items: center;
  gap:         10px;
  position:    relative;
}
.mws-prog-timeline__dot {
  width:         10px;
  height:        10px;
  border-radius: 50%;
  flex-shrink:   0;
  margin-left:   -17px;
  border:        2px solid #fff;
}
.mws-prog-timeline__body {
  display:     flex;
  align-items: center;
  gap:         8px;
  flex-wrap:   wrap;
}
.mws-prog-timeline__title { font-size: 13px; font-weight: 600; color: var(--mws-text, #1e293b); }
.mws-prog-timeline__date  { font-size: 12px; color: var(--mws-text-muted, #64748b); }

/* ── Bloc redirection coach/admin (render_my_messages) ─────────────────── */
.mws-portal-redirect {
  display:      flex;
  flex-direction: column;
  align-items:  center;
  gap:          16px;
  padding:      40px 30px;
  text-align:   center;
}
.mws-portal-redirect__icon { font-size: 48px; line-height: 1; }
.mws-portal-redirect p     { color: var(--mws-text-muted, #64748b); margin: 0; }

/* ── Toast confirmation envoi message ──────────────────────────────────── */
.mws-toast {
  position:      fixed;
  bottom:        24px;
  left:          50%;
  transform:     translateX(-50%) translateY(16px);
  padding:       11px 22px;
  border-radius: 24px;
  font-size:     14px;
  font-weight:   600;
  color:         #fff;
  opacity:       0;
  transition:    opacity .25s ease, transform .25s ease;
  z-index:       99999;
  pointer-events: none;
  white-space:   nowrap;
  box-shadow:    0 4px 20px rgba(0,0,0,.18);
}
.mws-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.mws-toast--ok      { background: #22c55e; }
.mws-toast--error   { background: #ef4444; }

/* Indicateur d'envoi (bouton) */
.mws-sending-dot {
  display:       inline-block;
  width:         7px; height: 7px;
  border-radius: 50%;
  background:    rgba(255,255,255,.8);
  margin:        0 2px;
  animation:     mwsDotBounce .9s infinite ease-in-out;
}
.mws-sending-dot:nth-child(2) { animation-delay: .15s; }
.mws-sending-dot:nth-child(3) { animation-delay: .30s; }
@keyframes mwsDotBounce {
  0%,80%,100% { transform: scale(.6); opacity:.5; }
  40%         { transform: scale(1);  opacity:1;  }
}

/* Champ en erreur */
.mws-input-error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.18) !important; }

/* ── R-41 Lot 4 (v2.8.0-alpha.167) — pictos SVG en remplacement des émojis ── */
/* Titres de section et icônes d'info : teinte primaire, pas d'écrasement flex. */
.mws-portal__section-title svg,
.mws-next-session-hero__info-icon svg {
  color:       var(--mws-color-primary, #667eea);
  flex-shrink: 0;
}

/* Icônes inline dans du texte : calage optique sur la ligne de base. */
.mws-session-row__date svg,
.mws-session-row__location svg,
.mws-session-row__note svg,
.mws-task-card__meta svg,
.mws-btn-task-action svg,
.mws-btn svg,
.mws-prog-counter__label svg,
.mws-prog-next-session__label svg,
.mws-prog-tasks-summary svg,
.mws-prog-objective__label svg,
.mws-prestation-card__meta svg {
  vertical-align: -2px;
}

/* Conteneurs flex : l'icône ne doit pas se comprimer. */
.mws-badge svg,
.mws-tasks-tab svg { flex-shrink: 0; vertical-align: -2px; }

/* États vides : grand picto discret teinté. */
.mws-portal-empty__icon svg,
.mws-portal-redirect__icon svg,
.mws-msg-bubble-empty svg {
  color:   var(--mws-color-primary, #667eea);
  opacity: .45;
}

/* 2.8.1-beta.46 — un élément masqué par le JS (attribut hidden) disparaît
   toujours, quel que soit le display de sa classe (même règle que admin.css). */
[class*="mws-"][hidden] { display: none !important; }
