/* SPACE_EMPIRE_V43_ATELIER — Atelier des concepteurs */
.at { position: fixed; inset: 0; z-index: 850; display: flex; flex-direction: column; background: radial-gradient(1200px 700px at 70% -10%, #102338 0%, #04080f 60%); color: #e3f1fb; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.at[hidden] { display: none; }
.at-head { display: flex; align-items: center; gap: 16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 18px 10px; border-bottom: 1px solid rgba(127,232,255,.16); background: rgba(3,9,17,.7); }
.at-brand { display: flex; align-items: center; gap: 10px; }
.at-brand > span { font-size: 26px; color: #5fd4ff; text-shadow: 0 0 16px rgba(95,212,255,.6); }
.at-brand small { display: block; font-size: 10px; letter-spacing: .2em; color: #7fa7bf; }
.at-brand b { font-size: 18px; font-weight: 500; letter-spacing: .06em; }
.at-who { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.at-x { width: 40px; height: 40px; border: 1px solid rgba(127,232,255,.3); background: rgba(4,14,26,.7); color: #fff; font-size: 17px; cursor: pointer; }
.at-role { padding: 2px 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid; }
.at-role.admin { color: #ffcf6e; border-color: rgba(255,207,110,.5); }
.at-role.designer { color: #7fe8ff; border-color: rgba(127,232,255,.5); }
.at-role.player { color: #9fb1bf; border-color: rgba(159,177,191,.4); }
.at-chip { padding: 3px 8px; font-size: 11px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); cursor: default; }
.at-chip[data-at] { cursor: pointer; }
.at-chip.ok { color: #7dffb3; border-color: rgba(125,255,179,.4); } .at-chip.warn { color: #ffcf6e; border-color: rgba(255,207,110,.4); } .at-chip.bad { color: #ff7a7a; border-color: rgba(255,122,122,.4); } .at-chip.muted { color: #8aa3b5; }
.at-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.at-side { border-right: 1px solid rgba(127,232,255,.12); display: flex; flex-direction: column; min-height: 0; background: rgba(2,7,13,.55); }
.at-new { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; }
.at-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px 8px; }
.at-tabs button, .at-filters button { background: transparent; border: 1px solid transparent; color: #8fb0c4; padding: 5px 8px; font-size: 12px; cursor: pointer; }
.at-tabs button.on, .at-filters button.on { color: #fff; border-color: rgba(127,232,255,.4); background: rgba(95,212,255,.1); }
.at-filters { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px 8px; border-bottom: 1px solid rgba(127,232,255,.1); }
.at-filters em { font-style: normal; margin-left: 4px; opacity: .6; }
.at-list { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.at-list li { position: relative; display: grid; grid-template-columns: 72px 1fr auto; gap: 8px; align-items: center; padding: 6px; margin-bottom: 4px; border: 1px solid rgba(255,255,255,.05); cursor: pointer; }
.at-list li:hover { border-color: rgba(127,232,255,.3); }
.at-list li.on { border-color: #5fd4ff; background: rgba(95,212,255,.08); }
.at-list li.empty { display: block; color: #7f98a8; font-size: 13px; cursor: default; }
.at-list b { display: block; font-size: 13px; font-weight: 600; } .at-list small { color: #7f98a8; font-size: 11px; }
.at-thumb { width: 72px; height: 48px; background: #050b14; }
.at-dot { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: #ff5f6e; color: #fff; font-size: 11px; font-style: normal; display: grid; place-items: center; }
.at-st { display: inline-block; padding: 2px 7px; margin-left: 6px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; vertical-align: middle; border: 1px solid rgba(255,255,255,.2); color: #b9cbd8; }
.at-st.draft { color: #b9cbd8; } .at-st.review { color: #ffcf6e; border-color: rgba(255,207,110,.5); } .at-st.ok { color: #7dffb3; border-color: rgba(125,255,179,.5); } .at-st.bad { color: #ff7a7a; border-color: rgba(255,122,122,.5); } .at-st.live { color: #0b1a10; background: #7dffb3; border-color: #7dffb3; } .at-st.muted { color: #8aa3b5; }
.at-main { min-height: 0; overflow: auto; }
.at-empty, .at-page { padding: 28px; max-width: 980px; }
.at-empty b { font-size: 22px; font-weight: 400; }
.at-titlebar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; background: rgba(4,10,18,.92); border-bottom: 1px solid rgba(127,232,255,.12); backdrop-filter: blur(6px); }
.at-titlebar small { font-size: 10px; letter-spacing: .16em; color: #7fa7bf; }
.at-titlebar h2 { margin: 2px 0 0; font-size: 22px; font-weight: 500; }
.at-comment { margin: 6px 0 0; font-size: 13px; color: #cfe7f5; } .at-comment.bad { color: #ffb0b0; }
.at-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.at-btn { padding: 8px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #e8f6ff; background: rgba(95,212,255,.12); border: 1px solid rgba(127,232,255,.4); cursor: pointer; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.at-btn:hover:not(:disabled) { background: rgba(95,212,255,.28); }
.at-btn:disabled { opacity: .4; cursor: default; }
.at-btn.good { background: rgba(125,255,179,.16); border-color: rgba(125,255,179,.55); }
.at-btn.bad { background: rgba(255,95,110,.14); border-color: rgba(255,95,110,.55); }
.at-btn.live { background: linear-gradient(90deg, #1f8f5a, #2bb3a0); border-color: #7dffb3; }
.at-btn.ghost { background: transparent; }
.at-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; padding: 16px 18px 40px; align-items: start; }
.at-grid.locked .at-form { opacity: .65; pointer-events: none; }
.at-form fieldset { margin: 0 0 12px; padding: 10px 12px 12px; border: 1px solid rgba(127,232,255,.14); background: rgba(3,10,19,.55); }
.at-form legend { padding: 0 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #7fe8ff; }
.at-form details summary { cursor: pointer; margin-top: 8px; font-size: 12px; color: #9fc0d3; }
.at-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 12px; }
.at-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #a9c3d3; }
.at-f.wide { grid-column: 1 / -1; }
.at-f input[type=text], .at-f input[type=number], .at-f select, .at-page input, .at-page select, .at-dialog input, .at-dialog select, .at-dialog textarea { background: #07121f; color: #eaf6ff; border: 1px solid rgba(127,232,255,.22); padding: 6px 8px; font-size: 13px; font-family: inherit; }
.at-f.num { display: grid; grid-template-columns: 1fr 86px; grid-template-rows: auto auto; column-gap: 8px; }
.at-f.num span { grid-column: 1 / -1; }
.at-f.num input[type=range] { accent-color: #5fd4ff; }
.at-f.color input { width: 100%; height: 32px; padding: 0; border: 1px solid rgba(127,232,255,.22); background: none; }
.at-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #d7e9f4; }
.at-checks label { display: flex; align-items: center; gap: 4px; }
.at-mats, .at-mods { display: flex; flex-direction: column; gap: 4px; }
.at-mat { display: flex; gap: 6px; align-items: center; }
.at-mat small { color: #7f98a8; font-size: 10px; min-width: 70px; }
.at-mini { background: transparent; border: 1px solid rgba(255,255,255,.18); color: #cfe3f0; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.at-mini.add { align-self: flex-start; border-style: dashed; }
.at-preview { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 10px; }
.at-preview canvas { width: 100%; aspect-ratio: 4 / 3; border: 1px solid rgba(127,232,255,.18); background: #04090f; }
.at-previewbar { font-size: 11px; color: #7fa7bf; margin-top: -6px; }
.at-report { padding: 10px; border: 1px solid rgba(127,232,255,.14); background: rgba(3,10,19,.6); }
.at-meter { position: relative; margin-bottom: 8px; }
.at-meter > div { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.at-meter > i { display: block; height: 8px; background: linear-gradient(90deg, #2fb67d, #7dffb3); transition: width .15s; }
.at-meter.warn > i { background: linear-gradient(90deg, #d69b2d, #ffcf6e); }
.at-meter.over > i { background: linear-gradient(90deg, #c23b47, #ff7a7a); }
.at-meter > em { position: absolute; bottom: 0; width: 2px; height: 12px; background: #fff; }
.at-verdict { font-size: 13px; font-weight: 700; } .at-verdict.ok { color: #7dffb3; } .at-verdict.bad { color: #ff8a8a; }
.at-issues { margin: 6px 0 0; padding-left: 18px; font-size: 12px; max-height: 190px; overflow: auto; }
.at-issues .bad { color: #ffb0b0; } .at-issues .warn { color: #ffdc9a; }
.at-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 10px; border: 1px solid rgba(127,232,255,.14); background: rgba(3,10,19,.6); font-size: 12px; }
.at-stats small { grid-column: 1 / -1; color: #7fa7bf; margin-bottom: 4px; }
.at-stats div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,.06); padding: 2px 0; }
.at-stats span { color: #8fb0c4; }
.at-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 18px; }
.at-table th, .at-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
.at-table th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7fa7bf; }
.at-table tr.bad td { color: #ffb0b0; }
.at-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.at-row.end { justify-content: flex-end; margin-top: 12px; }
.at-sec { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px; margin: 12px 0; border: 1px solid; }
.at-sec.ok { border-color: rgba(125,255,179,.4); } .at-sec.warn { border-color: rgba(255,207,110,.4); } .at-sec.bad { border-color: rgba(255,122,122,.5); }
.at-secret { display: block; margin: 8px 0; padding: 10px; font-size: 18px; letter-spacing: .12em; background: #07121f; border: 1px dashed rgba(127,232,255,.4); user-select: all; }
.at-note { font-size: 12px; color: #8fb0c4; word-break: break-all; }
.at-steps li { margin-bottom: 6px; }
.at-modal { position: fixed; inset: 0; z-index: 870; display: grid; place-items: center; background: rgba(0,0,0,.6); }
.at-modal[hidden] { display: none; }
.at-dialog { width: min(520px, calc(100vw - 32px)); padding: 18px; background: #06111d; border: 1px solid rgba(127,232,255,.35); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.at-dialog h3 { margin: 0 0 8px; font-weight: 500; }
.at-dialog label { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 12px; color: #a9c3d3; }
.at-toast { position: fixed; left: 50%; bottom: 24px; z-index: 880; transform: translate(-50%, 30px); opacity: 0; padding: 10px 16px; background: #0b1b2b; border: 1px solid rgba(127,232,255,.45); font-size: 13px; transition: .2s; pointer-events: none; }
.at-toast.show { opacity: 1; transform: translate(-50%, 0); }
.at-toast.good { border-color: #7dffb3; } .at-toast.bad { border-color: #ff7a7a; } .at-toast.warn { border-color: #ffcf6e; }
.at-bench { position: fixed; inset: 0; z-index: 890; background: #02060c; }
.at-bench canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.at-bench header { position: absolute; top: 10px; left: 14px; right: 14px; display: flex; gap: 14px; align-items: center; color: #dff3ff; text-shadow: 0 2px 8px #000; pointer-events: none; }
.at-bench header span { font-size: 12px; color: #9fc0d3; }
.at-bench header .at-x { margin-left: auto; pointer-events: auto; }
.at-bench-hud { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.at-bench-hud div { min-width: 130px; padding: 8px 10px; background: rgba(3,10,19,.8); border-left: 2px solid #5fd4ff; font-size: 12px; }
.at-bench-hud span { display: block; color: #8fb0c4; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.at-bench-hud b { font-size: 18px; } .at-bench-hud small { display: block; color: #7f98a8; }
.at-bench-hud i { display: block; height: 3px; margin-top: 4px; background: #5fd4ff; }
@media (max-width: 900px) {
  .at-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .at-side { max-height: 36vh; border-right: 0; border-bottom: 1px solid rgba(127,232,255,.12); }
  .at-grid { grid-template-columns: 1fr; }
  .at-preview { position: static; order: -1; }
  .at-who .at-chip.muted { display: none; }
}

.at-page .at-row input, .at-page .at-row select { max-width: 280px; }
