/* ================================================================
   HYSTER.I.A. MUSIC — Nouvelle Gate
   gate.css — Production (HTML statique pur, pas de build)
   ================================================================ */

:root {
  --font-title: 'Outfit', sans-serif;
  --font-body:  'Inter', sans-serif;
  --black:  #050505;
  --ease:   cubic-bezier(0.19, 1, 0.22, 1);

  /* Entity tokens */
  --senatu-gold:   #d4af37;
  --thorz-red:     #cc2200;
  --anubis-cyan:   #00e5ff;
  --anubis-purple: #7700ff;
  --bjarnulf-ice:  #4488bb;
  --bjarnulf-fire: #ff5500;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--black);
  color: #fff;
  font-family: var(--font-body);
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   INTRO CINÉMATIQUE
══════════════════════════════════════════════ */
#intro-sequence {
  position: fixed; inset: 0;
  background: #000;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1.8s ease;
}

.intro-text {
  font-family: var(--font-title);
  font-size: clamp(1rem, 3.5vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 14px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 3s ease, transform 3s ease;
}
.intro-text.visible {
  opacity: 1;
  transform: scale(1);
}

/* ══════════════════════════════════════════════
   FOND DYNAMIQUE
══════════════════════════════════════════════ */
#global-bg {
  position: fixed; inset: 0;
  z-index: 0;
  background: var(--black);
  opacity: 0.4;
  pointer-events: none;
  transition: background 1.2s ease, opacity 1s ease;
}

/* ══════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════ */
#app {
  position: relative;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: opacity 2s ease;
}
#app.hidden { opacity: 0; pointer-events: none; }

/* ══════════════════════════════════════════════
   HERO HEADER
══════════════════════════════════════════════ */
.hero-header {
  flex-shrink: 0;
  text-align: center;
  padding: 2.4rem 1rem 1rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.88) 0%, transparent 100%);
  pointer-events: none;
  position: relative;
  z-index: 20;
}

.site-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 4.2rem);
  letter-spacing: 10px;
  text-transform: uppercase;
  line-height: 1;
}
.site-title .dot { color: rgba(255,255,255,0.35); }

.site-subtitle {
  margin-top: 0.6rem;
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  font-weight: 300;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.4);
}

.site-hint {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   BANDES DIAGONALES
══════════════════════════════════════════════ */
.entities-container {
  flex-grow: 1;
  display: flex;
  width: calc(100% + 14vw);
  margin-left: -7vw;
  overflow: hidden;
}

.entity-band {
  flex: 1;
  position: relative;
  transform: skewX(-12deg);
  overflow: hidden;
  cursor: pointer;
  border-right: 1px solid rgba(255,255,255,0.04);
  transition: flex 0.9s var(--ease), box-shadow 0.5s ease;
}
.entity-band:last-child { border-right: none; }

/* Accordion hover — requires JS class toggling (see gate.js) */
.entities-container.hovered .entity-band       { flex: 0.55; }
.entities-container.hovered .entity-band.active { flex: 2.8; }

/* ── Fond de bande (texture) ── */
.band-bg {
  position: absolute;
  inset: -5% -20%;
  transform: skewX(12deg);
  opacity: 0.1;
  filter: saturate(0);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.8s ease, filter 0.8s ease;
}
.entity-band.active .band-bg { opacity: 0.55; filter: saturate(1); }

[data-theme="senatu"] .band-bg {
  background:
    repeating-linear-gradient( 45deg, transparent, transparent 18px, rgba(212,175,55,0.07) 18px, rgba(212,175,55,0.07) 19px),
    repeating-linear-gradient(-45deg, transparent, transparent 18px, rgba(212,175,55,0.04) 18px, rgba(212,175,55,0.04) 19px),
    radial-gradient(ellipse at 50% 30%, rgba(212,175,55,0.18) 0%, transparent 60%);
}
[data-theme="thorz"] .band-bg {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(200,30,0,0.07) 3px, rgba(200,30,0,0.07) 4px),
    radial-gradient(ellipse at 50% 40%, rgba(180,0,0,0.22) 0%, transparent 60%);
}
[data-theme="anubis"] .entity-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../images/anubis.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 65%;
    opacity: 0.35;
}
[data-theme="anubis"] .entity-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://senatu.eu/images/bjarnulf.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 65%;
    opacity: 0.35;
}
[data-theme="coming-soon"] .band-bg {
  background: radial-gradient(ellipse at 50% 50%, rgba(60,60,60,0.15) 0%, transparent 60%);
}

