/* ============================================================
   CV MODES — Mode switcher + RPG + Timeline + Platformer
   ============================================================ */

/* ─── VARIABLES LOCALES ─────────────────────────────────── */
:root {
  --mode-accent: #4a90e2;
  --mode-accent-hover: #2c6fbe;
  --mode-bg: #ffffff;
  --mode-surface: #f8f9fa;
  --mode-border: #e0e0e0;
  --mode-text: #1a1a2e;
  --mode-text-muted: #666;
  --mode-radius: 12px;
  --mode-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --mode-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
  --mode-bg: #0f0f1a;
  --mode-surface: #1a1a2e;
  --mode-border: #2a2a3e;
  --mode-text: #e8e8f0;
  --mode-text-muted: #888;
  --mode-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ─── MODE SWITCHER BAR ─────────────────────────────────── */
.mode-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 0.5rem;
  background: var(--mode-surface);
  border-bottom: 1px solid var(--mode-border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mode-switcher-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mode-text-muted);
  margin-right: 0.5rem;
  white-space: nowrap;
}

.mode-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid var(--mode-border);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  font-family: 'Lexend', 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mode-text-muted);
  transition: all var(--mode-transition);
  white-space: nowrap;
}

.mode-btn .mode-label {
  display: none;
}

/* Tooltip */
.mode-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1d26;
  color: #e8eaf0;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
}

.mode-btn:hover::after {
  opacity: 1;
}

.mode-btn:hover {
  border-color: var(--mode-accent);
  color: var(--mode-accent);
  background: rgba(74, 144, 226, 0.06);
  transform: translateY(-1px);
}

.mode-btn.active {
  background: var(--mode-accent);
  border-color: var(--mode-accent);
  color: white;
  box-shadow: 0 2px 12px rgba(74, 144, 226, 0.35);
}

.mode-btn .mode-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* ─── OVERLAY BASE ──────────────────────────────────────── */
.mode-overlay {
  display: none;
  min-height: calc(100vh - 53px);
}

.mode-overlay.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   RPG MODE — Aventure Textuelle
   ═══════════════════════════════════════════════════════════ */
#rpg-mode {
  background: #080c10;
  color: #00e676;
  font-family: 'Courier New', 'Lucida Console', monospace;
  min-height: calc(100vh - 53px);
  display: none;
}

#rpg-mode.active {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr;
  gap: 0;
  min-height: calc(100vh - 53px);
}

/* Header RPG */
.rpg-header {
  grid-column: 1 / -1;
  padding: 1rem 2rem;
  border-bottom: 1px solid #1a3a1a;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #040608;
}

.rpg-title-art {
  font-size: 1.1rem;
  font-weight: bold;
  color: #00e676;
  text-shadow: 0 0 10px rgba(0,230,118,0.5);
  letter-spacing: 0.05em;
}

.rpg-breadcrumb {
  font-size: 0.75rem;
  color: #4a6a4a;
  flex: 1;
}

.rpg-breadcrumb span {
  color: #ffdd57;
}

.rpg-level-badge {
  font-size: 0.7rem;
  background: rgba(0,230,118,0.1);
  border: 1px solid rgba(0,230,118,0.3);
  color: #00e676;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Main terminal */
.rpg-terminal {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  border-right: 1px solid #1a3a1a;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: calc(100vh - 53px - 60px);
}

.rpg-room-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rpg-room-icon {
  font-size: 1.75rem;
}

.rpg-room-name {
  font-size: 1.15rem;
  color: #ffdd57;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255,221,87,0.4);
}

.rpg-room-subtitle {
  font-size: 0.75rem;
  color: #4a6a4a;
  margin-top: 0.1rem;
}

/* Description text avec typewriter */
.rpg-description {
  line-height: 2;
  font-size: 0.875rem;
  color: #b8d8b8;
  border-left: 2px solid #1a4a1a;
  padding-left: 1rem;
  min-height: 100px;
}

.rpg-description p {
  margin: 0 0 0.5rem;
}

/* Stats de la salle */
.rpg-room-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rpg-stat-chip {
  background: rgba(0,230,118,0.08);
  border: 1px solid rgba(0,230,118,0.2);
  color: #00e676;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.rpg-stat-chip .stat-key {
  color: #4a6a4a;
  margin-right: 0.25rem;
}

/* Items trouvés */
.rpg-items-found {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rpg-item-found {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,221,87,0.05);
  border: 1px solid rgba(255,221,87,0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  animation: itemSlideIn 0.4s ease both;
}

@keyframes itemSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.rpg-item-found .item-icon {
  font-size: 1.1rem;
}

.rpg-item-found .item-name {
  color: #ffdd57;
  font-weight: bold;
}

.rpg-item-found .item-desc {
  color: #4a6a4a;
  font-size: 0.72rem;
}

/* Actions / navigation */
.rpg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #1a3a1a;
}

.rpg-action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #2a4a2a;
  color: #00e676;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.rpg-action-btn:hover {
  background: rgba(0,230,118,0.1);
  border-color: #00e676;
  transform: translateY(-1px);
}

