/* ===== 100 choses à savoir sur les jeux vidéo — charte pixel-art arcade ===== */
@font-face {
  font-family: 'Press Start 2P';
  src: url('../fonts/PressStart2P.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'VT323';
  src: url('../fonts/VT323.ttf') format('truetype');
  font-display: swap;
}
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --bg:        #0E0B1E;
  --bg-2:      #14102b;
  --panel:     #171338;
  --panel-2:   #1d1947;
  --red:       #FF3B3B;
  --blue:      #2D9CFF;
  --yellow:    #FFD23F;
  --green:     #5CE05C;
  --magenta:   #FF4FD8;
  --cyan:      #36E0E0;
  --white:     #F5F5FF;
  --muted:     #AAB4D2;
  --border:    #2b2660;

  --pixel: 'Press Start 2P', monospace;
  --term:  'VT323', monospace;
  --serif: 'Fraunces', Georgia, serif;
  --body:  'Work Sans', system-ui, sans-serif;

  --maxw: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* scanline / starfield ambiance */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(54,224,224,.5), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,210,63,.5), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255,79,216,.5), transparent),
    radial-gradient(1px 1px at 10% 70%, rgba(45,156,255,.5), transparent);
  background-size: 100% 100%;
  pointer-events: none; z-index: 0; opacity: .7;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,.18) 3px, rgba(0,0,0,0) 4px);
  pointer-events: none; z-index: 1; mix-blend-mode: multiply;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ===== Header / nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,11,30,.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.logo svg { width: 30px; height: 30px; display: block; }
.logo-txt { font-family: var(--pixel); font-size: 11px; line-height: 1.4; color: var(--yellow); }
.logo-txt span { color: var(--cyan); display: block; font-size: 9px; }
.site-nav { display: flex; gap: 26px; }
.site-nav a {
  font-family: var(--term); font-size: 22px; color: var(--muted);
  text-decoration: none; transition: color .15s; letter-spacing: .5px;
}
.site-nav a:hover { color: var(--cyan); }
.nav-toggle { display: none; background: none; border: 2px solid var(--border); color: var(--cyan); font-family: var(--term); font-size: 20px; padding: 4px 12px; cursor: pointer; border-radius: var(--radius); }

/* ===== Hero ===== */
.hero { padding: 70px 0 60px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.hero-surtitre {
  font-family: var(--pixel); font-size: 10px; color: var(--green);
  letter-spacing: 1px; display: inline-block; margin-bottom: 22px;
  border: 2px solid var(--green); padding: 7px 12px; border-radius: var(--radius);
}
.hero h1 {
  font-family: var(--pixel); font-size: clamp(22px, 3.4vw, 38px); line-height: 1.35;
  color: var(--yellow); margin-bottom: 4px;
  text-shadow: 3px 3px 0 rgba(255,59,59,.5);
}
.hero h1 .l2 { color: var(--cyan); text-shadow: 3px 3px 0 rgba(45,156,255,.4); }
.hero-soustitre { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--white); margin: 22px 0 18px; line-height: 1.4; }
.hero-pitch { color: var(--muted); font-size: 17px; margin-bottom: 30px; max-width: 52ch; }
.hero-boutons { display: flex; gap: 16px; flex-wrap: wrap; }

