/* styles/components.css */
/* styles/variables.css */
:root {
  /* =========================
     Colors - Base / UI
     ========================= */
  --color-primary: rgb(190, 26, 34); /* main primary */

  --color-secondary: #f0f0f0; /* subtle gray for secondary elements */
  --color-secondary-hover: #e0e0e0;

  --color-bg: #f7f7f7; /* main page background */
  --color-surface: #ffffff; /* cards, panels, surfaces */
  --color-muted: #b0b0b0; /* for disabled or less important text */

  --color-border: #e0e0e0;
  --color-border-line: #b5b5b5;

  /* =========================
     Text Colors
     ========================= */
  --color-text: rgb(65, 65, 65); /* dark gray text */
  --color-text-muted: #999999; /* lighter muted text */
  --color-text-inverse: #ffffff; /* text on primary/dark backgrounds */

  /* =========================
     Semantic Colors
     ========================= */
  --color-success: #2e7d32;
  --color-warning: #ed6c02;
  --color-error: #d32f2f;

  --color-danger: var(--color-primary);
  --color-danger-hover: var(--color-primary);

  /* =========================
     Accent Colors
     ========================= */
  --color-accent-1: #ff9800; /* orange */
  --color-accent-2: #03a9f4; /* light blue */
  --color-accent-3: #8e24aa; /* purple */
  --color-accent-4: #4caf50; /* green */
  --color-accent-5: #ffeb3b; /* yellow */

  /* =========================
     Badge Colors
     ========================= */
  --badge-bg-success: var(--color-success);
  --badge-text-success: #ffffff;

  --badge-bg-warning: var(--color-warning);
  --badge-text-warning: #ffffff;

  --badge-bg-error: var(--color-error);
  --badge-text-error: #ffffff;

  /* USER TYPES */
  --badge-color-member-bg: #4caf50;
  --badge-color-member-text: white;

  --badge-color-teacher-bg: #3f51b5;
  --badge-color-teacher-text: white;

  --badge-color-board_member-bg: var(--color-primary);
  --badge-color-board_member-text: white;

  --badge-color-helper-bg: #009688;
  --badge-color-helper-text: white;

  --badge-color-student-bg: #ff9800;
  --badge-color-student-text: white;

  /* ACTIVITY STATUS */
  --badge-color-active-bg: #2e7d32;
  --badge-color-active-text: white;

  --badge-color-inactive-bg: #ddd;
  --badge-color-inactive-text: #666;

  /* RECURRENCE */
  --badge-color-daily-bg: #26c6da;
  --badge-color-daily-text: #00363a;

  --badge-color-weekly-bg: #7e57c2;
  --badge-color-weekly-text: white;

  --badge-color-monthly-bg: #ff7043;
  --badge-color-monthly-text: white;

  /* EVENT TYPES */
  --badge-color-private_lesson-bg: #5c6bc0;
  --badge-color-private_lesson-text: white;

  --badge-color-special-bg: #ec407a;
  --badge-color-special-text: white;

  --badge-color-blocked-bg: #bdbdbd;
  --badge-color-blocked-text: #333;

  --badge-color-grouped_lesson-bg: #66bb6a;
  --badge-color-grouped_lesson-text: white;

  --badge-color-competition-bg: #d32f2f;
  --badge-color-competition-text: white;

  /* SLOT STATUSES */
  --badge-color-scheduled-bg: #42a5f5;
  --badge-color-scheduled-text: white;

  --badge-color-confirmed-bg: #388e3c;
  --badge-color-confirmed-text: white;

  --badge-color-completed-bg: #00796b;
  --badge-color-completed-text: white;

  --badge-color-cancelled-bg: #9e9e9e;
  --badge-color-cancelled-text: #333;

  /* ADMIN */
  --badge-color-admin-bg: var(--color-primary);
  --badge-color-admin-text: var(--color-text-inverse);

  /* =========================
     Gradients
     ========================= */

  --gradient-secondary: linear-gradient(
    75deg,
    #9a9a9a,
    #666666
  ); /* gray tones */
  --gradient-bg: linear-gradient(135deg, #f7f7f7, #ffffff); /* soft contrast */
  --gradient-bg-medium: linear-gradient(
    135deg,
    #eeeeee,
    #ffffff
  ); /* subtle panels */

  /* =========================
     Typography
     ========================= */
  --font-family-base:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-md: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */

  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-loose: 1.75;

  /* =========================
     Spacing (8px scale)
     ========================= */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.5rem; /* 24px */
  --space-6: 2rem; /* 32px */
  --space-7: 3rem; /* 48px */

  /* =========================
     Radius
     ========================= */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-round: 9999px;

  /* =========================
     Shadows
     ========================= */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

  /* =========================
     Z-index
     ========================= */
  --z-base: 0;
  --z-dropdown: 100;
  --z-modal: 1000;
  --z-toast: 1100;
}
/* =========================
   Missing / extra variables
   ========================= */
/* Spacing aliases (pour correspondre à base.css) */
:root {
  --spacing-xs: var(--space-1);
  --spacing-sm: var(--space-2);
  --spacing-md: var(--space-4);
  --spacing-lg: var(--space-6);
  --spacing-xl: var(--space-7);
  --spacing-2xl: 4rem; /* optionnel */
  --spacing-3xl: 5rem; /* optionnel */
}
/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-weight: 500;
}
.button--primary {
  background-color: var(--color-primary);
  color: #ffffff;
}
.button--primary:hover {
  background-color: var(--color-primary);
}
.button--secondary {
  background-color: var(--color-background);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
/* Cards */
.card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
/* ─────────────────────────────────────────────
   Navigation semaine
   ───────────────────────────────────────────── */
.nav-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface, #f5f6f8);
  border: 1px solid var(--color-border, #e1e3e8);
  border-radius: var(--radius-lg);
}
/* Label semaine */
.nav-label {
  min-width: 180px;
  text-align: center;

  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.2px;
}
/* Boutons */
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 50%;
  border: none;
  background: var(--color-background, #ffffff);
  color: var(--color-text-muted, #6b7280);

  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}
.nav-button svg {
  width: 18px;
  height: 18px;
}
/* Hover */
.nav-button:hover {
  background: var(--color-primary-soft, #eef2ff);
  color: var(--color-primary, #4f46e5);
}
/* Active (clic) */
.nav-button:active {
  transform: scale(0.95);
}
/* Focus clavier */
.nav-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* Common styles */
/* styles/utilities.css */
/* styles/variables.css */
:root {
  /* =========================
     Colors - Base / UI
     ========================= */
  --color-primary: rgb(190, 26, 34); /* main primary */

  --color-secondary: #f0f0f0; /* subtle gray for secondary elements */
  --color-secondary-hover: #e0e0e0;

  --color-bg: #f7f7f7; /* main page background */
  --color-surface: #ffffff; /* cards, panels, surfaces */
  --color-muted: #b0b0b0; /* for disabled or less important text */

  --color-border: #e0e0e0;
  --color-border-line: #b5b5b5;

  /* =========================
     Text Colors
     ========================= */
  --color-text: rgb(65, 65, 65); /* dark gray text */
  --color-text-muted: #999999; /* lighter muted text */
  --color-text-inverse: #ffffff; /* text on primary/dark backgrounds */

  /* =========================
     Semantic Colors
     ========================= */
  --color-success: #2e7d32;
  --color-warning: #ed6c02;
  --color-error: #d32f2f;

  --color-danger: var(--color-primary);
  --color-danger-hover: var(--color-primary);

  /* =========================
     Accent Colors
     ========================= */
  --color-accent-1: #ff9800; /* orange */
  --color-accent-2: #03a9f4; /* light blue */
  --color-accent-3: #8e24aa; /* purple */
  --color-accent-4: #4caf50; /* green */
  --color-accent-5: #ffeb3b; /* yellow */

  /* =========================
     Badge Colors
     ========================= */
  --badge-bg-success: var(--color-success);
  --badge-text-success: #ffffff;

  --badge-bg-warning: var(--color-warning);
  --badge-text-warning: #ffffff;

  --badge-bg-error: var(--color-error);
  --badge-text-error: #ffffff;

  /* USER TYPES */
  --badge-color-member-bg: #4caf50;
  --badge-color-member-text: white;

  --badge-color-teacher-bg: #3f51b5;
  --badge-color-teacher-text: white;

  --badge-color-board_member-bg: var(--color-primary);
  --badge-color-board_member-text: white;

  --badge-color-helper-bg: #009688;
  --badge-color-helper-text: white;

  --badge-color-student-bg: #ff9800;
  --badge-color-student-text: white;

  /* ACTIVITY STATUS */
  --badge-color-active-bg: #2e7d32;
  --badge-color-active-text: white;

  --badge-color-inactive-bg: #ddd;
  --badge-color-inactive-text: #666;

  /* RECURRENCE */
  --badge-color-daily-bg: #26c6da;
  --badge-color-daily-text: #00363a;

  --badge-color-weekly-bg: #7e57c2;
  --badge-color-weekly-text: white;

  --badge-color-monthly-bg: #ff7043;
  --badge-color-monthly-text: white;

  /* EVENT TYPES */
  --badge-color-private_lesson-bg: #5c6bc0;
  --badge-color-private_lesson-text: white;

  --badge-color-special-bg: #ec407a;
  --badge-color-special-text: white;

  --badge-color-blocked-bg: #bdbdbd;
  --badge-color-blocked-text: #333;

  --badge-color-grouped_lesson-bg: #66bb6a;
  --badge-color-grouped_lesson-text: white;

  --badge-color-competition-bg: #d32f2f;
  --badge-color-competition-text: white;

  /* SLOT STATUSES */
  --badge-color-scheduled-bg: #42a5f5;
  --badge-color-scheduled-text: white;

  --badge-color-confirmed-bg: #388e3c;
  --badge-color-confirmed-text: white;

  --badge-color-completed-bg: #00796b;
  --badge-color-completed-text: white;

  --badge-color-cancelled-bg: #9e9e9e;
  --badge-color-cancelled-text: #333;

  /* ADMIN */
  --badge-color-admin-bg: var(--color-primary);
  --badge-color-admin-text: var(--color-text-inverse);

  /* =========================
     Gradients
     ========================= */

  --gradient-secondary: linear-gradient(
    75deg,
    #9a9a9a,
    #666666
  ); /* gray tones */
  --gradient-bg: linear-gradient(135deg, #f7f7f7, #ffffff); /* soft contrast */
  --gradient-bg-medium: linear-gradient(
    135deg,
    #eeeeee,
    #ffffff
  ); /* subtle panels */

  /* =========================
     Typography
     ========================= */
  --font-family-base:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-md: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */

  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-loose: 1.75;

  /* =========================
     Spacing (8px scale)
     ========================= */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.5rem; /* 24px */
  --space-6: 2rem; /* 32px */
  --space-7: 3rem; /* 48px */

  /* =========================
     Radius
     ========================= */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-round: 9999px;

  /* =========================
     Shadows
     ========================= */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

  /* =========================
     Z-index
     ========================= */
  --z-base: 0;
  --z-dropdown: 100;
  --z-modal: 1000;
  --z-toast: 1100;
}
/* =========================
   Missing / extra variables
   ========================= */
/* Spacing aliases (pour correspondre à base.css) */
:root {
  --spacing-xs: var(--space-1);
  --spacing-sm: var(--space-2);
  --spacing-md: var(--space-4);
  --spacing-lg: var(--space-6);
  --spacing-xl: var(--space-7);
  --spacing-2xl: 4rem; /* optionnel */
  --spacing-3xl: 5rem; /* optionnel */
}
/* Spacing */
.mt-1 {
  margin-top: var(--space-1);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-3 {
  margin-top: var(--space-3);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.p-2 {
  padding: var(--space-2);
}
.p-4 {
  padding: var(--space-4);
}
/* Layout */
.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-4 {
  gap: var(--space-4);
}
/* styles/reset.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
}
/* ============================================
   BASE STYLES
============================================ */
/* Reset & Box Sizing */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--gradient-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font-family: inherit;
}
button {
  cursor: pointer;
}
/* ============================================
   TYPOGRAPHY
============================================ */
h1 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-4);
}
h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}
h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}
p {
  margin-bottom: var(--space-3);
}
/* ============================================
   LAYOUTS & CONTAINERS
============================================ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  margin: 0 auto;
  padding: var(--space-6);
}
main {
  flex: 1;
  padding-bottom: var(--space-7);
}
.view-container {
  padding: var(--space-6);
  background: var(--color-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: auto;
  padding: var(--space-2);
}
/* ============================================
   FLEX UTILITIES
============================================ */
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.flex-row {
  flex-direction: row;
}
.flex-column {
  flex-direction: column;
}
.flex-row-reverse {
  flex-direction: row-reverse;
}
.flex-column-reverse {
  flex-direction: column-reverse;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-nowrap {
  flex-wrap: nowrap;
}
.align-items-start {
  align-items: flex-start;
}
.align-items-center {
  align-items: center;
}
.align-items-end {
  align-items: flex-end;
}
.align-items-stretch {
  align-items: stretch;
}
.justify-content-start {
  justify-content: flex-start;
}
.justify-content-center {
  justify-content: center;
}
.justify-content-end {
  justify-content: flex-end;
}
.justify-content-between {
  justify-content: space-between;
}
.justify-content-around {
  justify-content: space-around;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
/* ============================================
   GRID UTILITIES
============================================ */
.grid {
  display: grid;
  gap: var(--space-4);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}
.two-column {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
}
.two-column-balanced {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.layout-grid-content {
  display: grid;
  gap: var(--space-6);
}
.layout-grid-content.event {
  grid-template-columns: 1fr 1fr;
}
.layout-grid-content.simple {
  grid-template-columns: 1fr;
}
.layout-sidebar-content,
.layout-main-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* ============================================
   RESPONSIVE OVERRIDES
============================================ */
@media (max-width: 992px) {
  .two-column {
    grid-template-columns: 280px 1fr;
  }

  .layout-grid-content.event {
    grid-template-columns: 1fr;
  }

  .layout-sidebar-content {
    display: grid;
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .container {
    padding: var(--space-4);
    width: 95%;
  }

  .view-container {
    padding: var(--space-2);
    gap: var(--space-2);
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .two-column,
  .two-column-balanced {
    grid-template-columns: 1fr;
  }

  .flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .layout-grid-content,
  .layout-grid-content.event {
    grid-template-columns: 1fr;
  }
}
/* styles/buttons.css */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
/* Primary */
.btn-primary {
  background-color: var(--color-primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--color-primary);
}
/* Danger */
.btn-danger {
  background-color: var(--color-danger);
  color: white;
}
.btn-danger:hover {
  background-color: var(--color-danger-hover);
}
/* Secondary / Cancel */
.btn-secondary,
.btn-cancel {
  background-color: var(--color-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover,
.btn-cancel:hover {
  background-color: var(--color-secondary-hover);
}
.btn-outline-secondary {
  color: var(--color-secondary-hover);
  border: 1px solid var(--color-secondary-hover);
  background: transparent;
}
.btn-outline-secondary:hover {
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
  background-color: var(--color-text-muted);
}
.btn-icon-modern {
  background: transparent;
  border: none;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-inverse);
}
.btn-icon-modern:hover {
  background: var(--color-background);
  color: var(--color-text);
}
.btn-icon-modern.danger:hover {
  color: var(--color-danger);
}
.btn-close {
  color: var(--color-text-inverse);
}
/* Form container */
.event-form {
  background: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 600px;
  margin: 0 auto;
}
/* Form title */
.event-form h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-5);
  color: var(--color-text);
}
/* Form group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
/* Labels */
.form-group label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
}
/* Inputs & selects */
.form-input,
select,
input[type="date"],
input[type="time"] {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: var(--font-size-md);
  background: var(--color-surface);
  transition: all 0.2s ease-in-out;
}
.form-input:focus,
select:focus,
input[type="date"]:focus,
input[type="time"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(131, 38, 43, 0.15);
}
/* Error states */
.error-message {
  color: var(--color-danger);
  font-size: var(--font-size-xs);
  margin-top: var(--space-1);
}
/* Checkbox */
.form-group--checkbox label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
  color: var(--color-text);
}
/* Form rows */
.form-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
/* Buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-md);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
/* Segmented control – modern pills */
.segmented-control {
  display: flex;
  background: var(--color-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.segment-btn {
  flex: 1;
  padding: var(--space-2);
  text-align: center;
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.segment-btn.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
/* Alerts */
.alert-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(211, 47, 47, 0.1);
  color: var(--color-danger);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
/* Required asterisk */
.required {
  color: var(--color-danger);
}
/* ==============================
   Inputs & Selects Modernisés
   ============================== */
/* Tous les champs texte et select */
input[type="text"],
input[type="date"],
input[type="time"],
select,
.form-input {
  width: 100%;
  padding: var(--space-3);
  font-size: var(--font-size-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* Placeholder plus discret */
input::placeholder,
select::placeholder {
  color: #aaa;
  font-weight: 400;
}
/* Focus modern */
input:focus,
select:focus,
input[type="date"]:focus,
input[type="time"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(131, 38, 43, 0.15);
  background: var(--color-surface);
}
/* Select arrow personnalisé */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: var(--color-surface)
    url("data:image/svg+xml;utf8,<svg fill='%23656565' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>")
    no-repeat right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem; /* espace pour flèche */
}
/* Option hover pour select */
select option:hover {
  background: var(--color-secondary-hover);
  color: var(--color-text);
}
/* Error state modern */
input.error,
select.error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}
/* styles/modal.css */
/* ============================================
   MODALS - Fenêtres modales
============================================ */
/* ============================================
   MODAL BASE
============================================ */
/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-1);
}
.modal,
.modal-content {
  background: var(--gradient-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* ============================================
   MODAL SIZES
============================================ */
.modal--sm {
  max-width: 400px;
}
.modal--md {
  max-width: 600px;
}
.modal--lg {
  max-width: 900px;
}
.modal--xl {
  max-width: 1400px;
}
/* ============================================
   MODAL SECTIONS
============================================ */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  border-bottom: 1px solid var(--color-border-line);
  gap: var(--space-3);
  width: 100%;
  background: var(--gradient-secondary);
}
.modal-header-content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}
.modal-header .header-actions-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.modal-header-text {
  flex: 1;
  min-width: 0;
}
.modal-header-text h2 {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text-inverse);
}
.modal-header h2,
.modal-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text-inverse);
}
.modal-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-inverse);
  width: 100%;
}
.modal-title-warning {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-danger);
}
/* Icon alignment fix */
.modal-header h2 svg,
.modal-header h2 i,
.modal-header h3 svg,
.modal-header h3 i,
.modal-title svg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
}
/* Body */
.modal-body {
  flex: 1;
  padding: var(--space-3);
  overflow-y: auto;
  max-height: 70vh; /* Ajouter cette ligne */
}
.modal-content-scrollable {
  max-height: 70vh;
  overflow-y: auto;
  padding: var(--space-1);
}
/* Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border-line);
  gap: var(--space-2);
}
/* ============================================
   MODAL STATES
============================================ */
.modal-loading,
.modal-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.modal-loading p,
.modal-error p {
  margin-top: var(--space-2);
  color: var(--color-text);
}
.modal-error h3 {
  margin: var(--space-3) 0 var(--space-2);
  color: var(--color-danger);
}
/* ============================================
   MODAL CARD SPECIFIC
============================================ */
.modal-card-header {
  display: flex;
  align-items: wrap;
  gap: var(--space-3);
}
.modal-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-inverse);
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
}
.modal-card-meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.modal-card-actions {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}
.modal-card-content {
  padding: var(--space-4);
}
.modal-card-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.modal-card-sidebar,
.modal-card-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* ============================================
   MOBILE MENU – ACTIONS UNIFIÉES