.rpg-action-btn.primary {
  border-color: #ffdd57;
  color: #ffdd57;
}

.rpg-action-btn.primary:hover {
  background: rgba(255,221,87,0.1);
  border-color: #ffdd57;
}

.rpg-action-btn.danger {
  border-color: #ef5350;
  color: #ef5350;
}

.rpg-action-btn.danger:hover {
  background: rgba(239,83,80,0.1);
}

/* Sidebar inventaire */
.rpg-sidebar {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 53px - 60px);
  background: #060a0e;
}

.rpg-sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4a6a4a;
  border-bottom: 1px solid #1a3a1a;
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}

/* Hero stats */
.rpg-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rpg-hero-name {
  font-size: 0.9rem;
  color: #ffdd57;
  font-weight: bold;
}

.rpg-hero-class {
  font-size: 0.72rem;
  color: #4a6a4a;
  margin-bottom: 0.25rem;
}

.rpg-stat-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rpg-stat-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #6a8a6a;
}

.rpg-stat-bar-track {
  height: 6px;
  background: #1a2a1a;
  border-radius: 3px;
  overflow: hidden;
}

.rpg-stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.rpg-stat-bar-fill.green { background: linear-gradient(90deg, #00c853, #00e676); }
.rpg-stat-bar-fill.yellow { background: linear-gradient(90deg, #ffd600, #ffdd57); }
.rpg-stat-bar-fill.blue { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.rpg-stat-bar-fill.red { background: linear-gradient(90deg, #b71c1c, #ef5350); }

/* Inventaire items */
.rpg-inventory {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rpg-inv-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: rgba(0,230,118,0.04);
  border-radius: 4px;
  font-size: 0.72rem;
  animation: itemAppear 0.5s ease both;
}

@keyframes itemAppear {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.rpg-inv-item .inv-icon { font-size: 0.9rem; line-height: 1.4; }
.rpg-inv-item .inv-name { color: #00e676; font-weight: bold; }
.rpg-inv-item .inv-desc { color: #4a6a4a; display: block; margin-top: 0.1rem; }

.rpg-inv-empty {
  font-size: 0.75rem;
  color: #2a4a2a;
  font-style: italic;
}

/* Notification achievement */
.rpg-achievement-toast {
  position: fixed;
  top: 70px;
  right: 20px;
  background: #1a2a10;
  border: 1px solid #ffdd57;
  color: #ffdd57;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  z-index: 1000;
  max-width: 280px;
  animation: toastAnim 3.5s ease forwards;
  pointer-events: none;
}

@keyframes toastAnim {
  0% { opacity: 0; transform: translateX(60px); }
  15% { opacity: 1; transform: translateX(0); }
  75% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(60px); }
}

.rpg-achievement-toast .toast-title {
  font-weight: bold;
  margin-bottom: 0.2rem;
}

/* Curseur clignotant */
.rpg-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #00e676;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   TIMELINE MODE — Frise chronologique animée
   ═══════════════════════════════════════════════════════════ */
#timeline-mode {
  background: var(--mode-bg);
  color: var(--mode-text);
  min-height: calc(100vh - 53px);
  display: none;
}

#timeline-mode.active {
  display: block;
  padding: 3rem 1.5rem 4rem;
}

.tl-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.tl-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--mode-text);
}

.tl-header p {
  color: var(--mode-text-muted);
  font-size: 0.9rem;
}

.tl-header .tl-year-range {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--mode-text-muted);
  background: var(--mode-surface);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--mode-border);
}

/* Conteneur principal */
.tl-track {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

/* Ligne centrale */
.tl-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--mode-accent) 8%,
    var(--mode-accent) 92%,
    transparent 100%
  );
  transform: translateX(-50%);
  z-index: 0;
}

/* Item de timeline — grille 3 colonnes : [carte gauche][dot][carte droite] */
.tl-item {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  grid-template-rows: auto;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tl-item.tl-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Le dot : toujours dans la colonne centrale */
.tl-dot {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.75rem;
  position: relative;
  z-index: 2;
}

.tl-dot-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 0 4px var(--mode-bg), 0 0 0 6px currentColor;
  flex-shrink: 0;
}

/* Carte : colonne droite (col 3) par défaut (items impairs) */
.tl-card {
  grid-column: 3;
  grid-row: 1;
  padding: 0 0 0 1.5rem;
  background: var(--mode-surface);
  border: 1px solid var(--mode-border);
  border-radius: var(--mode-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--mode-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Carte : colonne gauche (col 1) pour les items pairs */
.tl-item:nth-child(even) .tl-card {
  grid-column: 1;
  grid-row: 1;
}

.tl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.tl-period-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mode-text-muted);
  margin-bottom: 0.5rem;
}

.tl-period-tag .tl-period-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tl-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--mode-text);
}

