/* =========================================
   MODULE MODERNE - STYLE COMPLET
   Design System pour les modules de cours
   ========================================= */

/* --- Variables CSS Additionnelles --- */
:root {
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* =========================================
   HERO HEADER
   ========================================= */

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: 1.1rem;
  margin: 0 auto 1.5rem auto;
  max-width: 650px;
  line-height: 1.6;
  opacity: 0.95;
  font-weight: 400;
}

/* =========================================
   NAVIGATION MODERNE (Style Image)
   ========================================= */

/* =========================================
   SECTIONS D'APPRENTISSAGE
   ========================================= */

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--text-headings);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

/* =========================================
   INFO CARDS (Tip, Warning, Info, Success)
   ========================================= */

/* =========================================
   FEATURES GRID
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* =========================================
   CODE EXAMPLES GRID
   ========================================= */

/* =========================================
   USE CASES GRID
   ========================================= */

/* =========================================
   SYNTAX SHOWCASE
   ========================================= */

/* =========================================
   DATA TYPES GRID
   ========================================= */

/* =========================================
   INTERACTIVE EXAMPLES
   ========================================= */

/* Step number spécifique aux example-step (position absolute) */

/* =========================================
   OPERATORS GRID
   ========================================= */

/* =========================================
   CONCAT SHOWCASE
   ========================================= */

/* =========================================
   PROPERTIES GRID
   ========================================= */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.property-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.property-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.property-icon i {
  width: 28px;
  height: 28px;
}

.property-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-headings);
}

.property-card code {
  display: block;
  margin: 1rem 0;
  font-size: 0.85rem;
}

/* =========================================
   PRACTICAL EXERCISE
   ========================================= */

/* =========================================
   SECTION NAVIGATION
   ========================================= */

/* =========================================
   QUIZ MODERNE
   ========================================= */

.option-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* =========================================
   QUIZ SCORE DISPLAY
   ========================================= */

.score-value {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary-accent);
  margin-bottom: 1rem;
}

.score-separator {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.score-total {
  color: var(--text-secondary);
}

/* =========================================
   PROJECT MODERNE
   ========================================= */

.project-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.step-item:hover {
  border-color: var(--primary-accent);
}

/* Step number spécifique à step-item (sans position absolute) */
.step-item .step-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--primary-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 2px;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text-headings);
}

.step-content p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-content kbd {
  background: var(--bg-alt);
  color: var(--text-primary);
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 0 var(--border-color);
}

.project-completion {
  background: var(--gradient-success);
  color: white;
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow-large);
}

.completion-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.completion-icon i {
  width: 50px;
  height: 50px;
}

.project-completion h3 {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 1rem 0;
}

.project-completion p {
  font-size: 1.1rem;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
  line-height: 1.7;
}

/* =========================================
   MODULE FOOTER VALIDATION
   ========================================= */
.module-footer-validation {
  margin: 3rem 0 2rem 0;
  padding: 0;
}