============================================ */
.mobile-menu-action {
  width: 100%;
  justify-content: flex-start;
  padding: var(--space-3);
}
.mobile-menu-action svg {
  font-size: 34px;
  flex-shrink: 0;
}
/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 992px) {
  .modal-card-grid {
    grid-template-columns: 1fr;
  }

  .modal-card-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .modal {
    max-width: 95vw;
  }

  .modal-header {
    padding: var(--space-3) var(--space-4);
  }

  .modal-footer {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3) var(--space-4);
  }

  .modal-body {
    padding: var(--space-2);
  }

  .modal-card-content {
    padding: var(--space-3);
  }

  .modal-card-sidebar {
    grid-template-columns: 1fr;
  }

  .modal-card-avatar {
    display: none;
  }

  .modal-card-header {
    flex-wrap: wrap;
    display: flex;
    gap: var(--space-2);
  }
}
/* styles/badges.css */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-round);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background-color: var(--badge-bg-default);
  color: var(--badge-text-default);
}
/* Example semantic variations */
.badge[data-type="admin"] {
  background-color: var(--color-primary);
  color: white;
}
.badge[data-type="inactive"] {
  background-color: #ddd;
  color: #666;
}
/* styles/badges.css */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-round);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background-color: var(--badge-bg-default);
  color: var(--badge-text-default);
}
.badge[data-type="member"] {
  background-color: var(--badge-color-member-bg);
  color: var(--badge-color-member-text);
}
.badge[data-type="teacher"] {
  background-color: var(--badge-color-teacher-bg);
  color: var(--badge-color-teacher-text);
}
.badge[data-type="board_member"] {
  background-color: var(--badge-color-board_member-bg);
  color: var(--badge-color-board_member-text);
}
.badge[data-type="helper"] {
  background-color: var(--badge-color-helper-bg);
  color: var(--badge-color-helper-text);
}
.badge[data-type="student"] {
  background-color: var(--badge-color-student-bg);
  color: var(--badge-color-student-text);
}
/* ACTIVITY STATUS */
.badge[data-type="active"] {
  background-color: var(--badge-color-active-bg);
  color: var(--badge-color-active-text);
}
.badge[data-type="inactive"] {
  background-color: var(--badge-color-inactive-bg);
  color: var(--badge-color-inactive-text);
}
/* RECURRENCE */
.badge[data-type="daily"] {
  background-color: var(--badge-color-daily-bg);
  color: var(--badge-color-daily-text);
}
.badge[data-type="weekly"] {
  background-color: var(--badge-color-weekly-bg);
  color: var(--badge-color-weekly-text);
}
.badge[data-type="monthly"] {
  background-color: var(--badge-color-monthly-bg);
  color: var(--badge-color-monthly-text);
}
/* EVENT TYPES */
.badge[data-type="private_lesson"] {
  background-color: var(--badge-color-private_lesson-bg);
  color: var(--badge-color-private_lesson-text);
}
.badge[data-type="special"] {
  background-color: var(--badge-color-special-bg);
  color: var(--badge-color-special-text);
}
.badge[data-type="blocked"] {
  background-color: var(--badge-color-blocked-bg);
  color: var(--badge-color-blocked-text);
}
.badge[data-type="grouped_lesson"] {
  background-color: var(--badge-color-grouped_lesson-bg);
  color: var(--badge-color-grouped_lesson-text);
}
.badge[data-type="competition"] {
  background-color: var(--badge-color-competition-bg);
  color: var(--badge-color-competition-text);
}
/* SLOT STATUSES */
.badge[data-type="scheduled"] {
  background-color: var(--badge-color-scheduled-bg);
  color: var(--badge-color-scheduled-text);
}
.badge[data-type="confirmed"] {
  background-color: var(--badge-color-confirmed-bg);
  color: var(--badge-color-confirmed-text);
}
.badge[data-type="completed"] {
  background-color: var(--badge-color-completed-bg);
  color: var(--badge-color-completed-text);
}
.badge[data-type="cancelled"] {
  background-color: var(--badge-color-cancelled-bg);
  color: var(--badge-color-cancelled-text);
}
/* ADMIN */
.badge[data-type="admin"] {
  background-color: var(--badge-color-admin-bg);
  color: var(--badge-color-admin-text);
}
/* styles/pills.css */
.filter-pills {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.pill {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-round);
  border: 1px solid var(--color-border);
  background: white;
  cursor: pointer;
  font-size: var(--font-size-sm);
}
.pill-active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
/* styles/error-boundary.css */
.error-boundary {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--color-background);
}
.error-boundary-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.error-boundary-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
}
.error-boundary-message {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}
.error-boundary-details {
  text-align: left;
  margin: var(--space-5) 0;
  padding: var(--space-3);
  background: #f5f5f5;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.error-boundary-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
}
.error-boundary-stack pre {
  background: white;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}
