/* ════════════════════════════════════════════════════════════
   HOME.CSS — Styles spécifiques à public/home.html
   Police : 'Share Tech Mono' (déjà importée dans style.css)
   ════════════════════════════════════════════════════════════ */

/* ── Reset / base pour la page home ─────────────────────────────────────── */
.home-page {
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS GLOBALES
   ══════════════════════════════════════════════════════════════════════════ */

/* Glitch texte — décalage RGB */
@keyframes hp-glitch-anim {
  0%   { clip-path: inset(0 0 98% 0); transform: translate(-3px, 0); color: #ff0033; }
  5%   { clip-path: inset(40% 0 50% 0); transform: translate(3px, 0); color: #00ffff; }
  10%  { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 0); color: #00ff41; }
  15%  { clip-path: inset(20% 0 70% 0); transform: translate(2px, 0); color: #ff0033; }
  20%  { clip-path: inset(0 0 0 0); transform: translate(0); color: inherit; }
  100% { clip-path: inset(0 0 0 0); transform: translate(0); color: inherit; }
}

@keyframes hp-glitch-before {
  0%   { clip-path: inset(10% 0 85% 0); transform: translate(-3px, 0); opacity: 0.8; }
  10%  { clip-path: inset(60% 0 30% 0); transform: translate(3px, 0); }
  20%  { clip-path: inset(0 0 0 0); transform: translate(0); opacity: 0; }
  100% { opacity: 0; }
}

/* Typewriter */
@keyframes hp-typing {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Glow pulsation (CTA) */
@keyframes hp-glow-pulse {
  0%, 100% { box-shadow: 0 0 6px #00ff41, 0 0 0 0 rgba(0,255,65,0); }
  50%       { box-shadow: 0 0 18px #00ff41, 0 0 30px rgba(0,255,65,0.2); }
}

/* Fade-in entrée */
@keyframes hp-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Classe glitch réutilisable ─────────────────────────────────────────── */
.hp-glitch {
  position: relative;
}
.hp-glitch::before,
.hp-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
}
.hp-glitch::before {
  color: #ff0033;
  text-shadow: 2px 0 #ff0033;
  animation: hp-glitch-before 6s infinite step-end;
  animation-delay: 1s;
}
.hp-glitch::after {
  color: #00ffff;
  text-shadow: -2px 0 #00ffff;
  animation: hp-glitch-anim 6s infinite step-end;
  animation-delay: 1.5s;
}

/* ══════════════════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════════════════ */
.home-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #0a0a0a;
  border-bottom: 1px solid #00ff41;
  transition: padding 0.3s;
}

.home-nav--scrolled {
  padding: 0;
}

.home-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-nav__logo {
  font-size: 1.05rem;
  color: #00ff41;
  letter-spacing: 6px;
  text-decoration: none;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  text-transform: uppercase;
}

.home-nav__links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.home-nav__player {
  font-size: 0.75rem;
  color: #00ffff;
  letter-spacing: 1px;
}

.home-nav__btn {
  display: inline-block;
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #444;
  padding: 5px 14px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  width: auto;
  transition: border-color 0.2s, color 0.2s;
}

.home-nav__btn:hover {
  border-color: #00ff41;
  color: #00ff41;
  background: transparent;
}

.home-nav__btn--logout {
  border-color: #ff0033;
  color: #ff0033;
}
.home-nav__btn--logout:hover {
  background: #ff0033;
  color: #0a0a0a;
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════════ */
.hp-hero {
  min-height: 100vh;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
  position: relative;
  overflow: hidden;
}

/* Scan lines sur le hero */
.hp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 4px
    );
  pointer-events: none;
  z-index: 0;
}

.hp-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Badge */
.hp-hero__badge {
  border: 1px solid #00ff41;
  padding: 4px 14px;
  font-size: 11px;
  color: #00ff41;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: hp-fade-up 0.6s ease both;
  animation-delay: 0.1s;
}

/* Titre principal */
.hp-hero__title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.15;
  margin: 0;
  text-transform: none;
  animation: hp-fade-up 0.7s ease both;
  animation-delay: 0.25s;
}

.hp-hero__title-l1 {
  display: block;
  color: #00ff41;
}

.hp-hero__title-l2 {
  display: block;
  color: #00ffff;
}

/* Sous-titre */
.hp-hero__subtitle {
  margin: 0;
  color: #888;
  font-size: 1.05rem;
  letter-spacing: 1px;
  animation: hp-fade-up 0.7s ease both;
  animation-delay: 0.4s;
}

/* Accroche */
.hp-hero__hook {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 520px;
  animation: hp-fade-up 0.7s ease both;
  animation-delay: 0.55s;
}

/* CTA */
.hp-hero__cta {
  display: inline-block;
  border: 2px solid #00ff41;
  background: transparent;
  color: #00ff41;
  padding: 14px 40px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  animation: hp-fade-up 0.7s ease both;
  animation-delay: 0.7s;
  transition: background 0.15s, color 0.15s;
}

.hp-hero__cta:hover {
  background: #00ff41;
  color: #0a0a0a;
}

.hp-cta-glow {
  animation:
    hp-fade-up   0.7s ease both,
    hp-glow-pulse 2.5s ease-in-out infinite;
  animation-delay: 0.7s, 1.2s;
}

/* Stats */
.hp-hero__stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #444;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: hp-fade-up 0.7s ease both;
  animation-delay: 0.85s;
}

.hp-hero__stats-sep {
  color: #00ff41;
}

/* ══════════════════════════════════════════════════════════════════════════
   SHARED SECTION UTILITIES
   ══════════════════════════════════════════════════════════════════════════ */
.hp-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.hp-section-label {
  color: #00ff41;
  font-size: 0.82rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 10px;
  margin: 0 0 40px 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   HOW TO PLAY
   ══════════════════════════════════════════════════════════════════════════ */
.hp-how {
  background: #0a0a0a;
  padding: 90px 0;
}

/* Steps grid */
.hp-steps {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Feature grid */
.hp-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
}

/* Card */
.hp-card {
  flex: 1;
  min-width: 200px;
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  padding: 24px 20px;
  transition: border-color 0.2s;
}

.hp-card:hover {
  border-color: #00ff41;
}

.hp-card--feature {
  min-width: 280px;
}

.hp-card__icon {
  font-size: 1.8rem;
  color: #00ff41;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  margin-bottom: 12px;
}

.hp-card__icon--sm {
  font-size: 1.4rem;
}

.hp-card__title {
  color: #00ffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 6px 0 10px;
}

.hp-card__text {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.7;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   ACTIONS SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.hp-actions {
  background: #0a0a0a;
  border-top: 1px solid #111;
  padding: 90px 0;
}

.hp-actions__inner {
  text-align: center;
}

.hp-actions__title {
  color: #00ff41;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 4px;
  margin: 0 0 8px;
}

.hp-actions__sub {
  color: #444;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin: 0 0 48px;
}

.hp-actions__grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
}

.hp-action-card {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.hp-action-card:hover {
  border-color: #333;
}

.hp-action-card__label {
  color: #00ff41;
  font-size: 0.78rem;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.hp-action-card__desc {
  color: #555;
  font-size: 0.82rem;
  line-height: 1.7;
  margin: 0;
}

/* Room list inside action card */
.hp-room-list-wrap {
  flex: 1;
  overflow-y: auto;
  max-height: 200px;
  border: 1px solid #111;
}

.hp-room-list {
  font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.hp-footer {
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
  padding: 40px 32px 24px;
}

.hp-footer__top {
  max-width: 1100px;
  margin: 0 auto 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.hp-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-footer__logo {
  color: #333;
  font-size: 0.85rem;
  letter-spacing: 5px;
}

.hp-footer__tagline {
  color: #333;
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.hp-footer__col--links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.hp-footer__link {
  color: #444;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.hp-footer__link:hover {
  color: #00ff41;
}

.hp-footer__col--right {
  color: #222;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-align: right;
  align-self: flex-start;
}

.hp-footer__bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #111;
  text-align: center;
  color: #1a1a1a;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .home-nav__inner {
    padding: 12px 16px;
  }

  .home-nav__logo {
    font-size: 0.85rem;
    letter-spacing: 3px;
  }

  .home-nav__links {
    gap: 8px;
  }

  .home-nav__player {
    display: none;
  }

  .hp-hero {
    padding: 100px 20px 60px;
  }

  .hp-hero__title {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .hp-steps,
  .hp-features,
  .hp-actions__grid {
    flex-direction: column;
  }

  .hp-card,
  .hp-action-card {
    min-width: unset;
    max-width: unset;
  }

  .hp-section-inner {
    padding: 0 16px;
  }

  .hp-how,
  .hp-actions {
    padding: 60px 0;
  }

  .hp-footer__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hp-footer__col--links {
    align-items: flex-start;
  }

  .hp-footer__col--right {
    text-align: left;
  }
}
