:root {
  --bg-0: #060a14;
  --bg-1: #0b1322;
  --bg-2: #0f1a2e;
  --panel: rgba(11, 19, 34, 0.78);
  --panel-border: rgba(110, 200, 210, 0.22);
  --accent: #6bd3d6;
  --accent-strong: #8be7ea;
  --text: #d6e2ee;
  --text-dim: #93a4b8;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 800px at 80% -10%, #1a2a48 0%, transparent 60%),
    radial-gradient(900px 700px at -10% 30%, #142036 0%, transparent 55%),
    linear-gradient(180deg, #060a14 0%, #07101e 50%, #050811 100%);
  min-height: 100vh;
}

/* ---------- NAV ---------- */
.navbar-alien {
  background: linear-gradient(180deg, rgba(6,10,20,.85) 0%, rgba(6,10,20,.55) 70%, transparent 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: .9rem 0;
  z-index: 50;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: "Orbitron", sans-serif;
  color: #fff;
  text-decoration: none;
  letter-spacing: .12em;
}
.brand .logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: var(--accent);
}
.brand .name {
  font-weight: 800; font-size: .82rem; line-height: 1;
}
.brand .name small {
  display: block; font-weight: 400;
  letter-spacing: .25em;
  color: var(--accent);
  font-size: .75rem;
  margin-top: 2px;
}
.nav-alien {
  display: flex; gap: 2.2rem; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.nav-alien a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .18em;
  padding: .35rem 0;
  position: relative;
  transition: color .2s ease;
}
.nav-alien a:hover { color: #fff; }
.nav-alien a.active {
  color: #fff;
}
.nav-alien a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.btn-ghost {
  border: 1px solid var(--accent);
  background: transparent;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .22em;
  padding: .55rem 1.4rem;
  border-radius: 4px;
  transition: all .2s ease;
}
.btn-ghost:hover {
  background: rgba(107, 211, 214, .12);
  color: #fff;
  box-shadow: 0 0 18px rgba(107, 211, 214, .35);
}

.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  display: grid; place-items: center;
  background: transparent;
  color: var(--text-dim);
  transition: all .2s ease;
}
.icon-btn:hover { color: #fff; border-color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 0 0 1rem;
  overflow: hidden;
}

.hero-top {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

/* Bandeau personnages : image déjà recadrée sur la rangée d'aliens
   (maquette complète conservée dans sources/). */
.char-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 520;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 88%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 88%, transparent 100%);
}
.char-scene img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.title-alien {
  font-family: "Black Ops One", "Impact", sans-serif;
  font-size: clamp(4rem, 13vw, 11rem);
  line-height: .9;
  letter-spacing: .04em;
  color: #e7eef5;
  text-shadow:
    0 2px 0 rgba(0,0,0,.5),
    0 8px 30px rgba(0,0,0,.7);
  /* texture grunge légère via filter */
  background: linear-gradient(180deg, #f5f8fb 0%, #b9c4d1 60%, #6f7c8d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}
.title-squad {
  font-family: "Orbitron", sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 7.5vw, 6rem);
  letter-spacing: .55em;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(107,211,214,.55);
  margin: -.2rem 0 0 .55em;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.title-squad::before, .title-squad::after {
  content: "";
  width: clamp(20px, 4vw, 50px);
  height: 1px;
  background: var(--accent);
  opacity: .8;
}
.tagline {
  margin-top: 1.2rem;
  font-family: "Orbitron", sans-serif;
  font-weight: 400;
  font-size: clamp(.8rem, 1.3vw, 1rem);
  letter-spacing: .35em;
  color: #c9d6e2;
}
.tagline span {
  color: var(--text-dim);
  margin: 0 .4em;
}

/* Carte « Bienvenue sur Jipoora » placée sous les personnages */
.welcome {
  width: min(460px, 90%);
  margin: -2rem auto 0;
  text-align: center;
  position: relative;
  z-index: 3;
  padding-bottom: 1.5rem;
}
.welcome .eyebrow {
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
  letter-spacing: .35em;
  font-size: .85rem;
}
.welcome h2 {
  font-family: "Black Ops One", sans-serif;
  color: #fff;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  letter-spacing: .08em;
  margin: .2rem 0 .9rem;
}
.welcome p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 380px;
  margin: 0 auto 1.4rem;
}
.btn-play {
  display: inline-block;
  border: 1px solid var(--accent);
  background: rgba(107, 211, 214, .08);
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .25em;
  padding: .9rem 2.4rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all .2s ease;
}
.btn-play:hover {
  background: rgba(107, 211, 214, .25);
  box-shadow: 0 0 28px rgba(107, 211, 214, .5);
  color: #fff;
}

/* ---------- FEATURE CARDS ---------- */
.features {
  padding: 1.5rem 0 4rem;
}
.f-card {
  --pad: 1.4rem;
  position: relative;
  background: linear-gradient(180deg, rgba(13, 22, 40, .85), rgba(8, 14, 26, .85));
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: var(--pad);
  height: 100%;
  overflow: hidden;
}
.f-card::before {
  /* coin coupé sci-fi */
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 22px; height: 22px;
  background: var(--bg-0);
  border-left: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  transform: translate(50%, -50%) rotate(45deg);
}
.f-head {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1rem;
}
.f-icon {
  flex: 0 0 56px;
  height: 56px;
  display: grid; place-items: center;
  color: var(--accent);
}
.f-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  color: #fff;
  letter-spacing: .2em;
  font-size: .95rem;
  margin: .35rem 0 .35rem;
}
.f-text {
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.45;
  margin: 0;
}
.f-image {
  margin-top: 1rem;
  aspect-ratio: 16 / 7;
  border-radius: 4px;
  background: linear-gradient(135deg, #0c1a30 0%, #0a1426 100%);
  border: 1px solid rgba(255,255,255,.05);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,.18);
  font-family: "Orbitron", monospace;
  font-size: .7rem;
  letter-spacing: .25em;
}
.f-image::after {
  /* placeholder rayé subtil */
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(107,211,214,.05) 0,
    rgba(107,211,214,.05) 6px,
    transparent 6px,
    transparent 14px
  );
}