.error-boundary-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
}
.error-boundary-count {
  margin-top: var(--space-4);
  padding: var(--space-2);
  background: #fff3cd;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}
/* styles/alerts.css */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}
.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
}
.alert-error {
  background: #fdecea;
  color: var(--color-danger);
}
/* styles/lists.css */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}
.list-header-actions {
  display: flex;
  gap: var(--space-2);
}
.list-filters {
  margin-bottom: var(--space-3);
}
.list-messages {
  margin-bottom: var(--space-3);
}
/* User Selector List */
.user-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.user-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background-color 0.2s;
}
.user-list-item:hover {
  background-color: var(--color-primary);
  color: white;
}
.user-list-item:last-child {
  border-bottom: none;
}
.user-name {
  font-weight: 500;
  color: var(--color-text);
}
.user-list-item:hover .user-name {
  font-weight: 500;
  color: white;
}
.user-type {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}
/* styles/table.css */
.table-container {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: var(--font-size-sm);
}
.table th {
  font-weight: 600;
  color: var(--color-text-muted);
}
.row-clickable {
  cursor: pointer;
}
.row-clickable:hover {
  background: var(--color-background);
}
.table-actions {
  text-align: right;
}
/* styles/user-card.css */
/* ============================================
   CARDS - Conteneurs de contenu
============================================ */
/* ============================================
   BASE CARD
============================================ */
.card {
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  margin: var(--space-2);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card h2 {
  margin-bottom: var(--space-6);
  color: var(--color-text);
  font-size: var(--font-size-xl);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.card h2::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.card .week-title h2::before {
  width: 0;
  border-radius: 0;
}
/* ============================================
   CARD SECTIONS
============================================ */
.card-header {
  display: flex;
  align-items: center;
  align-content: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-2);
}
.card-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  width: 100%;
  border-bottom: 1px solid var(--color-border);
}
.card-title-text,
.card-title h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}
.card-title svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.card-title .count-badge {
  margin-left: auto;
}
.card-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.card-header-btn {
  color: var(--color-text);
}
.card-header-btn:hover {
  color: var(--color-primary);
}
/* ============================================
   INFO + DATA CARDS
============================================ */
.data-card,
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}
.info-card {
  overflow: hidden;
}
.data-card {
  overflow: auto;
}
.data-card:hover,
.info-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-line);
}
/* ============================================
   CARD HEADERS (INFO & DATA)
============================================ */
.data-card-header,
.info-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
}
.data-card-header svg,
.info-card-header svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.data-card-title,
.info-card-title,
.info-card-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}
/* ============================================
   CARD BODY
============================================ */
.data-card-body,
.info-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}
/* ============================================
   INFO ITEM MODERN
============================================ */
.info-item-modern,
.data-card-body .info-item-modern {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.info-content,
.data-card-body .info-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.info-label,
.data-card-body .info-label {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-value,
.data-card-body .info-value,
.info-content p,
.data-card-body .info-content p {
  flex: 1;
  display: flex;
  align-items: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  gap: var(--space-1);
}
/* ============================================
   INFO ICONS
============================================ */
.info-icon,
.info-icon-success,
.info-icon-warning {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.info-icon {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.info-icon-success {
  background: var(--color-success);
  color: var(--color-text-inverse);
}
.info-icon-warning {
  background: var(--color-warning);
  color: var(--color-text-inverse);
}
.info-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-inverse);
  font-size: var(--font-size-2xl);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}
.detail-card-meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
/* ============================================
   INFO BANNER
============================================ */
.info-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}
.info-banner svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
.info-banner.info {
  background: var(--color-accent-2);
  color: var(--color-text-inverse);
  border-left: 4px solid var(--color-accent-2);
}
.info-banner span {
  line-height: var(--line-height-base);
  margin: 0;
}
.metadata-footer {
  display: flex;
  margin-top: 6px;
  gap: 4px;
}
/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  .card,
  .info-card,
  .data-card {
    padding: var(--space-4);
  }

  .info-row {
    flex-direction: column;
    gap: var(--space-1);
  }

  .info-row label {
    min-width: auto;
  }

  .info-card-avatar {
    display: none;
  }
}
.detail-card-meta {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.header-actions-group {
  display: flex;
  gap: var(--space-2);
}
.modal-content-scrollable {
  max-height: 70vh;
  overflow-y: auto;
}
/* Info cards */
.info-card {
  margin-bottom: var(--space-4);
}
.info-card-header h3 {
  margin-bottom: var(--space-2);
}
.info-card-body {
  display: flex;
  gap: var(--space-4);
}
.flex-row {
  flex-direction: row;
}
.info-item-modern {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.info-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
/* styles/loading.css */
.loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Feature-specific styles */
/* styles/changelog.css */
.changelog-content {
  max-height: 60vh;
  overflow-y: auto;
}
.changelog-loading,
.changelog-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}
.changelog-h1 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-4);
}
.changelog-h2 {
  font-size: var(--font-size-lg);
  margin-top: var(--space-4);
}
.changelog-h3 {
  font-size: var(--font-size-md);
  margin-top: var(--space-3);
}
.changelog-list {
  padding-left: var(--space-4);
}
.changelog-item {
  margin-bottom: var(--space-1);
}
.changelog-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) 0;
}
/* ============================================
   HEADER - Navigation principale
   Desktop & Mobile
   ============================================ */
