:root {
  --primary-accent: #4f46e5;
  --primary-accent-rgb: 79, 70, 229;
  --notice-bg: #e0e7ff;
  --notice-text: #3730a3;
  --notice-border: #818cf8;
  --notice-icon: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(var(--primary-accent-rgb), 0.08);
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  --text-on-accent: #ffffff;
  --text-link: var(--primary-accent);
  --border-highlight: var(--primary-accent);
  --bg-body: #f8f9fa;
  --bg-content: #ffffff;
  --bg-alt: #f3f4f6;
  --bg-element: #e5e7eb;
  --bg-content-rgb: 255, 255, 255;
  --text-headings: #111827;
  --text-primary: #374151;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-strong: #d1d5db;
  --success-color: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
  --success-border: rgba(5, 150, 105, 0.3);
  --warning-color: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --warning-border: rgba(217, 119, 6, 0.3);
  --danger-color: #dc2626;
  --danger-hover: #b91c1c;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --danger-border: rgba(220, 38, 38, 0.3);
  --info-color: #2563eb;
  --info-bg: rgba(37, 99, 235, 0.1);
  --info-border: rgba(37, 99, 235, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 2px 4px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 4px 14px rgba(var(--primary-accent-rgb), 0.2);
  --header-height: 65px;
  --sidebar-width: 260px;
  --font-primary: "Inter", sans-serif;
  --font-headings: "Poppins", sans-serif;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --transition-default: 0.25s ease-in-out;
  --transition-fast: 0.15s ease-in-out;
  --prism-bg: #f9fafb;
  --prism-text: #374151;
  --prism-comment: #6b7280;
  --prism-punctuation: #9ca3af;
  --prism-property: #dc2626;
  --prism-keyword: var(--primary-accent);
  --prism-string: #059669;
  --prism-function: #d97706;
  --prism-boolean: #dc2626;
  --prism-number: #059669;
  --prism-operator: #9ca3af;
  --prism-variable: #4338ca;
  --prism-class-name: #d97706;
  --cert-border-gold: #d97706;
  --cert-border-light-gold: rgba(217, 119, 6, 0.3);
  --cert-title-gold: #b45309;
  --cert-download-bg: linear-gradient(135deg, #d97706, #b45309);
  --cert-text-color: #374151;
  --cert-line-color: #d1d5db;
  --cert-bg: #ffffff;
  --modal-image-bg: rgba(17, 24, 39, 0.9);
  --modal-image-caption: #d1d5db;
  --modal-image-close: #f9fafb;
  --modal-image-close-hover: #e5e7eb;
}
[data-theme="dark"] {
  --primary-accent: #818cf8;
  --primary-accent-rgb: 129, 140, 248;
  --notice-bg: #7f1d1d;
  --notice-text: #fecaca;
  --notice-border: #ef4444;
  --notice-icon: #f87171;
  --primary-hover: #6366f1;
  --primary-light: rgba(var(--primary-accent-rgb), 0.1);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --text-on-accent: #ffffff;
  --bg-body: #111827;
  --bg-content: #1f2937;
  --bg-alt: #374151;
  --bg-element: #374151;
  --bg-content-rgb: 31, 41, 55;
  --text-headings: #f9fafb;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #374151;
  --border-strong: #4b5563;
  --success-color: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --success-border: rgba(52, 211, 153, 0.3);
  --warning-color: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --warning-border: rgba(251, 191, 36, 0.3);
  --danger-color: #f87171;
  --danger-hover: #ef4444;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --danger-border: rgba(248, 113, 113, 0.3);
  --info-color: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.1);
  --info-border: rgba(96, 165, 250, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4),
    0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 4px 14px rgba(var(--primary-accent-rgb), 0.2);
  --prism-bg: #1f2937;
  --prism-text: #e5e7eb;
  --prism-comment: #6b7280;
  --prism-punctuation: #9ca3af;
  --prism-property: #f87171;
  --prism-keyword: #818cf8;
  --prism-string: #34d399;
  --prism-function: #fbbf24;
  --prism-boolean: #f87171;
  --prism-number: #34d399;
  --prism-operator: #9ca3af;
  --prism-variable: #60a5fa;
  --prism-class-name: #fbbf24;
  --cert-border-gold: #fbbf24;
  --cert-border-light-gold: rgba(251, 191, 36, 0.3);
  --cert-title-gold: #fcd34d;
  --cert-download-bg: linear-gradient(135deg, #fbbf24, #d97706);
  --cert-text-color: #e5e7eb;
  --cert-line-color: #6b7280;
  --cert-bg: #1f2937;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}
body {
  display: flex;
  padding-top: var(--header-height);
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-body);
  transition: background-color var(--transition-default),
    color var(--transition-default);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

/* Banderole d'avertissement technique */
.technical-notice-banner {
  position: relative;
  width: 100%;
  z-index: 10;
  background: linear-gradient(135deg, var(--notice-bg) 0%, rgba(var(--primary-accent-rgb), 0.08) 100%);
  border-bottom: 1px solid var(--notice-border);
  padding: 12px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  border-radius: var(--border-radius-md);
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.technical-notice-banner .container,
.technical-notice-banner .banner-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.technical-notice-banner .notice-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--notice-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.technical-notice-banner .notice-content i {
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--notice-icon);
}

.technical-notice-banner .notice-content strong {
  font-weight: 700;
  color: var(--notice-text);
}

/* Ajuster le positionnement de la sidebar et du contenu principal */
.sidebar {
  margin-top: 0;
}

.main-content {
  margin-top: 48px;
}

@media (max-width: 768px) {
  .technical-notice-banner {
    padding: 10px 0;
    position: relative;
    top: 0;
    left: 0;
  }
  
  .technical-notice-banner .notice-content {
    font-size: 0.8rem;
    gap: 8px;
  }
  
  .technical-notice-banner .notice-content i {
    font-size: 1rem;
  }
  
  .sidebar,
  .main-content {
    margin-top: 0;
  }
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.hidden {
  display: none !important;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-element);
}
::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-accent);
}
.lucide {
  width: 1.4em;
  height: 1.4em;
  stroke-width: 1.5;
  vertical-align: middle;
}
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: var(--header-height);
  padding: 0 30px;
  background-color: var(--bg-content);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  transition: background-color var(--transition-default),
    border-color var(--transition-default);
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-headings);
  font-size: 1.5em;
  font-weight: 700;
  text-decoration: none;
}
.logo-icon-img {
  height: 32px;
}
.logo-text .logo-learn {
  color: var(--text-headings);
  font-weight: 700;
}
.logo-text .logo-blox {
  color: var(--primary-accent);
  font-weight: 500;
}
.menu-toggle-course,
.theme-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 1.3em;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: color var(--transition-fast),
    background-color var(--transition-fast);
}
.theme-switch {
  font-size: 1.2rem;
  color: var(--text-primary);
}
.menu-toggle-course {
  display: none;
}
.menu-toggle-course:hover,
.theme-switch:hover {
  color: var(--primary-accent);
  background-color: var(--primary-light);
}
.user-dropdown {
  position: relative;
}
.user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-on-accent);
  background-color: var(--primary-accent);
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.user-toggle:hover {
  background-color: var(--primary-hover);
}
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1100;
  display: none;
  min-width: 150px;
  padding: 10px;
  background-color: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}
