/* === TUTORIAL OVERLAY === */

.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: none;
  display: none; /* Caché par défaut */
}

.tutorial-overlay.active {
  display: block; /* Affiché seulement quand actif */
}

.tutorial-overlay * {
  pointer-events: auto;
}

/* === BACKDROP OBSCURCI === */

.tutorial-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  z-index: 1;
  animation: tutorialFadeIn 0.3s ease-out;
}

@keyframes tutorialFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* === SPOTLIGHT SVG === */

.tutorial-spotlight-svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.tutorial-spotlight {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  border-radius: 12px;
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.3) inset,
    0 0 30px 8px rgba(59, 130, 246, 0.25);
  animation: spotlightPulse 3s ease-in-out infinite;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spotlightPulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(59, 130, 246, 0.5),
      0 0 0 1px rgba(59, 130, 246, 0.3) inset,
      0 0 30px 8px rgba(59, 130, 246, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(59, 130, 246, 0.6),
      0 0 0 1px rgba(59, 130, 246, 0.4) inset,
      0 0 40px 12px rgba(59, 130, 246, 0.3);
  }
}

/* === TOOLTIP === */

.tutorial-tooltip {
  position: fixed;
  z-index: 4;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 40px rgba(59, 130, 246, 0.15);
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: tooltipSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(12px);
}

@keyframes tooltipSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* === HEADER === */

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  user-select: none;
}

.tutorial-header::before {
  content: '⋮⋮';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: rgba(148, 163, 184, 0.4);
  letter-spacing: -2px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.tutorial-header:hover::before {
  color: rgba(148, 163, 184, 0.7);
}

.tutorial-header h2 {
  margin: 0;
  margin-left: 1.75rem;
  font-size: 1.375rem;
  font-weight: 600;
  background: linear-gradient(120deg, #60a5fa 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
  flex: 1;
}

.tutorial-close {
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.8);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tutorial-close:hover {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(226, 232, 240, 1);
  transform: scale(1.1);
}

.tutorial-close:active {
  transform: scale(0.95);
}

/* === CONTENT === */

.tutorial-content {
  padding: 1.5rem;
}

.tutorial-content p {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.95);
  letter-spacing: 0.01em;
}

.tutorial-content p:last-child {
  margin-bottom: 0;
}

.tutorial-content strong {
  color: rgba(226, 232, 240, 1);
  font-weight: 600;
}

.tutorial-list {
  margin: 0.75rem 0 0 0;
  padding-left: 0;
  list-style: none;
}

.tutorial-list li {
  margin: 0.5rem 0;
  padding-left: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.9);
}

.tutorial-tip {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid rgba(59, 130, 246, 0.5);
  border-radius: 6px;
  font-size: 0.875rem;
  color: rgba(147, 197, 253, 0.95);
}

/* === FOOTER === */

.tutorial-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* === PROGRESS DOTS === */

.tutorial-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.tutorial-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutorial-progress-dot.active {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
  transform: scale(1.4);
}

.tutorial-progress-dot.completed {
  background: rgba(16, 185, 129, 0.6);
  transform: scale(1.1);
}

/* === CHECKBOX === */

.tutorial-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.tutorial-checkbox:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.tutorial-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.tutorial-checkbox label {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.9);
  cursor: pointer;
  user-select: none;
}

/* === BUTTONS === */

.tutorial-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.tutorial-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  outline: none;
  position: relative;
  overflow: hidden;
}

.tutorial-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.tutorial-btn:active::before {
  width: 300px;
  height: 300px;
}

.tutorial-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tutorial-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.tutorial-btn-primary:active {
  transform: translateY(0);
}

.tutorial-btn-secondary {
  background: rgba(51, 65, 85, 0.6);
  color: rgba(226, 232, 240, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.tutorial-btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-2px);
}

.tutorial-btn-secondary:active {
  transform: translateY(0);
}

/* === RESPONSIVE === */

@media (max-width: 640px) {
  .tutorial-tooltip {
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
  }

  .tutorial-header h2 {
    font-size: 1.2rem;
  }

  .tutorial-content p {
    font-size: 0.95rem;
  }

  .tutorial-buttons {
    flex-direction: column;
  }

  .tutorial-btn {
    width: 100%;
  }
}

@media (max-height: 600px) {
  .tutorial-tooltip {
    max-height: 85vh;
    overflow-y: auto;
  }

  .tutorial-header {
    padding: 1rem 1.25rem 0.75rem;
  }

  .tutorial-content {
    padding: 1rem 1.25rem;
  }

  .tutorial-footer {
    padding: 0 1.25rem 1rem;
  }
}

/* === ANIMATIONS SMOOTHES === */

.tutorial-tooltip,
.tutorial-spotlight,
.tutorial-backdrop {
  will-change: transform, opacity;
}