/* ============================================
   HEADER BASE
   ============================================ */
.header {
  background: var(--gradient-secondary);
  border-bottom: 2px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown); /* remplace --z-sticky */
  box-shadow: var(--shadow-sm);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: var(--space-7);
  margin-right: var(--space-7);
}
/* ============================================
   DESKTOP HEADER
   ============================================ */
.header-desktop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6); /* remplace --gap-lg */
  width: 100%;
}
.header-title {
  display: flex;
  align-items: center;
  font-size: var(--font-size-xl);
  font-weight: 700; /* remplace --font-weight-bold */
  color: var(--color-text-inverse);
  margin: var(--space-2);
  min-height: 100px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-7);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  border: 2px solid var(--color-text-inverse);
  font-weight: 500; /* remplace --font-weight-medium */
  transition: all 0.2s ease; /* remplace --transition-base */
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--color-bg); /* remplace --color-background */
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.nav-link.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
}
.mode-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s ease;
  color: var(--color-text-inverse);
  border: none;
  background: transparent;
}
/* ============================================
   MOBILE HEADER
   ============================================ */
.header-mobile {
  display: none;
}
@media (max-width: 768px) {
  .header-desktop {
    display: none;
  }

  .header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--space-6); /* remplace --gap-lg */
    padding: var(--space-2) var(--space-3);
    min-height: 48px; /* remplace --btn-size-md */
  }

  .header-title-mobile {
    display: flex;
    align-items: center;
    gap: var(--space-1); /* remplace --gap-xs */
    font-size: var(--font-size-md); /* remplace --font-size-base */
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    flex: 1;
    min-width: 0;
  }

  .header-title-mobile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
  }

  .mobile-menu-toggle:hover {
    background: var(--color-secondary-hover); /* remplace --color-bg-hover */
  }

  .mobile-menu-toggle:active {
    transform: scale(0.95);
  }
}
/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
@media (max-width: 768px) {
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 400;
    animation: fadeIn 0.2s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .mobile-menu {
    position: fixed;
    top: 48px; /* remplace --btn-size-md */
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--color-bg); /* remplace --color-background */
    box-shadow: var(--shadow-lg); /* remplace --shadow-xl */
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from {
      transform: translateX(-100%);
    }
    to {
      transform: translateX(0);
    }
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-4); /* remplace --gap-md */
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-4); /* remplace --gap-md */
    padding: var(--space-3);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
  }

  .mobile-nav-link:hover {
    background: var(--color-secondary-hover);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
  }

  .mobile-nav-link.active {
    background: var(--color-primary);
    color: var(--color-text-inverse); /* remplace --color-white */
  }
}
/* ============================================
   SAFE AREAS (iPhone notch)
   ============================================ */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .header-container {
      padding-left: max(var(--space-3), env(safe-area-inset-left));
      padding-right: max(var(--space-3), env(safe-area-inset-right));
      padding-top: max(var(--space-2), env(safe-area-inset-top));
    }

    .mobile-menu {
      padding-left: env(safe-area-inset-left, 0);
    }
  }
}
/* ============================================
   TABLET ADJUSTMENTS
   ============================================ */
