/* =========================================================
   ROULEAUX MANUTENTION — v2
   Clair : « bento » (tuiles arrondies sur fond gris chaud)
   Sombre : industriel (graphite, quadrillage, violet du logo)
   Toutes les couleurs sont ici, en haut du fichier.
   ========================================================= */

:root {
  --bg: #efeeea;
  --tile: #ffffff;
  --tile-2: #f6f5f2;
  --ink: #0e0f11;
  --text: #1b1d21;
  --muted: #646770;
  --line: #e0dfda;
  --accent: #7a137b;
  --accent-2: #620062;
  --accent-ink: #ffffff;
  --accent-soft: rgba(122, 19, 123, .09);
  --steel: #8a8f99;
  --steel-2: #c9ccd2;
  --night: #0e0f11;            /* tuiles toujours sombres (3D, configurateur) */
  --night-2: #1a1c20;
  --night-text: #f1f1ee;
  --night-muted: #a2a5ad;
  --grid: transparent;         /* quadrillage de fond, visible en sombre */
  --shadow: 0 1px 2px rgba(14, 15, 17, .04), 0 12px 32px rgba(14, 15, 17, .06);
  --glass: rgba(239, 238, 234, .82);
  --ok: #16a34a;
  --err: #dc2626;

  /* noms repris de la v1 : utilisés par les scripts des configurateurs */
  --brand: var(--accent);
  --brand-2: var(--accent);
  --brand-soft: var(--accent-soft);
  --surface: var(--tile);
  --bg-2: var(--tile-2);
  --border: var(--line);

  --r: 24px;
  --r-sm: 14px;
  --header-h: 72px;
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0e; --tile: #131518; --tile-2: #1a1d21; --ink: #f4f4f1; --text: #e4e5e8; --muted: #959aa3; --line: #252930;
    --accent: #c35ac4; --accent-2: #d27bd3; --accent-ink: #1a0619; --accent-soft: rgba(195, 90, 196, .15);
    --night: #08090b; --night-2: #15171b; --grid: rgba(255, 255, 255, .035);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 18px 40px rgba(0, 0, 0, .45); --glass: rgba(11, 12, 14, .8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0e; --tile: #131518; --tile-2: #1a1d21; --ink: #f4f4f1; --text: #e4e5e8; --muted: #959aa3; --line: #252930;
  --accent: #c35ac4; --accent-2: #d27bd3; --accent-ink: #1a0619; --accent-soft: rgba(195, 90, 196, .15);
  --night: #08090b; --night-2: #15171b; --grid: rgba(255, 255, 255, .035);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 18px 40px rgba(0, 0, 0, .45); --glass: rgba(11, 12, 14, .8); color-scheme: dark;
}

html[data-lang="fr"] [data-l="en"],
html[data-lang="en"] [data-l="fr"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 16px/1.6 var(--font-body); overflow-x: hidden;
  background: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-stretch: 82%; line-height: 1; margin: 0 0 .45em; letter-spacing: -.02em; font-weight: 800; color: var(--ink); }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: color-mix(in srgb, var(--tile) 45%, transparent); border-block: 1px solid var(--line); }