.validation-wrapper {
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.validation-feedback {
  margin-bottom: 1rem;
  min-height: 30px;
  font-weight: 600;
}

.validation-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.validation-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.validation-btn:disabled {
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.validation-btn i {
  width: 20px;
  height: 20px;
}

/* =========================================
   VALIDATION V2 - Simplified Design
   ========================================= */

/* V2: Hide the manual validation button (auto-validation now) */
.validation-buttons {
  display: none !important;
}

/* V2: Cleaner wrapper */
.validation-wrapper {
  padding: 1.5rem;
  text-align: left;
}

.validation-wrapper .validation-header {
  margin-bottom: 1rem;
}

.validation-wrapper .validation-header h3 {
  font-size: 1.1rem !important;
  font-weight: 700;
}

.validation-wrapper .validation-header p {
  font-size: 0.85rem !important;
}

/* =========================================
   VALIDATION CHECKLIST (V2 Design)
   ========================================= */
.validation-checklist {
  display: flex;
  flex-direction: column;
  gap: 1.5rem !important;
  margin-bottom: 0;
  margin-top: 1.5rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.checklist-item.pending {
  color: var(--text-secondary);
}

.checklist-item.pending .checklist-icon {
  color: var(--text-muted);
}

.checklist-item.done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.checklist-item.done .checklist-icon {
  color: #10b981;
}

.checklist-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checklist-icon i {
  width: 20px;
  height: 20px;
}

.checklist-item span {
  font-weight: 500;
  font-size: 0.95rem;
}

/* V2: Success Badge when module is validated */
.validation-success-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-badge-content {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
  animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-badge-content i {
  width: 24px;
  height: 24px;
}

@keyframes successPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }

  .validation-wrapper {
    padding: 1.5rem;
  }

  .validation-btn {
    width: 100%;
    justify-content: center;
  }

  .step-item {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .step-item {
    padding: 1rem;
  }

  .step-item .step-number {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 0.8rem;
  }

  .step-content h4 {
    font-size: 1rem;
  }

  .score-value {
    font-size: 2.5rem;
  }
}

/* --- Theory Design System --- */
.theory-card {
  background: var(--bg-content, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.theory-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-light, #e0e7ff);
}

.theory-number {
  width: 40px;
  height: 40px;
  background: var(--primary-accent, #6366f1);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.theory-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-headings, #1f2937);
  font-weight: 700;
}

.theory-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary, #4b5563);
}

.theory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.theory-item {
  background: var(--bg-alt, #f9fafb);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  transition: all 0.3s ease;
}

.theory-item:hover {
  border-color: var(--primary-accent, #6366f1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.theory-icon {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-accent, #6366f1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.theory-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-headings, #1f2937);
}

.theory-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary, #4b5563);
  line-height: 1.6;
}

/* --- Quiz Result Styles --- */
.quiz-result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.quiz-result-score {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  justify-content: center;
}

.score-separator,
.score-total {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quiz-result-xp {
  margin-bottom: 1rem;
}

.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
}

.quiz-result-message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* =========================================
   LEARNBLOX DESIGN UPDATE (Roblox Theme)
   ========================================= */

/* --- Keyboard Visualizer --- */
.keyboard-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--bg-alt);
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.keyboard-row {
  display: flex;
  gap: 0.5rem;
}

.key-cap {
  width: 60px;
  height: 60px;
  background: linear-gradient(to bottom, #f3f4f6, #e5e7eb);
  border: 1px solid #d1d5db;
  border-bottom: 4px solid #9ca3af;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Fira Code", monospace;
  font-weight: 700;
  color: var(--text-headings);
  position: relative;
  transition: all 0.1s;
  cursor: default;
}

[data-theme="dark"] .key-cap {
  background: linear-gradient(to bottom, #374151, #1f2937);
  border-color: #4b5563;
  border-bottom-color: #111827;
  color: #f3f4f6;
}

.key-cap:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
}

.key-cap span {
  font-size: 1.2rem;
}

/* --- Studio Zone Cards --- */

/* --- Pro Tip Card (Roblox Style) --- */
.roblox-tip-card {
  background: linear-gradient(135deg, #00b06f 0%, #009960 100%);
  color: white;
  border-radius: 16px;
  padding: 2px;
  margin: 2rem 0;
  box-shadow: 0 10px 25px -5px rgba(0, 176, 111, 0.4);
}

/* --- FIXES FOR ROBLOX THEME (Class Mismatches) --- */

/* Key Group Container */
.key-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Key Label */
.key-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mouse Control Hint Fix */
.mouse-control-hint {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: var(--bg-content);
  border-radius: 50px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
}

.mouse-control-hint i {
  font-size: 1.2rem;
  color: var(--text-primary);
}

/* Roblox Tip Card Fixes */
.roblox-tip-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(0, 176, 111, 0.1) 0%,
    rgba(0, 153, 96, 0.1) 100%
  );
  border-left: 4px solid #00b06f;
  border-radius: 12px;
  margin: 2rem 0;
}

.roblox-tip-card .tip-icon {
  width: 50px;
  height: 50px;
  background: #00b06f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 176, 111, 0.3);
}

.roblox-tip-card .tip-icon i {
  width: 24px;
  height: 24px;
}

.roblox-tip-card .tip-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00b06f;
}

.roblox-tip-card .tip-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Fix for Code inside Tip */
.roblox-tip-card code {
  background: rgba(0, 176, 111, 0.15) !important;
  color: #008050 !important;
  border: 1px solid rgba(0, 176, 111, 0.2) !important;
}

/* --- Catchy Section Headers (Learnblox Style) --- */

/* =========================================
   QUIZ & EXERCISE HEADERS - MODERN DESIGN
   ========================================= */
.quiz-exercise-header {
  transition: all 0.3s ease;
}

.quiz-exercise-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Responsive Design for Quiz/Exercise Headers */
@media (max-width: 768px) {
  .quiz-exercise-header {
    padding: 1.5rem !important;
  }

  .quiz-exercise-header > div > div:first-child {
    flex-direction: column;
    align-items: flex-start !important;
    width: 100%;
  }

  .quiz-exercise-header h3 {
    font-size: 1.4rem !important;
  }

  .quiz-exercise-header > div > div:last-child {
    width: 100%;
    justify-content: center;
  }

  .quiz-exercise-header i[data-lucide] {
    width: 28px !important;
    height: 28px !important;
  }
}

@media (max-width: 480px) {
  .quiz-exercise-header {
    padding: 1.25rem !important;
  }

  .quiz-exercise-header h3 {
    font-size: 1.2rem !important;
  }

  .quiz-exercise-header p {
    font-size: 0.85rem !important;
  }

  .quiz-exercise-header > div > div:last-child {
    padding: 0.75rem 1.25rem !important;
    font-size: 1.1rem !important;
  }
}

/* --- Discord Connect Modern Styles --- */

/* --- Modern Settings Modal --- */
.settings-modal-content {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
  padding: 0;
  height: 600px;
  max-height: 80vh;
  overflow: hidden;
  background: var(--bg-content);
  border-radius: 20px;
}

.settings-sidebar {
  background: var(--bg-alt);
  padding: 2rem 1rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.settings-nav-item:hover {
  background: rgba(var(--primary-rgb), 0.05);
  color: var(--primary-accent);
}

.settings-nav-item.active {
  background: var(--primary-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.settings-main {
  padding: 2rem;
  overflow-y: auto;
}

.settings-header-mobile {
  display: none;
}

.settings-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-headings);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-card h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--text-headings);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.settings-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.settings-info-row:last-child {
  border-bottom: none;
}

.settings-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.settings-value {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .settings-modal-content {
    grid-template-columns: 1fr;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }

  .settings-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .settings-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* =========================================
   KEYWORD HIGHLIGHTING (Mots-clés en évidence)
   ========================================= */

/* Style simple pour <code> inline dans les paragraphes */
p code,
li code,
.theory-content code,
.content-card > p code,
.property-content code:not([class*="language-"]) {
  background: var(--primary-light);
  color: var(--primary-accent);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
  font-weight: 600;
}

/* Classe .keyword pour mise en évidence des mots importants */
.keyword {
  background: var(--primary-accent);
  color: white !important;
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
  font-weight: 600;
}

/* --- Interactive Schema Modal --- */
.interactive-schema-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.btn-primary-action {
  background: var(--primary-accent);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(var(--primary-accent-rgb), 0.3);
}

.btn-primary-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--primary-accent-rgb), 0.4);
  background: var(--primary-hover);
}

.schema-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.schema-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(5px);
}

.schema-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.schema-modal-content {
  background: var(--bg-body);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

.schema-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.schema-close-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.schema-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.schema-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: var(--text-headings);
}

.schema-header p {
  margin: 0;
  color: var(--text-secondary);
}

.schema-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: rgba(var(--primary-accent-rgb), 0.08);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.schema-note i {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* --- Interactive Roblox Interface --- */
.interactive-roblox-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: visible;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: #1e1e2e;
}

.interactive-roblox-image {
  width: 100%;
  display: block;
  user-select: none;
  border-radius: 12px;
}

.roblox-overlay-zone {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.roblox-overlay-zone:hover,
.roblox-overlay-zone.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.zone-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 5px;
}

.roblox-overlay-zone.tooltip-bottom .zone-tooltip {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: 5px;
}

.roblox-overlay-zone:hover .zone-tooltip {
  opacity: 1;
}

/* Arrow for default tooltip (top) */
.zone-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* Arrow for bottom tooltip */
.roblox-overlay-zone.tooltip-bottom .zone-tooltip::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
}