.tl-card-company {
  font-size: 0.85rem;
  color: var(--mode-text-muted);
  margin-bottom: 0.75rem;
}

.tl-card-description {
  font-size: 0.825rem;
  line-height: 1.65;
  color: var(--mode-text-muted);
  margin-bottom: 1rem;
}

/* Badges stats animées */
.tl-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tl-stat-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

.tl-stat-badge .stat-number {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

/* Chips de skills */
.tl-skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tl-skill-chip {
  background: var(--mode-bg);
  border: 1px solid var(--mode-border);
  color: var(--mode-text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
}

/* Couleurs par entreprise */
.tl-item[data-company="sqli"] .tl-dot-inner {
  color: #1565c0;
  background: rgba(21,101,192,0.1);
}
.tl-item[data-company="ubigreen"] .tl-dot-inner {
  color: #2e7d32;
  background: rgba(46,125,50,0.1);
}
.tl-item[data-company="innov"] .tl-dot-inner {
  color: #6a1b9a;
  background: rgba(106,27,154,0.1);
}
.tl-item[data-company="doit"] .tl-dot-inner {
  color: #bf360c;
  background: rgba(191,54,12,0.1);
}

.tl-item[data-company="sqli"] .tl-period-dot { background: #1565c0; }
.tl-item[data-company="ubigreen"] .tl-period-dot { background: #2e7d32; }
.tl-item[data-company="innov"] .tl-period-dot { background: #6a1b9a; }
.tl-item[data-company="doit"] .tl-period-dot { background: #bf360c; }

.tl-item[data-company="sqli"] .tl-stat-badge {
  color: #1565c0;
  background: rgba(21,101,192,0.08);
  border-color: rgba(21,101,192,0.25);
}
.tl-item[data-company="ubigreen"] .tl-stat-badge {
  color: #2e7d32;
  background: rgba(46,125,50,0.08);
  border-color: rgba(46,125,50,0.25);
}
.tl-item[data-company="innov"] .tl-stat-badge {
  color: #6a1b9a;
  background: rgba(106,27,154,0.08);
  border-color: rgba(106,27,154,0.25);
}
.tl-item[data-company="doit"] .tl-stat-badge {
  color: #bf360c;
  background: rgba(191,54,12,0.08);
  border-color: rgba(191,54,12,0.25);
}

/* Délais d'apparition en cascade */
.tl-item:nth-child(1) { transition-delay: 0s; }
.tl-item:nth-child(2) { transition-delay: 0.1s; }
.tl-item:nth-child(3) { transition-delay: 0.2s; }
.tl-item:nth-child(4) { transition-delay: 0.3s; }
.tl-item:nth-child(5) { transition-delay: 0.4s; }
.tl-item:nth-child(6) { transition-delay: 0.5s; }
.tl-item:nth-child(7) { transition-delay: 0.6s; }

/* ═══════════════════════════════════════════════════════════
   PLATFORMER MODE — Mini jeu canvas
   ═══════════════════════════════════════════════════════════ */
#platformer-mode {
  background: #1a1a2e;
  color-scheme: dark;
  color: white;
  min-height: calc(100vh - 53px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 1rem 2rem;
}

#platformer-mode.active {
  display: flex;
}

/* Isolation totale du thème light : tous les enfants héritent du blanc */
#platformer-mode * {
  color: inherit;
}

.plt-header {
  text-align: center;
  color: white;
  margin-bottom: 1rem;
}

.plt-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: #e8e8ff;
}

.plt-header p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* HUD */
.plt-hud {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.05);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
}

.plt-hud-item {
  text-align: center;
}

.plt-hud-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  display: block;
}

.plt-hud-value {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  font-family: 'Courier New', monospace;
}

/* Canvas */
#platformer-canvas {
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.15);
  max-width: 100%;
  cursor: pointer;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Contrôles */
