/* ==========================================================================
   Capture Pro CriCri — site vitrine
   Couleurs tirées de l'icône : marine, orange, jaune, faisceau rouge.
   ========================================================================== */

:root {
  --orange: #f7941d;
  --yellow: #ffc21a;
  --red: #e8432f;
  --navy: #0d2552;
  --blue: #2f6fe4;
  --green: #2bb673;

  --radius: 14px;
  --radius-sm: 9px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg: #07142e;
  --bg-2: #0b1c3e;
  --surface: #10254d;
  --surface-2: #163061;
  --line: rgba(160, 190, 255, .14);
  --text: #eaf0fb;
  --muted: #9fb0cf;
  --accent: var(--orange);
  --accent-ink: #1b1204;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
  --glass: rgba(10, 26, 58, .72);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-2: #ece8df;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --line: rgba(13, 37, 82, .12);
  --text: #0d2552;
  --muted: #5a6784;
  --accent: #e27b00;
  --accent-ink: #ffffff;
  --shadow: 0 20px 50px -24px rgba(13, 37, 82, .35);
  --glass: rgba(255, 255, 255, .78);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; width: min(1240px, 100% - 32px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px var(--font-display); white-space: nowrap; }
.brand img { border-radius: 9px; }
.brand b { color: var(--accent); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { text-decoration: none; padding: 8px 11px; border-radius: 8px; font-size: 14.5px; color: var(--muted); transition: color .2s, background .2s; white-space: nowrap; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--surface-2); }
.nav__tools { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.lang button { border: 0; background: none; padding: 4px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
[data-theme="dark"] .icon-btn .sun { display: none; }
[data-theme="light"] .icon-btn .moon { display: none; }
.nav__burger { display: none; }

/* ------------------------------------------------------------------ BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface-2); text-decoration: none; font-weight: 600; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn:active { transform: translateY(0); }
.btn--primary { background: linear-gradient(135deg, var(--yellow), var(--orange)); color: #1b1204; border-color: transparent; box-shadow: 0 10px 30px -10px rgba(247, 148, 29, .7); }
.btn--ghost { background: transparent; }
.btn--danger { background: transparent; border-color: rgba(232, 67, 47, .55); color: #ff7b68; }
[data-theme="light"] .btn--danger { color: #c22e1b; }
.btn--danger:hover { background: rgba(232, 67, 47, .12); border-color: var(--red); }
.btn--sm { padding: 8px 13px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------ HERO */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 30%, rgba(247, 148, 29, .22), transparent 60%),
    radial-gradient(50% 60% at 10% 10%, rgba(47, 111, 228, .25), transparent 60%),
    linear-gradient(var(--bg), var(--bg-2));
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  opacity: .5;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow, .kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
h1 { font: 800 clamp(42px, 6.2vw, 78px)/1.02 var(--font-display); letter-spacing: -.03em; margin: 0 0 22px; }
h1 em, .big em { font-style: normal; background: linear-gradient(100deg, var(--yellow), var(--orange) 55%, var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18.5px; color: var(--muted); max-width: 64ch; margin: 0 0 28px; }
.lead strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__inspired { margin-top: 26px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.hero__inspired::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

.hero__visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.scanner { position: relative; width: min(372px, 80vw); }
.scanner__sheet {
  position: relative; border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transform: rotate(-3deg);
  animation: floaty 7s ease-in-out infinite;
}
.scanner__sheet canvas { width: 100%; height: auto; }
.scanner__beam {
  position: absolute; left: -10%; right: -10%; height: 70px; top: -80px;
  background: linear-gradient(180deg, transparent, rgba(255, 194, 26, .18) 40%, rgba(232, 67, 47, .55) 50%, rgba(255, 194, 26, .18) 60%, transparent);
  mix-blend-mode: screen;
  animation: beam 3.6s cubic-bezier(.55, 0, .45, 1) infinite;
}
[data-theme="light"] .scanner__beam { mix-blend-mode: multiply; background: linear-gradient(180deg, transparent, rgba(247, 148, 29, .15) 40%, rgba(232, 67, 47, .45) 50%, rgba(247, 148, 29, .15) 60%, transparent); }
@keyframes beam { 0% { top: -80px; } 100% { top: 100%; } }
@keyframes floaty { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-2.2deg) translateY(-8px); } }

.chip {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: pop .6s var(--ease) both;
}
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(43, 182, 115, .2); }
.chip--a { left: -18%; top: 12%; animation-delay: .4s; }
.chip--b { right: -16%; top: 30%; animation-delay: .9s; }
.chip--b i { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 194, 26, .2); }
.chip--c { left: -12%; bottom: 22%; animation-delay: 1.4s; }
.chip--c i { background: var(--blue); box-shadow: 0 0 0 4px rgba(47, 111, 228, .25); }
.chip--d { right: -8%; bottom: 6%; animation-delay: 1.9s; }
.chip--d i { background: var(--orange); box-shadow: 0 0 0 4px rgba(247, 148, 29, .25); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }

