/* ============================================================
   ESPACE PROPULSER CODEX - Synoptïa (sandbox)
   Dark-first glass morphism, aligné design system synoptia.fr

   Tokens (couleurs, fonts, radii, spacing, shadows, glows, gradients)
   et base elements (h1/h2/h3 glow, .eyebrow, .grad-text, halos)
   sont définis dans synoptia-tokens.css (à charger AVANT ce fichier).
   Ce fichier contient uniquement les styles spécifiques à l'espace
   élève (layout sidebar, cards, boutons, modules, dashboard, etc.).
   ============================================================ */

/* ----- Theme-specific overrides ----- */
[data-theme="light"] .card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--glass-border-hover);
  background: var(--bg-card);
}
[data-theme="light"] .espace-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--glass-border);
}
[data-theme="light"] .espace-topbar {
  background: rgba(255, 255, 255, .85);
  border-bottom: 1px solid var(--glass-border);
}
[data-theme="light"] .input {
  background: var(--bg);
  border: 2px solid var(--glass-border);
}
[data-theme="light"] .input:focus {
  background: #fff;
  border-color: var(--primary-900);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .12);
}
[data-theme="light"] .btn {
  box-shadow: 0 4px 12px rgba(16, 163, 127, .2), inset 0 1px 0 rgba(255,255,255,.3);
  filter: none;
}
[data-theme="light"] .btn:hover {
  box-shadow: 0 6px 20px rgba(25, 195, 125, .25);
  filter: none;
}
[data-theme="light"] .btn-outline {
  color: var(--text);
  border-color: var(--glass-border);
  box-shadow: none;
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(0, 0, 0, .04);
  border-color: var(--primary-900);
  color: var(--primary-900);
  box-shadow: none;
}
[data-theme="light"] .module-item.locked {
  opacity: .5;
}
[data-theme="light"] .sidebar-progress-bar {
  background: rgba(0, 0, 0, .08);
}
[data-theme="light"] .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
}
[data-theme="light"] .toast {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text);
  box-shadow: var(--shadow-md);
}
[data-theme="light"] .login-page {
  background: linear-gradient(135deg, #ECFDF5 0%, #F6FBF8 50%, #E7F8F1 100%);
}
[data-theme="light"] .login-card {
  background: #fff;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}
[data-theme="light"] .halo { opacity: .15; }
[data-theme="light"] .avatar {
  border-color: var(--glass-border);
}
[data-theme="light"] .resource-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
}
[data-theme="light"] .filter-btn {
  color: var(--muted);
  border-color: var(--glass-border);
}
[data-theme="light"] .filter-btn.active {
  background: var(--primary);
  color: #fff;
}
[data-theme="light"] .module-gate:not(.validated) {
  border-color: #B45309;
}
[data-theme="light"] .module-gate-icon {
  background: rgba(180, 83, 9, .1);
  color: #B45309;
}
[data-theme="light"] .badge-pending {
  background: rgba(180, 83, 9, .1);
  color: #B45309;
}
[data-theme="light"] .module-gate-badge {
  color: #B45309;
}
[data-theme="light"] .admin-module-card.is-gate:not(.validated) {
  border-color: #B45309;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}
.theme-toggle:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
/* Default (dark-first, aligné charte synoptia.fr) */
:root:not([data-theme]) .theme-toggle .icon-sun { display: block; }

/* ----- Global Reset ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text);
}

img, video {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

/* Menus deroulants : la liste est rendue par le systeme (fond blanc sous Windows).
   Sans couleur explicite sur les options, le texte clair du theme sombre devient illisible.
   Defaut signale par un stagiaire le 30/07/2026. */
select option { background-color: var(--bg); color: #E6EDF7; }
[data-theme="light"] select option { background-color: #ffffff; color: #0F172A; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: rgba(16, 163, 127, .4);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .2);
}


/* ============================================================
   LAYOUT - Sidebar + Main
   ============================================================ */

.espace-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ----- Sidebar ----- */
.espace-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--text);
}

.logo-text-sm {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.logo-propulser {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .04em;
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar progress */
.sidebar-progress {
  padding: var(--space-md) var(--space-lg);
  flex-shrink: 0;
}

.sidebar-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.sidebar-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, .08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sidebar-progress-fill {
  height: 100%;
  background: var(--grad-parcours);
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
  min-width: 0;
}

/* Module list */
.module-list {
  flex: 1;
  padding: var(--space-sm) var(--space-sm);
  overflow-y: auto;
}

.module-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: var(--text);
  position: relative;
}

.module-item:hover:not(.locked) {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border);
}

.module-item.current {
  background: rgba(25, 195, 125, .08);
  border-color: rgba(25, 195, 125, .3);
  box-shadow: inset 0 0 20px rgba(25, 195, 125, .06), 0 0 12px rgba(25, 195, 125, .1);
}

.module-item.completed {
  opacity: .85;
}

.module-item.completed:hover {
  opacity: 1;
}

.module-item.locked {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.module-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--glass-border);
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.module-item.current .module-number {
  background: rgba(25, 195, 125, .15);
  border-color: var(--accent);
  color: var(--accent);
}

.module-item.completed .module-number {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
  font-size: .85rem;
}

.module-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.module-title {
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-duration {
  font-size: .65rem;
  color: var(--muted-dim);
}

.module-lock {
  font-size: .75rem;
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  padding: var(--space-sm) var(--space-sm) var(--space-lg);
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(16, 163, 127, .1);
  color: var(--accent);
}


/* ----- Topbar ----- */
.espace-topbar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 56px;
}

.topbar-spacer {
  flex: 1;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.topbar-name {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
}

/* ----- Main Content ----- */
.espace-main {
  grid-column: 2;
  grid-row: 2;
  padding: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}


/* ============================================================
   COMPONENTS
   ============================================================ */

/* ----- Card ----- */
.card {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
}

.card-highlight {
  position: relative;
  border: none;
  background: var(--glass-bg-strong);
}

.card-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--grad-parcours);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-highlight:hover {
  box-shadow: var(--shadow-md), 0 0 30px rgba(16, 163, 127, .12);
}

.card-sm {
  padding: var(--space-lg);
}


/* ----- Inputs ----- */
.input {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: .9375rem;
  outline: none;
  transition: all var(--transition-fast);
}

.input::placeholder {
  color: var(--muted-dim);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(25, 195, 125, .15), var(--shadow-glow-cyan);
  background: var(--glass-bg-hover);
}

textarea.input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}


