/* ============================================================
   L'Atelier ERP — feuille de style dédiée
   Chargée après leviers.css · aucune ressource externe
   ============================================================ */

/* Thèmes de l'application générée (contraste AA sur --paper) */
html[data-theme="foret"] { --app-accent: #1d7a4f; --app-accent-2: #26c877; --app-accent-soft: #e6f4ec; --app-ink: #121812; }
html[data-theme="marine"] { --app-accent: #245fe8; --app-accent-2: #7fa1ff; --app-accent-soft: #e8eefc; --app-ink: #101726; }
html[data-theme="terracotta"] { --app-accent: #b04a26; --app-accent-2: #e07856; --app-accent-soft: #f7e9e3; --app-ink: #22110c; }
html[data-theme="amethyste"] { --app-accent: #6d43c2; --app-accent-2: #a56cff; --app-accent-soft: #efe9fa; --app-ink: #16101f; }

.atelier-page { background: var(--bg); overflow-x: clip; }
.atelier-page :focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
.at-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Chrome récit ---------- */
.at-topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px 0 16px;
  background: rgba(8, 12, 10, .88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.at-topbar-center { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.at-topbar-center span { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--text-muted); white-space: nowrap; }
.at-topbar-center b#atChapterNum { color: var(--app-accent); }
.at-progress { display: block; width: min(30vw, 340px); height: 2px; background: var(--line); overflow: hidden; }
.at-progress b { display: block; height: 100%; width: 0; background: var(--lime); transition: width .25s ease; }
.at-topbar-actions { display: flex; align-items: center; gap: 10px; }
.at-top-cta { padding: 10px 18px; font-size: 13px; }
.chip-sim {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 1px solid rgba(215, 243, 107, .5); border-radius: 999px; color: var(--lime);
  font-size: 10px; font-weight: 800; letter-spacing: .14em; background: rgba(215, 243, 107, .05); cursor: help;
}
.chip-sim i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(215, 243, 107, .5); animation: sim-pulse 2.4s ease-out infinite; }
@keyframes sim-pulse { 0% { box-shadow: 0 0 0 0 rgba(215, 243, 107, .45); } 70% { box-shadow: 0 0 0 8px rgba(215, 243, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(215, 243, 107, 0); } }
.at-icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text); transition: border-color .2s, color .2s;
}
.at-icon-btn:hover { border-color: var(--lime); color: var(--lime); }
.at-icon-btn[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); background: rgba(215, 243, 107, .08); }

.at-rail {
  position: fixed; left: 0; top: 64px; bottom: 0; width: 160px; z-index: 900;
  border-right: 1px solid var(--line); background: rgba(8, 12, 10, .82); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; padding: 18px 0; overflow-y: auto;
}
.at-rail ol { list-style: none; padding: 0 14px; }
.at-rail li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.at-rail button { all: unset; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; width: 100%; color: var(--text-faint); font-size: 12px; }
.at-rail button:hover { background: var(--surface-2); color: var(--text); }
.at-rail b { font: 800 11px var(--sans); letter-spacing: .08em; color: inherit; min-width: 20px; }
.at-rail .at-rail-current button { color: var(--lime); }
.at-rail .at-rail-current b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 8px; }
.at-rail .at-rail-current b { color: var(--app-accent); }
.at-rail .at-rail-done b::after { content: " ✓"; color: var(--lime); font-size: 10px; }
.at-rail .at-rail-locked button { color: #4a554e; cursor: not-allowed; }
.at-rail .at-rail-locked b::after { content: " 🔒"; font-size: 9px; }

.at-mobilebar {
  position: fixed; inset: auto 0 0 0; z-index: 1000; height: 56px; display: none;
  align-items: center; justify-content: space-between; padding: 0 14px;
  background: rgba(8, 12, 10, .94); border-top: 1px solid var(--line); backdrop-filter: blur(12px);
}
.at-mobilebar span { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--text-muted); }
.at-continue { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--lime); background: transparent; color: var(--lime); font-weight: 800; font-size: 13px; }
.at-continue:disabled { opacity: .4; cursor: default; }

/* ---------- Scènes ---------- */
.at-story { padding-left: 0; }
.at-scene {
  position: relative; min-height: 100svh; scroll-snap-align: start; scroll-margin-top: 0;
  display: flex; align-items: center; padding: 104px 0 72px;
}
.at-scene::before {
  content: attr(data-chapter); position: absolute; right: -1vw; top: 50%; transform: translateY(calc(-50% + var(--parallax, 0px)));
  font: 900 clamp(200px, 30vw, 480px)/.8 var(--sans); letter-spacing: -.08em; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .18); pointer-events: none; user-select: none;
}
.at-scene-inner { width: min(1240px, calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 2; }
.at-scene .kicker { display: block; margin-bottom: 22px; }
.kicker { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--lime); text-transform: uppercase; }
.at-scene h2 { max-width: 900px; margin-bottom: 18px; }
.at-scene-12 h2, .at-scene-12 .at-sub, .at-scene-12 .kicker { color: var(--ink); }
.at-sub { max-width: 620px; color: var(--text-muted); font-size: 16.5px; margin-bottom: 30px; }
.at-jump-btn { margin-top: 26px; }
.at-scene-00 { background: radial-gradient(900px 600px at 78% 30%, rgba(38, 200, 119, .12), transparent 60%), #060907; }
.at-scene-00::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.at-ghost { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); font: 900 clamp(120px, 22vw, 340px)/.75 var(--sans); letter-spacing: -.09em; color: transparent; -webkit-text-stroke: 1px rgba(215, 243, 107, .07); pointer-events: none; user-select: none; white-space: nowrap; }
.at-scene-07 { min-height: 0; padding: 0; }

/* Frise ch. 00 */
.at-frise { display: flex; flex-wrap: wrap; gap: 8px; max-width: 860px; }
.at-frise button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); font-size: 12px; transition: border-color .2s, color .2s; }
.at-frise button:hover { border-color: var(--lime); color: var(--lime); }
.at-frise b { font-weight: 800; color: var(--lime); }

