/* ============================================================
   ChaosCraft — Plasmik.fr
   Feuille de style partagée — refonte "moderne"
   Fond charbon profond, accents indigo/teal/ambre repris du
   logo du pack, typographie Space Grotesk (titres) + Inter (corps).
   ============================================================ */

:root {
  --bg: #0a0b10;
  --bg-soft: #101220;
  --surface: #14161f;
  --surface-2: #1b1e2b;
  --line: #262a3a;
  --line-soft: #1d202c;
  --text: #edeff5;
  --text-dim: #9aa0b4;
  --text-faint: #666c82;

  --accent: #7c6af2;      /* indigo — repris du logo */
  --accent-soft: #a99cff;
  --accent-2: #2fd9c4;    /* teal */
  --accent-2-soft: #7eeee0;
  --flame: #ff9f45;       /* ambre — CTA / urgence, usage sobre */

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --max-width: 1120px;
  --shadow: 0 20px 50px -20px rgba(0,0,0,0.55);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 60% 40% at 12% 0%, rgba(124,106,242,0.14), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 15%, rgba(47,217,196,0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

a { color: var(--accent-2-soft); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(255,255,255,0.06);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--accent-2-soft);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

/* ---------- Header / nav ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,11,16,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.brand .logo-img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--surface);
}

.brand .badge {
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-faint);
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

nav.main-nav a:not(.btn) {
  font-family: var(--font-body);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.15s ease, background 0.15s ease;
}

nav.main-nav a:not(.btn):hover,
nav.main-nav a:not(.btn).active {
  color: var(--text);
  background: var(--surface-2);
}

nav.main-nav .btn { margin-left: 4px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none !important;
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-soft); color: #14101f; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--accent-2); color: var(--accent-2-soft); }

.btn-accent {
  background: transparent;
  color: var(--accent-2-soft);
  border-color: var(--accent-2);
}
.btn-accent:hover { background: rgba(47,217,196,0.1); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 0.84rem; }

#music-toggle-btn[aria-pressed="true"] {
  color: var(--accent-2-soft);
  border-color: var(--accent-2);
}

/* ---------- Page tampon (entrée du site) ---------- */

body.pre-entry { overflow: hidden; }

#entry-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(124,106,242,0.20), transparent 55%),
    var(--bg);
  transition: opacity 0.5s ease;
}

#entry-gate.hidden { opacity: 0; pointer-events: none; }

.gate-inner {
  max-width: 420px;
  width: 100%;
}

.gate-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 0 auto 26px;
  border-radius: 50%;
}

.gate-inner h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  margin: 0 0 12px;
}

.gate-tagline {
  color: var(--text-dim);
  margin: 0 0 34px;
  font-size: 0.98rem;
}

.gate-hint {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 18px 0 0;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 40px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-copy { max-width: 520px; }

.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent-2-soft);
  font-weight: 500;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  margin-bottom: 20px;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent-2-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }

/* Compte à rebours */

.countdown {
  display: flex;
  gap: 10px;
}

.countdown-unit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  width: 68px;
  text-align: center;
}

.countdown-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-top: 2px;
}

.countdown.countdown-done {
  display: block;
  background: var(--surface);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text);
  width: fit-content;
}

.countdown-caption {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-top: 12px;
}

.countdown-caption a { color: var(--accent-2-soft); font-weight: 600; }

/* Visuel décoratif du héros (cubes isométriques) */

.hero-art { display: flex; align-items: center; justify-content: center; }
.hero-art svg { width: 100%; max-width: 380px; height: auto; }

.hero-art .float-slow { animation: float-slow 7s ease-in-out infinite; transform-origin: center; }
.hero-art .float-slow-delay { animation: float-slow 7s ease-in-out infinite; animation-delay: -3.2s; transform-origin: center; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; margin-bottom: 8px; }
  .hero-art svg { max-width: 260px; }
}

/* ---------- Section headers ---------- */

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 62ch;
  margin-bottom: 44px;
}

/* ---------- Feature / info grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(124,106,242,0.14);
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.card .tag-green { background: rgba(47,217,196,0.14); }
.card .tag-orange { background: rgba(255,159,69,0.14); }
.card .tag-pink { background: rgba(124,106,242,0.14); }

.card .card-cat {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2-soft);
  margin-bottom: 6px;
}

.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.94rem; }

/* ---------- Download panel ---------- */

.download-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 42px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto 60px;
}

.download-panel h2 { font-size: 1.6rem; margin-bottom: 10px; }
.download-panel p { color: var(--text-dim); margin-bottom: 26px; }

.placeholder-note {
  margin-top: 18px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--flame);
  background: rgba(255,159,69,0.08);
  border: 1px dashed rgba(255,159,69,0.4);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-align: left;
}

/* ---------- Mods page ---------- */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 9px 17px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-btn:hover { border-color: var(--accent-2); color: var(--text); }

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.search-box {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 28px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-box::placeholder { color: var(--text-faint); }
.search-box:focus { outline: none; border-color: var(--accent-2); }

.mod-count {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.83rem;
  margin-bottom: 26px;
}

.mod-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.mod-card:hover { border-color: var(--accent-2); }

.mod-card .mod-name { font-weight: 600; font-family: var(--font-display); font-size: 1.02rem; color: var(--text); }
.mod-card .mod-desc { color: var(--text-dim); font-size: 0.9rem; flex: 1; }
.mod-card .mod-link { font-size: 0.84rem; font-weight: 600; }
.mod-card .mod-cat {
  font-size: 0.72rem;
  color: var(--accent-2-soft);
  font-weight: 500;
}

.no-results {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0;
  display: none;
}

/* ---------- Idea combos ---------- */

.combo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.combo-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.combo-card .combo-desc { color: var(--text-dim); margin-bottom: 18px; font-size: 0.93rem; }

.combo-mods { display: flex; flex-wrap: wrap; gap: 7px; }

.combo-mods span {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ---------- Steps (rejoindre.html) ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.step .step-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--accent-2-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1rem;
}

.step .step-body h4 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 600; }
.step .step-body p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

.info-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 780px;
  margin: 44px auto 0;
}

.info-grid .card { text-align: center; }
.info-grid .icon { font-size: 1.5rem; margin-bottom: 10px; }

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 44px 0;
  margin-top: 40px;
}

footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }
.foot-links a:hover { color: var(--text); }

footer.site-footer .wrap > p {
  color: var(--text-faint);
  font-size: 0.85rem;
  width: 100%;
  order: 3;
  margin-top: 4px;
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 40px 0 24px; }
  .nav-inner { justify-content: center; }
  footer.site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