.zone-description-panel {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  min-height: 120px;
  transition: all 0.3s ease;
  position: relative;
}

.zone-description-panel h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-accent);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Adjust container for modal */
.schema-modal .interactive-roblox-container {
  margin: 0 auto 1.5rem auto;
  max-height: 60vh;
}

.schema-modal .interactive-roblox-image {
  max-height: 60vh;
  object-fit: contain;
  width: auto;
  margin: 0 auto;
}

/* fadeIn keyframe maintenant dans _animations.css */
@media (max-width: 768px) {
  .schema-modal-content {
    padding: 1rem;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
  }

  .schema-header h3 {
    font-size: 1.2rem;
  }

  /* Allow horizontal scrolling for the image container */
  .schema-modal .interactive-roblox-container {
    max-height: 50vh;
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    margin-bottom: 1rem;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
  }

  /* Force a minimum width on the wrapper so it doesn't shrink too much */
  .schema-modal .interactive-roblox-wrapper {
    min-width: 600px;
    width: max-content;
  }

  .schema-modal .interactive-roblox-image {
    max-height: 50vh;
    width: auto;
    max-width: none;
  }

  /* Make zones tappable on mobile */
  .roblox-overlay-zone {
    min-width: 20px;
    min-height: 20px;
  }
}

/* =========================================
   PROJECT DESIGN (Merged)
   ========================================= */