.user-dropdown.open .dropdown-menu {
  display: block;
}
.logout-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-on-accent);
  background-color: var(--primary-accent);
  border: none;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform 0.2s;
}
.logout-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  z-index: 1000;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-content);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-default),
    background-color var(--transition-default),
    border-color var(--transition-default);
}
.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-width)));
}
.sidebar-progress-container {
  padding: 20px 25px 15px 25px;
  flex-shrink: 0;
}
.sidebar-nav {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 8px;
}
.sidebar-footer {
  padding: 10px 8px;
  flex-shrink: 0;
}
.sidebar-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.sidebar-progress-value {
  color: var(--primary-accent);
  font-weight: 600;
}
.sidebar-progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--bg-element);
  border-radius: 999px;
  overflow: hidden;
}
.sidebar-progress-bar-fill {
  height: 100%;
  background-color: var(--primary-accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.sidebar-heading {
  padding: 10px 17px 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sidebar-divider {
  height: 1px;
  margin: 12px 25px;
  background-color: var(--border-color);
  border: none;
}
.sidebar-nav a,
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 17px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.2s, color 0.2s;
}
.sidebar-nav a:hover,
.sidebar-footer a:hover {
  background-color: var(--primary-light);
  color: var(--text-primary);
}
.sidebar-nav a.active,
.sidebar-footer a.active {
  background-color: var(--primary-light);
  color: var(--primary-accent);
  font-weight: 600;
}
.sidebar-nav .lucide,
.sidebar-footer .lucide {
  stroke: var(--text-muted);
  stroke-width: 2.2;
  transition: color var(--transition-fast), stroke var(--transition-fast);
}
.sidebar-nav a:hover .lucide,
.sidebar-footer a:hover .lucide {
  stroke: var(--text-primary);
}
.sidebar-nav a.active .lucide,
.sidebar-footer a.active .lucide {
  stroke: var(--primary-accent);
}
.badge-premium-soon {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--text-on-accent);
  background: var(--gradient-primary);
  border-radius: var(--border-radius-md);
  box-shadow: 0 2px 4px rgba(var(--primary-accent-rgb), 0.2);
}
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-accent) transparent;
}
.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background-color: var(--primary-accent);
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-hover);
}
.sidebar-nav a[data-module="welcome"] .lucide {
  stroke: #3a52c4;
}
.sidebar-nav a[data-module="module_0"] .lucide {
  stroke: #00b894;
}
.sidebar-footer a[href="#advancedCourses"] .lucide {
  stroke: #f1c40f;
}
.sidebar-scroll-indicator {
  position: absolute;
  bottom: 128px;
  left: 0;
  width: 100%;
  pointer-events: none;
  text-align: center;
  z-index: 10;
  background: linear-gradient(to bottom, transparent, var(--bg-content));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-scroll-indicator.show {
  opacity: 1;
}
.sidebar-scroll-indicator i {
  font-size: 14px;
  color: var(--text-muted);
  animation: arrowBounce 1.8s infinite ease-in-out;
  opacity: 0.7;
}
@keyframes arrowBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
}
.main-content {
  position: relative;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 20px;
  background-color: var(--bg-body);
  transition: margin-left var(--transition-default),
    width var(--transition-default);
}
.sidebar.collapsed + .main-content {
  width: 100%;
  margin-left: 0;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1050;
  display: none;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  display: flex;
  animation: fadeInModal 0.3s ease;
}
@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modal-content {
  background-color: var(--bg-content);
  color: var(--text-primary);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
}
.modal-close:hover {
  color: var(--primary-accent);
}
.modal-steps {
  padding-left: 1.2em;
  margin-top: 10px;
  color: var(--text-secondary);
}
.modal-steps li {
  margin-bottom: 10px;
  line-height: 1.6;
}
.modal-image {
  margin-top: 20px;
  text-align: center;
}
.modal-image img {
  max-width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}
