/* ==========================================================================
   evilz.fr — socle commun
   ========================================================================== */

:root {
  /* Palette "survie" : olive sombre, ambre, rouille */
  --bg:            #0d0f0b;
  --bg-alt:        #12150e;
  --surface:       #181c12;
  --surface-hi:    #1f2418;
  --border:        #2c3320;
  --border-hi:     #414a2e;

  --text:          #d9d6c6;
  --text-strong:   #f2efe2;
  --muted:         #8a8b76;

  --accent:        #d98f36;   /* ambre Project Zomboid */
  --accent-hi:     #f0a94d;
  --accent-dim:    #6b4718;

  --blood:         #9b2d1f;
  --blood-hi:      #c4392a;
  --moss:          #7d9146;

  --radius:        4px;
  --radius-lg:     8px;
  --maxw:          1100px;

  --shadow:        0 2px 0 rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);

  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

/* --------------------------------------------------------------- reset --- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--accent-hi); }

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
}

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

::selection {
  background: var(--accent-dim);
  color: var(--text-strong);
}

/* ------------------------------------------------------------- layout --- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: clamp(48px, 8vw, 88px);
  border-top: 1px solid var(--border);
}

.section--alt { background: var(--bg-alt); }

.section__label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}

.section__intro {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------ éléments --- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;

  /* Colonne flex : dans une grille de cartes aux textes de longueurs
     inégales, le bouton reste collé en bas et les cartes s'alignent. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Le titre et le texte occupent toute la largeur ; l'étiquette et le
   bouton gardent leur largeur naturelle (align-items: flex-start). */
.card h3,
.card p { width: 100%; }

.card > .btn { margin-top: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .8em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #1a1206;
  box-shadow: 0 2px 0 var(--accent-dim);
}
.btn--primary:hover { background: var(--accent-hi); color: #1a1206; }

.btn--ghost {
  background: transparent;
  border-color: var(--border-hi);
  color: var(--text-strong);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-hi);
  background: rgba(217, 143, 54, .07);
}

.tag {
  display: inline-block;
  padding: .28em .7em;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--border-hi);
  border-radius: 100px;
  color: var(--muted);
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 11, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-strong);
  font-size: .95rem;
}
.nav__brand:hover { color: var(--accent-hi); }

.nav__links {
  display: none;
  gap: 26px;
  align-items: center;
}

.nav__links a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.nav__links a:hover { color: var(--text-strong); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
}

/* --------------------------------------------------------------- hero --- */

/* Hero générique, SANS illustration. Chaque page habille son propre fond via
   une classe dédiée (voir .hero--pz), pour qu'un visuel ne déborde jamais
   sur une autre page. */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 12vw, 130px);
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-position: center 20%;
  background-size: cover;
  background-image:
    radial-gradient(120% 90% at 50% 0%, rgba(217, 143, 54, .13), transparent 62%),
    radial-gradient(80% 60% at 12% 100%, rgba(155, 45, 31, .16), transparent 70%);
}

/* Trame quadrillée discrète */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 145, 70, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 145, 70, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero__inner { position: relative; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .4em 1em;
  margin-bottom: 1.4rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(217, 143, 54, .08);
  border: 1px solid rgba(217, 143, 54, .3);
  border-radius: 100px;
}

.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 0 rgba(125, 145, 70, .6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(125, 145, 70, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(125, 145, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 145, 70, 0); }
}

.hero h1 { max-width: 16ch; }

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  display: block;
}

.hero__lead {
  max-width: 58ch;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--text);
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2.6rem;
}

.hero__quote {
  margin-top: 2.6rem;
  padding-left: 16px;
  border-left: 3px solid var(--blood);
  color: var(--muted);
  font-style: italic;
  max-width: 52ch;
}

/* ------------------------------------------------------------ figures --- */

.figure {
  margin: 0 0 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.figure figcaption {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}

.figure figcaption strong { color: var(--text-strong); }

.credit {
  display: block;
  margin-top: .3em;
  font-size: .78rem;
  color: #6f7060;
}

/* -------------------------------------------------------------- stats --- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  background: var(--surface);
  padding: 20px 18px;
}

.stat__value {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1.2;
}

.stat__label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------- accessibilité a11y --- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: .6em 1.1em;
  background: var(--accent);
  color: #1a1206;
  font-weight: 700;
  border-radius: var(--radius);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; color: #1a1206; }

/* --------------------------------------------------------------- live --- */

.live {
  display: grid;
  gap: 20px;
  align-items: start;
}

@media (min-width: 960px) {
  .live { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
}

.live__player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.live__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.live__aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.live__aside h3 { margin-bottom: .5em; }

.live__aside p {
  color: var(--muted);
  font-size: .95rem;
}

.live__aside .btn { width: 100%; }

.live__aside .btn + .btn { margin-top: 10px; }

/* Pastille violette Twitch */
.badge-twitch {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .3em .8em;
  margin-bottom: 1rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #c9a6ff;
  background: rgba(145, 70, 255, .12);
  border: 1px solid rgba(145, 70, 255, .38);
  border-radius: 100px;
}

.btn--twitch {
  background: #9146ff;
  color: #fff;
  box-shadow: 0 2px 0 #5c2caa;
}
.btn--twitch:hover { background: #a970ff; color: #fff; }

/* ------------------------------------------------------------- footer --- */

.footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  color: var(--muted);
  font-size: .88rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ------------------------------------------------- préférences système --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