/* =========================================
   PROJECT DESIGN SYSTEM
   Design propre et lisible pour les projets
   ========================================= */

/* --- Project Header Card --- */
.project-header-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-content) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.project-header-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-accent);
}

.project-header-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.project-header-icon i {
  width: 32px;
  height: 32px;
  color: white;
}

.project-header-content {
  flex: 1;
}

.project-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.project-header-content h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-headings);
}

.project-header-content p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Progress Bar --- */
.project-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 1.5rem;
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.project-progress-bar::-webkit-scrollbar {
  height: 4px;
}

.project-progress-bar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

/* Progress step BASE (direct number in div) */
.progress-step {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  background: var(--bg-alt);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.progress-step.active {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.progress-step.completed {
  background: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

/* Progress line */
.progress-line {
  flex: 0 0 auto;
  width: 16px;
  height: 2px;
  background: var(--border-color);
  border-radius: 2px;
}

.progress-line.completed {
  background: var(--success-color);
}

/* More steps indicator */
.progress-step.more {
  background: var(--bg-alt);
  border-style: dashed;
  font-size: 0.75rem;
}

/* --- Callout Boxes --- */
.callout-box {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.callout-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.callout-box.info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.callout-box.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.callout-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.callout-box.warning .callout-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.callout-box.info .callout-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.callout-box.success .callout-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.callout-icon i {
  width: 20px;
  height: 20px;
}

.callout-content {
  flex: 1;
}

.callout-content strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-headings);
  font-size: 1rem;
}

.callout-content ol,
.callout-content ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.callout-content li {
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

/* --- Section Title --- */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-headings);
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.section-title i {
  width: 24px;
  height: 24px;
  color: var(--primary-accent);
}

/* --- Properties Table --- */
.properties-table {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.properties-table.compact {
  display: inline-block;
  min-width: 200px;
}

.prop-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.prop-row:last-child {
  border-bottom: none;
}

.prop-name {
  font-weight: 600;
  color: var(--text-secondary);
  font-family: "Fira Code", monospace;
}

.prop-value {
  font-weight: 500;
  color: var(--text-headings);
  font-family: "Fira Code", monospace;
}

.prop-row.highlight {
  background: rgba(16, 185, 129, 0.08);
}

.prop-row.highlight .prop-name,
.prop-row.highlight .prop-value {
  color: #10b981;
}

.prop-row.accent {
  background: rgba(99, 102, 241, 0.05);
}

.prop-row.accent .prop-value {
  color: var(--primary-accent);
}

/* --- Parts Grid --- */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .parts-grid {
    grid-template-columns: 1fr;
  }
}

.part-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.part-card strong {
  font-size: 0.95rem;
  color: var(--text-headings);
  margin-bottom: 0.25rem;
}

.part-card span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: "Fira Code", monospace;
}

.part-card.special {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.05);
}