/* ----- Buttons (identiques au site - pill, pas de dégradé) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: .9rem 1.1rem;
  min-height: 44px;
  min-width: 44px;
  background: var(--primary);
  color: #061A14;
  font-weight: 800;
  font-size: inherit;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.3);
  cursor: pointer;
  line-height: 1;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(8,122,96,.42), 0 0 30px rgba(16,163,127,.28), inset 0 2px 0 rgba(255,255,255,.3), inset 0 -2px 4px rgba(0,0,0,.22);
  filter: drop-shadow(0 4px 16px rgba(16,163,127,.3));
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25,195,125,.42) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
  opacity: 0.3;
  border-radius: 999px;
}

.btn:hover {
  transform: translateY(-3px) scale(1.04);
  background: var(--accent);
  box-shadow: 0 12px 35px rgba(8,122,96,.4), 0 0 35px rgba(25,195,125,.28), inset 0 3px 0 rgba(255,255,255,.5), inset 0 -3px 6px rgba(0,0,0,.2);
  border-color: rgba(25,195,125,.72);
  filter: drop-shadow(0 6px 18px rgba(16,163,127,.38));
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: translateY(-2px) scale(1.03);
  background: var(--codex-green);
  transition: transform 0.08s ease;
  filter: brightness(.95) drop-shadow(0 2px 8px rgba(16,163,127,.5));
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

.btn-outline {
  background: transparent;
  backdrop-filter: blur(6px);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: none;
  font-size: 0.9em;
  font-weight: 600;
  filter: none;
}

.btn-outline::before, .btn-outline::after {
  display: none;
}

.btn-outline:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.25);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-1px);
  filter: none;
}

.btn-sm {
  padding: .5rem 1rem;
  font-size: .8125rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  border: none;
  box-shadow: none;
  filter: none;
  transition: all var(--transition-fast);
}

.btn-icon::before, .btn-icon::after {
  display: none;
}

.btn-icon:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  transform: none;
  box-shadow: none;
  filter: none;
}

.btn-success {
  background: var(--green);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 12px 35px rgba(16,185,129,.35), 0 0 20px rgba(16,185,129,.3);
}

.btn-rainbow {
  background: var(--codex-green);
  background-image: none;
  color: #061A14;
  text-shadow: none;
  transition: background-color 250ms var(--ease-out), transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.btn-rainbow:hover {
  background: var(--codex-green-bright);
  background-image: none;
  box-shadow: 0 12px 35px rgba(16,163,127,.35), 0 0 24px rgba(25,195,125,.3);
}


/* ----- Avatar ----- */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-card), var(--bg-card)), var(--grad-parcours);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1rem;
}


/* ----- Badge ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-locked {
  background: rgba(255, 255, 255, .06);
  color: var(--muted-dim);
}

.badge-new {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-completed {
  background: var(--green-dim);
  color: var(--green);
}

.badge-skill {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-commande {
  background: rgba(16, 163, 127, .15);
  color: var(--primary-hover);
}

.badge-template {
  background: var(--magenta-dim);
  color: var(--magenta);
}

.badge-guide {
  background: var(--green-dim);
  color: var(--green);
}

.badge-date {
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .02em;
}

.resource-badges {
  display: inline-flex;
  gap: .375rem;
  align-items: center;
  flex-wrap: wrap;
}


/* ----- Video Container ----- */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video loading state */
.video-container.video-loading {
  background: linear-gradient(135deg, rgba(25, 195, 125, .04), rgba(16, 163, 127, .06), rgba(225, 29, 141, .04));
}

