:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --surface-light: #f0f2f5;
  --text: #111827;
  --muted: #6b7280;
  --accent: #1A6FA8;
  --accent-soft: #CCE9FF;
  --accent-blue: #CCE9FF;
  --accent-blue-text: #1A6FA8;
  --border: rgba(0, 0, 0, 0.09);
}

/* ── Tabler Icons — alignement vertical global ───────────────────────────── */
.ti { vertical-align: -0.125em; line-height: 1; }
.button .ti, .menu-link .ti, h1 .ti, h2 .ti, h3 .ti, h4 .ti { margin-right: 0.3em; }

/* ── Flame picker (difficulté de séance) ─────────────────────────────────── */
.flame-picker-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.flame-picker-label { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.flame-picker { display: flex; gap: 0.25rem; align-items: center; }
.flame-picker .fp-flame { background: none; border: none; cursor: pointer; padding: 0.1rem; font-size: 1.4rem; color: #d1d5db; line-height: 1; transition: color 0.1s, transform 0.1s; }
.flame-picker .fp-flame:hover { transform: scale(1.2); }
.flame-picker .fp-flame.lit { color: #f97316; }

/* Affichage mini flammes dans les cartes séance */
.session-flames { display: flex; gap: 0.15rem; margin-top: -0.3rem; }
.session-flames .ti-flame { font-size: 1rem; color: #d1d5db; }
.session-flames .ti-flame.lit { color: #f97316; }

/* Badge zone + description courte */
.session-zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  align-self: flex-start;
}
.session-description {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header,
.site-footer {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  text-decoration: none;
  font-weight: 900;
  font-style: italic;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  background: linear-gradient(to right, #363d47 22%, var(--accent-blue-text) 38%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-re,
.logo-lance {
  /* couleurs gérées par le dégradé du parent */
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted);
}

.main-nav .button-primary {
  color: #fff;
  text-decoration: none;
}

.button {
  border: none;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: rgba(96, 98, 18, 0.12);
  color: var(--text);
}

.button-cta {
  background: var(--accent-soft);
  color: #1a1f25;
  font-weight: 700;
}

.button-blue {
  background: var(--accent-blue);
  color: #1a1f25;
  font-weight: 700;
}

.button-ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}

.section {
  padding: 4rem 0;
}

.section-light {
  background: var(--surface);
}

.section-dark {
  background: var(--surface-light);
}

.section-hero {
  padding: 6rem 0 4rem;
}

/* ─── Hero plein écran ───────────────────────────────────────────────────── */
.hero-fullscreen {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('Fond%20acceuil.jpg');
  background-size: cover;
  background-position: center top;
  background-color: #1a1f25;
  overflow: hidden;
}

.hero-fullscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
}

.hero-fullscreen-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  max-width: 760px;
  padding: 4rem 1.5rem 4rem;
}

.hero-fullscreen-inner h1 {
  color: #fff;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 2.25rem;
}

.tag--light {
  color: var(--accent-soft);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
  text-decoration: none;
  z-index: 1;
  animation: hero-bounce 2s ease infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.9; }
}

/* ─── Header transparent (page d'accueil uniquement) ────────────────────── */
.site-header--transparent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 100;
}

.site-header--transparent .logo-re    { color: rgba(255, 255, 255, 0.92); }
.site-header--transparent .logo-lance { color: var(--accent-blue); }
.site-header--transparent .main-nav a { color: rgba(255, 255, 255, 0.75); }
.site-header--transparent .button-primary {
  background: var(--accent-soft);
  color: #1a1f25;
}

.hero-content,
.dashboard-grid,
.auth-grid,
.feedback-grid {
  display: grid;
  gap: 2rem;
}

.hero-content {
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
}

.tag {
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-size: 0.85rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 2vw, 2.4rem);
}

p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-card,
.info-box,
.card,
.auth-card,
.sidebar-card,
.profile-card,
.request-card,
.feedback-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
}

.hero-card {
  border-radius: 32px;
}