.part-card .tag {
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
}

/* --- Explorer Tree --- */
.explorer-tree {
  background: #1e1e2e;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.75rem;
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
}

.tree-item {
  padding: 0.35rem 0;
  color: #d4d4d4;
}

.tree-item.folder {
  color: #fbbf24;
}

.tree-item.part {
  color: #94a3b8;
}

.tree-item.spawn {
  color: #10b981;
}

.tree-item.indent-1 {
  padding-left: 1.5rem;
}

.tree-item.indent-2 {
  padding-left: 3rem;
}

/* --- Hint Text --- */
.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* --- KBD override for project --- */
.step-content kbd {
  background: var(--bg-alt);
  color: var(--text-primary);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.85em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 0 var(--border-color);
}

/* --- Project Completion --- */
.project-completion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 16px;
  margin-top: 2rem;
}

.project-completion .completion-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.project-completion .completion-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.project-completion .completion-content h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
}

.project-completion .completion-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  color: white;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .project-header-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .project-header-card::before {
    width: 100%;
    height: 4px;
  }

  .project-progress-bar {
    justify-content: flex-start;
  }

  .callout-box {
    flex-direction: column;
  }

  .callout-icon {
    align-self: flex-start;
  }
}

/* =========================================
   PROJECT HEADER VARIANTS
   ========================================= */

/* Emoji as icon */
.project-header-icon {
  font-size: 2rem;
  background: var(--primary-accent);
}

/* Final/Success Header Variant */
.project-header-card.final {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.05) 0%,
    rgba(5, 150, 105, 0.02) 100%
  );
}

.project-header-card.final::before {
  background: #10b981;
}

.project-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* =========================================
   CALLOUT BOX IMPROVEMENTS
   ========================================= */

.callout-box i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #f59e0b;
}

.callout-box.warning i {
  color: #f59e0b;
}

.callout-box.info i {
  color: #3b82f6;
}

.callout-box.success i {
  color: #10b981;
}

.callout-box strong {
  display: block;
  color: var(--text-headings);
  margin-bottom: 0.25rem;
}

.callout-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* =========================================
   PROJECT STEPS IMPROVEMENTS
   ========================================= */

/* Bonus step styling */
.step-item.bonus {
  border-left-color: #f59e0b;
}

.step-item.bonus .step-number {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Highlight step styling */
.step-item.highlight {
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 16px;
  padding: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
}

.step-item.highlight .step-number {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* =========================================
   PROJECT COMPLETION FINAL VARIANT
   ========================================= */

/* Final celebration styling */
.project-completion.final {
  flex-direction: column;
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1) 0%,
    rgba(5, 150, 105, 0.05) 100%
  );
  border: 2px solid #10b981;
}

.project-completion.final .completion-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.project-completion.final .completion-content h3 {
  color: #10b981;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-completion.final .completion-content p {
  color: var(--text-secondary);
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.6;
}

/* =========================================
   PROJECT RECAP CARD
   ========================================= */

.project-recap-card {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 20px;
  color: white;
}

.project-recap-card h3 {
  margin: 0 0 1.5rem 0;
  text-align: center;
  color: white;
  font-size: 1.25rem;
}

.recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.recap-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 12px;
}

.recap-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.recap-desc {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* =========================================
   HEADER TITLE STYLES
   ========================================= */

.project-header-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-headings);
}

.project-header-desc {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =========================================
   MOBILE ADJUSTMENTS
   ========================================= */

@media (max-width: 768px) {
  .project-progress-bar {
    padding: 0.75rem 1rem;
    justify-content: flex-start;
  }

  .project-progress-bar .progress-step {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 0.75rem;
  }

  .project-progress-bar .progress-line {
    width: 10px;
  }

  .project-completion {
    flex-direction: column;
    text-align: center;
  }

  .step-item.highlight {
    margin-left: 0;
    margin-right: 0;
  }
}

/* =========================================
   INTERACTIVE FEATURES (Merged)
   ========================================= */
/* --- Interactive Roblox Interface --- */
.interactive-roblox-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: #1e1e2e;
  min-height: 400px;
}