.video-container.video-loading video,
.video-container.video-loading .plyr {
  opacity: 0;
}

.video-container:not(.video-loading) video,
.video-container:not(.video-loading) .plyr {
  opacity: 1;
  transition: opacity .4s ease;
}

.video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  z-index: 2;
}

.video-loader p {
  font-size: .875rem;
  color: var(--muted);
}

.video-loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.placeholder-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(25, 195, 125, .04), rgba(16, 163, 127, .06), rgba(225, 29, 141, .04));
  border: 1px dashed rgba(255, 255, 255, .15);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: var(--space-xl);
}

.placeholder-icon {
  font-size: 3rem;
  opacity: .6;
  animation: pulse 3s ease-in-out infinite;
}

.placeholder-video h3 {
  font-size: 1.125rem;
  color: var(--muted);
}

.placeholder-video p {
  font-size: .875rem;
  color: var(--muted-dim);
}


/* ----- Tab System ----- */
.tab-system {
  margin-top: var(--space-xl);
}

.tab-header {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
}

.tab-btn {
  padding: var(--space-md) var(--space-lg);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted-dim);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
  animation: fadeIn .35s var(--ease-out);
}

.tab-content.active {
  display: block;
}


/* ----- Progress Ring ----- */
.progress-ring-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.progress-ring {
  filter: drop-shadow(0 0 8px rgba(25, 195, 125, .2));
}

.progress-ring-bg {
  stroke: rgba(255, 255, 255, .08);
  opacity: .6;
}

.progress-ring-text {
  fill: var(--text);
}

[data-theme="light"] .progress-ring-bg {
  stroke: rgba(0, 0, 0, .1);
  opacity: 1;
}


/* ----- Stats Grid ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad-parcours);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: var(--space-xs);
}


/* ----- Resource Cards ----- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.resource-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition-normal);
}

.resource-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.resource-title {
  font-size: 1rem;
  font-weight: 700;
}

.resource-desc {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-card {
  width: 90%;
  max-width: 400px;
  padding: 2rem;
}

.resource-module {
  font-size: .75rem;
  color: var(--cyan);
  font-weight: 600;
  margin-top: .25rem;
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
}


/* ----- Filter Bar ----- */
.filter-bar {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  padding: .5rem 1.125rem;
  border-radius: var(--radius-full);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  border-color: var(--glass-border-hover);
}

.filter-btn.active {
  background: rgba(25, 195, 125, .1);
  border-color: var(--accent);
  color: var(--accent);
}


/* ----- Checklist ----- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.checklist-item:hover {
  background: var(--glass-bg-hover);
}

.checklist-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--glass-border-hover);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
}

.checklist-item input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}

.checklist-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist-item.completed .checklist-label {
  text-decoration: line-through;
  color: var(--muted-dim);
}

.checklist-label {
  font-size: .875rem;
  flex: 1;
  transition: all var(--transition-fast);
}


/* ----- Toast Notifications ----- */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: .875rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  z-index: 10000;
  transform: translateX(120%);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, .92), rgba(5, 150, 105, .92));
  color: #fff;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.toast-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, .92), rgba(220, 38, 38, .92));
  color: #fff;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.toast-info {
  background: linear-gradient(135deg, rgba(16, 163, 127, .92), rgba(25, 195, 125, .72));
  color: #fff;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}


/* ----- Hamburger ----- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.hamburger:hover {
  background: var(--glass-bg-hover);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all var(--transition-normal);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
  opacity: 1;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(.97); }
}

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -15px) scale(1.04); }
}

@keyframes floatReverse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-15px, 15px) scale(1.03); }
  66% { transform: translate(20px, -10px) scale(.98); }
}

.fade-in {
  animation: fadeIn .5s var(--ease-out);
}

.slide-up {
  animation: slideUp .6s var(--ease-out);
}

.stagger-1 { animation-delay: .05s; }
.stagger-2 { animation-delay: .1s; }
.stagger-3 { animation-delay: .15s; }
.stagger-4 { animation-delay: .2s; }
.stagger-5 { animation-delay: .25s; }


/* ============================================================
   PAGE SPECIFIC - LOGIN
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.login-halos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
}

.halo-cyan {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -15%;
  right: -5%;
  animation: float 12s ease-in-out infinite;
}

.halo-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  bottom: -20%;
  left: -10%;
  animation: floatSlow 16s ease-in-out infinite;
  animation-delay: -4s;
}

.halo-magenta {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--magenta), transparent 70%);
  top: 40%;
  left: 50%;
  animation: floatReverse 14s ease-in-out infinite;
  animation-delay: -8s;
}

/* Halos en fond pour les pages applicatives (dashboard, module, admin, etc.)
   Même convention que .login-halos mais utilisable avec le layout espace-*. */
.app-halos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.espace-layout { position: relative; z-index: 1; }

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: var(--space-xl);
}

.login-card {
  max-width: 420px;
  width: 100%;
  padding: var(--space-2xl);
  text-align: center;
  animation: slideUp .7s var(--ease-out);
}

.login-logo {
  margin-bottom: var(--space-md);
}

