/* ═══ AGOGE Coach Dashboard CSS ═══ */

    /* === VARIABLE BRIDGE: athlete short vars → ag-* coach vars === */
    /* Allows agoge-session-detail.js to render correctly in coach context */
    :root {
      --bg: var(--ag-bg-base);
      --surface: var(--ag-bg-surface);
      --elevated: var(--ag-bg-elevated);
      --card-bg: var(--ag-bg-card);
      --card-border: var(--ag-border);
      --border: var(--ag-border);
      --border2: var(--ag-border-med);
      --border-bold: var(--ag-border-bold);
      --muted: var(--ag-text-muted);
      --disabled: var(--ag-text-disabled);
      --text: var(--ag-text-primary);
      --text1: var(--ag-text-primary);
      --text2: var(--ag-text-secondary);
      --ease: var(--ag-ease);
      --accent: var(--ag-primary);
      --orange: var(--ag-orange);
      --orange2: var(--ag-orange2);
      --emerald: var(--ag-emerald);
      --rose: var(--ag-rose);
      --amber: var(--ag-amber);
      --blue: var(--ag-blue);
      --cyan: var(--ag-cyan, #22d3ee);
      --violet: var(--ag-violet, #a78bfa);
      --indigo: #818cf8;
      --orange-rgb: 249,115,22;
      --emerald-rgb: 52,211,153;
      --rose-rgb: 251,113,133;
      --amber-rgb: 251,191,36;
      --blue-rgb: 96,165,250;
      --violet-rgb: 167,139,250;
      --cyan-rgb: 34,211,238;
    }
    @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
    .ls-spinner {
      width: 40px; height: 40px;
      border: 3px solid var(--ag-border-med);
      border-top-color: var(--ag-primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* === WELCOME HERO === */
    .welcome-left { position: relative; z-index: 1; }
    .welcome-greeting {
      
      font-size: 1.7rem;
      font-weight: 300;
      color: var(--ag-text-secondary);
      margin-bottom: 6px;
    }
    .welcome-greeting strong { color: var(--ag-text-primary); font-weight: 700; }
    .welcome-sub { color: var(--ag-text-muted); font-size: 0.88rem; line-height: 1.5; }
    .welcome-sub .highlight { color: var(--ag-amber); font-weight: 600; }

    /* === ALERT BANNER === */
    .alert-item {
      display: flex; align-items: center; gap: 12px;
      padding: 12px 16px; margin-bottom: 6px;
      border-radius: var(--ag-radius-md);
      animation: fadeInUp 0.4s var(--ag-ease) both;
    }
    .alert-item.danger { background: rgba(251,113,133,0.06); border: 1px solid rgba(251,113,133,0.18); }
    .alert-item.warning { background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.18); }
    .alert-item .ai-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .alert-item.danger .ai-icon { background: rgba(251,113,133,0.12); color: var(--ag-rose); }
    .alert-item.warning .ai-icon { background: rgba(251,191,36,0.12); color: var(--ag-amber); }
    .alert-item .ai-text { flex: 1; font-size: 0.82rem; color: var(--ag-text-secondary); }
    .alert-item .ai-athlete { font-weight: 700; color: var(--ag-text-primary); }
    .alert-item .ai-action { font-size: 0.75rem; color: var(--ag-primary); font-weight: 600; text-decoration: none; flex-shrink: 0; cursor: pointer; }

    /* === MEGA STATS === */
    .mega-stat {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-lg); padding: 22px 20px;
      position: relative; overflow: hidden;
      transition: all 0.3s var(--ag-ease); animation: fadeInUp 0.5s var(--ag-ease) both;
    }
    .mega-stat:nth-child(1){animation-delay:.05s} .mega-stat:nth-child(2){animation-delay:.1s} .mega-stat:nth-child(3){animation-delay:.15s} .mega-stat:nth-child(4){animation-delay:.2s}
    .mega-stat:hover { border-color: var(--ag-border-med); transform: translateY(-3px); }
    .mega-stat::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; opacity:0; transition:opacity 0.3s; }
    .mega-stat:hover::before { opacity: 1; }
    .mega-stat:nth-child(1)::before{background:linear-gradient(90deg,#f97316,#ea580c)} .mega-stat:nth-child(2)::before{background:linear-gradient(90deg,#34d399,#06b6d4)} .mega-stat:nth-child(3)::before{background:linear-gradient(90deg,#fbbf24,#f59e0b)} .mega-stat:nth-child(4)::before{background:linear-gradient(90deg,#a78bfa,#ec4899)}
    .mega-stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
    .mega-stat-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; }
    .mega-stat-icon svg { width: 18px; height: 18px; }
    .mega-stat-spark { height:28px; display:flex; align-items:flex-end; gap:2px; }
    .mega-stat-spark .bar { width:4px; border-radius:2px; transition:height 0.6s var(--ag-ease); animation:barGrow 0.8s var(--ag-ease) both; }
    @keyframes barGrow { from { height: 0 !important; } }
    .mega-stat-val {  font-size:2rem; font-weight:800; line-height:1; margin-bottom:2px; }
    .mega-stat-label { font-size:0.78rem; color:var(--ag-text-muted); font-weight:500; }

    /* === ATHLETE CARDS GRID === */
    .athletes-section-title {
       font-size: 1.1rem; font-weight: 700;
      margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
    }
    .athletes-section-title svg { width: 20px; height: 20px; color: var(--ag-text-muted); }
    .athletes-section-title .count {
      font-size: 0.72rem; font-weight: 700;
      background: rgba(249,115,22,0.1); color: var(--ag-primary);
      padding: 3px 10px; border-radius: 100px;
    }
    .athletes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 16px;
      margin-bottom: 32px;
    }
    .athlete-card {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-lg); padding: 20px;
      cursor: pointer; transition: all 0.3s var(--ag-ease);
      position: relative; overflow: hidden;
      animation: fadeInUp 0.4s var(--ag-ease) both;
    }
    .athlete-card:hover { border-color: var(--ag-primary); box-shadow: var(--ag-shadow-glow); transform: translateY(-3px); }
    .athlete-card.active { border-color: var(--ag-primary); box-shadow: 0 0 30px rgba(249,115,22,0.12); }
    .athlete-card.active::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:var(--ag-grad-glow); }
    .athlete-card .ac-top { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
    .athlete-card .ac-avatar {
      width:42px; height:42px; border-radius:50%;
      display:flex; align-items:center; justify-content:center;
       font-weight:800; font-size:0.85rem;
      flex-shrink:0; position:relative;
    }
    .athlete-card .ac-avatar:has(.agoge-avatar-component){width:auto;height:auto;background:none;overflow:visible;box-shadow:none;border-radius:0}
    .athlete-card .ac-avatar .ac-alert-dot {
      position:absolute; top:-1px; right:-1px;
      width:12px; height:12px; border-radius:50%;
      border:2px solid var(--ag-bg-card);
    }
    .athlete-card .ac-alert-dot.danger { background: var(--ag-rose); }
    .athlete-card .ac-alert-dot.warning { background: var(--ag-amber); }
    .ac-msg-badge { display:flex;align-items:center;gap:6px;font-size:0.78rem;padding:8px 12px;border-radius:10px;background:var(--ag-ov-rose);border:1px solid rgba(251,113,133,0.2);color:var(--ag-rose);font-weight:600;margin-top:10px;cursor:pointer; }
    .ac-msg-badge svg { flex-shrink:0; }
    .ac-msg-dot { width:8px;height:8px;border-radius:50%;background:var(--ag-rose);flex-shrink:0;animation:ac-msg-pulse 2s ease-in-out infinite; }
    @keyframes ac-msg-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
    .athlete-card .ac-info { flex:1; min-width:0; }
    .athlete-card .ac-name {  font-weight:700; font-size:1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .athlete-card .ac-meta { display:flex; align-items:center; gap:6px; margin-top:3px; flex-wrap:wrap; }
    .athlete-card .ac-meta .ag-badge { font-size:0.68rem; padding:2px 8px; }
    .athlete-card .ac-stats { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
    .athlete-card .ac-stat { text-align:center; padding:8px 4px; background:var(--ag-bg-surface); border-radius:var(--ag-radius-sm); }
    .athlete-card .ac-stat-val {  font-weight:800; font-size:1.05rem; line-height:1; }
    .athlete-card .ac-stat-label { font-size:0.65rem; color:var(--ag-text-muted); margin-top:3px; }
    .athlete-card .ac-alert-strip {
      margin-top:12px; padding:8px 10px; border-radius:var(--ag-radius-sm);
      font-size:0.75rem; font-weight:600; display:flex; align-items:center; gap:6px;
    }
    .athlete-card .ac-alert-strip.danger { background:var(--ag-ov-rose); color:var(--ag-rose); border:1px solid rgba(251,113,133,0.15); }
    .athlete-card .ac-alert-strip.warning { background:var(--ag-ov-amber); color:var(--ag-amber); border:1px solid rgba(251,191,36,0.15); }
    .athlete-card .ac-next-session {
      margin-top:12px; padding:8px 10px;
      background:rgba(249,115,22,0.04); border:1px solid rgba(249,115,22,0.1);
      border-radius:var(--ag-radius-sm); font-size:0.75rem; color:var(--ag-text-secondary);
      display:flex; align-items:center; gap:6px;
    }
    .athlete-card .ac-next-session svg { width:14px; height:14px; flex-shrink:0; }
    .athlete-card .ac-next-session strong { color:var(--ag-primary); font-weight:700; }

    /* === ATHLETE DETAIL (expanded below cards) === */
    #athlete-detail { margin-bottom: 32px; }

    /* === PROGRAMS TO RENEW === */
    .renew-card {
      display:flex; align-items:center; gap:12px;
      padding:12px 14px; margin-bottom:6px;
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-md);
      transition:all 0.25s var(--ag-ease); animation:fadeInUp 0.4s var(--ag-ease) both;
      text-decoration:none; color:inherit; cursor:pointer;
    }
    .renew-card:hover { border-color:var(--ag-border-med); transform:translateX(3px); }
    .renew-badge { padding:4px 10px; border-radius:8px;  font-size:0.78rem; font-weight:800; flex-shrink:0; }
    .renew-badge.urgent { background:rgba(251,113,133,0.12); color:var(--ag-rose); }
    .renew-badge.soon { background:rgba(251,191,36,0.12); color:var(--ag-amber); }
    .renew-badge.ok { background:rgba(52,211,153,0.1); color:var(--ag-emerald); }
    .renew-badge.expired { background:rgba(251,113,133,0.2); color:var(--ag-rose); border:1px solid rgba(251,113,133,0.3); }

    /* === LINE CHART === */
    .line-chart-wrap { position:relative; height:160px; margin-top:12px; }
    .line-chart-wrap.pmc { height: 220px; }  /* PMC needs more vertical breathing room */
    .line-chart-canvas { width:100%; height:100%; }
    .line-chart-legend { display:flex; gap:16px; margin-top:8px; justify-content:center; }
    .line-chart-legend span { font-size:0.72rem; color:var(--ag-text-muted); display:flex; align-items:center; gap:5px; }
    .line-chart-legend span::before { content:''; display:inline-block; width:12px; height:3px; border-radius:2px; }
    .line-chart-legend .leg-int::before { background:#fbbf24; }
    .line-chart-legend .leg-ext::before { background:var(--ag-primary); }

    /* === ATHLETE METRICS (detail panel) === */
    .metrics-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px; }
    .metric-card {
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-lg); padding:18px 16px;
      position:relative; overflow:hidden; transition:all 0.3s var(--ag-ease); animation:fadeInUp 0.4s var(--ag-ease) both;
    }
    .metric-card:hover { border-color:var(--ag-border-med); transform:translateY(-2px); }
    .metric-card .mc-label { font-size:0.72rem; color:var(--ag-text-muted); font-weight:500; margin-bottom:6px; display:flex; align-items:center; gap:5px; }
    .metric-card .mc-label svg { width:12px; height:12px; opacity:0.5; }
    .metric-card .mc-val {  font-size:1.6rem; font-weight:800; line-height:1; margin-bottom:2px; }
    .metric-card .mc-sub { font-size:0.7rem; color:var(--ag-text-muted); }
    .metric-card .mc-detail { font-size:0.72rem; color:var(--ag-text-muted); margin-top:8px; padding-top:8px; border-top:1px solid var(--ag-border); }
    .metric-card .mc-bar { display:flex; gap:2px; margin-top:10px; height:4px; border-radius:2px; overflow:hidden; }
    .metric-card .mc-bar span { height:100%; border-radius:2px; transition:width 0.6s var(--ag-ease); }
    .metrics-empty { text-align:center; padding:40px 20px; color:var(--ag-text-muted); font-size:0.88rem; }

    /* === CHART SECTIONS === */
    .chart-card-title {  font-size:0.95rem; font-weight:700; margin-bottom:4px; display:flex; align-items:center; gap:8px; }
    .chart-card-title svg { width:16px; height:16px; color:var(--ag-text-muted); flex-shrink:0; }
    .chart-card-sub { font-size:0.78rem; color:var(--ag-text-muted); margin-bottom:20px; }

    /* === ACTIVITY SECTIONS === */
    .section-title {
       font-size:0.95rem; font-weight:700;
      margin-bottom:14px; display:flex; align-items:center; gap:8px; color:var(--ag-text-primary);
    }
    .section-title svg { width:16px; height:16px; color:var(--ag-text-muted); }
    .section-title .count { font-size:0.72rem; font-weight:600; background:rgba(249,115,22,0.1); color:var(--ag-primary); padding:2px 8px; border-radius:100px; margin-left:4px; }
    .activity-list { display:flex; flex-direction:column; gap:6px; }
    .activity-item {
      display:flex; align-items:center; gap:12px; padding:12px 14px;
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-md); transition:all 0.25s var(--ag-ease);
      animation:fadeInUp 0.4s var(--ag-ease) both; text-decoration:none; color:inherit; cursor:pointer;
    }
    .activity-item:hover { border-color:var(--ag-border-med); transform:translateX(3px); }
    .activity-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
    .activity-dot.unread { background:var(--ag-primary); position:relative; }
    .activity-dot.unread::after { content:''; position:absolute; inset:-3px; border-radius:50%; background:var(--ag-primary); opacity:.3; animation:pulse 2s ease-in-out infinite; }
    .activity-dot.read { background:var(--ag-bg-elevated); }
    .activity-content { flex:1; min-width:0; }
    .activity-content .name { font-weight:600; font-size:0.88rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .activity-content .detail { color:var(--ag-text-muted); font-size:0.78rem; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .activity-meta { text-align:right; flex-shrink:0; }
    .activity-meta .rpe {  font-weight:700; font-size:1.05rem; }

    /* Quota usage */
    .quota-bar { margin-top:16px; }
    .quota-bar-header { display:flex; justify-content:space-between; font-size:0.78rem; margin-bottom:6px; }
    .quota-bar-header .qb-label { color:var(--ag-text-muted); }
    .quota-bar-header .qb-val {  font-weight:700; }
    .quota-bar-track { height:6px; border-radius:3px; background:var(--ag-bg-elevated); overflow:hidden; }
    .quota-bar-fill { height:100%; border-radius:3px; transition:width 0.8s var(--ag-ease); }

    .empty-state { text-align:center; padding:28px 16px; color:var(--ag-text-muted); font-size:0.85rem; }
    .empty-state a { color:var(--ag-primary); text-decoration:none; font-weight:600; }

    .inbox-row { display:flex; align-items:center; gap:12px; padding:12px; border-radius:var(--ag-radius-md); cursor:pointer; transition:background 0.2s var(--ag-ease); border-bottom:1px solid var(--ag-border); }
    .inbox-row:last-child { border-bottom:none; }
    .inbox-row:hover { background:var(--ag-bg-hover); }
    .inbox-avatar { width:40px; height:40px; border-radius:50%; background:var(--ag-bg-elevated); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:0.85rem; color:var(--ag-primary); flex-shrink:0; position:relative; }
    .inbox-avatar:has(.agoge-avatar-component){width:auto;height:auto;background:none;overflow:visible;box-shadow:none;border-radius:0}
    .inbox-unread-dot { position:absolute; top:-2px; right:-2px; width:10px; height:10px; border-radius:50%; background:var(--ag-rose); border:2px solid var(--ag-bg-card); }
    .inbox-content { flex:1; min-width:0; }
    .inbox-top { display:flex; justify-content:space-between; align-items:center; }
    .inbox-name { font-size:0.88rem; }
    .inbox-time { font-size:0.72rem; color:var(--ag-text-muted); flex-shrink:0; }
    .inbox-preview { font-size:0.82rem; color:var(--ag-text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }

    /* BUG-G fix (2026-05-21) — 300px sous-évaluait la hauteur des éléments au-dessus
       (app-header 64 + main-padding 32 + fiche-back 50 + fiche-header 180-280 + fiche-tabs 54 = 380-480px).
       420px couvre les cas typiques (header refondu sprint fiche 2 + actions ticket). Si le header
       reprend en hauteur dans un sprint futur, ajuster ici. Audit : audits/reports/2026-05-21-0145-BUG-G-AUDIT-COMPLEMENTAIRE.md */
    .athlete-messages-container { display:flex; flex-direction:column; height:calc(100vh - 420px); min-height:400px; }
    .athlete-messages-list { flex:1; overflow-y:auto; padding:8px 16px; }
    .athlete-messages-list::-webkit-scrollbar { width:3px; } .athlete-messages-list::-webkit-scrollbar-thumb { background:var(--ag-bg-elevated); border-radius:2px; }
    /* BUG-G fix (2026-05-21) · flex-shrink:0 = défense en profondeur : empêche la barre input d'être squeezée si le contenu au-dessus grandit. */
    .athlete-messages-input { display:flex; gap:8px; padding:12px 16px; border-top:1px solid var(--ag-border); align-items:flex-end; flex-shrink:0; }
    .athlete-messages-input textarea { flex:1; padding:10px 14px; background:var(--ag-bg-card); border:1px solid var(--ag-border-med); border-radius:var(--ag-radius-lg); color:var(--ag-text-primary); font-size:0.88rem; font-family:inherit; outline:none; resize:none; max-height:120px; min-height:42px; line-height:1.4; transition:border 0.2s; }
    .athlete-messages-input textarea:focus { border-color:var(--ag-primary); }
    .athlete-messages-input button { width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,var(--ag-primary),#ea580c); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:transform 0.15s,opacity 0.15s; }
    .athlete-messages-input button:hover { transform:scale(1.05); }
    .athlete-messages-input button:active { transform:scale(0.93); }
    .athlete-messages-input button:disabled { opacity:0.5; cursor:default; transform:none; }

    @media (max-width:960px) { .metrics-grid { grid-template-columns:repeat(2,1fr); } .athletes-grid { grid-template-columns:1fr 1fr; } }
    @media (max-width:600px) { .athletes-grid { grid-template-columns:1fr; } .metrics-grid { grid-template-columns:1fr; } }

    /* === FICHE VIEW === */
    .fiche-back {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 7px 16px; border-radius: var(--ag-radius-sm);
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      color: var(--ag-text-secondary); font-size: 0.82rem; font-weight: 600;
      cursor: pointer; transition: all 0.25s var(--ag-ease); margin-bottom: 20px;
    }
    .fiche-back:hover { border-color: var(--ag-border-med); color: var(--ag-text-primary); transform: translateX(-3px); }
    .fiche-back svg { width: 16px; height: 16px; }

    .fiche-header {
      display: flex; align-items: center; gap: 16px;
      margin-bottom: 24px; flex-wrap: wrap;
    }
    .fiche-avatar {
      width: 56px; height: 56px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
       font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
    }
    .fiche-avatar:has(.agoge-avatar-component){width:auto;height:auto;background:none;overflow:visible;box-shadow:none;border-radius:0}
    .fiche-info { flex: 1; min-width: 0; }
    .fiche-name {  font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
    .fiche-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
    .invite-row{display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}
    .invite-badge{display:inline-flex;align-items:center;gap:4px;font-size:.75rem;font-weight:600;padding:4px 10px;border-radius:var(--ag-radius-sm)}
    .invite-badge.connected{background:rgba(52,211,153,0.1);color:var(--ag-emerald)}
    .invite-badge.pending{background:rgba(251,191,36,0.1);color:var(--ag-amber)}
    .invite-badge.none{background:rgba(244,63,94,0.1);color:var(--ag-rose)}

    .fiche-tabs {
      display: flex; gap: 4px; margin-bottom: 24px;
      border-bottom: 1px solid var(--ag-border); overflow-x: auto;
    }
    .fiche-tab {
      display: flex; align-items: center; gap: 6px;
      padding: 10px 18px; color: var(--ag-text-muted);
      font-size: 0.85rem; font-weight: 600; cursor: pointer;
      transition: all 0.25s var(--ag-ease); white-space: nowrap;
      border-bottom: 2px solid transparent; margin-bottom: -1px;
    }
    .fiche-tab:hover { color: var(--ag-text-primary); background: rgba(249,115,22,0.04); }
    .fiche-tab.active { color: var(--ag-primary); border-bottom-color: var(--ag-primary); }
    .fiche-tab svg { width: 16px; height: 16px; }
    .fiche-tab .tab-count {
      font-size: 0.65rem; padding: 1px 7px; border-radius: 100px;
      background: rgba(249,115,22,0.1); color: var(--ag-primary); font-weight: 700;
    }
    .fiche-content { animation: fadeInUp 0.3s var(--ag-ease); }

    @media (max-width:600px) {
      .fiche-header { gap: 12px; }
      .fiche-avatar { width: 44px; height: 44px; font-size: 0.9rem; }
      .fiche-avatar:has(.agoge-avatar-component){width:auto;height:auto}
      .fiche-name { font-size: 1.15rem; }
      .fiche-tab { padding: 8px 12px; font-size: 0.78rem; }
    }

    /* === PROGRAMME TAB === */
    .prog-pills { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px; }
    .prog-pill {
      display:inline-flex; align-items:center; gap:8px;
      padding:8px 16px; border-radius:var(--ag-radius-full);
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      font-size:0.82rem; font-weight:600; cursor:pointer;
      transition:all 0.25s var(--ag-ease);
    }
    .prog-pill:hover { border-color:var(--ag-border-med); }
    .prog-pill.active { border-color:var(--ag-primary); background:rgba(249,115,22,0.06); color:var(--ag-primary); }
    .prog-pill .pp-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
    .prog-pill .pp-status { font-size:0.68rem; color:var(--ag-text-muted); font-weight:500; }
    .prog-pill.active .pp-status { color:var(--ag-primary); opacity:0.7; }

    .prog-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
    .prog-header-info { flex:1; min-width:0; }
    .prog-title {  font-size:1.1rem; font-weight:700; }
    .prog-meta { font-size:0.8rem; color:var(--ag-text-muted); margin-top:4px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
    .prog-actions { display:flex; gap:8px; flex-shrink:0; }

    .week-section { margin-bottom:24px; animation:fadeInUp 0.3s var(--ag-ease) both; }
    .week-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid var(--ag-border); }
    .week-head h3 {  font-size:0.95rem; font-weight:700; display:flex; align-items:center; gap:8px; }
    .week-head h3 svg { width:16px; height:16px; color:var(--ag-text-muted); }
    .week-head .ws { font-size:0.78rem; color:var(--ag-text-muted); display:flex; gap:12px; }

    .sess-card {
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-md); padding:14px 16px;
      margin-bottom:8px; position:relative; cursor:default;
      transition:all 0.25s var(--ag-ease);
      animation:fadeInUp 0.3s var(--ag-ease) both;
    }
    .sess-card:hover { border-color:var(--ag-border-med); }
    .sess-card.rest { opacity:0.5; }
    .sess-card .sess-top { display:flex; align-items:center; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
    .sess-card .sess-day { font-size:0.78rem; color:var(--ag-text-muted); font-weight:600; }
    .sess-card .sess-dur { font-size:0.75rem; color:var(--ag-text-muted); display:inline-flex; align-items:center; gap:4px; margin-left:auto; }
    .sess-card .sess-dur svg { width:12px; height:12px; }
    .sess-card .sess-label { font-weight:700; font-size:0.92rem; margin-bottom:4px; }
    .sess-card .sess-tgt { display:flex; gap:10px; font-size:0.75rem; color:var(--ag-text-muted); margin-bottom:4px; }
    .sess-card .sess-tgt span { display:inline-flex; align-items:center; gap:3px; }
    .sess-card .sess-tgt svg { width:11px; height:11px; }
    .sess-card .sess-struct { font-size:0.78rem; color:var(--ag-text-muted); line-height:1.5; margin-bottom:4px; }
    .sess-card .sess-note { font-size:0.78rem; color:var(--ag-amber); font-style:italic; display:flex; align-items:flex-start; gap:4px; }
    .sess-card .sess-note svg { width:12px; height:12px; flex-shrink:0; margin-top:2px; }
    .sess-card .sess-edit-actions {
      position:absolute; top:8px; right:8px;
      display:none; gap:4px;
    }
    .sess-card:hover .sess-edit-actions { display:flex; }
    .sess-card .sess-edit-actions button {
      width:28px; height:28px; border-radius:6px;
      border:1px solid var(--ag-border); background:var(--ag-bg-surface);
      color:var(--ag-text-muted); cursor:pointer; display:flex;
      align-items:center; justify-content:center; transition:all 0.2s;
    }
    .sess-card .sess-edit-actions button:hover { color:var(--ag-text-primary); border-color:var(--ag-border-med); }
    .sess-card .sess-edit-actions button.del:hover { color:var(--ag-rose); border-color:rgba(251,113,133,0.3); }

    .rationale-box { background:var(--ag-bg-card); border:1px solid var(--ag-border); border-radius:var(--ag-radius-lg); padding:18px 20px; margin-bottom:20px; }
    .rationale-box h3 { font-size:0.85rem; color:var(--ag-amber); margin-bottom:8px; display:flex; align-items:center; gap:8px; }
    .rationale-box .rtxt { color:var(--ag-text-secondary); font-size:0.85rem; line-height:1.7; max-height:160px; overflow-y:auto; }
    .rationale-box.expanded .rtxt { max-height:none; }
    .rtoggle { color:var(--ag-primary); font-size:0.8rem; cursor:pointer; margin-top:8px; font-weight:600; }

    .prog-empty { text-align:center; padding:40px 20px; color:var(--ag-text-muted); font-size:0.88rem; }
    .prog-loading { display:flex; align-items:center; gap:10px; padding:32px; color:var(--ag-text-muted); font-size:0.85rem; justify-content:center; }

    .sport-selector { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-bottom:4px; }
    .sport-opt {
      display:flex; flex-direction:column; align-items:center; gap:4px;
      padding:8px 4px; border-radius:var(--ag-radius-sm);
      border:1px solid var(--ag-border); background:var(--ag-bg-card);
      cursor:pointer; transition:all 0.2s; font-size:0.7rem;
      color:var(--ag-text-muted); font-weight:500;
    }
    .sport-opt:hover { border-color:var(--ag-border-med); }
    .sport-opt.active { font-weight:700; }
    .sport-opt.ag-badge-blue.active { border-color:var(--ag-blue); background:rgba(59,130,246,0.15); color:var(--ag-blue); }
    .sport-opt.ag-badge-amber.active { border-color:var(--ag-amber); background:rgba(251,191,36,0.15); color:var(--ag-amber); }
    .sport-opt.ag-badge-green.active { border-color:var(--ag-emerald); background:rgba(52,211,153,0.15); color:var(--ag-emerald); }
    .sport-opt.ag-badge-rose.active { border-color:var(--ag-rose); background:rgba(251,113,133,0.15); color:var(--ag-rose); }
    .sport-opt.ag-badge-cyan.active { border-color:var(--ag-cyan); background:rgba(34,211,238,0.15); color:var(--ag-cyan); }
    .sport-opt.ag-badge-violet.active { border-color:var(--ag-violet); background:rgba(167,139,250,0.15); color:var(--ag-violet); }
    .sport-opt.ag-badge-gray.active { border-color:var(--ag-text-muted); background:rgba(148,163,184,0.12); color:var(--ag-text-muted); }

    @media (max-width:600px) {
      .prog-header { flex-direction:column; align-items:flex-start; }
      .prog-actions { width:100%; }
      .sport-selector { grid-template-columns:repeat(3,1fr); }
    }

    /* === BLOCK BUILDER (ported from planning.html) === */
    .bb-wrap{border:1px solid var(--ag-border);border-radius:var(--ag-radius-md);overflow:hidden}
    .bb-timeline{display:flex;align-items:flex-end;height:48px;background:var(--ag-ov1);overflow:hidden;border-bottom:1px solid var(--ag-border);padding:4px 2px 2px;border-radius:8px 8px 0 0;gap:1px}
    .bb-timeline .bt-seg{display:flex;align-items:center;justify-content:center;font-size:.55rem;font-weight:700;color:white;min-width:8px;transition:all .2s}
    .bb-blocks{max-height:260px;overflow-y:auto}
    .bb-block{display:flex;align-items:stretch;border-bottom:1px solid var(--ag-border);transition:background .2s}
    .bb-block:hover{background:var(--ag-bg-elevated)}
    .bb-block:last-child{border-bottom:none}
    .bb-bar{width:4px;flex-shrink:0}
    .bb-content{flex:1;padding:8px 10px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
    .bb-content select,.bb-content input{font-size:.78rem;padding:5px 8px;background:var(--ag-bg-elevated);border:1px solid var(--ag-border);border-radius:6px;color:var(--ag-text-primary);outline:none;transition:border-color .2s}
    .bb-content select:focus,.bb-content input:focus{border-color:var(--ag-primary);box-shadow:0 0 0 2px rgba(96,165,250,.15)}
    .bb-content select{cursor:pointer;padding-right:20px;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px}
    .bb-content select option{background:var(--ag-bg-card);color:var(--ag-text-primary);padding:4px 8px}
    .bb-content input[type=number]{width:56px;text-align:center;font-weight:600;}
    .bb-content .bb-lbl{font-size:.7rem;color:var(--ag-text-muted);font-weight:600}
    .bb-content .bb-x-sep{font-size:.7rem;color:var(--ag-text-muted);font-weight:700}
    .bb-actions{display:flex;flex-direction:column;justify-content:center;gap:3px;padding:4px 8px}
    .bb-actions button{width:22px;height:22px;border-radius:4px;border:1px solid transparent;background:transparent;color:var(--ag-text-muted);cursor:pointer;font-size:.7rem;display:flex;align-items:center;justify-content:center;transition:all .2s}
    .bb-actions button:hover{background:var(--ag-bg-card);color:var(--ag-text-primary);border-color:var(--ag-border)}
    .bb-actions .bb-del:hover{color:#f43f5e;border-color:rgba(244,63,94,.3);background:rgba(244,63,94,.06)}
    .bb-add-bar{display:flex;gap:6px;padding:8px 10px;background:var(--ag-bg-base);flex-wrap:wrap}
    .bb-add-btn{padding:5px 10px;border-radius:6px;border:1px dashed var(--ag-border);background:transparent;color:var(--ag-text-muted);font-size:.72rem;cursor:pointer;transition:all .2s;font-weight:600}
    .bb-add-btn:hover{border-color:var(--ag-primary);color:var(--ag-primary);background:rgba(96,165,250,.05);border-style:solid}
    .bb-total{padding:6px 10px;background:var(--ag-bg-base);border-top:1px solid var(--ag-border);font-size:.75rem;color:var(--ag-text-muted);text-align:right}
    .bb-total strong{color:var(--ag-text-primary);}
    .bb-fallback{padding:8px}
    .sess-card .bb-timeline{height:32px;border-bottom:none;border-radius:6px;margin-top:6px;padding:3px 2px 2px}
    .sess-card .bb-timeline .bt-seg{font-size:.5rem}

    /* === INLINE SESSION ACCORDION === */
    .sess-card.expanded{border-color:var(--ag-primary);box-shadow:var(--ag-shadow-glow)}
    .sess-card.expanded::before{opacity:1!important}
    .sess-expand{overflow:hidden;max-height:0;opacity:0;transition:max-height .35s var(--ag-ease),opacity .25s var(--ag-ease),margin .25s var(--ag-ease),padding .25s var(--ag-ease);padding:0 0;margin-top:0}
    .sess-card.expanded .sess-expand{max-height:800px;opacity:1;margin-top:12px;padding-top:12px;border-top:1px solid var(--ag-border)}
    .sess-expand .ag-form-group{margin-bottom:10px}
    .sess-expand .ag-form-group label{display:block;font-size:.75rem;font-weight:600;color:var(--ag-text-muted);margin-bottom:4px;text-transform:uppercase;letter-spacing:.3px}
    .sess-expand .ag-form-row{display:flex;gap:10px}
    .sess-expand .ag-form-row .ag-form-group{flex:1}
    .sess-expand .sport-selector{display:flex;flex-wrap:wrap;gap:6px}
    .sess-expand .sport-opt{padding:4px 14px;font-size:.75rem;flex-direction:row;gap:0;border-radius:var(--ag-radius-full);font-weight:600;letter-spacing:.3px}
    .sess-expand .sport-opt .sp-dot{display:none}
    .sess-expand .sess-save-bar{display:flex;gap:8px;justify-content:flex-end;margin-top:12px;padding-top:10px;border-top:1px solid var(--ag-border)}
    .sess-readonly{padding-top:12px;margin-top:10px;border-top:1px solid var(--ag-border)}
    .sess-readonly .sr-section{margin-bottom:10px}
    .sess-readonly .sr-label{font-size:.7rem;color:var(--ag-text-muted);text-transform:uppercase;letter-spacing:.3px;margin-bottom:4px;font-weight:600}
    .sess-readonly .sr-val{font-size:.85rem;color:var(--ag-text-secondary);line-height:1.5}
    .gen-spinner{width:40px;height:40px;margin:16px auto;border:3px solid var(--ag-border-med);border-top-color:var(--ag-primary);border-radius:50%;animation:spin 1s linear infinite}
    @keyframes spin{to{transform:rotate(360deg)}}

    /* === WEEK CALENDAR VIEW === */
    .week-cal{margin-bottom:20px;animation:fadeInUp 0.3s var(--ag-ease)}
    .week-cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:8px}
    .week-cal-nav .wcn-title{font-size:0.88rem;font-weight:700;color:var(--ag-text-primary)}
    .week-cal-nav .wcn-summary{font-size:.75rem;color:var(--ag-text-muted);font-weight:600}
    .week-cal-nav button{width:30px;height:30px;border-radius:var(--ag-radius-sm);border:1px solid var(--ag-border);background:var(--ag-bg-card);color:var(--ag-text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;font-size:.8rem}
    .week-cal-nav button:hover{border-color:var(--ag-border-med);color:var(--ag-text-primary)}
    .week-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
    .week-cal-day{background:var(--ag-bg-card);border:1px solid var(--ag-border);border-radius:var(--ag-radius-md);padding:8px 6px;min-height:100px;transition:all .2s;display:flex;flex-direction:column;position:relative}
    .week-cal-day.today{border-color:var(--ag-primary);background:rgba(249,115,22,0.04)}
    .week-cal-day .wcd-header{font-size:.7rem;font-weight:700;color:var(--ag-text-muted);margin-bottom:4px;text-align:center}
    .week-cal-day .wcd-date{font-size:.65rem;color:var(--ag-text-muted);text-align:center;margin-bottom:6px}
    .week-cal-day.today .wcd-header{color:var(--ag-primary)}
    .week-cal-day.today .wcd-date{color:var(--ag-primary)}
    .wcd-chip{display:flex;align-items:center;gap:3px;padding:3px 6px;border-radius:4px;font-size:.62rem;font-weight:600;cursor:pointer;margin-bottom:3px;transition:all .2s;border:1px solid transparent;background:var(--ag-bg-base);color:var(--ag-text-secondary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
    .wcd-chip:hover{border-color:var(--ag-primary);background:rgba(249,115,22,0.06)}
    .wcd-chip .wcd-sport{width:6px;height:6px;border-radius:50%;flex-shrink:0}
    .wcd-chip .wcd-dur{margin-left:auto;font-size:.58rem;color:var(--ag-text-muted);font-weight:400}
    .wcd-chip.rest-chip{opacity:.4}
    .wcd-total{font-size:.6rem;color:var(--ag-text-muted);text-align:center;margin-top:auto;padding-top:4px;border-top:1px solid var(--ag-border);font-weight:600}
    .wcd-add{width:100%;margin-top:4px;padding:2px 0;border:1px dashed var(--ag-border-med);border-radius:var(--ag-radius-sm);background:transparent;color:var(--ag-text-muted);font-size:.75rem;font-weight:700;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}
    .wcd-add:hover{border-color:var(--ag-primary);color:var(--ag-primary);background:rgba(249,115,22,0.06)}
    @media (max-width:700px){
      .week-cal-grid{display:flex;overflow-x:auto;gap:6px;padding-bottom:6px;-webkit-overflow-scrolling:touch}
      .week-cal-day{min-width:110px;flex-shrink:0}
    }

    /* === PREVIOUS PROGRAM REFERENCE === */
    .prev-prog-ref{margin-top:16px;border:1px solid var(--ag-border);border-radius:var(--ag-radius-md);overflow:hidden}
    .prev-prog-header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;cursor:pointer;background:var(--ag-bg-card);font-size:.82rem;font-weight:600;color:var(--ag-text-secondary);transition:background .2s}
    .prev-prog-header:hover{background:var(--ag-bg-base)}
    .prev-prog-header span:first-child{display:flex;align-items:center;gap:6px}
    .prev-prog-toggle{font-size:.75rem;color:var(--ag-text-muted)}
    .prev-prog-body{padding:12px 14px;background:var(--ag-bg-base);border-top:1px solid var(--ag-border)}
    .prev-sess-chip{display:flex;align-items:center;gap:6px;padding:6px 0;font-size:.82rem;color:var(--ag-text-secondary);border-bottom:1px solid var(--ag-border)}
    .prev-sess-chip:last-child{border-bottom:none}

    /* === GENERATE AI BUTTON === */
    .prog-pills-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:20px}
    .prog-pills-row .prog-pills{margin-bottom:0;flex:1;min-width:0}
    .btn-gen-ia{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:var(--ag-radius-full);background:linear-gradient(135deg,rgba(249,115,22,0.1),rgba(251,191,36,0.1));border:1px solid rgba(249,115,22,0.2);color:var(--ag-primary);font-size:.82rem;font-weight:700;cursor:pointer;transition:all .25s var(--ag-ease);flex-shrink:0;white-space:nowrap}
    .btn-gen-ia:hover{background:linear-gradient(135deg,rgba(249,115,22,0.18),rgba(251,191,36,0.18));border-color:rgba(249,115,22,0.35);transform:translateY(-1px)}
    .btn-gen-ia svg{width:14px;height:14px}

    /* === GENERATE MODE SELECTOR === */
    .gen-mode-row{display:flex;gap:6px;margin-bottom:16px}
    .gen-mode-btn{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;border-radius:var(--ag-radius-md);border:1px solid var(--ag-border-med);background:var(--ag-bg-card);color:var(--ag-text-muted);font-size:.82rem;font-weight:600;cursor:pointer;transition:all .2s}
    .gen-mode-btn:hover{border-color:var(--ag-primary);color:var(--ag-text-primary)}
    .gen-mode-btn.active{border-color:var(--ag-primary);background:var(--ag-ov-orange);color:var(--ag-primary)}

    /* === TEMPLATE PICKER === */
    .tpk-filters{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
    .tpk-filters .sp-pill{padding:5px 12px;font-size:.72rem}
    .tpk-search{width:100%;padding:8px 12px;background:var(--ag-bg-card);border:1px solid var(--ag-border);border-radius:var(--ag-radius-sm);color:var(--ag-text-primary);font-size:.82rem;outline:none;margin-bottom:12px}
    .tpk-search:focus{border-color:var(--ag-primary)}
    .tpk-list{max-height:380px;overflow-y:auto;display:flex;flex-direction:column;gap:6px}
    .tpk-item{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--ag-bg-card);border:1px solid var(--ag-border);border-radius:var(--ag-radius-md);cursor:pointer;transition:all .2s}
    .tpk-item:hover{border-color:var(--ag-primary);background:rgba(249,115,22,0.04)}
    .tpk-item-info{flex:1;min-width:0}
    .tpk-item-name{font-weight:700;font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .tpk-item-meta{font-size:.72rem;color:var(--ag-text-muted);margin-top:2px;display:flex;gap:8px;align-items:center}
    .tpk-item-tl{width:80px;height:10px;display:flex;gap:1px;border-radius:3px;overflow:hidden;flex-shrink:0}

    /* === FEEDBACKS TAB === */
    .fb-card {
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-lg); padding:18px 20px;
      margin-bottom:12px; position:relative;
      transition:all 0.25s var(--ag-ease);
      animation:fadeInUp 0.3s var(--ag-ease) both;
    }
    .fb-card.unread { border-left:3px solid var(--ag-primary); }
    .fb-header { display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
    .fb-date { font-size:0.82rem; font-weight:600; color:var(--ag-text-secondary); }
    .fb-rpe {
      display:inline-flex; align-items:center; justify-content:center;
      min-width:36px; height:24px; padding:0 8px;
      border-radius:var(--ag-radius-full); 
      font-size:0.78rem; font-weight:800;
    }
    .fb-unread-badge {
      font-size:0.65rem; padding:2px 8px; border-radius:var(--ag-radius-full);
      background:rgba(249,115,22,0.1); color:var(--ag-primary); font-weight:700;
      margin-left:auto;
    }
    .fb-alert {
      display:flex; align-items:center; gap:8px;
      padding:8px 12px; margin-bottom:10px;
      border-radius:var(--ag-radius-sm);
      font-size:0.8rem; font-weight:600;
    }
    .fb-alert.pain { background:var(--ag-ov-rose); color:var(--ag-rose); border:1px solid rgba(251,113,133,0.15); }
    .fb-alert.fatigue-alert { background:var(--ag-ov-amber); color:var(--ag-amber); border:1px solid rgba(251,191,36,0.15); }
    .fb-stats { display:flex; gap:14px; flex-wrap:wrap; padding:10px 0; margin-bottom:8px; border-bottom:1px solid var(--ag-border); }
    .fb-stat { display:flex; flex-direction:column; align-items:center; min-width:52px; }
    .fb-stat-val {  font-weight:700; font-size:0.92rem; line-height:1; }
    .fb-stat-label { font-size:0.65rem; color:var(--ag-text-muted); margin-top:2px; }
    .fb-comment {
      font-size:0.88rem; color:var(--ag-text-secondary);
      line-height:1.6; font-style:italic; margin-bottom:10px;
      padding:10px 14px; background:var(--ag-bg-surface);
      border-radius:var(--ag-radius-sm); border-left:3px solid var(--ag-border-med);
    }
    .fb-reply-box {
      padding:10px 14px; margin-bottom:8px;
      background:rgba(249,115,22,0.04);
      border:1px solid rgba(249,115,22,0.1);
      border-radius:var(--ag-radius-sm);
    }
    .fb-reply-header { font-size:0.75rem; font-weight:700; color:var(--ag-primary); margin-bottom:4px; display:flex; align-items:center; gap:6px; }
    .fb-reply-header svg { width:12px; height:12px; }
    .fb-reply-text { font-size:0.85rem; color:var(--ag-text-secondary); line-height:1.5; }
    .fb-reply-date { font-size:0.7rem; color:var(--ag-text-muted); margin-top:4px; }
    .fb-reply-form textarea { margin-bottom:8px; }
    .fb-actions { display:flex; gap:8px; align-items:center; margin-top:8px; }

    /* === BILANS TAB === */
    .bi-week {
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-lg); padding:22px 24px;
      margin-bottom:14px; position:relative; overflow:hidden;
      transition:all 0.3s var(--ag-ease);
      animation:fadeInUp 0.35s var(--ag-ease) both;
    }
    .bi-week:hover { border-color:var(--ag-border-med); }
    .bi-week-header {
      display:flex; justify-content:space-between; align-items:center;
      margin-bottom:14px; flex-wrap:wrap; gap:10px;
    }
    .bi-week-header h3 {
       font-size:1rem; font-weight:700;
      display:flex; align-items:center; gap:8px; margin:0;
    }
    .bi-week-header h3 svg { width:16px; height:16px; opacity:0.5; }
    .bi-week-stats {
      display:flex; gap:14px; font-size:0.78rem; color:var(--ag-text-muted);
      align-items:center; flex-wrap:wrap;
    }
    .bi-week-stats span { display:inline-flex; align-items:center; gap:4px; }
    .bi-week-stats svg { width:13px; height:13px; opacity:0.4; }
    .bi-status {
      font-size:0.75rem; padding:3px 10px; border-radius:var(--ag-radius-full);
      font-weight:600; display:inline-flex; align-items:center; gap:4px;
      margin-bottom:12px;
    }
    .bi-status.pub { background:rgba(52,211,153,0.12); color:var(--ag-emerald); }
    .bi-status.draft { background:rgba(251,191,36,0.12); color:var(--ag-amber); }
    .bi-text {
      background:var(--ag-bg-base); border-radius:var(--ag-radius-md);
      padding:16px; margin-bottom:14px;
    }
    .bi-text textarea {
      width:100%; min-height:140px; background:transparent; border:none;
      color:var(--ag-text-secondary); font-size:0.88rem; font-family:inherit;
      line-height:1.7; resize:vertical; outline:none; box-sizing:border-box;
    }
    .bi-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
    .bi-alerts {
      display:flex; flex-direction:column; gap:6px;
      margin-bottom:12px;
    }
    .bi-alert {
      display:flex; align-items:center; gap:8px;
      padding:8px 12px; border-radius:var(--ag-radius-sm);
      font-size:0.8rem; font-weight:500;
    }
    .bi-alert.danger { background:var(--ag-ov-rose); color:var(--ag-rose); border:1px solid rgba(251,113,133,0.15); }
    .bi-alert.warning { background:var(--ag-ov-amber); color:var(--ag-amber); border:1px solid rgba(251,191,36,0.15); }
    .bi-alert.info { background:var(--ag-ov-blue); color:#60a5fa; border:1px solid rgba(96,165,250,0.15); }
    .bi-alert svg { width:14px; height:14px; flex-shrink:0; }
    .bi-gen-indicator {
      display:flex; align-items:center; gap:10px; padding:14px;
      font-size:0.88rem; color:var(--ag-primary); font-weight:600;
    }
    .bi-gen-indicator .ag-spinner { width:18px; height:18px; }
    .bi-empty-week {
      text-align:center; padding:24px;
    }
    .bi-empty-week p {
      color:var(--ag-text-muted); margin-bottom:14px; font-size:0.88rem;
    }
    @media (max-width:600px) {
      .bi-week { padding:16px; }
      .bi-week-header { flex-direction:column; align-items:flex-start; }
      .bi-actions { flex-direction:column; }
      .bi-actions .ag-btn { width:100%; justify-content:center; }
    }

    /* === PROFIL TAB === */
    .prof-section {
      background:var(--ag-bg-card); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-lg); padding:20px 24px;
      margin-bottom:14px;
      animation:fadeInUp 0.3s var(--ag-ease) both;
    }
    .prof-section-title {
       font-size:0.88rem; font-weight:700;
      color:var(--ag-text-primary); margin-bottom:14px;
      display:flex; align-items:center; gap:8px;
      padding-bottom:10px; border-bottom:1px solid var(--ag-border);
    }
    .prof-section-title svg { width:16px; height:16px; opacity:0.5; }
    .prof-grid {
      display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
      gap:12px;
    }
    .prof-field { display:flex; flex-direction:column; gap:2px; }
    .prof-field-label {
      font-size:0.72rem; font-weight:600; color:var(--ag-text-muted);
      text-transform:uppercase; letter-spacing:0.04em;
    }
    .prof-field-value { font-size:0.9rem; font-weight:500; color:var(--ag-text-secondary); }
    .prof-field-value.empty { color:var(--ag-text-muted); font-style:italic; font-weight:400; }
    .prof-notes-edit textarea {
      width:100%; min-height:100px; background:var(--ag-bg-base); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-md); padding:14px 16px;
      color:var(--ag-text-secondary); font-size:0.88rem; font-family:inherit;
      line-height:1.6; resize:vertical; outline:none; box-sizing:border-box;
      transition:border-color 0.2s;
    }
    .prof-notes-edit textarea:focus { border-color:var(--ag-primary); }
    .prof-objective { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
    .prof-obj-countdown {
      display:flex; flex-direction:column; align-items:center; justify-content:center;
      min-width:72px; height:72px; border-radius:var(--ag-radius-lg);
       font-weight:800; font-size:1.3rem; line-height:1;
    }
    .prof-obj-countdown small { font-size:0.65rem; font-weight:500; margin-top:2px; }
    .prof-sports-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
    .prof-edit-bar { display:flex; justify-content:flex-end; gap:8px; margin-bottom:14px; }
    /* Edit modal sport grid */
    .eap-sport-grid { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
    .eap-sport-opt {
      display:inline-flex; align-items:center; gap:4px;
      padding:4px 14px; border-radius:var(--ag-radius-full);
      border:1px solid var(--ag-border); background:var(--ag-bg-card);
      cursor:pointer; transition:all 0.2s; font-size:0.75rem;
      color:var(--ag-text-muted); font-weight:600; letter-spacing:0.3px;
    }
    .eap-sport-opt:hover { border-color:var(--ag-border-med); }
    .eap-sport-opt.active.ag-badge-blue { border-color:var(--ag-blue); background:rgba(59,130,246,0.15); color:var(--ag-blue); }
    .eap-sport-opt.active.ag-badge-amber { border-color:var(--ag-amber); background:rgba(251,191,36,0.15); color:var(--ag-amber); }
    .eap-sport-opt.active.ag-badge-green { border-color:var(--ag-emerald); background:rgba(52,211,153,0.15); color:var(--ag-emerald); }
    .eap-sport-opt.active.ag-badge-rose { border-color:var(--ag-rose); background:rgba(251,113,133,0.15); color:var(--ag-rose); }
    .eap-sport-opt.active.ag-badge-cyan { border-color:var(--ag-cyan); background:rgba(34,211,238,0.15); color:var(--ag-cyan); }
    .eap-sport-opt.active.ag-badge-violet { border-color:var(--ag-violet); background:rgba(167,139,250,0.15); color:var(--ag-violet); }
    /* Toggle switch */
    .eap-toggle-row { display:flex; align-items:center; gap:10px; }
    .eap-toggle {
      width:40px; height:22px; border-radius:11px;
      background:var(--ag-bg-elevated); border:1px solid var(--ag-border);
      cursor:pointer; position:relative; transition:all 0.2s;
    }
    .eap-toggle::after {
      content:''; position:absolute; top:2px; left:2px;
      width:16px; height:16px; border-radius:50%;
      background:var(--ag-text-muted); transition:all 0.2s;
    }
    .eap-toggle.on { background:rgba(249,115,22,0.15); border-color:var(--ag-primary); }
    .eap-toggle.on::after { left:20px; background:var(--ag-primary); }
    .eap-toggle-label { font-size:0.82rem; color:var(--ag-text-secondary); }
    /* Conditional sections */
    .eap-hint {
      font-size:0.78rem; font-weight:600; color:var(--ag-primary);
      margin:14px 0 8px; padding-top:10px;
      border-top:1px solid var(--ag-border);
    }
    /* Jour pills */
    .eap-jour-grid { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
    .eap-jour-pill {
      padding:6px 12px; border-radius:var(--ag-radius-full);
      border:1px solid var(--ag-border); background:var(--ag-bg-card);
      cursor:pointer; transition:all 0.2s; font-size:0.78rem;
      color:var(--ag-text-muted); font-weight:600; user-select:none;
    }
    .eap-jour-pill:hover { border-color:var(--ag-border-med); }
    .eap-jour-pill.active { border-color:var(--ag-primary); background:rgba(249,115,22,0.12); color:var(--ag-primary); }
    /* Vélo cards */
    .eap-velo-card {
      background:var(--ag-bg-base); border:1px solid var(--ag-border);
      border-radius:var(--ag-radius-md); padding:12px 14px; margin-bottom:8px;
    }
    .eap-velo-header {
      display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;
    }
    .eap-velo-num {
      font-size:0.75rem; font-weight:700; color:var(--ag-text-muted);
      text-transform:uppercase; letter-spacing:0.5px;
    }
    .eap-velo-del {
      width:24px; height:24px; border-radius:6px; border:1px solid var(--ag-border);
      background:transparent; color:var(--ag-text-muted); cursor:pointer;
      font-size:1rem; display:flex; align-items:center; justify-content:center; transition:all 0.2s;
    }
    .eap-velo-del:hover { border-color:var(--ag-rose); color:var(--ag-rose); background:rgba(244,63,94,0.08); }
    @media (max-width:600px) {
      .prof-section { padding:16px; }
      .prof-grid { grid-template-columns:1fr 1fr; }
      .prof-objective { flex-direction:column; align-items:flex-start; }
      .eap-sport-grid { flex-wrap:wrap; }
    }

    /* === HISTORIQUE TAB === */
    .hist-timeline{position:relative;padding-left:20px;margin-bottom:20px}
    .hist-timeline::before{content:'';position:absolute;left:6px;top:0;bottom:0;width:2px;background:var(--ag-border)}
    .hist-prog{position:relative;margin-bottom:14px;animation:fadeInUp .3s var(--ag-ease) both}
    .hist-prog::before{content:'';position:absolute;left:-20px;top:18px;width:10px;height:10px;border-radius:50%;border:2px solid var(--ag-border);background:var(--ag-bg-card);z-index:1;transition:all .2s}
    .hist-prog.active::before{border-color:var(--ag-emerald);background:var(--ag-emerald);box-shadow:0 0 8px rgba(52,211,153,.4)}
    .hist-prog.completed::before{border-color:var(--ag-blue);background:var(--ag-blue)}
    .hist-prog.archived::before{border-color:var(--ag-text-muted);background:var(--ag-text-muted)}
    .hist-prog.draft::before{border-color:var(--ag-amber);background:var(--ag-amber)}
    .hist-card{background:var(--ag-bg-card);border:1px solid var(--ag-border);border-radius:var(--ag-radius-lg);padding:16px 20px;cursor:pointer;transition:all .2s}
    .hist-card:hover{border-color:var(--ag-border-med);transform:translateX(2px)}
    .hist-card.expanded{border-color:var(--ag-primary);box-shadow:var(--ag-shadow-glow)}
    .hist-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
    .hist-title{font-size:.95rem;font-weight:700;display:flex;align-items:center;gap:8px}
    .hist-dates{font-size:.78rem;color:var(--ag-text-muted)}
    .hist-stats{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px}
    .hist-stat{text-align:center;min-width:60px}
    .hist-stat-val{font-size:1rem;font-weight:700}
    .hist-stat-lbl{font-size:.65rem;color:var(--ag-text-muted);text-transform:uppercase;letter-spacing:.3px}
    .hist-expand{overflow:hidden;max-height:0;opacity:0;transition:max-height .35s var(--ag-ease),opacity .25s var(--ag-ease),margin .25s var(--ag-ease)}
    .hist-card.expanded .hist-expand{max-height:500px;opacity:1;margin-top:14px;padding-top:14px;border-top:1px solid var(--ag-border)}
    .hist-event{display:flex;align-items:center;gap:8px;font-size:.8rem;margin-bottom:6px;color:var(--ag-text-secondary)}
    .hist-event svg{width:13px;height:13px;opacity:.5}
    .hist-empty{text-align:center;padding:40px;color:var(--ag-text-muted);font-size:.88rem}
    @media(max-width:600px){.hist-stats{gap:10px}.hist-stat{min-width:50px}.hist-head{flex-direction:column;align-items:flex-start}}

    /* ═══ AURA DOT (athlete card) ═══ */
    .aura-dot {
      display: inline-block; width: 8px; height: 8px; border-radius: 50%;
      margin-left: 6px; vertical-align: 2px; flex-shrink: 0;
      box-shadow: 0 0 6px currentColor;
    }

    /* ═══ AURA BADGE (fiche header) ═══ */
    .aura-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 0.72rem; font-weight: 600;
      padding: 3px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid;
    }

    /* ═══ LEVEL BADGE (fiche header) ═══ */
    .level-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 0.72rem; font-weight: 700;
      padding: 3px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid;
    }

    /* ═══ SHIELD BADGE ═══ */
    .shield-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 0.68rem; font-weight: 600;
      padding: 2px 8px; border-radius: var(--ag-radius-sm);
      color: var(--ag-indigo, #818cf8);
      background: rgba(129,140,248,0.1);
      border: 1px solid rgba(129,140,248,0.2);
    }

    /* ═══ AURA DETAIL (fiche resume) ═══ */

    /* ═══ PILLARS BLOCK (fiche resume) ═══ */
    .pillars-block {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-md); padding: 16px;
      margin-bottom: 16px; animation: fadeInUp 0.3s var(--ag-ease) 0.05s both;
    }
    .pillars-header {
      font-size: 0.85rem; font-weight: 700; color: var(--ag-text-primary);
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 14px;
    }
    .pillars-grid { display: flex; flex-direction: column; gap: 8px; }
    .pillar-row {
      display: flex; align-items: center; gap: 10px;
      padding: 4px 0; font-size: 0.82rem;
    }
    .pillar-row.pillar-priority {
      background: var(--ag-bg-elevated); margin: 0 -8px; padding: 6px 8px;
      border-radius: var(--ag-radius-sm);
    }
    .pillar-icon { width: 20px; display: flex; justify-content: center; flex-shrink: 0; }
    .pillar-name { width: 90px; font-weight: 600; color: var(--ag-text-secondary); flex-shrink: 0; }
    .pillar-bar {
      flex: 1; height: 6px; background: rgba(255,255,255,0.08);
      border-radius: 3px; overflow: hidden;
    }
    .pillar-fill { height: 100%; border-radius: 3px; transition: width 0.5s var(--ag-ease); min-width: 0; }
    .pillar-pct { width: 40px; text-align: right; font-weight: 800; font-size: 0.82rem; }
    .pillars-empty {
      text-align: center; padding: 16px; color: var(--ag-text-muted);
      font-size: 0.82rem; display: flex; align-items: center; justify-content: center; gap: 6px;
    }
    .pillar-row.pillar-locked { opacity: 0.4; }
    .pillar-lock-tag { vertical-align: 1px; opacity: 0.6; }
    .pillars-unlock-hint {
      margin-top: 10px; font-size: 0.75rem; color: var(--ag-text-muted);
      display: flex; align-items: center; gap: 5px;
    }

    @media (max-width: 600px) {
      .pillar-name { width: 70px; font-size: 0.75rem; }
      .pillar-pct { width: 32px; font-size: 0.75rem; }
    }

    /* ═══ HR ZONES BLOCK (fiche resume) ═══ */
    .hr-zones-block {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-md); padding: 16px;
      animation: fadeInUp 0.3s var(--ag-ease) 0.1s both;
    }
    .hz-header {
      font-size: 0.85rem; font-weight: 700; color: var(--ag-text-primary);
      display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
    }
    .hz-stacked {
      display: flex; height: 14px; border-radius: 7px; overflow: hidden;
      margin-bottom: 10px; gap: 1px;
    }
    .hz-seg { transition: width 0.5s var(--ag-ease); min-width: 2px; }
    .hz-labels {
      display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
    }
    .hz-label {
      display: flex; align-items: center; gap: 4px;
      font-size: 0.75rem; color: var(--ag-text-muted);
    }
    .hz-label strong { color: var(--ag-text-primary); }
    .hz-dot {
      width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    }
    .hz-ratio {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      padding-top: 8px; border-top: 1px solid var(--ag-border);
    }
    .hz-alert {
      width: 100%; margin-top: 6px; font-size: 0.75rem; font-weight: 600;
      color: var(--ag-amber); display: flex; align-items: center; gap: 4px;
    }

    /* ═══ PROGRAM COMPLIANCE BANNER ═══ */
    .prog-compliance {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 14px; margin-top: 8px;
      background: var(--ag-bg-elevated); border-radius: var(--ag-radius-sm);
      font-size: 0.82rem;
    }
    .pc-score { font-size: 1.1rem; font-weight: 800; }
    .pc-detail { color: var(--ag-text-muted); font-size: 0.78rem; }

    /* ═══ SESSION COMPLIANCE BADGES ═══ */
    .sess-comp-badge {
      display: inline-flex; align-items: center; gap: 3px;
      font-size: 0.65rem; font-weight: 600;
      padding: 2px 7px; border-radius: var(--ag-radius-sm);
      margin-left: auto;
    }
    .sess-comp-badge.done {
      color: var(--ag-emerald); background: rgba(52,211,153,0.1);
    }
    .sess-comp-badge.adapted {
      color: var(--ag-amber); background: rgba(251,191,36,0.1);
    }
    .sess-comp-badge.not-done {
      color: var(--ag-rose); background: rgba(251,113,133,0.1);
    }
    .sess-comp-badge.missing {
      color: var(--ag-text-muted); background: var(--ag-bg-elevated);
    }

    @media (max-width: 600px) {
      .hz-labels { gap: 6px; }
      .hz-label { font-size: 0.68rem; }
      .prog-compliance { flex-direction: column; align-items: flex-start; gap: 2px; }
      .sess-comp-badge { font-size: 0.6rem; padding: 1px 5px; }
    }

    /* ═══ ORION COACH — Sprint 7 ═══ */

    /* Encart algo (resume, cards) */
    .orion-encart {
      margin-top: 16px; border-radius: var(--ag-radius-md); overflow: hidden;
      border: 1px solid rgba(96,165,250,0.12);
      background: linear-gradient(135deg, rgba(96,165,250,0.04), rgba(139,92,246,0.03));
      cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
    }
    .orion-encart:hover {
      border-color: rgba(96,165,250,0.25);
      box-shadow: 0 0 20px rgba(96,165,250,0.06);
    }
    .orion-encart-header {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px;
      border-bottom: 1px solid rgba(96,165,250,0.06);
    }
    .orion-encart-title {
      font-weight: 700; font-size: 0.85rem;
      background: linear-gradient(135deg, #60a5fa, #a78bfa);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    }
    .orion-encart-label {
      font-size: 0.70rem; font-weight: 600; color: var(--ag-text-muted);
      margin-left: auto;
    }
    .orion-encart-cta {
      color: rgba(96,165,250,0.5); transition: color 0.2s;
    }
    .orion-encart:hover .orion-encart-cta { color: #60a5fa; }
    .orion-encart-body {
      padding: 10px 14px;
    }
    .orion-encart-line {
      font-size: 0.82rem; color: var(--ag-text-secondary); line-height: 1.55;
      margin-bottom: 4px;
    }
    .orion-encart-line:last-child { margin-bottom: 0; }

    /* Priority block (dashboard) */
    .orion-priority {
      background: linear-gradient(135deg, rgba(96,165,250,0.04), rgba(139,92,246,0.03));
      border: 1px solid rgba(96,165,250,0.12);
      border-radius: var(--ag-radius-lg);
      padding: 16px; margin-bottom: 20px;
    }
    .orion-priority-header {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 12px;
    }
    .orion-priority-row {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 10px; border-radius: var(--ag-radius-sm);
      cursor: pointer; transition: background 0.15s;
    }
    .orion-priority-row:hover { background: rgba(96,165,250,0.06); }
    .orion-priority-dot {
      width: 28px; height: 28px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.72rem; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .orion-priority-name {
      font-size: 0.85rem; font-weight: 600; color: var(--ag-text-primary);
      min-width: 80px;
    }
    .orion-priority-reason {
      flex: 1; font-size: 0.78rem; color: var(--ag-text-muted);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .orion-priority-score {
      font-size: 0.70rem; font-weight: 700; color: rgba(96,165,250,0.6);
      min-width: 24px; text-align: right;
    }

    /* Micro-insight on athlete cards */
    .orion-micro {
      margin-top: 8px; font-size: 0.72rem; font-weight: 600;
      display: flex; align-items: center; gap: 5px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    /* Bilan stats pre-fill */
    .orion-bilan-stats {
      margin-bottom: 12px; padding: 10px 12px;
      background: linear-gradient(135deg, rgba(96,165,250,0.04), rgba(139,92,246,0.03));
      border: 1px solid rgba(96,165,250,0.10);
      border-radius: var(--ag-radius-sm);
    }
    .orion-bilan-stats-header {
      font-size: 0.72rem; font-weight: 700; color: #60a5fa;
      margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
    }
    .orion-bilan-stats-grid {
      display: flex; flex-wrap: wrap; gap: 6px 14px;
      font-size: 0.78rem; color: var(--ag-text-secondary);
    }

    /* Welcome message in empty chat */
    .orion-welcome {
      text-align: center; padding: 40px 20px;
    }
    .orion-welcome-icon {
      margin-bottom: 12px;
    }
    .orion-welcome-text {
      font-size: 0.85rem; color: var(--ag-text-muted); line-height: 1.6;
    }

    /* Side panel */
    .orion-panel {
      position: fixed; top: 0; right: -400px; bottom: 0;
      width: 400px; max-width: 100vw;
      background: var(--ag-bg-base);
      border-left: 1px solid rgba(96,165,250,0.15);
      box-shadow: -8px 0 40px rgba(0,0,0,0.2);
      z-index: 9998;
      display: flex; flex-direction: column;
      transition: right 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .orion-panel.open { right: 0; }
    .orion-panel.closing { right: -400px; }
    .orion-panel-header {
      display: flex; align-items: center; gap: 12px;
      padding: 16px 18px; flex-shrink: 0;
      border-bottom: 1px solid rgba(96,165,250,0.10);
      background: linear-gradient(180deg, rgba(96,165,250,0.04), transparent);
    }
    .orion-panel-close {
      background: none; border: none; color: var(--ag-text-muted);
      cursor: pointer; padding: 4px; border-radius: 6px;
      transition: color 0.15s, background 0.15s;
    }
    .orion-panel-close:hover { color: var(--ag-text-primary); background: var(--ag-ov2); }
    .orion-panel-title {
      display: flex; align-items: center; gap: 8px; flex: 1;
    }
    .orion-panel-chat {
      flex: 1; overflow-y: auto; padding: 16px;
      display: flex; flex-direction: column; gap: 8px;
      scroll-behavior: smooth;
    }
    .orion-panel-chat::-webkit-scrollbar { width: 3px; }
    .orion-panel-chat::-webkit-scrollbar-thumb { background: var(--ag-border-med); border-radius: 3px; }
    .orion-panel-chips {
      display: flex; gap: 6px; padding: 8px 16px;
      overflow-x: auto; scrollbar-width: none;
      border-top: 1px solid rgba(96,165,250,0.06);
      flex-shrink: 0;
    }
    .orion-panel-chips::-webkit-scrollbar { display: none; }
    .orion-chip {
      flex-shrink: 0; padding: 7px 12px;
      border-radius: var(--ag-radius-sm);
      background: rgba(96,165,250,0.06);
      border: 1px solid rgba(96,165,250,0.12);
      color: #93c5fd; font-size: 0.72rem; font-weight: 600;
      cursor: pointer; font-family: inherit;
      transition: background 0.15s, border-color 0.15s;
    }
    .orion-chip:hover {
      background: rgba(96,165,250,0.12);
      border-color: rgba(96,165,250,0.25);
    }
    .orion-panel-input {
      padding: 12px 16px; flex-shrink: 0;
      border-top: 1px solid var(--ag-ov-blue);
    }
    .orion-panel .orion-input-wrap {
      display: flex; align-items: flex-end; gap: 8px;
    }
    .orion-panel .orion-input {
      flex: 1; background: var(--ag-bg-card); border: 1px solid var(--ag-border-med);
      border-radius: var(--ag-radius-md); padding: 10px 14px;
      font-size: 0.84rem; color: var(--ag-text-primary);
      font-family: inherit; resize: none; outline: none;
      transition: border-color 0.2s; min-height: 40px; max-height: 100px;
    }
    .orion-panel .orion-input:focus { border-color: rgba(96,165,250,0.4); }
    .orion-panel .orion-input::placeholder { color: var(--ag-text-muted); }
    .orion-panel .orion-send {
      width: 36px; height: 36px; border-radius: 10px; border: none;
      background: linear-gradient(135deg, #60a5fa, #a78bfa);
      color: #fff; display: flex; align-items: center; justify-content: center;
      cursor: pointer; flex-shrink: 0;
      transition: opacity 0.2s, transform 0.1s;
      box-shadow: 0 2px 12px rgba(96,165,250,0.3);
    }
    .orion-panel .orion-send:disabled { opacity: 0.3; cursor: not-allowed; }
    .orion-panel .orion-send:active:not(:disabled) { transform: scale(0.92); }

    /* Chat messages in panel — same style as athlete Orion */
    .orion-panel .orion-msg {
      max-width: 88%; padding: 10px 14px; border-radius: 14px;
      font-size: 0.82rem; line-height: 1.55;
      animation: fadeUp 0.3s ease both; word-wrap: break-word;
    }
    .orion-panel .orion-msg.user {
      align-self: flex-end;
      background: rgba(249,115,22,0.10);
      border: 1px solid rgba(249,115,22,0.15);
      color: var(--ag-text-primary);
      border-bottom-right-radius: 4px;
    }
    .orion-panel .orion-msg.ai {
      align-self: flex-start;
      background: rgba(96,165,250,0.05);
      border: 1px solid rgba(96,165,250,0.10);
      color: var(--ag-text-primary);
      border-bottom-left-radius: 4px;
    }
    .orion-panel .orion-msg-name {
      font-size: 0.70rem; font-weight: 700; color: #60a5fa;
      margin-bottom: 4px; display: flex; align-items: center; gap: 4px;
    }
    .orion-panel .orion-typing {
      display: flex; gap: 4px; padding: 10px 14px; align-self: flex-start;
    }
    .orion-panel .orion-typing span {
      width: 5px; height: 5px; border-radius: 50%;
      background: #60a5fa; opacity: 0.4;
      animation: orionDot 0.8s ease infinite;
    }
    .orion-panel .orion-typing span:nth-child(2) { animation-delay: 0.15s; }
    .orion-panel .orion-typing span:nth-child(3) { animation-delay: 0.3s; }
    @keyframes orionDot {
      0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
      40% { opacity: 1; transform: scale(1.2); }
    }
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* FAB */
    .orion-fab {
      position: fixed; bottom: 24px; right: 24px;
      width: 52px; height: 52px; border-radius: var(--ag-radius-lg);
      background: linear-gradient(135deg, #60a5fa, #a78bfa);
      border: none; color: #fff; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 20px rgba(96,165,250,0.3);
      z-index: 9990;
      transition: transform 0.15s, box-shadow 0.2s;
    }
    .orion-fab:hover {
      transform: scale(1.08);
      box-shadow: 0 6px 28px rgba(96,165,250,0.4);
    }
    .orion-fab:active { transform: scale(0.95); }

    @media (max-width: 500px) {
      .orion-panel { width: 100vw; }
      .orion-fab { bottom: 16px; right: 16px; width: 46px; height: 46px; border-radius: 14px; }
    }

    /* Session alert badge (7F) */
    .orion-sess-alert {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 0.70rem; font-weight: 700;
      padding: 3px 8px; border-radius: 6px;
      background: rgba(96,165,250,0.06);
      border: 1px solid rgba(96,165,250,0.10);
      cursor: pointer; transition: background 0.15s;
      margin-top: 6px;
    }
    .orion-sess-alert:hover {
      background: rgba(96,165,250,0.12);
    }

    /* Message suggestion banner (7H) */
    .orion-msg-suggest {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px; margin-bottom: 8px;
      background: linear-gradient(135deg, rgba(96,165,250,0.04), rgba(139,92,246,0.03));
      border: 1px solid rgba(96,165,250,0.12);
      border-radius: var(--ag-radius-md);
      font-size: 0.78rem; color: var(--ag-text-muted);
      cursor: pointer; transition: border-color 0.15s, background 0.15s;
    }
    .orion-msg-suggest:hover {
      border-color: rgba(96,165,250,0.25);
      background: rgba(96,165,250,0.06);
    }
    .orion-msg-suggest-cta {
      margin-left: auto; font-weight: 700; color: #60a5fa;
      font-size: 0.72rem; white-space: nowrap;
    }

    /* ═══ SPRINT 8: ONBOARDING CHECKLIST ═══ */

    .onboarding-checklist {
      background: var(--ag-bg-card);
      border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-xl);
      padding: 24px 28px;
      margin-bottom: 28px;
      animation: fadeInUp 0.4s var(--ag-ease);
    }

    .oc-header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
    }

    .oc-title {
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--ag-text-primary);
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
    }

    .oc-progress {
      flex: 1;
      height: 6px;
      background: var(--ag-ov2);
      border-radius: var(--ag-radius-full);
      overflow: hidden;
    }

    .oc-progress-bar {
      height: 100%;
      background: var(--ag-grad-primary);
      border-radius: var(--ag-radius-full);
      transition: width 0.6s var(--ag-ease);
    }

    .oc-progress-label {
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--ag-primary);
      white-space: nowrap;
    }

    .oc-steps {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 10px;
    }

    .oc-step {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 14px 16px;
      border-radius: var(--ag-radius-md);
      border: 1px solid var(--ag-border);
      background: var(--ag-ov1);
      cursor: pointer;
      transition: all 0.25s var(--ag-ease);
    }

    .oc-step:hover {
      border-color: rgba(249,115,22,0.2);
      background: rgba(249,115,22,0.04);
    }

    .oc-step.done {
      border-color: rgba(34,197,94,0.15);
      background: rgba(34,197,94,0.04);
      cursor: default;
    }

    .oc-check {
      width: 26px;
      height: 26px;
      min-width: 26px;
      border-radius: var(--ag-radius-full);
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid var(--ag-border-med);
      color: var(--ag-text-muted);
      margin-top: 1px;
      transition: all 0.25s var(--ag-ease);
    }

    .oc-step.done .oc-check {
      background: rgba(34,197,94,0.15);
      border-color: #34d399;
      color: #34d399;
    }

    .oc-num {
      font-size: 0.72rem;
      font-weight: 700;
    }

    .oc-step-text {
      flex: 1;
      min-width: 0;
    }

    .oc-step-title {
      font-weight: 600;
      font-size: 0.84rem;
      color: var(--ag-text-primary);
      line-height: 1.3;
    }

    .oc-step.done .oc-step-title {
      color: var(--ag-text-secondary);
    }

    .oc-step-desc {
      font-size: 0.75rem;
      color: var(--ag-text-muted);
      margin-top: 2px;
      line-height: 1.4;
    }

    .oc-link {
      color: var(--ag-primary);
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
    }

    .oc-link:hover {
      text-decoration: underline;
    }

    .oc-link-primary {
      padding: 4px 12px;
      border-radius: var(--ag-radius-sm);
      background: rgba(249,115,22,0.1);
      border: 1px solid rgba(249,115,22,0.2);
      display: inline-block;
      margin-top: 4px;
      transition: all 0.2s var(--ag-ease);
    }

    .oc-link-primary:hover {
      background: rgba(249,115,22,0.18);
      text-decoration: none;
    }

    @media (max-width: 600px) {
      .onboarding-checklist { padding: 18px 16px; }
      .oc-header { flex-wrap: wrap; }
      .oc-steps { grid-template-columns: 1fr; }
      .oc-step { padding: 12px 14px; }
    }

    /* ═══ SPRINT 10: SKELETON LOADING ═══ */

    .skeleton-card {
      background: var(--ag-bg-card);
      border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-lg);
      padding: 18px;
      animation: skeletonPulse 1.8s ease infinite;
    }

    .skeleton-bar {
      height: 12px;
      background: var(--ag-ov2);
      border-radius: var(--ag-radius-sm);
      animation: skeletonPulse 1.8s ease infinite;
    }

    .skeleton-bar.w60 { width: 60%; }
    .skeleton-bar.w40 { width: 40%; }
    .skeleton-bar.w80 { width: 80%; }
    .skeleton-bar.w30 { width: 30%; }

    .skeleton-circle {
      width: 38px;
      height: 38px;
      border-radius: var(--ag-radius-full);
      background: var(--ag-ov2);
      animation: skeletonPulse 1.8s ease infinite;
    }

    .skeleton-metric {
      background: var(--ag-bg-card);
      border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-lg);
      padding: 20px;
      min-height: 110px;
    }

    .skeleton-metric .skeleton-bar { margin-bottom: 10px; }

    @keyframes skeletonPulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    /* ═══ SPRINT 10E: UTILITY CLASSES (inline style migration) ═══ */

    .u-unit { font-size: 0.85rem; font-weight: 400; color: var(--ag-text-muted); }
    .u-meta-sm { font-size: .78rem; color: var(--ag-text-muted); }
    .u-meta { font-size: .82rem; color: var(--ag-text-muted); }
    .u-meta-italic { font-size: .82rem; color: var(--ag-text-muted); font-style: italic; margin-top: 4px; }
    .u-label-sm { font-size: .65rem; color: var(--ag-text-muted); }
    .u-center-muted { text-align: center; padding: 20px; color: var(--ag-text-muted); font-size: 0.85rem; }
    .u-flex-center { display: flex; align-items: center; gap: 12px; }
    .u-fw600 { font-weight: 600; font-size: .9rem; }
    .u-text-primary { color: var(--ag-text-primary); }
    .u-text-muted { color: var(--ag-text-muted); }
    .u-text-orange { color: var(--ag-primary); }
    .u-text-rose { color: var(--ag-rose); }
    .u-text-emerald { color: var(--ag-emerald); }
    .u-text-amber { color: var(--ag-amber); }
    .u-mt4 { margin-top: 4px; }
    .u-mt8 { margin-top: 8px; }
    .u-mt16 { margin-top: 16px; }

    /* ═══════════════════════════════════════════════════════
       FEEDBACK CARDS V2 — Activités + Zones + GPS
       ═══════════════════════════════════════════════════════ */

    /* Summary bar */
    .fbv2-summary {
      display: flex; gap: 14px; align-items: center; margin-bottom: 18px; flex-wrap: wrap;
    }
    .fbv2-count {
      font-size: 0.95rem; font-weight: 700; color: var(--ag-text-primary);
    }
    .fbv2-meta {
      font-size: 0.78rem; color: var(--ag-text-muted); display: inline-flex; align-items: center; gap: 4px;
    }

    /* Card */
    .fbv2-card {
      background: var(--ag-bg-card);
      border: 1px solid var(--ag-border-med);
      border-radius: var(--ag-radius-lg);
      margin-bottom: 14px;
      overflow: hidden;
      animation: fadeInUp 0.4s var(--ag-ease) both;
    }
    .fbv2-card.unread {
      border-left: 3px solid var(--ag-primary);
    }

    /* Mini map container */
    .fbv2-map {
      width: 100%; height: 110px;
      background: var(--ag-bg-elevated);
      position: relative; overflow: hidden;
      border-bottom: 1px solid var(--ag-border);
    }

    /* Body (everything under map) */
    .fbv2-body {
      padding: 14px 16px;
    }

    /* Header row */
    .fbv2-header {
      display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
    }
    .fbv2-date {
      font-size: 0.82rem; font-weight: 600; color: var(--ag-text-secondary);
    }
    .fbv2-rpe {
      font-size: 0.72rem; font-weight: 700; padding: 2px 8px;
      border-radius: var(--ag-radius-sm); line-height: 1.4;
    }
    .fbv2-unread {
      font-size: 0.62rem; font-weight: 700; padding: 2px 6px;
      border-radius: var(--ag-radius-sm);
      background: rgba(249,115,22,0.12); color: var(--ag-primary);
    }

    /* Session label */
    .fbv2-label {
      font-size: 0.82rem; font-weight: 600; color: var(--ag-text-primary); margin-bottom: 8px;
    }

    /* ── Zones FC ── */
    .fbv2-zones {
      margin-bottom: 10px; padding: 10px 12px;
      background: var(--ag-ov1); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-md);
    }
    .fbv2-zones-hd {
      font-size: 0.72rem; font-weight: 600; color: var(--ag-text-muted);
      display: flex; align-items: center; gap: 5px; margin-bottom: 6px;
    }

    /* Stacked bar */
    .fbv2-zbar {
      display: flex; height: 12px; border-radius: 6px; overflow: hidden;
      background: var(--ag-bg-elevated); margin-bottom: 6px;
    }
    .fbv2-zseg {
      display: flex; align-items: center; justify-content: center;
      transition: width 0.6s var(--ag-ease);
    }
    .fbv2-zseg span {
      font-size: 0.55rem; font-weight: 700; color: #fff;
      text-shadow: 0 1px 2px rgba(0,0,0,0.3); line-height: 1;
    }

    /* Zone labels */
    .fbv2-zlabels {
      display: flex; flex-wrap: wrap; gap: 6px 12px;
    }
    .fbv2-zlbl {
      font-size: 0.68rem; color: var(--ag-text-secondary);
      display: inline-flex; align-items: center; gap: 3px;
    }
    .fbv2-zlbl strong { font-weight: 700; }
    .fbv2-zdot {
      width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    }
    .fbv2-ztime {
      font-size: 0.6rem; color: var(--ag-text-muted);
    }

    /* 80/20 ratio */
    .fbv2-ratio {
      font-size: 0.72rem; font-weight: 700; margin-top: 6px;
    }

    /* RPE vs zones gap alert */
    .fbv2-gap {
      font-size: 0.72rem; color: var(--ag-amber);
      display: flex; align-items: center; gap: 4px; margin-top: 5px;
    }

    /* ── Power row ── */
    .fbv2-power {
      display: flex; gap: 14px; flex-wrap: wrap;
      margin-bottom: 8px; padding: 8px 12px;
      background: rgba(251,191,36,0.04); border: 1px solid rgba(251,191,36,0.1);
      border-radius: var(--ag-radius-md);
    }
    .fbv2-pw { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
    .fbv2-pw-v { font-weight: 800; font-size: 0.95rem; line-height: 1; }
    .fbv2-pw-l { font-size: 0.6rem; color: var(--ag-text-muted); margin-top: 2px; }

    /* ── Stats grid ── */
    .fbv2-stats {
      display: flex; gap: 12px; flex-wrap: wrap;
      padding: 8px 0; margin-bottom: 6px;
      border-bottom: 1px solid var(--ag-border);
    }
    .fbv2-stat {
      display: flex; flex-direction: column; align-items: center; min-width: 48px;
    }
    .fbv2-stat-v { font-weight: 700; font-size: 0.88rem; line-height: 1; }
    .fbv2-stat-l { font-size: 0.62rem; color: var(--ag-text-muted); margin-top: 2px; }

    /* ── Alerts ── */
    .fbv2-alert {
      font-size: 0.78rem; display: flex; align-items: center; gap: 6px;
      padding: 6px 10px; border-radius: var(--ag-radius-sm); margin-bottom: 6px;
    }
    .fbv2-alert.pain {
      background: rgba(251,113,133,0.06); color: var(--ag-rose);
      border: 1px solid rgba(251,113,133,0.12);
    }
    .fbv2-alert.fatigue {
      background: rgba(251,191,36,0.06); color: var(--ag-amber);
      border: 1px solid rgba(251,191,36,0.12);
    }

    /* ── Comment ── */
    .fbv2-comment {
      font-size: 0.85rem; color: var(--ag-text-secondary); line-height: 1.5;
      padding: 8px 10px; margin-bottom: 6px;
      background: var(--ag-ov1); border-radius: var(--ag-radius-sm);
      border-left: 2px solid var(--ag-border-med);
    }

    /* ── Coach reply ── */
    .fbv2-reply {
      padding: 10px 12px; margin-bottom: 6px;
      background: rgba(249,115,22,0.04);
      border: 1px solid rgba(249,115,22,0.1);
      border-radius: var(--ag-radius-md);
    }
    .fbv2-reply-hd {
      font-size: 0.72rem; font-weight: 700; color: var(--ag-primary);
      margin-bottom: 4px; display: flex; align-items: center; gap: 5px;
    }
    .fbv2-reply-txt {
      font-size: 0.82rem; color: var(--ag-text-secondary); line-height: 1.5;
    }
    .fbv2-reply-date {
      font-size: 0.68rem; color: var(--ag-text-muted); margin-top: 4px;
    }

    /* ── Actions ── */
    .fbv2-actions {
      display: flex; gap: 8px; align-items: center; margin-top: 8px;
    }
    /* ═══ SPRINT 3 — Filters + Orphan cards ═══ */

    /* Filter bar */
    .fbv2-filters {
      display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
      margin-bottom: 16px; padding-bottom: 12px;
      border-bottom: 1px solid var(--ag-border);
    }
    .fbv2-fgroup {
      display: flex; gap: 4px;
    }
    .fbv2-pill {
      font-size: 0.72rem; font-weight: 600; font-family: inherit;
      padding: 4px 10px; border-radius: var(--ag-radius-sm);
      background: var(--ag-ov2); border: 1px solid var(--ag-border);
      color: var(--ag-text-muted); cursor: pointer;
      transition: all 0.2s var(--ag-ease);
      display: inline-flex; align-items: center; gap: 4px;
    }
    .fbv2-pill:hover { background: var(--ag-ov3); color: var(--ag-text-secondary); }
    .fbv2-pill.active {
      background: rgba(249,115,22,0.1); color: var(--ag-primary);
      border-color: rgba(249,115,22,0.25);
    }
    .fbv2-pill.pain-on {
      background: rgba(251,113,133,0.1); color: var(--ag-rose);
      border-color: rgba(251,113,133,0.25);
    }

    /* Orphan card accent */
    .fbv2-card.orphan {
      border-left: 3px solid var(--ag-amber);
    }

    /* ═══ SPRINT 5 — Calendar realized activity chips ═══ */

    .wcd-chip.wcd-realized {
      border-left: 2px solid var(--ag-emerald);
      background: rgba(52,211,153,0.06);
    }
    .wcd-chip.wcd-realized:hover {
      border-color: var(--ag-emerald);
      background: rgba(52,211,153,0.12);
    }

    /* ═══ SPRINT 6 — 4-Week Calendar Grid ═══ */

    .cal4w { margin-bottom: 20px; }

    .cal4w-nav {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 12px; gap: 8px;
    }
    .cal4w-nav button {
      width: 30px; height: 30px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-muted); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all .2s;
    }
    .cal4w-nav button:hover { border-color: var(--ag-primary); color: var(--ag-primary); }
    .cal4w-nav-center { text-align: center; flex: 1; }
    .cal4w-title { font-size: 0.88rem; font-weight: 700; color: var(--ag-text-primary); display: block; }
    .cal4w-summary { font-size: 0.72rem; color: var(--ag-text-muted); font-weight: 600; }

    .cal4w-grid { display: flex; flex-direction: column; gap: 2px; }

    .cal4w-hdr-row {
      display: grid; grid-template-columns: 42px repeat(7, 1fr);
      gap: 2px; margin-bottom: 2px;
    }
    .cal4w-hdr {
      text-align: center; font-size: 0.65rem; font-weight: 700;
      color: var(--ag-text-muted); padding: 4px 0;
      text-transform: uppercase; letter-spacing: 0.3px;
    }

    .cal4w-row {
      display: grid; grid-template-columns: 42px repeat(7, 1fr) 42px;
      gap: 2px; min-height: 72px;
    }

    .cal4w-wk-label {
      font-size: 0.62rem; font-weight: 700; color: var(--ag-text-muted);
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; gap: 1px;
    }
    .cal4w-wk-label span { font-weight: 400; font-size: 0.55rem; }

    .cal4w-wk-sum {
      font-size: 0.58rem; color: var(--ag-text-muted);
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; gap: 2px; text-align: center;
    }
    .cal4w-wk-sum strong { font-size: 0.72rem; color: var(--ag-text-secondary); }
    .cal4w-wk-sum span { font-size: 0.55rem; }

    .cal4w-day {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-sm); padding: 4px;
      display: flex; flex-direction: column; gap: 2px;
      min-height: 68px; transition: border-color .2s;
    }
    .cal4w-day:hover { border-color: var(--ag-border-med); }
    .cal4w-day.today { border-color: var(--ag-primary); background: rgba(249,115,22,0.03); }
    .cal4w-day.past { opacity: 0.8; }

    .cal4w-day-num {
      font-size: 0.6rem; font-weight: 600; color: var(--ag-text-muted);
      text-align: right; line-height: 1;
    }
    .cal4w-day-num.today {
      color: var(--ag-primary); font-weight: 800;
    }

    /* Chips */
    .cal4w-chip {
      display: flex; align-items: center; gap: 3px;
      padding: 2px 4px; border-radius: 3px;
      font-size: 0.55rem; font-weight: 600;
      cursor: pointer; transition: all .15s;
      overflow: hidden; white-space: nowrap;
    }
    .cal4w-chip.planned {
      background: var(--ag-ov2); color: var(--ag-text-secondary);
      border: 1px solid var(--ag-border);
    }
    .cal4w-chip.planned:hover { border-color: var(--ag-primary); }

    .cal4w-chip.realized {
      background: var(--ag-ov-emerald); color: var(--ag-text-secondary);
      border: 1px solid rgba(52,211,153,0.2);
    }
    .cal4w-chip.realized:hover { border-color: var(--ag-emerald); background: rgba(52,211,153,0.14); }

    .cal4w-chip.rest {
      font-size: 0.5rem; color: var(--ag-text-muted); opacity: 0.5;
      justify-content: center;
    }

    .cal4w-dot {
      width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
    }
    .cal4w-dur {
      margin-left: auto; font-size: 0.5rem; color: var(--ag-text-muted);
      font-weight: 400;
    }
    .cal4w-rpe {
      font-size: 0.48rem; font-weight: 800; color: #fff;
      border-radius: 2px; padding: 0 2px; line-height: 1.3;
    }
    .cal4w-gps { flex-shrink: 0; margin-left: 1px; }

    .cal4w-add {
      font-size: 0.65rem; font-weight: 700; color: var(--ag-text-muted);
      text-align: center; cursor: pointer; border: 1px dashed var(--ag-border);
      border-radius: 3px; padding: 1px 0; margin-top: auto;
      transition: all .2s;
    }
    .cal4w-add:hover { border-color: var(--ag-primary); color: var(--ag-primary); }

    /* Mobile: horizontal scroll */
    @media(max-width:768px){
      .cal4w-row { grid-template-columns: 32px repeat(7, minmax(60px, 1fr)) 32px; overflow-x: auto; }
      .cal4w-hdr-row { grid-template-columns: 32px repeat(7, minmax(60px, 1fr)); }
      .cal4w-day { min-width: 60px; }
    }

    /* ═══ SPRINT 7 — Layout + Inline Panel ═══ */

    .cal-layout {
      display: flex; gap: 0; position: relative;
    }
    .cal-main {
      flex: 1; min-width: 0;
      transition: flex .3s var(--ag-ease);
    }
    .cal-main.panel-open { flex: 0 0 58%; }

    .cal-panel {
      width: 0; overflow: hidden; opacity: 0;
      transition: width .3s var(--ag-ease), opacity .25s var(--ag-ease);
      border-left: 1px solid var(--ag-border);
      background: var(--ag-bg-surface);
    }
    .cal-panel.open {
      width: 42%; min-width: 340px; opacity: 1;
      overflow-y: auto; max-height: 80vh;
      padding: 16px;
    }

    /* Panel content */
    .calp-loading { text-align: center; padding: 40px 0; }

    .calp-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      margin-bottom: 12px; gap: 8px;
    }
    .calp-sport {
      font-weight: 800; font-size: 0.95rem; display: block; line-height: 1.2;
    }
    .calp-date {
      font-size: 0.72rem; color: var(--ag-text-muted); font-weight: 500;
    }
    .calp-close {
      width: 28px; height: 28px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-muted); font-size: 1.1rem; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all .2s; flex-shrink: 0; line-height: 1;
    }
    .calp-close:hover { border-color: var(--ag-rose); color: var(--ag-rose); }

    .calp-map {
      border-radius: var(--ag-radius-md); overflow: hidden;
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      margin-bottom: 12px; min-height: 160px;
    }

    .calp-stats {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
      margin-bottom: 12px;
    }
    .calp-stat {
      text-align: center; background: var(--ag-bg-card);
      border: 1px solid var(--ag-border); border-radius: var(--ag-radius-sm);
      padding: 8px 4px;
    }
    .calp-stat-v { font-weight: 800; font-size: 0.88rem; line-height: 1; }
    .calp-stat-l { font-size: 0.6rem; color: var(--ag-text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .3px; }

    .calp-section {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-md); padding: 10px 12px;
      margin-bottom: 8px;
    }
    .calp-sec-title {
      font-size: 0.72rem; font-weight: 700; color: var(--ag-text-muted);
      margin-bottom: 8px; text-transform: uppercase; letter-spacing: .3px;
    }

    /* Zone bar */
    .calp-zbar {
      display: flex; height: 14px; border-radius: 7px; overflow: hidden;
      gap: 1px; margin-bottom: 6px;
    }
    .calp-zbar div { display: flex; align-items: center; justify-content: center; }
    .calp-zbar span { font-size: 0.5rem; font-weight: 700; color: #fff; }
    .calp-zlegend {
      display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.58rem; font-weight: 600;
    }

    /* Power zones */
    .calp-pz-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
    .calp-pz-label { font-size: 0.62rem; font-weight: 700; width: 22px; }
    .calp-pz-bar {
      flex: 1; height: 8px; background: var(--ag-ov2); border-radius: 4px; overflow: hidden;
    }
    .calp-pz-bar div { height: 100%; border-radius: 4px; transition: width .6s ease; }
    .calp-pz-val { font-size: 0.58rem; color: var(--ag-text-muted); width: 55px; text-align: right; }

    /* Feedback */
    .calp-rpe-line {
      display: flex; align-items: center; gap: 6px;
      font-size: 0.78rem; font-weight: 600; color: var(--ag-text-secondary);
      margin-bottom: 6px;
    }
    .calp-rpe-badge {
      width: 24px; height: 24px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-weight: 800; font-size: 0.72rem; color: #fff;
    }
    .calp-wellbeing {
      font-size: 0.72rem; color: var(--ag-text-muted);
      margin-bottom: 4px;
    }
    .calp-pain {
      font-size: 0.72rem; color: var(--ag-rose); font-weight: 600;
      margin-bottom: 4px; display: flex; align-items: center; gap: 4px;
    }
    .calp-comment {
      font-size: 0.78rem; color: var(--ag-text-secondary);
      padding: 6px 8px; background: var(--ag-ov2);
      border-radius: var(--ag-radius-sm); line-height: 1.5;
      border-left: 2px solid var(--ag-border-med);
    }
    .calp-coach-reply {
      font-size: 0.78rem; color: var(--ag-text-secondary);
      padding: 6px 8px; background: rgba(249,115,22,0.04);
      border: 1px solid rgba(249,115,22,0.1);
      border-radius: var(--ag-radius-sm); margin-bottom: 6px; line-height: 1.5;
    }
    .calp-textarea {
      width: 100%; padding: 6px 8px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-base);
      color: var(--ag-text-primary); font-size: 0.78rem;
      font-family: inherit; resize: vertical;
    }
    .calp-no-fb {
      font-size: 0.72rem; color: var(--ag-text-muted); font-style: italic;
    }

    /* Mobile */
    @media(max-width:1024px){
      .cal-layout { flex-direction: column; }
      .cal-main.panel-open { flex: 1; }
      .cal-panel.open {
        width: 100%; min-width: unset; max-height: unset;
        border-left: none; border-top: 1px solid var(--ag-border);
      }
    }

    /* ═══ SPRINT 10 — Intensity timeline bar ═══ */
    .calp-intensity-bar {
      border-radius: 4px; overflow: hidden;
      margin-bottom: 12px; min-height: 16px;
      background: #1e293b;
    }

    /* ═══ SPRINT 11 — Workout Builder ═══ */

    .wkb-header {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; margin-bottom: 10px;
    }
    .wkb-mode { display: flex; gap: 2px; }
    .wkb-mode-btn {
      font-size: 0.65rem; font-weight: 700; font-family: inherit;
      padding: 4px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-muted); cursor: pointer; transition: all .2s;
    }
    .wkb-mode-btn.active { background: var(--ag-primary); color: #fff; border-color: var(--ag-primary); }
    .wkb-mode-btn:hover:not(.active) { border-color: var(--ag-primary); color: var(--ag-primary); }

    .wkb-ref { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--ag-text-muted); }
    .wkb-ref label { font-weight: 700; }
    .wkb-ref-input {
      width: 60px; padding: 3px 6px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-base);
      color: var(--ag-text-primary); font-size: 0.78rem; font-weight: 700;
      font-family: inherit; text-align: center;
    }
    .wkb-ref-unit { font-size: 0.65rem; color: var(--ag-text-muted); }

    .wkb-palette {
      display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px;
    }
    .wkb-zone-btn {
      font-size: 0.7rem; font-weight: 800; font-family: inherit;
      padding: 5px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid; cursor: pointer; transition: all .15s;
    }
    .wkb-zone-btn:hover { transform: scale(1.05); }
    .wkb-ramp { background: rgba(167,139,250,0.1) !important; border-color: rgba(167,139,250,0.3) !important; color: #a78bfa !important; }
    .wkb-intv { background: rgba(239,68,68,0.1) !important; border-color: rgba(239,68,68,0.3) !important; color: #ef4444 !important; }

    .wkb-canvas-wrap {
      border-radius: var(--ag-radius-md); overflow: hidden;
      border: 1px solid var(--ag-border); margin-bottom: 10px;
      cursor: pointer;
    }

    .wkb-editor {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-md); padding: 10px 12px;
      margin-bottom: 10px;
    }
    .wkb-ed-title { font-size: 0.82rem; font-weight: 800; margin-bottom: 8px; }
    .wkb-ed-row {
      display: flex; align-items: center; gap: 6px;
      margin-bottom: 6px; font-size: 0.75rem; color: var(--ag-text-secondary);
    }
    .wkb-ed-row label { width: 80px; font-weight: 600; color: var(--ag-text-muted); font-size: 0.68rem; }
    .wkb-ed-input {
      width: 50px; padding: 3px 6px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-base);
      color: var(--ag-text-primary); font-size: 0.78rem; font-weight: 700;
      font-family: inherit; text-align: center;
    }
    .wkb-ed-val { font-weight: 800; font-size: 0.85rem; min-width: 50px; text-align: center; }
    .wkb-pm {
      width: 26px; height: 26px; border-radius: 50%;
      border: 1px solid var(--ag-border); background: var(--ag-bg-base);
      color: var(--ag-text-muted); font-size: 0.85rem; font-weight: 700;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-family: inherit; transition: all .15s;
    }
    .wkb-pm:hover { border-color: var(--ag-primary); color: var(--ag-primary); }
    .wkb-del {
      font-size: 0.68rem; color: var(--ag-rose); background: none;
      border: none; cursor: pointer; font-family: inherit; font-weight: 600;
      padding: 4px 0; margin-top: 4px;
    }
    .wkb-del:hover { text-decoration: underline; }

    .wkb-footer {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; padding-top: 8px; border-top: 1px solid var(--ag-border);
    }
    .wkb-dur-info { font-size: 0.72rem; color: var(--ag-text-muted); font-weight: 600; }

    /* Mini workout preview in calendar */
    .cal4w-mini-wk {
      border-radius: 3px; overflow: hidden;
      min-height: 24px; margin-top: 1px;
      cursor: pointer;
    }

    /* ═══ SPRINT 12 — Drag & Drop ═══ */

    .wkb-zone-btn { cursor: grab; user-select: none; -webkit-user-select: none; }
    .wkb-zone-btn:active { cursor: grabbing; }

    .wkb-canvas-wrap { position: relative; }
    .wkb-canvas-wrap.drop-hover {
      outline: 2px dashed var(--ag-primary);
      outline-offset: -2px;
      border-color: var(--ag-primary);
    }

    .wkb-drop-indicator {
      display: none; position: absolute; top: 0; bottom: 0;
      width: 2px; background: var(--ag-primary);
      box-shadow: 0 0 8px rgba(249,115,22,0.5);
      pointer-events: none; z-index: 10;
      transition: left 0.1s ease;
    }

    .wkb-ghost {
      box-shadow: 0 4px 20px rgba(0,0,0,0.5);
      transform: scale(1.1);
    }

    /* ═══ FIX — Hide number input spinners globally ═══ */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
      -webkit-appearance: none; margin: 0;
    }
    input[type="number"] { -moz-appearance: textfield; }

    /* Editable intensity input in builder */
    .wkb-ed-val-input {
      width: 55px; font-weight: 800; font-size: 0.85rem; text-align: center;
    }
    .wkb-ed-unit {
      font-size: 0.65rem; color: var(--ag-text-muted); min-width: 18px;
    }
    /* ═══════════════════════════════════════════════════════
       SPRINT 16 — Month Calendar V2 (full-width)
       ═══════════════════════════════════════════════════════ */

    /* ─── Full-width breakout ─── */
    .fiche-full-width {
      margin-left: calc(-50vw + 50%);
      margin-right: calc(-50vw + 50%);
      width: 100vw;
      max-width: 100vw;
      padding: 0 24px;
      animation: none;
    }

    /* ─── Header: nav + actions ─── */
    .cvm-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 0 16px; gap: 12px;
    }
    .cvm-nav {
      display: flex; align-items: center; gap: 8px;
    }
    .cvm-nav-btn {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      color: var(--ag-text-secondary); font-size: 0.82rem; font-family: inherit;
      width: 32px; height: 32px; border-radius: var(--ag-radius-sm);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: all .15s;
    }
    .cvm-nav-btn:hover { border-color: var(--ag-primary); color: var(--ag-primary); }
    .cvm-month-title {
      font-size: 1.1rem; font-weight: 800; color: var(--ag-text-primary);
      min-width: 160px; text-align: center;
    }
    .cvm-today-btn {
      font-size: 0.72rem; font-weight: 600; font-family: inherit;
      padding: 6px 14px; border-radius: var(--ag-radius-xl);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-secondary); cursor: pointer; transition: all .15s;
    }
    .cvm-today-btn:hover { border-color: var(--ag-primary); color: var(--ag-primary); }
    .cvm-actions { display: flex; gap: 8px; }

    /* ─── Grid ─── */
    .cvm-grid { border: 1px solid var(--ag-border); border-radius: var(--ag-radius-md); overflow: hidden; }

    .cvm-day-headers {
      display: grid; grid-template-columns: repeat(7, 1fr) 120px;
      background: var(--ag-bg-surface); border-bottom: 1px solid var(--ag-border);
    }
    .cvm-day-header {
      text-align: center; font-size: 0.68rem; font-weight: 700;
      color: var(--ag-text-muted); padding: 8px 4px;
      text-transform: uppercase; letter-spacing: 0.5px;
    }
    .cvm-week-summary-header {
      font-size: 0.62rem; border-left: 1px solid var(--ag-border);
    }

    /* ─── Week row ─── */
    .cvm-week-row {
      display: grid; grid-template-columns: repeat(7, 1fr) 120px;
      border-bottom: 1px solid var(--ag-border);
      min-height: 100px;
    }
    .cvm-week-row:last-child { border-bottom: none; }

    /* ─── Day cell ─── */
    .cvm-cell {
      border-right: 1px solid var(--ag-border);
      padding: 4px 5px; position: relative;
      cursor: pointer; transition: background .1s;
      display: flex; flex-direction: column; gap: 3px;
      min-height: 90px;
    }
    .cvm-cell:nth-child(7) { border-right: none; }
    .cvm-cell:hover { background: var(--ag-bg-hover); }
    .cvm-cell.cvm-today { background: rgba(249,115,22,0.04); }
    .cvm-cell.cvm-other-month { opacity: 0.35; }

    .cvm-cell-num {
      font-size: 0.72rem; font-weight: 700;
      color: var(--ag-text-muted); line-height: 1;
    }
    .cvm-cell.cvm-today .cvm-cell-num {
      color: var(--ag-primary); font-weight: 800;
      background: rgba(249,115,22,0.12); border-radius: 50%;
      width: 22px; height: 22px; display: flex; align-items: center;
      justify-content: center;
    }

    /* ─── Session/activity chips ─── */
    .cvm-chip {
      display: flex; align-items: center; gap: 4px;
      padding: 2px 5px; border-radius: 4px;
      font-size: 0.62rem; font-weight: 600;
      background: var(--ag-bg-card);
      border: 1px solid var(--ag-border);
      cursor: pointer; transition: all .1s;
      overflow: hidden; white-space: nowrap;
    }
    .cvm-chip:hover { border-color: var(--ag-border-med); background: var(--ag-bg-elevated); }
    .cvm-chip.cvm-orphan { background: rgba(6,182,212,0.04); }
    .cvm-chip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
    .cvm-chip-label { flex: 1; overflow: hidden; text-overflow: ellipsis; color: var(--ag-text-secondary); }
    .cvm-chip-dur { color: var(--ag-text-muted); font-size: 0.58rem; flex-shrink: 0; }
    .cvm-chip-done { font-size: 0.58rem; font-weight: 700; flex-shrink: 0; }

    /* Chip visual states */
    .cvm-chip-future { border-left-color: transparent !important; }
    .cvm-chip-future .cvm-chip-label { color: var(--ag-text-primary); }
    .cvm-chip-future .cvm-chip-dur { color: var(--ag-text-secondary); }
    .cvm-chip-missed { opacity: 0.45; }
    .cvm-chip-missed .cvm-chip-label { text-decoration: line-through; color: var(--ag-text-muted); }
    .cvm-chip-ok { border-left-color: #22c55e !important; }

    /* ─── Sprint 3.B.2 / Change 4 — Squelettes virtuels Orion ─── */
    .cvm-chip-virtual {
      background: linear-gradient(90deg, rgba(167,139,250,0.10), rgba(167,139,250,0.20)) !important;
      border-left: 3px solid var(--ag-violet) !important;
      color: var(--ag-violet) !important;
      opacity: 0.7;
      animation: orion-pulse 2s ease-in-out infinite;
      cursor: default !important;
    }
    .cvm-chip-virtual:hover {
      background: linear-gradient(90deg, rgba(167,139,250,0.10), rgba(167,139,250,0.20)) !important;
      border-color: var(--ag-violet) !important;
    }
    .cvm-chip-virtual .cvm-chip-label {
      color: var(--ag-violet) !important;
    }
    @keyframes orion-pulse {
      0%, 100% { opacity: 0.5; }
      50%      { opacity: 0.9; }
    }
    .cvm-mini-spinner {
      width: 10px;
      height: 10px;
      border: 1.5px solid rgba(167,139,250,0.3);
      border-top-color: var(--ag-violet);
      border-radius: 50%;
      animation: orion-spin 0.8s linear infinite;
      display: inline-block;
      flex-shrink: 0;
    }
    @keyframes orion-spin {
      to { transform: rotate(360deg); }
    }

    /* ─── Sprint 3.B.2 / Change 7 — Bandeau doctrinal Orion (bottom-right) ─── */
    .orion-doctrinal-banner {
      position: fixed;
      bottom: 20px;
      right: 20px;
      display: flex;
      align-items: center;
      background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.95));
      border: 1px solid rgba(167,139,250,0.3);
      border-radius: 12px;
      padding: 12px 16px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.4);
      z-index: 9999;
      max-width: 380px;
      animation: orion-banner-in 0.4s ease-out;
      backdrop-filter: blur(12px);
    }
    .orion-banner-icon {
      font-size: 24px;
      color: var(--ag-violet);
      margin-right: 12px;
    }
    .orion-pulse {
      display: inline-block;
      animation: orion-pulse-icon 2s ease-in-out infinite;
    }
    @keyframes orion-pulse-icon {
      0%, 100% { transform: scale(1);    opacity: 1;   }
      50%      { transform: scale(1.15); opacity: 0.7; }
    }
    .orion-banner-content { min-width: 0; }
    .orion-banner-title {
      font-size: 12px;
      color: var(--ag-violet);
      text-transform: uppercase;
      font-weight: 600;
      margin-bottom: 4px;
      letter-spacing: 0.5px;
    }
    .orion-banner-msg {
      font-size: 13px;
      color: #fff;
      transition: opacity 0.3s ease;
      line-height: 1.4;
    }
    @keyframes orion-banner-in {
      from { transform: translateY(20px); opacity: 0; }
      to   { transform: translateY(0);    opacity: 1; }
    }
    @media (max-width: 640px) {
      .orion-doctrinal-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
      }
    }

    /* ─── Mini workout preview ─── */
    .cvm-mini-wk { border-radius: 3px; overflow: hidden; min-height: 20px; }

    /* ─── Add button (empty days) ─── */
    .cvm-add {
      color: var(--ag-text-muted); font-size: 1rem; font-weight: 300;
      text-align: center; cursor: pointer; padding: 4px;
      opacity: 0; transition: opacity .15s;
    }
    .cvm-cell:hover .cvm-add { opacity: 1; }

    /* ─── Weekly summary (8th column) ─── */
    .cvm-week-summary {
      border-left: 1px solid var(--ag-border);
      padding: 6px 8px; display: flex; flex-direction: column;
      gap: 3px; justify-content: center;
    }
    .cvm-ws-num { font-size: 0.65rem; font-weight: 700; color: var(--ag-text-muted); }
    .cvm-ws-stat { font-size: 0.72rem; font-weight: 700; color: var(--ag-text-secondary); }
    .cvm-ws-bar {
      height: 3px; background: var(--ag-bg-elevated); border-radius: 2px;
      overflow: hidden;
    }
    .cvm-ws-bar > div { height: 100%; border-radius: 2px; transition: width .4s var(--ag-ease); }
    .cvm-ws-vol { font-size: 0.62rem; color: var(--ag-text-muted); }

    /* ─── Panel overlay ─── */
    .cvm-panel-overlay {
      display: none; position: fixed; inset: 0; z-index: 900;
      background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    }
    .cvm-panel-overlay.open { display: block; }

    .cvm-panel {
      position: fixed; top: 0; right: -420px; bottom: 0;
      width: 400px; max-width: 90vw; z-index: 901;
      background: var(--ag-bg-surface); border-left: 1px solid var(--ag-border);
      overflow-y: auto; transition: right .3s cubic-bezier(.22,1,.36,1);
      padding: 16px;
    }
    .cvm-panel.open { right: 0; box-shadow: -8px 0 30px rgba(0,0,0,0.3); }

    /* ─── Loading ─── */
    .cvm-loading {
      display: flex; align-items: center; justify-content: center;
      gap: 10px; padding: 60px; color: var(--ag-text-muted);
      font-size: 0.82rem;
    }

    /* ─── Mobile ─── */
    @media (max-width: 768px) {
      .fiche-full-width { padding: 0 8px; }
      .cvm-header { flex-direction: column; gap: 8px; }
      .cvm-day-headers { grid-template-columns: repeat(7, 1fr); }
      .cvm-week-summary-header { display: none; }
      .cvm-week-row { grid-template-columns: repeat(7, 1fr); min-height: 60px; }
      .cvm-week-summary { display: none; }
      .cvm-cell { min-height: 50px; padding: 2px 3px; }
      .cvm-cell-num { font-size: 0.62rem; }
      .cvm-chip { padding: 1px 3px; font-size: 0.55rem; }
      .cvm-chip-label { display: none; }
      .cvm-chip-dur { display: none; }
      .cvm-chip-done { font-size: 0.5rem; }
      .cvm-mini-wk { display: none; }
      .cvm-month-title { font-size: 0.9rem; min-width: 120px; }
      .cvm-panel { width: 100%; max-width: 100vw; right: -100vw; }
    }

    /* ═══ SPRINT 17 — Panel overlay content ═══ */

    .cvm-panel .calp-header { position: sticky; top: 0; background: var(--ag-bg-surface); z-index: 5; padding-bottom: 12px; border-bottom: 1px solid var(--ag-border); margin-bottom: 12px; }
    .cvm-panel .calp-stats { grid-template-columns: repeat(3, 1fr); }
    .cvm-panel .calp-map { height: 180px; }
    .cvm-panel .calp-section { margin-bottom: 14px; }
    .cvm-panel .calp-textarea { width: 100%; background: var(--ag-bg-card); border: 1px solid var(--ag-border); border-radius: var(--ag-radius-sm); color: var(--ag-text-primary); font-family: inherit; font-size: .78rem; padding: 8px; resize: vertical; }
    .cvm-panel .calp-textarea:focus { border-color: var(--ag-primary); outline: none; }

    /* ═══ SPRINT 18 — Carte Athlète ═══ */

    .carte-index-hero {
      display: flex; align-items: center; gap: 16px;
      padding: 20px; margin-bottom: 20px;
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-lg);
    }
    .carte-index-ring {
      width: 72px; height: 72px; border-radius: 50%;
      border: 3px solid; display: flex; align-items: center;
      justify-content: center; flex-shrink: 0;
      background: var(--ag-bg-base);
    }
    .carte-index-score { font-size: 1.6rem; font-weight: 800; }
    .carte-index-info { flex: 1; }
    .carte-index-level { font-size: 1rem; font-weight: 800; }
    .carte-index-label { font-size: 0.68rem; font-weight: 600; color: var(--ag-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

    .carte-sources { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }


    /* ═══ SPRINT 19 — Template Library Sidebar ═══ */

    .cvm-layout { display: flex; gap: 0; position: relative; }
    .cvm-main { flex: 1; min-width: 0; }

    .cvm-sidebar {
      width: 0; overflow: hidden; transition: width .3s cubic-bezier(.22,1,.36,1);
      background: var(--ag-bg-surface); border-right: 1px solid var(--ag-border);
      flex-shrink: 0; display: flex; flex-direction: column;
      position: sticky; top: 0; max-height: 100vh; align-self: flex-start;
    }
    .cvm-sidebar.open { width: 280px; }

    .lib-side-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 14px; border-bottom: 1px solid var(--ag-border);
    }
    .lib-side-title { font-size: 0.88rem; font-weight: 800; color: var(--ag-text-primary); }
    .lib-side-close {
      background: none; border: none; color: var(--ag-text-muted);
      font-size: 1.2rem; cursor: pointer; font-family: inherit;
    }

    .lib-side-filters {
      display: flex; gap: 4px; padding: 8px 14px; flex-wrap: wrap;
    }
    .lib-side-filter {
      font-size: 0.62rem; font-weight: 600; font-family: inherit;
      padding: 3px 8px; border-radius: var(--ag-radius-xl);
      border: 1px solid var(--ag-border); background: transparent;
      color: var(--ag-text-muted); cursor: pointer; transition: all .15s;
    }
    .lib-side-filter.active { background: var(--ag-primary); color: #fff; border-color: var(--ag-primary); }
    .lib-side-filter:hover:not(.active) { border-color: var(--ag-primary); color: var(--ag-primary); }

    .lib-side-search {
      margin: 0 14px 8px; padding: 6px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-primary); font-family: inherit; font-size: 0.75rem;
      width: calc(100% - 28px);
    }
    .lib-side-search:focus { border-color: var(--ag-primary); outline: none; }

    .lib-side-list {
      flex: 1; overflow-y: auto; padding: 0 10px 10px;
    }
    .lib-side-empty {
      text-align: center; padding: 24px 12px; color: var(--ag-text-muted);
      font-size: 0.78rem;
    }
    .lib-side-item {
      background: var(--ag-bg-card); border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-sm); padding: 8px 10px;
      margin-bottom: 6px; cursor: grab; transition: all .15s;
    }
    .lib-side-item:hover { border-color: var(--ag-primary); background: var(--ag-bg-elevated); }
    .lib-side-item:active { cursor: grabbing; }
    .lib-side-item-head { display: flex; align-items: center; gap: 6px; }
    .lib-side-item-icon { font-size: 0.72rem; }
    .lib-side-item-title { font-size: 0.75rem; font-weight: 700; color: var(--ag-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lib-side-item-meta { font-size: 0.62rem; color: var(--ag-text-muted); margin-top: 2px; }
    .lib-side-mini { border-radius: 3px; overflow: hidden; margin-top: 4px; min-height: 28px; }
    .lib-side-item-drag { font-size: 0.58rem; color: var(--ag-text-muted); margin-top: 4px; opacity: 0; transition: opacity .15s; text-align: center; }
    .lib-side-item:hover .lib-side-item-drag { opacity: 1; }
    .lib-side-item.lib-selected { border-color: var(--ag-primary); background: var(--ag-ov-orange); box-shadow: 0 0 0 2px rgba(249,115,22,.2); }
    .lib-side-item.lib-selected .lib-side-item-drag { opacity: 1; color: var(--ag-primary); font-weight: 600; }

    /* AGOGE officielle dans la sidebar : liseré gauche doré + badge + bouton masquer */
    .lib-side-item.is-official {
      border-left: 2px solid #d4a017;
      position: relative;
    }
    .lib-side-item-badge-official {
      display: inline-block;
      font-size: 0.55rem; font-weight: 800;
      letter-spacing: .5px; text-transform: uppercase;
      color: #d4a017;
      background: rgba(212,160,23,.10);
      border: 1px solid rgba(212,160,23,.25);
      padding: 0 4px; border-radius: 3px;
      margin-right: 4px;
      vertical-align: 1px;
    }
    .lib-side-hide {
      position: absolute; top: 6px; right: 6px;
      width: 22px; height: 22px;
      border-radius: 50%;
      border: 1px solid transparent;
      background: rgba(0,0,0,.35);
      color: var(--ag-text-muted);
      cursor: pointer; opacity: 0;
      display: flex; align-items: center; justify-content: center;
      transition: opacity .15s, color .15s, border-color .15s;
      backdrop-filter: blur(4px);
      font-size: .9rem; line-height: 1;
      padding: 0;
    }
    .lib-side-item:hover .lib-side-hide { opacity: 1; }
    .lib-side-hide:hover { color: var(--ag-rose,#fb7185); border-color: rgba(251,113,133,.35); }

    .lib-side-footer { padding: 10px 14px; border-top: 1px solid var(--ag-border); }

    /* Drop target highlighting on calendar cells */
    .cvm-cell.cvm-drop-target { background: rgba(249,115,22,0.02); }
    .cvm-cell.cvm-drag-over { background: var(--ag-ov-orange) !important; outline: 2px dashed var(--ag-primary); outline-offset: -2px; }

    /* Template form in panel */
    .lib-new-form .ag-input {
      width: 100%; padding: 6px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-primary); font-family: inherit; font-size: 0.78rem;
    }
    .lib-new-form .ag-input:focus { border-color: var(--ag-primary); outline: none; }

    /* Mobile sidebar */
    @media (max-width: 768px) {
      .cvm-sidebar {
        position: fixed; left: -100vw; top: 0; bottom: 0;
        width: 85vw !important; z-index: 950;
        transition: left .3s cubic-bezier(.22,1,.36,1);
      }
      .cvm-sidebar.open { left: 0; width: 85vw !important; box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
    }

    /* ═══ SPRINT 20 — Orion Generation Modal ═══ */

    .orion-modal-title {
      font-size: 1.1rem; font-weight: 800; color: var(--ag-violet);
      margin-bottom: 4px;
    }
    .orion-modal-sub {
      font-size: 0.78rem; color: var(--ag-text-muted);
      margin-bottom: 16px; line-height: 1.5;
    }
    .orion-row {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 12px; flex-wrap: wrap;
    }
    .orion-row > label {
      width: 130px; flex-shrink: 0;
      font-size: 0.75rem; font-weight: 600; color: var(--ag-text-secondary);
    }
    .orion-row .ag-input {
      padding: 6px 10px; border-radius: var(--ag-radius-sm);
      border: 1px solid var(--ag-border); background: var(--ag-bg-card);
      color: var(--ag-text-primary); font-family: inherit; font-size: 0.78rem;
    }
    .orion-row .ag-input:focus { border-color: var(--ag-violet); outline: none; }
    .orion-weeks {
      font-size: 0.72rem; font-weight: 700; color: var(--ag-violet);
      padding: 3px 10px; background: var(--ag-ov-violet);
      border-radius: var(--ag-radius-xl);
    }
    .orion-sports {
      display: flex; gap: 8px; flex-wrap: wrap; flex: 1;
    }
    .orion-sport-check {
      font-size: 0.72rem; color: var(--ag-text-secondary);
      display: flex; align-items: center; gap: 4px; cursor: pointer;
    }
    .orion-sport-check input { accent-color: var(--ag-violet); }
    .orion-credits {
      font-size: 0.72rem; color: var(--ag-text-muted);
      padding: 10px 14px; margin-top: 8px;
      background: rgba(167,139,250,0.04); border: 1px solid rgba(167,139,250,0.1);
      border-radius: var(--ag-radius-sm);
    }
    .orion-credits strong { color: var(--ag-violet); }

    /* ═══ BUG-FRONTEND-01 fix (5 mai 2026) — Modal Orion V2 ═══ */

    .orion-radio-group {
      display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    }
    .orion-radio-label {
      display: flex; align-items: center; gap: 6px;
      font-size: 0.78rem; color: var(--ag-text-secondary);
      cursor: pointer;
    }
    .orion-radio-label input[type="radio"] { accent-color: var(--ag-violet); margin: 0; }
    .orion-radio-label.disabled { cursor: not-allowed; opacity: 0.5; }

    .orion-day-chips {
      display: flex; gap: 6px; flex-wrap: wrap; flex: 1;
    }
    .orion-day-chip {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 5px 10px;
      background: var(--ag-bg-card);
      border: 1px solid var(--ag-border);
      border-radius: var(--ag-radius-xl);
      font-size: 0.72rem; color: var(--ag-text-secondary);
      cursor: pointer;
      transition: all 0.18s cubic-bezier(.22, 1, .36, 1);
    }
    .orion-day-chip:hover {
      border-color: rgba(167,139,250,0.3);
      background: rgba(167,139,250,0.04);
    }
    .orion-day-chip input[type="checkbox"] { accent-color: var(--ag-violet); margin: 0; }
    .orion-day-chip:has(input:checked) {
      background: rgba(167,139,250,0.10);
      border-color: rgba(167,139,250,0.45);
      color: var(--ag-violet);
      font-weight: 600;
    }

    .orion-day-hint {
      font-size: 0.68rem; color: var(--ag-text-muted);
      margin-top: 4px; width: 100%;
      font-style: italic;
    }

    .orion-helper {
      font-size: 0.7rem; color: var(--ag-text-muted);
      padding: 0 8px; font-style: italic;
    }


    /* ═══ SPRINT 21 — Zone hints & enriched creation ═══ */

    .asd-zone-hint { margin-top: 4px; min-height: 20px; }
    .asd-zone-badges { display: flex; gap: 6px; flex-wrap: wrap; }
    .asd-zone-badge {
      font-size: 0.68rem; font-weight: 700; padding: 3px 10px;
      border-radius: var(--ag-radius-xl); border: 1px solid;
      background: transparent;
    }
    .asd-zone-badge small { font-weight: 500; opacity: 0.7; }
    /* ═══ SPRINT 22-23 — Athlete card mini calendar + planning ═══ */

    .ac-mini-cal {
      display: flex; gap: 2px; padding: 8px 0 4px; justify-content: center;
    }
    .ac-cal-day {
      display: flex; flex-direction: column; align-items: center; gap: 1px;
      width: 22px;
    }
    .ac-cal-letter {
      font-size: 0.5rem; font-weight: 600; color: var(--ag-text-muted);
      line-height: 1; text-transform: uppercase;
    }
    .ac-cal-dot {
      width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    }
    .ac-cal-num {
      font-size: 0.48rem; font-weight: 500; color: var(--ag-text-muted);
      line-height: 1;
    }

    .ac-planning-strip {
      display: flex; align-items: center; justify-content: space-between;
      font-size: 0.72rem; color: var(--ag-text-secondary);
      padding: 6px 10px; margin-top: 6px;
      border-left: 3px solid; border-radius: 0 var(--ag-radius-sm) var(--ag-radius-sm) 0;
      background: rgba(255,255,255,0.02);
    }

    .ac-notifs {
      display: flex; gap: 6px; margin-top: 6px;
    }
    /* Sprint 2 — notif-badge passe en amber par défaut (msg + comment partagent la couleur).
       La distinction sémantique passe par l'icône : enveloppe = msg, bulle = commentaire. */
    .ac-notif-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 0.65rem; font-weight: 700; padding: 3px 8px;
      border-radius: var(--ag-radius-xl); cursor: pointer;
      background: rgba(251,191,36,0.1); color: #fbbf24;
      border: 1px solid rgba(251,191,36,0.2);
      transition: background 0.15s var(--ag-ease);
    }
    .ac-notif-badge:hover { background: rgba(251,191,36,0.2); }
    /* Anciennes classes .ac-notif-fb conservées pour compat (mêmes couleurs amber désormais). */
    .ac-notif-fb {
      background: rgba(251,191,36,0.1); color: #fbbf24;
      border-color: rgba(251,191,36,0.2);
    }
    .ac-notif-fb:hover { background: rgba(251,191,36,0.2); }

    /* Chips calendrier plus visibles */
    .cvm-chip {
      background: var(--ag-bg-elevated); color: var(--ag-text-primary);
      font-weight: 700;
    }
    .cvm-chip:hover { background: var(--ag-bg-hover); }
    .cvm-chip-label { color: var(--ag-text-primary); }
    .cvm-chip-dur { color: var(--ag-text-secondary); font-weight: 600; }

    /* ═══ SPRINT 22 — Panel detail enrichment ═══ */

    /* Workout blocks text list */
    .cvp-blocks-list { display: flex; flex-direction: column; gap: 4px; }
    .cvp-block-row {
      display: flex; align-items: center; gap: 8px;
      padding: 5px 8px; border-radius: var(--ag-radius-sm);
      background: var(--ag-bg-card); font-size: 0.75rem;
    }
    .cvp-block-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .cvp-block-text { flex: 1; color: var(--ag-text-primary); font-weight: 600; }
    .cvp-block-dur { color: var(--ag-text-muted); font-size: 0.68rem; font-weight: 500; }

    /* Plan vs Réel comparison */
    .cvp-proj-subtitle {
      font-size: 0.62rem; color: var(--ag-text-muted); font-weight: 500;
      margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
    }
    .cid-proj-intro {
      font-size: 0.68rem; color: var(--ag-text-muted); font-style: italic;
      margin: 8px 0 6px; line-height: 1.4;
    }
    .cid-proj-legend {
      display: flex; gap: 14px; flex-wrap: wrap;
      padding: 8px 0 2px; font-size: 0.72rem;
    }
    .cid-proj-leg {
      display: inline-flex; align-items: center; gap: 5px;
      color: var(--ag-text-secondary); font-weight: 500;
    }
    .cid-proj-leg strong { font-weight: 800; }
    .cid-proj-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: var(--leg-col); flex-shrink: 0;
    }
    .cvp-compare { display: flex; flex-direction: column; gap: 4px; }
    .cvp-cmp-row {
      display: flex; align-items: center; gap: 6px;
      padding: 5px 8px; border-radius: var(--ag-radius-sm);
      background: var(--ag-bg-card); font-size: 0.75rem;
    }
    .cvp-cmp-label { width: 55px; font-weight: 600; color: var(--ag-text-muted); font-size: 0.68rem; text-transform: uppercase; }
    .cvp-cmp-plan { flex: 1; color: var(--ag-text-secondary); }
    .cvp-cmp-arrow { color: var(--ag-text-muted); font-size: 0.65rem; }
    .cvp-cmp-real { flex: 1; font-weight: 700; }
    .cvp-cmp-ratio { width: 35px; text-align: right; font-weight: 800; font-size: 0.72rem; }

    /* ═══ PMC — Performance Management Chart ═══ */

    .pmc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
    .pmc-stat { text-align: center; background: var(--ag-bg-card); border: 1px solid var(--ag-border); border-radius: var(--ag-radius-sm); padding: 10px 6px; }
    .pmc-stat-val { font-size: 1.3rem; font-weight: 800; line-height: 1; }
    .pmc-stat-label { font-size: 0.62rem; font-weight: 600; color: var(--ag-text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.3px; }

    .pmc-legend { display: flex; gap: 14px; justify-content: center; padding: 8px 0 4px; }
    .pmc-leg { font-size: 0.65rem; font-weight: 600; }


    /* PMC projection badges on calendar chips */
    .cvm-chip-proj {
      font-size: 0.5rem; font-weight: 600; color: var(--ag-text-muted);
      white-space: nowrap; overflow: hidden;
    }

    @media (max-width: 768px) {
      .pmc-stats { grid-template-columns: repeat(2, 1fr); }
    }

    /* ═══ INLINE SESSION DETAIL — expands under week row ═══ */

    .cvm-inline-detail {
      max-height: 0; overflow: hidden; opacity: 0;
      transition: max-height .4s cubic-bezier(.22,1,.36,1), opacity .3s ease;
      background: var(--ag-bg-surface);
      border-bottom: 1px solid var(--ag-border-med);
    }
    .cvm-inline-detail.open {
      max-height: 900px; opacity: 1;
      border-top: 1px solid var(--ag-border-med);
    }

    .cid-inner { padding: 20px 24px; }

    .cid-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      margin-bottom: 16px;
    }
    .cid-header-left { flex: 1; }
    .cid-sport { font-size: 1.1rem; font-weight: 800; display: block; }
    .cid-date { font-size: 0.75rem; color: var(--ag-text-muted); margin-top: 2px; display: block; }
    .cid-close {
      background: none; border: 1px solid var(--ag-border); color: var(--ag-text-muted);
      width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
      font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
      font-family: inherit; transition: all .15s;
    }
    .cid-close:hover { background: var(--ag-bg-elevated); color: var(--ag-text-primary); }

    .cid-columns {
      display: grid; grid-template-columns: 3fr 2fr; gap: 20px;
    }
    .cid-left, .cid-right {
      min-width: 0;
    }

    .cid-sec-title {
      font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.5px; color: var(--ag-text-muted); margin-bottom: 8px;
    }

    /* Zone FC bars */
    .cid-zone-bars { display: flex; flex-direction: column; gap: 4px; }
    .cid-zone-row { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; }
    .cid-zone-name { width: 85px; color: var(--ag-text-secondary); font-weight: 600; }
    .cid-zone-track {
      flex: 1; height: 6px; background: var(--ag-bg-card);
      border-radius: 3px; overflow: hidden;
    }
    .cid-zone-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }
    .cid-zone-pct { width: 28px; text-align: right; font-weight: 700; color: var(--ag-text-primary); }
    .cid-zone-min { width: 36px; text-align: right; color: var(--ag-text-muted); }

    /* Stats compactes (past session) */
    .cid-stats {
      display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
    }
    .cid-stat-item {
      font-size: 0.68rem; font-weight: 600; color: var(--ag-text-secondary);
      padding: 3px 8px; background: var(--ag-bg-card);
      border: 1px solid var(--ag-border); border-radius: var(--ag-radius-xl);
    }

    /* Bottom: note + actions */
    .cid-bottom {
      display: flex; align-items: flex-end; gap: 12px;
      margin-top: 16px; padding-top: 12px;
      border-top: 1px solid var(--ag-border);
    }
    .cid-note-area { flex: 1; }
    .cid-note-area textarea {
      width: 100%; resize: vertical; font-size: 0.78rem;
      min-height: 36px;
    }
    .cid-actions {
      display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap;
    }

    @media (max-width: 900px) {
      .cid-columns { grid-template-columns: 1fr; }
      .cid-inner { padding: 14px 16px; }
    }

    /* ═══ Builder centered modal ═══ */
    .cid-builder-overlay {
      position: fixed; inset: 0; z-index: 1000;
      background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
      display: flex; align-items: center; justify-content: center;
      animation: fadeIn .2s ease;
    }
    .cid-builder-dialog {
      background: var(--ag-bg-surface); border: 1px solid var(--ag-border-med);
      border-radius: var(--ag-radius-md);
      width: 94vw; max-width: 1000px; max-height: 92vh;
      display: flex; flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    }
    .cid-builder-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      padding: 16px 20px; border-bottom: 1px solid var(--ag-border);
    }

    /* Workout preview axes */
    .cid-wk-axes {
      display: flex; justify-content: space-between;
      padding: 2px 4px 0; font-size: 0.58rem; color: var(--ag-text-muted);
    }
    .cid-wk-axis-y { font-weight: 600; }
    .cid-wk-axis-x { }

    /* Bigger inline preview */
    #cid-wk-preview {
      min-height: 140px;
    }

    /* ═══ Activity inline detail — Sprint A ═══ */
    .cid-stats-grid {
      display: flex; flex-wrap: wrap; gap: 6px 14px;
      padding: 10px 0 14px; border-bottom: 1px solid var(--ag-border);
      margin-bottom: 14px;
    }
    .cid-stat-item { text-align: center; min-width: 56px; }
    .cid-stat-val { font-weight: 800; font-size: 0.92rem; line-height: 1.2; }
    .cid-stat-label { font-size: 0.58rem; color: var(--ag-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }

    .cid-rpe-hero {
      display: flex; align-items: baseline; gap: 8px; padding: 6px 0;
    }
    .cid-rpe-val { font-size: 1.8rem; font-weight: 900; line-height: 1; }
    .cid-rpe-label { font-size: 0.72rem; color: var(--ag-text-muted); font-weight: 600; }

    .cid-wellbeing {
      display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0;
    }
    .cid-wb-item {
      display: flex; align-items: center; gap: 4px;
      font-size: 0.72rem; font-weight: 600;
    }
    .cid-wb-label { color: var(--ag-text-muted); }

    .cid-pain-flag {
      display: flex; align-items: center; gap: 5px;
      padding: 6px 10px; margin: 6px 0; border-radius: var(--ag-radius-sm);
      background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
      color: var(--ag-rose); font-size: 0.78rem; font-weight: 600;
    }
    .cid-ath-comment {
      font-size: 0.78rem; color: var(--ag-text-secondary); font-style: italic;
      padding: 8px 10px; margin: 6px 0; line-height: 1.5;
      background: var(--ag-bg-card); border-radius: var(--ag-radius-sm);
      border-left: 3px solid var(--ag-border-med);
    }
    .cid-discrepancy {
      display: flex; align-items: center; gap: 5px;
      padding: 5px 10px; margin: 6px 0; border-radius: var(--ag-radius-sm);
      background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.15);
      color: var(--ag-amber); font-size: 0.7rem; font-weight: 600;
    }
    .cid-charge-row {
      display: flex; gap: 16px; padding: 8px 0;
    }
    .cid-charge-item { text-align: center; }
    .cid-charge-val { font-size: 1.2rem; font-weight: 800; display: block; }
    .cid-charge-label { font-size: 0.6rem; color: var(--ag-text-muted); font-weight: 600; text-transform: uppercase; }

    .cid-intensity-bar {
      height: 12px; border-radius: 3px; overflow: hidden; margin-bottom: 10px;
    }
    .cid-gps-container { background: #1a1a1f; }

    /* ═══ Activity Charts System — Sprint B ═══ */
    .cid-charts-wrap {
      position: relative; margin-bottom: 14px;
      border: 1px solid var(--ag-border); border-radius: var(--ag-radius-md);
      overflow: hidden; background: #16161c;
    }
    .cid-chart-row {
      position: relative; border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .cid-chart-row:last-of-type { border-bottom: none; }
    .cid-chart-row canvas { display: block; width: 100%; }
    .cid-chart-label {
      position: absolute; top: 3px; right: 6px;
      font-size: 0.55rem; font-weight: 700; color: #a78bfa;
      text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7;
      pointer-events: none;
    }
    .cid-chart-tooltip {
      display: none; position: absolute; top: 3px;
      transform: translateX(-50%);
      font-size: 0.6rem; font-weight: 700; color: #fff;
      background: rgba(0,0,0,0.7); padding: 1px 5px; border-radius: 3px;
      pointer-events: none; white-space: nowrap; z-index: 5;
    }
    .cid-chart-xaxis {
      position: relative; height: 16px; padding: 0;
      font-size: 0.55rem; color: #64748b; font-weight: 500;
    }
    .cid-chart-xaxis span {
      position: absolute; transform: translateX(-50%); bottom: 2px;
    }
    .cid-charts-overlay {
      position: absolute; top: 0; left: 0; right: 0; bottom: 16px;
      z-index: 10; cursor: crosshair;
    }
    .cid-xh-line {
      display: none; position: absolute; top: 0; bottom: 0; width: 1px;
      background: rgba(255,255,255,0.4); pointer-events: none; z-index: 4;
    }
    .cid-crosshair-dot {
      display: none; position: absolute; width: 10px; height: 10px;
      border-radius: 50%; background: #fff; border: 2px solid #f97316;
      transform: translate(-50%, -50%); pointer-events: none; z-index: 15;
      box-shadow: 0 0 8px rgba(249,115,22,0.5);
    }

    /* Block list: time markers */
    .cvp-block-time {
      font-size: 0.62rem; color: var(--ag-text-muted); font-weight: 600;
      min-width: 28px; text-align: right; flex-shrink: 0;
      font-variant-numeric: tabular-nums;
    }
    .cvp-block-total {
      border-top: 1px solid var(--ag-border);
      padding-top: 6px; margin-top: 4px;
      font-weight: 700; font-size: 0.78rem;
      color: var(--ag-text-secondary);
    }
    .cvp-block-total .cvp-block-time {
      color: var(--ag-text-primary); font-size: 0.72rem;
    }

    /* Builder modal: metadata fields */
    .wkb-meta {
      padding: 16px 0 8px; border-bottom: 1px solid var(--ag-border);
      margin-bottom: 12px;
    }
    .wkb-meta-row {
      display: flex; gap: 12px; margin-bottom: 10px;
    }
    .wkb-meta-field {
      display: flex; flex-direction: column; gap: 4px;
    }
    .wkb-meta-field label {
      font-size: 0.7rem; font-weight: 600; color: var(--ag-text-muted);
      text-transform: uppercase; letter-spacing: 0.03em;
    }
    .wkb-meta-field .ag-input {
      font-size: 0.82rem;
    }
    /* ═══════════════════════════════════════
       INDEX PROJECTION — Coach Panel
       ═══════════════════════════════════════ */
    .cipj-empty {
      padding: 14px; color: var(--ag-text-muted); font-size: .78rem;
      text-align: center; font-style: italic;
    }
    .cipj-header {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 0 4px; flex-wrap: wrap;
    }
    .cipj-score-block { text-align: center; min-width: 48px; }
    .cipj-score-val {
      font-size: 1.4rem; font-weight: 900;
      font-family: 'Plus Jakarta Sans', system-ui;
      line-height: 1.1;
    }
    .cipj-score-label {
      font-size: .65rem; color: var(--ag-text-muted);
      text-transform: uppercase; letter-spacing: 0.03em;
      font-weight: 600; margin-top: 2px;
    }
    .cipj-arrow {
      display: flex; align-items: center;
      opacity: 0.7; margin: 0 2px;
    }
    .cipj-delta {
      font-size: .85rem; font-weight: 800;
      margin-left: auto; padding: 3px 8px;
      border-radius: 6px;
      background: rgba(255,255,255,0.04);
    }
    /* Pillars */
    .cipj-pillars { margin: 8px 0 6px; }
    .cipj-pillar-row {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 5px;
    }
    .cipj-p-label {
      width: 76px; font-size: .7rem; font-weight: 600;
      color: var(--ag-text-secondary); flex-shrink: 0;
    }
    .cipj-p-bar {
      flex: 1; height: 6px; border-radius: 3px;
      background: rgba(255,255,255,0.05);
      position: relative; overflow: hidden;
    }
    .cipj-p-fill {
      position: absolute; top: 0; left: 0; height: 100%;
      border-radius: 3px; transition: width 0.5s ease;
    }
    .cipj-p-base { opacity: 0.2; }
    .cipj-p-proj {
      animation: cipjFillIn 0.6s ease both;
    }
    @keyframes cipjFillIn {
      from { width: 0 !important; }
    }
    .cipj-p-val {
      width: 60px; text-align: right; font-size: .7rem;
      font-weight: 700; flex-shrink: 0; white-space: nowrap;
    }
    .cipj-up { color: #34d399; font-size: .6rem; margin-left: 3px; }
    .cipj-down { color: #fb7185; font-size: .6rem; margin-left: 3px; }
    /* Insight */
    .cipj-insight {
      font-size: .72rem; color: var(--ag-text-secondary);
      margin-top: 6px; padding: 6px 10px;
      background: var(--ag-bg-card); border-radius: var(--ag-radius-sm);
      line-height: 1.5;
    }

    /* ═══ Découplage cardiaque ═══ */
    .cid-drift-hbar {
      display: flex; height: 28px; border-radius: 6px;
      overflow: hidden; margin: 6px 0 4px;
    }
    .cid-drift-seg {
      display: flex; align-items: center; justify-content: center;
      font-size: .72rem; font-weight: 800; color: #fff;
      font-family: 'Plus Jakarta Sans', system-ui;
      transition: width 0.5s ease;
    }
    .cid-drift-seg-1 { background: var(--ag-cyan); }
    .cid-drift-seg-2 { /* color set inline */ }
    .cid-drift-seg span { text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
    .cid-drift-legend {
      display: flex; justify-content: space-between;
      font-size: .6rem; color: var(--ag-text-muted);
      font-weight: 600; padding: 0 2px;
    }
    .cid-drift-legend span:nth-child(2) {
      font-size: .62rem; font-weight: 700; text-align: center;
    }
    /* ═══ Comparaison séance similaire ═══ */
    .cid-compare-prev {
      margin-bottom: 12px; padding-bottom: 10px;
      border-bottom: 1px solid var(--ag-border);
    }
    .cid-cmp-grid {
      display: flex; flex-wrap: wrap; gap: 4px 12px;
    }
    .cid-cmp-item {
      display: flex; align-items: center; gap: 6px;
      min-width: 90px;
    }
    .cid-cmp-label {
      font-size: .65rem; color: var(--ag-text-muted);
      font-weight: 600;
    }
    .cid-cmp-delta {
      font-size: .78rem; font-weight: 800;
      font-family: 'Plus Jakarta Sans', system-ui;
    }

    /* ═══ Carte Athlète — Compact Index + Next Session ═══ */
/* ═══════════════════════════════════════════════════════
   Sprint 7A — Stimulus Fidelity (vue détail séance)
   ═══════════════════════════════════════════════════════ */

/* Badge score global dans le header de la séance */
.cid-fidelity-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 5px 12px;
  border-radius: 20px;
  font-family: 'Plus Jakarta Sans', system-ui;
  margin-left: auto;
  margin-right: 10px;
  user-select: none;
}
.cid-fidelity-badge.cid-fid-grey {
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.20);
  color: #94a3b8;
}
.cid-fid-score {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}
.cid-fid-lbl {
  font-size: .68rem;
  font-weight: 600;
  opacity: .75;
}

/* Grille 4 métriques (Structure / Intensity / Recovery / Physiology) */
.cid-fid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.cid-fid-cell {
  background: var(--ag-bg-elevated, #252529);
  border-radius: var(--ag-radius-md, 10px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 2px solid rgba(148,163,184,.20);
}
.cid-fid-cell-null {
  opacity: .45;
}
.cid-fid-cell-lbl {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ag-text-muted, #94a3b8);
  margin-bottom: 3px;
}
.cid-fid-cell-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', system-ui;
  line-height: 1.1;
  color: var(--ag-text, #f1f5f9);
}

/* Encart verdict Orion (short + détails) */
.cid-fid-verdict {
  padding: 10px 14px;
  border-radius: var(--ag-radius-md, 10px);
  margin-bottom: 14px;
}
.cid-fid-verdict-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cid-fid-verdict-title {
  font-size: .82rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', system-ui;
  line-height: 1.3;
}
.cid-fid-verdict-body {
  font-size: .76rem;
  color: var(--ag-text-secondary, #cbd5e1);
  line-height: 1.5;
  margin-left: 22px;
}

/* Cas grey : séance non scorable */
.cid-fid-unscorable {
  padding: 10px 14px;
  border-radius: var(--ag-radius-md, 10px);
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.15);
  color: var(--ag-text-muted, #94a3b8);
  font-size: .78rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive : grille 2x2 sur mobile */
@media (max-width: 640px) {
  .cid-fid-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Courbe primaire avec overlay phases (livrable 3)
   Alignement charte V4 Warm Night
   ═══════════════════════════════════════════════════════ */

/* Header : micro-label + légende compacte — charte V4 §2 & §3 */
.cid-primary-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cid-primary-chart-title {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ag-text-muted, #94a3b8);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.cid-primary-chart-legend {
  display: flex;
  gap: 12px;
  align-items: center;
}
.cid-pcl-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 500;
  color: var(--ag-text-muted, #94a3b8);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.cid-pcl-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.cid-pcl-effort { background: rgba(249,115,22,0.35); }
.cid-pcl-rest   { background: rgba(59,130,246,0.30); }

/* Wrapper canvas — fond card-bg charte V4, radius-md, hauteur contrôlée */
.cid-primary-chart-wrap {
  position: relative;
  background: var(--ag-bg-card, #1c1c21);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--ag-radius-md, 10px);
  padding: 10px 12px 6px 12px;
  margin-bottom: 14px;
  height: 170px;
}
.cid-primary-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Badge Physiology (livrable 6)
   Remplace le badge Drift maison au-dessus des courbes secondaires.
   ═══════════════════════════════════════════════════════ */

.cid-phys-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  margin-left: auto;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  user-select: none;
}
.cid-phys-val {
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
}
.cid-phys-verdict {
  font-size: .72rem;
  font-weight: 500;
  color: var(--ag-text-muted, #94a3b8);
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Dots status par bloc (livrable 4)
   Overlay de petits dots en bas de la timeline prescrite indiquant
   si chaque bloc a été exécuté conformément (vert), partiellement
   (amber), décalé (orange), manqué (rose) ou bonus (violet).
   ═══════════════════════════════════════════════════════ */

.cid-wk-preview-wrap {
  position: relative;
  border-radius: var(--ag-radius-md, 10px);
  /* Pas d'overflow hidden ici : le label flottant au-dessus déborderait sinon.
     Le border-radius est appliqué à #cid-wk-preview directement. */
  margin-bottom: 10px;
}
.cid-wk-preview-wrap > #cid-wk-preview {
  margin-bottom: 0 !important;
  border-radius: var(--ag-radius-md, 10px);
  overflow: hidden;
}
.cid-wk-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 8px;
  pointer-events: none;
  z-index: 2;
}
.cid-wk-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: auto;
  box-shadow: 0 0 0 1.5px rgba(28,28,33,0.9);  /* halo sombre pour contraste sur timeline */
  transition: transform .15s cubic-bezier(.22,1,.36,1);
}
.cid-wk-dot:hover {
  transform: translate(-50%, -50%) scale(1.6);
  cursor: help;
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Crosshair étendu timeline ↔ courbe (livrable 5)
   Propage la position du curseur de la courbe vers la timeline prescrite
   avec une ligne verticale et un label flottant au-dessus.
   ═══════════════════════════════════════════════════════ */

/* Ligne verticale sur la timeline (synchronisée avec celle de Chart.js) */
.cid-wk-crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: transparent;
  border-left: 1px dashed rgba(249,115,22,0.55);
  pointer-events: none;
  z-index: 3;
  display: none;
  transform: translateX(-0.5px);
}

/* Label flottant au-dessus de la timeline, affichant temps + prescrit + réalisé */
.cid-wk-crosshair-label {
  position: absolute;
  bottom: calc(100% + 4px);
  display: none;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(28,28,33,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--ag-radius-md, 10px);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: .72rem;
  color: var(--ag-text-muted, #94a3b8);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 4;
  white-space: nowrap;
  line-height: 1.2;
}
.cid-wk-crosshair-label .cwcl-time {
  color: #f97316;
  font-weight: 700;
  font-size: .78rem;
}
.cid-wk-crosshair-label .cwcl-prescribed strong,
.cid-wk-crosshair-label .cwcl-realized strong {
  color: var(--ag-text, #f1f5f9);
  font-weight: 700;
}
.cid-wk-crosshair-label .cwcl-prescribed::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148,163,184,0.7);
  margin-right: 6px;
  vertical-align: middle;
}
.cid-wk-crosshair-label .cwcl-realized::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
  margin-right: 6px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Encart Orion re-brandé (livrable 2 final)
   Violet #a78bfa + symbole ✦ (charte V4 §3.3).
   Remplace l'ancien encart générique "verdict IA".
   ═══════════════════════════════════════════════════════ */

.cid-orion-card {
  background: rgba(167, 139, 250, 0.06);          /* violet 6% — très discret */
  border: 1px solid rgba(167, 139, 250, 0.18);    /* bordure violette subtile */
  border-left: 3px solid #a78bfa;                 /* accent violet marqué à gauche */
  border-radius: var(--ag-radius-md, 10px);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.cid-orion-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cid-orion-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.cid-orion-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ag-text, #f1f5f9);
  line-height: 1.3;
}
.cid-orion-body {
  font-size: .8rem;
  color: var(--ag-text-secondary, #cbd5e1);
  line-height: 1.55;
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Mini-badge score fidelity calendrier coach
   Remplace la coche ✓ par un petit badge coloré avec le score numérique.
   ═══════════════════════════════════════════════════════ */

.cvm-chip-fidscore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 16px;
  padding: 0 5px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: .64rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  margin-left: auto;
}
.cvm-chip-fidscore.cvm-chip-fidscore-grey {
  background: rgba(148,163,184,0.10);
  color: #94a3b8;
  border-color: rgba(148,163,184,0.25);
}

/* ═══════════════════════════════════════════════════════
   Sprint 7A — Fix fenêtre inline séance : scroll sur la page, pas dans la fenêtre
   Le max-height 900px + overflow hidden coupait la vue quand la courbe primaire,
   les dots, les 3 courbes secondaires et l'encart Orion s'ajoutaient.
   On laisse la fenêtre s'étendre à sa taille naturelle, le scroll se fait sur
   le body (comportement demandé par Maxence).
   ═══════════════════════════════════════════════════════ */

.cvm-inline-detail.open {
  max-height: none;       /* plus de coupure */
  overflow: visible;      /* content peut déborder vers le bas */
}
.cvm-inline-detail {
  /* On garde l'animation sur l'état fermé → ouvert via opacité uniquement,
     max-height ne bornant plus l'animation d'expansion quand le contenu est long. */
  overflow: visible;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1 — Styles ajoutés pour la refonte de la page Athlètes coach.
   Les anciens styles (.welcome-hero, .mega-stats, .three-col, .alert-banner,
   .activity-item, .renew-card, .wb, etc.) restent dans le fichier mais ne
   sont plus utilisés — à nettoyer dans un sprint cleanup ultérieur.
   ═══════════════════════════════════════════════════════════════════════════ */

/* === HEADER MINIMAL === */
.cd-header {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--ag-text-secondary);
  margin: 6px 0 24px;
  animation: fadeInUp 0.4s var(--ag-ease) both;
}
.cd-header strong {
  color: var(--ag-text-primary);
  font-weight: 700;
}

/* === SECTION BAR (Mes athlètes + CTA Inviter) === */
.cd-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 18px;
  animation: fadeInUp 0.4s var(--ag-ease) 0.12s both;
}
.cd-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cd-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ag-primary);
  background: rgba(249, 115, 22, 0.1);
  padding: 3px 10px;
  border-radius: 100px;
}
.cd-section-sub {
  font-size: 0.75rem;
  color: var(--ag-text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* === CTA INVITER UN ATHLÈTE === */
.cta-invite {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--ag-primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(249, 115, 22, 0.35), 0 4px 14px rgba(249, 115, 22, 0.18);
  transition: all 0.2s var(--ag-ease);
  flex-shrink: 0;
}
.cta-invite:hover {
  background: #fb923c;
  transform: translateY(-1px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(249, 115, 22, 0.5), 0 8px 22px rgba(249, 115, 22, 0.32);
}
.cta-invite:active {
  transform: translateY(0);
}
.cta-invite svg,
.cta-invite .nav-icon svg {
  stroke: #ffffff;
}

/* === RESPIRATION DU AURA DOT — coté carte coach uniquement ==================
   Le dot d'aura existant (à côté du nom, ligne 867 de ce fichier) gagne une
   respiration subtile : box-shadow qui varie + micro-scale. La couleur vient
   de la variable CSS --aura-color injectée par le JS (renderAthleteCard).
   L'app athlète n'utilise pas .aura-dot, donc aucun risque d'effet de bord.
   ============================================================================ */

.aura-dot[data-aura="fresh"] {
  animation: auraDotBreathe 3.5s var(--ag-ease) infinite;
}
.aura-dot[data-aura="loaded"] {
  animation: auraDotBreathePress 2.5s var(--ag-ease) infinite;
}
.aura-dot[data-aura="glitch"] {
  animation: auraDotBreatheNervy 1.8s var(--ag-ease) infinite;
}
.aura-dot[data-aura="dormant"] {
  opacity: 0.5;
  box-shadow: none;
}

@keyframes auraDotBreathe {
  0%, 100% { box-shadow: 0 0 4px  var(--aura-color, currentColor); transform: scale(1); }
  50%      { box-shadow: 0 0 10px var(--aura-color, currentColor); transform: scale(1.25); }
}
@keyframes auraDotBreathePress {
  0%, 100% { box-shadow: 0 0 5px  var(--aura-color, currentColor); transform: scale(1); }
  50%      { box-shadow: 0 0 12px var(--aura-color, currentColor); transform: scale(1.3); }
}
@keyframes auraDotBreatheNervy {
  0%, 100% { box-shadow: 0 0 4px  var(--aura-color, currentColor); transform: scale(1); }
  50%      { box-shadow: 0 0 10px var(--aura-color, currentColor); transform: scale(1.2); }
}

/* === SPRINT 3 — Bloc Priorités Orion refondu =================================
   Override l'ancien .orion-priority (ligne 1098+) avec un fond plus neutre.
   Nouvelle structure HTML : .op-head / .op-list / .op-row / .op-av / .op-body /
   .op-name (rose ou amber selon score >= 40) / .op-msg / .op-chev / .op-foot.
   Les anciennes classes .orion-priority-row/dot/name/reason/score restent dans
   ce fichier mais ne sont plus utilisées.
   ============================================================================ */

.orion-priority {
  background: var(--ag-bg-card);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--ag-radius-lg);
  padding: 16px 18px 14px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.op-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.op-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ag-violet, #a78bfa);
  letter-spacing: 0.3px;
}
.op-star {
  color: var(--ag-violet, #a78bfa);
  font-size: 0.95rem;
  line-height: 1;
}
.op-head-meta {
  font-size: 0.68rem;
  color: var(--ag-text-muted);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.op-list {
  display: flex;
  flex-direction: column;
}
.op-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s var(--ag-ease);
}
.op-row:last-child { border-bottom: 0; }
.op-row:hover { background: rgba(255, 255, 255, 0.02); }

.op-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--ag-bg-elevated);
  color: var(--ag-text-secondary);
}

.op-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.op-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.op-name-rose  { color: var(--ag-rose); }
.op-name-amber { color: var(--ag-amber); }

.op-msg {
  font-size: 0.82rem;
  color: var(--ag-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.op-chev {
  color: var(--ag-text-muted);
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s var(--ag-ease), transform 0.2s var(--ag-ease);
}
.op-row:hover .op-chev {
  opacity: 1;
  transform: translateX(2px);
}

.op-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.op-foot a {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ag-violet, #a78bfa);
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s var(--ag-ease);
}
.op-foot a:hover { color: #c4b5fd; }

/* Responsive : sur petit écran le nom passe en bloc au-dessus du message */
@media (max-width: 640px) {
  .op-body { flex-direction: column; align-items: flex-start; gap: 2px; }
  .op-msg { white-space: normal; }
}

/* === SPRINT 4 — Bouton Filtres + drawer popover ==============================
   Le bouton .cd-filter-btn est positionné en .cd-filter-wrap (relative).
   Le drawer .cd-filter-drawer est en absolute en dessous, caché par défaut.
   Toggle via classe .open. Fermé au clic extérieur (handler global JS).
   ============================================================================ */

.cd-section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cd-filter-wrap {
  position: relative;
}

.cd-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ag-text-secondary);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s var(--ag-ease);
}
.cd-filter-btn:hover {
  background: var(--ag-bg-elevated);
  color: var(--ag-text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}
.cd-filter-btn.active {
  background: var(--ag-bg-elevated);
  color: var(--ag-text-primary);
  border-color: rgba(249, 115, 22, 0.4);
}
.cd-filter-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.cd-fb-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--ag-primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 9px;
  margin-left: 2px;
}

/* === Drawer popover === */
.cd-filter-drawer {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  max-width: 380px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
  padding: 16px;
  z-index: 50;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s var(--ag-ease), transform 0.2s var(--ag-ease);
}
.cd-filter-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cd-fd-section {
  margin-bottom: 14px;
}
.cd-fd-section:last-of-type {
  margin-bottom: 12px;
}
.cd-fd-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ag-text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cd-fd-hint {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--ag-text-muted);
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.cd-fd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cd-fd-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ag-text-secondary);
  background: var(--ag-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.12s var(--ag-ease);
  white-space: nowrap;
}
.cd-fd-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ag-text-primary);
}
.cd-fd-chip.on {
  background: rgba(249, 115, 22, 0.12);
  color: var(--ag-primary);
  border-color: rgba(249, 115, 22, 0.3);
}

.cd-fd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cd-fd-dot.rose { background: var(--ag-rose); }
.cd-fd-dot.amber { background: var(--ag-amber); }

.cd-fd-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.cd-fd-reset {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ag-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s var(--ag-ease);
}
.cd-fd-reset:hover {
  color: var(--ag-rose);
}

/* Mobile : le drawer prend la pleine largeur sous le bouton */
@media (max-width: 640px) {
  .cd-filter-drawer {
    right: auto;
    left: 0;
    min-width: 280px;
    max-width: calc(100vw - 32px);
  }
}

/* === SIGNATURE : BARRE SWEEP SUR LE BLOC PRIORITÉS ORION =====================
   Balayage 1-shot d'un dégradé orange→violet au chargement du bloc.
   Le bloc .orion-priority existe déjà plus haut dans ce fichier.
   =============================================================================== */

.orion-priority {
  position: relative;
  overflow: hidden;
}
.orion-priority::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30%;
  height: 2px;
  width: 40%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(249, 115, 22, 0.9),
    rgba(167, 139, 250, 0.9),
    transparent
  );
  animation: orionSweep 1.4s var(--ag-ease) 0.2s 1 forwards;
  pointer-events: none;
}

@keyframes orionSweep {
  0%   { left: -30%; }
  100% { left: 130%; }
}

/* === RESPONSIVE ============================================================== */
@media (max-width: 640px) {
  .cd-section-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-invite {
    justify-content: center;
  }
}



/* === SPRINT 4 POLISH — Skeleton refondu + finitions premium ====================
   Le skeleton dessine maintenant la nouvelle structure 3 zones (header, Priorités
   Orion, section bar, grille de cartes pleines avec mini calendar + stats + plan).
   Plus aucun fantôme du welcome-hero ou des mega-stats.
   Ajout aussi d'un polish des transitions hover sur les cartes athlète et d'un
   shimmer plus subtil pour le skeleton lui-même.
   ================================================================================= */

/* === Skeleton refondu (nouvelle structure 3 zones) === */
.cd-skel-header {
  margin: 6px 0 24px;
  animation: fadeInUp 0.3s var(--ag-ease) both;
}

.cd-skel-prio {
  background: var(--ag-bg-card);
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 14px;
  padding: 16px 18px 14px;
  margin-bottom: 28px;
  animation: fadeInUp 0.3s var(--ag-ease) 0.05s both;
}
.cd-skel-prio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cd-skel-prio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cd-skel-prio-row:last-child { border-bottom: 0; }

.cd-skel-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 18px;
  gap: 16px;
  animation: fadeInUp 0.3s var(--ag-ease) 0.1s both;
}

.cd-skel-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border);
  border-radius: 14px;
  padding: 16px;
  animation: fadeInUp 0.4s var(--ag-ease) both;
}
.cd-skel-card:nth-child(1) { animation-delay: 0.15s; }
.cd-skel-card:nth-child(2) { animation-delay: 0.18s; }
.cd-skel-card:nth-child(3) { animation-delay: 0.21s; }
.cd-skel-card:nth-child(4) { animation-delay: 0.24s; }