/* ---------- RACES ---------- */
.races {
  padding: 2.5rem 0 3rem;
  text-align: center;
}
.races h3 {
  font-family: "Orbitron", sans-serif;
  color: var(--accent);
  letter-spacing: .35em;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-bottom: 1.8rem;
}
.race-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: .8rem;
}
@media (max-width: 992px) {
  .race-row { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 540px) {
  .race-row { grid-template-columns: repeat(2, 1fr); }
}
.race {
  aspect-ratio: 1 / 1.1;
  /* hexagone aplati */
  clip-path: polygon(8% 0, 92% 0, 100% 22%, 100% 78%, 92% 100%, 8% 100%, 0 78%, 0 22%);
  background: linear-gradient(160deg, #0e1c33 0%, #0a1426 100%);
  border: 1px solid rgba(107,211,214,.12);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,.25);
  font-family: "Orbitron", monospace;
  font-size: .7rem;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.race::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg,
    rgba(107,211,214,.06) 0, rgba(107,211,214,.06) 4px,
    transparent 4px, transparent 10px);
}
.race:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(107,211,214,.25);
}

/* ---------- FOOTER ---------- */
.alien-footer {
  margin-top: 3rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(255,255,255,.05);
}
.foot-card {
  background: rgba(8, 14, 26, .55);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 4px;
  padding: 1.2rem 1.3rem;
  height: 100%;
}
.foot-card h4 {
  font-family: "Orbitron", sans-serif;
  color: #fff;
  letter-spacing: .25em;
  font-size: .9rem;
  margin: 0 0 .8rem;
}
.foot-card p, .foot-card a {
  color: var(--text-dim);
  font-size: .9rem;
  margin: .25rem 0;
  text-decoration: none;
}
.foot-card a:hover { color: var(--accent); }
.foot-cta {
  display: inline-block;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .25em;
  padding: .55rem 1.1rem;
  border-radius: 3px;
  text-decoration: none;
  margin-top: .6rem;
  transition: all .2s ease;
}
.foot-cta:hover {
  background: rgba(107,211,214,.12);
  color: #fff;
}
.socials {
  display: flex; gap: .7rem; margin-top: .4rem;
}
.socials a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text-dim);
}
.gallery-thumbs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem;
}
.gallery-thumbs .thumb {
  aspect-ratio: 1.4 / 1;
  border-radius: 3px;
  background: linear-gradient(135deg, #0e1c33, #0a1426);
  border: 1px solid rgba(255,255,255,.05);
  position: relative; overflow: hidden;
}
.gallery-thumbs .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg,
    rgba(107,211,214,.06) 0, rgba(107,211,214,.06) 4px,
    transparent 4px, transparent 10px);
}
.legal {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center;
  color: var(--text-dim);
  font-size: .82rem;
  padding: 1.2rem 0 .4rem;
}
.legal a { color: var(--text-dim); text-decoration: none; letter-spacing: .12em; }
.legal a:hover { color: var(--accent); }

/* ---------- Responsive nav (mobile) ---------- */
@media (max-width: 992px) {
  .nav-alien { display: none; }
  .nav-toggle { display: inline-grid !important; }
  .nav-alien.open {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(6,10,20,.96);
    padding: 1.4rem 1rem;
    border-top: 1px solid rgba(107,211,214,.15);
  }
}
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  color: #fff;
}

/* Petit ajustement de la position du hero text sur mobile */
@media (max-width: 768px) {
  .hero-top { padding-top: 1.5rem; }
}