.plt-controls {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.plt-control-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}

.plt-key {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: monospace;
  color: rgba(255,255,255,0.7);
}

/* Info panel (quand on collecte un item) */
.plt-info-panel {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(10,10,30,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  color: white;
  font-size: 0.82rem;
  max-width: 320px;
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
  opacity: 0;
  z-index: 500;
  pointer-events: none;
}

.plt-info-panel.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.plt-info-panel .plt-info-title {
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

/* Boutons mobiles */
.plt-mobile-controls {
  display: none;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.plt-mobile-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.1s;
  touch-action: none;
}

.plt-mobile-btn:active {
  background: rgba(255,255,255,0.25);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Mode switcher */
  .mode-switcher-label { display: none; }
  .mode-btn { padding: 0.4rem 0.55rem; }

  /* RPG */
  #rpg-mode.active {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .rpg-sidebar {
    border-top: 1px solid #1a3a1a;
    border-right: none;
    max-height: 200px;
    overflow-y: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .rpg-sidebar-section-title { width: 100%; }

  /* Timeline */
  .tl-track::before {
    left: 28px;
  }

  .tl-item {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto;
  }

  /* Dot : toujours en colonne 1 */
  .tl-dot {
    grid-column: 1 !important;
    grid-row: 1;
    padding-top: 0.5rem;
  }

  /* Carte : toujours en colonne 2, même pour les items pairs */
  .tl-item .tl-card,
  .tl-item:nth-child(even) .tl-card {
    grid-column: 2 !important;
    grid-row: 1;
    padding: 0 0 0 1rem !important;
  }

  /* Platformer */
  .plt-mobile-controls { display: flex; }
  .plt-hud { gap: 1rem; }
}

@media (max-width: 480px) {
  .mode-btn { padding: 0.35rem 0.55rem; }
  .rpg-terminal { padding: 1rem; }
  .rpg-description { font-size: 0.8rem; }
}

/* ─── MODE SWITCHER : fond sombre pour RPG et platformer ─── */
body.plt-mode-active .mode-switcher,
body.rpg-mode-active .mode-switcher {
  background: #0a0a12;
  border-bottom-color: rgba(255,255,255,0.07);
}

body.plt-mode-active .mode-switcher-label,
body.rpg-mode-active .mode-switcher-label {
  color: rgba(255,255,255,0.3);
}

body.plt-mode-active .mode-btn,
body.rpg-mode-active .mode-btn {
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.1);
}

body.plt-mode-active .mode-btn:hover,
body.rpg-mode-active .mode-btn:hover {
  color: white;
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
}

body.plt-mode-active .mode-btn.active,
body.rpg-mode-active .mode-btn.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: white;
}

/* ─── TOGGLE THÈME : masqué en RPG et platformer ────────── */
body.plt-mode-active .toggle-container,
body.rpg-mode-active .toggle-container {
  display: none !important;
}