.modal-image figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
body.modal-open {
  overflow: hidden;
}
.report-error-inline {
  font-size: 1.2rem;
  color: var(--danger-color);
  padding: 8px;
  margin-left: 5px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: color 0.2s ease;
}
.report-error-inline:hover {
  color: var(--danger-hover);
}
.report-bug-link {
  color: var(--danger-color);
  font-weight: 600;
}
.report-bug-link .lucide {
  stroke: var(--danger-color);
}
.report-bug-link:hover {
  background-color: var(--danger-bg);
  color: var(--danger-hover);
}
.report-bug-link:hover .lucide {
  stroke: var(--danger-hover);
}
.linear-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  display: none;
  transform: translateY(100%);
  background-color: rgba(var(--bg-content-rgb), 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  padding: 10px 15px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  flex-direction: column;
  gap: 10px;
}
.linear-controls.active {
  transform: translateY(0);
  opacity: 1;
}
.linear-controls:hover {
  background-color: rgba(var(--bg-content-rgb), 0.95);
}
.linear-controls-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.linear-controls-buttons button {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--primary-accent);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}
.linear-controls-buttons button:hover:not(:disabled) {
  background-color: var(--primary-light);
  border-color: var(--primary-accent);
}
.linear-controls-buttons button:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}
#linearProgress {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}
.linear-progress-bar-container {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background-color: var(--border-color);
  border-radius: var(--border-radius-lg);
  margin: 0 auto;
  overflow: hidden;
}
.linear-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  transition: width 0.4s ease-in-out;
  border-radius: var(--border-radius-lg);
}
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  .main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 15px;
  }
  .container {
    max-width: 95%;
  }
}
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  .page-header {
    padding: 0 15px;
  }
  .header-left,
  .header-right {
    gap: 8px;
  }
  .menu-toggle-course {
    display: flex !important;
  }
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
    z-index: 1200;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 10px;
    padding-bottom: 90px !important;
  }
  .dropdown-menu {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
  }
  .linear-controls {
    display: block;
  }
}
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  .page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 10px;
  }
  .logo {
    font-size: 1.2em;
    gap: 6px;
  }
  .logo-icon-img {
    height: 28px;
  }
  .main-content {
    padding: 10px;
  }
  .dropdown-menu {
    right: 5px;
    left: 5px;
  }
}

