/* Chaos Crew 2 — punk graphique, accents néon sur fond sombre. */
:root {
  --c-bg:        #050505;
  --c-bg-2:      #0e0e0e;
  --c-card:      #141414;
  --c-border:    #2a2a2a;
  --c-text:      #e7e2d8;
  --c-text-mut:  #8f8a82;
  --c-blood:     #ffffff;
  --c-blood-d:   #b8b3a8;
  --c-blood-l:   #ffffff;
  --c-bone:      #f0ebde;
  --c-bronze:    #c8c1b0;
  --c-bronze-d:  #8c867a;
  --c-silver:    #b8b3a8;
  --c-success:   #b8b3a8;
  --c-danger:    #d6cfc1;
  --grad-cta:    linear-gradient(135deg, #f0ebde 0%, #b8b3a8 100%);
  --grad-bone:   linear-gradient(135deg, #f0ebde 0%, #8c867a 100%);
  --font-display:'Cinzel', 'Times New Roman', serif;
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
  --header-h: 84px;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; } }

html { -webkit-text-size-adjust:100%; -webkit-tap-highlight-color:transparent; overflow-x:hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(240,235,222,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 30% 100%, rgba(184,179,168,0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 50%, var(--c-bg) 100%);
  background-attachment: fixed;
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  padding-top: var(--header-h);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-bone); text-decoration: none; transition: color .2s; border-bottom: 1px solid transparent; }
a:hover { color: #fff; border-bottom-color: currentColor; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; color: var(--c-bone); margin: 1.5em 0 .6em; letter-spacing: .02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(240,235,222,.15); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--c-bone); border-bottom: 1px solid var(--c-border); padding-bottom: .4em; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 600; color: var(--c-silver); }
p, li { color: var(--c-text); }
strong { color: var(--c-bone); }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem max(1rem, env(safe-area-inset-right)) 3rem max(1rem, env(safe-area-inset-left)); }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(14,14,14,.98) 0%, rgba(5,5,5,.98) 100%);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 4px 22px rgba(0,0,0,.7);
  padding: .65rem max(1rem, env(safe-area-inset-right)) .65rem max(1rem, env(safe-area-inset-left));
  padding-top: max(.65rem, var(--safe-top));
  z-index: 1000;
}
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: .75rem; }
.logo img { height: clamp(70px, 10.4vw, 94px); width: auto; object-fit: contain; }
.logo:hover img { filter: brightness(1.15) drop-shadow(0 0 8px rgba(240,235,222,.45)); }
.header-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }

.header-nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid rgba(240,235,222,.3); border-radius: 4px;
  background: rgba(14,14,14,.7); color: var(--c-bone); cursor: pointer;
}
.header-nav-toggle-bars {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 1px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
.site-nav { flex: 1; display: flex; justify-content: flex-end; }
.site-nav-panel { display: contents; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.nav-menu-link {
  color: var(--c-bone); font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  letter-spacing: .04em; text-transform: uppercase; padding: .35rem .25rem;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav-menu-link:hover { color: #fff; border-bottom-color: var(--c-bone); }
.header-nav-close { display: none; }

@media (max-width: 880px) {
  .header-nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 0; pointer-events: none; z-index: 1100; display: block; }
  .site-nav[data-state="open"] { pointer-events: auto; }
  .site-nav-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); opacity: 0; transition: opacity .25s; }
  .site-nav[data-state="open"] .site-nav-backdrop { opacity: 1; display: block; }
  .site-nav-panel {
    display: block; position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 85vw);
    background: linear-gradient(180deg, var(--c-bg-2), var(--c-bg));
    border-left: 1px solid var(--c-border);
    padding: 4rem 1.25rem 1.5rem;
    transform: translateX(100%); transition: transform .28s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,.8);
  }
  .site-nav[data-state="open"] .site-nav-panel { transform: translateX(0); }
  .nav-menu { flex-direction: column; gap: .75rem; }
  .nav-menu-link { font-size: 1rem; padding: .65rem .5rem; border-bottom: 1px solid var(--c-border); }
  .header-nav-close {
    display: inline-flex; position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px;
    align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; color: var(--c-bone);
  }
  .header-nav-close-icon { position: relative; width: 22px; height: 22px; }
  .header-nav-close-icon::before, .header-nav-close-icon::after {
    content:''; position:absolute; top:50%; left:0; right:0; height:2px; background: currentColor;
  }
  .header-nav-close-icon::before { transform: rotate(45deg); }
  .header-nav-close-icon::after  { transform: rotate(-45deg); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; cursor: pointer; border: none;
  text-decoration: none; transition: transform .15s, box-shadow .2s, filter .15s; line-height: 1;
}
.btn-primary {
  background: var(--c-bone); color: var(--c-bg);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
  border: 1px solid var(--c-bone);
}
.btn-primary:hover { transform: translateY(-1px); background: #fff; color: var(--c-bg); border-color: #fff; }
.btn-outline {
  background: transparent; color: var(--c-bone); border: 1px solid var(--c-bone);
}
.btn-outline:hover { background: rgba(214,207,193,.1); color: var(--c-bone); }
.btn-header { padding: .55rem 1.1rem; font-size: .8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Hero */
.hero { position: relative; overflow: hidden; margin: 0 0 1.5rem; min-height: 360px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,.5) 0%, rgba(5,5,5,.94) 100%),
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(0,0,0,.6) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1.25rem;
  text-align: center;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 0 0 .8rem;
  color: var(--c-bone);
  text-shadow: 0 0 30px rgba(240,235,222,.18), 0 4px 12px rgba(0,0,0,.7);
}
.hero-lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); margin: 0 0 1rem; font-weight: 500; color: var(--c-silver); font-family: var(--font-display); letter-spacing: .04em; }
.hero-text { max-width: 760px; margin: 0 auto 1.5rem; color: var(--c-text-mut); }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.hero-age { font-size: .85rem; color: var(--c-text-mut); letter-spacing: .05em; }