.interactive-roblox-wrapper {
  position: relative;
  width: 100%;
}

.interactive-roblox-image {
  width: 100%;
  display: block;
  user-select: none;
}

.roblox-overlay-zone {
  position: absolute;
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  border-radius: 4px;
}

/* Zone-specific colors */
.roblox-overlay-zone[data-title*="Ruban"] {
  border-color: rgba(99, 102, 241, 0.5);
}
.roblox-overlay-zone[data-title*="Ruban"]:hover,
.roblox-overlay-zone[data-title*="Ruban"].active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4),
    inset 0 0 30px rgba(99, 102, 241, 0.1);
}

.roblox-overlay-zone[data-title*="Explorateur"] {
  border-color: rgba(245, 158, 11, 0.5);
}
.roblox-overlay-zone[data-title*="Explorateur"]:hover,
.roblox-overlay-zone[data-title*="Explorateur"].active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4),
    inset 0 0 30px rgba(245, 158, 11, 0.1);
}

.roblox-overlay-zone[data-title*="Sortie"] {
  border-color: rgba(168, 85, 247, 0.5);
}
.roblox-overlay-zone[data-title*="Sortie"]:hover,
.roblox-overlay-zone[data-title*="Sortie"].active {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4),
    inset 0 0 30px rgba(168, 85, 247, 0.1);
}
@keyframes zonePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.roblox-overlay-zone:hover {
  animation: zonePulse 1.5s ease-in-out infinite;
}