/* Settings Modal Styles */
.settings-modal {
  max-width: 480px !important;
  width: 95% !important;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--border-radius-md);
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input[type="text"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--bg-element);
}

.btn-primary-small {
  padding: 10px 16px;
  background-color: var(--primary-accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary-small:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary-small:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.settings-info-box {
  background-color: var(--bg-element);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border-color);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  gap: 1rem;
}

.info-label {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.info-label i {
  font-size: 0.9rem;
  opacity: 0.8;
}

.info-value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* Hide username on mobile */
@media (max-width: 768px) {
  #userName {
    display: none;
  }
  
  .settings-modal {
    max-width: 100% !important;
    width: 95% !important;
  }
}

/* Dropdown Menu Links Styling */
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-menu a:hover {
  background-color: var(--bg-alt);
  color: var(--primary-accent);
}

.dropdown-menu a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  opacity: 0.8;
}

.dropdown-menu a:hover i {
  opacity: 1;
}

/* Admin Panel Button in Dropdown */
#adminPanelBtn {
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  padding-top: 12px;
}

#adminPanelBtn i {
  color: var(--warning-color);
}

/* Info color variables */
:root {
  --info-color: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --info-border: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] {
  --info-color: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.1);
  --info-border: rgba(96, 165, 250, 0.3);
}


/* =========================================
   SYSTÈME XP & GRADES - NOUVEAUX STYLES
   ========================================= */

/* Badges de Grade */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.grade-badge:hover {
  transform: scale(1.05);
}

/* Classement Premium */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: 1rem;
}

.leaderboard-table tr {
  background: var(--bg-content);
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leaderboard-table tr:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.leaderboard-table td {
  padding: 16px;
  vertical-align: middle;
}

.leaderboard-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.leaderboard-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.leaderboard-rank {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  width: 60px;
}

.rank-display {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
}

/* Podium Styles */
.rank-1 .leaderboard-rank { font-size: 1.5rem; }
.rank-1 { background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent) !important; border: 1px solid rgba(251, 191, 36, 0.3); }
.rank-2 { background: linear-gradient(90deg, rgba(156, 163, 175, 0.1), transparent) !important; border: 1px solid rgba(156, 163, 175, 0.3); }
.rank-3 { background: linear-gradient(90deg, rgba(180, 83, 9, 0.1), transparent) !important; border: 1px solid rgba(180, 83, 9, 0.3); }

.current-user-row {
  background: rgba(var(--primary-accent-rgb), 0.1) !important;
  border: 1px solid var(--primary-accent);
}

.user-info-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.username {
  font-weight: 600;
  color: var(--text-primary);
}