.bouton {
  font-family: var(--pixel); font-size: 11px; text-decoration: none;
  padding: 16px 22px; border-radius: var(--radius); display: inline-block;
  border: 0; cursor: pointer; transition: transform .12s, box-shadow .12s; line-height: 1.4;
}
.bouton-primaire { background: var(--red); color: #fff; box-shadow: 4px 4px 0 #8c1414; }
.bouton-secondaire { background: var(--bg); color: var(--cyan); box-shadow: 4px 4px 0 #134a6b; border: 2px solid var(--cyan); }
.bouton:hover { transform: translate(-2px,-2px); }
.bouton-primaire:hover { box-shadow: 6px 6px 0 #8c1414; }
.bouton-secondaire:hover { box-shadow: 6px 6px 0 #134a6b; }

.hero-couverture { position: relative; }
.hero-couverture img {
  width: 100%; max-width: 360px; display: block; margin: 0 auto;
  border: 4px solid var(--panel-2);
  box-shadow: 0 0 0 4px var(--bg), 10px 10px 0 rgba(255,79,216,.35), -10px -10px 0 rgba(54,224,224,.25);
  image-rendering: auto;
}

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-grise { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.section-titre {
  font-family: var(--pixel); font-size: clamp(16px, 2.4vw, 24px); color: var(--white);
  margin-bottom: 14px; line-height: 1.4;
}
.section-titre .acc { color: var(--magenta); }
.section-intro { color: var(--muted); max-width: 62ch; margin-bottom: 40px; font-size: 17px; }

/* citation */
.bloc-citation {
  border-left: 6px solid var(--yellow); background: var(--panel);
  padding: 28px 32px; border-radius: var(--radius); max-width: 820px; margin: 0 auto;
}
.bloc-citation p { font-family: var(--serif); font-size: 24px; font-style: italic; line-height: 1.45; color: var(--white); }
.bloc-citation .source { display: block; margin-top: 16px; font-family: var(--term); font-size: 19px; color: var(--cyan); font-style: normal; }

/* grille extraits */
.grille-extraits { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.carte-extrait {
  background: var(--panel); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; text-decoration: none; color: var(--white);
  transition: transform .15s, border-color .15s, box-shadow .15s; display: flex; flex-direction: column;
}
.carte-extrait:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan), 8px 8px 0 rgba(54,224,224,.18); }
.carte-numero { font-family: var(--pixel); font-size: 9px; color: var(--bg); background: var(--yellow); display: inline-block; padding: 5px 9px; border-radius: var(--radius); margin-bottom: 16px; align-self: flex-start; }
.carte-partie { font-family: var(--term); font-size: 18px; color: var(--magenta); margin-bottom: 6px; }
.carte-titre { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.3; margin-bottom: 12px; }
.carte-description { color: var(--muted); font-size: 15.5px; flex-grow: 1; margin-bottom: 18px; }
.carte-cta { font-family: var(--term); font-size: 20px; color: var(--cyan); }
.carte-cta::after { content: ' ▸'; }

/* sommaire */
.sommaire { display: grid; gap: 20px; }
.partie-bloc { background: var(--panel); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.partie-head {
  display: flex; align-items: center; gap: 16px; padding: 18px 24px; cursor: pointer;
  background: var(--panel-2); border: none; width: 100%; text-align: left; color: var(--white);
}
.partie-head:hover { background: #241f55; }
.partie-rom { font-family: var(--pixel); font-size: 14px; color: var(--yellow); min-width: 44px; }
.partie-nom { font-family: var(--serif); font-size: 19px; font-weight: 600; flex-grow: 1; }
.partie-chevron { font-family: var(--term); font-size: 26px; color: var(--cyan); transition: transform .2s; }
.partie-bloc.open .partie-chevron { transform: rotate(90deg); }
.partie-liste { list-style: none; max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.partie-bloc.open .partie-liste { max-height: 1400px; }
.partie-liste li { display: flex; gap: 14px; padding: 11px 24px; border-top: 1px solid var(--border); align-items: baseline; }
.entry-num { font-family: var(--term); font-size: 19px; color: var(--green); min-width: 34px; }
.entry-txt { color: var(--muted); font-size: 16px; }
.entry-txt.libre { color: var(--white); }
.badge-libre { font-family: var(--term); font-size: 14px; color: var(--bg); background: var(--cyan); padding: 1px 8px; border-radius: 3px; margin-left: 8px; white-space: nowrap; }

/* bio */
.bio { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.bio-avatar {
  width: 220px; height: 220px; border-radius: var(--radius); border: 3px solid var(--magenta);
  background: var(--panel); display: flex; align-items: center; justify-content: center;
  box-shadow: 8px 8px 0 rgba(255,79,216,.25);
}
.bio-avatar svg { width: 120px; height: 120px; }
.bio h3 { font-family: var(--pixel); font-size: 14px; color: var(--cyan); margin-bottom: 18px; line-height: 1.5; }
.bio p { color: var(--muted); margin-bottom: 16px; max-width: 60ch; }
.bio p strong { color: var(--white); }

/* achat / CTA final */
.achat { text-align: center; }
.achat .section-titre { text-align: center; }
.achat-card {
  background: var(--panel); border: 3px solid var(--yellow); border-radius: var(--radius);
  max-width: 720px; margin: 0 auto; padding: 40px 32px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 40px rgba(255,210,63,.15);
}
.achat-coin { font-family: var(--pixel); font-size: 12px; color: var(--yellow); margin-bottom: 18px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.achat-card p { color: var(--muted); margin-bottom: 26px; }
.achat-meta { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 28px; font-family: var(--term); font-size: 19px; color: var(--cyan); }
.achat-meta span { color: var(--muted); }

/* footer */
.site-footer { border-top: 2px solid var(--border); padding: 40px 0; margin-top: 20px; text-align: center; }
.site-footer p { font-family: var(--term); font-size: 18px; color: var(--muted); }
.site-footer .nom { color: var(--cyan); }

/* ===== Pages extraits ===== */
.lecture { max-width: 760px; margin: 0 auto; padding: 56px 0 30px; }
.fil { font-family: var(--term); font-size: 19px; color: var(--muted); margin-bottom: 24px; }
.fil a { color: var(--cyan); text-decoration: none; }
.lecture-num { font-family: var(--pixel); font-size: 10px; color: var(--bg); background: var(--yellow); padding: 6px 10px; border-radius: var(--radius); display: inline-block; margin-bottom: 18px; }
.lecture h1 { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: 1.2; color: var(--white); margin-bottom: 14px; }
.lecture-partie { font-family: var(--term); font-size: 21px; color: var(--magenta); margin-bottom: 34px; }
.lecture-corps p { font-size: 18.5px; line-height: 1.78; color: #d9ddf0; margin-bottom: 24px; }
.lecture-corps p:first-of-type::first-letter {
  font-family: var(--pixel); font-size: 38px; color: var(--red); float: left; line-height: 1; padding: 6px 12px 0 0;
}
.lecture-corps em { color: var(--cyan); font-style: italic; }
.lecture-figure { margin: 36px 0; text-align: center; }
.lecture-figure img { max-width: 100%; border: 3px solid var(--border); border-radius: var(--radius); }
.lecture-figure figcaption { font-family: var(--term); font-size: 17px; color: var(--muted); margin-top: 10px; }
.lecture-nav { display: flex; justify-content: space-between; gap: 16px; margin: 48px 0 0; border-top: 2px solid var(--border); padding-top: 28px; flex-wrap: wrap; }
.teaser-fin {
  margin-top: 40px; background: var(--panel); border: 2px dashed var(--magenta); border-radius: var(--radius);
  padding: 30px 28px; text-align: center;
}
.teaser-fin p { color: var(--muted); margin-bottom: 20px; }
.teaser-fin .gameover { font-family: var(--pixel); font-size: 16px; color: var(--magenta); margin-bottom: 16px; }

/* ===== responsive ===== */
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-couverture { order: -1; }
  .hero-couverture img { max-width: 260px; }
  .bio { grid-template-columns: 1fr; }
  .bio-avatar { margin: 0 auto; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 2px solid var(--border); padding: 16px 24px; gap: 14px; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero h1 { text-shadow: 2px 2px 0 rgba(255,59,59,.5); }
  .lecture-corps p:first-of-type::first-letter { font-size: 30px; }
}