.center { text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.display { text-transform: uppercase; font-stretch: 70%; font-weight: 900; letter-spacing: -.01em; line-height: .9; }
.lead { font-size: clamp(1.02rem, 1.5vw, 1.15rem); color: var(--muted); max-width: 640px; }
.center .lead { margin-inline: auto; }
.hl { color: var(--accent); }
.mono { font-family: var(--font-mono); }

/* boutons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px;
  font: 700 .93rem/1 var(--font-head); border: 1.5px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--tile); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-2px); }
.btn-sm { padding: 11px 18px; font-size: .86rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* en-tête : barre flottante arrondie */
.site-header { position: sticky; top: 10px; z-index: 50; height: var(--header-h); display: flex; align-items: center; pointer-events: none; }
.site-header .container { pointer-events: auto; display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 10px 0 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: var(--shadow); }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo .txt { font: 800 .95rem/1 var(--font-head); font-stretch: 78%; letter-spacing: .03em; color: var(--muted); }
.logo .txt b { display: block; color: var(--ink); font-weight: 900; font-size: 1.08rem; }
.logo .txt small { display: none; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { white-space: nowrap; padding: 10px 13px; border-radius: 999px; font: 600 .9rem/1 var(--font-head); color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--tile-2); }
.nav a.active { color: var(--ink); background: var(--tile-2); box-shadow: inset 0 0 0 1px var(--line); }
.tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--tile); color: var(--ink); cursor: pointer; font: 700 .76rem/1 var(--font-mono); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
.burger { display: none; }
@media (max-width: 1140px) {
  .nav { position: fixed; top: calc(var(--header-h) + 6px); left: 16px; right: 16px; flex-direction: column; background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s; box-shadow: var(--shadow); }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; border-radius: 12px; }
  .tools { margin-left: auto; }
  .tools .btn { display: none; }
  .burger { display: grid; }
}

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 2.6vw, 32px); overflow: hidden; min-width: 0; }
a.tile { transition: transform .25s, box-shadow .25s, border-color .25s; }
a.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile.night { background: var(--night); border-color: #202329; color: var(--night-text); }
.tile.night h2, .tile.night h3 { color: #fff; }
.tile.night p, .tile.night .lead { color: var(--night-muted); }
.tile.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile.accent h2, .tile.accent h3, .tile.accent p { color: var(--accent-ink); }
.tile.photo-tile { padding: 0; }
.tile.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
a.tile.photo-tile:hover img { transform: scale(1.04); }
.tile .cap { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); }
.tile .cap h3 { font-size: 1.15rem; margin: 0; }
.tile .cap small { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; }
.tile .cap svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.tile .tag { position: absolute; top: 16px; left: 16px; font: 700 .7rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--ink); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.r2 { grid-row: span 2; }
@media (max-width: 980px) { .c3 { grid-column: span 6; } .c4, .c5, .c7, .c8 { grid-column: span 12; } .c6 { grid-column: span 12; } .r2 { grid-row: auto; } }
@media (max-width: 560px) { .c3 { grid-column: span 12; } }

.stat-tile strong { display: block; font: 900 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font-head); font-stretch: 72%; color: var(--ink); letter-spacing: -.02em; }
.stat-tile strong em { font-style: normal; color: var(--accent); }
.stat-tile span { display: block; margin-top: 8px; color: var(--muted); font-size: .92rem; }

/* zones toujours sombres : violet clair, lisible sur le noir */
.tile.night, .story-pin, .summary, .need, .site-footer, .dark, .view3d { --accent: #c35ac4; --accent-2: #d27bd3; --accent-ink: #1a0619; --accent-soft: rgba(195, 90, 196, .15); }

/* ---------- hero ---------- */
.hero { padding: 24px 0 12px; }
.hero-main { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: clamp(440px, 64vh, 620px); }
.hero h1 { font-size: clamp(2.8rem, 5.8vw, 5.6rem); margin: 0; }
.hero .lead { margin: 18px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--tile-2); border: 1px solid var(--line); font: 700 .74rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); align-self: flex-start; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.hero-3d { padding: 0; min-height: 340px; display: flex; }
.hero-3d .stage-live { flex: 1; position: relative; min-height: 340px; }
.hero-3d canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.hero-3d .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-3d .hud { position: absolute; z-index: 1; left: 18px; right: 18px; top: 18px; display: flex; justify-content: space-between; font: 700 .72rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--night-muted); pointer-events: none; }
.hero-3d .hud b { color: var(--accent); font-weight: 700; }
.hero-3d .hud-bottom { top: auto; bottom: 18px; }

