/* ============================================================================
   NEXOO APP — BRIQUE 10 : ESPACE COACH B2B, MULTI-ÉQUIPES, TEAM SCAN & CLOCHE
   Dark Mode exclusif (#080e1c / #111a2e / #18243f / #22c55e / #39ff14)
   ============================================================================ */

/* --- 1. POINTS D'ENTRÉE DASHBOARD & CENTRE DE COMPÉTENCES --- */
.dash-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dash-bell-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 26, 46, 0.92);
  color: #f8fafc;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

/* Masque totalement la cloche quand il y a 0 module assigné */
.dash-bell-btn:not(.has-unread) {
  display: none;
}

.dash-bell-btn:hover {
  border-color: rgba(57, 255, 20, 0.45);
  background: #18243f;
}

.dash-bell-btn:active {
  transform: scale(0.95);
}

.dash-bell-btn.has-unread {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.22);
}

.dash-bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  border: 2px solid #080e1c;
  animation: coachBellPulse 2s infinite;
}

.dash-bell-badge.hidden {
  display: none;
}

@keyframes coachBellPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* Bannière Espace Coach : affichée sur Mobile uniquement (le Desktop a le menu latéral) */
.dash-coach-btn {
  width: 100%;
  margin: 0 0 14px 0;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(57, 255, 20, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(17, 26, 46, 0.96));
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-coach-btn.hidden {
  display: none;
}

@media (min-width: 860px) {
  .dash-coach-btn {
    display: none;
  }
}

.dash-coach-btn:hover {
  border-color: #39ff14;
  box-shadow: 0 6px 22px rgba(34, 197, 94, 0.18);
}

.dash-coach-btn:active {
  transform: scale(0.99);
}

.dash-coach-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-coach-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(57, 255, 20, 0.16);
  border: 1px solid rgba(57, 255, 20, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.dash-coach-btn-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  display: block;
}

.dash-coach-btn-sub {
  font-size: 12px;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}

.dash-coach-btn-arrow {
  font-size: 18px;
  font-weight: 800;
  color: #39ff14;
}

.cat-assign-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 11px;
  border: 1px solid rgba(57, 255, 20, 0.45);
  background: rgba(34, 197, 94, 0.14);
  color: #39ff14;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.cat-assign-btn:hover {
  background: rgba(57, 255, 20, 0.22);
}

.cat-assign-btn:active {
  transform: scale(0.97);
}

/* Lien Espace Coach dans le menu latéral Desktop */
.nav-coach-btn.hidden {
  display: none !important;
}

/* --- 2. VUE PLEIN ÉCRAN ESPACE COACH B2B --- */
.coach-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: #080e1c;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

.coach-overlay.hidden {
  display: none;
}

.coach-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(17, 26, 46, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.coach-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.coach-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18243f;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.coach-back-btn:hover {
  border-color: rgba(57, 255, 20, 0.5);
}

.coach-topbar-titles {
  min-width: 0;
}

.coach-topbar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-topbar-sub {
  margin: 1px 0 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #39ff14;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.coach-linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #0a66c2;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: opacity 0.2s ease;
}

.coach-linkedin-btn:hover {
  opacity: 0.9;
}

.coach-linkedin-label {
  display: none;
}

@media (min-width: 640px) {
  .coach-linkedin-label {
    display: inline;
  }
}

.coach-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18243f;
  color: #f8fafc;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.coach-icon-btn:hover {
  border-color: rgba(57, 255, 20, 0.45);
}

.coach-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.coach-container {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- 3. BARRE MULTI-ÉQUIPES --- */
.coach-team-bar {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-team-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.coach-team-pill {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18243f;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.coach-team-pill.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: #39ff14;
  color: #39ff14;
}

.coach-team-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #e2e8f0;
}

.coach-team-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Boutons réutilisables Coach */
.coach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18243f;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.coach-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  background: #223254;
}

.coach-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.coach-btn-primary {
  background: #22c55e;
  border-color: #39ff14;
  color: #052e16;
  font-weight: 800;
}

.coach-btn-primary:hover:not(:disabled) {
  background: #39ff14;
  border-color: #39ff14;
  color: #052e16;
}

.coach-btn-outline-green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(57, 255, 20, 0.45);
  color: #39ff14;
}

.coach-btn-outline-green:hover:not(:disabled) {
  background: rgba(57, 255, 20, 0.2);
}

.coach-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.coach-btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.28);
}

.coach-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 9px;
}