/* ── Contenu (counter-skew) ── */
.band-content {
  position: absolute; inset: 0;
  transform: skewX(12deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5;
  padding: 1.5rem;
  text-align: center;
  gap: 0.6rem;
}

/* ── Symbole ── */
.entity-symbol {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  opacity: 0.28;
  display: block;
  margin-bottom: 0.6rem;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.entity-band.active .entity-symbol { opacity: 0.9; transform: scale(1.3); }

.mystery { filter: blur(1.5px); }
.entity-band.active .mystery { filter: blur(0); }

/* ── Nom d'entité ── */
.entity-name {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 6px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
  transition:
    font-size 0.7s var(--ease),
    letter-spacing 0.7s ease,
    transform 0.7s var(--ease),
    color 0.4s ease,
    text-shadow 0.5s ease;
}

/* Transition writing-mode — on bascule via classe JS */
.entity-band.active .entity-name {
  writing-mode: horizontal-tb;
  transform: translateY(-55px);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  letter-spacing: 8px;
}

/* ── Détails ── */
.entity-details {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease 0.28s, transform 0.5s ease 0.28s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 220px;
  position: absolute;
  bottom: 10%;
}
.entity-band.active .entity-details { opacity: 1; transform: translateY(0); }

.entity-desc {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  letter-spacing: 1px;
}

/* ── Boutons Entrer ── */
.enter-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.38);
  color: #fff;
  padding: 0.65rem 1.3rem;
  font-family: var(--font-title);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}
.enter-btn.locked { opacity: 0.5; cursor: default; pointer-events: none; }