.login-logo .logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
}

.login-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--grad-parcours);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
  letter-spacing: .02em;
}

.login-subtitle {
  color: var(--muted);
  font-size: .9375rem;
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--space-xs);
}

.error-message {
  color: var(--red);
  font-size: .8125rem;
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--red-dim);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, .2);
}

.login-card .btn-full {
  margin-top: var(--space-lg);
  padding: .875rem;
  font-size: 1rem;
}


/* ============================================================
   PAGE SPECIFIC - DASHBOARD
   ============================================================ */

.dashboard-hero {
  margin-bottom: var(--space-xl);
  animation: fadeIn .5s var(--ease-out);
}

.dashboard-greeting {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.dashboard-date {
  color: var(--muted);
  font-size: .9375rem;
}

.dashboard-progress-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  animation: slideUp .6s var(--ease-out);
}

.dashboard-progress-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.next-module-card {
  margin-bottom: var(--space-2xl);
  animation: slideUp .7s var(--ease-out);
}

.next-module-card .card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  cursor: pointer;
}

.next-module-card .card:hover {
  transform: translateY(-2px);
}

.next-module-info {
  flex: 1;
}

.next-module-badge {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.next-module-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.next-module-duration {
  font-size: .8125rem;
  color: var(--muted-dim);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.quick-access {
  margin-top: var(--space-xl);
  animation: slideUp .8s var(--ease-out);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.quick-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.quick-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.quick-card-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.quick-card-label {
  font-size: .875rem;
  font-weight: 600;
}

.quick-card-desc {
  font-size: .75rem;
  color: var(--muted-dim);
}


/* ============================================================
   PAGE SPECIFIC - MODULE
   ============================================================ */

.module-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  animation: fadeIn .5s var(--ease-out);
}

.module-header-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--glass-bg-hover);
  border: 2px solid var(--accent);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: var(--shadow-glow-cyan);
}

.module-header-info h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.module-header-subtitle {
  font-size: .875rem;
  color: var(--muted);
}

.module-video-section {
  margin-bottom: var(--space-xl);
  animation: slideUp .6s var(--ease-out);
}

/* -- Module Description: Premium glass morphism rich content -- */
.module-description {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
  max-width: 720px;
}

/* --- Paragraphs --- */
.module-description p {
  margin-bottom: var(--space-lg);
  color: var(--muted);
  max-width: 65ch;
}

.module-description p:last-child {
  margin-bottom: 0;
}

.module-description strong {
  color: var(--text);
  font-weight: 650;
}

/* --- Section cards (heading + body grouped) --- */
.module-description .md-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.module-description .md-section:first-child {
  margin-top: var(--space-md);
}

.module-description .md-section:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-sm);
}

/* --- Section headings --- */
.module-description .md-heading {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-md) 0;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-dim);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.module-description .md-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.125em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Standalone headings (not inside a card) */
.module-description > .md-heading {
  font-size: 1.25rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  border-bottom: none;
  padding-bottom: 0;
}

.module-description > .md-heading:first-child {
  margin-top: var(--space-md);
}

/* --- Lists (custom bullets) --- */
.module-description .md-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 var(--space-lg) 0;
}

.module-description .md-list li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: .625rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 62ch;
}

.module-description .md-list li::before {
  content: '';
  position: absolute;
  left: .25em;
  top: .6em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .8;
  transform: rotate(45deg);
}

.module-description .md-list li strong {
  color: var(--text);
}

/* Ordered list variant */
.module-description .md-list-ordered {
  counter-reset: md-ol;
}

.module-description .md-list-ordered li {
  counter-increment: md-ol;
  padding-left: 2.25em;
}

.module-description .md-list-ordered li::before {
  content: counter(md-ol);
  width: 1.5em;
  height: 1.5em;
  background: var(--accent-dim);
  border-radius: 50%;
  transform: none;
  opacity: 1;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  top: .3rem;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Acte / Phase cards --- */
.module-description .md-acte-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.module-description .md-acte-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: relative;
  overflow: hidden;
}

.module-description .md-acte-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-parcours);
  opacity: .6;
  transition: opacity var(--transition-normal);
}

.module-description .md-acte-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.module-description .md-acte-card:hover::before {
  opacity: 1;
}

.module-description .md-acte-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--glass-border);
}