/* --- 4. BANDEAU ALERTES CLINIQUES 3 JOURS --- */
.coach-alerts-box {
  background: rgba(127, 29, 29, 0.24);
  border: 1px solid rgba(239, 68, 68, 0.48);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-alerts-box.mode-history {
  background: rgba(17, 26, 46, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.coach-alerts-box.empty-ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.28);
  padding: 10px 14px;
}

.coach-alerts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-alerts-title {
  font-size: 14px;
  font-weight: 800;
  color: #fecaca;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.coach-alerts-box.empty-ok .coach-alerts-title {
  color: #86efac;
}

.coach-alerts-box.mode-history .coach-alerts-title {
  color: #e2e8f0;
}

.coach-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-alert-card {
  background: rgba(127, 29, 29, 0.36);
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .coach-alert-card {
    grid-template-columns: 1.5fr auto auto;
    align-items: center;
  }
}

.coach-alert-card.handled {
  background: rgba(17, 26, 46, 0.78);
  border-color: rgba(148, 163, 184, 0.25);
  opacity: 0.88;
}

.coach-alert-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.coach-alert-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.coach-alert-motif {
  font-size: 13px;
  color: #fecaca;
  margin-top: 3px;
}

.coach-alert-card.handled .coach-alert-motif {
  color: #94a3b8;
}

.coach-alert-date {
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
}

.coach-alert-module-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(57, 255, 20, 0.45);
  background: rgba(34, 197, 94, 0.14);
  color: #39ff14;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.coach-alert-module-btn:hover {
  background: rgba(57, 255, 20, 0.24);
}