.you-tag {
  font-size: 0.75rem;
  color: var(--primary-accent);
  background: rgba(var(--primary-accent-rgb), 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.user-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.streak-badge {
  font-size: 0.8rem;
  padding: 2px 6px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 4px;
}

.leaderboard-score {
  text-align: right;
  font-size: 1.1rem;
  color: var(--primary-accent);
}

.xp-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Défis Quotidiens */
.daily-challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.daily-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.daily-type-badge.mini_quiz { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.daily-type-badge.drag_drop { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.daily-type-badge.code_challenge { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.daily-xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: white;
  border-radius: 20px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.daily-question-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-headings);
}

.daily-no-challenge {
  text-align: center;
  padding: 3rem;
  background: var(--bg-alt);
  border-radius: 12px;
  color: var(--text-secondary);
}

/* Animation Level Up */
.level-up-modal {
  position: fixed;
  z-index: 10000;
}

.level-up-content {
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 640px) {
  .leaderboard-table td {
    padding: 12px 8px;
  }
  
  .user-avatar-placeholder {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .leaderboard-rank {
    width: 40px;
    font-size: 1rem;
  }
  
  .username {
    font-size: 0.9rem;
  }
  
  .grade-badge {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }
}

 
 / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
       D R A G   &   D R O P   C H A L L E N G E   S T Y L E S 
 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
 
 
 . d r a g - d r o p - c o n t a i n e r   { 
 
         p a d d i n g :   1 r e m ; 
 
         b a c k g r o u n d :   v a r ( - - b g - b o d y ) ; 
 
         b o r d e r - r a d i u s :   1 2 p x ; 
 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
 
 } 
 
 
 
 . i n s t r u c t i o n - t e x t   { 
 
         t e x t - a l i g n :   c e n t e r ; 
 
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ; 
 
         m a r g i n - b o t t o m :   1 . 5 r e m ; 
 
         d i s p l a y :   f l e x ; 
 
         a l i g n - i t e m s :   c e n t e r ; 
 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
         g a p :   8 p x ; 
 
         f o n t - s i z e :   0 . 9 5 r e m ; 
 
 } 
 
 
 
 . d r a g - d r o p - a r e a   { 
 
         d i s p l a y :   f l e x ; 
 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
         g a p :   2 r e m ; 
 
         m a r g i n - b o t t o m :   2 r e m ; 
 
         p o s i t i o n :   r e l a t i v e ; 
 
 } 
 
 
 
 . d r a g - c o l u m n   { 
 
         f l e x :   1 ; 
 
         d i s p l a y :   f l e x ; 
 
         f l e x - d i r e c t i o n :   c o l u m n ; 
 
         g a p :   1 r e m ; 
 
 } 
 
 
 
 / *   I t e m s   D r a g g a b l e   ( G a u c h e )   * / 
 
 . d r a g g a b l e - i t e m   { 
 
         b a c k g r o u n d :   v a r ( - - b g - c o n t e n t ) ; 
 
         b o r d e r :   2 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
 
         p a d d i n g :   1 r e m ; 
 
         b o r d e r - r a d i u s :   1 0 p x ; 
 
         c u r s o r :   p o i n t e r ; 
 
         p o s i t i o n :   r e l a t i v e ; 
 
         t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         u s e r - s e l e c t :   n o n e ; 
 
         f o n t - w e i g h t :   5 0 0 ; 
 
         d i s p l a y :   f l e x ; 
 
         a l i g n - i t e m s :   c e n t e r ; 
 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 } 
 
 
 
 . d r a g g a b l e - i t e m : h o v e r   { 
 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y - a c c e n t ) ; 
 
         t r a n s f o r m :   t r a n s l a t e X ( 2 p x ) ; 
 
 } 
 
 
 
 . d r a g g a b l e - i t e m . s e l e c t e d   { 
 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y - a c c e n t ) ; 
 
         b a c k g r o u n d :   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 0 5 ) ; 
 
         b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 2 ) ; 
 
 } 
 
 
 
 . d r a g g a b l e - i t e m . c o n n e c t e d   { 
 
         b o r d e r - c o l o r :   # 1 0 b 9 8 1 ; 
 
         b a c k g r o u n d :   r g b a ( 1 6 ,   1 8 5 ,   1 2 9 ,   0 . 0 5 ) ; 
 
         o p a c i t y :   0 . 8 ; 
 
 } 
 
 
 
 / *   C i b l e s   D r o p p a b l e   ( D r o i t e )   * / 
 
 . d r o p p a b l e - t a r g e t   { 
 
         b a c k g r o u n d :   v a r ( - - b g - c o n t e n t ) ; 
 
         b o r d e r :   2 p x   d a s h e d   v a r ( - - b o r d e r - c o l o r ) ; 
 
         p a d d i n g :   1 r e m ; 
 
         b o r d e r - r a d i u s :   1 0 p x ; 
 
         c u r s o r :   p o i n t e r ; 
 
         p o s i t i o n :   r e l a t i v e ; 
 
         t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         d i s p l a y :   f l e x ; 
 
         a l i g n - i t e m s :   c e n t e r ; 
 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   / *   I n v e r s � �   p a r   r a p p o r t   � �   d r a g g a b l e   * / 
 
         f l e x - d i r e c t i o n :   r o w - r e v e r s e ;   / *   P o u r   m e t t r e   l e   p o i n t   � �   g a u c h e   * / 
 
 } 
 
 
 
 . d r o p p a b l e - t a r g e t : h o v e r   { 
 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y - a c c e n t ) ; 
 
         b a c k g r o u n d :   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 0 2 ) ; 
 
 } 
 
 
 
 . d r o p p a b l e - t a r g e t . c o n n e c t e d   { 
 
         b o r d e r - c o l o r :   # 1 0 b 9 8 1 ; 
 
         b o r d e r - s t y l e :   s o l i d ; 
 
         b a c k g r o u n d :   r g b a ( 1 6 ,   1 8 5 ,   1 2 9 ,   0 . 0 5 ) ; 
 
 } 
 
 
 
 / *   P o i n t s   d e   c o n n e x i o n   v i s u e l s   * / 
 
 . c o n n e c t o r - p o i n t   { 
 
         w i d t h :   1 0 p x ; 
 
         h e i g h t :   1 0 p x ; 
 
         b a c k g r o u n d :   v a r ( - - b o r d e r - c o l o r ) ; 
 
         b o r d e r - r a d i u s :   5 0 % ; 
 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ; 
 
 } 
 
 
 
 . d r a g g a b l e - i t e m   . c o n n e c t o r - p o i n t   {   m a r g i n - l e f t :   1 0 p x ;   } 
 
 . d r o p p a b l e - t a r g e t   . c o n n e c t o r - p o i n t   {   m a r g i n - r i g h t :   1 0 p x ;   } 
 
 
 
 . d r a g g a b l e - i t e m . s e l e c t e d   . c o n n e c t o r - p o i n t   {   b a c k g r o u n d :   v a r ( - - p r i m a r y - a c c e n t ) ;   b o x - s h a d o w :   0   0   0   4 p x   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 2 ) ;   } 
 
 . d r a g g a b l e - i t e m . c o n n e c t e d   . c o n n e c t o r - p o i n t , 
 
 . d r o p p a b l e - t a r g e t . c o n n e c t e d   . c o n n e c t o r - p o i n t   {   b a c k g r o u n d :   # 1 0 b 9 8 1 ;   } 
 
 
 
 / *   B o u t o n   d e   v a l i d a t i o n   * / 
 
 . s u b m i t - c h a l l e n g e - b t n   { 
 
         w i d t h :   1 0 0 % ; 
 
         p a d d i n g :   1 r e m ; 
 
         b o r d e r :   n o n e ; 
 
         b o r d e r - r a d i u s :   1 0 p x ; 
 
         b a c k g r o u n d :   v a r ( - - b o r d e r - c o l o r ) ; 
 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 
         f o n t - w e i g h t :   6 0 0 ; 
 
         c u r s o r :   n o t - a l l o w e d ; 
 
         t r a n s i t i o n :   a l l   0 . 3 s ; 
 
         f o n t - s i z e :   1 r e m ; 
 
 } 
 
 
 
 . s u b m i t - c h a l l e n g e - b t n . r e a d y   { 
 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - a c c e n t ) ; 
 
         c o l o r :   w h i t e ; 
 
         c u r s o r :   p o i n t e r ; 
 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 3 ) ; 
 
 } 
 
 
 
 . s u b m i t - c h a l l e n g e - b t n . r e a d y : h o v e r   { 
 
         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
         b o x - s h a d o w :   0   6 p x   1 6 p x   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 4 ) ; 
 
 } 
 
 
 
 / *   R e s p o n s i v e   * / 
 
 @ m e d i a   ( m a x - w i d t h :   6 0 0 p x )   { 
 
         . d r a g - d r o p - a r e a   { 
 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
 
                 g a p :   1 . 5 r e m ; 
 
         } 
 
         
 
         . d r o p p a b l e - t a r g e t   { 
 
                 f l e x - d i r e c t i o n :   r o w ;   / *   R e m e t t r e   n o r m a l   s u r   m o b i l e   p o u r   l i s i b i l i t � �   * / 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
         } 
 
         
 
         . d r o p p a b l e - t a r g e t   . c o n n e c t o r - p o i n t   { 
 
                 d i s p l a y :   n o n e ;   / *   C a c h e r   l e s   p o i n t s   s u r   m o b i l e   p o u r   s i m p l i f i e r   * / 
 
         } 
 
         . d r a g g a b l e - i t e m   . c o n n e c t o r - p o i n t   { 
 
                 d i s p l a y :   n o n e ; 
 
         } 
 
 } 
 
 
