/* KRYO° — démo Studio Chardon */
:root {
  --bg: #08080A;
  --panel: rgba(12, 12, 15, 0.86);
  --text: #E6E7EA;
  --muted: #8C9099;
  --line: #2A2B30;
  --line-hi: #4A4C53;
  --accent: #FF6B00;
  --accent-rgb: 255, 107, 0;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pix: 'Silkscreen', 'JetBrains Mono', monospace;
  --header-h: 60px;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
html.reduce-motion { scroll-behavior: auto; }
body {
  background: var(--bg); color: var(--text);
  font: 400 13px/1.55 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.small { font-size: 11px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--accent); color: #000; padding: 8px 12px; }
.skip:focus { left: 8px; }

#thermal-grid { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, .site-footer, .reassure { position: relative; z-index: 1; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; height: var(--header-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
  background: rgba(8, 8, 10, .92); border-bottom: 1px solid var(--line);
}
.logo { font: 700 22px/1 var(--pix); letter-spacing: .12em; text-decoration: none; display: inline-flex; align-items: flex-start; }
/* Le ° de Silkscreen ressemble à un +, on le dessine en carré pixel */
.deg { display: inline-block; width: .32em; height: .32em; border: .09em solid var(--accent); margin-left: .02em; }
.footer-logo { display: flex; align-items: flex-start; }
.header-right { display: flex; align-items: center; gap: 14px; }
.burger { width: 34px; height: 34px; background: none; border: 0; display: grid; place-content: center; gap: 6px; }
.burger span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: transform .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.menu { position: fixed; inset: var(--header-h) 0 0; z-index: 99; background: var(--bg); padding: 32px var(--gutter); display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu > ul { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.menu > ul > li > a { font-size: clamp(26px, 7vw, 44px); text-decoration: none; letter-spacing: .06em; }
.menu-sub { list-style: none; margin: 10px 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.menu-sub a { color: var(--muted); text-decoration: none; font-size: 13px; }
.menu-sub a:hover, .menu > ul > li > a:hover { color: var(--accent); }

/* Boutons */
.btn-line { background: transparent; border: 1px solid var(--text); padding: 12px 20px; display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 12px; letter-spacing: .1em; transition: background .2s, color .2s, border-color .2s; }
.btn-line:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #000; }
.btn-line:disabled { opacity: .45; cursor: not-allowed; }
.btn-small { padding: 7px 12px; font-size: 10px; }
.btn-block { width: 100%; }
.btn-fill { background: var(--text); color: #000; }
.link-btn { background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 11px; color: var(--muted); }
.link-btn[aria-pressed="true"] { color: var(--accent); }

/* Hero */
.hero { height: 300vh; position: relative; z-index: 1; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(var(--header-h) + 14px) var(--gutter) 18px; display: flex; }
.hud { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; max-width: 1280px; margin: 0 auto; width: 100%; }
.corner { position: absolute; width: 16px; height: 16px; border: 0 solid var(--text); opacity: .75; }
.corner.tl { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.corner.tr { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.corner.bl { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.corner.br { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }
.hud-top { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.hud-top .right { text-align: right; }
.jacket-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.jacket-fallback, .seq-canvas { height: min(100%, 520px); aspect-ratio: 300 / 360; max-width: 100%; }
.seq-canvas { aspect-ratio: 16 / 9; height: auto; width: min(100%, 900px); }
.jacket-fallback { position: relative; perspective: 1200px; }
.jacket-fallback .face { position: absolute; inset: 0; will-change: transform; filter: drop-shadow(0 30px 40px rgba(0,0,0,.8)); }
.jacket-fallback svg { width: 100%; height: 100%; display: block; }
.hud-readout { position: absolute; left: 18px; right: 18px; top: 50%; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); pointer-events: none; }
.hud-readout b { color: var(--text); font-weight: 500; }
.hud-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.tagline { font-size: 13px; }

/* Réassurance */
.reassure { max-width: 1280px; margin: 0 auto 110px; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.box { border: 1px solid var(--line); background: var(--panel); padding: 16px 18px; display: flex; gap: 16px; align-items: center; font-size: 11px; }
.pix-icon { width: 28px; height: 28px; color: var(--accent); flex: none; image-rendering: pixelated; }

/* Sections */
.section { max-width: 1280px; margin: 0 auto 130px; padding: 0 var(--gutter); }
.section-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.section-head p { max-width: 420px; font-size: 12px; }
.h-xl { font: 500 clamp(36px, 8vw, 88px)/0.95 var(--mono); letter-spacing: -.02em; }
.num { color: var(--muted); font-size: 11px; min-width: 2.2em; }

/* Anatomie */
.anatomy { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.scanner { position: sticky; top: calc(var(--header-h) + 20px); aspect-ratio: 300 / 360; border: 1px solid var(--line); background: radial-gradient(circle at 50% 55%, rgba(var(--accent-rgb), .08), transparent 65%), var(--panel); overflow: hidden; touch-action: pan-y; cursor: crosshair; }
.scan-layer { position: absolute; inset: 6% 8%; }
.scan-layer svg, .scan-layer img { width: 100%; height: 100%; display: block; object-fit: contain; }
.scan-xray { clip-path: circle(0 at 50% 50%); }
.scanner.locked .scan-xray { clip-path: circle(150% at 50% 50%) !important; transition: clip-path .6s ease; }
.scan-ring { position: absolute; width: 0; height: 0; border: 1px solid var(--accent); border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 24px rgba(var(--accent-rgb), .5); transform: translate(-50%, -50%); }
.scanner.scanning .scan-ring { opacity: 1; }
.scanner.locked .scan-ring, .scanner.scanning .scan-hint { opacity: 0; }
.scan-hint { position: absolute; left: 14px; bottom: 14px; font-size: 10px; transition: opacity .3s; }
.scan-lock { position: absolute; right: 12px; bottom: 12px; background: rgba(8,8,10,.85); border-color: var(--accent); color: var(--accent); }
.scan-lock[aria-pressed="true"] { background: var(--accent); color: #000; }
.cards { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.card { border: 1px solid var(--line); background: var(--panel); padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; transition: border-color .25s; }
.card:hover { border-color: var(--line-hi); }
.card h3, .strata-list h3 { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.card p, .strata-list p { color: var(--muted); font-size: 12px; }
.line-icon { grid-column: 2; width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.3; margin-top: 8px; }

/* Calibres */
.catalog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product { border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; }
.product-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 18px 0; }
.product-top button { background: none; border: 0; font-size: 18px; line-height: 1; color: var(--muted); }
.product-top button:hover { color: var(--accent); }
.product-name { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 18px 14px; border-bottom: 1px solid var(--line); }
.product-name h3 { font-size: 18px; font-weight: 500; line-height: 1.15; }
.product-name .price { color: var(--accent); font-size: 14px; white-space: nowrap; }
.product-visual { position: relative; height: clamp(300px, 38vw, 440px); overflow: hidden; cursor: pointer; background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.04), transparent 70%); }
.product-visual .pv { position: absolute; inset: 8% 18%; will-change: transform; }
.product-visual svg, .product-visual img { width: 100%; height: 100%; display: block; object-fit: contain; }
.swatches { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.swatch { width: 16px; height: 16px; border: 1px solid rgba(255,255,255,.5); padding: 0; }
.swatch[aria-pressed="true"] { outline: 1px solid var(--accent); outline-offset: 2px; }
.product .btn-line { border-width: 1px 0 0; border-color: var(--line); padding: 15px 18px; }

/* Strates */
.strata { height: 420vh; position: relative; z-index: 1; }
.strata-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(var(--header-h) + 24px) var(--gutter) 24px; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; }
.strata-sticky .section-head { margin-bottom: 12px; }
.strata-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.stack-stage { height: 100%; min-height: 280px; display: flex; align-items: center; justify-content: center; perspective: 1400px; }
.stack { position: relative; width: clamp(150px, 22vw, 240px); aspect-ratio: 1; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-42deg); }
.plate { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.28); transition: border-color .3s, box-shadow .3s, opacity .3s; display: flex; align-items: flex-end; padding: 8px; }
.plate.active { border-color: var(--accent); box-shadow: 0 0 34px rgba(var(--accent-rgb), .55); }
.plate.dim { opacity: .55; }
.plate-tag { font-size: 10px; background: rgba(0,0,0,.7); padding: 1px 5px; }
.p1 { background: #22252B url(../img/strate-01.webp) center / cover; }
.p2 { background: #141518 url(../img/strate-02.webp) center / cover; }
.p3 { background: #1A1B1F url(../img/strate-03.webp) center / cover; }
.p4 { background: #33363D url(../img/strate-04.webp) center / cover; }
.p5 { background: #1C1009 url(../img/strate-05.webp) center / cover; }
.strata-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.strata-list li { border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 14px; transition: border-color .3s, background .3s, opacity .3s; opacity: .55; }
.strata-list li.active { border-color: var(--accent); background: rgba(var(--accent-rgb), .07); opacity: 1; }
.strata-list li.active .num { color: var(--accent); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--line); background: var(--panel); }
.faq summary { list-style: none; cursor: pointer; padding: 18px; display: flex; gap: 14px; font-size: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq p { padding: 0 18px 18px calc(18px + 2.2em + 14px); color: var(--muted); font-size: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 60px var(--gutter) 28px; max-width: 1280px; margin: 0 auto; }
.footer-logo { font: 700 clamp(64px, 18vw, 220px)/.9 var(--pix); letter-spacing: .04em; margin-bottom: 40px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.footer-cols h4 { font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.footer-cols ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-cols a { text-decoration: none; font-size: 12px; }
.footer-cols a:hover { color: var(--accent); }
.disclaimer { font-size: 11px; color: var(--muted); border: 1px dashed var(--line-hi); padding: 10px 14px; margin-bottom: 20px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; }

/* Tiroirs */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 150; }
.backdrop[hidden] { display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 460px); z-index: 160; background: #0A0A0D; border-left: 1px solid var(--line-hi); display: flex; flex-direction: column; overflow-y: auto; animation: drawer-in .3s ease; }
.drawer[hidden] { display: none; }
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 18px; font-weight: 500; }
.drawer-body { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); }
.pd-visual { height: 220px; }
.pd-visual svg, .pd-visual img { width: 100%; height: 100%; object-fit: contain; }
.spec { width: 100%; border-collapse: collapse; font-size: 11px; }
.spec th, .spec td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--muted); }
.spec td { text-align: right; color: var(--text); }
.sizes { border: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sizes legend { margin-bottom: 8px; }
.sizes label { position: relative; }
.sizes input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sizes span { display: block; text-align: center; border: 1px solid var(--line); padding: 10px; }
.sizes input:checked + span { border-color: var(--accent); background: rgba(var(--accent-rgb), .18); }
.sizes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cart-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cart-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); padding: 12px; font-size: 12px; }
.cart-list button { background: none; border: 0; color: var(--muted); }
.cart-list button:hover { color: var(--accent); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .anatomy, .catalog { grid-template-columns: 1fr; }
  .scanner { position: relative; top: 0; max-height: 78svh; margin: 0 auto; width: 100%; max-width: 480px; }
  .strata-layout { grid-template-columns: 1fr; grid-template-rows: minmax(200px, 1fr) auto; gap: 12px; }
  .strata-list li { display: none; }
  .strata-list li.active { display: grid; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .hud { padding: 14px 10px; }
  .hud-top { font-size: 10.5px; }
  .hud-bottom .btn-line { width: 100%; }
  .tagline { font-size: 12px; }
  .hud-readout { top: auto; bottom: 120px; }
  .jacket-fallback { height: min(78%, 380px); }
  /* L'image est en 16:9 avec de grandes marges transparentes : on l'agrandit pour remplir l'écran */
  .jacket-stage { overflow: hidden; }
  .seq-canvas { width: 160%; max-width: none; flex: none; margin-top: 18%; }
}

/* Animations réduites */
html.reduce-motion .hero { height: auto; }
html.reduce-motion .hero-sticky { position: relative; }
html.reduce-motion .strata { height: auto; }
html.reduce-motion .strata-sticky { position: relative; height: auto; min-height: 100svh; }
html.reduce-motion .strata-list li { display: grid; opacity: 1; }
html.reduce-motion .drawer { animation: none; }
html.reduce-motion * { transition: none !important; }

/* Recette 2026-11-04 : contenir le visuel dans les écrans bas. */
@media (min-width: 521px) and (max-height: 600px) {
  .jacket-stage .seq-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
}

/* Paysage court : laisser défiler les cinq descriptions dans la page. */
@media (min-width: 521px) and (max-height: 600px) {
  .strata { height: auto; }
  .strata-sticky { position: relative; height: auto; min-height: 100svh; }
  .strata-layout { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .stack-stage { height: 340px; }
  .strata-list li { display: grid; opacity: 1; }
}