/* ---------- CHIFFRES EN DIRECT ---------- */
.live-stats {
  margin-top: 1.6rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem 1rem;
  padding: .6rem 1.4rem;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: rgba(8, 14, 26, .6);
}
.live-stats ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .3rem 1.6rem;
  list-style: none; margin: 0; padding: 0;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.live-stats strong {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  color: var(--accent-strong);
  margin-right: .25em;
}
.live-stats .hostile strong { color: #e0a33a; }
.live-stats .leader {
  flex-basis: 100%;
  margin: 0;
  font-size: .9rem;
  color: var(--text-dim);
}
.live-stats .leader strong { color: #fff; font-family: inherit; }
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- BIENVENUE : compléments ---------- */
.welcome .objective {
  font-size: .95rem;
  color: var(--text-dim);
}
.welcome .objective span {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .2rem;
}
.btn-play { cursor: pointer; }
.hold-on {
  margin-top: 1.1rem;
  font-family: "Orbitron", sans-serif;
  font-size: .75rem;
  letter-spacing: .3em;
  color: var(--text-dim);
}
.facts {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem;
  list-style: none;
  margin: 1rem 0 0; padding: 0;
}
.facts li {
  font-size: .85rem;
  letter-spacing: .06em;
  padding: .2rem .7rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text);
}

/* Tuiles de race cliquables */
a.race { text-decoration: none; }
a.race:hover { color: var(--accent); }

/* ---------- MODAL CONNEXION ---------- */
.login-modal {
  width: min(400px, calc(100% - 32px));
  padding: 2rem 1.8rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-0));
  color: var(--text);
  text-align: center;
  box-shadow: 0 0 40px rgba(107, 211, 214, .2);
}
.login-modal::backdrop {
  background: rgba(3, 6, 12, .75);
  backdrop-filter: blur(3px);
}
.login-modal .eyebrow {
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
  letter-spacing: .35em;
  font-size: .72rem;
}
.login-modal h2 {
  font-family: "Black Ops One", sans-serif;
  color: #fff;
  letter-spacing: .08em;
  font-size: 2rem;
  margin: .2rem 0 1.2rem;
}
.login-close {
  position: absolute;
  top: .5rem; right: .8rem;
  background: none; border: 0;
  color: var(--text-dim);
  font-size: 1.8rem; line-height: 1;
  cursor: pointer;
}
.login-close:hover { color: #fff; }
.login-form {
  display: flex; flex-direction: column;
  text-align: left;
}
.login-form label {
  font-family: "Orbitron", sans-serif;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .35rem;
}
.login-form input {
  background: rgba(6, 10, 20, .8);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: #fff;
  font-size: 1.05rem;
  padding: .6rem .8rem;
  margin-bottom: 1rem;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 211, 214, .2);
}
.login-form .btn-play { margin-top: .4rem; }
.login-notice {
  font-size: .95rem;
  padding: .5rem .8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.login-notice.error { color: #ffb4a8; background: rgba(220, 70, 50, .15); border: 1px solid rgba(220, 70, 50, .4); }
.login-notice.info  { color: var(--accent-strong); background: rgba(107, 211, 214, .1); border: 1px solid var(--panel-border); }
.login-links {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 1.2rem;
  font-size: .9rem;
}
.login-links a { color: var(--text-dim); text-decoration: none; }
.login-links a:hover { color: var(--accent); }

/* Bouton CONNEXION plus compact sur mobile */
@media (max-width: 576px) {
  .btn-ghost { padding: .45rem .8rem; letter-spacing: .12em; font-size: .7rem; }
}

/* ---------- PAGES DE COMPTE (inscription.php, valider.php, mot-de-passe.php) ---------- */
.compte-page {
  min-height: 70vh;
  display: grid; place-items: center;
  padding: 3rem 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(107, 211, 214, .08), transparent 60%);
}
.compte-carte {
  position: relative;
  width: min(440px, 100%);
  padding: 2rem 1.8rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-0));
  color: var(--text);
  box-shadow: 0 0 40px rgba(107, 211, 214, .15);
}
.compte-carte .eyebrow {
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
  letter-spacing: .35em;
  font-size: .72rem;
  text-align: center;
}
.compte-carte h1 {
  font-family: "Black Ops One", sans-serif;
  color: #fff;
  letter-spacing: .08em;
  font-size: 2rem;
  text-align: center;
  margin: .2rem 0 1.2rem;
}
.compte-carte a { color: var(--accent); }
.compte-intro { color: var(--text-dim); }
.compte-carte .login-form input[aria-invalid="true"] { border-color: #e0604a; margin-bottom: .3rem; }
.champ-erreur { color: #ffb4a8; font-size: .9rem; margin: 0 0 .9rem; }
.champ-aide { color: var(--text-dim); font-size: .85rem; margin: .8rem 0 0; }
/* Piège à robots : hors de l'écran, pas display:none (certains robots l'ignorent alors) */
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hero-inscription { margin: .8rem 0 0; font-size: .95rem; color: var(--text-dim); }
.hero-inscription a { color: var(--accent); }