.stats { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats li { background: var(--bg); padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; }
.stats b { font: 800 40px/1 var(--font-display); color: var(--accent); }
.stats span { font-size: 14px; color: var(--muted); line-height: 1.35; }

/* ------------------------------------------------------------------ SECTIONS */
.section { padding: 110px 0; position: relative; }
.section h2 { font: 800 clamp(30px, 4vw, 48px)/1.08 var(--font-display); letter-spacing: -.02em; margin: 0 0 18px; max-width: 22ch; }
.section h2.big { font-size: clamp(36px, 5.4vw, 66px); max-width: 18ch; }
.h3big { font: 750 26px/1.2 var(--font-display); margin: 0 0 10px; }
.section--principle { background: linear-gradient(var(--bg-2), var(--bg)); }
.section--atelier, .section--security { background: var(--bg-2); }
.section--tokens { background: linear-gradient(var(--bg), var(--bg-2)); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 46px; }
.pillar { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.pillar::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--yellow), var(--orange), var(--red)); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.pillar.is-in::before { transform: scaleX(1); }
.pillar svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 16px; }
.pillar h3 { margin: 0 0 8px; font-size: 18.5px; line-height: 1.3; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.features--4 { grid-template-columns: repeat(4, 1fr); }
.feature { padding: 20px 22px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 9px; vertical-align: 2px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ ATELIER (app mockup) */
.app {
  display: grid; grid-template-columns: 168px 1fr 320px; gap: 0;
  margin-top: 38px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  min-height: 640px;
}
.app__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); }
.app__tools { display: flex; flex-direction: column; gap: 4px; padding: 16px 10px; border-right: 1px solid var(--line); background: var(--surface-2); }
.app__tools .app__label { padding: 0 8px 8px; }
.tool { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; font-size: 14px; color: var(--text); transition: background .15s, border-color .15s; }
.tool svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.tool:hover { background: var(--surface); border-color: var(--line); }
.tool.is-used { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tool:active { transform: scale(.98); }

.app__view { display: flex; flex-direction: column; min-width: 0; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; }
.viewer { position: relative; flex: 1; display: grid; place-items: center; padding: 22px; min-height: 0; }
.viewer canvas { max-height: 560px; width: auto; height: auto; max-width: 100%; box-shadow: 0 10px 40px -10px rgba(0,0,0,.45); background: #fff; }
.viewer__split { position: absolute; inset: 0; pointer-events: none; }
.viewer__handle {
  position: absolute; top: 0; bottom: 0; width: 3px; left: 50%; transform: translateX(-50%);
  background: var(--yellow); cursor: ew-resize; pointer-events: auto; box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.viewer__handle::after {
  content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--yellow); color: #1b1204; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.viewer__tag { position: absolute; top: 12px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.65); color: #fff; }
.viewer__tag--l { left: 12px; }
.viewer__tag--r { right: 12px; }
.app__statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
.app__status { color: var(--muted); flex: 1; min-height: 1.4em; text-align: right; }
.app__status.flash { animation: flash .9s; }
@keyframes flash { 0% { color: var(--accent); } 100% { color: var(--muted); } }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 36px; height: 20px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch b { font-weight: 600; }

.app__panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--surface); min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel__head h3 { margin: 0; font-size: 15px; }
.badge { min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 700; }
.stack { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; overflow: auto; max-height: 330px; }
.stack__empty { color: var(--muted); font-size: 14px; padding: 18px 10px; text-align: center; border: 1px dashed var(--line); border-radius: 9px; }
.mod {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 8px 8px 6px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line);
  animation: slidein .35s var(--ease);
}
.mod.is-selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.mod.is-hidden .mod__text { opacity: .45; text-decoration: line-through; text-decoration-color: var(--muted); }
.mod__text { min-width: 0; cursor: pointer; }
.mod__text b { display: block; font-size: 14px; font-weight: 600; }
.mod__text small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod__btns { display: flex; gap: 2px; }
.mini { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 0; background: none; cursor: pointer; color: var(--muted); }
.mini:hover { background: var(--surface); color: var(--text); }
.mini svg { width: 17px; height: 17px; }
.mini--del:hover { color: var(--red); }
.mod .eye { color: var(--text); }
.mod.is-hidden .eye { color: var(--muted); }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.mod.is-leaving { animation: slideout .3s var(--ease) forwards; }
@keyframes slideout { to { opacity: 0; transform: translateX(-20px); height: 0; padding: 0; margin: -3px 0; } }

.stack__source { display: grid; grid-template-columns: 44px 1fr 20px; gap: 10px; align-items: center; margin: 0 8px 8px; padding: 9px; border-radius: 9px; border: 1px solid var(--line); background: color-mix(in srgb, var(--green) 9%, var(--surface-2)); }
.stack__source canvas { border-radius: 3px; border: 1px solid var(--line); }
.stack__source b { display: block; font-size: 14px; }
.stack__source small { color: var(--green); font-size: 12px; font-weight: 600; }
.stack__source .lock { width: 18px; color: var(--green); }
.stack__source.is-flat { background: color-mix(in srgb, var(--red) 10%, var(--surface-2)); }
.stack__source.is-flat small, .stack__source.is-flat .lock { color: var(--red); }

.editor { margin: 0 8px 8px; padding: 12px; border-radius: 9px; border: 1px solid var(--accent); background: var(--surface-2); animation: slidein .25s var(--ease); }
.editor__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.editor__head b { font-size: 13.5px; }
.editor label { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; margin: 8px 0; color: var(--muted); }
.editor label output { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.editor input[type="range"] { grid-column: 1 / -1; accent-color: var(--accent); width: 100%; }
.editor .check { display: flex; align-items: center; gap: 8px; grid-template-columns: none; }
.editor .check input { accent-color: var(--accent); }
.swatches { display: flex; gap: 8px; margin-top: 6px; }
.swatch { width: 30px; height: 30px; border-radius: 7px; border: 2px solid var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.turns { display: flex; gap: 6px; margin-top: 4px; }
.turns button { flex: 1; padding: 6px 0; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; }
.turns button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.panel__foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 8px 14px; border-top: 1px solid var(--line); }
.panel__foot .btn { flex: 1; }

/* ------------------------------------------------------------------ CORBEILLE */
.trashdemo { display: grid; grid-template-columns: 1fr 360px; gap: 0; margin-top: 38px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.lotpane { padding: 20px; min-width: 0; }
.lotpane__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.lotpane__head h3 { margin: 0; font-size: 17px; }
.lotpane__head small { color: var(--muted); }
.lotpane__docs { display: flex; flex-direction: column; gap: 14px; min-height: 300px; }
.ldoc { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px 12px; background: var(--surface-2); }
.ldoc__name { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.ldoc__name svg { width: 16px; color: var(--accent); }
.ldoc__pages { display: flex; flex-wrap: wrap; gap: 10px; min-height: 104px; }
.ldoc__empty { color: var(--muted); font-size: 13px; font-style: italic; align-self: center; }
.pg { position: relative; width: 78px; border: 0; padding: 0; background: none; cursor: pointer; text-align: center; animation: pgin .45s var(--ease); }
.pg canvas { width: 78px; height: 101px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.25); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .15s; }
.pg:hover canvas { transform: translateY(-2px); }
.pg.is-selected canvas { outline-color: var(--accent); }
.pg small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.pg__new { position: absolute; top: -7px; right: -7px; padding: 1px 7px; border-radius: 99px; background: var(--green); color: #fff; font-size: 10.5px; font-weight: 700; }
.pg.is-leaving { animation: pgout .45s var(--ease) forwards; pointer-events: none; }
.pg.is-back { animation: pgback .7s var(--ease); }
@keyframes pgin { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes pgout { to { opacity: 0; transform: translate(60px, 20px) scale(.6) rotate(8deg); } }
@keyframes pgback { 0% { opacity: 0; transform: translate(60px, 20px) scale(.6) rotate(8deg); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
.pg.is-back canvas { outline-color: var(--green); }
.lotpane__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lotpane__status { min-height: 1.5em; margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.binpane { border-left: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; }
.binpane__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.binpane__head svg { width: 22px; color: var(--accent); }
.binpane__head h3 { margin: 0; font-size: 15.5px; }
.bin { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow: auto; max-height: 420px; min-height: 260px; }
.bin__empty { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 14px; }
.bin__empty svg { width: 46px; height: 46px; margin: 0 auto 10px; opacity: .5; }
.bitem { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); animation: slidein .35s var(--ease); }
.bitem canvas { width: 40px; height: 52px; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.bitem b { display: block; font-size: 13px; }
.bitem small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.reason { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.reason--deleted { background: rgba(232,67,47,.15); color: #ff7b68; }
.reason--blank { background: rgba(160,176,207,.18); color: var(--muted); }
.reason--replaced { background: rgba(47,111,228,.18); color: #7ea8ff; }
.reason--separator { background: rgba(255,194,26,.18); color: #e0a800; }
[data-theme="light"] .reason--deleted { color: #c22e1b; }
[data-theme="light"] .reason--replaced { color: #1d56c4; }
[data-theme="light"] .reason--separator { color: #9a6c00; }
.binpane__foot { display: flex; gap: 8px; padding: 12px 10px 14px; border-top: 1px solid var(--line); }
.binpane__foot .btn { flex: 1; }

/* ------------------------------------------------------------------ FLOW */
.flow { margin-top: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.flow__steps { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.flow__step { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 18px 8px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); transition: color .2s; }
.flow__step i { font-style: normal; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid currentColor; font-size: 13.5px; }
.flow__step[aria-selected="true"] { color: var(--text); }
.flow__step[aria-selected="true"] i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.flow__step:hover { color: var(--text); }
.flow__bar { position: absolute; bottom: -1px; left: 0; height: 3px; width: calc(100% / 6); background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: transform .45s var(--ease); }
.flow__panel { padding: 30px 34px 34px; min-height: 260px; }
.flow__panel h3 { margin: 0 0 14px; font-size: 22px; }
.flow__panel ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 30px; }
.flow__panel li { position: relative; padding-left: 26px; color: var(--muted); }
.flow__panel li strong { color: var(--text); }
.flow__panel li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--accent); }
.flow__panel.is-anim h3, .flow__panel.is-anim li { animation: pgin .45s var(--ease) both; }
.flow__panel.is-anim li:nth-child(2) { animation-delay: .05s; } .flow__panel.is-anim li:nth-child(3) { animation-delay: .1s; } .flow__panel.is-anim li:nth-child(4) { animation-delay: .15s; } .flow__panel.is-anim li:nth-child(5) { animation-delay: .2s; }

/* Séparation */
.sep { margin-top: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 28px; }
.sep__head { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-end; }
.sep__head > div:first-child { max-width: 60ch; }
.sep__head p { color: var(--muted); margin: 0; }
.sep__controls { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.sep__stage { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 24px; }
.feeder { position: relative; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); padding: 14px; min-height: 340px; overflow: hidden; }
.feeder__stack { position: relative; height: 290px; margin-top: 10px; }
.fsheet { position: absolute; left: 50%; width: 120px; transform: translateX(-50%); transition: transform .5s var(--ease), opacity .5s; }
.fsheet canvas { width: 120px; height: 155px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.fsheet.is-out { transform: translate(140%, -10px) rotate(6deg) scale(.6); opacity: 0; }
.feeder__beam { position: absolute; left: 0; right: 0; top: 42px; height: 3px; background: var(--red); box-shadow: 0 0 18px 4px rgba(232,67,47,.6); opacity: 0; }
.feeder.is-running .feeder__beam { opacity: 1; animation: feedbeam .5s ease-in-out infinite alternate; }
@keyframes feedbeam { from { transform: translateY(0); } to { transform: translateY(150px); } }
.tree { border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); padding: 14px 16px; min-height: 340px; max-height: 420px; overflow: auto; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; }
.tree__root { padding-left: 0 !important; margin-top: 10px !important; font-size: 14px; }
.tree li { position: relative; padding: 2px 0; }
.tree .tnode { display: inline-flex; align-items: center; gap: 7px; padding: 2px 6px; border-radius: 6px; animation: pgin .35s var(--ease); }
.tree .tnode svg { width: 16px; height: 16px; color: var(--accent); }
.tree .tnode small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.tree .tnode--doc { font-weight: 700; }
.tree .tnode--hit { background: color-mix(in srgb, var(--yellow) 25%, transparent); }
.tree .tnode--trash { color: var(--muted); font-style: italic; }
.sep__status { margin: 14px 0 0; color: var(--muted); min-height: 1.5em; }

/* ------------------------------------------------------------------ TOKENS */
.tokens { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 38px; }
.tokens__build, .tokens__out { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; min-width: 0; }
.field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.field__row { display: flex; gap: 8px; }
.field input, .field select { padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-family: var(--mono); font-size: 14.5px; min-width: 0; }
.field input { flex: 1; }
.field input:focus, .field select:focus, .pdfdemo__bar input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tokens__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tok { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-family: var(--mono); font-size: 13px; cursor: pointer; transition: border-color .15s, transform .15s; }
.tok:hover { border-color: var(--accent); transform: translateY(-1px); }
.tok i { font-style: normal; color: var(--accent); }
.tokens__out h4 { margin: 0 0 10px; font-size: 14px; }
.tokens__out h4:not(:first-child) { margin-top: 20px; }
.files { list-style: none; margin: 0; padding: 12px 14px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; max-height: 220px; overflow: auto; }
.files li { white-space: nowrap; padding: 2px 0; animation: pgin .3s var(--ease); }
.files li .dir { color: var(--muted); }
.files li .fname { color: var(--yellow); }
[data-theme="light"] .files li .fname { color: #b35f00; }
.files li.more { color: var(--muted); font-style: italic; }
.csv { margin: 0 0 8px; padding: 12px 14px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); font: 12.5px/1.55 var(--mono); overflow: auto; max-height: 170px; color: var(--muted); }
.csv b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------ SORTIES */
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 38px; }
.format { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .25s; }
.format:hover { transform: translateY(-4px); border-color: var(--accent); }
.format__tag { display: inline-block; padding: 4px 10px; border-radius: 7px; font: 700 13px var(--mono); background: linear-gradient(135deg, var(--yellow), var(--orange)); color: #1b1204; margin-bottom: 14px; }
.format h3 { margin: 0 0 8px; font-size: 18px; }
.format p { margin: 0; color: var(--muted); font-size: 14.5px; }

.outgrid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; margin-top: 24px; align-items: start; }
.twoways, .pdfdemo { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 26px; }
.twoways { position: sticky; top: 90px; }
.twoways h3, .pdfdemo h3 { margin: 0 0 16px; font-size: 20px; }
.twoways__item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.twoways__item svg { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--surface-2); color: var(--accent); }
.twoways__item h4 { margin: 0 0 4px; font-size: 16px; }
.twoways__item p { margin: 0; color: var(--muted); font-size: 14.5px; }
.pdfdemo > p { color: var(--muted); margin: -6px 0 16px; font-size: 14.5px; }
.pdfdemo__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; }
.pdfdemo__bar svg { width: 18px; color: var(--muted); flex: none; }
.pdfdemo__bar input { flex: 1; border: 0; background: none; padding: 4px 2px; min-width: 0; }
.pdfdemo__bar input:focus { outline: none; }
.pdfdemo__page { position: relative; width: min(100%, 460px); margin: 0 auto 12px; }
.pdfdemo__page canvas { width: 100%; height: auto; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.pdfdemo__hits { position: absolute; inset: 0; pointer-events: none; }
.hit { position: absolute; background: rgba(255, 194, 26, .5); outline: 2px solid var(--orange); border-radius: 2px; animation: pgin .3s var(--ease); mix-blend-mode: multiply; }

/* ------------------------------------------------------------------ SÉCURITÉ */
.roles { margin-top: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.roles__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.roles__count { margin-left: auto; display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.meter { width: 140px; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .4s var(--ease); }
.roles__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; }
.pgroup { padding: 16px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pgroup h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.priv { display: flex; align-items: flex-start; gap: 9px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.priv input { margin-top: 4px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.priv.is-danger span { color: #ff7b68; font-weight: 600; }
[data-theme="light"] .priv.is-danger span { color: #c22e1b; }
.priv.is-flash span { animation: flash .9s; }

/* ------------------------------------------------------------------ PLUS */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 38px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 17.5px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.tech { display: grid; grid-template-columns: .7fr 1.3fr; gap: 30px; margin-top: 30px; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--navy) 60%, var(--surface)), var(--surface)); }
[data-theme="light"] .tech { background: linear-gradient(135deg, #fff4e2, var(--surface)); }
.tech ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.tech li { padding-left: 22px; position: relative; color: var(--muted); }
.tech li strong { color: var(--text); }
.tech li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* ------------------------------------------------------------------ REMERCIEMENTS */
.section--thanks { padding: 90px 0; }
.thanks { margin: 0 auto; max-width: 820px; text-align: center; padding: 44px 40px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.thanks::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--yellow), var(--orange), var(--red)); }
.thanks__mark { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--orange); fill: color-mix(in srgb, var(--orange) 25%, transparent); }
.thanks h2 { margin: 0 auto 18px; max-width: none; }
.thanks blockquote { margin: 0 auto; font-size: 19px; line-height: 1.65; color: var(--muted); max-width: 62ch; }
.thanks blockquote strong { color: var(--text); }
.thanks figcaption { margin-top: 18px; font-weight: 700; color: var(--accent); }

/* ------------------------------------------------------------------ CONTACT */
.section--contact { background: radial-gradient(60% 80% at 90% 20%, rgba(247,148,29,.16), transparent 60%), var(--bg-2); }
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.contact__own { margin: 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 9px 9px 0; color: var(--muted); font-size: 14.5px; max-width: 60ch; }
.contact__card { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact__who { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.avatar { width: 60px; height: 60px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 21px var(--font-display); color: #1b1204; background: linear-gradient(135deg, var(--yellow), var(--orange)); }
.contact__who b { display: block; font-size: 20px; }
.contact__who small { color: var(--muted); font-size: 14px; }
.contact__list { margin: 18px 0 22px; display: grid; gap: 14px; }
.contact__list div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.contact__list dt { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.contact__list dt svg { width: 20px; color: var(--accent); flex: none; }
.contact__list dd { margin: 0; font-weight: 600; }
.contact__list a { color: var(--accent); text-decoration: none; }
.contact__list a:hover { text-decoration: underline; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ FOOTER */
.footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg-2); }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { border-radius: 14px; }
.footer__brand b { display: block; }
.footer__brand small { color: var(--muted); }
.footer__text p { margin: 0 0 4px; font-size: 14.5px; }

/* ------------------------------------------------------------------ MODAL */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3, 10, 25, .62); backdrop-filter: blur(4px); animation: fade .2s; }
.modal__box { width: min(480px, 100%); padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pgin .3s var(--ease); }
.modal__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(232,67,47,.14); color: var(--red); margin-bottom: 14px; }
.modal__icon svg { width: 26px; height: 26px; }
.modal h3 { margin: 0 0 10px; font-size: 20px; }
.modal p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.modal p strong { color: var(--text); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }

/* ------------------------------------------------------------------ RESPONSIVE */
@media (max-width: 1100px) {
  .nav__links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav__links.is-open { display: flex; }
  .nav__tools { margin-left: auto; }
  .nav__burger { display: grid; }
  .app { grid-template-columns: 1fr; }
  .app__tools { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .app__tools .app__label { width: 100%; padding-bottom: 0; }
  .tool span { display: none; }
  .app__panel { border-left: 0; border-top: 1px solid var(--line); }
  .pillars, .features--4 { grid-template-columns: 1fr 1fr; }
  .formats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { min-height: 440px; }
  .chip--a, .chip--c { left: -4%; } .chip--b, .chip--d { right: -4%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:last-child { grid-column: 1 / -1; }
  .features, .cards { grid-template-columns: 1fr 1fr; }
  .trashdemo, .tokens, .outgrid, .tech { grid-template-columns: 1fr; }
  .binpane { border-left: 0; border-top: 1px solid var(--line); }
  .flow__steps { grid-template-columns: repeat(3, 1fr); }
  .flow__bar { display: none; }
  .flow__panel ul, .tech ul { grid-template-columns: 1fr; }
  .sep__stage { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .contact__list div { grid-template-columns: 1fr; gap: 2px; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .section { padding: 76px 0; }
  .pillars, .features, .features--4, .cards, .formats { grid-template-columns: 1fr; }
  .flow__step span { display: none; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