@media (max-width: 992px) and (min-width: 769px) {
  .header-title {
    font-size: var(--font-size-lg);
  }
  .header-nav {
    gap: var(--space-2); /* remplace --gap-sm */
  }
  .nav-link {
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-sm);
  }
}
/* styles/mobile-menu.css */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: var(--z-modal);
}
.mobile-menu {
  background: white;
  width: 85%;
  max-width: 320px;
  height: 100%;
  padding: var(--space-4);
}
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu-content {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav-link {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
}
.mobile-nav-link:hover {
  background: var(--color-background);
}
/* styles/home-selector.css */
.home-selector {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-selector-card {
  display: flex;
  flex-direction: column;
  background: var(--color-muted);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.home-selector-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  background: var(--color-surface);
}
.profile-card-title {
  display: flex;
  flex-direction: row;
  align-content: center;
  align-items: center;
  gap: var(--space-3);
}
.profile-card:hover {
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
/* styles/user-selector.css */
.user-selector-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.user-selector-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--color-border);
}
.user-selector-card:hover {
  background: var(--color-background);
}
.user-selector-name {
  font-weight: 600;
}
.user-selector-type {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}
/* ───────────────────────────── */
/* SLOT CARD */
/* ───────────────────────────── */
.slot-card {
  position: relative;
  background: var(--color-background);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
  cursor: default;
  overflow: hidden;
}
/* ───────────────────────────── */
/* SLOT CARD – Event Type Borders */
/* ───────────────────────────── */
.slot-private_lesson {
  border-left: 4px solid var(--badge-color-private_lesson-bg);
}
.slot-special {
  border-left: 4px solid var(--badge-color-special-bg);
}
.slot-blocked {
  border-left: 4px solid var(--badge-color-blocked-bg);
}
.slot-grouped_lesson {
  border-left: 4px solid var(--badge-color-grouped_lesson-bg);
}
.slot-competition {
  border-left: 4px solid var(--badge-color-competition-bg);
}
.slot-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
/* Optional compact version */
.slot-card.compact {
  padding: var(--space-2);
  font-size: 12px;
}
/* Header */
.slot-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}
.slot-card__title {
  flex: 1;
}
.slot-card__name {
  display: flex;
  align-content: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-card__name.compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  overflow: hidden;
}
.slot-card__time {
  font-size: 14px;
  color: var(--color-text);
  margin-top: 2px;
}
.slot-card__status {
  margin-top: 2px;
}
/* CTA button */
.slot-card__cta {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  border: none;
  background: var(--color-primary);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}