/* Toast de maintenance */
.maintenance-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--info-bg), rgba(37, 99, 235, 0.15));
  color: var(--info-color);
  padding: 16px 24px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--info-border);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10000;
  transform: translateY(150%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 400px;
}

.maintenance-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.maintenance-toast i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .maintenance-toast {
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
    font-size: 0.85rem;
  }
}

/* Banderole d'avertissement technique (Shared) */
.technical-notice-banner {
  position: relative;
  width: 100%;
  background: var(--notice-bg);
  border-bottom: 1px solid var(--notice-border);
  padding: 16px 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
  z-index: 100;
}

.technical-notice-banner .banner-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.technical-notice-banner .notice-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--notice-text);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  max-width: 900px;
}

.technical-notice-banner .notice-content i {
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--notice-icon);
  animation: pulse-warning 2s infinite;
}

.technical-notice-banner .notice-content strong {
  font-weight: 700;
  color: #7f1d1d;
}

@keyframes pulse-warning {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Disabled Link Styles */
.nav-link.disabled-link {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: rgba(0,0,0,0.05);
}

.nav-link.disabled-link:hover {
  background-color: rgba(0,0,0,0.05);
  color: inherit;
}

.badge-v2 {
  display: inline-block;
  background-color: var(--primary-accent);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: bold;
  vertical-align: middle;
}


/* Maintenance Toast */
.maintenance-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #1f2937;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease-out;
  font-weight: 500;
  border: 1px solid #374151;
}

.maintenance-toast.show {
  transform: translateX(-50%) translateY(0);
}

.maintenance-toast i {
  color: #ef4444;
}


/* V2 Notification Card */
.v2-notification-card {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 9998;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  animation: slideInLeft 0.5s ease-out;
  font-family: var(--font-primary);
}

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

.v2-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
}

.v2-badge {
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.v2-close-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.v2-close-btn:hover {
  color: #4b5563;
}

.v2-card-content {
  padding: 16px;
}

.v2-card-content h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #111827;
  font-weight: 600;
}

.v2-card-content p {
  margin: 0 0 16px 0;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.v2-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  background-color: #5865F2;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.v2-discord-btn:hover {
  background-color: #4752c4;
  color: white;
}


@media (max-width: 768px) {
  .v2-notification-card {
    width: calc(100% - 32px);
    left: 16px;
    bottom: 16px;
    right: auto;
  }
}

