/* ==== PAGE DE CHOIX DES UNIVERS – MATHIEU ARGIBAY ==== */

/* ----- Bouton retour accueil ----- */

.back-home-btn {
  position: fixed;
  top: 1.3rem;
  right: clamp(1.5rem, 5vw, 4rem);
  z-index: 30;
  padding: 0.5rem 1.2rem;
  font-size: 0.88rem;
  border-radius: 999px;
  background: rgba(5, 5, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  color: #fff;
  text-decoration: none;
  transition: all 0.25s ease;
}

.back-home-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ----- Layout global ----- */

.show {
  opacity: 1;
}

.choice-page {
  position: relative;
  padding: 5rem clamp(1.5rem, 5vw, 4rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  overflow: hidden;
}

.choice-page section {
  padding: 40px 20px;
}

/* ----- Fond : gradient + grille + orbes ----- */

.choice-bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: radial-gradient(circle at 0% 0%, #6a82fb33, transparent 60%),
    radial-gradient(circle at 100% 100%, #fc5c7d33, transparent 60%),
    radial-gradient(circle at 50% 120%, #111322, #05060a 70%);
}

.choice-bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.11;
  background-image: linear-gradient(to right, #ffffff11 1px, transparent 1px),
    linear-gradient(to bottom, #ffffff11 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: screen;
}

.choice-bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.orb--left {
  width: 360px;
  height: 360px;
  top: -80px;
  left: -120px;
  background: radial-gradient(circle, #6a82fbff, transparent 60%);
}

.orb--right {
  width: 360px;
  height: 360px;
  bottom: -80px;
  right: -100px;
  background: radial-gradient(circle, #fc5c7dff, transparent 60%);
  animation-delay: 3s;
}

/* ----- Hero ----- */

.choice-hero {
  max-width: 880px;
  position: relative;
  z-index: 1;
}

.choice-hero-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.6rem;
}

.choice-title {
  font-size: clamp(2.2rem, 4.5vw, 3.3rem);
  line-height: 1.1;
  margin-bottom: 0.9rem;
}

.choice-title span {
  background: linear-gradient(135deg, #6a82fb, #fc5c7d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.choice-subtitle {
  max-width: 520px;
  opacity: 0.95;
  line-height: 1.6;
}

/* ----- Grille des univers ----- */

.choice-universes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

/* ----- Cartes univers ----- */

.universe {
  position: relative;
  perspective: 1600px;
  border-radius: 1.8rem;
  padding: 3.3rem 2.2rem;
  margin-bottom: 60px;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, #0b0d18ee, #070712f5);
  border: 1px solid #ffffff1f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(18px);
  transform: translateY(0) scale(1);
  transition: box-shadow 0.45s ease, border-color 0.3s ease,
    background 0.4s ease;
  overflow: hidden;
}

/* halo permanent léger */
.universe::before {
  content: "";
  position: absolute;
  inset: -30%;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.universe--web::before {
  background: radial-gradient(circle at 0% 0%, #6a82fbaa, transparent 60%),
    radial-gradient(circle at 100% 100%, #fc5c7d44, transparent 60%);
}

.universe--video::before {
  background: radial-gradient(circle at 0% 0%, #fc5c7dcc, transparent 60%),
    radial-gradient(circle at 100% 100%, #6a82fb55, transparent 60%);
}

/* cercle d’éclatement */
.universe::after {
  content: "";
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 260%;
  height: 260%;
  border-radius: 999px;
  background: radial-gradient(circle, #ffffff44, transparent 60%);
  opacity: 0;
  pointer-events: none;
}

/* ----- Contenu texte univers ----- */

.universe-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.universe-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.universe-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ffffff33;
  background: #00000066;
  backdrop-filter: blur(12px);
}

.universe-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6a82fb;
}

.universe-pill--pink::before {
  background: #fc5c7d;
}

.universe-mini {
  font-size: 0.78rem;
  opacity: 0.75;
}

.universe-title {
  font-size: 1.7rem;
}

.universe-text {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.97;
}

.universe-tags {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.universe-tags li {
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #ffffff22;
  background: #05060d99;
}

/* CTA univers */

.universe-cta {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.universe-icon {
  font-size: 1.5rem;
}

.universe-link-label {
  position: relative;
}

.universe-link-label::after {
  content: "↗";
  font-size: 0.9rem;
  margin-left: 0.35rem;
  opacity: 0.85;
}

/* ----- Visuels univers ----- */

.universe-visual {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Couche lumineuse */

.visual-layer {
  position: absolute;
  inset: 10% 0 0;
  border-radius: 1.5rem;
  opacity: 0.45;
  filter: blur(18px);
  transform: translate3d(0, 10px, 0);
  transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
}

.visual-layer--code {
  background: radial-gradient(circle at 0% 50%, #6a82fb88, transparent 60%);
}

.visual-layer--timeline {
  background: radial-gradient(circle at 100% 50%, #fc5c7daa, transparent 65%);
}

/* Cartes visuelles */

.visual-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 280px;
  border-radius: 1.3rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  transform: translate3d(0, 0, 0) rotate3d(1, 0, 0, 0deg);
  transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 0.45s ease;
}

.visual-card--video {
  max-width: 260px;
}

.visual-card-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: #02030a;
}

.visual-card-inner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Browser (web) */

.visual-card-inner--browser {
  background: #02030a;
}

.visual-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  background: linear-gradient(90deg, #15182a, #262b4a);
}

.visual-browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff33;
}

.visual-browser-body {
  width: 100%;
  overflow: hidden;
}

/* Vidéo (timeline) */

.visual-card-inner--video {
  background: radial-gradient(circle at 0% 0%, #fc5c7d33, #02020b 55%);
  padding-bottom: 0.5rem;
}

.visual-video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem 1.2rem 0.9rem 0.9rem;
}

.visual-video-thumb img {
  width: 100%;
  height: auto;
}

.visual-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-play span {
  display: inline-flex;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid #ffffffdd;
  background: #00000066;
  font-size: 1.4rem;
  justify-content: center;
  align-items: center;
}

.visual-timeline-bars {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.65rem 0;
}

.visual-timeline-bars span {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffffff22, #fc5c7d, #6a82fb);
  opacity: 0.9;
}

/* Chips flottantes */

.visual-floating-chip {
  position: absolute;
  right: 6px;
  bottom: 2px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #000000c4;
  border: 1px solid #ffffff55;
  backdrop-filter: blur(12px);
  transform: translate3d(0, 0, 0);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.visual-floating-chip--web {
  right: 8px;
  bottom: -4px;
}

.visual-floating-chip--video {
  right: -2px;
  bottom: 6px;
}

/* ----- Hover : POP + ÉCLATEMENT ----- */

@keyframes card-pop {
  0% {
    transform: translateY(0) scale(1) rotateX(0deg);
  }
  35% {
    transform: translateY(-18px) scale(1.06) rotateX(10deg);
  }
  65% {
    transform: translateY(-12px) scale(1.03) rotateX(6deg);
  }
  100% {
    transform: translateY(-14px) scale(1.04) rotateX(8deg);
  }
}

@keyframes burst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

.universe:hover {
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #151a35ee, #0a0b18f5);
}

.universe:hover::before {
  opacity: 0.9;
}

.universe:hover::after {
  animation: burst 0.6s ease-out forwards;
}

.universe:hover .visual-layer {
  opacity: 0.85;
  filter: blur(26px);
  transform: translateY(-10px) scale(1.1);
}

.universe:hover .visual-card {
  animation: card-pop 0.55s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.95),
    0 0 45px rgba(106, 130, 251, 0.35), 0 0 65px rgba(252, 92, 125, 0.35);
}

.universe:hover .visual-card-inner img {
  transform: scale(1.12);
}

.universe:hover .visual-floating-chip {
  transform: translateY(-10px);
  opacity: 1;
}

/* ----- Animation orbes ----- */

@keyframes orbFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(15px, -10px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-10px, 15px, 0) scale(0.98);
  }
}

/* ----- Responsive ----- */

@media (max-width: 1100px) {
  .choice-universes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .choice-page {
    padding: 4.5rem 1.4rem 3.5rem;
  }

  .choice-hero {
    margin-top: 2.8rem;
  }

  .choice-universes {
    gap: 2rem;
  }

  .universe {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.9rem 1.6rem;
    gap: 1.6rem;
  }

  .universe-visual {
    order: -1;
    margin-bottom: 0.4rem;
  }

  .visual-floating-chip {
    display: none;
  }

  .visual-card {
    max-width: min(260px, 75vw);
    margin: 0 auto;
  }

  /* Hover adouci sur petits écrans (évite les mouvements trop violents) */
  .universe:hover .visual-card {
    animation: none;
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  }

  .universe:hover::after {
    animation: burst 0.5s ease-out forwards;
  }
}

@media (max-width: 600px) {
  .choice-title {
    font-size: 2rem;
  }

  .visual-card {
    max-width: min(230px, 80vw);
  }
}