/* ─── SÉLECTEUR DE LANGUE : pilule flottante en mode alternatif ────────── */
body.alt-mode-active .cv-lang-selector .lang-current {
  background: rgba(15, 15, 25, 0.55);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.alt-mode-active .cv-lang-selector .lang-current:hover {
  background: rgba(15, 15, 25, 0.75);
  border-color: #37EFBA;
}

body.alt-mode-active .cv-lang-selector .lang-globe,
body.alt-mode-active .cv-lang-selector .lang-chevron {
  opacity: 0.75;
}

/* ─── TOGGLE THÈME : pilule flottante en modes mk / dr / ry ─────────── */
body.mk-mode-active .toggle-container .theme-toggle,
body.dr-mode-active .toggle-container .theme-toggle,
body.ry-mode-active .toggle-container .theme-toggle {
  background: rgba(15, 15, 25, 0.55);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ─── MENU FLOTTANT + NAV LATÉRALE : masqués en modes alternatifs ───────── */
body.alt-mode-active .floating-menu-button,
body.alt-mode-active .floating-menu-options,
body.alt-mode-active #floatingMenuOptions,
body.alt-mode-active #sideNav {
  display: none !important;
}

/* ─── PRINT : cacher les modes alternatifs ───────────────── */
@media print {
  .mode-switcher,
  #rpg-mode,
  #timeline-mode,
  #platformer-mode,
  #mario-mode,
  #darkroom-mode,
  #rugby-mode { display: none !important; }
}

/* ─── BOUTON RETOUR COMMUN ───────────────────────────────── */
.mode-back-btn {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.6rem 1.5rem;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  color: rgba(255,255,255,0.65);
  font-family: 'Lexend', 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.mode-back-btn:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ════════════════════════════════════════════════════════════
   🏎️ MARIO KART MODE
   ════════════════════════════════════════════════════════════ */
#mario-mode {
  background: linear-gradient(180deg, #1a0a2e 0%, #0d1f3c 100%);
  color: #fff;
  min-height: calc(100vh - 53px);
  display: none;
}
#mario-mode.active { display: block; }

.mk-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* En-tête */
.mk-header {
  text-align: center;
}
.mk-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFD700;
  text-shadow: 0 2px 8px rgba(255,215,0,0.45);
}
.mk-flag { font-size: 1.6rem; }
.mk-title { font-family: 'Lexend', sans-serif; }
.mk-subtitle {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
  letter-spacing: 0.06em;
}

/* Circuit overview */
.mk-track-overview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.mk-dots-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.mk-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Lexend', sans-serif;
  position: relative;
  z-index: 1;
}
.mk-dot.active {
  background: var(--dot-color, #e74c3c);
  border-color: var(--dot-color, #e74c3c);
  color: #fff;
  box-shadow: 0 0 14px var(--dot-color, #e74c3c);
  transform: scale(1.2);
}
.mk-dot:hover:not(.active) {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.mk-track-line {
  width: 24px;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.35) 0, rgba(255,255,255,0.35) 6px, transparent 6px, transparent 10px);
  margin: 0 -2px;
}
.mk-lap-counter {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mk-lap-counter strong { color: #FFD700; }

/* Carte secteur */
.mk-card {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--sector-color, #e74c3c);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.mk-card-header {
  background: var(--sector-color, #e74c3c);
  padding: 0.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mk-period { opacity: 0.85; }
.mk-sector-name {
  font-size: 1.45rem;
  font-weight: 700;
  padding: 1rem 1.25rem 0.25rem;
  margin: 0;
  color: #FFD700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.mk-role-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 0.75rem;
  flex-wrap: wrap;
}
.mk-role-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
}
.mk-client, .mk-duration {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
}
.mk-text {
  padding: 0 1.25rem 1rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mk-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
}
@media (max-width: 560px) {
  .mk-bottom-row { grid-template-columns: 1fr; }
}
.mk-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.6rem;
}
.mk-items { display: flex; flex-direction: column; gap: 0.4rem; }
.mk-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  cursor: help;
  transition: background 0.15s;
}
.mk-item:hover { background: rgba(255,255,255,0.1); }
.mk-item-icon { font-size: 1rem; }
.mk-item-name { font-size: 0.78rem; font-weight: 500; }

.mk-stats { display: flex; flex-direction: column; gap: 0.45rem; }
.mk-stat { display: flex; align-items: center; gap: 0.5rem; }
.mk-stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  width: 90px;
  flex-shrink: 0;
  text-transform: capitalize;
}
.mk-stat-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.mk-stat-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.mk-stat-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  width: 24px;
  text-align: right;
}

/* Navigation */
.mk-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.mk-nav-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: 'Lexend', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.mk-nav-btn:hover:not(:disabled) {
  border-color: #FFD700;
  color: #FFD700;
}
.mk-nav-btn:disabled { opacity: 0.3; cursor: default; }
.mk-nav-primary {
  background: #FFD700;
  border-color: #FFD700;
  color: #1a0a2e !important;
  font-weight: 700;
}
.mk-nav-primary:hover:not(:disabled) {
  background: #ffe033;
  border-color: #ffe033;
  color: #1a0a2e !important;
}

/* ════════════════════════════════════════════════════════════
   📸 DARKROOM MODE
   ════════════════════════════════════════════════════════════ */
#darkroom-mode {
  background: #0d0b08;
  color: #e8d5b0;
  min-height: calc(100vh - 53px);
  display: none;
}
#darkroom-mode.active { display: block; }