.slot-card__cta:hover {
  filter: brightness(1.1);
}
/* Instructors */
.slot-card__instructors {
  font-size: 14px;
  color: var(--color-text);
  margin-top: var(--space-2);
}
/* Participants */
.slot-card__participants {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--color-text);
}
.slot-card__avatars {
  display: flex;
  gap: var(--space-2);
}
.slot-card__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-background);
  border: 1.5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  margin-left: -6px;
}
.slot-card__avatar--more {
  background: var(--color-muted);
  color: white;
}
/* Slot info (optional detailed display) */
.slot-card__info {
  font-size: 13px;
  color: var(--color-text);
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Bouton de suppression */
.slot-card__delete-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  background-color: var(--color-error);
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
}
.slot-card__delete-btn:hover {
  background-color: var(--color-error-dark, #c53030);
  transform: scale(1.1);
}
.slot-card__delete-btn:active {
  transform: scale(0.95);
}
/* S'assurer que la carte a un positionnement relatif */
.slot-card {
  position: relative;
  padding-bottom: 3rem; /* Espace pour le bouton */
}
/* ================================================================
   ACCORDION SECTIONS
================================================================ */
.accordion-sections {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.accordion-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
}
.accordion-section.open {
  box-shadow: var(--shadow-sm);
}
/* Header */
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
}
.accordion-header:hover {
  background-color: var(--color-hover);
}
.accordion-header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}
.accordion-header-left svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}
.accordion-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
}
/* Badges */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 var(--spacing-xs);
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}
.badge-active {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--color-success-light);
  color: var(--color-success);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
}
/* Icône chevron */
.accordion-icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.accordion-icon.rotated {
  transform: rotate(180deg);
}
/* Contenu */
.accordion-content {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ================================================================
   DETAIL FORM GRID (2 colonnes)
================================================================ */
.detail-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}
.detail-form-column {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
/* Grid participants dans accordéon */
.participants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}
/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  .detail-form-grid,
  .participants-grid {
    grid-template-columns: 1fr;
  }

  .accordion-header {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .accordion-content {
    padding: 0 var(--spacing-md) var(--spacing-md);
  }
}
/* ───────────────────────────── */
/* PAGE */
/* ───────────────────────────── */
.calendar-page {
  background: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  margin: var(--space-6);
}
.calendar-container {
  max-width: 1100px;
  margin: 0 auto;
}
/* Header */
.calendar-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
}
.calendar-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-muted);
}
/* ───────────────────────────── */
/* VIEW SELECTOR */
/* ───────────────────────────── */
.view-selector {
  display: flex;
  background: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 2px;
}
.view-selector button {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--color-muted);
  transition: all 0.2s ease;
}
.view-selector button.active {
  background: var(--color-background);
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
/* ───────────────────────────── */
/* LEGEND */
/* ───────────────────────────── */
.calendar-legend {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
}
.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
/* ───────────────────────────── */
/* EVENT CARD */
/* ───────────────────────────── */
.event-card {
  background: var(--color-background);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--event-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: var(--space-2);
  position: relative;
  transition: box-shadow 0.2s;
}
.event-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.13);
}
.event-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-meta {
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 2px;
}
/* Inscription button */
.event-action {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.event-action.default {
  background: #f0f0f5;
  color: var(--color-text);
}
.event-action.active {
  background: #5cb85c;
  color: white;
}
.event-action.disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
}
/* Participants */
.event-participants {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.participant {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--event-color) 20%, white);
  border: 1.5px solid var(--event-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--event-color);
}
/* ───────────────────────────── */
/* WEEK VIEW */
/* ───────────────────────────── */
.week-view {
  max-width: 100%;
  margin: 0 auto;
}
.week-grid {
  display: grid;
  gap: var(--space-3);
  margin: 0 auto;
}
.week-column {
  background: var(--color-background);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.week-column.today {
  border-color: var(--color-primary);
}
/* Column header */
.week-column-header {
  padding: var(--space-3);
  background: #f6f6fa;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.week-column.today .week-column-header {
  background: var(--color-primary);
  color: white;
  gap: var(--space-2);
}
/* ───────────────────────────── */
/* TIMELINE */
/* ───────────────────────────── */
.timeline {
  max-width: 90%;
  margin: 0 auto;
}
.timeline-day {
  display: flex;
  width: 100%;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.timeline-date {
  width: 150px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timeline-date.today {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.timeline-day-events {
  display: flex;
  flex-direction: column;
  width: 100%;
}
/* ───────────────────────────── */
/* MONTH VIEW */
/* ───────────────────────────── */
.month-view {
  max-width: 90%;
  margin: 0 auto;
}
.month-day-labels {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-left: 24px;
  padding-right: 24px;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-2);
}
.month-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 62px;
  padding: 5px 4px 4px;
  border-radius: var(--radius-md);

  background: var(--color-surface);
  border: 1px solid var(--color-border);

  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.month-day:hover {
  background: #f0f4ff;
}
/* Outside current month */
.month-day.outside {
  background: #f7f7fa;
  opacity: 0.35;
  cursor: default;
}
.month-day.outside:hover {
  background: #f7f7fa;
}
/* Selected day */
.month-day.selected {
  background: color-mix(in srgb, var(--color-primary) 15%, transparent);
  border: 1.5px solid var(--color-primary);
}
/* =========================
   Day number
   ========================= */
.month-day-number {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 3px;
  color: #1a1a2e;
  width: 20px;
}
/* Today number emphasis */
.month-day-number.today {
  font-weight: 800;
  color: white;
  background-color: var(--color-primary);
  border-radius: var(--radius-round);
}
/* Outside month number */
.month-day.outside .month-day-number {
  color: #aaa;
}
/* =========================
   Slots / indicators
   ========================= */
.month-day-slots {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
}
/* Event color bar */
.month-slot-bar {
  height: 4px;
  width: 40px;
  border-radius: 2px;
  opacity: 0.85;
}
/* "+X more" indicator */
.month-slot-more {
  font-size: 8px;
  color: var(--color-text);
  text-align: center;
  margin-top: 1px;
}
/* ───────────────────────────── */
/* MONTH SLOT BAR – Event Types  */
/* ───────────────────────────── */
.month-slot-bar {
  height: 4px;
  border-radius: 2px;
  opacity: 0.85;
  background-color: var(--color-muted);
}
/* Private lesson */
.month-slot-bar[data-type="private_lesson"] {
  background-color: var(--badge-color-private_lesson-bg);
}
/* Special */
.month-slot-bar[data-type="special"] {
  background-color: var(--badge-color-special-bg);
}
/* Blocked */
.month-slot-bar[data-type="blocked"] {
  background-color: var(--badge-color-blocked-bg);
}
/* Grouped lesson */
.month-slot-bar[data-type="grouped_lesson"] {
  background-color: var(--badge-color-grouped_lesson-bg);
}
/* Competition */
.month-slot-bar[data-type="competition"] {
  background-color: var(--badge-color-competition-bg);
}
/* Detail panel */
.month-detail {
  margin-top: var(--space-5);
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
/* ============================================
   MONTH DETAIL → CARD ADAPTATION
============================================ */
.month-detail {
  margin: 0;
}
/* Close button aligned with card system */
.month-detail-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
}
.month-detail-close:hover {
  color: var(--color-text);
}
/* Slot list spacing */
.month-detail-body.card-body {
  gap: var(--space-3);
}
/* Placeholder card */
.month-detail-placeholder.info-card {
  text-align: center;
}
.month-detail-placeholder .info-card-body {
  align-items: center;
  justify-content: center;
}
.month-detail-placeholder .info-icon {
  font-size: 32px;
}
/* Header */
.calendar-header {
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.calendar-title p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-muted);
}
.calendar-title h1::before {
  display: block;
  content: "";
  width: 4px;
  height: 24px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
/* Actions */
.calendar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* Main content */
.calendar-content {
  max-width: 1100px;
  margin: 0 auto;
}
/* Responsive */
@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-actions {
    width: 100%;
    justify-content: space-between;
  }
}
.instructors-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.instructor-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-primary);
  background: var(--color-secondary);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.instructor-btn:hover {
  background: var(--color-secondary-hover);
}
.instructor-btn.selected {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(131, 38, 43, 0.25);
}
/* styles/participants.css */
/* ============================================
   PARTICIPANTS GRID
============================================ */
.participants-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
/* ============================================
   PARTICIPANT ROW
============================================ */
.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border-line);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.participant-row:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.participant-row.current-user {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.participant-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}
.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}
.participant-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.participant-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}
.badge-you {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-round);
  font-weight: 600;
}
.participant-status-label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}
/* ============================================
   PARTICIPANT ACTIONS (UNIFIÉ)
============================================ */
.participant-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Mode étendu : grille 2 × 3 */
.participant-actions.expanded {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
/* Boutons statuts */
.btn-status {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--color-text-muted);
  position: relative;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.btn-status:hover {
  opacity: 1;
  transform: scale(1.1);
}
.btn-status.active {
  opacity: 1;
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.btn-status.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-75%);
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-round);
}
/* Bouton "More" */
.btn-more {
  font-size: 20px;
  line-height: 1;
}
/* ============================================
   AVAILABLE USERS LIST
============================================ */
.available-users-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 400px;
  overflow-y: auto;
}
.available-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border-line);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.available-user-row:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.user-name {
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}
.user-email {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ============================================
   AVAILABLE USERS GRID – COMPACT
============================================ */
.available-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
  overflow-y: auto;
  padding: var(--space-1);
}
.available-user-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border-line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.available-user-chip:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.available-user-chip:hover .add-icon {
  opacity: 1;
  transform: scale(1.2);
}
.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-round);
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.user-name-compact {
  flex: 1;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.add-icon {
  flex-shrink: 0;
  color: var(--color-primary);
  opacity: 0.5;
  transition: all 0.2s ease;
  width: 16px;
  height: 16px;
}
/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1200px) {
  .available-users-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
@media (max-width: 768px) {
  .participant-row,
  .available-user-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .participant-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .available-users-grid {
    grid-template-columns: 1fr;
  }

  .available-user-row .btn {
    width: 100%;
  }
}
/* Days selector grid */
.days-selector-grid {
  display: flex;
  flex-direction: row;
  gap: var(--space-2);
  margin-top: var(--space-1);
  max-height: 100px;
}
.day-button {
  position: relative;
  aspect-ratio: 1;
  padding: var(--space-2);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 40px;
}
.day-button:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: rgba(190, 26, 34, 0.05);
  transform: translateY(-2px);
}
.day-button.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-md);
}
.day-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Header avec actions */
.accordion-header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}
.btn-danger-ghost {
  background: transparent;
  color: var(--color-danger);
  padding: var(--spacing-xs);
}
.btn-danger-ghost:hover {
  background-color: var(--color-danger-light);
}
.badge-pending {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--color-warning-light);
  color: var(--color-warning);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
}
/* État vide récurrence */
.recurrence-empty-state {
  text-align: center;
  padding: var(--spacing-md) 0;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
/* Formulaire récurrence */
.recurrence-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