.cd-skel-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cd-skel-card-cal {
  display: flex;
  gap: 3px;
  justify-content: space-between;
  padding: 4px 0 10px;
}
.cd-skel-card-cal .skeleton-circle {
  margin: 0 !important;
}
.cd-skel-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Skeleton shimmer plus subtil — gradient qui passe au lieu d'opacity pulse */
.cd-skel-prio .skeleton-bar,
.cd-skel-prio .skeleton-circle,
.cd-skel-section-bar .skeleton-bar,
.cd-skel-card .skeleton-bar,
.cd-skel-card .skeleton-circle {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: cdSkelShimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
}
.cd-skel-prio .skeleton-circle,
.cd-skel-card .skeleton-circle {
  border-radius: 50%;
}
@keyframes cdSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === POLISH HOVER cartes athlète — transition plus douce, glow plus chaud === */
.athlete-card {
  transition: transform 0.25s var(--ag-ease),
              border-color 0.2s var(--ag-ease),
              box-shadow 0.3s var(--ag-ease);
}
.athlete-card:hover {
  border-color: rgba(249, 115, 22, 0.32);
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28),
    0 0 30px rgba(249, 115, 22, 0.06);
}

/* === POLISH cd-section-bar — léger gap supplémentaire pour les actions === */
.cd-section-actions {
  gap: 12px;
}



