/* 
====== Développé par TEAM LogicPulse ======
| YouTube :                               |
| Discord :                               |
| Instagram :                             |
===========================================
*/

/* ================================
   Tokens (thème, couleurs, rayons)
   ================================ */
:root {
  --bg: #2f2a39; /* Dégradé global de la page */
  --card: #342f40; /* Couleur de carte (si besoin) */
  --text: #eceaf3; /* Couleur du texte principal */
  --muted: #b8b4c6; /* Texte secondaire */
  --brand: #8e7cf8; /* Dégradé bouton 1 */
  --brand-2: #6c63ff; /* Dégradé bouton 2 */
  --radius: 26px; /* Rayon des grosses cartes */
  --shadow: 0 40px 100px rgba(10, 10, 20, 0.55); /* Ombre carte */
  --panel-bg: linear-gradient(
    180deg,
    #3f3950,
    #2f2a39 65%,
    #2b2533
  ); /* Fond unifié de la grande carte */
}

/* Reset de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}

/* ================================
   Arrière-plan global de la page
   ================================ */
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  background: radial-gradient(
      1100px 700px at 15% 15%,
      #3b3650 0%,
      transparent 60%
    ),
    radial-gradient(1100px 700px at 85% 85%, #2a2537 0%, transparent 60%),
    linear-gradient(180deg, #2a2435, #201c27 60%, #1a1620);
  color: var(--text);
  display: grid;
  place-items: center; /* Centre la grande carte */
  padding: 32px;
  overflow: hidden;
}
/* Halo animé discret derrière la page */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(142, 124, 248, 0.28),
    rgba(108, 99, 255, 0.24),
    transparent 40%,
    rgba(142, 124, 248, 0.28)
  );
  filter: blur(80px) saturate(120%);
  animation: spin 70s linear infinite;
  pointer-events: none;
  opacity: 0.6;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   Carte principale (2 colonnes)
   ================================ */
.shell {
  width: min(1240px, 96vw);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr; /* Légère priorité au visuel gauche */
  gap: 0;
  border-radius: var(--radius);
  position: relative;
  isolation: isolate;
  min-height: 680px;
  background: var(--panel-bg); /* Fond identique sur les 2 colonnes */
  box-shadow: var(--shadow);
}

/* =========================================
   Colonne gauche : cadre visuel + carrousel
   ========================================= */
.media {
  position: relative;
  padding: 20px; /* Laisse voir le fond autour de l'image (marge interne) */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
/* Carte interne qui contient l’image (coins arrondis + bordure fine) */
.frame {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #0f0d14; /* fond sombre sous l'image */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 40px rgba(0, 0, 0, 0.45);
  position: relative;
}

/* Bouton "Retour au site" (pill en haut à droite du cadre) */
.top-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
}
/* Par défaut texte noir */
.back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  color: #000;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.back-pill .arr {
  font-weight: 700;
}
.back-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Zone d’affichage des slides */
.viewport {
  position: absolute;
  inset: 0;
}

/* Une slide du carrousel */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.slide.active {
  opacity: 1;
  transform: scale(1);
}
/* Image en cover pour remplir le cadre sans déformer */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
}

/* Voile dégradé en bas pour améliorer la lisibilité des légendes */
.gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(
    to top,
    rgba(10, 10, 16, 0.85),
    rgba(10, 10, 16, 0) 60%
  );
  pointer-events: none;
}
/* Légende : placée au-dessus des “tirets” */
.caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 64px;
  color: #ffffff;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.2px;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.75), 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Indicateurs (petits “tirets” comme la maquette) */
.dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}
.dot {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 0;
}
.dot.active {
  background: rgba(255, 255, 255, 0.96);
  width: 38px;
}

/* =====================================
   Colonne droite : formulaire de login
   ===================================== */
.panel {
  padding: 164px 56px; /* Grand espace pour respirer */
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.panel h1 {
  font-size: 36px;
  line-height: 1.08;
  margin-bottom: 0;
  font-weight: 800;
  text-align: center;
  width: 100%;
}
.panel .muted {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* Empêche les slides cachées de capter les clics */
.slide {
  pointer-events: none;
  z-index: 0;
}

/* La slide active seule est cliquable et au-dessus */
.slide.active {
  pointer-events: auto;
  z-index: 1;
}

/* Tout le contenu des slides est non cliquable par défaut */
.slide,
.slide * {
  pointer-events: none !important;
  z-index: 0;
}

/* On n'autorise que le LIEN du titre dans la slide active */
.slide.active {
  z-index: 1;
}
.slide.active .caption a {
  pointer-events: auto !important;
}

/* (Optionnel) curseur par défaut sur l'image pour éviter l'ambiguïté */
.slide img {
  cursor: default;
}

/* Formulaire centré et cohérent en largeur */
form {
  display: grid;
  gap: 20px;
  width: min(520px, 100%);
  margin: 0 auto;
}
.field {
  position: relative;
}
.field input {
  width: 100%;
  padding: 16px 48px 16px 16px;
  background: #2a2433;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 16px;
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder {
  color: #a6a1b6;
}
.field input:focus {
  border-color: rgba(142, 124, 248, 0.85);
  box-shadow: 0 0 0 6px rgba(142, 124, 248, 0.22);
}
/* Œil pour afficher/masquer le mot de passe */
.eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #cfcbe2;
  cursor: pointer;
  font-size: 18px;
}

/* CTA principal */
.primary {
  width: 100%;
  margin-top: 6px;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.2px;
  color: #13131a;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 56px rgba(110, 98, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.2s ease;
}
.primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

/* Liens auxiliaires (ex. “Mot de passe oublié ?”) */
.links {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
}
.links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ================================
   Responsive (tablettes / mobiles)
   ================================ */
@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr; /* Passe en 1 colonne */
    width: 100%;
    max-width: 760px; /* largeur maxi mais utile sur mobile */
    min-height: unset;
    margin-inline: auto; /* centre horizontalement même si body a du padding */
  }
  body {
    padding: 16px; /* évite que 96vw + padding > 100vw, supprime le décalage */
  }
  .media {
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 16px;
  }
  .frame {
    min-height: 300px;
  }
  .panel {
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 40px 28px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  .media {
    padding: 12px;
  }
  .panel {
    padding: 32px 20px;
  }
}
