/* ==========================================================================
   DIXDES - LANDING PAGE VITRINE (SITE INTERNET WEB)
   Aesthetics: Dark luxury, gold accents, glassmorphism, responsive
   ========================================================================== */

/* Par défaut, la vitrine est masquée (pour l'application mobile et le jeu) */
#dixdes-web-landing {
  display: none;
}

/* Déverrouillage TOTAL du scroll pour la vitrine web */
html.dixdes-landing-active {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100% !important;
  scroll-behavior: smooth !important;
  overscroll-behavior: auto !important;
}

html.dixdes-landing-active body,
body.dixdes-landing-active {
  overflow-y: visible !important;
  overflow-x: hidden !important;
  background: #060a16 !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  touch-action: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  display: block !important;
  position: static !important;
}

/* Affichage instantané à 0ms de la vitrine lorsque activée */
html.dixdes-landing-active #dixdes-web-landing {
  display: block !important;
}

/* Masquage instantané de tous les écrans et conteneurs du jeu */
html.dixdes-landing-active .screen-view,
html.dixdes-landing-active #canvas3d-container,
html.dixdes-landing-active .offline-banner,
html.dixdes-landing-active .modal,
html.dixdes-landing-active .carnival-shop-overlay,
body.dixdes-landing-active .screen-view,
body.dixdes-landing-active #canvas3d-container,
body.dixdes-landing-active .offline-banner,
body.dixdes-landing-active .modal,
body.dixdes-landing-active .carnival-shop-overlay {
  display: none !important;
}

/* Conteneur principal de la vitrine (Plein écran avec scroll natif garanti) */
.dixdes-web-landing {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0c1222 45%, #050811 100%);
  color: #f8fafc;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  z-index: 999999;
}

/* Halo de fond et étoiles subtiles */
.dixdes-web-landing::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 500px;
  background: radial-gradient(ellipse at 50% -20%, rgba(245, 158, 11, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.landing-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   NAVBAR (Fixée en haut lors du défilement)
   -------------------------------------------------------------------------- */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(6, 10, 22, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 16px 16px;
  margin-bottom: 20px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.landing-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  object-fit: cover;
}

.landing-brand-name {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #fde047 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.landing-nav-link:hover {
  color: #fbbf24;
}

.landing-nav-cta {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a !important;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.landing-hero {
  padding: 70px 0 50px;
  text-align: center;
}

.landing-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde047;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.landing-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: #ffffff;
}

.landing-hero-title span.highlight {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero-subtitle {
  font-size: 1.22rem;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Boutons Stores */
.landing-store-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.landing-btn-store {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #0f172a;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px 24px;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.landing-btn-store:hover {
  border-color: #f59e0b;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25);
  background: #151e32;
}

.landing-btn-store svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.landing-btn-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.landing-btn-store-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.landing-btn-store-main {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.landing-store-status-tag {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 8px;
  letter-spacing: 0.3px;
  display: inline-block;
  vertical-align: middle;
}

.landing-store-hint {
  font-size: 0.9rem;
  color: #fbbf24;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 50px;
}

/* Bannière Vitrine 3D */
.landing-banner-wrap {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  border-radius: 20px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4) 0%, rgba(56, 189, 248, 0.2) 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 158, 11, 0.2);
}

.landing-banner-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   FEATURES GRID
   -------------------------------------------------------------------------- */
.landing-section {
  padding: 70px 0;
}

.landing-section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}

.landing-section-tag {
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.landing-section-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 12px;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.landing-feature-card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 30px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.landing-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.landing-feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(245, 158, 11, 0.15);
  background: rgba(21, 30, 50, 0.85);
}

.landing-feature-card:hover::before {
  opacity: 1;
}

.landing-feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.landing-feature-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.landing-feature-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   STEPS SECTION (COMMENT JOUER)
   -------------------------------------------------------------------------- */
.landing-steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.landing-step-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  text-align: center;
}

.landing-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.landing-step-box h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.landing-step-box p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.landing-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0 30px;
  margin-top: 50px;
  background: rgba(5, 8, 17, 0.8);
}

.landing-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}

.landing-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.landing-footer-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.landing-footer-link:hover {
  color: #fbbf24;
}

.landing-btn-admin-gate {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.landing-btn-admin-gate:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fde047;
}

.landing-footer-copy {
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 20px;
}

/* --------------------------------------------------------------------------
   MODALE ACCÈS ADMINISTRATEUR
   -------------------------------------------------------------------------- */
.landing-admin-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.landing-admin-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.landing-admin-modal-box {
  width: 100%;
  max-width: 440px;
  background: #0f172a;
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.25);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-admin-modal-backdrop.is-open .landing-admin-modal-box {
  transform: translateY(0);
}

.landing-admin-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.landing-admin-modal-close:hover {
  color: #ffffff;
}

.landing-admin-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.landing-admin-modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 12px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.landing-admin-modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.landing-admin-modal-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.4;
}

.landing-admin-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.landing-admin-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.landing-admin-form-input {
  width: 100%;
  box-sizing: border-box;
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-admin-form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.landing-admin-error-msg {
  display: none;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: left;
}

.landing-admin-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 12px;
  padding: 13px;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landing-admin-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

/* --------------------------------------------------------------------------
   BANDEAU FLOTTANT DU MODE TESTEUR WEB
   -------------------------------------------------------------------------- */
.dixdes-tester-floating-pill {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 9999999;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(245, 158, 11, 0.3);
  font-size: 0.78rem;
  font-weight: 800;
  color: #fde047;
  backdrop-filter: blur(10px);
}

.dixdes-tester-pill-btn-lock {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dixdes-tester-pill-btn-lock:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .landing-hero-title {
    font-size: 2.3rem;
  }
  .landing-hero-subtitle {
    font-size: 1.05rem;
  }
  .landing-nav-links {
    display: none;
  }
  .landing-btn-store {
    width: 100%;
    justify-content: center;
  }
  .landing-footer-content {
    flex-direction: column;
    text-align: center;
  }
  .landing-footer-links {
    justify-content: center;
  }
}
