/* =============================================
   ONBOARDING — Styles intégrés à l'architecture
   Background blanc | Thème MyJeunesse (rose)
   ============================================= */

/* ─── Conteneur principal ─── */
.onboarding-container {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #ffffff !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.onboarding-container.hidden {
  display: none !important;
}

/* ─── Bouton Passer (haut droite) ─── */
.onboarding-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 0;
  flex-shrink: 0;
}

.btn-skip {
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-tertiary, #999999);
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}

.btn-skip:active {
  color: var(--color-primary, #E91E63);
}

/* ─── Progress Dots ─── */
.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px 16px;
  flex-shrink: 0;
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-bg-secondary, #f5f5f5);
  border: 1px solid rgba(233, 30, 99, 0.12);
  transition: all 0.35s ease;
  cursor: pointer;
}

.progress-dot.active {
  width: 24px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--color-primary, #E91E63), var(--color-primary-light, #F48FB1));
  border-color: transparent;
}

/* ─── Slides Wrapper ─── */
.onboarding-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ─── Slide individuelle ─── */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slide.prev {
  opacity: 0;
  transform: translateX(-60px);
}

/* ─── Contenu du slide ─── */
.slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  width: 100%;
  gap: 14px;
}

/* ─── Icônes des croyances ─── */
.belief-icon {
  width: 140px;
  height: 140px;
  margin-bottom: 4px;
}

.belief-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.08));
}

.belief-number {
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary, #E91E63);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.belief-title {
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.625rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.belief-text {
  font-size: 0.9375rem;
  font-weight: 400;
  color: #555555;
  line-height: 1.65;
  max-width: 300px;
}

/* ─── Navigation bas ─── */
.onboarding-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  gap: 12px;
}

/* ─── Bouton Précédent ─── */
.btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary, #555555);
  background: none;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.btn-prev.hidden {
  display: none !important;
}

.btn-prev svg {
  transition: transform 0.2s ease;
}

.btn-prev:active {
  color: var(--color-primary, #E91E63);
}

.btn-prev:active svg {
  transform: translateX(-2px);
}

/* ─── Bouton Suivant ─── */
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary, #E91E63), var(--color-primary-dark, #C2185B));
  border: none;
  border-radius: 9999px;
  padding: 14px 28px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
  transition: all 0.2s ease;
  margin-left: auto;
}

.btn-next.hidden {
  display: none !important;
}

.btn-next:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.2);
}

.btn-next svg {
  transition: transform 0.2s ease;
}

.btn-next:active svg {
  transform: translateX(2px);
}

/* ─── Bouton Commencer (dernier slide) ─── */
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary, #E91E63), var(--color-primary-dark, #C2185B));
  border: none;
  border-radius: 9999px;
  padding: 14px 28px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.35);
  transition: all 0.2s ease;
  margin-left: auto;
}

.btn-start.hidden {
  display: none !important;
}

.btn-start:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.25);
}

.btn-start svg {
  transition: transform 0.2s ease;
}

.btn-start:active svg {
  transform: translateX(2px);
}

/* ─── Responsive ─── */
@media (min-width: 360px) {
  .belief-icon { width: 150px; height: 150px; }
  .belief-title { font-size: 1.75rem; }
}

@media (min-width: 390px) {
  .slide-content { max-width: 340px; gap: 16px; }
  .belief-icon { width: 160px; height: 160px; }
  .belief-title { font-size: 1.875rem; }
  .belief-text { font-size: 1rem; }
}

@media (min-width: 768px) {
  .onboarding-progress { padding-top: 12px; gap: 10px; }
  .progress-dot { width: 8px; height: 8px; }
  .progress-dot.active { width: 28px; }
  .slide-content { max-width: 480px; gap: 20px; }
  .belief-icon { width: 190px; height: 190px; }
  .belief-title { font-size: 2.25rem; }
  .belief-text { font-size: 1.125rem; max-width: 420px; line-height: 1.7; }
  .belief-number { font-size: 0.875rem; }
  .onboarding-nav { padding: 16px 40px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .btn-next, .btn-start { padding: 16px 36px; font-size: 1rem; }
  .btn-prev { font-size: 1rem; padding: 14px 20px; }
  .btn-skip { font-size: 1rem; padding: 10px 16px; }
}

@media (min-width: 1024px) {
  .slide-content { max-width: 560px; }
  .belief-icon { width: 200px; height: 200px; }
  .belief-title { font-size: 2.5rem; }
}

/* ─── Petits écrans ─── */
@media (max-width: 359px) {
  .belief-icon { width: 110px; height: 110px; }
  .belief-title { font-size: 1.375rem; }
  .slide-content { gap: 10px; }
  .belief-text { font-size: 0.875rem; }
  .onboarding-progress { gap: 6px; padding-top: 4px; }
  .progress-dot { width: 6px; height: 6px; }
  .progress-dot.active { width: 20px; }
  .onboarding-nav { padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .btn-next, .btn-start { padding: 12px 20px; font-size: 0.875rem; }
}

/* ─── Welcome Slide ─── */
.welcome-slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.welcome-title {
  font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
}

.welcome-title span {
  color: var(--color-primary, #E91E63);
}

.welcome-subtitle {
  font-size: 0.9375rem;
  color: #555555;
  max-width: 280px;
  line-height: 1.6;
}

/* ─── Réduction de mouvement ─── */
@media (prefers-reduced-motion: reduce) {
  .slide,
  .progress-dot,
  .btn-next,
  .btn-start,
  .btn-prev {
    transition-duration: 0.01ms !important;
  }
}