/* bandeau défilant des séries */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--tile); margin-top: 12px; }
.ticker-track { display: flex; gap: 46px; width: max-content; padding: 16px 0; animation: tick 38s linear infinite; font: 700 .9rem/1 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.ticker-track span { display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; }
.ticker-track span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- récit 3D au défilement ---------- */
.story { position: relative; height: 380vh; }
.story-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--night); color: var(--night-text); }
.story-pin canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.story-pin .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.story-ui { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--header-h) + 24px) 0 clamp(28px, 6vh, 64px); background: linear-gradient(90deg, rgba(8, 9, 11, .82), rgba(8, 9, 11, .2) 55%, transparent); }
.story-steps { position: relative; min-height: 260px; }
.story-step { position: absolute; left: 0; bottom: 0; max-width: 520px; opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s; }
.story-step.on { opacity: 1; transform: none; pointer-events: auto; }
.story-step .eyebrow { color: var(--accent); }
.story-step h2 { color: #fff; font-size: clamp(2.4rem, 6vw, 5rem); }
.story-step p { color: var(--night-muted); font-size: 1.05rem; max-width: 460px; }
.story-step .specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; }
.story-step .specs > span { font: 700 .76rem/1 var(--font-mono); padding: 8px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); color: #fff; background: rgba(255, 255, 255, .04); }
.story-rail { position: absolute; z-index: 2; right: clamp(16px, 4vw, 48px); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; font: 700 .72rem/1 var(--font-mono); letter-spacing: .08em; color: var(--night-muted); text-transform: uppercase; }
.story-rail span { display: flex; align-items: center; gap: 10px; justify-content: flex-end; transition: color .3s; }
.story-rail span::after { content: ""; width: 26px; height: 2px; background: currentColor; opacity: .5; transition: width .3s, opacity .3s; }
.story-rail span.on { color: #fff; }
.story-rail span.on::after { width: 48px; background: var(--accent); opacity: 1; }
.story-progress { position: absolute; z-index: 2; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; }
@media (max-width: 760px) {
  .story-ui { background: linear-gradient(0deg, rgba(8, 9, 11, .92) 30%, transparent 75%); }
  .story-rail { display: none; }
  .story-steps { min-height: 300px; }
}

/* bandeau de chiffres (pages intérieures) */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fact { padding: 22px; border-radius: var(--r); background: var(--tile); border: 1px solid var(--line); }
.fact strong { display: block; font: 800 1.15rem/1.2 var(--font-head); color: var(--ink); margin-bottom: 4px; }
.fact span { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* ---------- cartes (catalogue, accessoires) ---------- */
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; transition: transform .25s, box-shadow .25s, border-color .25s; display: flex; flex-direction: column; min-width: 0; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card h3 { font-size: 1.4rem; }
.card p { color: var(--muted); margin: 0; }
.card .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 20px; }
.card .ico svg { width: 26px; height: 26px; }
.prod { padding: 0; overflow: hidden; }
.prod .img { aspect-ratio: 4/3; overflow: hidden; background: #ececea; margin: 8px 8px 0; border-radius: 18px; }
.prod .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.prod:hover .img img { transform: scale(1.04); }
.prod .body { padding: 18px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { font: 600 .74rem/1 var(--font-mono); padding: 6px 9px; border-radius: 999px; background: var(--tile-2); border: 1px solid var(--line); color: var(--muted); }
.more { margin-top: auto; padding-top: 18px; color: var(--accent); font: 700 .9rem/1 var(--font-head); display: inline-flex; gap: 8px; align-items: center; }
.more svg { width: 16px; height: 16px; }

/* split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.photo { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--tile); padding: 8px; }
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; }
.checks { list-style: none; padding: 0; margin: 18px 0 28px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* bandeau sombre */
.dark { background: var(--night); color: var(--night-text); }
.dark h2, .dark h3 { color: #fff; }
.dark .lead, .dark p { color: var(--night-muted); }
.cta { border-radius: var(--r); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -90px; top: -90px; width: 300px; height: 300px; border-radius: 50%; border: 34px solid color-mix(in srgb, var(--accent) 30%, transparent); pointer-events: none; }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 620px; margin-bottom: 8px; }
.cta p { margin: 0; max-width: 540px; }
.cta > * { position: relative; z-index: 1; }

/* galerie */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 12px; }
.gallery figure { margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.gallery .big { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; } }

/* pages intérieures : en-tête de page en tuile */
.hero:not(.home) .container { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.hero:not(.home) .container > :only-child { grid-column: 1 / -1; }
.hero:not(.home) .photo { display: flex; align-items: center; }
@media (max-width: 900px) { .hero:not(.home) .container { grid-template-columns: 1fr; } }
.hero:not(.home) .container > div { background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(26px, 4vw, 48px); }
.hero:not(.home) h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); text-transform: uppercase; font-stretch: 72%; font-weight: 900; line-height: .92; }
.hero:not(.home) .lead { margin-bottom: 0; }
.hero-art { display: none; }

/* ---------- formulaires ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field label, .lbl { display: block; font: 700 .74rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--tile-2); color: var(--text); font: inherit; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--tile); }
.hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.status { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.4em; }
.status.ok { color: var(--ok); } .status.err { color: var(--err); }
.hp { position: absolute; left: -9999px; }

/* ---------- configurateurs ---------- */
.cfg { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .cfg { grid-template-columns: 1fr; } }
.cfg-preview { position: sticky; top: calc(var(--header-h) + 22px); }
@media (max-width: 980px) { .cfg-preview { position: static; order: -1; } }
.stage { background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.stage svg { width: 100%; height: auto; display: block; }
.stage .dims { fill: var(--muted); font: 600 13px var(--font-mono); }
.stage .dimline { stroke: var(--muted); }
.step { border: 1px solid var(--line); border-radius: var(--r); background: var(--tile); padding: 22px 24px; margin-bottom: 12px; }
.step h3 { font-size: 1.3rem; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step h3 i { font: 700 .78rem/1 var(--font-mono); font-style: normal; width: 30px; height: 30px; border-radius: 10px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: block; height: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--tile-2); cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--ink); transition: border-color .2s, background .2s; }
.choice > span:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.choice > span small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input:disabled + span { opacity: .4; cursor: not-allowed; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.summary { margin-top: 12px; border: 1px solid #202329; border-radius: var(--r); background: var(--night); color: var(--night-text); padding: 22px 24px; }
.summary .lbl { color: var(--night-muted); }
.summary .ref { font: 700 1.05rem/1.35 var(--font-mono); color: var(--accent); word-break: break-all; margin-bottom: 14px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: .9rem; }
.summary dt { color: var(--night-muted); }
.summary dd { margin: 0; font-weight: 600; color: #fff; }
.summary .actions { margin-top: 18px; }
.summary .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .2); }
.summary .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 4px 10px; }
.stage-head .lbl { margin: 0; }
.view-switch { display: inline-flex; padding: 3px; gap: 3px; border-radius: 999px; background: var(--tile-2); border: 1px solid var(--line); }
.view-switch[hidden] { display: none; }
.view-switch button { border: 0; background: none; color: var(--muted); padding: 8px 14px; border-radius: 999px; font: 700 .8rem/1 var(--font-head); cursor: pointer; }
.view-switch button.active { background: var(--ink); color: var(--bg); }
.view3d { position: relative; height: clamp(300px, 48vh, 480px); border-radius: 18px; overflow: hidden; cursor: grab; touch-action: none;
  background: radial-gradient(120% 90% at 50% 0%, #2a2d33, #0b0c0e); }
.view3d:active { cursor: grabbing; }
.view3d canvas { display: block; width: 100% !important; height: 100% !important; }
.v3-hint { position: absolute; left: 12px; bottom: 10px; font: 600 .7rem/1 var(--font-mono); color: #9a9ea6; pointer-events: none; }
.stage[data-view="2d"] .view3d { display: none; }
.stage[data-view="3d"] > svg, .stage[data-view="3d"] .legend-2d { display: none; }
@media print { .view3d { display: none !important; } .stage > svg { display: block !important; } }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--tile-2); border: 1px solid var(--line); margin-bottom: 22px; }
.tabs a { padding: 10px 16px; border-radius: 999px; font: 700 .88rem/1 var(--font-head); color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--ink); color: var(--bg); }

.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr; } }
.segs { display: grid; gap: 8px; }
.seg { display: grid; grid-template-columns: 30px minmax(0, 1fr) 130px 40px; gap: 8px; align-items: center; }
.seg > b { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 .8rem/1 var(--font-mono); }
.seg select, .seg input { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--tile-2); color: var(--text); font: inherit; font-size: .92rem; min-width: 0; }
.seg select:focus, .seg input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.seg-len { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.seg .icon-btn { font-size: 1.2rem; }
.seg .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 520px) { .seg { grid-template-columns: 30px minmax(0, 1fr) 40px; } .seg-len { grid-column: 2; } .seg .icon-btn { grid-row: 1; grid-column: 3; } }
.note { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: .88rem; }
.equip { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.equip .toggle { margin-top: 10px; font-weight: 500; }
.equip .toggle:has(input:disabled) { opacity: .4; cursor: not-allowed; }
@media (max-width: 600px) { .equip { grid-template-columns: 1fr; } }
.stage svg.layout { max-height: min(62vh, 540px); margin-top: 6px; }
.ly-bed { fill: color-mix(in srgb, var(--steel-2) 26%, var(--tile)); }
.ly-roll { stroke: var(--steel); }
.ly-motor { stroke: var(--accent); }
.ly-sensor { fill: var(--ok); }
.ly-frame { stroke: var(--ink); stroke-linejoin: round; }
.ly-guard { stroke: #e0a72a; stroke-dasharray: 6 4; }
.ly-chain { stroke: #6b7280; stroke-dasharray: 3 2; }
.ly-stop { stroke: var(--err); stroke-linecap: round; }
.ly-load { fill: rgba(196, 140, 72, .55); stroke: #a7783d; }
.ly-num { fill: var(--accent); }
.ly-numtxt { fill: var(--accent-ink); font-family: var(--font-mono); font-weight: 700; }
.ly-dim { fill: var(--muted); font-family: var(--font-mono); font-weight: 600; }
.ly-io { fill: var(--accent); font-family: var(--font-mono); font-weight: 700; letter-spacing: .08em; }
.ly-flow { stroke: var(--accent); }
.ly-arrow { fill: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 4px 2px; font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 4px; border-radius: 2px; background: var(--steel); }
.legend .lg-motor { background: var(--accent); }
.legend .lg-sensor { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.legend .lg-guard { background: repeating-linear-gradient(90deg, #e0a72a 0 5px, transparent 5px 8px); }
.legend .lg-chain { background: repeating-linear-gradient(90deg, #6b7280 0 3px, transparent 3px 5px); height: 5px; }
.legend .lg-load { width: 12px; height: 10px; background: rgba(196, 140, 72, .55); border: 1px solid #a7783d; border-radius: 1px; }

/* ---------- catalogue ---------- */
.cat-group { margin: 40px 0 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.cat-group h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.cat-group p { color: var(--muted); margin: 0; }
#rouleaux-catalogue .prod .img { aspect-ratio: 2 / 1; background: #ececea; }
.series { font: 700 .72rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.mini-specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: .86rem; }
.mini-specs dt { color: var(--muted); }
.mini-specs dd { margin: 0; font-weight: 600; font-family: var(--font-mono); font-size: .82rem; }
.load-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .85rem; }
.load-box summary { cursor: pointer; font: 700 .86rem/1.4 var(--font-head); color: var(--accent); }
.load-box .tbl { overflow-x: auto; margin-top: 10px; }
table.load { border-collapse: collapse; font: 500 .76rem/1.3 var(--font-mono); white-space: nowrap; }
table.load th, table.load td { padding: 5px 7px; border-bottom: 1px solid var(--line); text-align: center; }
table.load th { background: var(--tile-2); font-weight: 700; }
table.load td:first-child, table.load th:first-child { text-align: left; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: .93rem; }
.spec-table th, .spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 500; width: 46%; }
.spec-table td { font-weight: 600; font-family: var(--font-mono); font-size: .86rem; }
.photo.light img { object-fit: contain; background: #fff; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin: -10px 0 26px; }
.opts span { font: 600 .76rem/1 var(--font-mono); padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.prod .img.icon-img { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.prod .img.icon-img svg { width: 84px; height: 84px; }
.prod .btns { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- sélecteur de rouleau ---------- */
.sel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; align-items: start; }
@media (max-width: 980px) { .sel { grid-template-columns: 1fr; } }
.sel-form { position: sticky; top: calc(var(--header-h) + 22px); display: grid; gap: 18px; }
@media (max-width: 980px) { .sel-form { position: static; } }
.range-field output { float: right; font: 700 .9rem/1 var(--font-mono); color: var(--ink); }
.range-field input[type="range"] { width: 100%; accent-color: var(--accent); margin: 6px 0 0; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-choice label { position: relative; display: inline-block; margin: 0; font: inherit; text-transform: none; letter-spacing: 0; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice label > span { display: inline-block; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--tile-2); font: 600 .86rem/1 var(--font-head); cursor: pointer; color: var(--ink); }
.seg-choice input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.need { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.need div { padding: 14px; border-radius: 16px; background: var(--night); color: var(--night-muted); font-size: .76rem; }
.need b { display: block; font: 700 1.25rem/1.1 var(--font-mono); color: #fff; margin-bottom: 4px; }
.need div:first-child b { color: var(--accent); }
.results { display: grid; gap: 12px; }
.res { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0; padding: 0; }
.res .img { background: #ececea; margin: 8px; border-radius: 16px; overflow: hidden; }
.res .img img { width: 100%; height: 100%; object-fit: cover; }
.res .body { padding: 20px 22px 22px 12px; display: flex; flex-direction: column; gap: 6px; }
.res h3 { font-size: 1.35rem; margin: 0; }
.res .why { color: var(--muted); font-size: .9rem; margin: 0; }
.res.best { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.badge { display: inline-block; font: 700 .68rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); margin-left: 8px; vertical-align: 3px; }
.gauge { margin: 8px 0 4px; }
.gauge-bar { position: relative; height: 10px; border-radius: 999px; background: var(--tile-2); border: 1px solid var(--line); overflow: hidden; }
.gauge-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--ok), #84cc16 60%, #f59e0b 85%, var(--err)); transition: width .4s; }
.gauge-txt { display: flex; justify-content: space-between; gap: 10px; font: 600 .76rem/1.4 var(--font-mono); color: var(--muted); margin-top: 6px; }
.res .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.empty { text-align: center; padding: 48px 24px; }
@media (max-width: 600px) { .res { grid-template-columns: 1fr; } .res .img { aspect-ratio: 2 / 1; } .res .body { padding: 6px 20px 20px; } .need b { font-size: 1.05rem; } }

/* ---------- pied de page ---------- */
.site-footer { margin-top: 12px; background: var(--night); color: var(--night-muted); padding: 64px 0 28px; border-radius: var(--r) var(--r) 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer .logo .txt b { color: #fff; }
.site-footer h4 { color: #fff; font: 700 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a:hover { color: #fff; }
.foot-big { margin: 52px 0 0; font: 900 clamp(3rem, 12vw, 10.5rem)/.82 var(--font-head); font-stretch: 66%; letter-spacing: -.02em; text-transform: uppercase; color: #1d2025; white-space: nowrap; overflow: hidden; }
.foot-big em { font-style: normal; color: var(--accent); }
.foot-bottom { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font: 500 .8rem/1.4 var(--font-mono); }

/* apparitions */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .story { height: auto; }
  .story-pin { position: relative; height: auto; min-height: 100vh; }
  .story-step { position: relative; opacity: 1; transform: none; margin-top: 32px; }
}

/* impression : seule la fiche de configuration */
@media print {
  .site-header, .site-footer, .no-print, .cfg-form { display: none !important; }
  body { background: #fff; color: #000; }
  .cfg { display: block; }
  .cfg-preview { position: static; }
  .stage, .summary { border-color: #ccc; break-inside: avoid; background: #fff; color: #000; }
  .summary dd, .summary dt { color: #000; }
  .print-head { display: block !important; }
}
.print-head { display: none; margin-bottom: 16px; }

/* Mentions légales */
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-bottom: 14px; }
.legal h2 { font-size: 1.35rem; margin: 44px 0 12px; scroll-margin-top: 100px; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 8px; }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal .legal-date { margin-top: 48px; opacity: .7; font-size: .9rem; }
.foot-legal { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
