/* ===========================
   STATE OF PHP 2026 — style.css
   =========================== */

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

:root {
  --purple: #8B5CF6;
  --purple-light: #c084fc;
  --purple-dark: #1a1120;
  --red: #ef4444;
  --red-dark: #0f0808;
  --red-border: #3a1010;
  --amber: #f59e0b;
  --cyan: #22d3ee;
  --green: #22c55e;
  --bg: #0d0d0d;
  --bg-card: #111;
  --bg-card-dark: #0f0f0f;
  --border: #1a1a1a;
  --border-mid: #2a2a2a;
  --border-strong: #333;
  --text: #e8e8e0;
  --text-muted: #888;
  --text-dim: #666;
  --text-dimmer: #555;
  --text-ghost: #4a4a4a;
  --font: 'IBM Plex Mono', monospace;
  --font-display: 'Bebas Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}

/* ---- UTILITIES ---- */
.red-text    { color: var(--red) !important; }
.green-text  { color: var(--green) !important; }
.warn-text   { color: var(--amber) !important; }
.muted       { color: var(--text-muted) !important; }
code {
  font-family: var(--font);
  font-size: 0.9em;
  background: #1a1a1a;
  color: var(--purple-light);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---- HERO ---- */
.php-hero {
  background: var(--bg);
  border-bottom: 2px solid var(--purple);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.php-hero::before {
  content: "<?php // je déteste ce langage";
  position: absolute;
  top: 14px; left: 20px;
  color: var(--purple);
  font-size: 11px;
  opacity: 0.4;
}
.php-hero::after {
  content: "?> <!-- pourquoi -->";
  position: absolute;
  bottom: 14px; right: 20px;
  color: var(--purple);
  font-size: 11px;
  opacity: 0.4;
}
.year-badge {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  letter-spacing: .15em;
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 12vw, 96px);
  letter-spacing: .04em;
  color: #fff;
  line-height: 1;
  margin-bottom: .5rem;
}
.hero-title span { color: var(--purple); }
.hero-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: .5rem;
  letter-spacing: .05em;
}
.hero-tagline {
  font-size: 13px;
  color: var(--purple-light);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.author-note {
  display: inline-block;
  background: #1a0a0a;
  border: 1px solid var(--red-border);
  color: var(--red);
  font-size: 11px;
  padding: 10px 18px;
  border-radius: 2px;
  line-height: 1.7;
  max-width: 600px;
}
.author-note code {
  color: #f87171;
  background: #2a0808;
}

/* ---- STATS RIBBON ---- */
.stats-ribbon {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  background: #111;
  border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--purple);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 3px;
  display: block;
}

/* ---- HATE BANNER ---- */
.hate-banner {
  background: var(--red-dark);
  border-top: 1px solid var(--red-border);
  border-bottom: 1px solid var(--red-border);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 11px;
  color: #7a3a3a;
  letter-spacing: .06em;
}
.hate-banner code { color: var(--red); background: #1a0808; }
.hate-banner strong { color: var(--red); }

/* ---- SECTIONS ---- */
.section {
  padding: 2.25rem 2rem 1.75rem;
  border-bottom: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
/* Full-width wrapper for sections */
body > .section,
body > header,
body > .stats-ribbon,
body > .hate-banner,
body > footer {
  max-width: 100%;
}
.section {
  max-width: 860px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: #fff;
  letter-spacing: .08em;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "//";
  color: var(--purple);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
}
.danger-title::before { color: var(--red); }

.section-desc {
  font-size: 11px;
  color: var(--text-dimmer);
  margin-bottom: 1.5rem;
  letter-spacing: .05em;
}
.danger-code { color: #7a2a2a !important; background: #1a0808 !important; }

.sub-label {
  font-size: 11px;
  color: var(--text-dimmer);
  letter-spacing: .05em;
  margin: 1.75rem 0 1rem;
}

/* ---- BARS ---- */
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.bar-label {
  width: 230px;
  font-size: 12px;
  color: #c9c9c0;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  flex: 1;
  height: 8px;
  background: #1c1c1c;
  border-radius: 1px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 1px;
  width: 0;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.bar-fill.purple { background: var(--purple); }
.bar-fill.alt    { background: var(--cyan); }
.bar-fill.warn   { background: var(--amber); }
.bar-fill.bad    { background: var(--red); }
.bar-fill.green  { background: var(--green); }
.bar-pct {
  width: 40px;
  text-align: right;
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.comment {
  font-size: 11px;
  color: var(--text-ghost);
  font-style: italic;
  margin-left: 242px;
  margin-top: -6px;
  margin-bottom: 10px;
}

/* ---- QUOTES ---- */
.quote-block {
  border-left: 2px solid var(--purple);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--bg-card);
}
.quote-block.hate {
  border-color: var(--red);
  background: var(--red-dark);
}
.quote-text {
  font-size: 13px;
  color: #c9c9c0;
  font-style: italic;
  line-height: 1.8;
}
.quote-block.hate .quote-text code { color: #f87171; background: #1a0808; }
.quote-attr {
  font-size: 10px;
  color: var(--text-dimmer);
  margin-top: 6px;
  letter-spacing: .08em;
  font-style: normal;
}
.quote-block.hate .quote-attr { color: #7a3a3a; }

/* ---- CARDS GRID ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 1rem 0 .5rem;
}
.info-card {
  background: var(--bg-card);
  padding: 1rem;
}
.card-title {
  font-size: 12px;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 5px;
}
.card-body {
  font-size: 11px;
  color: var(--text-dimmer);
  line-height: 1.7;
}
.card-body code { color: #4a3a6a; background: #0d0d0d; }

/* ---- TIMELINE ---- */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 28px;
  margin: 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 1px;
  background: #1f1f1f;
}
.tl-item {
  position: relative;
  margin-bottom: 18px;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -23px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--purple);
  border: 2px solid var(--bg);
}
.tl-item.red::before   { background: var(--red); }
.tl-item.warn::before  { background: var(--amber); }
.tl-item.green::before { background: var(--green); }
.tl-item.gray::before  { background: #333; }
.tl-cmd {
  font-size: 12px;
  color: #c9c9c0;
  font-weight: 600;
}
.tl-pct {
  display: inline-block;
  border: 1px solid var(--border-mid);
  color: var(--text-dim);
  font-size: 10px;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 2px;
}
.tl-item.red  .tl-pct { color: var(--red);   border-color: #3a1010; }
.tl-item.warn .tl-pct { color: var(--amber); border-color: #3a2a00; }
.tl-item.green .tl-pct { color: var(--green); border-color: #0a2a0a; }
.tl-detail {
  font-size: 11px;
  color: var(--text-ghost);
  margin-top: 3px;
  font-style: italic;
}
.tl-detail code { color: #3a2a5a; background: #111; font-style: normal; }

/* ---- IDE ---- */
.ide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}
.ide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem 1rem;
  border-radius: 2px;
  text-align: center;
  position: relative;
}
.ide-card.winner { border-color: var(--purple); }
.ide-badge {
  position: absolute;
  top: -9px; right: 8px;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  padding: 2px 8px;
  letter-spacing: .08em;
}
.ide-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.ide-pct-big {
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--purple);
  line-height: 1;
}
.ide-pct-big.alt      { color: var(--cyan); }
.ide-pct-big.warn-text { color: var(--amber); }
.ide-sub {
  font-size: 10px;
  color: var(--text-dimmer);
  margin-top: 5px;
  line-height: 1.5;
}

/* ---- BURNOUT KPIs ---- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 1.75rem;
}
.kpi {
  background: var(--bg-card);
  border: 1px solid #1f1f1f;
  padding: 1rem;
  border-radius: 2px;
  text-align: center;
}
.kpi.red-kpi   { border-color: var(--red-border); background: var(--red-dark); }
.kpi.warn-kpi  { border-color: #3a2a00; background: #0f0a00; }
.kpi.ok-kpi    { border-color: #0a2a0a; background: #050f05; }
.kpi-val {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--red);
}
.kpi-label {
  font-size: 10px;
  color: var(--text-dimmer);
  letter-spacing: .06em;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- CHART LEGEND ---- */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--text-muted);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 250px;
}
.chart-wrap--tall  { height: 290px; }
.chart-wrap--short { height: 210px; }

/* ---- SYMPTOM GRID ---- */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}
.symptom-card {
  background: var(--red-dark);
  padding: 1rem;
}
.symptom-title {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 4px;
}
.symptom-title code { color: #f87171; background: #1a0808; }
.symptom-body {
  font-size: 11px;
  color: #5a3a3a;
  line-height: 1.7;
}
.symptom-body code { color: #7a3a3a; background: #1a0808; }

/* ---- AUTHOR ASIDE ---- */
.author-aside {
  background: var(--red-dark);
  border: 1px solid var(--red-border);
  padding: .75rem 1rem;
  margin-top: 1.25rem;
  border-radius: 2px;
  font-size: 11px;
  color: #7a3a3a;
  line-height: 1.6;
}
.author-aside code { color: var(--red); background: #1a0808; }

/* ---- QUIZ ---- */
.quiz-wrap {
  background: var(--bg);
  border: 1px solid var(--purple);
  padding: 1.5rem;
  border-radius: 2px;
}
.quiz-pb-track {
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.quiz-pb-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 2px;
  transition: width .4s ease;
  width: 0;
}
.quiz-label {
  font-size: 10px;
  color: var(--text-dimmer);
  letter-spacing: .1em;
  margin-bottom: .5rem;
}
.quiz-label span { color: var(--purple); }
.quiz-q {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}
.quiz-q code { color: var(--purple-light); background: #1a1a1a; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.qbtn {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  transition: all .15s;
  line-height: 1.5;
}
.qbtn code { color: var(--purple-light); background: var(--bg); }
.qbtn:hover { border-color: var(--purple); color: var(--text); background: #1a1a1a; }
.qbtn:active { transform: scale(.98); }
.qbtn.selected { border-color: var(--purple); color: var(--purple-light); background: var(--purple-dark); }
.qbtn:disabled { cursor: default; }

.quiz-result { text-align: center; padding: .5rem 0; }
.res-title {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--purple);
  letter-spacing: .06em;
  margin-bottom: .5rem;
}
.res-emoji { font-size: 44px; margin-bottom: .75rem; display: block; }
.res-badge {
  display: inline-block;
  background: #1a1a1a;
  border: 1px solid var(--purple);
  color: var(--purple);
  font-size: 9px;
  padding: 2px 10px;
  border-radius: 2px;
  margin-bottom: 1rem;
  letter-spacing: .1em;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1.25rem;
}
.score-cell {
  background: var(--bg-card);
  border: 1px solid #1f1f1f;
  padding: 8px;
  text-align: center;
  border-radius: 2px;
}
.score-cell.winner { border-color: var(--purple); background: var(--purple-dark); }
.score-cell-label {
  font-size: 9px;
  color: var(--text-dimmer);
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.score-cell-val {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--purple);
  line-height: 1;
}
.score-cell.winner .score-cell-val { color: var(--purple-light); }
.res-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 480px;
  margin: 0 auto 1.25rem;
  text-align: left;
}
.res-desc code { color: var(--purple-light); background: #1a1a1a; }
.res-tags { margin-bottom: 1rem; }
.res-tag {
  display: inline-block;
  background: #1a1a1a;
  border: 1px solid var(--border-mid);
  color: var(--text-dim);
  font-size: 10px;
  padding: 3px 10px;
  margin: 2px;
  border-radius: 2px;
}
.quiz-restart {
  background: transparent;
  border: 1px solid var(--purple);
  color: var(--purple);
  font-family: var(--font);
  font-size: 11px;
  padding: 8px 20px;
  cursor: pointer;
  letter-spacing: .08em;
  border-radius: 2px;
  margin-top: .75rem;
  transition: all .15s;
}
.quiz-restart:hover { background: var(--purple); color: #fff; }

/* ---- TAGS ---- */
.tags-wrap { padding: .5rem 0 1rem; }
.tag {
  display: inline-block;
  background: #1a1a1a;
  border: 1px solid var(--border-strong);
  color: var(--purple);
  font-size: 10px;
  padding: 2px 9px;
  border-radius: 2px;
  margin: 2px;
}

/* ---- FOOTER ---- */
.footer {
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 10px;
  color: #333;
  letter-spacing: .1em;
  border-top: 1px solid var(--border);
}
.footer em { color: var(--text-dimmer); font-style: normal; }
.footer-sub { margin-top: 5px; color: #5a2a2a; }
.footer-code { margin-top: 10px; }
.footer-code code { color: #2a1a1a; font-size: 9px; background: transparent; }

.footer-afup {
  margin: 1.5rem auto 0;
  max-width: 600px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.footer-afup-text {
  font-size: 9px;
  color: var(--text-ghost);
  font-style: italic;
  letter-spacing: 0;
}
.footer-afup-link {
  display: inline-block;
  background: #fff;
  padding: 5px 9px;
  border-radius: 3px;
  line-height: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-afup-link:hover { opacity: 1; }
.footer-afup-img { height: 18px; width: auto; display: block; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .php-hero { padding: 2rem 1rem 1.5rem; }
  .php-hero::before, .php-hero::after { display: none; }
  .section { padding: 1.5rem 1rem 1.25rem; }
  .bar-label { width: 140px; font-size: 10px; }
  .comment { margin-left: 0; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-ribbon { gap: 1.5rem; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
}