.module-description .md-acte-label {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .2em .6em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

.module-description .md-acte-title {
  display: block;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-top: var(--space-xs);
}

.module-description .md-acte-body {
  font-size: .9375rem;
  color: var(--muted);
  line-height: 1.7;
}

.module-description .md-acte-body p {
  margin-bottom: var(--space-sm);
}

.module-description .md-acte-body .md-list {
  margin: var(--space-xs) 0 var(--space-sm) 0;
}

.module-description .md-acte-body .md-list li {
  font-size: .875rem;
  margin-bottom: var(--space-xs);
}

/* --- Bloc headings (sub-sections with duration) --- */
.module-description .md-bloc {
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: 2px solid rgba(25, 195, 125, .25);
}

.module-description .md-bloc-heading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.module-description .md-bloc-name {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
}

.module-description .md-bloc-duration {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .15em .5em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* --- Highlight quotes --- */
.module-description .md-highlight {
  position: relative;
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--magenta);
  border-radius: var(--radius-sm);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.module-description .md-highlight::before {
  content: '\201C';
  position: absolute;
  top: -.15em;
  left: .3em;
  font-size: 2.5rem;
  color: var(--magenta);
  opacity: .35;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
}

.module-description .md-note {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--glass-bg);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-style: normal;
  color: var(--muted);
  line-height: 1.6;
}

/* --- Code blocks (terminal commands) --- */
.module-description .md-code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .8125rem;
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* --- Inline code --- */
.module-description .md-inline-code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .85em;
  background: var(--accent-dim);
  color: var(--accent);
  padding: .15em .4em;
  border-radius: 4px;
  border: 1px solid rgba(25, 195, 125, .12);
}

/* ========== Light theme overrides for module description ========== */
[data-theme="light"] .module-description .md-section {
  background: rgba(0, 0, 0, .02);
  border-color: var(--glass-border);
}

[data-theme="light"] .module-description .md-section:hover {
  background: rgba(0, 0, 0, .03);
}

.md-code-text { flex: 1; min-width: 0; user-select: all; }

.md-code-copy {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all .2s;
  opacity: .5;
}

.md-code:hover .md-code-copy { opacity: 1; }
.md-code-copy:hover { background: rgba(255,255,255,.1); color: var(--cyan); }
.md-code-copy.copied { color: var(--green); opacity: 1; }

.md-inline-code { cursor: pointer; user-select: all; transition: background .2s; }
.md-inline-code:hover { background: rgba(25, 195, 125, .15); }
.md-inline-code.copied { background: rgba(39, 174, 96, .2); }

[data-theme="light"] .module-description .md-code {
  background: #F0F3F7;
  border-color: rgba(0, 0, 0, .08);
  color: var(--primary-900);
}

[data-theme="light"] .module-description .md-inline-code {
  background: rgba(16, 163, 127, .08);
  color: var(--primary-900);
  border-color: rgba(16, 163, 127, .1);
}

[data-theme="light"] .module-description .md-heading::before {
  background: var(--primary);
}

[data-theme="light"] .module-description .md-list li::before {
  background: var(--primary);
}

[data-theme="light"] .module-description .md-list-ordered li::before {
  color: var(--primary-900);
  background: rgba(16, 163, 127, .08);
}

[data-theme="light"] .module-description .md-heading {
  border-bottom-color: rgba(16, 163, 127, .15);
}

[data-theme="light"] .module-description .md-acte-card {
  background: rgba(0, 0, 0, .02);
  border-color: var(--glass-border);
}

[data-theme="light"] .module-description .md-acte-card:hover {
  background: rgba(0, 0, 0, .03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

[data-theme="light"] .module-description .md-acte-label {
  color: var(--primary-900);
  background: rgba(16, 163, 127, .08);
}

[data-theme="light"] .module-description .md-bloc {
  border-left-color: rgba(16, 163, 127, .25);
}

[data-theme="light"] .module-description .md-bloc-duration {
  color: var(--primary-900);
  background: rgba(16, 163, 127, .08);
}

[data-theme="light"] .module-description .md-highlight {
  background: rgba(225, 29, 141, .03);
  border-color: var(--glass-border);
  border-left-color: var(--magenta);
}

[data-theme="light"] .module-description .md-highlight::before {
  color: var(--magenta);
}

/* --- Responsive: stack acte cards on small screens --- */
@media (max-width: 600px) {
  .module-description .md-acte-group {
    grid-template-columns: 1fr;
  }

  .module-description .md-acte-card {
    padding: var(--space-md);
  }

  .module-description .md-highlight {
    padding: var(--space-md);
    font-size: 1rem;
  }
}

.module-notes {
  padding: var(--space-md) 0;
}

.module-notes textarea {
  width: 100%;
}

.module-notes-hint {
  font-size: .75rem;
  color: var(--muted-dim);
  margin-top: var(--space-xs);
}

.module-actions {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  animation: slideUp .8s var(--ease-out);
}

.module-complete-section {
  text-align: center;
  padding: var(--space-xl);
}

.module-complete-section.completed {
  opacity: .7;
}

.module-complete-section .badge {
  font-size: .875rem;
  padding: .5rem 1rem;
}

.module-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--glass-border);
}

.module-nav .btn {
  min-width: 140px;
}

.module-checklist {
  margin-top: var(--space-xl);
}

.module-checklist h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
}


/* ============================================================
   PAGE SPECIFIC - RESOURCES
   ============================================================ */

.resources-header {
  margin-bottom: var(--space-xl);
  animation: fadeIn .5s var(--ease-out);
}

.resources-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.resources-header p {
  color: var(--muted);
  font-size: .9375rem;
}

.resources-count {
  font-size: .8125rem;
  color: var(--muted-dim);
  margin-bottom: var(--space-md);
}