/* Scène 01 — vignettes */
.at-vignettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1000px; margin: 26px 0 34px; }
.at-vignette { text-align: left; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); display: flex; flex-direction: column; gap: 14px; transition: border-color .25s, transform .25s, background .25s; }
.at-vignette:hover, .at-vignette.at-revealed { border-color: var(--lime); background: var(--surface-2); transform: translateY(-3px); }
.at-vignette strong { font-size: 15.5px; line-height: 1.4; }
.at-vignette-consequence { font-family: var(--serif); font-style: italic; color: var(--lime); font-size: 15px; }
.at-vignette:not(.at-revealed) .at-vignette-consequence { display: none; }
.at-vignette-art { position: relative; height: 96px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.at-vignette-mail { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.at-vignette-mail i { display: block; height: 10px; border-radius: 3px; background: var(--line-2); }
.at-vignette-mail i:nth-child(1) { width: 72%; background: rgba(215, 243, 107, .22); }
.at-vignette-mail i:nth-child(2) { width: 90%; }
.at-vignette-mail i:nth-child(3) { width: 60%; }
.at-vignette-mail b { position: absolute; right: 12px; top: 10px; font: 800 26px var(--sans); color: var(--lime); }
.at-vignette-sheet { display: flex; flex-direction: column; gap: 6px; padding: 14px; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 100% 28px; }
.at-vignette-sheet i { display: block; height: 20px; width: 46%; border-radius: 3px; background: rgba(38, 200, 119, .25); }
.at-vignette-sheet b { position: absolute; right: 12px; top: 10px; font: 800 11px var(--sans); letter-spacing: .12em; color: var(--green); }
.at-vignette-note i { position: absolute; inset: 0; background: #f3e9b8; transform: rotate(-2deg); border-radius: 4px; }
.at-vignette-note b, .at-vignette-note u { position: absolute; left: 16px; color: #6b5a17; font: 800 13px var(--sans); text-decoration: none; }
.at-vignette-note b { top: 18px; letter-spacing: .1em; }
.at-vignette-note u { top: 46px; font-weight: 600; font-size: 14px; }
.at-pivot { max-width: 900px; margin-top: 8px; }
.at-pivot h3 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 14px; }
.at-pivot > p { max-width: 720px; margin-bottom: 22px; }
.at-mandat { position: relative; padding: 26px 28px; border-radius: var(--radius); background: linear-gradient(150deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); box-shadow: var(--shadow); max-width: 620px; margin-bottom: 20px; }
.at-mandat-kicker { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--lime); margin-bottom: 10px; }
.at-mandat p { color: var(--text); font-size: 15.5px; }
.at-mandat-open { margin-top: 12px; }
.at-mandat-open strong { color: var(--lime); }
.at-handoff { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--text-muted); margin-bottom: 6px; }

/* ---------- Fiche projet ---------- */
.at-fiche { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 230px; }
.at-fiche h3 { font-size: 12px; letter-spacing: .1em; color: var(--text-muted); text-transform: uppercase; }
.at-fiche dl { display: grid; gap: 8px; }
.at-fiche .at-fiche-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.at-fiche dt { color: var(--text-muted); }
.at-fiche dd { color: var(--text); font-weight: 600; text-align: right; }
.at-fiche-row-enter { animation: fiche-in .35s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fiche-in { from { opacity: 0; transform: translateX(10px); } }
.at-fiche-accordion { display: none; margin-bottom: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 14px 18px; }
.at-fiche-accordion summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.at-fiche-sticky { position: sticky; top: 96px; align-self: flex-start; }
.at-fiche-wrap { position: absolute; right: 0; top: 0; z-index: 3; }

/* ---------- Scène 02 — identité ---------- */
.at-id-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 30px; align-items: start; }
.at-id-card { padding: 30px; border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.at-id-card .kicker { color: var(--app-accent); }
.at-field { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 700; color: var(--ink); }
.at-field-wrap { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.at-field input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid rgba(18, 24, 18, .18); background: #fff; color: var(--ink); font: 600 16px var(--sans); }
.at-field input:focus { outline: none; border-color: var(--app-accent); box-shadow: 0 0 0 3px var(--app-accent-soft); }
.at-field i { font-size: 11px; color: var(--muted-dark); font-style: normal; white-space: nowrap; }
.at-field-help { display: block; margin-top: 6px; font-size: 12px; font-weight: 500; color: #8a5a20; }
.at-field-mono input { width: 88px; text-align: center; letter-spacing: .1em; }
.at-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.at-chip { padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(18, 24, 18, .2); background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; transition: border-color .2s, background .2s; }
.at-chip:hover { border-color: var(--app-accent); background: var(--app-accent-soft); }
.at-palettes { border: 0; margin-bottom: 20px; }
.at-palettes legend { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.at-palette-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.at-palette { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid rgba(18, 24, 18, .16); background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; text-align: left; transition: border-color .2s, box-shadow .2s; }
.at-palette[aria-checked="true"] { border-color: var(--app-accent); box-shadow: 0 0 0 2px var(--app-accent-soft); }
.at-palette-dots { display: flex; gap: 5px; }
.at-palette-dots i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(18, 24, 18, .12); }
.at-id-submit:disabled { opacity: .45; cursor: default; }
.at-id-preview { position: relative; }
.at-preview-frame { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid rgba(18, 24, 18, .14); box-shadow: var(--shadow); display: grid; grid-template-columns: 150px 1fr; min-height: 300px; transition: box-shadow .2s, border-color .2s; }
.at-preview-frame.pulse { border-color: var(--app-accent); box-shadow: 0 0 0 3px var(--app-accent-soft), var(--shadow); }
.at-preview-side { background: var(--app-accent); color: #fff; padding: 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.at-preview-mono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(255, 255, 255, .18); font: 800 16px var(--sans); }
.at-preview-side b { font-size: 13px; line-height: 1.25; }
.at-preview-side i { font-size: 11px; opacity: .8; font-style: normal; }
.at-preview-side i:first-of-type { margin-top: 10px; opacity: 1; font-weight: 700; }
.at-preview-main { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.at-preview-main header { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(18, 24, 18, .1); padding-bottom: 12px; }
.at-preview-main header b { font-size: 14px; color: var(--app-ink); }
.at-preview-main header u { margin-left: auto; width: 42px; height: 8px; border-radius: 4px; background: var(--app-accent-soft); text-decoration: none; }
.at-preview-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.at-preview-kpis i { height: 54px; border-radius: 8px; background: var(--app-accent-soft); }
.at-preview-modules { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.at-preview-modules s { height: 8px; border-radius: 4px; background: rgba(18, 24, 18, .08); text-decoration: none; }
.at-preview-caption { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Scène 03 — modules ---------- */
.at-module-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 26px; align-items: start; }
.at-module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.at-module-card { position: relative; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-align: left; display: flex; flex-direction: column; gap: 10px; transition: border-color .25s, background .25s, transform .25s; }
.at-module-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.at-module-card.selected { border-color: var(--lime); background: var(--surface-2); box-shadow: var(--glow); }
.at-module-card.selected::after { content: "✓"; position: absolute; top: 14px; right: 16px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-weight: 800; font-size: 13px; }
.at-module-card.locked { border-color: rgba(215, 243, 107, .35); }
.at-module-card.locked::after { content: "🔒"; font-size: 11px; background: transparent; }
.at-module-card.locked:hover { transform: none; }
.at-module-card h3 { font-size: 19px; margin-bottom: 2px; }
.at-module-card > p { font-size: 13.5px; }
.at-module-badge { position: absolute; top: 14px; right: 46px; font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 4px 9px; border-radius: 999px; background: var(--lime); color: var(--ink); }
.at-module-typical { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.at-module-typical li { font-size: 11px; color: var(--text-muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }
.at-module-miss { font-size: 12px; color: var(--text-faint); font-style: italic; }
.at-scope { position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 14px; }
.at-scope svg { width: 100%; display: block; }
.at-scope-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 800; padding: 8px 10px; border-radius: 8px; }
.at-scope-line { stroke: var(--line-2); stroke-width: 1.5; }
.at-scope-line.on { stroke: var(--lime); stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw .4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.at-scope-node { fill: var(--surface-2); stroke: var(--text-faint); stroke-width: 1; }
.at-scope-node.on { fill: var(--lime); stroke: var(--lime); }
.at-scope-node text { font-size: 8.5px; fill: var(--text-faint); }
.at-scope-node.on text { fill: var(--ink); font-weight: 800; }
.at-coherence { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border-left: 3px solid #e0a63d; background: rgba(224, 166, 61, .08); border-radius: 0 10px 10px 0; font-size: 14px; }
.at-coherence-add { padding: 8px 14px; border-radius: 8px; border: 1px solid #e0a63d; background: transparent; color: #eecb7a; font-weight: 700; font-size: 13px; }
.at-scope-summary { margin-top: 16px; font-size: 14.5px; color: var(--text); max-width: 780px; }

/* ---------- Scène 04 — flux ---------- */
.at-flow-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.at-steps { list-style: none; display: grid; gap: 12px; counter-reset: step; }
.at-step { position: relative; padding: 18px 18px 18px 58px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .25s, opacity .25s, border-color .2s; }
.at-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 18px; top: 18px; font: 800 15px var(--sans); color: var(--app-accent); }
.at-step.dragging { opacity: .45; }
.at-step.drag-over { border-color: var(--lime); box-shadow: 0 -3px 0 var(--lime); }
.at-step.error { border-color: #e0a63d; }
.at-step-handle { position: absolute; left: 42px; top: 18px; cursor: grab; color: var(--text-faint); font-size: 14px; letter-spacing: -1px; background: none; border: 0; padding: 4px; }
.at-step-handle:active { cursor: grabbing; }
.at-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.at-step-name { flex: 1; background: transparent; border: 0; border-bottom: 1px dashed var(--line-2); color: var(--text); font: 700 17px var(--sans); letter-spacing: -.01em; padding: 4px 2px; min-width: 0; }
.at-step-name:focus { outline: none; border-bottom-color: var(--lime); }
.at-step-selects { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.at-step select, .at-step-rule input, .at-fixes select, .at-fixes input { padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 600 13px var(--sans); }
.at-step select:focus, .at-step-rule input:focus { outline: none; border-color: var(--lime); }
.at-step-selects label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; letter-spacing: .08em; color: var(--text-muted); text-transform: uppercase; }
.at-step-rule { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: rgba(215, 243, 107, .04); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.at-step-rule input { width: 110px; }
.at-step-tools { display: flex; gap: 6px; margin-left: auto; }
.at-step-tool { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); font-size: 14px; }
.at-step-tool:hover { border-color: var(--lime); color: var(--lime); }
.at-step-tool:disabled { opacity: .35; cursor: default; }
.at-step-tool:disabled:hover { border-color: var(--line-2); color: var(--text-muted); }
.at-switch { position: relative; width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); transition: background .2s, border-color .2s; flex: none; }
.at-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-faint); transition: transform .2s, background .2s; }
.at-switch[aria-checked="true"] { background: rgba(215, 243, 107, .2); border-color: var(--lime); }
.at-switch[aria-checked="true"] i { transform: translateX(20px); background: var(--lime); }
.at-add-step { margin-top: 14px; width: 100%; padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: transparent; color: var(--text-muted); font-weight: 700; }
.at-add-step:hover { border-color: var(--lime); color: var(--lime); }
.at-flow-errors { list-style: none; margin-top: 12px; display: grid; gap: 6px; }
.at-flow-errors li { font-size: 13px; color: #eecb7a; }
.at-flow-summary { margin-top: 12px; font-size: 13.5px; color: var(--text-muted); }
.at-journey { position: sticky; top: 96px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.at-journey h3 { font-size: 14px; margin-bottom: 16px; }
.at-journey-track { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-height: 240px; }
.at-journey-track ol { list-style: none; display: grid; gap: 8px; position: relative; z-index: 2; }
.at-journey-track ol li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; }
.at-journey-track ol li b { font: 800 10px var(--sans); }
.at-journey-track ol li.on { color: var(--lime); border-color: rgba(215, 243, 107, .4); background: rgba(215, 243, 107, .06); }
.at-journey-track ol li.done { color: var(--text-muted); }
.at-journey-track ol li.done::after { content: "✓"; margin-left: auto; color: var(--lime); }
.at-journey-order { position: absolute; right: 10px; bottom: 10px; z-index: 3; font: 800 11px var(--sans); letter-spacing: .08em; background: var(--paper); color: var(--ink); padding: 6px 10px; border-radius: 6px; transition: top .8s cubic-bezier(.4, 0, .2, 1), left .8s cubic-bezier(.4, 0, .2, 1); }
.at-journey-play { margin-top: 14px; width: 100%; }
.at-journey-stamp { position: absolute; z-index: 4; font: 800 10px var(--sans); letter-spacing: .08em; color: var(--green); border: 1px solid var(--green); padding: 3px 8px; border-radius: 4px; background: rgba(38, 200, 119, .12); }

/* ---------- Scène 05 — données ---------- */
.at-data-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.at-entity-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.at-entity-tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); font-weight: 700; font-size: 13px; }
.at-entity-tab[aria-selected="true"] { background: var(--lime); color: var(--ink); border-color: transparent; }
.at-entity-tab small { margin-left: 6px; opacity: .75; }
.at-fields { display: grid; gap: 8px; }
.at-field-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); animation: row-in .2s ease both; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.at-field-row b { font-size: 14px; flex: 1; }
.at-field-row .at-field-badge { font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-muted); text-transform: uppercase; }
.at-field-row.custom .at-field-badge { border-color: var(--app-accent); color: var(--app-accent-2); }
.at-field-row.locked { opacity: .85; }
.at-field-row.off { opacity: .45; }
.at-field-row .at-lock { color: var(--text-faint); font-size: 12px; }
.at-field-row .at-req { font-size: 10px; color: #e0a63d; font-weight: 700; }
.at-field-tools { display: flex; gap: 6px; }
.at-field-del { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); }
.at-field-del:hover { border-color: #ff6b5e; color: #ff6b5e; }
.at-field-add { margin-top: 16px; padding: 16px; border: 1px dashed var(--line-2); border-radius: 12px; }
.at-field-add-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text-muted); }
.at-field-add-title i { font-style: normal; margin-left: 6px; color: var(--lime); }
.at-field-add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.at-field-add-row input, .at-field-add-row select { flex: 1; min-width: 130px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 600 13px var(--sans); }
.at-field-add-row input:focus, .at-field-add-row select:focus { outline: none; border-color: var(--lime); }
.at-field-limit { margin-top: 8px; font-size: 12.5px; color: #eecb7a; min-height: 16px; }
.at-form-preview { position: sticky; top: 96px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.at-form-preview h3 { font-size: 14px; margin-bottom: 14px; }
.at-form-preview .at-preview-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.at-form-preview .at-preview-field label { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.at-form-preview .at-preview-field i { display: block; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); }
.at-form-preview .at-preview-field i.bool { height: 18px; width: 18px; border-radius: 4px; }
.at-field-count { margin-top: 18px; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Scène 06 — construction ---------- */
.at-scene-06 { background: #050706; }
.at-build-launch { margin-top: 8px; font-size: 17px; padding: 18px 30px; }
.at-build-note { margin-top: 14px; font-size: 13px; color: var(--text-faint); min-height: 18px; }

/* ---------- Scène 08 — architecture ---------- */
.at-arch { max-width: 1060px; }
.at-arch-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.at-arch-tab { padding: 12px 18px; background: transparent; border: 0; color: var(--text-muted); font-weight: 700; font-size: 14px; border-bottom: 2px solid transparent; }
.at-arch-tab[aria-selected="true"] { color: var(--lime); border-bottom-color: var(--lime); }
.at-arch-panel { display: none; }
.at-arch-panel.active { display: block; animation: arch-in .25s ease both; }
@keyframes arch-in { from { opacity: 0; transform: translateY(10px); } }
.at-layers { display: grid; gap: 10px; margin-bottom: 18px; }
.at-layer { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; transition: border-color .2s, background .2s; }
.at-layer b { font: 800 13px var(--sans); color: var(--app-accent); }
.at-layer span { font-weight: 700; font-size: 16px; min-width: 150px; }
.at-layer i { font-style: normal; font-size: 13px; color: var(--text-muted); }
.at-layer:hover, .at-layer.open { border-color: var(--lime); background: var(--surface-2); }
.at-layer.traced { border-color: var(--lime); box-shadow: var(--glow); }
.at-layer-detail { min-height: 64px; padding: 16px 20px; border-radius: 12px; background: rgba(215, 243, 107, .05); border: 1px solid rgba(215, 243, 107, .18); font-size: 14px; margin-bottom: 20px; }
.at-layer-detail h4 { color: var(--lime); margin-bottom: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.at-layer-detail ul { list-style: none; display: grid; gap: 4px; margin-top: 8px; }
.at-layer-detail li { font-size: 13.5px; color: var(--text-muted); }
.at-layer-detail li::before { content: "· "; color: var(--lime); }
.at-layer-detail table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.at-layer-detail th, .at-layer-detail td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.at-layer-detail th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.at-trace { padding: 16px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.at-trace-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.at-trace-controls select { flex: 1; min-width: 200px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; }
.at-trace-path { list-style: none; display: grid; gap: 6px; }
.at-trace-path li { font-size: 13.5px; color: var(--text-faint); padding: 7px 10px; border-radius: 8px; }
.at-trace-path li.on { color: var(--lime); background: rgba(215, 243, 107, .07); }
.at-sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.at-sec-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.at-sec-card h3 { font-size: 16px; margin-bottom: 8px; }
.at-sec-card p { font-size: 13.5px; }
.at-sec-card a { color: var(--lime); font-weight: 700; }
.at-reference { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.at-reference h3 { font-size: 24px; margin: 12px 0 10px; }
.at-reference p { font-size: 15px; max-width: 720px; margin-bottom: 12px; }
.at-reference a { color: var(--lime); font-weight: 700; margin-right: 16px; }

/* ---------- Scène 09 — intégrations ---------- */
.at-scene-09::before { content: none; }
.at-scene-09 { background: radial-gradient(700px 500px at 80% 20%, rgba(38, 200, 119, .1), transparent 60%), var(--bg); }
.at-scene-09::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; background:
  linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0/80px 80px,
  linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0/80px 80px; }
.at-int-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.at-int-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.at-int-card header { display: flex; align-items: center; gap: 12px; }
.at-int-card h3 { font-size: 18px; flex: 1; }
.at-int-card > p { font-size: 13.5px; }
.at-int-badge { font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 4px 8px; border-radius: 999px; background: rgba(224, 166, 61, .15); color: #eecb7a; }
.at-int-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.at-int-table caption { text-align: left; font-size: 10px; letter-spacing: .1em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 6px; }
.at-int-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); color: var(--text-muted); }
.at-int-list { list-style: none; display: grid; gap: 6px; }
.at-int-list li { font-size: 13px; color: var(--text-muted); padding-left: 16px; position: relative; }
.at-int-list li::before { content: "→"; position: absolute; left: 0; color: var(--lime); }
.at-int-note { font-size: 12px; color: #eecb7a; }
.at-int-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.at-int-result { font-size: 12.5px; color: var(--green); min-height: 18px; }
.at-sync-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); pointer-events: none; }
.at-honesty { font-size: 13px; color: var(--text-faint); font-style: italic; margin-bottom: 8px; }

/* ---------- Scène 10 — migration ---------- */
.at-scene-10::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; }
.at-mig { max-width: 1000px; }
.at-pipeline { list-style: none; display: flex; gap: 4px; margin-bottom: 22px; counter-reset: pip; }
.at-pipeline li { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: center; position: relative; font-size: 12px; color: var(--text-faint); }
.at-pipeline li::before { content: ""; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: var(--line); }
.at-pipeline li:first-child::before { content: none; }
.at-pipeline b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-faint); font-weight: 800; position: relative; z-index: 2; }
.at-pipeline li.done b { background: var(--green); border-color: var(--green); color: var(--ink); }
.at-pipeline li.done::before, .at-pipeline li.active::before { background: var(--green); }
.at-pipeline li.active b { border-color: var(--lime); color: var(--lime); box-shadow: var(--glow); }
.at-pipeline li.active span { color: var(--lime); font-weight: 700; }
.at-mig-stage { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); animation: arch-in .25s ease both; }
.at-mig-stage h3 { font-size: 20px; margin-bottom: 4px; }
.at-mig-lead { font-size: 13.5px; margin-bottom: 16px; }
.at-dirty-wrap { overflow-x: auto; margin-bottom: 16px; border-radius: 10px; border: 1px solid var(--line); }
.at-dirty { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; background: var(--surface-2); }
.at-dirty th, .at-dirty td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.at-dirty th { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.at-dirty .dirty-bad { color: #e0a63d; text-decoration: underline wavy rgba(224, 166, 61, .6); }
.at-dirty .dirty-miss { color: #ff6b5e; }
.at-fixes { list-style: none; display: grid; gap: 10px; margin-bottom: 16px; }
.at-fixes li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.at-fixes li.fixed { border-color: rgba(38, 200, 119, .4); }
.at-fixes li.fixed::after { content: "Corrigé ✓"; font-size: 11px; font-weight: 800; color: var(--green); }
.at-fixes .at-fix-before { color: #ff6b5e; text-decoration: line-through; font-size: 12.5px; }
.at-fixes .at-fix-after { color: var(--green); font-size: 12.5px; font-weight: 700; }
.at-fixes input { width: 90px; }
.at-fixes select { max-width: 180px; }
.at-mig-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.at-mig-actions .btn:disabled { opacity: .45; cursor: default; }
.at-maps { display: grid; gap: 10px; margin-bottom: 8px; }
.at-map-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.at-map-row select { flex: 1; min-width: 170px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; }
.at-mig-hint { font-size: 12.5px; color: #eecb7a; margin: 8px 0 12px; min-height: 16px; }
.at-validate { display: grid; gap: 10px; margin-bottom: 8px; }
.at-val-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.at-val-row.bad { border-color: #ff6b5e; }
.at-val-row.good { border-color: rgba(38, 200, 119, .5); }
.at-val-row input { padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); width: 160px; font-weight: 600; }
.at-val-row .at-val-ok { color: var(--green); font-weight: 800; font-size: 12px; }
.at-import-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.at-import-track i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .3s ease; }
.at-import-log { display: grid; gap: 6px; font-size: 13.5px; margin-bottom: 16px; }
.at-import-log p { color: var(--text-muted); }
.at-import-log p.done { color: var(--green); }
.at-parallel { margin-top: 20px; padding: 16px 20px; border-left: 3px solid var(--lime); background: rgba(215, 243, 107, .05); border-radius: 0 10px 10px 0; max-width: 560px; }
.at-parallel strong { font-size: 14px; }
.at-parallel p { font-size: 13px; }

/* ---------- Scène 11 — tests & lancement ---------- */
.at-tests, .at-launch { max-width: 1000px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.at-launch { margin-top: 22px; }
.at-tests h3, .at-launch h3 { font-size: 18px; margin-bottom: 14px; }
.at-test-list { list-style: none; display: grid; gap: 8px; margin-bottom: 16px; }
.at-test-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.at-test-list i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; }
.at-test-list li.pass i { background: var(--green); border-color: var(--green); color: var(--ink); }
.at-test-list li.pass i::after { content: "✓"; }
.at-test-list li.fail { border-color: #ff6b5e; }
.at-test-list li.fail i { background: #ff6b5e; border-color: #ff6b5e; color: #fff; }
.at-test-list li.fail i::after { content: "✕"; }
.at-test-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.at-test-summary { font-size: 13.5px; color: var(--text-muted); }
.at-test-fix { margin-top: 16px; padding: 16px; border: 1px solid #ff6b5e; border-radius: 12px; background: rgba(255, 107, 94, .07); }
.at-test-fix-title { font-weight: 700; color: #ff9b92; margin-bottom: 10px; }
.at-test-fix-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.at-test-fix-row select, .at-test-fix-row input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; }
.at-test-fix-row input { width: 110px; }
.at-test-fix-row label { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.at-deploy { list-style: none; display: flex; gap: 4px; margin-bottom: 18px; }
.at-deploy li { flex: 1; text-align: center; padding: 12px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.at-deploy li:not(:first-child)::before { content: "→"; float: left; color: var(--lime); margin-left: -14px; }
.at-deploy b { display: block; font-size: 13px; }
.at-deploy span { font-size: 11px; color: var(--text-faint); }
.at-checklist { list-style: none; display: grid; gap: 8px; margin-bottom: 18px; }
.at-checklist label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; cursor: pointer; }
.at-checklist input { width: 20px; height: 20px; accent-color: var(--lime); }
.at-launch-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.at-launch-actions p { font-size: 13px; color: var(--text-muted); }
.at-launch-actions .btn:disabled { opacity: .45; cursor: default; }

/* ---------- Scène 12 — carnet ---------- */
.at-scene-12 { background: var(--paper); color: var(--ink); }
.at-scene-12::before { content: none; }
.at-scene-12 .at-sub { color: var(--ink-2); }
.at-carnet { background: #fff; color: var(--ink); border: 1px solid rgba(18, 24, 18, .12); border-radius: 12px; padding: 34px; box-shadow: 0 30px 80px -45px rgba(20, 20, 24, .5); margin-bottom: 30px; }
.at-carnet-head { border-bottom: 2px solid var(--app-accent); padding-bottom: 18px; margin-bottom: 22px; display: flex; align-items: center; gap: 16px; }
.at-carnet-mono { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--app-accent); color: #fff; font: 800 20px var(--sans); flex: none; }
.at-carnet-head h3 { font-size: 26px; color: var(--ink); }
.at-carnet-head p { color: var(--muted-dark); font-size: 13px; }
.at-carnet section { margin-bottom: 20px; }
.at-carnet h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--app-accent); margin-bottom: 8px; }
.at-carnet ul, .at-carnet ol { list-style: none; display: grid; gap: 5px; }
.at-carnet li { font-size: 14px; color: var(--ink-2); padding-left: 18px; position: relative; }
.at-carnet li::before { content: "—"; position: absolute; left: 0; color: var(--app-accent); font-weight: 700; }
.at-carnet .at-carnet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.at-carnet table { width: 100%; border-collapse: collapse; font-size: 13px; }
.at-carnet th, .at-carnet td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(18, 24, 18, .1); }
.at-carnet th { color: var(--muted-dark); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.at-carnet .at-carnet-step b { display: inline-block; min-width: 22px; color: var(--app-accent); font-weight: 800; }
.at-mapping { max-width: 860px; margin-bottom: 30px; }
.at-mapping h3 { font-size: 22px; margin-bottom: 12px; }
.at-mapping table { width: 100%; border-collapse: collapse; font-size: 14px; }
.at-mapping td { padding: 9px 10px; border-bottom: 1px solid rgba(18, 24, 18, .12); color: var(--ink); }
.at-mapping td:first-child { color: var(--ink-2); }
.at-mapping td:nth-child(2) { color: var(--app-accent); font-weight: 700; }
.at-mapping td:last-child { font-weight: 700; }
.at-mapping > p { margin-top: 14px; font-size: 14px; }
.at-carnet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.at-other-links { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 26px; }
.at-other-links a { color: var(--app-accent); font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--app-accent-soft); }
.at-final-declaration { max-width: 760px; padding: 18px 22px; border-left: 3px solid var(--app-accent); background: var(--app-accent-soft); border-radius: 0 12px 12px 0; }
.at-final-declaration p { font-size: 13.5px; color: var(--ink-2); }
.at-page-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 26px 48px; border-top: 1px solid rgba(18, 24, 18, .1); background: var(--paper); color: var(--ink-2); font-size: 13px; }
.at-page-footer a { color: var(--app-accent); font-weight: 700; }

/* ---------- Application générée ---------- */
.at-app { position: fixed; inset: 0; z-index: 2400; background: var(--paper); color: var(--app-ink); display: flex; flex-direction: column; }
.at-app.grow { transform: scale(.6); opacity: .4; transform-origin: 50% 60%; }
.at-app.grown { transform: none; opacity: 1; transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .45s ease; }
body.at-app-mode { overflow: hidden; }
body.at-app-mode .at-topbar, body.at-app-mode .at-rail, body.at-app-mode .at-mobilebar, body.at-app-mode .at-story { display: none; }
.at-app-bar { display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 60px; background: #fff; border-bottom: 1px solid rgba(18, 24, 18, .12); }
.at-app-mono { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--app-accent); color: #fff; font: 800 14px var(--sans); flex: none; }
.at-app-name { font-size: 15px; letter-spacing: -.01em; }
.at-app-nav { display: flex; gap: 2px; margin-left: 8px; }
.at-app-nav button { padding: 9px 14px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 13.5px; }
.at-app-nav button[aria-current="page"] { background: var(--app-accent-soft); color: var(--app-accent); }
.at-app-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.at-app-role { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.at-app-role select { padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(18, 24, 18, .18); background: #fff; color: var(--app-ink); font-weight: 600; }
.at-app-sim { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--app-accent); color: var(--app-accent); background: var(--app-accent-soft); }
.at-app-sim.live { background: var(--app-accent); color: #fff; }
.at-app-quit { padding: 9px 14px; border-radius: 9px; border: 1px solid rgba(18, 24, 18, .2); background: transparent; color: var(--app-ink); font-weight: 700; font-size: 13px; }
.at-app-quit:hover { border-color: var(--app-accent); color: var(--app-accent); }
.at-app-stage { flex: 1; overflow: hidden; position: relative; }
.at-app-views { height: 100%; overflow-y: auto; padding: 26px 26px 90px; background: var(--paper); }
.at-app-view { max-width: 1180px; margin: 0 auto; animation: appview-in .15s ease both; }
@keyframes appview-in { from { opacity: 0; } }
.at-app-tabs { display: none; }
.at-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.at-kpi { padding: 16px; border-radius: 12px; background: #fff; border: 1px solid rgba(18, 24, 18, .1); }
.at-kpi span { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted-dark); text-transform: uppercase; }
.at-kpi b { display: block; font: 800 28px/1.1 var(--sans); letter-spacing: -.02em; color: var(--app-accent); margin-top: 6px; }
.at-kpi b.bump { animation: kpi-bump .3s ease; }
@keyframes kpi-bump { 30% { transform: scale(1.12); color: var(--app-accent-2); } }
.at-app-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.at-card-white { padding: 18px; border-radius: 12px; background: #fff; border: 1px solid rgba(18, 24, 18, .1); }
.at-card-white h3 { font-size: 14px; color: var(--app-ink); margin-bottom: 12px; }
.at-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.at-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.at-chart-col i { width: 100%; max-width: 46px; border-radius: 6px 6px 0 0; background: var(--app-accent); min-height: 4px; transition: height .4s ease; }
.at-chart-col span { font-size: 10.5px; color: var(--muted-dark); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.at-chart-col b { font-size: 11px; font-weight: 800; color: var(--app-accent); }
.at-alert-zone { display: grid; gap: 8px; }
.at-alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: #fff6e8; border: 1px solid #ecd9ad; font-size: 13px; }
.at-alert b { flex: 1; }
.at-alert button { padding: 6px 12px; border-radius: 7px; border: 1px solid var(--app-accent); background: transparent; color: var(--app-accent); font-weight: 700; font-size: 12px; }
.at-feed { list-style: none; display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.at-feed li { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); padding-bottom: 8px; border-bottom: 1px solid rgba(18, 24, 18, .07); }
.at-feed time { font-weight: 700; color: var(--muted-dark); flex: none; }
.at-feed .type-action b::before { content: "→ "; color: var(--app-accent); }
.at-feed .type-alerte b::before { content: "! "; color: #b04a26; }
.at-orders-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.at-orders-toolbar input { flex: 1; min-width: 180px; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(18, 24, 18, .16); background: #fff; color: var(--app-ink); font-weight: 600; }
.at-order-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.at-order-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(18, 24, 18, .16); background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.at-order-chip[aria-pressed="true"] { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.at-app-split { display: grid; grid-template-columns: minmax(340px, .9fr) 1.4fr; gap: 14px; align-items: start; }
.at-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid rgba(18, 24, 18, .1); background: #fff; }
.at-data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.at-data-table th { text-align: left; padding: 10px 12px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark); border-bottom: 1px solid rgba(18, 24, 18, .1); }
.at-data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(18, 24, 18, .07); }
.at-data-table tr.clickable { cursor: pointer; }
.at-data-table tr.clickable:hover { background: var(--app-accent-soft); }
.at-data-table tr.clickable.active { background: var(--app-accent-soft); box-shadow: inset 3px 0 0 var(--app-accent); }
.at-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--app-accent-soft); color: var(--app-accent); }
.at-badge.warn { background: #fff6e8; color: #9a6a1d; }
.at-badge.danger { background: #fdeae8; color: #b04a26; }
.at-badge.ok { background: #e7f5ee; color: #1d7a4f; }
.at-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.at-detail-head h3 { font-size: 22px; color: var(--app-ink); }
.at-detail-head p { color: var(--muted-dark); font-size: 14px; }
.at-detail-head .at-amount { margin-left: auto; font: 800 24px var(--sans); color: var(--app-accent); letter-spacing: -.02em; }
.at-sequencer { list-style: none; display: flex; align-items: flex-start; gap: 0; margin: 16px 0; }
.at-sequencer li { flex: 1; text-align: center; position: relative; padding-top: 26px; font-size: 11.5px; color: var(--muted-dark); }
.at-sequencer li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: rgba(18, 24, 18, .14); }
.at-sequencer li::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(18, 24, 18, .2); background: #fff; }
.at-sequencer li:first-child::before { left: 50%; }
.at-sequencer li:last-child::before { right: 50%; }
.at-sequencer li.done::after { background: var(--app-accent); border-color: var(--app-accent); }
.at-sequencer li.done::before { background: var(--app-accent); }
.at-sequencer li.current { color: var(--app-accent); font-weight: 800; }
.at-sequencer li.current::after { border-color: var(--app-accent); box-shadow: 0 0 0 4px var(--app-accent-soft); }
.at-sequencer li.done::after { content: ""; }
.at-sequencer li.done span::after { content: " ✓"; }
.at-sequencer li span { display: block; max-width: 120px; margin: 0 auto; }
.at-detail-sections { display: grid; gap: 12px; margin-top: 14px; }
.at-custom-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.at-custom-fields div { font-size: 13px; }
.at-custom-fields b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-dark); }
.at-approval-log { list-style: none; display: grid; gap: 6px; }
.at-approval-log li { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--app-accent-soft); }
.at-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.at-btn-primary { padding: 12px 20px; border-radius: 10px; border: 0; background: var(--app-accent); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 8px 20px -10px var(--app-accent); }
.at-btn-primary:hover { background: var(--app-accent-2); }
.at-btn-secondary { padding: 12px 18px; border-radius: 10px; border: 1px solid rgba(18, 24, 18, .2); background: #fff; color: var(--app-ink); font-weight: 700; font-size: 13.5px; }
.at-btn-secondary:hover { border-color: var(--app-accent); color: var(--app-accent); }
.at-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; }
.at-banner.warn { background: #fff6e8; border: 1px solid #ecd9ad; color: #6b4a14; }
.at-banner.good { background: #e7f5ee; border: 1px solid #bfe5d2; color: #14532d; }
.at-banner button { margin-left: auto; }
.at-banner[role="alert"] { animation: banner-in .3s ease; }
@keyframes banner-in { from { opacity: 0; transform: translateY(-6px); } }
.at-empty-module { text-align: center; padding: 60px 20px; border-radius: 14px; background: #fff; border: 1px dashed rgba(18, 24, 18, .2); }
.at-empty-module h3 { font-size: 20px; margin-bottom: 10px; }
.at-empty-module p { color: var(--muted-dark); margin-bottom: 18px; }
.at-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.at-kanban-col { padding: 12px; border-radius: 12px; background: rgba(18, 24, 18, .04); min-height: 160px; }
.at-kanban-col h4 { font-size: 12px; color: var(--muted-dark); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.at-kanban-card { padding: 12px; border-radius: 10px; background: #fff; border: 1px solid rgba(18, 24, 18, .1); margin-bottom: 8px; font-size: 13.5px; }
.at-kanban-card b { display: block; }
.at-kanban-card select { margin-top: 8px; width: 100%; padding: 6px 8px; border-radius: 7px; border: 1px solid rgba(18, 24, 18, .16); background: #fff; font-size: 12.5px; }
.at-prod-list { display: grid; gap: 10px; }
.at-prod { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 11px; background: #fff; border: 1px solid rgba(18, 24, 18, .1); }
.at-prod b { font-size: 14px; min-width: 110px; }
.at-prod-track { flex: 1; min-width: 140px; height: 8px; border-radius: 999px; background: rgba(18, 24, 18, .08); overflow: hidden; }
.at-prod-track i { display: block; height: 100%; background: var(--app-accent); transition: width .3s ease; }
.at-prod span { font-size: 12px; color: var(--muted-dark); }
.at-app-footer-note { margin-top: 26px; text-align: center; font-size: 12px; color: var(--muted-dark); }
.at-app-footer-note button { background: none; border: 0; color: var(--muted-dark); text-decoration: underline; font-size: 12px; }

/* ---------- Dialogues de l'application ---------- */
.at-dialog-layer { position: absolute; inset: 0; z-index: 2600; display: none; place-items: center; background: rgba(18, 24, 18, .4); }
.at-dialog-layer.open { display: grid; }
.at-sheet { width: min(560px, calc(100% - 28px)); max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 26px; color: var(--app-ink); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .5); animation: sheet-in .2s cubic-bezier(.2,.7,.2,1) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } }
.at-sheet h3 { font-size: 20px; margin-bottom: 6px; }
.at-sheet .at-sheet-context { font-size: 13.5px; color: var(--muted-dark); margin-bottom: 16px; }
.at-sheet .at-form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.at-sheet .at-form-row label { font-size: 12px; font-weight: 700; color: var(--muted-dark); }
.at-sheet input, .at-sheet select, .at-sheet textarea { padding: 11px 12px; border-radius: 9px; border: 1px solid rgba(18, 24, 18, .2); background: #fff; color: var(--app-ink); font: 600 14px var(--sans); width: 100%; }
.at-sheet input:focus, .at-sheet select:focus { outline: none; border-color: var(--app-accent); box-shadow: 0 0 0 3px var(--app-accent-soft); }
.at-sheet .at-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: flex-end; }
.at-sheet .at-line-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.at-sheet .at-line-stock { font-size: 11.5px; color: var(--muted-dark); }
.at-sheet .at-form-error { font-size: 12.5px; color: #b04a26; min-height: 16px; }

/* ---------- Overlays récit ---------- */
.at-overlay { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(4, 6, 5, .72); backdrop-filter: blur(8px); }
.at-overlay[hidden] { display: none; }
.at-card { position: relative; width: min(680px, 100%); max-height: 88vh; overflow-y: auto; padding: 38px 40px; border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .9); animation: card-in .3s cubic-bezier(.2,.7,.2,1) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.at-card h1 { font-size: clamp(34px, 5.6vw, 58px); margin: 14px 0 18px; }
.at-card h2 { font-size: clamp(26px, 4vw, 40px); margin: 10px 0 12px; }
.at-card p { font-size: 15px; margin-bottom: 12px; }
.at-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.at-card-hint { font-size: 12px !important; color: var(--text-faint); margin-top: 18px !important; margin-bottom: 0 !important; }
.at-menu-card { width: min(480px, 100%); }
.at-menu-desc { font-size: 13.5px !important; color: var(--text-muted); }
.at-menu-list { list-style: none; display: grid; gap: 4px; }
.at-menu-list a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; color: var(--text-muted); }
.at-menu-list a:hover { background: var(--surface-2); color: var(--text); }
.at-menu-list b { font: 800 11px var(--sans); letter-spacing: .08em; color: var(--lime); min-width: 24px; }
.at-menu-list a.current { background: rgba(215, 243, 107, .08); color: var(--lime); }
.at-menu-list a.locked { color: #4a554e; pointer-events: none; }
.at-menu-list a.locked b { color: #4a554e; }
.at-menu-list a.done::after { content: "✓"; margin-left: auto; color: var(--lime); }
.at-menu-hint { font-size: 12px !important; color: var(--text-faint); margin-top: 14px !important; margin-bottom: 0 !important; }
.at-help-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.at-help-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.at-help-table kbd { padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); font: 700 12px var(--sans); color: var(--lime); }
.at-overlay-full { padding: 0; background: #050706; }
.at-console { width: min(1080px, 100%); height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding: 28px 34px; color: var(--text); }
.at-console-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.at-console-skip { padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); font-weight: 700; font-size: 13px; }
.at-console-skip:hover { border-color: var(--lime); color: var(--lime); }
.at-console-body { flex: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; padding: 26px 0; min-height: 0; }
.at-console-stage { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(600px 400px at 60% 30%, rgba(38, 200, 119, .08), transparent 70%), #070a08; overflow: hidden; }
.at-console-phases { list-style: none; position: absolute; inset: 0; padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.at-console-phases li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-faint); opacity: .35; transition: opacity .3s; }
.at-console-phases li b { font: 800 12px var(--sans); color: var(--app-accent); }
.at-console-phases li.on { color: var(--text); opacity: 1; }
.at-console-phases li.done { color: var(--text-muted); opacity: .8; }
.at-console-phases li.done::after { content: "✓"; margin-left: auto; color: var(--lime); font-weight: 800; }
.at-console-art { position: absolute; inset: 0; display: grid; place-items: center; }
.at-console-art .at-console-bits { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 420px; }
.at-console-bits span { font: 700 12px var(--sans); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-muted); animation: bit-in .5s cubic-bezier(.2,.7,.2,1) both; }
.at-console-bits span.hot { border-color: var(--app-accent); color: var(--app-accent-2); box-shadow: 0 0 18px -6px var(--app-accent); }
@keyframes bit-in { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.at-console-journal { overflow-y: auto; }
.at-console-journal h3 { font-size: 15px; letter-spacing: .1em; color: var(--lime); text-transform: uppercase; margin-bottom: 14px; }
.at-console-journal ul { list-style: none; display: grid; gap: 8px; font-size: 13px; }
.at-console-journal li { color: var(--text-faint); padding-left: 20px; position: relative; }
.at-console-journal li.on { color: var(--text-muted); }
.at-console-journal li.done { color: var(--text); }
.at-console-journal li.done::before { content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 800; }
.at-console-cta { display: grid; place-items: center; padding: 20px 0 10px; }
.at-launch-card { text-align: center; }
.at-launch-card h2 { margin-bottom: 6px; }
.at-launch-card .at-card-actions { justify-content: center; }
.at-launch-glow { animation: launch-glow 2.4s ease-in-out infinite; }
@keyframes launch-glow { 50% { box-shadow: 0 0 0 1px var(--lime), 0 30px 90px -30px rgba(215, 243, 107, .5); } }

/* ---------- Toasts ---------- */
.at-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 40px)); }
.at-toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; animation: toast-in .25s cubic-bezier(.2,.7,.2,1) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.at-toast.ok { border-color: rgba(38, 200, 119, .5); }
.at-toast.ok::before { content: "✓"; color: var(--green); font-weight: 800; }
.at-toast.warn { border-color: rgba(224, 166, 61, .5); }
.at-toast.warn::before { content: "!"; color: #eecb7a; font-weight: 800; }
.at-toast.err { border-color: rgba(255, 107, 94, .5); }
.at-toast.err::before { content: "✕"; color: #ff6b5e; font-weight: 800; }
.at-toast button { margin-left: auto; background: none; border: 0; color: var(--text-faint); font-size: 11px; font-weight: 700; }

/* ---------- Révélations ---------- */
.at-story .reveal { opacity: 1; transform: none; }
.at-story .reveal:not(.in) { opacity: 0; transform: translateY(24px); }
.at-story .reveal.in { opacity: 1; transform: none; transition: opacity .5s cubic-bezier(.2,.7,.2,1), transform .5s cubic-bezier(.2,.7,.2,1); }

/* ---------- Responsive ---------- */
@media (min-width: 1400px) {
  .at-app-stage::before, .at-app-stage::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 5; background: #050706; }
  .at-app-stage::before { left: 0; border-right: 1px solid var(--line); }
  .at-app-stage::after { right: 0; border-left: 1px solid var(--line); }
  .at-app-bar { padding-inline: 60px; }
}
@media (min-width: 1100px) {
  .at-story { padding-left: 160px; }
  .at-topbar { left: 160px; }
  .at-page-footer { padding-left: 208px; }
  .at-scene-inner { width: min(1120px, calc(100% - 96px)); }
  .at-scene-00::before, .at-scene-01::before, .at-scene-02::before, .at-scene-03::before, .at-scene-04::before, .at-scene-05::before, .at-scene-06::before, .at-scene-08::before, .at-scene-10::before, .at-scene-11::before { right: -2vw; }
}
@media (max-width: 1099px) {
  .at-rail { display: none; }
  .at-topbar-center { display: none; }
  .at-top-cta { display: none; }
  .at-fiche-accordion { display: block; }
  .at-fiche-wrap { display: none; }
  .at-module-layout, .at-flow-layout, .at-data-layout { grid-template-columns: 1fr; }
  .at-scope { display: none; }
  .at-journey, .at-form-preview { position: static; }
  .at-id-grid { grid-template-columns: 1fr; }
  .at-int-grid { grid-template-columns: 1fr; }
  .at-sec-grid { grid-template-columns: 1fr; }
  .at-app-split { grid-template-columns: 1fr; }
  .at-app-grid { grid-template-columns: 1fr; }
  .at-app-nav { display: none; }
  .at-app-tabs { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid rgba(18, 24, 18, .12); overflow-x: auto; }
  .at-app-tabs button { flex: none; padding: 12px 14px; border: 0; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 13px; white-space: nowrap; }
  .at-app-tabs button[aria-current="page"] { color: var(--app-accent); box-shadow: inset 0 -3px 0 var(--app-accent); }
  .at-app-role { display: none; }
  .at-app-views { padding-bottom: 110px; }
  .at-console-body { grid-template-columns: 1fr; }
  .at-console-stage { min-height: 220px; }
  .at-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .at-kanban { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .at-topbar { height: 56px; padding: 0 10px; }
  .at-brand .brand-copy small { display: none; }
  .at-mobilebar { display: flex; }
  .at-scene { padding: 84px 0 92px; }
  .at-scene-inner { width: calc(100% - 32px); }
  .at-scene::before { font-size: 46vw; right: -4vw; top: 6%; transform: none; }
  .at-vignettes { grid-template-columns: 1fr; }
  .at-module-grid { grid-template-columns: 1fr; }
  .at-step { padding: 14px 12px 14px 46px; }
  .at-step::before { left: 14px; }
  .at-step-handle { display: none; }
  .at-step-tools { width: 100%; margin-top: 8px; }
  .at-step-tool { width: 44px; height: 44px; }
  .at-palette-grid { grid-template-columns: repeat(2, 1fr); }
  .at-carnet { padding: 22px; }
  .at-carnet .at-carnet-grid { grid-template-columns: 1fr; }
  .at-pipeline { flex-direction: column; gap: 8px; }
  .at-pipeline li { flex-direction: row; gap: 10px; text-align: left; }
  .at-pipeline li::before { content: none; }
  .at-pipeline li span { flex: 1; }
  .at-card { padding: 26px 22px; }
  .at-overlay { padding: 0; }
  .at-overlay-sheet { align-items: end; }
  .at-overlay-sheet .at-menu-card { border-radius: 18px 18px 0 0; max-height: 82vh; }
  .at-toasts { left: 12px; right: 12px; bottom: 68px; max-width: none; }
  .at-console { padding: 18px; }
  .at-console-head { flex-wrap: wrap; gap: 10px; }
  .at-app-bar { padding: 0 12px; gap: 8px; }
  .at-app-name { display: none; }
  .at-app-tools { gap: 6px; }
  .at-app-quit { font-size: 11px; padding: 8px 10px; }
  .at-sheet { width: 100%; border-radius: 18px 18px 0 0; align-self: end; max-height: 90vh; }
  .at-dialog-layer { align-items: end; }
  .at-sequencer { flex-direction: column; gap: 14px; }
  .at-sequencer li { text-align: left; padding: 0 0 0 34px; min-height: 26px; display: flex; align-items: center; }
  .at-sequencer li::before { left: 8px; top: 0; bottom: -14px; right: auto; width: 2px; height: auto; }
  .at-sequencer li:first-child::before { top: 50%; }
  .at-sequencer li:last-child::before { bottom: 50%; }
  .at-sequencer li::after { left: 0; top: 50%; transform: translateY(-50%); }
  .at-sequencer li span { margin: 0; max-width: none; }
  .at-custom-fields { grid-template-columns: 1fr; }
  .at-detail-head .at-amount { margin-left: 0; }
  .at-mapping td { font-size: 12.5px; }
  .at-deploy { flex-direction: column; }
  .at-deploy li:not(:first-child)::before { content: "↓"; float: none; display: block; margin: 0 0 4px; }
  .at-frise button { width: 100%; justify-content: flex-start; }
  .at-frise { display: grid; grid-template-columns: 1fr 1fr; }
  .at-ghost { top: 4%; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .at-story .reveal:not(.in) { opacity: 1; transform: none; }
  .at-story .reveal.in { transition: none; }
  .at-app.grow, .at-app.grown { transition: opacity .15s ease; transform: none; }
  .chip-sim i { animation: none; }
  .at-scope-line.on { animation: none; }
  .at-sync-dot { transition: none; }
}
html.at-motion-off .at-story .reveal:not(.in) { opacity: 1; transform: none; }
html.at-motion-off .at-story .reveal.in { transition: none; }
html.at-motion-off .at-app.grow, html.at-motion-off .at-app.grown { transition: opacity .15s ease; transform: none; }
html.at-motion-off .chip-sim i { animation: none; }
html.at-motion-off .at-scope-line.on { animation: none; }
html.at-motion-off .at-journey-order { transition: none; }
html.at-motion-off .at-kpi b.bump { animation: none; }
html.at-motion-off .at-card, html.at-motion-off .at-sheet, html.at-motion-off .at-toast { animation: none; }
html.at-motion-off .at-console-bits span { animation: none; }
html.at-motion-off .at-launch-glow { animation: none; }

/* ---------- Impression (carnet) ---------- */
@media print {
  body.atelier-page { background: #fff; color: #000; }
  body.atelier-page .at-topbar, body.atelier-page .at-rail, body.atelier-page .at-mobilebar,
  body.atelier-page .at-scene:not(.at-scene-12), body.atelier-page .at-page-footer,
  body.atelier-page .at-overlay, body.atelier-page .at-toasts, body.atelier-page .at-app,
  body.atelier-page .page-curtain { display: none !important; }
  .at-story { padding-left: 0 !important; }
  .at-scene.at-scene-12 { display: block; min-height: 0; padding: 0; }
  .at-scene-12 .at-scene-inner { width: 100%; }
  .at-scene-12 .reveal { opacity: 1 !important; transform: none !important; }
  .at-scene-12 .at-mapping, .at-scene-12 .at-carnet-actions, .at-scene-12 .at-other-links { display: none; }
  .at-carnet { border: 0; box-shadow: none; padding: 0; }
  .at-carnet h3, .at-carnet h4, .at-carnet li, .at-carnet td { color: #000; }
  a { text-decoration: none; }
}

/* ============================================================
   Compléments : visibilité [hidden], fiche projet, vues poussées
   ============================================================ */
.atelier-page [hidden] { display: none !important; }
.at-app[hidden] { display: none; }
.at-hidden { display: none; }
.at-empty { color: var(--muted-dark); font-size: 13px; }

/* Rideau d'entrée de la page */
.atelier-page .page-curtain { transform: translateY(0); transition: transform .6s cubic-bezier(.76, 0, .24, 1) .05s; }
.atelier-page.at-curtain-done .page-curtain { transform: translateY(-102%); }
.atelier-page.at-curtain-off .page-curtain { display: none; }
@media (prefers-reduced-motion: reduce) { .atelier-page .page-curtain { transition: none; } }
html.at-motion-off .page-curtain { transition: none; }

/* Fiche projet : panneau droit collant (desktop) */
.at-fiche-panel { position: fixed; top: 110px; right: 22px; width: 248px; z-index: 940; display: none; }
.at-fiche-panel.on { display: block; }
body.at-fiche-open .at-scene-inner { padding-right: 292px; }
@media (min-width: 1200px) {
  .at-fiche-accordion { display: none !important; }
  .at-fiche-panel.on { display: block; }
}
@media (max-width: 1199px) {
  .at-fiche-accordion { display: block; }
  .at-fiche-wrap { display: none; }
  body.at-fiche-open .at-scene-inner { padding-right: 0; }
  .at-fiche-panel { display: none; }
}

/* Application : liste → détail en vue poussée (tablette/mobile) */
.at-app-back { display: none; margin-bottom: 10px; padding: 9px 14px; border-radius: 9px; border: 1px solid rgba(18, 24, 18, .2); background: #fff; color: var(--app-accent); font-weight: 700; font-size: 13px; }
.at-app-back:hover { border-color: var(--app-accent); }
@media (max-width: 1099px) {
  .at-app-split .at-detail-col { display: none; }
  .at-app-split.at-pushed .at-list-col { display: none; }
  .at-app-split.at-pushed .at-detail-col { display: block; }
  .at-app-split.at-pushed .at-app-back { display: inline-flex; align-items: center; gap: 6px; }
}

/* Scène 10 : collage abstrait (CSS pur) */
.at-scene-10::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.5) 50%, transparent 50.2%) 0 0/90px 90px,
    radial-gradient(circle, rgba(255,255,255,.35) 1px, transparent 1.5px) 0 0/26px 26px;
}
.at-scene-10 .at-dirty tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }

/* Journal console : lignes cochées */
.at-console-journal li.on::before { content: "…"; position: absolute; left: 0; color: var(--lime); }

/* Pastilles des palettes (sans styles en ligne — CSP style-src 'self') */
.at-palette[data-theme-choice="foret"] .at-palette-dots i:nth-child(1) { background: #1d7a4f; }
.at-palette[data-theme-choice="foret"] .at-palette-dots i:nth-child(2) { background: #26c877; }
.at-palette[data-theme-choice="foret"] .at-palette-dots i:nth-child(3) { background: #e6f4ec; }
.at-palette[data-theme-choice="marine"] .at-palette-dots i:nth-child(1) { background: #245fe8; }
.at-palette[data-theme-choice="marine"] .at-palette-dots i:nth-child(2) { background: #7fa1ff; }
.at-palette[data-theme-choice="marine"] .at-palette-dots i:nth-child(3) { background: #e8eefc; }
.at-palette[data-theme-choice="terracotta"] .at-palette-dots i:nth-child(1) { background: #b04a26; }
.at-palette[data-theme-choice="terracotta"] .at-palette-dots i:nth-child(2) { background: #e07856; }
.at-palette[data-theme-choice="terracotta"] .at-palette-dots i:nth-child(3) { background: #f7e9e3; }
.at-palette[data-theme-choice="amethyste"] .at-palette-dots i:nth-child(1) { background: #6d43c2; }
.at-palette[data-theme-choice="amethyste"] .at-palette-dots i:nth-child(2) { background: #a56cff; }
.at-palette[data-theme-choice="amethyste"] .at-palette-dots i:nth-child(3) { background: #efe9fa; }

/* Contrôles générés par JS (aucun style en ligne — CSP) */
.at-receive-qty { width: 64px; padding: 6px 8px; border-radius: 7px; border: 1px solid rgba(18, 24, 18, .16); background: #fff; color: var(--app-ink); font: 600 13px var(--sans); }
.at-edit-inline { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 600 13px var(--sans); }
.at-edit-inline:focus { outline: none; border-color: var(--lime); }
.at-stack { margin-top: 14px; }
.at-section-title { margin: 14px 0 8px; font-size: 13px; color: var(--muted-dark); text-transform: uppercase; letter-spacing: .06em; }
