/* ============================================================
   CHEVALERESQUE — landing.css
   Carrousel 3D, parallaxe, effets de la page d'accueil.
   ============================================================ */

/* --- Layout principal landing -------------------------------- */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
  position: relative;
}

/* --- En-tête : nom + sous-titre ------------------------------ */
.landing-header {
  text-align: center;
  margin-bottom: 50px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 0.2s forwards;
}
.landing-name {
  font-size: 1.7rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: var(--text);
}
.landing-name strong {
  font-weight: 600;
  color: var(--accent-light);
  transition: color 0.8s var(--ease-out);
}
.landing-sub {
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Stage carrousel ----------------------------------------- */
.carousel-stage {
  position: relative;
  width: 100%;
  max-width: 920px;
  height: 480px;
  perspective: 1400px;
  perspective-origin: center 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.carousel {
  position: relative;
  width: 280px;
  height: 420px;
  transform-style: preserve-3d;
}

/* --- Carte TCG ----------------------------------------------- */
.card {
  position: absolute;
  top: 0; left: 0;
  width: 280px;
  height: 420px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 0.5px solid var(--border-strong);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.7s var(--ease-in-out),
    opacity 0.7s var(--ease-in-out),
    filter 0.7s var(--ease-in-out),
    box-shadow 0.7s var(--ease-in-out);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.card[data-theme="art"]     { --card-accent: #D4A53F; --card-deep: #876320; --card-tint: rgba(212,165,63,0.10); }
.card[data-theme="omnis"]   { --card-accent: #7B6FE8; --card-deep: #3D3499; --card-tint: rgba(123,111,232,0.10); }
.card[data-theme="contact"] { --card-accent: #B8526A; --card-deep: #7A2738; --card-tint: rgba(184,82,106,0.10); }

/* Filigrane de fond — icône thématique en watermark */
.card-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18rem;
  color: var(--card-accent);
  opacity: 0.05;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
  z-index: 0;
}
/* Variante : logo image en fond (ex. carte Omnis) */
.card-watermark--logo { opacity: 0.16; }
.card-watermark--logo img {
  width: 95%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
}

/* Halo coloré subtil */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, var(--card-tint), transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s var(--ease-out);
}

/* Bordure dorée fine façon carte rare */
.card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 0.5px solid var(--card-accent);
  border-radius: calc(var(--radius-lg) - 6px);
  opacity: 0.18;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--card-accent);
  opacity: 0.85;
  margin-bottom: 18px;
}
.card-title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--text);
  line-height: 1.15;
}
.card-title em {
  font-style: normal;
  color: var(--card-accent);
}
.card-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: justify;
  flex: 1;
}
.card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  display: flex;
  justify-content: space-between;
}

/* --- États des cartes selon position ------------------------- */
.card.is-center {
  transform: translateX(0) translateZ(40px) rotateY(0deg) scale(1);
  opacity: 1;
  filter: none;
  z-index: 3;
}
.card.is-left {
  transform: translateX(-310px) translateZ(-120px) rotateY(32deg) scale(0.82);
  opacity: 0.42;
  filter: blur(0.5px) saturate(0.6);
  z-index: 2;
}
.card.is-right {
  transform: translateX(310px) translateZ(-120px) rotateY(-32deg) scale(0.82);
  opacity: 0.42;
  filter: blur(0.5px) saturate(0.6);
  z-index: 2;
}
.card.is-left:hover,
.card.is-right:hover {
  opacity: 0.7;
  filter: none;
}

/* --- Bouton valider ----------------------------------------- */
.carousel-action {
  margin-top: 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 1s forwards;
}
.btn-enter {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 32px;
  background: var(--accent-deep);
  color: var(--text);
  border: 0.5px solid var(--accent);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-enter:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px var(--accent-glow),
              0 0 0 4px var(--accent-glow);
}
.btn-enter .arrow {
  transition: transform 0.3s var(--ease-out);
}
.btn-enter:hover .arrow {
  transform: translateX(4px);
}

/* --- Indicateurs (dots) ------------------------------------- */
.carousel-dots {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: center;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}
.dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: 999px;
}

/* --- Pied de landing ---------------------------------------- */
.landing-footer {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

/* --- Parallaxe décoration (orbes latéraux) ------------------ */
.deco-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.5s var(--ease-out), background 1.5s var(--ease-out);
}
.deco-orb.visible { opacity: 0.35; }
.deco-orb-1 {
  width: 380px; height: 380px;
  top: 12%; left: -100px;
  background: var(--accent-deep);
}
.deco-orb-2 {
  width: 460px; height: 460px;
  bottom: 5%; right: -120px;
  background: var(--accent);
}

/* --- Animations --------------------------------------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Entry rise uses opacity + margin only: animating a transform here would
   wrap the 3D card context in a temporary flattened layer and visibly clip
   the side cards until the animation ends. */
@keyframes card-enter {
  from { opacity: 0; margin-top: 40px; }
  to { opacity: 1; margin-top: 0; }
}
.carousel-stage { animation: card-enter 1.1s var(--ease-out) 0.4s backwards; }

/* --- Indication interaction --------------------------------- */
.swipe-hint {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-in 1s ease 1.6s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}
@keyframes fade-in { to { opacity: 0.6; } }

/* --- Responsive --------------------------------------------- */
@media (max-width: 740px) {
  .carousel-stage { height: 440px; max-width: 100%; }
  .carousel { width: 240px; height: 360px; }
  .card { width: 240px; height: 360px; }
  .card-body { padding: 28px 22px 24px; }
  .card-title { font-size: 1.35rem; }
  .card-text { font-size: 0.82rem; }
  .card.is-left  { transform: translateX(-200px) translateZ(-120px) rotateY(35deg) scale(0.7); opacity: 0.3; }
  .card.is-right { transform: translateX(200px)  translateZ(-120px) rotateY(-35deg) scale(0.7); opacity: 0.3; }
  .landing-name { font-size: 1.28rem; }
  .landing-header { margin-bottom: 30px; }
  .deco-orb-1 { width: 240px; height: 240px; }
  .deco-orb-2 { width: 280px; height: 280px; }
}

@media (max-width: 380px) {
  .carousel { width: 210px; height: 320px; }
  .card { width: 210px; height: 320px; }
  .card.is-left  { transform: translateX(-160px) translateZ(-120px) rotateY(38deg) scale(0.65); opacity: 0.25; }
  .card.is-right { transform: translateX(160px)  translateZ(-120px) rotateY(-38deg) scale(0.65); opacity: 0.25; }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