.resource-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--muted-dim);
}

.resource-empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: .5;
}

.resource-empty p {
  font-size: .9375rem;
}


/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: .8125rem; }
.text-xs { font-size: .6875rem; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Rainbow text utility */
.text-rainbow {
  background: var(--grad-parcours);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient border utility */
.border-rainbow {
  position: relative;
  border: none;
}

.border-rainbow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-parcours);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Loading shimmer */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, .03) 0%,
    rgba(255, 255, 255, .08) 50%,
    rgba(255, 255, 255, .03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}


/* ============================================================
   RESPONSIVE - Mobile (max-width: 900px)
   ============================================================ */

@media (max-width: 900px) {
  .espace-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .espace-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .espace-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .espace-topbar {
    grid-column: 1;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
  }

  .espace-main {
    grid-column: 1;
    padding: var(--space-lg);
    min-width: 0;
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .dashboard-greeting {
    font-size: 1.375rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .module-header {
    flex-direction: column;
    text-align: center;
  }

  .module-nav {
    flex-direction: column;
  }

  .module-nav .btn {
    min-width: 0;
    width: 100%;
  }

  .login-card {
    padding: var(--space-xl);
  }

  .login-title {
    font-size: 2rem;
  }

  .halo-cyan {
    width: 300px;
    height: 300px;
  }

  .halo-blue {
    width: 350px;
    height: 350px;
  }

  .halo-magenta {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 600px) {
  .espace-topbar {
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
  }

  .topbar-name {
    display: none;
  }

  .topbar-user {
    gap: var(--space-xs);
  }

  .tab-header {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: visible;
  }

  .tab-btn {
    min-width: 0;
    padding: .75rem .2rem;
    font-size: .6875rem;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
  }

  .filter-btn {
    flex-shrink: 0;
  }
}


/* ============================================================
   MODULE GATE (live session validation)
   ============================================================ */

.module-gate {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--glass-bg-strong);
  border: 2px dashed var(--yellow);
  margin-top: var(--space-xl);
  transition: all var(--transition-normal);
}

.module-gate.validated {
  border-color: var(--green);
  border-style: solid;
  background: var(--green-dim);
}

.module-gate-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, .12);
  color: var(--yellow);
}

.module-gate.validated .module-gate-icon {
  background: var(--green-dim);
  color: var(--green);
}

.module-gate-info {
  flex: 1;
}

.module-gate-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .25rem;
}

.module-gate-desc {
  font-size: .875rem;
  color: var(--muted);
}

.module-gate-status {
  flex-shrink: 0;
}

/* Booking CTA (before live sessions) */
.module-booking {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(25, 195, 125, .08), rgba(225, 29, 141, .08));
  border: 2px solid var(--cyan);
  margin-top: var(--space-xl);
}

.module-booking-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 195, 125, .15);
  color: var(--cyan);
}

.module-booking-info {
  flex: 1;
}

.module-booking-info h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 .25rem;
}

.module-booking-info p {
  font-size: .875rem;
  color: var(--muted);
  margin: 0;
}

.module-booking.booked {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(39, 174, 96, .08), rgba(16, 185, 129, .08));
}

.module-booking.booked .module-booking-icon {
  background: rgba(39, 174, 96, .15);
  color: var(--green);
}

@media (max-width: 640px) {
  .module-booking {
    flex-direction: column;
    text-align: center;
  }
}

.badge-pending {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  background: rgba(251, 191, 36, .12);
  color: var(--yellow);
  white-space: nowrap;
}

/* Sidebar gate badge */
.module-gate-badge {
  display: block;
  font-size: .625rem;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: .02em;
  margin-top: 2px;
}
/* Variante émargement : action attendue du stagiaire (magenta), distincte de l'attente de validation (jaune).
   Teintes choisies pour le contraste AA : claire sur fond sombre, foncée sur fond clair. */
.module-gate-badge--attendance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #F472B6;
}
[data-theme="light"] .module-gate-badge--attendance {
  color: #BE185D;
}

/* Admin sidebar link */
.sidebar-link-admin {
  border-top: 1px solid var(--glass-border);
  padding-top: var(--space-sm);
  margin-top: var(--space-xs);
  color: var(--magenta);
}
.sidebar-link-admin:hover {
  color: var(--magenta);
  background: var(--magenta-dim);
}

/* ============================================================
   ADMIN PAGE
   ============================================================ */

.admin-header {
  margin-bottom: var(--space-xl);
}

.admin-header h1 {
  font-size: 1.75rem;
  margin-bottom: .25rem;
}

.admin-header p {
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: var(--space-sm);
}

.admin-tab {
  padding: .5rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: .875rem;
}

.admin-tab.active {
  background: var(--magenta);
  color: #fff;
}

.admin-tab:hover:not(.active) {
  background: var(--glass-bg-hover);
  color: var(--text);
}

/* User cards */
.admin-user-grid {
  display: grid;
  gap: var(--space-md);
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-user-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
}

