/* Base modale - alignée avec la page setup glass */
.welcome-modal {
  z-index: 10000;
  display: none;
}

.welcome-modal[aria-hidden="false"] {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.welcome-modal .modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 5, 25, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.welcome-modal[aria-hidden="false"] .modal__backdrop {
  animation: backdropFadeIn 0.4s ease-out;
}

/* Panel : style glass comme le reste de la page, pas coupé */
.welcome-modal .modal__panel.welcome-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 94vw);
  max-width: 920px;
  max-height: 90vh;
  margin: 0;
  padding: 52px 48px 40px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: visible;
  background: linear-gradient(145deg, rgba(28, 12, 52, 0.98), rgba(18, 8, 38, 0.98));
  border: 1px solid rgba(24, 231, 255, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(24, 231, 255, 0.2),
    inset 0 0 20px rgba(24, 231, 255, 0.05);
  border-radius: 24px;
  text-align: center;
}

.welcome-modal[aria-hidden="false"] .welcome-panel {
  animation: modalNexus 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-modal.closing .welcome-panel {
  animation: modalCloseOut 0.3s ease-out;
}

.welcome-modal.closing .modal__backdrop {
  animation: backdropFadeOut 0.3s ease-out;
}

/* En-tête */
.welcome-header {
  margin-bottom: 40px;
}

.welcome-title {
  font-size: 36px;
  font-weight: 900;
  margin: 0 0 16px;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #18e7ff, #b978f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Couleurs NOV/IA/BOT comme le header */
.welcome-title .brand-noviabot {
  display: inline-flex;
  gap: 0.02em;
  margin-right: 0.25em;
}
.welcome-title .nov { color: #b978f7; }
.welcome-title .ia { color: #18e7ff; }
.welcome-title .bot { color: #b978f7; }

.welcome-subtitle {
  font-size: 17px;
  color: rgba(232, 234, 255, 0.9);
  line-height: 1.7;
  margin: 0;
}

.highlight {
  color: #18e7ff;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(24, 231, 255, 0.4);
}

/* Cartes de choix */
.welcome-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}

.choice-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(24, 231, 255, 0.25);
  border-radius: 18px;
  padding: 36px 32px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.choice-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 231, 255, 0.1), rgba(185, 120, 247, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.choice-card:hover {
  border-color: #18e7ff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 3px rgba(24, 231, 255, 0.12),
    0 12px 40px rgba(24, 231, 255, 0.25);
  transform: translateY(-4px);
}

.choice-card:hover::before {
  opacity: 1;
}

.choice-card:active {
  transform: translateY(-1px);
}

.manual-card {
  border-color: rgba(185, 120, 247, 0.3);
}

.manual-card:hover {
  border-color: #b978f7;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 3px rgba(185, 120, 247, 0.12),
    0 12px 40px rgba(185, 120, 247, 0.25);
}

.choice-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.choice-desc {
  font-size: 15px;
  color: rgba(232, 234, 255, 0.8);
  line-height: 1.7;
  margin: 0 0 20px;
}

.choice-desc strong {
  color: #18e7ff;
  font-weight: 700;
}

.manual-card .choice-desc strong {
  color: #b978f7;
}

.choice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(24, 231, 255, 0.12);
  border: 1px solid rgba(24, 231, 255, 0.25);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #18e7ff;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.manual-card .choice-badge {
  background: rgba(185, 120, 247, 0.15);
  border-color: rgba(185, 120, 247, 0.3);
  color: #b978f7;
}

.choice-card:hover .choice-badge {
  background: rgba(24, 231, 255, 0.2);
  border-color: rgba(24, 231, 255, 0.4);
}

.manual-card:hover .choice-badge {
  background: rgba(185, 120, 247, 0.2);
  border-color: rgba(185, 120, 247, 0.4);
}

/* Section exemples */
.welcome-example {
  background: rgba(24, 231, 255, 0.05);
  border: 1px solid rgba(24, 231, 255, 0.2);
  border-radius: 14px;
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}

.welcome-example-text {
  font-size: 15px;
  color: rgba(232, 234, 255, 0.9);
  line-height: 1.8;
  margin: 0;
}

.welcome-example-text strong {
  color: #ffffff;
  font-weight: 700;
}

/* Footer */
.welcome-footer-note {
  font-size: 13px;
  color: rgba(232, 234, 255, 0.6);
  margin: 32px 0 0;
  text-align: center;
}

/* Vue Téléchargement NOVIATRON */
.welcome-download-view {
  text-align: center;
}

.welcome-download-title .nov,
.welcome-download-title .bot { color: #b978f7; }
.welcome-download-title .ia { color: #18e7ff; }

.welcome-download-btn {
  display: inline-block;
  margin: 20px 0 28px;
  padding: 0;
  background: none;
  border: none;
  color: #e8eaff;
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.welcome-download-btn:hover {
  color: #18e7ff;
  text-decoration: underline;
}

.welcome-download-desc {
  font-size: 17px;
  color: rgba(232, 234, 255, 0.85);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.welcome-download-info {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(24, 231, 255, 0.2);
}

.welcome-download-info p {
  font-size: 14px;
  color: rgba(232, 234, 255, 0.65);
  margin: 6px 0;
}

.welcome-back-btn {
  display: inline-block;
  margin-top: 28px;
  padding: 0;
  background: none;
  border: none;
  color: rgba(232, 234, 255, 0.85);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.welcome-back-btn:hover {
  color: #18e7ff;
}

/* Bouton fermer : même taille que settings, grande croix, effet rotation au survol */
.welcome-modal .modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-modal .modal__close:hover {
  background: rgba(255, 72, 125, 0.2);
  border-color: #ff487d;
  color: #ff487d;
  transform: rotate(90deg) scale(1.08);
}

/* Responsive */
@media (max-width: 768px) {
  .welcome-panel {
    padding: 36px 28px 32px;
    width: min(94vw, 600px);
  }

  .welcome-title {
    font-size: 28px;
  }

  .welcome-subtitle {
    font-size: 15px;
  }

  .welcome-choices {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 32px 0;
  }

  .choice-card {
    padding: 32px 28px;
  }

  .choice-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .welcome-panel {
    padding: 32px 24px 28px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .welcome-example {
    padding: 20px;
  }

  .welcome-example-text {
    font-size: 14px;
  }
}

/* Accessibilité - Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .welcome-panel,
  .choice-card {
    animation: none !important;
    transition: none !important;
  }

  .choice-card:hover {
    transform: none;
  }
}

/* Keyframes pour la modale (éviter dépendance à un autre fichier) */
@keyframes backdropFadeIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(12px); }
}
@keyframes backdropFadeOut {
  from { opacity: 1; backdrop-filter: blur(12px); }
  to { opacity: 0; backdrop-filter: blur(0); }
}
@keyframes modalNexus {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalCloseOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95) translateY(10px); }
}