.zone-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  z-index: 20;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.zone-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.roblox-overlay-zone:hover .zone-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.zone-description-panel {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  min-height: 120px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.zone-description-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.zone-description-panel.has-content::before {
  opacity: 1;
}

.zone-description-panel h4 {
  margin: 0 0 0.75rem 0;
  color: var(--primary-accent);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zone-description-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Lua Sandbox (Improved) --- */
.lua-sandbox-container {
  margin-top: 3rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  background: #1e1e2e;
  font-family: "Fira Code", monospace;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
  position: relative;
}

.sandbox-header {
  background: linear-gradient(135deg, #252535 0%, #1a1a28 100%);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #313244;
}

.sandbox-title {
  color: #e4e4e7;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sandbox-title i {
  color: #10b981;
}

.sandbox-version {
  font-size: 0.75rem;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.sandbox-editor-wrapper {
  position: relative;
  display: flex;
  max-height: 350px;
  overflow: hidden;
  background: #1e1e2e;
}

.sandbox-line-numbers {
  width: 45px;
  min-width: 45px;
  background: #16161e;
  padding: 1rem 0.75rem 1rem 0;
  text-align: right;
  color: #52525b;
  font-size: 0.9rem;
  line-height: 1.6;
  user-select: none;
  border-right: 1px solid #313244;
  font-family: "Fira Code", "Consolas", monospace;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  pointer-events: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sandbox-line-numbers::-webkit-scrollbar {
  display: none;
}

.sandbox-line-numbers span {
  display: block;
  min-height: 1.6em;
  line-height: 1.6;
}

.sandbox-editor {
  flex: 1;
  width: calc(100% - 45px);
  min-height: 200px;
  max-height: 350px;
  background: #1e1e2e;
  color: #d4d4d4;
  border: none;
  padding: 1rem;
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  line-height: 1.6;
  caret-color: #10b981;
  overflow-y: auto;
  white-space: pre;
  word-wrap: normal;
  overflow-x: auto;
}

.sandbox-editor::placeholder {
  color: #4a4a5a;
}

.sandbox-editor:focus {
  background: #1a1a28;
}

.sandbox-controls {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #252535 0%, #1a1a28 100%);
  border-top: 1px solid #313244;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.sandbox-controls-left {
  display: flex;
  gap: 0.5rem;
}

.btn-run-sandbox {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-run-sandbox:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-run-sandbox:active {
  transform: translateY(0);
}

.btn-run-sandbox i {
  width: 16px;
  height: 16px;
}

.btn-sandbox-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  border: 1px solid #313244;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-sandbox-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
  border-color: #4a4a5a;
}

.btn-sandbox-secondary i {
  width: 14px;
  height: 14px;
}

.sandbox-console {
  background: #0d0d14;
  padding: 1rem;
  border-top: 1px solid #313244;
  min-height: 100px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.9rem;
  position: relative;
}

.sandbox-console::before {
  content: "OUTPUT";
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.65rem;
  color: #3a3a4a;
  font-weight: 700;
  letter-spacing: 1px;
}

.console-line {
  margin-bottom: 0.35rem;
  font-family: "Fira Code", monospace;
  word-break: break-all;
  padding-left: 0.5rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.console-line.log {
  color: #a6e3a1;
  border-left-color: #10b981;
}
.console-line.error {
  color: #f87171;
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 0 4px 4px 0;
}
.console-line.success {
  color: #10b981;
  border-left-color: #10b981;
}
.console-line.system {
  color: #71717a;
  font-style: italic;
  border-left-color: transparent;
}
.console-line.warn {
  color: #fbbf24;
  border-left-color: #f59e0b;
}
@keyframes sandboxSuccess {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.lua-sandbox-container.success {
  animation: sandboxSuccess 0.6s ease-out;
  border-color: #10b981;
}

@media (max-width: 600px) {
  .sandbox-line-numbers {
    width: 35px;
    min-width: 35px;
    font-size: 0.8rem;
    padding: 1rem 0.5rem 1rem 0;
  }

  .sandbox-editor {
    width: calc(100% - 35px);
    padding: 1rem 0.75rem;
    font-size: 0.8rem;
  }

  .sandbox-controls {
    flex-direction: column;
  }

  .sandbox-controls-left {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .btn-run-sandbox {
    flex: 1;
    justify-content: center;
  }
}

/* Scrollbar styles for sandbox */
.sandbox-editor::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sandbox-editor::-webkit-scrollbar-track {
  background: #16161e;
}

.sandbox-editor::-webkit-scrollbar-thumb {
  background: #3a3a4a;
  border-radius: 4px;
}

.sandbox-editor::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

.sandbox-editor::-webkit-scrollbar-corner {
  background: #16161e;
}

/* ========================================
   🥚 ORBLOX EASTER EGG - PIONEER EFFECT
   Easter egg caché pour les 5 premiers
   ======================================== */

/* Container de l'easter egg */
.orblox-easter-egg {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.1) 0%,
    rgba(217, 119, 6, 0.1) 100%
  );
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  animation: orbloxEggReveal 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.orblox-easter-egg::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(251, 191, 36, 0.2),
    transparent
  );
  animation: orbloxEggShine 2s ease-in-out infinite;
}

@keyframes orbloxEggReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes orbloxEggShine {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}

.orblox-egg-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.orblox-egg-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  flex-shrink: 0;
}

.orblox-egg-icon i {
  width: 20px;
  height: 20px;
}

.orblox-egg-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.orblox-egg-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #d97706;
  line-height: 1.2;
}

.orblox-egg-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.orblox-slots-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.orblox-slots-badge.empty {
  background: #6b7280;
  box-shadow: none;
}

.btn-claim-orblox {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: none;
  border-radius: 8px;
  color: #78350f;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.btn-claim-orblox:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

.btn-claim-orblox:disabled {
  background: #9ca3af;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-claim-orblox i {
  width: 16px;
  height: 16px;
}

/* État: déjà obtenu */
.orblox-easter-egg.already-claimed {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1) 0%,
    rgba(16, 185, 129, 0.05) 100%
  );
}

.orblox-easter-egg.already-claimed .orblox-egg-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.orblox-easter-egg.already-claimed .orblox-egg-title {
  color: #10b981;
}

.orblox-easter-egg.already-claimed .btn-claim-orblox {
  background: #10b981;
  color: white;
  cursor: default;
}

/* État: plus de slots */
.orblox-easter-egg.no-slots {
  border-color: rgba(107, 114, 128, 0.3);
  background: rgba(107, 114, 128, 0.05);
  opacity: 0.7;
}

.orblox-easter-egg.no-slots .orblox-egg-icon {
  background: #6b7280;
}

.orblox-easter-egg.no-slots .orblox-egg-title {
  color: #6b7280;
}

/* Easter egg déjà révélé - cacher le hint */