.dr-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* En-tête */
.dr-header { text-align: center; }
.dr-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #e8b86d;
  letter-spacing: 0.04em;
}
.dr-lens { font-size: 1.6rem; }
.dr-title { font-family: 'Lexend', sans-serif; }
.dr-subtitle {
  font-size: 0.72rem;
  color: rgba(232,213,176,0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Pellicule */
.dr-filmstrip-wrapper {
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,184,109,0.3) transparent;
}
.dr-filmstrip {
  display: flex;
  gap: 0;
  width: max-content;
  background: #1a1208;
  border-radius: 6px;
  padding: 0.5rem;
  margin: 0 auto;
}
.dr-thumb {
  width: 120px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.2s;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}
.dr-thumb:hover { background: rgba(255,255,255,0.06); }
.dr-thumb.active {
  border-color: #e8b86d;
  background: rgba(232,184,109,0.1);
}
.dr-thumb-perf {
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,0.8) 0, rgba(0,0,0,0.8) 4px, transparent 4px, transparent 7px);
}
.dr-thumb-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(232,213,176,0.5);
  font-family: monospace;
  margin: 0.3rem 0 0.15rem;
}
.dr-thumb.active .dr-thumb-num { color: #e8b86d; }
.dr-thumb-label {
  font-size: 0.65rem;
  color: rgba(232,213,176,0.6);
  line-height: 1.3;
}
.dr-thumb.active .dr-thumb-label { color: #e8d5b0; }

/* Photo principale */
.dr-main { flex: 1; }
.dr-photo {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(232,184,109,0.15);
  transition: opacity 0.35s ease;
}
.dr-photo.developing { opacity: 0; }

.dr-photo-inner { padding: 1.5rem; }
.dr-photo-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.dr-photo-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #e8b86d;
}
.dr-photo-subtitle {
  font-size: 0.78rem;
  opacity: 0.6;
  font-style: italic;
}
.dr-exif-panel {
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  min-width: 200px;
  font-family: monospace;
}
.dr-exif-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.7rem;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dr-exif-row:last-child { border-bottom: none; }
.dr-exif-key { color: rgba(232,213,176,0.45); }
.dr-exif-val { color: #e8b86d; font-weight: 600; text-align: right; }

.dr-description {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(232,213,176,0.85);
  margin: 0 0 1rem;
  font-style: italic;
}
.dr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dr-tag {
  background: rgba(232,184,109,0.12);
  border: 1px solid rgba(232,184,109,0.25);
  color: rgba(232,184,109,0.8);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* Filtres photo */
.dr-filter-sepia  .dr-photo-inner { background: linear-gradient(135deg, #1a1208 0%, #2a1c0d 100%); }
.dr-filter-warm   .dr-photo-inner { background: linear-gradient(135deg, #1a0f08 0%, #2a1a08 100%); }
.dr-filter-cool   .dr-photo-inner { background: linear-gradient(135deg, #080d1a 0%, #0d1428 100%); color: #b0c8e8; }
.dr-filter-cool .dr-photo-title { color: #7eb8e8; }
.dr-filter-cool .dr-exif-val { color: #7eb8e8; }
.dr-filter-blue   .dr-photo-inner { background: linear-gradient(135deg, #080c1a 0%, #0c1020 100%); color: #a0b4d4; }
.dr-filter-blue .dr-photo-title { color: #6090c8; }
.dr-filter-blue .dr-exif-val { color: #6090c8; }
.dr-filter-vibrant .dr-photo-inner { background: linear-gradient(135deg, #0d1a12 0%, #0a2010 100%); color: #b0e8c0; }
.dr-filter-vibrant .dr-photo-title { color: #37efba; }
.dr-filter-vibrant .dr-exif-val { color: #37efba; }
.dr-filter-dark   .dr-photo-inner { background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%); color: #c0c0c0; }
.dr-filter-dark .dr-photo-title { color: #aaa; }

/* Navigation pellicule */
.dr-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.dr-arrow {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1.5px solid rgba(232,184,109,0.3);
  background: transparent;
  color: rgba(232,184,109,0.7);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dr-arrow:hover:not(:disabled) { border-color: #e8b86d; color: #e8b86d; }
.dr-arrow:disabled { opacity: 0.25; cursor: default; }
.dr-dots { display: flex; gap: 0.4rem; }
.dr-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(232,184,109,0.2);
  cursor: pointer;
  transition: all 0.2s;
}
.dr-nav-dot.active { background: #e8b86d; transform: scale(1.3); }

/* Thème dark sur darkroom : ajustement mode-back-btn */
#darkroom-mode .mode-back-btn {
  border-color: rgba(232,184,109,0.2);
  color: rgba(232,184,109,0.5);
}
#darkroom-mode .mode-back-btn:hover {
  border-color: rgba(232,184,109,0.6);
  color: #e8b86d;
  background: rgba(232,184,109,0.06);
}

/* ════════════════════════════════════════════════════════════
   🏉 RUGBY XV MODE
   ════════════════════════════════════════════════════════════ */
#rugby-mode {
  background: linear-gradient(180deg, #1a0808 0%, #0d1a0d 60%, #0a150a 100%);
  color: #fff;
  min-height: calc(100vh - 53px);
  display: none;
}
#rugby-mode.active { display: block; }

.ry-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* En-tête */
.ry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(200,0,0,0.15);
  border: 1px solid rgba(200,0,0,0.3);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ry-team-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e53935;
  text-shadow: 0 1px 6px rgba(229,57,53,0.4);
}
.ry-club { font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.ry-season {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Contenu principal */
.ry-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 720px) {
  .ry-content { grid-template-columns: 1fr; }
}

/* Terrain */
.ry-pitch-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.ry-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #2d6a2d;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
/* Lignes du terrain via pseudo-éléments / divs */
.ry-pitch-lines { position: absolute; inset: 0; pointer-events: none; }
.ry-line {
  position: absolute;
  left: 3%;
  right: 3%;
  height: 2px;
  background: rgba(255,255,255,0.35);
}
.ry-halfway { top: 50%; }
.ry-22m-top { top: 22%; }
.ry-22m-bot { top: 78%; }
.ry-try-zone {
  position: absolute;
  left: 0; right: 0;
  height: 9%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
}
.ry-try-top { top: 0; }
.ry-try-bot { bottom: 0; }
.ry-center-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 15%;
  aspect-ratio: 1;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 50%;
}
/* Stries de gazon */
.ry-pitch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.08) 0, rgba(0,0,0,0.08) 1px,
    transparent 1px, transparent 40px
  );
}

/* Joueurs */
.ry-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.15s;
}
.ry-player:hover { transform: translate(-50%, -50%) scale(1.15); }
.ry-player.selected { transform: translate(-50%, -50%) scale(1.2); }
.ry-player-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: border-color 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ry-player:hover .ry-player-icon,
.ry-player.selected .ry-player-icon {
  border-color: #e53935;
  background: rgba(229,57,53,0.25);
  box-shadow: 0 0 12px rgba(229,57,53,0.5);
}
/* Avants (pos 1-8) en rouge, Arrières (9-15) en blanc */
.ry-avant .ry-player-icon { border-color: rgba(229,57,53,0.5); }
.ry-arriere .ry-player-icon { border-color: rgba(255,255,255,0.35); }
.ry-player-num {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  font-family: monospace;
}
.ry-player-label {
  font-size: 0.5rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
  background: rgba(0,0,0,0.5);
  padding: 1px 4px;
  border-radius: 3px;
}
.ry-pitch-legend {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* Panneau latéral */
.ry-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ry-info-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  min-height: 140px;
  padding: 1rem;
}
.ry-info-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120px;
  gap: 0.5rem;
  color: rgba(255,255,255,0.25);
  font-size: 1.5rem;
  text-align: center;
}
.ry-info-placeholder p { font-size: 0.78rem; margin: 0; }
.ry-info-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ry-info-icon { font-size: 1.5rem; }
.ry-info-pos { font-size: 0.7rem; color: rgba(255,255,255,0.45); margin-bottom: 0.15rem; }
.ry-info-skill { font-size: 0.95rem; font-weight: 700; color: #e53935; }
.ry-info-level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ry-level-bar {
  height: 6px;
  background: linear-gradient(90deg, #e53935, #ff8a80);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.ry-info-level span {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e53935;
  white-space: nowrap;
}
.ry-info-detail {
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

/* Stats de saison */
.ry-stats-section {
  background: rgba(229,57,53,0.07);
  border: 1px solid rgba(229,57,53,0.2);
  border-radius: 12px;
  padding: 1rem;
}
.ry-stats-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(229,57,53,0.8);
  margin-bottom: 0.75rem;
}
.ry-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.ry-stat {
  text-align: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 0.4rem;
}
.ry-stat-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e53935;
  letter-spacing: 0.05em;
}
.ry-stat-label {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.2;
}

/* Légende */
.ry-positions-legend {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}
.ry-legend-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: rgba(255,255,255,0.45);
}
.ry-legend-row { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.15rem; }
.ry-legend-fwd { color: rgba(229,57,53,0.8); font-size: 0.6rem; }
.ry-legend-bck { color: rgba(255,255,255,0.45); font-size: 0.6rem; }

/* ─── ONGLETS SIDEBAR ────────────────────────────────────── */
.ry-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.25rem;
}
.ry-tab {
  flex: 1;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-family: 'Lexend', 'Segoe UI', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ry-tab.active {
  background: #e53935;
  color: #fff;
  box-shadow: 0 2px 8px rgba(229,57,53,0.35);
}
.ry-tab:hover:not(.active) {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.06);
}

.ry-tab-content {
  overflow-y: auto;
  max-height: 340px;
  scrollbar-width: thin;
  scrollbar-color: rgba(229,57,53,0.3) transparent;
}

/* ─── ONGLET PARCOURS ─────────────────────────────────────── */
.ry-career-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ry-career-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.04);
  border-left: 2px solid rgba(229,57,53,0.4);
  border-radius: 0 8px 8px 0;
  padding: 0.5rem 0.6rem;
  transition: border-color 0.15s;
}
.ry-career-item:hover { border-color: #e53935; }
.ry-career-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.ry-career-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.ry-career-company {
  font-size: 0.68rem;
  color: rgba(229,57,53,0.85);
  margin: 0.1rem 0;
}
.ry-career-detail {
  font-size: 0.66rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}

.ry-tech-list { margin-top: 0.25rem; }
.ry-tech-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.5rem;
}
.ry-tech-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.ry-tech-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.65);
  width: 155px;
  flex-shrink: 0;
}
.ry-tech-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.ry-tech-bar {
  height: 100%;
  background: linear-gradient(90deg, #e53935, #ff6f6f);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ─── TOGGLE/MENU masqués en nouveaux modes ──────────────── */
body.mk-mode-active .toggle-container,
body.dr-mode-active .toggle-container,
body.ry-mode-active .toggle-container { display: none !important; }