/* ══════════════════════════════════════════════
   COULEURS PAR ENTITÉ (état actif)
══════════════════════════════════════════════ */
/* SENATÛ */
[data-theme="senatu"].active .entity-name { color: var(--senatu-gold); animation: shimmer-gold 2.5s ease-in-out infinite; }
[data-theme="senatu"].active .entity-symbol { color: var(--senatu-gold); }
[data-theme="senatu"].active { box-shadow: inset 0 0 80px rgba(212,175,55,0.07); }
[data-theme="senatu"] .enter-btn:hover { background: var(--senatu-gold); border-color: var(--senatu-gold); color: #000; }

/* THORZ */
[data-theme="thorz"].active .entity-name  { color: var(--thorz-red); animation: glitch-name 0.22s step-end infinite alternate; }
[data-theme="thorz"].active .entity-symbol { color: var(--thorz-red); }
[data-theme="thorz"].active { box-shadow: inset 0 0 80px rgba(200,30,0,0.09); }
[data-theme="thorz"] .enter-btn:hover  { background: var(--thorz-red);   border-color: var(--thorz-red); }

/* A.N.U.B.I.S. */
[data-theme="anubis"].active .entity-name  { color: var(--anubis-cyan); animation: neon-pulse 1.4s ease-in-out infinite alternate; }
[data-theme="anubis"].active .entity-symbol { color: var(--anubis-cyan); }
[data-theme="anubis"].active { box-shadow: inset 0 0 80px rgba(0,229,255,0.07); }
[data-theme="anubis"] .enter-btn:hover { background: var(--anubis-cyan); border-color: var(--anubis-cyan); color: #000; box-shadow: 0 0 14px rgba(0,229,255,0.45); }

/* BJARNULF */
[data-theme="bjarnulf"].active .entity-name  { color: var(--bjarnulf-ice); animation: ember-pulse 2s ease-in-out infinite; }
[data-theme="bjarnulf"].active .entity-symbol { color: var(--bjarnulf-ice); }
[data-theme="bjarnulf"].active { box-shadow: inset 0 0 80px rgba(68,136,187,0.07); }
[data-theme="bjarnulf"] .enter-btn:hover { background: var(--bjarnulf-ice); border-color: var(--bjarnulf-ice); }

/* COMING SOON */
[data-theme="coming-soon"].active .entity-name { color: #555; }
[data-theme="coming-soon"].active { box-shadow: inset 0 0 60px rgba(80,80,80,0.05); }

/* ── Badge "locked" ── */
.locked-badge {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 4px;
  color: #555;
  border: 1px dashed #3a3a3a;
  padding: 0.45rem 1rem;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   BANNER DESCRIPTION (lancée par JS)
══════════════════════════════════════════════ */
#hover-desc {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 1.2rem 2rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease, color 0.4s ease;
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.gate-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem 1rem;
  z-index: 20;
}
.footer-link {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.15);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.footer-link:hover { color: rgba(255,255,255,0.45); }

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes shimmer-gold {
  0%   { text-shadow: 0 0 10px rgba(212,175,55,0.3); }
  50%  { text-shadow: 0 0 24px rgba(212,175,55,0.95), 0 0 50px rgba(212,175,55,0.4); }
  100% { text-shadow: 0 0 10px rgba(212,175,55,0.3); }
}

@keyframes neon-pulse {
  from { text-shadow: 0 0 8px rgba(0,229,255,0.4),  0 0 18px rgba(0,229,255,0.15); }
  to   { text-shadow: 0 0 18px rgba(0,229,255,1),   0 0 40px rgba(0,229,255,0.7), 0 0 80px rgba(119,0,255,0.5); }
}

@keyframes ember-pulse {
  0%   { text-shadow: 0 0 10px rgba(68,136,187,0.4); }
  50%  { text-shadow: 0 0 22px rgba(255,85,0,0.8), 0 0 42px rgba(68,136,187,0.4); }
  100% { text-shadow: 0 0 10px rgba(68,136,187,0.4); }
}

@keyframes glitch-name {
  0%  { transform: skew(0deg)   translateY(-55px); clip-path: inset(0 0 0 0); }
  20% { transform: skew(-3deg)  translateY(-55px) translateX(4px);  clip-path: inset(10% 0 45% 0); color: #ff6666; }
  40% { transform: skew(3deg)   translateY(-55px) translateX(-4px); clip-path: inset(55% 0 15% 0); }
  60% { transform: skew(-1.5deg)translateY(-55px); clip-path: inset(0 0 0 0); color: var(--thorz-red); }
  80% { transform: skew(1.5deg) translateY(-55px) translateX(2px);  clip-path: inset(30% 0 8% 0); }
  100%{ transform: skew(0deg)   translateY(-55px); clip-path: inset(0 0 0 0); }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 860px)
══════════════════════════════════════════════ */
@media (max-width: 860px) {
  html, body { overflow: auto; }
  #app { overflow-y: auto; }

  .entities-container {
    flex-direction: column;
    width: 100%; margin-left: 0;
    gap: 2px; overflow: visible;
  }

  .entity-band {
    transform: none;
    flex: none;
    min-height: 180px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: min-height 0.5s ease, box-shadow 0.4s ease;
  }
  .entities-container.hovered .entity-band       { flex: none; }
  .entities-container.hovered .entity-band.active { flex: none; min-height: 280px; }

  .band-bg  { transform: none; inset: 0; }
  .band-content {
    transform: none;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 1.4rem 1.8rem;
    gap: 1.4rem;
  }

  .entity-name {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 1.3rem;
  }
  .entity-band.active .entity-name { transform: none; font-size: 1.5rem; }

  .entity-details {
    opacity: 1; transform: none;
    position: relative; bottom: auto;
    max-width: none; align-items: flex-start;
    text-align: left;
  }

  .entity-symbol { font-size: 1.8rem; margin-bottom: 0; flex-shrink: 0; }
}

/* --- Popup News --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.popup-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.popup-content {
  background: linear-gradient(180deg, rgba(20,20,20,0.95) 0%, rgba(5,5,5,0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 450px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(0);
  transition: transform 0.4s ease;
}

.popup-overlay.hidden .popup-content {
  transform: translateY(20px);
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.popup-close:hover {
  opacity: 1;
}

.popup-title {
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.popup-text {
  color: #aaa;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.popup-text strong {
  color: #00b4ff;
}

.popup-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

/* --- Gate Responsive Fix --- */
@media (max-width: 860px) {
  body { overflow-x: hidden !important; }
  .entities-container {
    padding: 10px 0 !important;
    gap: 5px !important;
  }
  .entity-band {
    min-height: 140px !important;
  }
  .entity-band.active {
    min-height: 240px !important;
  }
  .entity-name {
    font-size: 1.1rem !important;
    letter-spacing: 3px !important;
  }
  .entity-band.active .entity-name {
    font-size: 1.4rem !important;
  }
  .entity-desc {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }
  .enter-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.6rem !important;
  }
  #hover-desc {
    font-size: 0.65rem !important;
    padding: 0.8rem !important;
  }
}