.stats-grid,
.cards-grid,
.plan-table,
.menu-list,
.feedback-grid,
.auth-grid,
.dashboard-grid,
.footer-inner {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid div,
.plan-row,
.athlete-list li,
.menu-list li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  min-height: 220px;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.plan-table {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.plan-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem 1.2rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.plan-row.header-row {
  background: rgba(96, 98, 18, 0.1);
  font-weight: 700;
}

.plan-row:last-child {
  border-bottom: none;
}

.auth-grid,
.dashboard-grid {
  grid-template-columns: repeat(2, 1fr);
}

.auth-card,
.sidebar-card,
.profile-card,
.request-card,
.feedback-card {
  min-height: 280px;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 14px;
  background: #f9fafb;
  color: var(--text);
  margin-top: 0.5rem;
}

textarea {
  resize: vertical;
}

.feedback-form,
.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-box ul,
.request-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.menu-list,
.athlete-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.menu-list a,
.athlete-list li {
  color: var(--text);
  text-decoration: none;
}

.feedback-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feedback-card {
  display: grid;
  gap: 1rem;
}

.page-content {
  min-height: calc(100vh - 140px);
}

.login-hero {
  padding-top: 4rem;
}

.footer-inner {
  padding: 1.5rem 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-coach-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.coach-image {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.coach-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.coach-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.coach-content h2 {
  position: relative;
  padding-bottom: 0.85rem;
}

.coach-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.75rem;
  height: 3px;
  background: var(--accent-soft);
  border-radius: 2px;
}

.coach-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.coach-points li {
  padding-left: 1.5rem;
  position: relative;
}

.coach-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─── Ce que tu reçois — grille 6 items ─────────────────────────────────── */
.coaching-includes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.coaching-include-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.coaching-include-item strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.coaching-include-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.coaching-include-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-blue-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ─── Cartes articles — bordures couleur ────────────────────────────────── */
#home-articles-grid .card:nth-child(3n + 1) { border-top: 3px solid var(--accent); }
#home-articles-grid .card:nth-child(3n + 2) { border-top: 3px solid var(--accent-soft); }
#home-articles-grid .card:nth-child(3n + 3) { border-top: 3px solid var(--accent-blue); }

.access-section {
  text-align: center;
}

.access-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .hero-content,
  .dashboard-grid,
  .auth-grid,
  .stats-grid,
  .cards-grid,
  .feedback-grid,
  .section-grid,
  .about-coach-grid,
  .coaching-includes-grid,
  .access-buttons {
    grid-template-columns: 1fr;
  }
  .plan-row {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .plan-row.header-row {
    display: none;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    padding: 0.6rem 0;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Dashboard Layout */
.dashboard-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 80px);
  background: var(--bg);
}

.sidebar,
.coach-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-menu {
  display: grid;
  gap: 1.5rem;
}

.sidebar-menu h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0;
}

.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.menu-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}

.menu-link:hover,
.menu-link.active {
  background: rgba(96, 98, 18, 0.1);
  color: var(--accent);
}

.menu-link-notif {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.dashboard-content {
  padding: 2rem;
  overflow-y: auto;
  background: var(--bg);
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h1 {
  margin-bottom: 0.5rem;
}

/* Session Cards */
.sessions-grid,
.sessions-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.sessions-list {
  grid-template-columns: 1fr;
}

.session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.session-card-left {
  flex-shrink: 0;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.session-card-right {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border);
  margin-left: 1rem;
  padding-left: 1rem;
  display: flex;
  align-items: center;
}

@media (max-width: 600px) {
  .session-card { flex-direction: column; align-items: stretch; }
  .session-card-right { border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding-left: 0; margin-top: 0.75rem; padding-top: 0.75rem; }
}

.session-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.05em;
}

.session-card .session-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-card .session-description {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.session-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.session-status {
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.session-status.completed {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.session-status.upcoming {
  background: rgba(204, 233, 255, 0.7);
  color: #1460a0;
}

.session-status.skipped {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.btn-skip-session {
  display: block;
  margin-top: 0.75rem;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.79rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.2s;
}
.btn-skip-session:hover {
  border-color: #f59e0b;
  color: #d97706;
}

.skip-reason-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.skip-reason-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.session-card.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.session-card.clickable:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* Session Detail Modal */
.session-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem;
}

.session-detail-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  max-width: 900px;
  width: 100%;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.detail-left,
.detail-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-left h3,
.detail-right h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.session-graph {
  width: 100%;
  height: 100px;
  background: #f5f7fa;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

.pace-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.pace-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.pace-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.segments-breakdown {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.segment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.segment-color-bar {
  width: 3px;
  height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
}

.segment-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.segment-item-content strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.segment-item-content span {
  font-size: 0.78rem;
  color: var(--muted);
}

.seg-reps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 4px;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  margin-left: 0.4rem;
  font-weight: 700;
  color: var(--text);
}

.feedback-box {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Page Views */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.coach-view {
  display: none;
}

.coach-view.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Objective Page */
.objective-header {
  margin-bottom: 2rem;
}

.objective-header p {
  font-size: 1.1rem;
}

.progress-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
}

.progress-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem 0;
}

.big-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.big-stat .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.big-stat .label {
  font-size: 0.9rem;
  color: var(--muted);
}

.progress-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.progress-bar-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.objective-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.objective-details h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-item .label {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
}

.detail-item .value {
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
}

/* Coach Dashboard */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.stat-card .number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.95rem;
}

.athlete-mini-list {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.athlete-mini-list h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem 0;
}

.athlete-mini {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  margin-bottom: 0.5rem;
  transition: all 0.2s;
}

.athlete-mini:hover,
.athlete-mini.active {
  background: rgba(96, 98, 18, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.athlete-profile-section {
  display: grid;
  gap: 2rem;
}

.profile-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.profile-header h2 {
  margin: 0 0 0.5rem 0;
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.plan-editor,
.athlete-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.plan-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.plan-item {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
}

.plan-day {
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.plan-details strong {
  display: block;
  margin-bottom: 0.25rem;
}

.plan-details p {
  margin: 0;
  font-size: 0.85rem;
}

.btn-edit {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1.2rem;
}

.plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.progress-item .label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
}

.progress-item .value {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.3rem;
}

.feedback-list,
.requests-list {
  display: grid;
  gap: 1.5rem;
}

.feedback-item,
.request-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.feedback-header h3 {
  margin: 0;
}

.difficulty {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.feedback-text {
  margin: 1rem 0;
  font-style: italic;
  color: var(--muted);
}

.feedback-reply {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.feedback-reply textarea {
  min-height: 80px;
}

.request-details {
  margin: 1rem 0;
}

.request-details p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Modal Actions */
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

/* Profile Page Athlète */
.profile-page {
  display: grid;
  gap: 2rem;
}

.profile-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  align-items: start;
}

.profile-avatar {
  display: flex;
  justify-content: center;
}

.avatar-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-info h2 {
  margin: 0;
}

.role {
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-card .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
}

.info-card .value {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.profile-section h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.training-info {
  display: grid;
  gap: 1rem;
}

.training-item {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.6;
}

.training-item strong {
  color: var(--text);
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(96, 98, 18, 0.08);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.athletes-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.overview-content {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 1200px) {
  .dashboard-wrapper {
    grid-template-columns: 200px 1fr;
  }
  
  .detail-layout {
    grid-template-columns: 1fr;
  }
  
  .progress-overview,
  .details-grid,
  .progress-grid,
  .athletes-overview,
  .stats-overview {
    grid-template-columns: 1fr;
  }
  
  .profile-header {
    grid-template-columns: 1fr;
  }
  
  .profile-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar,
  .coach-sidebar {
    display: none;
  }
  
  .plan-actions,
  .request-actions,
  .modal-actions {
    grid-template-columns: 1fr;
  }
}

/* Assigned Plan */
.plan-assignment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.assigned-plan-card {
  background: rgba(96, 98, 18, 0.1);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.assigned-plan-card h4 {
  margin: 0 0 0.5rem 0;
  color: var(--accent);
}

.assigned-plan-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.import-section {
  display: grid;
  gap: 2rem;
}

.import-instructions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.columns-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.column-item {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.import-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.preview-table table {
  width: 100%;
  border-collapse: collapse;
}

.preview-table th,
.preview-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.preview-table th {
  background: rgba(96, 98, 18, 0.1);
  font-weight: 600;
}

.import-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

/* Tableau d'allure */
.vma-section {
  display: grid;
  gap: 1.5rem;
}

.vma-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vma-input-group label {
  font-size: 0.95rem;
  margin: 0;
}

.vma-input-wrapper {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 1rem;
}

.vma-input-wrapper input {
  margin: 0;
}

.vma-display {
  display: flex;
  align-items: center;
  padding: 0.95rem 1rem;
  background: rgba(96, 98, 18, 0.1);
  border: 1px solid var(--accent);
  border-radius: 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.pace-table {
  width: 100%;
  border-collapse: collapse;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pace-table thead {
  background: rgba(96, 98, 18, 0.1);
}

.pace-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.pace-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.pace-table tbody tr:last-child td {
  border-bottom: none;
}

.pace-table tbody tr:hover {
  background: rgba(96, 98, 18, 0.05);
}

.pace-table td:first-child {
  color: var(--text);
  font-weight: 500;
}

.pace-table td:nth-child(2) {
  color: var(--accent);
  font-weight: 600;
}

.pace-edit-cell {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.pace-override-input {
  width: 68px;
  padding: 0.3rem 0.45rem;
  margin: 0;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.pace-override-input:hover,
.pace-override-input:focus {
  border-color: var(--border);
  background: #ffffff;
  outline: none;
  color: var(--text);
}

.pace-override-input.pace-custom {
  color: var(--accent);
  font-weight: 700;
  border-color: rgba(96, 98, 18, 0.3);
  background: rgba(96, 98, 18, 0.04);
}

.pace-reset-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  transition: color 0.15s;
  line-height: 1;
  opacity: 0.7;
}

.pace-reset-btn:hover {
  color: var(--accent);
  opacity: 1;
}

.pace-table-reset-all {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color 0.15s;
}

.pace-table-reset-all:hover {
  color: var(--accent);
}

.race-predictions {
  margin-top: 1.5rem;
}

.race-predictions h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.race-predictions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 700px) {
  .race-predictions-grid { grid-template-columns: repeat(2, 1fr); }
}

.race-pred-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.race-pred-dist {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.race-pred-time {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.race-pred-pace {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

.week-nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.15s;
}

.week-nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.week-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 768px) {
  .vma-input-wrapper {
    grid-template-columns: 1fr;
  }
  
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Athletes List Section */
/* Athletes List Section */
.athletes-list-section {
  margin-bottom: 2rem;
}

.athletes-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.athletes-search-input {
  flex: 1 1 160px;
  max-width: 260px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-sortable:hover {
  color: var(--accent);
}

.sort-arrow {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-left: 0.3rem;
}

.th-filter-select {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
}

.athletes-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.athletes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.athletes-table thead th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.athletes-table thead th:first-child {
  width: 48px;
}

.athlete-row {
  cursor: pointer;
  transition: background 0.15s;
}

.athlete-row td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.athlete-row:last-child td {
  border-bottom: none;
}

.athlete-row:hover {
  background: rgba(96, 98, 18, 0.04);
}

.athlete-row.active {
  background: rgba(96, 98, 18, 0.09);
}

.athlete-row.active td:first-child {
  border-left: 3px solid var(--accent);
}

.athlete-row-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.plan-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0,0,0,0.06);
  color: var(--muted);
}

.plan-chip.has-plan {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

/* Library category pills */
.lib-cat-pill {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.lib-cat-pill:hover {
  border-color: var(--pill-color, var(--accent));
  color: var(--pill-color, var(--accent));
}

.lib-cat-pill.active {
  background: color-mix(in srgb, var(--pill-color, var(--accent)) 15%, transparent);
  border-color: var(--pill-color, var(--accent));
  color: var(--pill-color, var(--accent));
}

/* Plan Creator */
.plan-creator {
  display: grid;
  gap: 2rem;
}

.plan-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.plan-builder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.week-block {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.week-header h4 {
  margin: 0;
  color: var(--accent);
}

.week-sessions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.session-input {
  display: grid;
  gap: 0.75rem;
}

.session-input label {
  font-weight: 600;
  color: var(--text);
}

.session-input input,
.session-input textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.session-input textarea {
  resize: vertical;
  min-height: 60px;
}

/* Plans Management */
.plans-list {
  display: grid;
  gap: 1.5rem;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.plan-card-header h3 {
  margin: 0;
}

.plan-type {
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.plan-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.plan-card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.plan-card-actions button {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.plan-card-actions button:hover {
  border-color: var(--accent);
  background: rgba(96, 98, 18, 0.1);
}

@media (max-width: 900px) {
  .columns-list {
    grid-template-columns: 1fr;
  }
  
  .week-sessions {
    grid-template-columns: 1fr;
  }
  
  .plan-card-meta {
    grid-template-columns: 1fr;
  }
  
  .plan-card-actions {
    grid-template-columns: 1fr;
  }
  
  .import-actions {
    grid-template-columns: 1fr;
  }
}

/* ─── Profile shortcuts ─────────────────────────────────────────────────── */
.profile-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.75rem 0 0.5rem;
}

.shortcut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.25rem 0.75rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.shortcut-card .shortcut-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.shortcut-card:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shortcut-card.active {
  border-color: var(--accent);
  background: rgba(96, 98, 18, 0.05);
  color: var(--accent);
}

.profile-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
  animation: panelFadeIn 0.18s ease;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-panel h3 {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--text);
}

.records-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0 0.75rem;
}

.records-header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.record-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.record-item:last-child { border-bottom: none; }

.record-distance {
  font-weight: 700;
  min-width: 110px;
  color: var(--text);
}

.record-time {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
}

.record-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.pace-improvement {
  font-size: 0.78rem;
  margin-top: 0.3rem;
  display: block;
  font-weight: 600;
}

/* ─── Messages ────────────────────────────────��─────────────────────────── */
.message-item {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 0.75rem;
  background: var(--surface);
}

.message-item.unread {
  border-left: 3px solid var(--accent);
  background: rgba(96, 98, 18, 0.03);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.message-from {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
}

.message-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.message-context {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-style: italic;
}

.message-text {
  font-size: 0.92rem;
  color: var(--text);
  margin: 0;
  line-height: 1.65;
}

/* ─── Login : CTA inscription ───────────────────────────────────────────── */
.signup-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.signup-cta p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── Signup form ───────────────────────────────────────────────────────── */
.signup-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.signup-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.signup-section-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.signup-step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.signup-section-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.required {
  color: var(--accent);
}

.optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.82rem;
}

/* ─── Choice pills ──────────────────────────────────────────────────────── */
.choice-pills,
.distance-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.choice-pill {
  padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.choice-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.choice-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ─── Conditional blocks ────────────────────────────────────────────────── */
.conditional-block {
  display: none;
  animation: fadeIn 0.2s ease;
}

.conditional-inner {
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ─── Checkbox label ────────────────────────────────────────────────────── */
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500 !important;
  font-size: 0.92rem !important;
}

.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ─── Time input ────────────────────────────────────────────────────────── */
.time-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.time-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.time-part {
  width: 4rem !important;
  text-align: center;
  padding: 0.75rem 0.5rem !important;
  font-size: 1.05rem;
}

.time-sep {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .signup-section-body {
    padding: 1.25rem;
  }

  .signup-section-header {
    padding: 1rem 1.25rem;
  }
}

/* ─── Login card ────────────────────────────────────────────────────────── */
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 0.5rem;
}

.login-card .form-group {
  display: flex;
  flex-direction: column;
}

.login-card .form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.login-card .signup-cta {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.login-card .signup-cta p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Athlete tabs (coach dashboard) ─────────────────────────────── */
.athlete-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.athlete-tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.athlete-tab-btn:hover { color: var(--text); }
.athlete-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.athlete-tab-panel { display: none; }
.athlete-tab-panel.active { display: block; }

/* ── Profile header avatar ───────────────────────────────────────── */
.profile-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.athlete-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Chat window ─────────────────────────────────────────────────── */
.chat-window {
  height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.msg-row--coach { flex-direction: row-reverse; }
.msg-row--athlete { flex-direction: row; }

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-avatar--coach   { background: var(--accent); color: #fff; }
.msg-avatar--athlete { background: var(--accent-soft); color: var(--accent); }

.msg {
  display: flex;
  flex-direction: column;
  max-width: 68%;
}

.msg--coach  { align-items: flex-end; }
.msg--athlete { align-items: flex-start; }

.msg-bubble {
  padding: 0.6rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.msg--coach .msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg--athlete .msg-bubble {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.2rem;
  padding: 0 0.25rem;
}

.chat-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-input-row input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.chat-input-row input:focus {
  border-color: var(--accent);
  background: #fff;
}

.chat-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0 4px;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sidebar-profile {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: auto;
}
.sidebar-profile:hover { background: var(--surface-light); }
.sidebar-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}
.sidebar-profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-profile-info { min-width: 0; }
.sidebar-profile-info strong { display: block; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-info small { font-size: 0.75rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — styles partagés et overrides
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hamburger & contrôles mobiles (cachés sur desktop) ─────────────────── */
.mobile-controls,
.dashboard-hamburger {
  display: none;
}

/* ── Backdrop sidebar mobile ─────────────────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 599;
  cursor: pointer;
}
.sidebar-backdrop.open { display: block; }

/* ── Overlay navigation mobile (pages publiques) ────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.mobile-nav-panel .mobile-nav-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  margin-bottom: 0.5rem;
}

.mobile-nav-panel a {
  display: block;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.mobile-nav-panel a:last-child { border-bottom: none; }
.mobile-nav-panel a.button-primary {
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: none;
}

/* ── Sidebar close btn (dans la sidebar dashboard) ──────────────────────── */
.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  align-self: flex-end;
  padding: 0.25rem;
  margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════════════
   BREAKPOINT 900px — dashboard sidebar en drawer
   ══════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  /* Sidebar devient un drawer fixe */
  .sidebar,
  .coach-sidebar {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    z-index: 600;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 1rem;
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .sidebar.mobile-open,
  .coach-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Bouton hamburger dans le header dashboard */
  .dashboard-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.15s;
  }
  .dashboard-hamburger:hover { background: var(--surface); }
}

/* ══════════════════════════════════════════════════════
   BREAKPOINT 600px — header public compact + modal séance
   ══════════════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* Header public : cacher le nav texte, montrer les contrôles mobiles */
  .main-nav > a,
  .main-nav > .button,
  .main-nav > .button-primary,
  .main-nav > .button-ghost {
    display: none;
  }
  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  /* Avatar cercle (lien connexion/espace) */
  .mobile-auth-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    overflow: hidden;
    transition: border-color 0.15s;
  }
  .mobile-auth-icon:hover { border-color: var(--accent); }
  .mobile-auth-icon img { width: 100%; height: 100%; object-fit: cover; }

  /* Hamburger */
  .mobile-hamburger {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
  }
  .mobile-hamburger:hover { background: var(--surface); }

  /* "Mon espace" bloc dans header dashboard : cacher le nom, garder avatar */
  #header-username { display: none; }

  /* Modal séance : bottom sheet sur mobile */
  .session-detail-modal {
    padding: 0;
    align-items: flex-end;
  }
  .modal-content {
    border-radius: 22px 22px 0 0;
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.25rem 1rem;
    width: 100%;
    max-width: 100%;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
  }

  /* Cartes séances plus compactes */
  .session-card {
    padding: 0.75rem 0.875rem;
  }
  .session-card h3 {
    font-size: 0.9rem;
  }
  .session-card .session-title {
    font-size: 0.82rem;
  }
  .session-card .session-description {
    display: none;
  }
  .session-card-right {
    display: none;
  }
}