.admin-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--magenta-dim);
  color: var(--magenta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.admin-user-info {
  flex: 1;
  min-width: 0;
}

.admin-user-name {
  font-weight: 700;
  font-size: 1rem;
}

.admin-user-email {
  font-size: .8125rem;
  color: var(--muted);
}

.admin-user-progress {
  flex-shrink: 0;
  text-align: right;
}

.admin-user-percent {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.admin-user-modules {
  font-size: .75rem;
  color: var(--muted);
}

/* User detail view */
.admin-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.admin-back-btn {
  flex-shrink: 0;
}

.admin-detail-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-detail-sub {
  font-size: .8125rem;
  color: var(--muted);
}

.admin-module-list {
  display: grid;
  gap: var(--space-md);
}

.admin-module-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}

.admin-module-card.is-gate {
  border-color: var(--yellow);
  border-width: 2px;
}

.admin-module-card.is-gate.validated {
  border-color: var(--green);
}

.admin-module-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  flex-shrink: 0;
}

.admin-module-card.validated .admin-module-number {
  background: var(--green-dim);
  color: var(--green);
}

.admin-module-info {
  flex: 1;
  min-width: 0;
}

.admin-module-title {
  font-weight: 600;
}

.admin-module-meta {
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: 2px;
}

.admin-module-actions {
  flex-shrink: 0;
}