.coach-alert-action {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.coach-alert-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(8, 14, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.coach-alert-check-label input {
  width: 17px;
  height: 17px;
  accent-color: #22c55e;
  cursor: pointer;
}

.coach-physio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
  font-size: 11px;
  font-weight: 700;
}

/* --- 5. NAVIGATION 4 ONGLETS COACH --- */
.coach-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.coach-tabs::-webkit-scrollbar {
  display: none;
}

.coach-tab-btn {
  flex: 1 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111a2e;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.coach-tab-btn.active {
  background: #39ff14;
  border-color: #39ff14;
  color: #052e16;
  box-shadow: 0 4px 16px rgba(57, 255, 20, 0.25);
}

/* --- 6. ONGLET 1 : VUE GLOBALE (EFFECTIF & TRIAGE) --- */
.coach-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coach-filter-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111a2e;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.coach-filter-chip.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #f8fafc;
}

.coach-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-select {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111a2e;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 600;
}

@media (min-width: 720px) {
  .coach-select {
    font-size: 13px;
  }
}

.coach-acwr-help {
  background: #111a2e;
  border: 1px solid rgba(57, 255, 20, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.coach-acwr-help.hidden {
  display: none;
}

.coach-acwr-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.coach-teamscan-bar {
  background: #111a2e;
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-teamscan-bar-info {
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.coach-athletes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coach-athlete-card {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 4px solid #64748b;
  border-radius: 15px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.coach-athlete-card.acwr-optimal {
  border-left-color: #22c55e;
}

.coach-athlete-card.acwr-overload {
  border-left-color: #f59e0b;
}

.coach-athlete-card.acwr-danger {
  border-left-color: #ef4444;
}

.coach-athlete-card.acwr-underload {
  border-left-color: #38bdf8;
}

.coach-athlete-card.acwr-private {
  border-left-color: #475569;
}

.coach-ath-summary {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-ath-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.coach-ath-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.coach-ts-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #22c55e;
  cursor: pointer;
  flex-shrink: 0;
}

.coach-ath-name-btn {
  background: none;
  border: none;
  padding: 0;
  color: #39ff14;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.coach-ath-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.coach-acwr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.coach-acwr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.coach-acwr-pill.acwr-optimal {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}
.coach-acwr-pill.acwr-optimal .coach-acwr-dot {
  background: #22c55e;
}

.coach-acwr-pill.acwr-overload {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}
.coach-acwr-pill.acwr-overload .coach-acwr-dot {
  background: #f59e0b;
}

.coach-acwr-pill.acwr-danger {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}
.coach-acwr-pill.acwr-danger .coach-acwr-dot {
  background: #ef4444;
}

.coach-acwr-pill.acwr-underload {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}
.coach-acwr-pill.acwr-underload .coach-acwr-dot {
  background: #38bdf8;
}

.coach-acwr-pill.acwr-private {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.coach-ath-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}

.coach-ath-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.coach-scan-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.coach-scan-pill.done {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.coach-scan-pill.progress {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.coach-ath-expand-btn {
  background: #18243f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.coach-ath-details {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 14, 28, 0.45);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.coach-ath-details.hidden {
  display: none;
}

.coach-sub-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 6px;
}

/* Moyennes 7 jours individuelles + Sparkline ACWR 10j */
.coach-ath-metrics-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 760px) {
  .coach-ath-metrics-row {
    grid-template-columns: 1.3fr 1fr;
    align-items: stretch;
  }
}

.coach-ath-7d-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.coach-ath-7d-cell {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.coach-ath-7d-lbl {
  font-size: 11px;
  color: #94a3b8;
  display: block;
}

.coach-ath-7d-val {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 2px;
  display: block;
}

.coach-ath-sparkbox {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 10px;
}

.coach-ath-sparkline svg {
  width: 100%;
  height: 54px;
  display: block;
}

/* 4 Diagnostics fondamentaux (TRM / TCS / TAC / TCF) */
.coach-diags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 720px) {
  .coach-diags-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.coach-diag-tile {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px;
}

.coach-diag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
}

.coach-diag-code {
  color: #39ff14;
}

.coach-diag-score {
  color: #f8fafc;
}

.coach-diag-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  margin: 7px 0 6px 0;
  overflow: hidden;
}

.coach-diag-fill {
  height: 100%;
  border-radius: 999px;
  background: #22c55e;
}

.coach-diag-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}

/* Missions récentes sur la fiche athlète */
.coach-ath-missions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coach-mission-chip {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111a2e;
  color: #cbd5e1;
}

.coach-mission-chip.consulte {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.coach-mission-chip.en_attente {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.coach-ath-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #94a3b8;
}

.coach-remove-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.coach-remove-confirm label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #fca5a5;
  cursor: pointer;
}

.coach-remove-confirm input {
  width: 16px;
  height: 16px;
  accent-color: #ef4444;
  cursor: pointer;
}

.coach-diags-legend {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 8px 12px;
  background: rgba(17, 26, 46, 0.65);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- 7. ONGLET 2 : AFFICHAGE DU GROUPE (MÉTÉO 24H & COURBE 10J) --- */
.coach-meteo-card {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coach-meteo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.coach-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #39ff14);
  transition: width 0.4s ease;
}

.coach-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 760px) {
  .coach-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.coach-kpi-card {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coach-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

.coach-kpi-val {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
}

.coach-kpi-val small {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.coach-kpi-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.coach-kpi-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.coach-kpi-delta {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.coach-kpi-delta.good {
  color: #86efac;
}

.coach-kpi-delta.warn {
  color: #fca5a5;
}

.coach-chart-card {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coach-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-chart-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.coach-series-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coach-series-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18243f;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.45;
}

.coach-series-btn.active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.coach-series-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.coach-svg-wrap {
  width: 100%;
  overflow-x: auto;
}

.coach-svg-wrap svg {
  width: 100%;
  min-width: 500px;
  height: auto;
  display: block;
}

/* --- 8. ONGLET 3 : CALENDRIER MATCHS --- */
.coach-match-form-card {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.coach-match-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 680px) {
  .coach-match-form {
    grid-template-columns: 200px 1fr auto;
    align-items: end;
  }
}

.coach-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.coach-field label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.coach-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #080e1c;
  color: #f8fafc;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
}

.coach-input:focus {
  border-color: #39ff14;
}

.coach-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-match-item {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coach-match-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-match-date-badge {
  min-width: 60px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.35);
  text-align: center;
}

.coach-match-day {
  display: block;
  font-size: 17px;
  font-weight: 900;
  color: #39ff14;
  line-height: 1.1;
}

.coach-match-month {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #cbd5e1;
}

.coach-match-opp {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.coach-match-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* --- 9. ONGLET 4 : TEAM SCAN (BARRES VERTICALES SVG + HISTORIQUE + IA) --- */
.coach-ts-toolbar {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-ts-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 860px) {
  .coach-ts-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.coach-ts-card {
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-ts-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #39ff14;
  display: flex;
  align-items: center;
  gap: 7px;
}

.coach-ts-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-line;
}

/* --- 10. MODALES COACH & CLOCHE MISSIONS ATHLÈTE --- */
.coach-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(4, 8, 18, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.coach-modal-backdrop.hidden {
  display: none;
}

.coach-modal {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  background: #111a2e;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.coach-modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.coach-modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coach-modal-foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.coach-check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.coach-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #080e1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 14px;
  color: #f8fafc;
}

.coach-check-row input {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  cursor: pointer;
}

.coach-check-row.disabled {
  opacity: 0.55;
  cursor: default;
}

.coach-module-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
}

.coach-module-option {
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #080e1c;
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
}

.coach-module-option.selected {
  border-color: #39ff14;
  background: rgba(34, 197, 94, 0.16);
  color: #ffffff;
}

/* Liste missions côté Athlète (Cloche 🔔) */
.mission-item-card {
  background: #080e1c;
  border: 1px solid rgba(57, 255, 20, 0.25);
  border-radius: 13px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mission-item-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.mission-item-meta {
  font-size: 12px;
  color: #94a3b8;
}

/* États vides, chargement & Toast */
.coach-empty {
  background: #111a2e;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.coach-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1600;
  background: #18243f;
  border: 1px solid rgba(57, 255, 20, 0.55);
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: 90vw;
  text-align: center;
}

.coach-toast.error {
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecaca;
}

.coach-toast.hidden {
  display: none;
}