/* === SPRINT FICHE 2 — Header refondu + ticket + pain strip + actions =========
   Override la structure .fiche-header existante (ligne 347) pour passer en
   layout vertical : avatar+info → pain strip → ticket → actions.
   Anciennes classes .fiche-avatar/.fiche-info/.fiche-name/.fiche-meta préservées.
   ================================================================================= */

.fiche-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 4px 0;
}
.fiche-header .fiche-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  grid-row: span 1;
}
.fiche-header .fiche-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fiche-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.fiche-name-row .fiche-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.1;
  margin: 0;
}
.fiche-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ag-emerald, #10b981);
  box-shadow: 0 0 0 2px var(--ag-bg-base, #111114);
  flex-shrink: 0;
  animation: fhOnlinePulse 2.4s ease-in-out infinite;
}
@keyframes fhOnlinePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.fiche-meta-line {
  font-size: 0.84rem;
  color: var(--ag-text-secondary, #94a3b8);
  line-height: 1.5;
  margin: 0;
}
.fiche-meta-line strong {
  color: var(--ag-text-primary, #f1f5f9);
  font-weight: 700;
}

/* On neutralise le margin-top de l'ancien .fiche-meta puisque la grille gère le gap */
.fiche-header .fiche-meta {
  margin-top: 0;
  gap: 6px;
}

/* Pain strip */
.fh-pain-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.22);
  border-radius: 10px;
  flex-wrap: wrap;
}
.fh-pain-icon {
  color: var(--ag-rose, #fb7185);
  flex-shrink: 0;
}
.fh-pain-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ag-rose, #fb7185);
  flex-shrink: 0;
}
.fh-pain-detail {
  font-size: 0.78rem;
  color: var(--ag-text-secondary, #94a3b8);
  flex: 1;
  min-width: 120px;
}
.fh-pain-orion {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ag-violet, #a78bfa);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
  white-space: nowrap;
}
.fh-pain-orion:hover {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
}

/* Ticket prochaine séance */
.fh-ticket {
  display: flex;
  align-items: stretch;
  background: var(--ag-bg-elevated, #252529);
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.18s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.fh-ticket::after {
  content: '';
  position: absolute;
  left: 76px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0 3px, transparent 3px 6px);
}
.fh-ticket:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.fh-t-date {
  flex-shrink: 0;
  width: 76px;
  padding: 10px 0 11px;
  text-align: center;
  background: rgba(249, 115, 22, 0.05);
}
.fh-t-day {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ag-primary, #f97316);
  line-height: 1;
  letter-spacing: -0.5px;
}
.fh-t-mois {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ag-primary, #f97316);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 3px;
  opacity: 0.85;
}
.fh-t-body {
  flex: 1;
  padding: 9px 14px 10px 18px;
  min-width: 0;
}
.fh-t-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--ag-text-muted, #475569);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.fh-t-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ag-text-primary, #f1f5f9);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fh-t-detail {
  font-size: 0.76rem;
  color: var(--ag-text-secondary, #94a3b8);
}
.fh-t-cta {
  display: flex;
  align-items: center;
  padding-right: 14px;
  flex-shrink: 0;
}
.fh-t-cta span {
  font-size: 0.76rem;
  color: var(--ag-primary, #f97316);
  font-weight: 700;
  white-space: nowrap;
}

/* Flash visuel de la case calendrier au retour via ticket */
.cvm-cell.cvm-flash {
  animation: cvmFlash 1.6s var(--ag-ease, ease-out);
}
@keyframes cvmFlash {
  0%   { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5), inset 0 0 0 2px rgba(249, 115, 22, 0.4); }
  60%  { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0), inset 0 0 0 2px rgba(249, 115, 22, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0), inset 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* Actions rangée */
.fh-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.fh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
  white-space: nowrap;
}
.fh-btn-primary {
  background: var(--ag-primary, #f97316);
  color: #ffffff;
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 3px 12px rgba(249, 115, 22, 0.18);
}
.fh-btn-primary:hover {
  background: #fb923c;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(249, 115, 22, 0.26);
}
.fh-btn-sec {
  background: var(--ag-bg-elevated, #252529);
  color: var(--ag-text-primary, #f1f5f9);
  border-color: rgba(255, 255, 255, 0.08);
}
.fh-btn-sec:hover {
  background: #2c2c32;
  border-color: rgba(255, 255, 255, 0.14);
}
.fh-btn-more {
  background: transparent;
  color: var(--ag-text-secondary, #94a3b8);
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, 0.08);
}
.fh-btn-more:hover,
.fh-btn-more.active {
  background: var(--ag-bg-elevated, #252529);
  color: var(--ag-text-primary, #f1f5f9);
}

/* Menu ⋯ */
.fh-menu-wrap {
  position: relative;
}
.fh-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--ag-bg-card, #1c1c21);
  border: 1px solid var(--ag-border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 60;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s var(--ag-ease, ease), transform 0.18s var(--ag-ease, ease);
}
.fh-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.fh-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ag-text-primary, #f1f5f9);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s var(--ag-ease, ease);
}
.fh-menu-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.fh-menu-item:hover {
  background: var(--ag-bg-elevated, #252529);
}
.fh-menu-danger {
  color: var(--ag-rose, #fb7185);
}
.fh-menu-danger svg {
  opacity: 0.85;
}
.fh-menu-danger:hover {
  background: rgba(251, 113, 133, 0.1);
}
.fh-menu-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 2px;
}

/* Modale confirmation suppression */
.fh-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  animation: fhOvFade 0.2s var(--ag-ease, ease);
  padding: 20px;
}
@keyframes fhOvFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fh-confirm-modal {
  width: 100%;
  max-width: 440px;
  background: var(--ag-bg-card, #1c1c21);
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: fhModalPop 0.22s var(--ag-ease, ease);
}
@keyframes fhModalPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
.fh-confirm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ag-rose, #fb7185);
  margin-bottom: 12px;
}
.fh-confirm-body {
  font-size: 0.88rem;
  color: var(--ag-text-secondary, #94a3b8);
  line-height: 1.55;
  margin: 0 0 16px;
}
.fh-confirm-body strong {
  color: var(--ag-rose, #fb7185);
  font-weight: 700;
}
.fh-confirm-label {
  display: block;
  font-size: 0.8rem;
  color: var(--ag-text-secondary, #94a3b8);
  margin-bottom: 7px;
}
.fh-confirm-label strong {
  color: var(--ag-text-primary, #f1f5f9);
  font-weight: 700;
}
.fh-confirm-input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ag-text-primary, #f1f5f9);
  background: var(--ag-bg-base, #111114);
  border: 1px solid var(--ag-border, rgba(255,255,255,0.1));
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s var(--ag-ease, ease);
}
.fh-confirm-input:focus {
  border-color: var(--ag-rose, #fb7185);
}
.fh-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.ag-btn-danger {
  background: var(--ag-rose, #fb7185);
  color: #fff;
  border-color: rgba(251, 113, 133, 0.4);
}
.ag-btn-danger:disabled {
  background: var(--ag-bg-elevated, #252529);
  color: var(--ag-text-muted, #475569);
  border-color: var(--ag-border, rgba(255,255,255,0.08));
  cursor: not-allowed;
}
.ag-btn-danger:not(:disabled):hover {
  background: #ff8896;
}

/* Mobile */
@media (max-width: 640px) {
  .fiche-header { grid-template-columns: auto 1fr; gap: 12px 14px; }
  .fiche-header .fiche-avatar { width: 54px; height: 54px; }
  .fiche-name-row .fiche-name { font-size: 1.2rem; }
  .fh-ticket::after { left: 68px; }
  .fh-t-date { width: 68px; }
  .fh-t-day { font-size: 1.3rem; }
  .fh-actions { gap: 6px; }
  .fh-btn { padding: 7px 11px; font-size: 0.76rem; }
  .fh-menu { right: 0; left: auto; min-width: 200px; }
}



/* === SPRINT FICHE 3 — Bandeau Orion en haut de Synthèse + sparklines cards ===
   Placé AVANT les 3 metric-cards. État skeleton au rendu initial, rempli de
   façon asynchrone par _loadFichePillars() qui injecte le priority_lever.
   Fallback affiché au bout de 5s si aucune donnée Orion disponible.

   Les sparklines 8 semaines vivent en absolute bottom des .metric-card,
   opacité 40%, derrière le texte. Rendu SVG inline viewBox 100×34.
   ================================================================================= */

/* === Bandeau Orion === */
.fiche-orion-band {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.09) 0%, rgba(96, 165, 250, 0.06) 100%);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 14px;
  padding: 18px 20px 16px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  animation: fobFadeIn 0.45s var(--ag-ease, cubic-bezier(.22,1,.36,1)) both;
}
.fiche-orion-band::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30%;
  height: 2px;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.9), rgba(167, 139, 250, 0.9), transparent);
  animation: fobSweep 1.5s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.4s 1 forwards;
}
@keyframes fobFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fobSweep {
  0%   { left: -30%; }
  100% { left: 130%; }
}

.fob-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.fob-star {
  color: var(--ag-violet, #a78bfa);
  font-size: 1rem;
  line-height: 1;
}
.fob-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ag-violet, #a78bfa);
  letter-spacing: 0.2px;
}
.fob-name {
  color: var(--ag-text-primary, #f1f5f9);
  font-weight: 700;
  margin-left: 2px;
}

.fob-body {
  min-height: 42px;
  margin-bottom: 12px;
}
.fob-text {
  font-size: 0.9rem;
  color: var(--ag-text-primary, #f1f5f9);
  line-height: 1.6;
  font-style: italic;
  max-width: 720px;
}
.fob-text-fallback {
  font-style: normal;
  color: var(--ag-text-secondary, #94a3b8);
  font-size: 0.85rem;
}
.fob-text-reveal {
  animation: fobTextReveal 0.8s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.2s both;
}
@keyframes fobTextReveal {
  from { opacity: 0; filter: blur(4px); }
  to   { opacity: 1; filter: blur(0); }
}

.fob-skel {
  padding: 2px 0;
}
.fob-skel-line {
  height: 9px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 7px;
  animation: fobSkelShimmer 1.6s ease-in-out infinite;
}
.fob-skel-line:last-child { margin-bottom: 10px; }
.fob-skel-msg {
  font-size: 0.78rem;
  color: var(--ag-text-muted, #475569);
  font-style: italic;
}
@keyframes fobSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.fob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.fob-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ag-violet, #a78bfa);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.fob-chip:hover {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
  transform: translateY(-1px);
}

.fob-continue {
  margin-top: 10px;
  text-align: right;
}
.fob-continue a {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ag-violet, #a78bfa);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.fob-continue a:hover { opacity: 1; }

/* === Sparklines en arrière-plan des metric-cards === */
.metric-card { position: relative; overflow: hidden; }
.metric-card .mc-spark {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.metric-card .mc-spark svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Les éléments textuels passent au-dessus de la sparkline */
.metric-card .mc-label,
.metric-card .mc-val,
.metric-card .mc-sub,
.metric-card .mc-detail,
.metric-card .mc-bar { position: relative; z-index: 1; }

@media (max-width: 640px) {
  .fiche-orion-band { padding: 14px 16px 12px; }
  .fob-text { font-size: 0.85rem; }
  .metric-card .mc-spark { height: 30px; }
}



/* === SPRINT FICHE 4 — PMC Canvas refondu : overlay SVG, crosshair, tooltip ===
   Le line-chart-wrap.pmc devient un container positionné relative avec
   le canvas et le SVG overlay en absolute par-dessus. Le tooltip est
   également en absolute dans le wrap.
   ================================================================================= */

.line-chart-wrap.pmc {
  position: relative;
  height: 220px;
  margin-top: 12px;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}
.fiche-pmc-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Today vertical line (dans le SVG) */
.pmc-today-line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  fill: none;
}

/* Marqueurs d'événements */
.pmc-event-line {
  stroke: rgba(251, 191, 36, 0.18);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  fill: none;
}
.pmc-event-marker {
  fill: #fbbf24;
  transition: fill 0.15s var(--ag-ease, ease);
}
.pmc-event:hover .pmc-event-marker {
  fill: #fcd34d;
}
.pmc-event:hover .pmc-event-line {
  stroke: rgba(251, 191, 36, 0.35);
}

/* Crosshair group (caché par défaut, affiché au survol) */
.pmc-crosshair-group {
  transition: opacity 0.12s var(--ag-ease, ease);
  pointer-events: none;
}
.pmc-crosshair-line {
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  fill: none;
}
.pmc-crosshair-dot {
  stroke: #1c1c21;
  stroke-width: 2;
  pointer-events: none;
}

/* Tooltip riche (HTML absolute dans le wrap) */
.fiche-pmc-tooltip {
  position: absolute;
  min-width: 150px;
  max-width: 200px;
  background: rgba(28, 28, 33, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.72rem;
  color: var(--ag-text-primary, #f1f5f9);
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  transition: opacity 0.1s ease;
  z-index: 10;
}
.pmc-tt-date {
  font-size: 0.65rem;
  color: var(--ag-text-muted, #475569);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.pmc-tt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  font-size: 0.74rem;
}
.pmc-tt-row.pmc-tt-sep {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pmc-tt-k {
  display: inline-flex;
  align-items: center;
  color: var(--ag-text-secondary, #94a3b8);
  font-weight: 500;
}
.pmc-tt-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.pmc-tt-v {
  color: var(--ag-text-primary, #f1f5f9);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Légende : pastille événement */
.pmc-leg-event {
  display: inline-flex;
  align-items: center;
}

/* Micro-mention Orion sous le PMC (ACWR > 1.5) */
.fiche-pmc-orion-hint {
  margin-top: 10px;
  text-align: right;
}
.fiche-pmc-orion-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ag-violet, #a78bfa);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.fiche-pmc-orion-btn:hover {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
}

/* Mobile : tooltip plus compact, crosshair plus épais pour le doigt */
@media (max-width: 640px) {
  .fiche-pmc-tooltip {
    min-width: 130px;
    font-size: 0.68rem;
    padding: 8px 10px;
  }
  .pmc-crosshair-line {
    stroke-width: 1.5;
  }
  .line-chart-wrap.pmc {
    cursor: default;
  }
}



/* === SPRINT FICHE 5a — Animations d'entrée de la fiche (chorégraphie) =========
   Au premier render de la fiche (switchAthlete ou première ouverture), les
   blocs du header et de la Synthèse apparaissent dans un ordre chorégraphié
   (fadeUp 400ms, stagger 80ms). Les animations CSS se déclenchent uniquement
   au render initial — lors d'un switch d'onglet retour, le cache HTML du tab
   restitue les éléments avec leur style final, donc zéro rejeu.

   La keyframe fadeInUp utilisée partout ailleurs dans le CSS n'était défi-
   nie nulle part (bug silencieux préexistant). On la définit ici, ce qui
   fait aussi "s'allumer" des animations qui étaient muettes jusqu'à présent.
   ================================================================================= */

/* Keyframe manquante (activée enfin) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chorégraphie du header — chaque bloc apparaît séquencé */
.fiche-back {
  animation: fadeInUp 0.35s var(--ag-ease, cubic-bezier(.22,1,.36,1)) both;
}
.fiche-header {
  animation: fadeInUp 0.45s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.05s both;
}
.fiche-header .fiche-avatar {
  animation: avatarRingPop 0.55s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.12s both;
}
@keyframes avatarRingPop {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
.fh-pain-strip {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.15s both;
}
.fh-ticket {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.2s both;
}
.fh-actions {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.25s both;
}
.invite-row {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.3s both;
}

/* Tabs */
.fiche-tabs {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.3s both;
}

/* Chorégraphie du contenu de l'onglet Synthèse — stagger sur enfants directs */
/* Le bandeau Orion et les 3 metric-cards reçoivent un delay stagger progressif. */
.fiche-content .fiche-orion-band {
  animation-delay: 0.35s !important;
}
.fiche-content .metrics-grid {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.45s both;
}

/* Les metric-cards ont déjà un animation-delay inline (.05s / .1s / .15s)
   qu'on veut préserver ; elles héritent du stagger via la grid qui les porte. */
.fiche-content .metrics-grid .metric-card {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) both;
}
.fiche-content .metrics-grid .metric-card:nth-child(1) { animation-delay: 0.5s; }
.fiche-content .metrics-grid .metric-card:nth-child(2) { animation-delay: 0.55s; }
.fiche-content .metrics-grid .metric-card:nth-child(3) { animation-delay: 0.6s; }

/* Bloc PMC (déjà géré par le sprint 4 pour l'interne, on ne fait que l'entrée) */
.fiche-content .fiche-pmc-card {
  animation: fadeInUp 0.45s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.7s both;
}

/* Blocs piliers + HR zones : stagger léger, mais pas prioritaires car async */
.fiche-content .pillars-block {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.8s both;
}
.fiche-content .hr-zones-block {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.85s both;
}

/* Sprint 7 cleanup — règle .aura-detail retirée (élément supprimé au polish 2) */

/* Sprint fiche 5a — neutralise la chorégraphie d'entrée quand le contenu
   est restauré depuis _ficheTabCache (switch d'onglet retour). Les animations
   ne rejouent pas car les éléments sont déjà familiers du coach. */
.fiche-content.fiche-no-reveal .fiche-orion-band,
.fiche-content.fiche-no-reveal .metrics-grid,
.fiche-content.fiche-no-reveal .metrics-grid .metric-card,
.fiche-content.fiche-no-reveal .fiche-pmc-card,
.fiche-content.fiche-no-reveal .pillars-block,
.fiche-content.fiche-no-reveal .hr-zones-block {
  animation: none !important;
}

/* Respecte prefers-reduced-motion — on coupe toutes les animations d'entrée */
@media (prefers-reduced-motion: reduce) {
  .fiche-back,
  .fiche-header,
  .fiche-header .fiche-avatar,
  .fh-pain-strip,
  .fh-ticket,
  .fh-actions,
  .invite-row,
  .fiche-tabs,
  .fiche-content .fiche-orion-band,
  .fiche-content .metrics-grid,
  .fiche-content .metrics-grid .metric-card,
  .fiche-content .fiche-pmc-card,
  .fiche-content .pillars-block,
  .fiche-content .hr-zones-block {
    animation: none !important;
  }
}



/* === SPRINT FICHE 5b — Sticky header + FAB scroll-aware + FLIP avatar =========
   - Sticky header desktop : la .fiche-header reste en haut au scroll, ombre
     subtile activée via classe .fiche-header-stuck posée par IntersectionObserver
     sur une sentinelle invisible.
   - FAB scroll-aware : quand le bandeau Orion sort du viewport, le FAB passe
     en version étendue avec label "Orion · [prénom]".
   - FLIP avatar : transform + transition géré directement depuis le JS
     (pas de keyframe dédiée — le JS pose le transform source puis anime
     vers l'identité).
   ================================================================================= */

/* Sprint 7 cleanup — bloc Sticky header desktop (sprint 5b) RETIRÉ
   Neutralisé par le polish 4, l'utilisateur préfère le scroll classique.
   La règle .fiche-header position:static reste applicable par défaut. */

/* === FAB Orion étendu (version "pilule" au scroll) === */
.orion-fab {
  /* On garde la position fixed + bottom-right existante. On ajoute la
     capacité à devenir "pilule" en width auto avec label visible */
  overflow: hidden;
  gap: 8px;
  padding: 0 14px;
  transition:
    transform 0.18s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
    box-shadow 0.25s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
    width 0.35s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
    border-radius 0.35s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.orion-fab-label {
  display: none;
  white-space: nowrap;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}
.orion-fab.orion-fab-extended {
  width: auto;
  min-width: 52px;
  padding: 0 18px 0 16px;
  border-radius: 26px;
  box-shadow: 0 6px 28px rgba(96, 165, 250, 0.42),
              0 0 0 1px rgba(167, 139, 250, 0.3);
  animation: orionFabExtend 0.35s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.orion-fab.orion-fab-extended .orion-fab-label {
  display: inline-flex;
  align-items: center;
  animation: orionFabLabelFade 0.3s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.12s both;
}
@keyframes orionFabExtend {
  from { transform: translateY(8px); opacity: 0.85; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes orionFabLabelFade {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Mobile : le FAB étendu est un poil moins large pour ne pas déborder */
@media (max-width: 640px) {
  .orion-fab.orion-fab-extended {
    padding: 0 14px 0 12px;
  }
  .orion-fab-label {
    font-size: 0.78rem;
  }
}

/* === FLIP avatar — respect prefers-reduced-motion === */
@media (prefers-reduced-motion: reduce) {
  .fiche-header .fiche-avatar {
    transition: none !important;
    transform: none !important;
  }
  .orion-fab.orion-fab-extended {
    animation: none;
  }
}



/* === SPRINT FICHE 6 — Profil refondu : sections avec édition inline + danger zone ===
   - .prof-section-head : ligne titre + crayon à droite
   - .prof-edit-pencil : bouton crayon qui bascule la section en édition
   - .prof-section.prof-section-editing : état visuel différent pendant édition
   - .prof-edit-form : formulaire inline (grid 2 colonnes)
   - .prof-edit-field : un champ label + input
   - .prof-edit-actions : footer Annuler / Sauvegarder
   - .prof-empty-hint : texte discret quand aucune donnée
   - .prof-danger-zone : dernière section, bordure rouge subtile
   ================================================================================= */

.prof-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.prof-section-head .prof-section-title {
  margin-bottom: 0;
}

.prof-edit-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-family: inherit;
  color: var(--ag-text-muted, #475569);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
  flex-shrink: 0;
}
.prof-edit-pencil:hover {
  color: var(--ag-primary, #f97316);
  background: rgba(249, 115, 22, 0.07);
  border-color: rgba(249, 115, 22, 0.2);
}

.prof-section.prof-section-editing {
  border-color: rgba(249, 115, 22, 0.25);
  background: rgba(249, 115, 22, 0.02);
}
.prof-section.prof-section-editing .prof-edit-pencil {
  opacity: 0.3;
  pointer-events: none;
}

.prof-empty-hint {
  color: var(--ag-text-muted, #475569);
  font-size: 0.86rem;
  font-style: italic;
  padding: 8px 0 4px;
}

/* === Formulaire d'édition inline === */
.prof-edit-form {
  animation: fadeInUp 0.25s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.prof-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}
.prof-edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.prof-edit-field label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ag-text-muted, #475569);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.prof-edit-field input,
.prof-edit-field select {
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ag-text-primary, #f1f5f9);
  background: var(--ag-bg-base, #111114);
  border: 1px solid var(--ag-border, rgba(255,255,255,0.1));
  border-radius: 7px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s var(--ag-ease, ease),
              box-shadow 0.15s var(--ag-ease, ease);
}
.prof-edit-field input:focus,
.prof-edit-field select:focus {
  border-color: var(--ag-primary, #f97316);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.prof-edit-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.prof-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ag-border, rgba(255,255,255,0.06));
}

/* === Danger zone === */
.prof-danger-zone {
  border-color: rgba(251, 113, 133, 0.18) !important;
  background: rgba(251, 113, 133, 0.03) !important;
}
.prof-danger-title {
  color: var(--ag-rose, #fb7185) !important;
}
.prof-danger-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.prof-danger-text {
  flex: 1;
  min-width: 220px;
  font-size: 0.82rem;
  color: var(--ag-text-secondary, #94a3b8);
  line-height: 1.55;
}
.prof-danger-text strong {
  color: var(--ag-rose, #fb7185);
  font-weight: 700;
}
.prof-danger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ag-rose, #fb7185);
  background: transparent;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1));
  white-space: nowrap;
  flex-shrink: 0;
}
.prof-danger-btn:hover {
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.5);
  color: #ff8896;
}

/* Mobile : une colonne dans le formulaire */
@media (max-width: 640px) {
  .prof-edit-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .prof-danger-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .prof-danger-btn {
    width: 100%;
    justify-content: center;
  }
}



/* === POLISH — Patches finaux fiche athlète =================================== */

/* Sprint fiche 5a — ajout du delay pour la 4ème metric card (Régularité) */
.fiche-content .metrics-grid .metric-card:nth-child(4) { animation-delay: 0.65s; }

/* POLISH — réordonnancement : PMC arrive maintenant AVANT les metrics dans le DOM,
   on ajuste les delays de la chorégraphie d'entrée pour respecter le nouveau flux */
.fiche-content .fiche-pmc-card {
  animation: fadeInUp 0.45s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.45s both !important;
}
.fiche-content .metrics-grid {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 0.7s both !important;
}
.fiche-content .metrics-grid .metric-card:nth-child(1) { animation-delay: 0.75s !important; }
.fiche-content .metrics-grid .metric-card:nth-child(2) { animation-delay: 0.8s !important; }
.fiche-content .metrics-grid .metric-card:nth-child(3) { animation-delay: 0.85s !important; }
.fiche-content .metrics-grid .metric-card:nth-child(4) { animation-delay: 0.9s !important; }
.fiche-content .pillars-block {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 1s both !important;
}
.fiche-content .hr-zones-block {
  animation: fadeInUp 0.4s var(--ag-ease, cubic-bezier(.22,1,.36,1)) 1.05s both !important;
}

/* POLISH — Pillar fill : ease + force le rendu propre quand width=0 */
.pillar-fill {
  /* Pas de transition par défaut — c'est le JS qui pose la transition juste
     avant d'animer la width vers la cible. Évite que des changements de width
     hors animation (resize) ne déclenchent une animation involontaire. */
  border-radius: inherit;
  height: 100%;
  display: block;
}

/* POLISH — Étoile ✦ Orion dans le FAB étendu */
.orion-fab-star {
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1;
  color: #fff;
  margin-right: 6px;
  font-weight: 400;
  /* Petit pulse subtil pour signaler la présence d'Orion */
  animation: orionFabStarPulse 2.6s ease-in-out infinite;
}
@keyframes orionFabStarPulse {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.1); }
}
.orion-fab-name {
  display: inline-block;
}

/* En mode étendu, on cache le SVG d'origine du FAB (ORION_STAR icon "?") pour
   ne pas faire concurrence à la nouvelle étoile ✦ */
.orion-fab.orion-fab-extended > svg {
  display: none;
}

/* prefers-reduced-motion : star ne pulse pas */
@media (prefers-reduced-motion: reduce) {
  .orion-fab-star { animation: none; }
}



/* === POLISH 2 — Effet typing Orion + étoile FAB pastille ============================ */

/* Effet typewriter sur le texte du bandeau Orion */
.fob-text-typing {
  position: relative;
}
.fob-text-content {
  /* Le contenu s'écrit progressivement via textContent — pas de styling spécial */
}

/* Curseur clignotant pendant le typing */
.fob-text-cursor {
  display: inline-block;
  color: var(--ag-violet, #a78bfa);
  font-weight: 600;
  margin-left: 2px;
  animation: fobCursorBlink 0.7s steps(1) infinite;
  /* Empêche le curseur de wrap tout seul à la fin d'une ligne */
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.45);
}
@keyframes fobCursorBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Pendant le typing, on cache l'animation .fob-text-reveal éventuellement résiduelle */
.fob-text-typing.fob-text-reveal {
  animation: none !important;
  filter: none !important;
  opacity: 1 !important;
}

/* prefers-reduced-motion : pas de curseur clignotant ni d'animation typing */
@media (prefers-reduced-motion: reduce) {
  .fob-text-cursor { animation: none; opacity: 0; }
}

/* === FAB Orion — étoile ✦ visible en mode pastille ET étendu === */

/* Le SVG d'origine (cercle "?") n'est plus injecté par renderOrionFab.
   On a maintenant un <span class="orion-fab-star">✦</span> par défaut.
   Override de l'ancienne règle qui cachait le SVG en mode étendu (devenue inutile). */
.orion-fab.orion-fab-extended > svg {
  /* plus de svg à l'intérieur, mais on garde la règle au cas où un cache navigateur */
  display: none;
}

/* L'étoile en mode pastille : taille adaptée à un FAB 52px */
.orion-fab > .orion-fab-star {
  font-size: 1.45rem;
  margin-right: 0;
  line-height: 1;
}
/* En mode étendu, l'étoile est plus petite et a une marge à droite pour le label */
.orion-fab.orion-fab-extended > .orion-fab-star {
  font-size: 1.05rem;
  margin-right: 8px;
}



/* === POLISH 3 — Effet shine sur le bandeau Orion (remplace le typing) ============ */

/* Le texte arrive d'un coup. Une bande lumineuse violette + blanche balaye
   horizontalement de gauche à droite, donnant l'impression qu'Orion vient
   tout juste de "déposer" cet insight. Effet 1.5s, démarrage 0.5s après
   que le texte est inséré (laisse le bandeau finir sa fadeUp d'entrée). */
.fob-text {
  position: relative;
  overflow: hidden;
}
.fob-text-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(167, 139, 250, 0.18) 25%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(167, 139, 250, 0.18) 75%,
    transparent 100%);
  filter: blur(10px);
  animation: fobShine 1.5s cubic-bezier(.4, 0, .2, 1) 0.5s forwards;
  pointer-events: none;
  mix-blend-mode: screen;
  border-radius: 4px;
}
@keyframes fobShine {
  0%   { left: -50%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

/* prefers-reduced-motion : pas de shine */
@media (prefers-reduced-motion: reduce) {
  .fob-text-shine::after { animation: none; display: none; }
}



/* === POLISH 4 — Metric cards mieux équilibrées + retrait sticky header ============ */

/* Les metric cards avaient leurs textes collés en haut avec un grand vide en
   bas (où vit la sparkline en background). Refonte en flex column avec un
   padding-bottom plus généreux pour laisser respirer la sparkline, et un
   léger espacement régulier entre les éléments textuels.
   On garde la grille existante (4 colonnes desktop). */
.metric-card {
  display: flex;
  flex-direction: column;
  /* Plus de padding bottom pour laisser de l'air entre le contenu textuel
     et la sparkline qui occupe les ~36px du bas */
  padding: 16px 16px 44px !important;
  min-height: 132px;
}
.metric-card .mc-label {
  /* Le label garde sa position en haut, mais on ajoute un peu plus d'air
     en-dessous pour éviter qu'il "colle" au chiffre */
  margin-bottom: 10px !important;
}
.metric-card .mc-val {
  /* La valeur principale prend la place centrale visuellement */
  font-size: 1.7rem !important;
  margin-bottom: 4px !important;
}
.metric-card .mc-sub {
  /* Petit espacement avant le sub */
  margin-bottom: 2px;
}
.metric-card .mc-detail {
  /* Detail (RPE moy etc.) reste collé sous le sub avec une marge réduite,
     pas besoin de bordure interne */
  margin-top: 6px !important;
  padding-top: 0 !important;
  border-top: none !important;
}
.metric-card .mc-bar {
  /* La barre de compliance reste fine et juste sous le sub/detail */
  margin-top: 8px !important;
}

/* Mobile : padding-bottom réduit (sparkline plus petite déjà via media query existante) */
@media (max-width: 640px) {
  .metric-card {
    min-height: 118px;
    padding: 14px 14px 36px !important;
  }
}

/* Sprint 7 cleanup — bloc "Retrait du sticky header" du polish 4 retiré.
   Devenu inutile maintenant que la définition source du sticky (sprint 5b)
   est elle-même supprimée. */



/* === POLISH 6 — Espacement entre PMC et metrics cards ===========================
   La card PMC et la grille metrics étaient collées. On ajoute une marge bottom
   à la card PMC pour bien séparer visuellement les deux blocs.
   ================================================================================= */
.fiche-content .fiche-pmc-card {
  margin-bottom: 28px !important;
}
/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT A · Calendrier vivant                                    */
/*                                                                 */
/* Ajouts CSS additifs uniquement. Zéro règle existante modifiée.  */
/* Rollback : supprimer ce bloc (de cette ligne jusqu'à FIN).      */
/* Préparé : 2026-04-24                                            */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Weekend subtil (sam/dim du mois courant uniquement) ─── */
.cvm-cell-weekend:not(.cvm-other-month) {
  background: rgba(251, 191, 36, 0.02);
}

/* ─── Aujourd'hui : ring orange pulsant (complète .cvm-today) ─── */
.cvm-cell-today-ring {
  box-shadow: inset 0 0 0 1.5px rgba(249, 115, 22, 0.55);
  animation: cvmTodayBreathe 2.4s ease-in-out infinite;
}

@keyframes cvmTodayBreathe {
  0%, 100% { box-shadow: inset 0 0 0 1.5px rgba(249, 115, 22, 0.55); }
  50%      { box-shadow: inset 0 0 0 1.5px rgba(249, 115, 22, 0.22); }
}

@media (prefers-reduced-motion: reduce) {
  .cvm-cell-today-ring { animation: none; }
}

/* ─── Chip : position relative pour accueillir les badges enfants ─── */
.cvm-chip { position: relative; }

/* ─── Badge "à voir" amber (pastille coin haut-droit de la chip) ─── */
.cvm-chip-toreview {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  background: #fbbf24;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ag-bg-card, #13131a);
  pointer-events: none;
  z-index: 2;
}

/* ─── Cellule vide : label "Ajouter" au hover ─── */
.cvm-add::after {
  content: "Ajouter";
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(249, 115, 22, 0.55);
  opacity: 0;
  transition: opacity .18s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

.cvm-cell:hover .cvm-add::after {
  opacity: 1;
}

/* ─── Colonne semaine : cliquable (prépare Sprint B - dupliquer) ─── */
.cvm-week-summary {
  cursor: pointer;
  transition: background .15s ease;
}

.cvm-week-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ─── Sidebar biblio : compteurs dans chips filter ─── */
.lib-side-filter-count {
  margin-left: 4px;
  opacity: 0.55;
  font-size: 0.88em;
  font-weight: 500;
}

.lib-side-filter.active .lib-side-filter-count {
  opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT A                                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT B · Drag-drop unifié                                     */
/*                                                                 */
/* Ajouts CSS additifs. Aucune règle existante modifiée.           */
/* Rollback : supprimer ce bloc (jusqu'à FIN SPRINT B).            */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Chip draggable : cursor grab ─── */
.cvm-chip[draggable="true"] { cursor: grab; }
.cvm-chip[draggable="true"]:active { cursor: grabbing; }

/* ─── Source en cours de drag : opacity réduite ─── */
.cvm-chip.cvm-chip-dragging {
  opacity: 0.35;
  transition: opacity .12s ease;
}

/* ─── Drop cible mode copie (Cmd/Ctrl enfoncé) : teinte verte ─── */
.cvm-cell.cvm-drop-copy {
  background: rgba(16, 185, 129, 0.08) !important;
  outline: 2px dashed #10b981;
  outline-offset: -2px;
}

/* ─── Drop cible interdite (>= 2 séances) : teinte rouge ─── */
.cvm-cell.cvm-drop-forbidden {
  background: rgba(239, 68, 68, 0.10) !important;
  outline: 2px dashed #ef4444;
  outline-offset: -2px;
  cursor: not-allowed;
}

/* ─── Toast avec bouton Annuler ─── */
.ag-toast-undo {
  margin-left: 12px;
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  padding: 4px 11px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  font-family: inherit;
}

.ag-toast-undo:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT B                                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT C · Panneau séance hero + builder polish                 */
/*                                                                 */
/* Ajouts CSS additifs. Aucune règle existante modifiée.           */
/* Rollback : supprimer ce bloc (jusqu'à FIN SPRINT C).            */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Passe 4 · Liseré gauche verdict sur tout le panneau ─── */
.cid-inner.cid-v-green  { border-left: 3px solid #22c55e; }
.cid-inner.cid-v-yellow { border-left: 3px solid #fbbf24; }
.cid-inner.cid-v-orange { border-left: 3px solid #f97316; }
.cid-inner.cid-v-red    { border-left: 3px solid #fb7185; }
.cid-inner.cid-v-grey   { border-left: 3px solid #6b7280; }

/* ─── Passe 4 · Verdict Telos hero (en haut du panneau) ─── */
.cid-verdict-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: var(--ag-radius-md);
  border: 1px solid var(--ag-border);
  background: rgba(255, 255, 255, 0.02);
}

.cid-verdict-hero.cid-vh-green  { background: rgba(34, 197, 94, 0.06);  border-color: rgba(34, 197, 94, 0.28); }
.cid-verdict-hero.cid-vh-yellow { background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.28); }
.cid-verdict-hero.cid-vh-orange { background: rgba(249, 115, 22, 0.06); border-color: rgba(249, 115, 22, 0.28); }
.cid-verdict-hero.cid-vh-red    { background: rgba(251, 113, 133, 0.06); border-color: rgba(251, 113, 133, 0.28); }
.cid-verdict-hero.cid-vh-grey   { background: rgba(107, 114, 128, 0.06); border-color: rgba(107, 114, 128, 0.28); }

.cid-verdict-score-block {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.cid-verdict-score {
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.cid-verdict-score-suffix {
  font-size: 14px;
  font-weight: 500;
  color: var(--ag-text-muted);
  margin-left: 3px;
}

.cid-verdict-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cid-verdict-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ag-text-primary);
}

.cid-verdict-sublabel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ag-text-muted);
}

/* ─── Passe 4 · Feedback athlète dans colonne droite ─── */
.cid-right-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--ag-radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ag-border);
}

.cid-right-feedback .cid-sec-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.cid-rpe-hero {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.cid-rpe-val {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cid-rpe-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ag-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.cid-pain-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.12);
  color: #fb7185;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

.cid-ath-comment {
  font-style: italic;
  font-size: 12px;
  color: var(--ag-text-secondary);
  line-height: 1.5;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Passe 4 · Progressive disclosure pour courbes détaillées ─── */
.cid-progressive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  color: var(--ag-text-secondary);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  margin: 10px 0 4px;
}

.cid-progressive-toggle:hover {
  background: var(--ag-bg-elevated);
  border-color: var(--ag-primary);
  color: var(--ag-primary);
}

.cid-progressive-toggle::after {
  content: "▾";
  font-size: 9px;
  margin-left: 2px;
  transition: transform .18s ease;
  display: inline-block;
}

.cid-progressive-toggle.cid-pt-open::after {
  transform: rotate(180deg);
}

.cid-progressive-content {
  display: none;
}

.cid-progressive-content.cid-pc-open {
  display: block;
}

/* ─── Passe 7 · Builder polish : segmented control mode ─── */
.wkb-mode {
  display: inline-flex;
  padding: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  gap: 0;
}

.wkb-mode .wkb-mode-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 4px;
  color: var(--ag-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
  font-family: inherit;
}

.wkb-mode .wkb-mode-btn:hover:not(.active) {
  color: var(--ag-text-primary);
}

.wkb-mode .wkb-mode-btn.active {
  background: var(--ag-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(249, 115, 22, 0.3);
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT C                                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT D · Projection Index refonte hero                        */
/*                                                                 */
/* Ajouts CSS additifs. Classes .cipj-* existantes conservées,     */
/* nouvelles classes .cipjx-* pour éviter toute collision.         */
/* Rollback : supprimer ce bloc (jusqu'à FIN SPRINT D).            */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Wrapper panel ─── */
.cipjx-panel {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
}

/* ─── Bandeau header Orion ─── */
.cipjx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
}

.cipjx-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #a78bfa;
}

.cipjx-head-title::before {
  content: "✦";
  font-size: 12px;
  font-weight: 400;
}

.cipjx-head-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--ag-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── Hero row : delta géant + sparkline ─── */
.cipjx-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.cipjx-hero-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cipjx-delta-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.cipjx-delta-big {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cipjx-delta-suffix {
  font-size: 14px;
  font-weight: 600;
  color: var(--ag-text-muted);
}

.cipjx-delta-down { color: #fb7185; }
.cipjx-delta-up   { color: #22c55e; }
.cipjx-delta-flat { color: var(--ag-text-muted); }

.cipjx-scores {
  font-size: 12px;
  color: var(--ag-text-muted);
  font-variant-numeric: tabular-nums;
}

.cipjx-scores-from { color: var(--ag-text-secondary); font-weight: 600; }
.cipjx-scores-arrow { opacity: 0.5; margin: 0 3px; }
.cipjx-scores-to { color: var(--ag-text-secondary); font-weight: 600; }

/* ─── Sparkline à droite ─── */
.cipjx-spark {
  flex-shrink: 0;
  position: relative;
  width: 180px;
  height: 60px;
}

.cipjx-spark svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.cipjx-spark-label {
  position: absolute;
  font-size: 9px;
  font-weight: 600;
  color: var(--ag-text-muted);
  letter-spacing: 0.3px;
}

.cipjx-spark-label-start { top: 0; left: 0; }
.cipjx-spark-label-end { bottom: 0; right: 0; }

/* ─── Grille piliers 2×3 ─── */
.cipjx-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 8px;
  margin-bottom: 12px;
}

.cipjx-pillar-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.cipjx-pillar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cipjx-pillar-label {
  color: var(--ag-text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.cipjx-pillar-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}

.cipjx-pillar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 2px;
  transition: width .35s cubic-bezier(.22, 1, .36, 1);
}

.cipjx-pillar-delta {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
}

.cipjx-pillar-delta-up   { color: #22c55e; }
.cipjx-pillar-delta-down { color: #fb7185; }
.cipjx-pillar-delta-flat { color: var(--ag-text-muted); opacity: 0.55; }

/* ─── Pain strip Orion (info pure, sans bouton) ─── */
.cipjx-pain {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--ag-radius-sm);
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.25);
  font-size: 12px;
  color: var(--ag-text-primary);
}

.cipjx-pain-warning { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.25); }

.cipjx-pain-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: #fb7185;
}
.cipjx-pain-warning .cipjx-pain-icon { color: #fbbf24; }

.cipjx-pain-text { flex: 1; line-height: 1.4; }
.cipjx-pain-pillar { font-weight: 700; color: #fb7185; }
.cipjx-pain-warning .cipjx-pain-pillar { color: #fbbf24; }
.cipjx-pain-points { font-weight: 700; margin-left: 4px; }

/* ─── Empty / loading states ─── */
.cipjx-empty {
  padding: 18px 14px;
  font-size: 12px;
  color: var(--ag-text-muted);
  text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT D                                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT E · PMC dans panneau séance + modal builder              */
/*                                                                 */
/* Ajouts CSS additifs. Rollback : supprimer ce bloc.              */
/* Réutilise le moteur PMC de coach-fiche.js, rendu adapté.        */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Wrapper PMC dans panneau séance (remplace l'ancienne Projection Index) ─── */
.cidpmc-panel {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
}

/* ─── Header charge orange ─── */
.cidpmc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.15);
}

.cidpmc-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f97316;
}

.cidpmc-head-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
}

.cidpmc-head-tss {
  font-size: 11px;
  color: var(--ag-text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.cidpmc-head-tss strong { color: var(--ag-text-primary); font-weight: 700; }

/* ─── 3 metric cards CTL / ATL / TSB ─── */
.cidpmc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.cidpmc-metric {
  text-align: center;
}

.cidpmc-metric-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ag-text-muted);
  margin-bottom: 4px;
}

.cidpmc-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  line-height: 1;
}

.cidpmc-metric-val {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ag-text-primary);
}

.cidpmc-metric-delta {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cidpmc-metric-delta-up   { color: #22c55e; }
.cidpmc-metric-delta-down { color: #fb7185; }
.cidpmc-metric-delta-warn { color: #fbbf24; }
.cidpmc-metric-delta-flat { color: var(--ag-text-muted); opacity: 0.55; }

.cidpmc-metric-sub {
  font-size: 9px;
  color: var(--ag-text-muted);
  margin-top: 3px;
}

/* ─── Canvas chart 160px ─── */
.cidpmc-chart-wrap {
  position: relative;
  height: 160px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 10px;
}

.cidpmc-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ─── Verdict texte contextuel ─── */
.cidpmc-verdict {
  font-size: 11px;
  color: var(--ag-text-secondary);
  line-height: 1.5;
  padding: 6px 0 0;
}

.cidpmc-verdict-strong {
  font-weight: 700;
}

.cidpmc-verdict-ok      { --cidpmc-vcol: #22c55e; }
.cidpmc-verdict-warn    { --cidpmc-vcol: #fbbf24; }
.cidpmc-verdict-danger  { --cidpmc-vcol: #fb7185; }
.cidpmc-verdict .cidpmc-verdict-strong { color: var(--cidpmc-vcol); }

/* ─── Toggle "Voir l'impact plan global" (Index replié) ─── */
.cidpmc-index-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  color: var(--ag-text-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.cidpmc-index-toggle:hover {
  background: var(--ag-bg-elevated);
  border-color: rgba(167, 139, 250, 0.4);
  color: #a78bfa;
}

.cidpmc-index-toggle::after {
  content: "▾";
  font-size: 9px;
  margin-left: 2px;
  transition: transform .18s ease;
  display: inline-block;
}

.cidpmc-index-toggle.cidpmc-idx-open::after {
  transform: rotate(180deg);
}

.cidpmc-index-content {
  display: none;
  margin-top: 10px;
}

.cidpmc-index-content.cidpmc-idx-open {
  display: block;
}

/* ─── PMC dans le builder modal ─── */
.cidpmc-builder-wrap {
  margin: 8px 0 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
}

.cidpmc-builder-wrap .cidpmc-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.cidpmc-builder-wrap .cidpmc-metrics {
  margin-bottom: 10px;
}

.cidpmc-builder-wrap .cidpmc-chart-wrap {
  height: 140px;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT E                                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT E (vrai) · Modal Cycle refacto — profil UP/STABLE/DOWN  */
/*                                                                 */
/* Ajouts CSS additifs. Nouvelles classes .cyc2-* pour éviter     */
/* collision avec .cyc-* existantes (l'ancienne UI est retirée).  */
/* Rollback : supprimer ce bloc.                                   */
/* ═══════════════════════════════════════════════════════════════ */

.cyc2-modal {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s ease;
}

.cyc2-dialog {
  background: var(--ag-bg-card, #161619);
  border: 1px solid var(--ag-border);
  border-radius: 16px;
  padding: 20px 22px;
  max-width: 520px;
  width: 94%;
  max-height: 90vh;
  overflow-y: auto;
  animation: sheetUp .25s ease;
}

.cyc2-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ag-border);
}

.cyc2-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ag-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cyc2-subtitle {
  font-size: 0.72rem;
  color: var(--ag-text-muted);
  margin-top: 3px;
}

.cyc2-close {
  background: transparent; border: none;
  color: var(--ag-text-muted); font-size: 18px;
  cursor: pointer; padding: 0 4px;
  line-height: 1;
}
.cyc2-close:hover { color: var(--ag-text-primary); }

.cyc2-section { margin-bottom: 14px; }

.cyc2-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ag-text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

/* ─── Chips semaines (4 / 6 / 8 / 10 / 12) ─── */
.cyc2-weeks-row { display: flex; gap: 6px; }

.cyc2-week-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--ag-border);
  background: transparent;
  color: var(--ag-text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .14s ease;
}

.cyc2-week-btn:hover {
  border-color: var(--ag-primary);
  color: var(--ag-primary);
}

.cyc2-week-btn.cyc2-active {
  background: rgba(249, 115, 22, 0.1);
  color: var(--ag-primary);
  border-color: rgba(249, 115, 22, 0.4);
}

/* ─── Bar chart profil UP/STABLE/DOWN ─── */
.cyc2-profile-wrap {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ag-border);
  border-radius: 8px;
  padding: 12px;
}

.cyc2-profile-hint {
  font-size: 0.68rem;
  color: var(--ag-text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

.cyc2-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 72px;
  padding: 2px 0 8px;
}

.cyc2-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
}

.cyc2-bar-btn {
  flex: 1;
  width: 100%;
  min-width: 24px;
  border: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all .18s cubic-bezier(.22, 1, .36, 1);
  font-family: inherit;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cyc2-bar-btn:hover { filter: brightness(1.15); }
.cyc2-bar-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cyc2-bar-up {
  background: #22c55e;
  height: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.cyc2-bar-stable {
  background: #60a5fa;
  height: 55%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.cyc2-bar-down {
  background: #fb7185;
  height: 30%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.cyc2-bar-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--ag-text-muted);
  letter-spacing: 0.3px;
}

.cyc2-bar-icon {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.cyc2-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.66rem;
  color: var(--ag-text-muted);
}

.cyc2-leg-item { display: inline-flex; align-items: center; gap: 4px; }
.cyc2-leg-dot { width: 8px; height: 8px; border-radius: 2px; }
.cyc2-leg-up     { background: #22c55e; }
.cyc2-leg-stable { background: #60a5fa; }
.cyc2-leg-down   { background: #fb7185; }

/* ─── Axes de progression (checkbox + stepper par axe) ─── */
.cyc2-axes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cyc2-axis-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--ag-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color .14s ease, background .14s ease;
}

.cyc2-axis-row.cyc2-axis-on {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.04);
}

.cyc2-axis-check {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--ag-border);
  border-radius: 3px;
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all .12s ease;
}

.cyc2-axis-row.cyc2-axis-on .cyc2-axis-check {
  background: var(--ag-primary);
  border-color: var(--ag-primary);
}

.cyc2-axis-row.cyc2-axis-on .cyc2-axis-check::after {
  content: "";
  position: absolute;
  left: 3px; top: 0px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cyc2-axis-label {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ag-text-secondary);
  cursor: pointer;
}

.cyc2-axis-row.cyc2-axis-on .cyc2-axis-label { color: var(--ag-text-primary); }

.cyc2-stepper {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  opacity: 0.35;
  transition: opacity .14s ease;
}

.cyc2-axis-row.cyc2-axis-on .cyc2-stepper { opacity: 1; }

.cyc2-axis-row:not(.cyc2-axis-on) .cyc2-stepper { pointer-events: none; }

.cyc2-step-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--ag-border);
  background: var(--ag-bg-elevated, #1e1e24);
  color: var(--ag-text-primary);
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}

.cyc2-step-btn:first-child { border-radius: 4px 0 0 4px; }
.cyc2-step-btn:last-child  { border-radius: 0 4px 4px 0; }

.cyc2-step-btn:hover:not(:disabled) {
  background: var(--ag-primary);
  color: #fff;
  border-color: var(--ag-primary);
}

.cyc2-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cyc2-step-val {
  min-width: 48px;
  padding: 2px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  background: var(--ag-bg-elevated, #1e1e24);
  border-top: 1px solid var(--ag-border);
  border-bottom: 1px solid var(--ag-border);
  color: var(--ag-text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 18px;
}

.cyc2-step-unit {
  font-size: 0.66rem;
  color: var(--ag-text-muted);
  font-weight: 500;
  margin-left: 4px;
  min-width: 40px;
}

/* ─── DOWN amount row ─── */
.cyc2-down-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(251, 113, 133, 0.06);
  border: 1px solid rgba(251, 113, 133, 0.2);
}

.cyc2-down-label {
  font-size: 0.72rem;
  color: var(--ag-text-secondary);
  flex: 1;
}

.cyc2-down-label strong { color: #fb7185; font-weight: 700; }

/* ─── Preview liste semaines ─── */
.cyc2-preview {
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.72rem;
  color: var(--ag-text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ag-border);
  border-radius: 6px;
  padding: 8px 10px;
}

.cyc2-preview-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px;
  padding: 4px 0;
  align-items: baseline;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cyc2-preview-row:last-child { border-bottom: none; }

.cyc2-preview-week {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.cyc2-preview-week-up     { color: #22c55e; }
.cyc2-preview-week-stable { color: #60a5fa; }
.cyc2-preview-week-down   { color: #fb7185; }

.cyc2-preview-date {
  color: var(--ag-text-muted);
  font-size: 0.68rem;
}

.cyc2-preview-detail {
  color: var(--ag-text-primary);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
}

/* ─── CTA primary ─── */
.cyc2-create-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--ag-primary, #f97316);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .14s ease;
  margin-top: 14px;
}

.cyc2-create-btn:hover { background: #ea580c; }

.cyc2-create-btn:disabled {
  background: var(--ag-bg-elevated);
  color: var(--ag-text-muted);
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT E (vrai)                                             */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT E v2 · Cycle "carte par semaine" avec preview séance    */
/*                                                                 */
/* Les classes .cyc2-* de Sprint E vrai restent pour les parties   */
/* conservées (modal wrapper, chips weeks, légende). Nouvelles     */
/* classes .cyc3-* pour les cartes par semaine (évite collision).  */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Carte semaine (compacte, 2 lignes) ─── */
.cyc3-week {
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--ag-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 8px;
  transition: border-color .18s ease;
}

.cyc3-week-up     { border-left: 3px solid #22c55e; }
.cyc3-week-stable { border-left: 3px solid #60a5fa; }
.cyc3-week-down   { border-left: 3px solid #fb7185; }

/* ─── Ligne 1 : barre d'état + label + preview séance ─── */
.cyc3-row-top {
  display: grid;
  grid-template-columns: 32px auto 1fr;
  gap: 10px;
  align-items: center;
}

.cyc3-state-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  transition: filter .14s ease, transform .08s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.cyc3-state-btn:hover { filter: brightness(1.15); }
.cyc3-state-btn:active { transform: scale(0.94); }
.cyc3-state-up     { background: #22c55e; }
.cyc3-state-stable { background: #60a5fa; }
.cyc3-state-down   { background: #fb7185; }

.cyc3-week-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cyc3-week-date {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ag-text-muted);
  margin-left: 4px;
}

.cyc3-preview {
  font-size: 0.72rem;
  color: #60a5fa;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cyc3-preview-strong { color: var(--ag-text-primary); font-weight: 700; }

/* ─── Ligne 2 : steppers inline compacts par axe ─── */
.cyc3-row-axes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.cyc3-axis {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: center;
}

.cyc3-axis-label {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ag-text-muted);
  letter-spacing: 0.2px;
}

.cyc3-axis-label-touched {
  color: var(--ag-primary);
  font-weight: 700;
}

.cyc3-axis-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--ag-bg-elevated, #1e1e24);
  border: 1px solid var(--ag-border);
  border-radius: 4px;
  overflow: hidden;
}

.cyc3-step-btn {
  width: 20px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--ag-text-primary);
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  transition: background .1s ease;
}
.cyc3-step-btn:hover { background: var(--ag-primary); color: #fff; }
.cyc3-step-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.cyc3-step-val {
  min-width: 38px;
  padding: 0 6px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  font-variant-numeric: tabular-nums;
}

.cyc3-step-val-touched { color: var(--ag-primary); }

/* ─── Badge DOWN % inline ─── */
.cyc3-down-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.25);
  color: #fb7185;
  font-size: 0.66rem;
  font-weight: 700;
  margin-left: auto;
}

/* ─── Bouton "Auto" pour réinitialiser suggestions ─── */
.cyc3-auto-btn {
  background: transparent;
  border: 1px solid var(--ag-border);
  color: var(--ag-text-muted);
  font-size: 0.64rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all .12s ease;
}
.cyc3-auto-btn:hover {
  border-color: var(--ag-primary);
  color: var(--ag-primary);
}

/* ─── Responsive compact pour petits écrans ─── */
@media (max-width: 520px) {
  .cyc3-row-top { grid-template-columns: 28px auto 1fr; gap: 8px; }
  .cyc3-preview { font-size: 0.68rem; }
  .cyc3-state-btn { width: 28px; height: 28px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT E v2                                                 */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT E v3 · Carte semaine avec delta+absolu, stepper weeks   */
/*   libre, DOWN sans %, cumul reprend après DOWN                 */
/*                                                                 */
/* Ajouts complémentaires aux classes .cyc3-* existantes.          */
/* Nouvelles classes .cyc3w- (pour weeks stepper) et .cyc3a-       */
/* (pour axis value display), cohérentes avec le namespace.        */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Stepper weeks libre ─── */
.cyc3w-weeks {
  display: inline-flex;
  align-items: center;
  background: var(--ag-bg-elevated, #1e1e24);
  border: 1px solid var(--ag-border);
  border-radius: 6px;
  overflow: hidden;
}

.cyc3w-weeks-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ag-text-primary);
  font-weight: 800;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .1s ease;
}
.cyc3w-weeks-btn:hover:not(:disabled) { background: var(--ag-primary); color: #fff; }
.cyc3w-weeks-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.cyc3w-weeks-val {
  min-width: 60px;
  padding: 0 12px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  font-variant-numeric: tabular-nums;
}

.cyc3w-weeks-hint {
  font-size: 0.66rem;
  color: var(--ag-text-muted);
  margin-left: 10px;
}

/* ─── Ligne S1 source (grisée) ─── */
.cyc3-week-source {
  display: grid;
  grid-template-columns: 32px auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  opacity: 0.85;
}

.cyc3-week-source-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 800;
  font-size: 11px;
}

.cyc3-week-source-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ag-text-muted);
}

.cyc3-week-source-tag {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--ag-text-muted);
  opacity: 0.6;
  margin-left: 6px;
}

.cyc3-week-source-preview {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── Axe avec delta + valeur absolue ─── */
.cyc3a-axis {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cyc3a-axis-inactive {
  opacity: 0.55;
}

.cyc3a-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cyc3a-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ag-text-muted);
  letter-spacing: 0.2px;
}

.cyc3a-label-touched,
.cyc3a-label-active {
  color: var(--ag-primary);
  font-weight: 700;
}

.cyc3a-absolute {
  font-size: 0.62rem;
  color: var(--ag-text-muted);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* Stepper compact réutilisé depuis v2 : .cyc3-axis-stepper, .cyc3-step-btn, .cyc3-step-val
   Mais on override la couleur du delta pour active (non-zero) */
.cyc3a-delta {
  flex: 1;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  min-width: 38px;
}

.cyc3a-delta-nonzero { color: var(--ag-primary); }
.cyc3a-delta-touched { color: var(--ag-primary); }

/* ─── Preview intensité modifiée en DOWN → afficher en rose discret ─── */
.cyc3-preview-down-note {
  color: #fb7185;
  font-weight: 600;
  font-size: 0.68rem;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT E v3                                                 */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT E v3.1 · Toggle unité sec/min pour axes temps           */
/* ═══════════════════════════════════════════════════════════════ */

.cyc3a-unit-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ag-border);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 4px;
  height: 14px;
  vertical-align: middle;
}

.cyc3a-unit-opt {
  padding: 0 5px;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--ag-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  height: 100%;
  line-height: 1;
  letter-spacing: 0.2px;
  transition: all .1s ease;
}

.cyc3a-unit-opt:hover:not(.cyc3a-unit-active) {
  color: var(--ag-text-secondary);
}

.cyc3a-unit-active {
  background: var(--ag-primary);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT E v3.1                                               */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT E v3.2 · Crosshair PMC (panneau séance + modal builder) */
/* ═══════════════════════════════════════════════════════════════ */

.cidpmc-chart-wrap {
  cursor: crosshair;
  overflow: visible;
}

.cidpmc-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  border-radius: 8px;
}

.cidpmc-xh-line {
  position: absolute;
  top: 6px; bottom: 18px;
  width: 1px;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s ease;
}

.cidpmc-xh-line.cidpmc-xh-visible { opacity: 1; }

.cidpmc-xh-dot {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid #0f0f14;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s ease;
}

.cidpmc-xh-dot.cidpmc-xh-visible { opacity: 1; }

.cidpmc-xh-dot-ctl { background: #22c55e; }
.cidpmc-xh-dot-atl { background: #f97316; }
.cidpmc-xh-dot-tsb { background: #60a5fa; }

.cidpmc-tooltip {
  position: absolute;
  min-width: 140px;
  padding: 8px 10px;
  background: rgba(15, 15, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.72rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.cidpmc-tooltip.cidpmc-tt-visible { opacity: 1; }

.cidpmc-tt-date {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
}

.cidpmc-tt-proj {
  color: #a78bfa;
  font-weight: 600;
  margin-left: 4px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cidpmc-tt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}

.cidpmc-tt-k {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--ag-text-secondary);
  font-weight: 600;
}

.cidpmc-tt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.cidpmc-tt-v {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ag-text-primary);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT E v3.2                                               */
/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* SPRINT MESSAGING UX · Orion suggestion inline sous textarea    */
/* ═══════════════════════════════════════════════════════════════ */

/* Slot dédié juste au-dessus de la zone d'input */
#ath-msg-orion-slot {
  padding: 0 16px;
}

#ath-msg-orion-slot:empty {
  display: none;
}

#ath-msg-orion-slot .orion-msg-suggest {
  margin-bottom: 6px;
  margin-top: 0;
}

/* ─── Fix textarea layout ─── */
/* Le wrapper relatif qui porte le compteur de caractères doit
   vraiment prendre tout l'espace disponible (flex:1 n'était pas
   suffisant à cause de la textarea qui définit un scrollHeight
   inadapté quand la largeur est trop petite). */
.athlete-messages-input > div[style*="flex:1"],
.athlete-messages-input > div[style*="flex: 1"] {
  min-width: 0;
  width: 100%;
}

/* La textarea doit remplir son wrapper (le wrapper prenait flex:1
   mais la textarea elle-même ne le répercutait pas) */
.athlete-messages-input textarea {
  width: 100%;
  box-sizing: border-box;
}

/* État loading pendant la génération IA */
.orion-msg-suggest-loading {
  opacity: 0.75;
  cursor: wait !important;
}

.orion-msg-suggest-loading .orion-msg-suggest-reason {
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.orion-msg-suggest-loading .orion-msg-suggest-reason::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(96, 165, 250, 0.3);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIN SPRINT MESSAGING UX                                         */
/* ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════ */
/* TUNNEL CRÉATION SÉANCE (calendrier) — préfixe .cw-               */
/* Charte V4.1 stricte : orange primary, ✦ violet pour Orion uniqt  */
/* ═══════════════════════════════════════════════════════════════ */

.cw-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  z-index: 8000;
  align-items: center; justify-content: center;
  padding: 24px;
}
.cw-overlay.open { display: flex; }

.cw-modal {
  background: var(--ag-bg-surface);
  border: 1px solid var(--ag-border-med);
  border-radius: var(--ag-radius-xl);
  width: 100%; max-width: 1000px;
  max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: cwModalUp .35s cubic-bezier(.22,1,.36,1);
}
@keyframes cwModalUp {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header — contexte athlète + date toujours visible */
.cw-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--ag-border);
  flex-shrink: 0;
}
.cw-head-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(249,115,22,.3);
}
.cw-head-info { flex: 1; min-width: 0; }
.cw-head-title {
  font-size: 1rem; font-weight: 800; color: var(--ag-text-primary);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  line-height: 1.3;
}
.cw-head-title .cw-sep {
  color: var(--ag-text-muted); opacity: .5; font-weight: 400;
}
.cw-head-sub {
  font-size: .72rem; color: var(--ag-text-muted);
  margin-top: 2px;
}
.cw-head-close {
  width: 32px; height: 32px; border-radius: var(--ag-radius-sm);
  border: 1px solid var(--ag-border); background: transparent;
  color: var(--ag-text-muted); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; transition: all .15s;
}
.cw-head-close:hover { color: var(--ag-text-primary); border-color: var(--ag-border-med); }

/* Stepper — identique pattern au tunnel Bibliothèque */
.cw-stepper {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 22px 14px; gap: 0;
  border-bottom: 1px solid var(--ag-border);
  background: linear-gradient(180deg, var(--ag-bg-elevated) 0%, var(--ag-bg-surface) 100%);
  flex-shrink: 0;
}
.cw-step {
  display: flex; align-items: center; gap: 8px;
  cursor: default; user-select: none;
}
.cw-step.clickable { cursor: pointer; }
.cw-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; font-family: inherit;
  background: var(--ag-bg-card); color: var(--ag-text-muted);
  border: 1.5px solid var(--ag-border);
  transition: all .3s cubic-bezier(.22,1,.36,1);
  flex-shrink: 0;
}
.cw-step-label {
  font-size: .74rem; font-weight: 600; color: var(--ag-text-muted);
  transition: color .3s cubic-bezier(.22,1,.36,1);
  white-space: nowrap;
}
.cw-step.is-passed .cw-step-num {
  background: rgba(45,211,111,.15);
  border-color: rgba(45,211,111,.45);
  color: #2dd36f;
}
.cw-step.is-passed .cw-step-num::before { content: '✓'; }
.cw-step.is-passed .cw-step-num span { display: none; }
.cw-step.is-active .cw-step-num {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: #f97316;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(249,115,22,.18), 0 4px 12px rgba(249,115,22,.35);
  transform: scale(1.08);
}
.cw-step.is-active .cw-step-label {
  color: var(--ag-text-primary); font-weight: 700;
}
.cw-step-line {
  width: 48px; height: 2px;
  background: var(--ag-border);
  margin: 0 12px; position: relative; overflow: hidden;
  flex-shrink: 0;
}
.cw-step-line.is-passed {
  background: rgba(45,211,111,.45);
}
.cw-step-line.is-passed::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(45,211,111,.6), transparent);
  animation: cwLineGlow 1.5s ease-in-out infinite;
}
@keyframes cwLineGlow { 0%,100% { transform: translateX(-100%); } 50% { transform: translateX(100%); } }

/* Stage scrollable */
.cw-stage {
  flex: 1; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
}
.cw-step-content {
  padding: 26px 30px;
  animation: cwSlideIn .35s cubic-bezier(.22,1,.36,1) both;
}
.cw-step-content.slide-back { animation-name: cwSlideInBack; }
@keyframes cwSlideIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes cwSlideInBack {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Étape 1 — Sport */
.cw-step1-title {
  font-size: 1.15rem; font-weight: 800; color: var(--ag-text-primary);
  text-align: center; margin-bottom: 6px;
}
.cw-step1-subtitle {
  font-size: .82rem; color: var(--ag-text-muted);
  text-align: center; margin-bottom: 24px;
}
.cw-sport-section-label {
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--ag-text-muted);
  margin: 18px 0 8px; text-align: center;
}
.cw-sport-section-label:first-of-type { margin-top: 0; }
.cw-sport-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; padding: 4px 0;
  max-width: 680px; margin: 0 auto;
}
.cw-sport-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: var(--ag-radius-full);
  border: 1.5px solid var(--ag-border); background: var(--ag-bg-card);
  color: var(--ag-text-primary); font-size: .86rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .2s, box-shadow .2s;
  opacity: 0; animation: cwPillIn .35s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes cwPillIn {
  from { opacity: 0; transform: translateY(12px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cw-sport-pill:nth-child(1) { animation-delay: .08s; }
.cw-sport-pill:nth-child(2) { animation-delay: .14s; }
.cw-sport-pill:nth-child(3) { animation-delay: .20s; }
.cw-sport-pill:nth-child(4) { animation-delay: .26s; }
.cw-sport-pill:nth-child(5) { animation-delay: .32s; }
.cw-sport-pill:nth-child(6) { animation-delay: .38s; }
.cw-sport-pill:nth-child(7) { animation-delay: .44s; }
.cw-sport-pill .cw-sport-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.cw-sport-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.cw-sport-pill.is-secondary { opacity: .7; }
.cw-sport-pill.is-secondary:hover { opacity: 1; }
.cw-sport-pill.is-selecting {
  animation: cwPickPulse .5s cubic-bezier(.22,1,.36,1);
  transform: scale(1.04);
}
@keyframes cwPickPulse {
  0% { box-shadow: 0 0 0 0 var(--cw-sport-color, rgba(249,115,22,.5)); }
  100% { box-shadow: 0 0 0 24px transparent; }
}

/* Étape 2 — Détails */
.cw-meta-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  max-width: 680px; margin: 0 auto;
}
.cw-meta-form .full { grid-column: 1 / -1; }
.cw-meta-form label {
  display: block; font-size: .66rem; font-weight: 700;
  color: var(--ag-text-muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .4px;
}
.cw-meta-form input,
.cw-meta-form select,
.cw-meta-form textarea {
  width: 100%; padding: 10px 14px;
  border-radius: var(--ag-radius-sm);
  border: 1px solid var(--ag-border); background: var(--ag-bg-card);
  color: var(--ag-text-primary); font-family: inherit; font-size: .88rem;
  transition: border-color .2s;
}
.cw-meta-form input:focus,
.cw-meta-form select:focus,
.cw-meta-form textarea:focus {
  outline: none; border-color: var(--ag-primary);
}
.cw-meta-form textarea { resize: vertical; min-height: 60px; }

/* Hint zone absolue (BPM/Watts/pace) */
.cw-zone-hint {
  grid-column: 1 / -1;
  margin-top: -6px;
  padding: 8px 12px;
  background: rgba(249,115,22,.04);
  border: 1px solid rgba(249,115,22,.15);
  border-radius: var(--ag-radius-sm);
  font-size: .74rem; color: var(--ag-text-secondary);
}
.cw-zone-hint b { color: var(--ag-primary); font-weight: 700; }
.cw-zone-hint .cw-zone-hint-empty { color: var(--ag-text-muted); }

/* Étape 3 — Builder */
.cw-builder-recap {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; margin-bottom: 14px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  font-size: .78rem;
}
.cw-builder-recap-info { flex: 1; min-width: 0; color: var(--ag-text-secondary); }
.cw-builder-recap-info b { color: var(--ag-text-primary); font-weight: 700; }
.cw-builder-recap-edit {
  padding: 5px 12px; font-size: .72rem; font-weight: 600;
  border: 1px solid var(--ag-border); background: transparent;
  color: var(--ag-text-secondary); border-radius: var(--ag-radius-sm);
  cursor: pointer; font-family: inherit; transition: all .2s;
  display: inline-flex; align-items: center; gap: 5px;
}
.cw-builder-recap-edit:hover {
  border-color: var(--ag-primary); color: var(--ag-primary);
}
.cw-builder-area { border-radius: var(--ag-radius-md); overflow: hidden; }

/* Étape 4 — Récap final */
.cw-final-card {
  max-width: 680px; margin: 0 auto;
  padding: 22px 24px;
  background: linear-gradient(180deg, var(--ag-bg-elevated) 0%, var(--ag-bg-card) 100%);
  border: 1px solid var(--ag-border-med);
  border-radius: var(--ag-radius-lg);
}
.cw-final-athlete {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--ag-border);
}
.cw-final-athlete-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.cw-final-athlete-info { flex: 1; min-width: 0; }
.cw-final-athlete-name { font-size: .88rem; font-weight: 700; color: var(--ag-text-primary); }
.cw-final-athlete-date { font-size: .72rem; color: var(--ag-text-muted); margin-top: 1px; }
.cw-final-title {
  font-size: 1.15rem; font-weight: 800; color: var(--ag-text-primary);
  margin-bottom: 4px;
}
.cw-final-meta {
  font-size: .82rem; color: var(--ag-text-muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.cw-final-meta .cw-sep { opacity: .5; }
.cw-final-section {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--ag-border);
}
.cw-final-section-title {
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--ag-text-muted); margin-bottom: 8px;
}
.cw-final-stats {
  font-size: .84rem; color: var(--ag-text-secondary);
}
.cw-final-stats b { color: var(--ag-text-primary); font-weight: 700; }
.cw-final-stats .cw-warn { color: var(--ag-rose, #fb7185); }

/* Footer (étapes 2/3/4) */
.cw-foot {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 14px 22px; border-top: 1px solid var(--ag-border);
  background: var(--ag-bg-elevated); flex-shrink: 0;
}
.cw-foot-left, .cw-foot-right { display: flex; gap: 8px; }

/* Bouton final "Programmer" — halo orange pulsant signature */
.cw-btn-program {
  padding: 13px 28px; font-size: .92rem; font-weight: 800;
  animation: cwCtaGlow 2s ease-in-out infinite;
}
@keyframes cwCtaGlow {
  0%, 100% { box-shadow: 0 4px 18px rgba(249,115,22,.35); }
  50%      { box-shadow: 0 6px 28px rgba(249,115,22,.55); }
}

/* Effet de succès flash orange */
.cw-success-burst {
  position: fixed; inset: 0; z-index: 10000;
  pointer-events: none;
}
.cw-success-burst.show { animation: cwBurst .8s cubic-bezier(.22,1,.36,1); }
@keyframes cwBurst {
  0%   { background: rgba(249,115,22,0); }
  30%  { background: rgba(249,115,22,.18); }
  100% { background: rgba(249,115,22,0); }
}

@media (max-width: 720px) {
  .cw-overlay { padding: 0; align-items: flex-end; }
  .cw-modal { max-height: 96vh; max-width: 100%; border-radius: var(--ag-radius-lg) var(--ag-radius-lg) 0 0; }
  .cw-stepper { padding: 12px 14px 10px; }
  .cw-step-line { width: 24px; margin: 0 6px; }
  .cw-step-label { display: none; }
  .cw-step-content { padding: 20px 16px; }
  .cw-meta-form { grid-template-columns: 1fr; }
  .cw-foot { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cw-step-content, .cw-sport-pill, .cw-modal { animation: none; }
  .cw-btn-program { animation: none; }
}

/* ═══ FIN tunnel calendrier ═══ */

/* ═══════════════════════════════════════════════════════════════
   CH-001.4 §3.1 — BANDEAU PRÉ-EXPIRATION COHORTE
   Pattern pain-strip charte V4.1 §1.2 (alerte horizontale).
   Affiché juste sous le greeting, au-dessus de Pending requests.
   Variantes : info / warning / urgent / critical (couleurs sémantiques).
   ═══════════════════════════════════════════════════════════════ */

.cohort-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin: 14px 0 18px;
  border-radius: var(--ag-radius-lg, 14px);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ag-text-primary, #f5f5f7);
  transition: border-color 0.18s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}

.cohort-banner__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.cohort-banner__text {
  flex: 1;
  min-width: 0;
}

.cohort-banner__text strong {
  color: var(--ag-text-primary, #f5f5f7);
  font-weight: 700;
}

.cohort-banner__cta {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--ag-radius-md, 10px);
  border: 1px solid;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}

.cohort-banner__cta:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Variante critical : pulse léger pour signaler l'urgence */
.cohort-banner--critical .cohort-banner__icon {
  animation: cohortBannerPulse 2s ease-in-out infinite;
}

@keyframes cohortBannerPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .cohort-banner--critical .cohort-banner__icon { animation: none; }
}

/* Mobile : passer en colonne, CTA full width sous le texte */
@media (max-width: 640px) {
  .cohort-banner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .cohort-banner__text {
    flex: 1 1 calc(100% - 42px);
  }
  .cohort-banner__cta {
    flex: 1 1 100%;
    text-align: center;
    margin-top: 4px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   CH-001.4 §3.2 — MODALE UPGRADE PRO / TEAM
   Warm Night design system. Charte V4.1 : pas d'emoji sauf ✦,
   couleurs --ag-*, ease cubic-bezier(.22,1,.36,1), animations propres,
   prefers-reduced-motion respecté.
   ═══════════════════════════════════════════════════════════════ */

/* Overlay (fond semi-opaque) */
.apm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  transition: opacity 0.22s var(--ag-ease, cubic-bezier(.22,1,.36,1));
}
.apm-overlay--visible { opacity: 1; }

/* Modale principale */
.apm-modal {
  position: relative;
  background: var(--ag-bg-card, #1f1f25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  max-width: 880px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ag-text-primary, #f5f5f7);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
              opacity 0.22s ease;
}
.apm-overlay--visible .apm-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Bouton close (×) */
.apm-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--ag-text-muted, #71717a);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.apm-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ag-text-primary, #f5f5f7);
}

/* Header */
.apm-header {
  text-align: center;
  margin-bottom: 28px;
}
.apm-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ag-text-primary, #f5f5f7);
  margin: 0 0 10px;
  line-height: 1.25;
}
.apm-subtitle {
  font-size: 0.92rem;
  color: var(--ag-text-secondary, #c4c4cc);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 540px;
}

/* Grille des cards */
.apm-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* Card individuelle */
.apm-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.22s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
              transform 0.22s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
              background 0.22s ease;
}

/* Card recommandée (Pro) — accent orange subtil */
.apm-card--recommended {
  border-color: rgba(249, 115, 22, 0.32);
  background: linear-gradient(180deg,
    rgba(249, 115, 22, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 60%);
}
.apm-card--recommended:hover {
  border-color: rgba(249, 115, 22, 0.55);
  transform: translateY(-2px);
}

/* Card non recommandée (Team) — hover discret */
.apm-card--team {
  opacity: 0.85;
}
.apm-card--team:hover {
  border-color: rgba(167, 139, 250, 0.25);
  opacity: 1;
}

/* Badge "Recommandé" en haut à droite */
.apm-badge {
  position: absolute;
  top: 14px; right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 999px;
  text-transform: uppercase;
}
.apm-badge-icon {
  display: inline-flex;
  align-items: center;
}

/* Header de card */
.apm-card-head {
  margin-bottom: 14px;
}
.apm-card-label {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ag-text-primary, #f5f5f7);
  line-height: 1;
  margin-bottom: 6px;
}
.apm-card-tagline {
  font-size: 0.8rem;
  color: var(--ag-text-muted, #71717a);
  line-height: 1.4;
}

/* Prix */
.apm-card-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 14px 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.apm-price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--ag-text-primary, #f5f5f7);
  line-height: 1;
}
.apm-price-currency {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ag-text-primary, #f5f5f7);
  margin-left: 2px;
}
.apm-price-period {
  font-size: 0.92rem;
  color: var(--ag-text-muted, #71717a);
  margin-left: 6px;
  font-weight: 500;
}

/* Liste des features */
.apm-features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
}
.apm-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.86rem;
  color: var(--ag-text-secondary, #c4c4cc);
  line-height: 1.5;
}
.apm-feature-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: #f97316;
}
.apm-card--team .apm-feature-icon {
  color: #a78bfa;
}
.apm-feature-text strong {
  color: var(--ag-text-primary, #f5f5f7);
  font-weight: 700;
}

/* CTA */
.apm-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 20px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ag-ease, cubic-bezier(.22,1,.36,1)),
              box-shadow 0.18s ease,
              background 0.15s ease;
  border: none;
  box-sizing: border-box;
}
.apm-cta--primary {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
}
.apm-cta--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.40);
}
.apm-cta--primary:active {
  transform: translateY(0);
}
.apm-cta--disabled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ag-text-muted, #71717a);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  cursor: not-allowed;
}

/* Footer */
.apm-footer {
  text-align: center;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.apm-later {
  background: transparent;
  border: none;
  color: var(--ag-text-muted, #71717a);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.apm-later:hover {
  color: var(--ag-text-primary, #f5f5f7);
  background: rgba(255, 255, 255, 0.04);
}
.apm-reassurance {
  font-size: 0.76rem;
  color: var(--ag-text-muted, #71717a);
  margin: 12px 0 0;
  line-height: 1.5;
}

/* prefers-reduced-motion : désactive animations */
@media (prefers-reduced-motion: reduce) {
  .apm-overlay,
  .apm-modal,
  .apm-card,
  .apm-cta--primary {
    transition: none !important;
    animation: none !important;
  }
  .apm-card:hover,
  .apm-cta--primary:hover {
    transform: none !important;
  }
}

/* Mobile : cards en colonne, padding réduit */
@media (max-width: 720px) {
  .apm-modal {
    padding: 28px 20px 20px;
    border-radius: 16px;
  }
  .apm-title { font-size: 1.35rem; }
  .apm-subtitle { font-size: 0.86rem; }
  .apm-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .apm-card { padding: 20px 18px 18px; }
  .apm-price-amount { font-size: 2.1rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   CH-003 Sprint B (pivot simplifié) — Bandeau bienvenue + animations CSS pures
   PAS d'orchestrateur JS, PAS d'overlay, PAS de FLIP.
   Les animations se déclenchent automatiquement quand les classes
   apparaissent dans le DOM (au render du dashboard post-signup).
   Le wow principal reste dans l'écran narratif login.html Sprint A (3-5s).
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Bandeau bienvenue (remplace l'ancien "onboarding-checklist") ─── */
.agt-welcome-banner {
  position: relative;
  margin: 0 0 24px;
  padding: 22px 24px 22px;
  background:
    radial-gradient(ellipse 600px 200px at 50% -50%, rgba(249,115,22,0.08), transparent 70%),
    var(--ag-bg-card, #27272e);
  border: 1px solid var(--ag-border, rgba(148,163,184,0.08));
  border-radius: var(--ag-radius-lg, 16px);
  overflow: hidden;
  /* Animation fade-in + slide up au render */
  animation: agtFadeInUp 600ms cubic-bezier(.22,1,.36,1) 100ms backwards;
}
.agt-welcome-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ag-orange, #f97316), transparent);
  opacity: 0.5;
}

@keyframes agtFadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Verbatim Pull-quote en eyebrow (DA §6.8) */
.agt-welcome-eyebrow {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ag-text-secondary, #a8afc0);
  line-height: 1.45;
  margin: 0 0 4px;
  max-width: 560px;
}
.agt-welcome-eyebrow-attr {
  font-size: 0.78rem;
  color: var(--ag-text-muted, #6b7280);
  letter-spacing: 0.2px;
  margin: 0 0 16px;
}
.agt-welcome-banner h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ag-text-primary, #f0f0f5);
  margin: 0 0 8px;
}
.agt-welcome-body {
  font-size: 0.95rem;
  color: var(--ag-text-secondary, #a8afc0);
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 560px;
}
.agt-welcome-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.agt-cta-tour-start {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--ag-orange, #f97316), var(--ag-orange-2, #ea580c));
  color: #fff; font-weight: 700; font-size: 0.92rem;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 18px rgba(249,115,22,0.25);
  transition: transform 200ms cubic-bezier(.22,1,.36,1), box-shadow 200ms;
  /* Léger pulse au mount pour attirer l'œil — boucle 2x puis stop */
  animation: agtCtaGentlePulse 1.8s ease-in-out 800ms 2;
}
.agt-cta-tour-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(249,115,22,0.4);
}
@keyframes agtCtaGentlePulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(249,115,22,0.25); }
  50%      { box-shadow: 0 4px 28px rgba(249,115,22,0.55), 0 0 0 4px rgba(249,115,22,0.12); }
}

.agt-cta-tour-skip {
  background: transparent; border: none; cursor: pointer;
  color: var(--ag-text-muted, #6b7280); font-size: 0.84rem;
  font-family: inherit; padding: 8px 4px;
  transition: color 200ms;
}
.agt-cta-tour-skip:hover { color: var(--ag-text-secondary, #a8afc0); }

/* Cascade fade-in léger des éléments signature du premier mount.
   Pas appliqué globalement (sinon dérangerait nav entre pages) — seulement
   quand le bandeau bienvenue est présent (= mount onboarding). */
.agt-welcome-banner ~ .ag-section,
.cd-header:has(+ .agt-welcome-banner),
.agt-welcome-banner + .ag-section .athlete-card:first-child {
  animation: agtFadeInUp 500ms cubic-bezier(.22,1,.36,1) 200ms backwards;
}

/* Halo pulse 2× sur la première carte athlète (= Julien démo) quand le
   bandeau bienvenue est présent. CSS pur, déclenché au render. */
.agt-welcome-banner ~ .ag-section .athlete-card:first-of-type {
  animation: agtFadeInUp 600ms cubic-bezier(.22,1,.36,1) 400ms backwards,
             agtJulienHaloPulse 1.6s ease-out 1000ms 2;
}
@keyframes agtJulienHaloPulse {
  0%   { box-shadow: 0 0 0 0    rgba(249,115,22,0.45); }
  50%  { box-shadow: 0 0 0 18px rgba(249,115,22,0); }
  100% { box-shadow: 0 0 0 0    rgba(249,115,22,0); }
}

/* Mobile responsive */
@media (max-width: 640px) {
  .agt-welcome-banner { padding: 18px 18px; margin-bottom: 18px; }
  .agt-welcome-banner h3 { font-size: 1.1rem; }
  .agt-welcome-eyebrow { font-size: 0.78rem; }
  .agt-welcome-body { font-size: 0.88rem; }
  .agt-cta-tour-start { width: 100%; justify-content: center; padding: 14px 18px; }
  .agt-welcome-actions { flex-direction: column; align-items: stretch; }
}

/* Reduced motion : désactive les animations sans casser le rendu */
@media (prefers-reduced-motion: reduce) {
  .agt-welcome-banner,
  .agt-cta-tour-start,
  .agt-welcome-banner ~ .ag-section,
  .agt-welcome-banner ~ .ag-section .athlete-card:first-of-type {
    animation: none !important;
  }
}


/* ─── CH-003 Sprint C — Bouton "Visite" header coach ─── */
.agt-tour-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--ag-text-secondary, #a8afc0);
  border-radius: 8px;
  cursor: pointer; font-family: inherit;
  background: transparent;
  border: 1px solid rgba(148,163,184,0.12);
  transition: background 200ms, border-color 200ms, color 200ms;
}
.agt-tour-btn svg { color: var(--ag-orange, #f97316); flex-shrink: 0; }
.agt-tour-btn:hover {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.3);
  color: var(--ag-text-primary, #f0f0f5);
}
@media (max-width: 720px) {
  .agt-tour-btn span { display: none; }
  .agt-tour-btn { padding: 6px 8px; }
}


/* ─── CH-003 Sprint D — Modal invite 3 onglets (Email / CSV / Lien magique) ─── */
.ag-invite-tabs {
  display: flex;
  border-bottom: 1px solid var(--ag-border, rgba(148,163,184,0.1));
  margin: -8px -2px 18px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ag-invite-tabs::-webkit-scrollbar { display: none; }
.ag-invite-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: transparent; border: none;
  color: var(--ag-text-muted, #6b7280);
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 200ms, border-color 200ms;
  margin-bottom: -1px;
}
.ag-invite-tab:hover { color: var(--ag-text-secondary, #a8afc0); }
.ag-invite-tab.active {
  color: var(--ag-text-primary, #f0f0f5);
  border-bottom-color: var(--ag-orange, #f97316);
}
.ag-invite-tab svg { flex-shrink: 0; }
.ag-invite-tab.active svg { color: var(--ag-orange, #f97316); }
.ag-invite-pane { display: none; }
.ag-invite-pane.active { display: block; animation: invPaneFade 220ms ease-out; }
@keyframes invPaneFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 520px) {
  .ag-invite-tab { padding: 9px 10px; font-size: 0.8rem; gap: 5px; }
  .ag-invite-tab span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
}


/* ─── CH-003 Sprint F — Bandeau confirmation email J+7 (V-32) ─── */
.agt-ec-banner {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  animation: agtEcFadeIn 400ms cubic-bezier(.22,1,.36,1);
}
@keyframes agtEcFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.agt-ec-warn {
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.22);
}
.agt-ec-urgent {
  background: rgba(251,113,133,0.06);
  border: 1px solid rgba(251,113,133,0.28);
}
.agt-ec-text { flex: 1; min-width: 0; }
.agt-ec-title {
  font-weight: 700; font-size: 0.92rem;
  color: var(--ag-text-primary, #f0f0f5);
  margin-bottom: 2px;
}
.agt-ec-body {
  font-size: 0.82rem; line-height: 1.45;
  color: var(--ag-text-secondary, #a8afc0);
}
.agt-ec-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  background: var(--ag-orange, #f97316); color: #fff;
  border: none; border-radius: 8px;
  font-family: inherit; font-size: 0.82rem; font-weight: 700;
  cursor: pointer;
  transition: transform 200ms, box-shadow 200ms;
  box-shadow: 0 2px 10px rgba(249,115,22,0.25);
}
.agt-ec-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,0.4); }
.agt-ec-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.agt-ec-urgent .agt-ec-btn { background: var(--ag-rose, #fb7185); box-shadow: 0 2px 10px rgba(251,113,133,0.3); }
.agt-ec-urgent .agt-ec-btn:hover { box-shadow: 0 4px 16px rgba(251,113,133,0.45); }
@media (max-width: 600px) {
  .agt-ec-banner { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
  .agt-ec-btn { width: 100%; padding: 11px 16px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Sprint 2.A Phase 1 v2 hotfix (15 mai 2026) — Wow reveal SAFE (pas de blackout)
   ───────────────────────────────────────────────────────────────────────────
   FIX du bug v2 initial : les animations utilisaient animation-fill-mode:
   backwards avec des délais 1000-1300ms, ce qui rendait les éléments
   INVISIBLES pendant tout le délai. Combiné avec le skeleton qui fade-out
   en 300ms, ça créait un blackout de 700-1000ms entre la fin du skeleton
   et l'apparition progressive du contenu.

   APPROCHE V2.1 (présente) :
   - Le CONTENU RESTE TOUJOURS VISIBLE (pas de opacity 0 par défaut)
   - Les animations sont des EFFETS SUPERPOSÉS qui s'ajoutent au contenu
     déjà visible : glow accent orange sur bandeau, halo pulse sur carte
     Julien démo, scale pop subtil sur CTA tour.
   - Plus de blackout possible : à T=0, tout est visible. L'effet wow
     joue PAR-DESSUS le contenu visible pendant 1.5-2s.
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes agtWowRevBannerGlow {
  0%   { box-shadow: 0 0 0 0 rgba(249,115,22, 0); }
  25%  { box-shadow: 0 0 28px 4px rgba(249,115,22, 0.22); }
  60%  { box-shadow: 0 0 36px 6px rgba(249,115,22, 0.30); }
  100% { box-shadow: 0 0 0 0 rgba(249,115,22, 0); }
}

@keyframes agtWowRevCardHalo {
  0%   { box-shadow: 0 0 0 0 rgba(249,115,22, 0); }
  30%  { box-shadow: 0 0 0 5px rgba(249,115,22, 0.28); }
  60%  { box-shadow: 0 0 0 8px rgba(249,115,22, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(249,115,22, 0); }
}

@keyframes agtWowRevCtaPulse {
  0%   { transform: scale(1); box-shadow: 0 4px 14px rgba(249,115,22, 0.25); }
  40%  { transform: scale(1.04); box-shadow: 0 8px 28px rgba(249,115,22, 0.5); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(249,115,22, 0.25); }
}

/* Bandeau bienvenue : glow accent orange pendant 1.6s (subtil, contenu visible) */
body.agoge-wow-reveal .agt-welcome-banner {
  animation: agtWowRevBannerGlow 1600ms ease-out 200ms;
}

/* Carte Julien démo (premier athlete-card) : halo pulse 2× pendant 1.4s */
body.agoge-wow-reveal .athletes-grid .athlete-card:first-of-type {
  animation: agtWowRevCardHalo 1400ms ease-out 600ms 2;
}

/* CTA "Démarrer la visite guidée" : pulse subtil pendant 1.4s */
body.agoge-wow-reveal .agt-cta-tour-start {
  animation: agtWowRevCtaPulse 1400ms cubic-bezier(.34,1.56,.64,1) 1000ms;
}

/* Reduced-motion : pas d'effet superposé (le contenu reste visible quand même) */
@media (prefers-reduced-motion: reduce) {
  body.agoge-wow-reveal .agt-welcome-banner,
  body.agoge-wow-reveal .athletes-grid .athlete-card:first-of-type,
  body.agoge-wow-reveal .agt-cta-tour-start {
    animation: none !important;
  }
}