.btn-validate {
  background: var(--green);
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .8125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-validate:hover {
  filter: brightness(1.1);
}

.btn-invalidate {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  padding: .5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .8125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-invalidate:hover {
  background: var(--red-dim);
}

/* ============================================================
   PLYR OVERRIDES (when loaded)
   ============================================================ */

.plyr--video {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.plyr--full-ui input[type=range] {
  color: var(--accent);
}

.plyr__control--overlaid {
  background: rgba(16, 163, 127, .8);
}

.plyr__control--overlaid:hover {
  background: var(--primary);
}

.plyr__controls {
  background: linear-gradient(transparent, rgba(11, 18, 38, .85)) !important;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

/* Focus visible - all interactive elements */
.btn:focus-visible,
.tab-btn:focus-visible,
.module-item:focus-visible,
.quick-card:focus-visible,
.filter-btn:focus-visible,
.sidebar-link:focus-visible,
.checklist-item:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Skip link (hidden until focused) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: .5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .2s;
}

.skip-link:focus {
  top: 1rem;
}

/* Loading state */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--muted);
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .progress-ring-fill {
    transition: none !important;
  }
}

/* ============================================================
   Desktop Note (encart passerelle Claude Desktop)
   Ajouté 2026-04-22 - feature encarts Desktop sandbox
   ============================================================ */
.desktop-note {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: rgba(25, 195, 125, 0.06);
  border: 1px solid rgba(25, 195, 125, 0.25);
  border-left: 4px solid var(--accent-cyan, #19C37D);
  border-radius: var(--radius-md);
  transition: opacity 0.2s;
}

.desktop-note.is-read {
  opacity: 0.78;
}

.desktop-note-header {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.desktop-note-icon {
  color: var(--accent-cyan, #19C37D);
  flex-shrink: 0;
  padding-top: 2px;
}

.desktop-note-title {
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--text);
  font-weight: 600;
}

.desktop-note-summary {
  margin: 0;
  color: var(--muted, #A9B8D8);
  font-size: 0.95rem;
  line-height: 1.5;
}

.desktop-note-body p {
  margin: 0 0 var(--space-sm);
  line-height: 1.6;
}

.desktop-note-reco {
  color: var(--text);
}

.desktop-note-linux {
  padding: var(--space-sm) var(--space-md);
  background: rgba(225, 29, 141, 0.06);
  border-left: 3px solid var(--accent-magenta, #E11D8D);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--muted, #A9B8D8);
}

.desktop-note-linux strong {
  color: var(--accent-magenta, #E11D8D);
}

.desktop-note-captures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.desktop-note-captures figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(11, 18, 38, 0.4);
  border: 1px solid rgba(169, 184, 216, 0.15);
}

.desktop-note-captures img {
  display: block;
  width: 100%;
  height: auto;
}

.desktop-note-captures figcaption {
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--muted, #A9B8D8);
}

.desktop-note-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px dashed rgba(169, 184, 216, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.desktop-note-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.82rem;
  color: var(--muted, #A9B8D8);
  flex-wrap: wrap;
}

.desktop-note-meta-item {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.desktop-note-checkpoint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.desktop-note-checkpoint input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-cyan, #19C37D);
  cursor: pointer;
}

@media (max-width: 640px) {
  .desktop-note-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   Émargement électronique (Qualiopi Ind. 8 + 11)
   Ajouté 2026-04-22 - feature attendance sandbox
   ============================================================ */
.attendance-section {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: rgba(16, 163, 127, 0.06);
  border: 1px solid rgba(16, 163, 127, 0.3);
  border-radius: var(--radius-md);
}

.attendance-header h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--text);
}

.attendance-sub {
  margin: 0 0 var(--space-md);
  color: var(--muted, #A9B8D8);
  font-size: 0.9rem;
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.attendance-step {
  padding: var(--space-md);
  background: rgba(11, 18, 38, 0.5);
  border: 1px solid rgba(169, 184, 216, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attendance-step-label {
  font-size: 0.82rem;
  color: var(--muted, #A9B8D8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attendance-step-value {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  min-height: 1.4em;
}

.attendance-step-value.attendance-ok {
  color: var(--accent-cyan, #19C37D);
}

.attendance-step-hint {
  font-size: 0.82rem;
  color: var(--muted, #A9B8D8);
  font-style: italic;
}

.attendance-step .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Table émargement admin */
.attendance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
  background: rgba(11, 18, 38, 0.5);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.attendance-table th,
.attendance-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(169, 184, 216, 0.15);
  font-size: 0.92rem;
}

.attendance-table th {
  background: rgba(16, 163, 127, 0.08);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.attendance-table tbody tr:hover {
  background: rgba(16, 163, 127, 0.04);
}

.attendance-validated {
  color: var(--accent-cyan, #19C37D);
  font-size: 0.85rem;
}

.attendance-pending {
  color: var(--muted, #A9B8D8);
  font-style: italic;
  font-size: 0.85rem;
}

.admin-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .attendance-table { font-size: 0.82rem; }
  .attendance-table th, .attendance-table td { padding: 6px 8px; }
}

/* ============================================
   Logo PROPULSER CODEX (image) - ajouté 2026-05-21
   Login page H1 + Sidebar
   ============================================ */
.propulser-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.codex-wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 1.8em;
  margin-left: .55rem;
  padding: .25rem .55rem;
  border: 1px solid rgba(16, 163, 127, .72);
  border-radius: 999px;
  color: var(--codex-green-bright);
  background: rgba(16, 163, 127, .1);
  font: 800 .55em/1 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: .14em;
}
[data-theme="light"] .codex-wordmark { color: var(--codex-green-deep); }
.propulser-logo-img {
  display: block;
  max-width: 100%;
  height: auto;
}
.propulser-logo--login .propulser-logo-img {
  max-width: 320px;
  margin: 0 auto;
}
.propulser-logo--sidebar .propulser-logo-img {
  max-width: 130px;
}
@media (max-width: 480px) {
  .propulser-logo--login .propulser-logo-img { max-width: 260px; }
}

/* ============================================
   PERFORMANCE MOBILE (≤ 900px)
   Désactive backdrop-filter (GPU mobile faible) + animations infinies.
   Gain immédiat sur le temps d'affichage et la fluidité scroll.
   ============================================ */
@media (max-width: 900px) {
  /* Pas de blur GPU sur mobile */
  .app-halos,
  .halo,
  .halo-cyan,
  .halo-blue,
  .halo-magenta,
  .espace-sidebar,
  .espace-topbar,
  .espace-main,
  .glass,
  .card,
  .module-item,
  .next-module-card,
  .stat-card,
  .quick-card,
  [class*="glass-"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Halos en arrière-plan : statiques sur mobile */
  .halo,
  .halo-cyan,
  .halo-blue,
  .halo-magenta {
    animation: none !important;
    opacity: 0.4 !important;
  }
  /* Pulse / scroll-reveal : transitions courtes */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  /* Mais on garde transition pour les interactions critiques */
  .btn, .btn-primary, button {
    transition: background 0.15s, border-color 0.15s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Bouton retour « Mon espace » (hub) dans le topbar — cohérent avec Bibliothèque et Parrainage */
.espace-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #B6C7DA);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--glass-medium-bg, rgba(255, 255, 255, 0.04));
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
  white-space: nowrap;
}
.espace-back-pill:hover,
.espace-back-pill:focus {
  color: var(--text, #E6EDF7);
  border-color: var(--accent-500, #19C37D);
  transform: translateX(-2px);
  outline: none;
}
[data-theme="light"] .espace-back-pill {
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}
[data-theme="light"] .espace-back-pill:hover,
[data-theme="light"] .espace-back-pill:focus {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.90);
  border-color: #087A60;
}
/* Sur très petit écran, on garde la flèche, on masque le label pour gagner de la place */
@media (max-width: 560px) {
  .espace-back-pill__label { display: none; }
}
/* Quiz intégré à chaque module PROPULSER CODEX */
.module-quiz { display: grid; gap: var(--space-lg); }
.quiz-question { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); }
.quiz-question legend { padding: 0 .35rem; font-weight: 700; color: var(--text); }
.quiz-choice { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem; margin-top: .35rem; border-radius: var(--radius-sm); cursor: pointer; }
.quiz-choice input[type="radio"] { width: 18px; height: 18px; min-width: 0; min-height: 0; flex: 0 0 18px; margin: .25rem 0 0; padding: 0; accent-color: var(--primary); }
.quiz-choice:hover { background: rgba(25, 195, 125, .06); }
.quiz-feedback { min-height: 1.4rem; margin: .6rem 0 0; font-size: .9rem; }
.quiz-feedback.correct { color: #34D399; }
.quiz-feedback.incorrect { color: #F472B6; }