/* Generic content */
.responsibility-warning {
  background: rgba(240,235,222,.05); border-left: 3px solid var(--c-bone);
  padding: .7rem 1rem; border-radius: 2px; margin: 1.25rem 0;
}
.note { background: rgba(184,179,168,.05); border-left: 3px solid var(--c-silver); padding: .7rem 1rem; border-radius: 2px; margin: 1rem 0; }

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

/* Tables */
.table-scroll { overflow-x: auto; margin: 1rem 0; border-radius: 2px; border: 1px solid var(--c-border); }
table { width: 100%; border-collapse: collapse; background: rgba(20,16,26,.55); }
th, td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--c-border); }
th { background: rgba(240,235,222,.08); color: var(--c-bone); font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(240,235,222,.03); }

/* Demo block */
.demo-embed {
  position: relative; margin: 1.5rem 0; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #141414, #050505);
  border: 1px solid var(--c-border); border-radius: 2px; overflow: hidden;
  box-shadow: 0 0 40px rgba(240,235,222,.06) inset;
}
.demo-launcher {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.demo-frame-wrap { position: absolute; inset: 0; z-index: 1; display: none; }
.demo-frame-wrap iframe { width: 100%; height: 100%; border: 0; }
.demo-embed.is-playing .demo-launcher { display: none; }
.demo-embed.is-playing .demo-frame-wrap { display: block; }
.demo-play-btn {
  display: inline-flex; align-items: center; gap: .7rem; padding: 1rem 1.8rem;
  background: var(--c-bone); color: var(--c-bg); font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; border: 1px solid var(--c-bone); border-radius: 2px; cursor: pointer;
  letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.demo-play-btn:hover { transform: scale(1.03); }
.demo-play-icon { width: 0; height: 0; border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }

/* TOC / page nav */
.page-nav { margin: 1.25rem 0; background: rgba(20,16,26,.6); border: 1px solid var(--c-border); border-radius: 2px; padding: .35rem .75rem; }
.page-nav summary { cursor: pointer; padding: .6rem .25rem; font-family: var(--font-display); font-weight: 700; color: var(--c-bone); letter-spacing: .04em; text-transform: uppercase; font-size: .9rem; }
.page-nav ul { list-style: none; padding-left: 0; margin: .5rem 0; }
.page-nav li { margin: .25em 0; }
.page-nav a { color: var(--c-text-mut); border-bottom: none; }
.page-nav a:hover { color: #fff; }

/* FAQ accordion */
.faq-accordion { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.faq-item { background: rgba(20,16,26,.6); border: 1px solid var(--c-border); border-radius: 2px; padding: 0 1rem; }
.faq-question {
  padding: 1rem 0; cursor: pointer; font-weight: 700; color: var(--c-bone); font-family: var(--font-display);
  letter-spacing: .03em; list-style: none; position: relative; padding-right: 2rem;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content:'+'; position: absolute; right: 0; top: .9rem; font-size: 1.4rem; color: var(--c-silver); transition: transform .2s; }
.faq-item[open] .faq-question::after { content:'−'; }
.faq-answer { padding: 0 0 1rem; color: var(--c-text-mut); }

/* Author block */
.author-block {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(240,235,222,.04), rgba(184,179,168,.02));
  border: 1px solid var(--c-border); border-radius: 2px; padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.author-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--c-bone); display: flex; align-items: center; justify-content: center;
  color: var(--c-bg); font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  flex-shrink: 0; border: 2px solid var(--c-silver);
}
.author-photo {
  width: clamp(80px, 14vw, 128px); height: clamp(80px, 14vw, 128px); border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--c-bone);
  box-shadow: 0 0 18px rgba(240,235,222,.15);
  transition: filter .2s, box-shadow .2s;
}
.author-photo-link { display: block; flex-shrink: 0; line-height: 0; }
.author-photo-link:hover .author-photo { filter: brightness(1.1); box-shadow: 0 0 26px rgba(240,235,222,.35); }
.author-name a { color: inherit; text-decoration: none; border-bottom: none; }
.author-name a:hover { color: #fff; }
.author-linkedin {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: .4rem; width: 24px; height: 24px; vertical-align: middle;
  color: var(--c-silver); transition: color .2s, transform .2s; border-bottom: none;
}
.author-linkedin:hover { color: #fff; transform: scale(1.08); }
.author-photo {
  width: clamp(80px, 14vw, 128px); height: clamp(80px, 14vw, 128px); border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--c-bone);
  box-shadow: 0 0 18px rgba(240,235,222,.18);
}
.author-name { font-family: var(--font-display); color: var(--c-bone); margin: 0; font-size: 1.05rem; letter-spacing: .02em; }
.author-bio  { color: var(--c-text-mut); margin: .2rem 0 0; font-size: .9rem; }

/* Content image */
.content-img { margin: 1.2rem auto; border-radius: 2px; overflow: hidden; border: 1px solid var(--c-border); box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.content-img img { width: 100%; height: auto; display: block; }
.content-img--small { max-width: 600px; }
.footer-disclaimer-inline { margin-top: 1.5rem; padding: 1rem 1.2rem; background: rgba(196, 30, 58, 0.08); border-left: 3px solid #c41e3a; color: var(--c-text-mut); font-size: .88rem; line-height: 1.55; border-radius: 2px; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(180deg, var(--c-bg-2), #000000);
  border-top: 1px solid var(--c-border);
  padding: 2rem 1rem calc(2rem + var(--safe-bottom));
  text-align: center;
}
.footer-links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.25rem; }
.footer-links a { color: var(--c-text-mut); font-size: .9rem; border-bottom: none; }
.footer-links a:hover { color: var(--c-bone); }
.footer-badges {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .9rem 1.4rem; margin: 1rem auto 1.2rem; padding: 1rem 0;
  border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border);
  max-width: 720px;
}
.footer-badge { display: inline-flex; align-items: center; line-height: 0; opacity: .85; transition: opacity .15s ease; border-bottom: none; }
.footer-badge:hover { opacity: 1; }
.footer-badge img { height: auto; max-height: 40px; width: auto; display: block; filter: brightness(1) saturate(.95); background: rgba(255,255,255,.92); padding: 4px 8px; border-radius: 3px; }
.footer-copy { color: var(--c-text-mut); margin: .6rem 0 .3rem; font-size: .9rem; }
.footer-disclaimer { color: var(--c-text-mut); font-size: .8rem; margin: 0; opacity: .85; line-height: 1.55; }
.age-badge {
  display: inline-block; background: var(--c-bone); color: var(--c-bg); padding: 1px 7px; border-radius: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem; margin-right: .35rem; letter-spacing: .03em;
}

/* Back to top */
.back-to-top {
  position: fixed; right: 1rem; bottom: calc(1rem + var(--safe-bottom)); width: 44px; height: 44px;
  border-radius: 2px; border: 1px solid var(--c-bone); background: var(--c-bone); color: var(--c-bg); font-size: 1.2rem;
  font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.6); z-index: 900;
}
.back-to-top[hidden] { display: none; }

/* 404 */
.page-404 { text-align: center; padding: 4rem 1rem; max-width: 600px; margin: 0 auto; }
.page-404 .code { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 9rem); margin: 0; color: var(--c-bone); line-height: 1; text-shadow: 0 0 30px rgba(240,235,222,.2); }

/* Steps list */
.steps-list { counter-reset: step; list-style: none; padding-left: 0; }
.steps-list li {
  position: relative; padding: .6rem .6rem .6rem 3rem; margin: .6rem 0;
  background: rgba(20,20,20,.5); border-left: 3px solid var(--c-bone); border-radius: 0 2px 2px 0;
  counter-increment: step;
}
.steps-list li::before {
  content: counter(step); position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--c-bone);
  color: var(--c-bg); font-family: var(--font-display); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-bone);
}

/* Article meta date */
.article-meta { color: var(--c-text-mut); font-size: .9rem; margin: 0 0 1rem; font-style: italic; }

.text-center { text-align: center; }
.muted { color: var(--c-text-mut); }
