/* SPACE_EMPIRE_V4_CREATION — création du pilote (origine, rôle, vaisseau) */
#flightCreation {
  --fc-cyan: #5fd4ff;
  --fc-line: rgba(95, 212, 255, .22);
  --fc-line-soft: rgba(95, 212, 255, .1);
  --fc-text: #d9ecfb;
  --fc-dim: #7f9bb8;
  --fc-green: #7dffb3;
  --fc-red: #ff6f7d;
  --fc-gold: #f2c572;
  --fc-amber: #ffb347;
  --fc-font: var(--se-font, ui-sans-serif, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  --fc-mono: var(--se-mono, ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace);
  --fc-cut: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --fc-cut-lg: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  --fc-pad: 28px;
  --accent: #5fd4ff;
  --accent-rgb: 95, 212, 255;
  position: fixed; inset: 0; z-index: 60;
  overflow: hidden;
  background: #01030a;
  color: var(--fc-text);
  font-family: var(--fc-font);
  font-size: 14px; line-height: 1.4;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#flightCreation *, #flightCreation *::before, #flightCreation *::after { box-sizing: border-box; }
#flightCreation h1, #flightCreation h2, #flightCreation h3, #flightCreation p, #flightCreation ul, #flightCreation ol, #flightCreation dl, #flightCreation dd { margin: 0; padding: 0; }
#flightCreation ul, #flightCreation ol { list-style: none; }
#flightCreation [hidden] { display: none !important; }
#flightCreation button { font: inherit; color: inherit; margin: 0; border-radius: 0; letter-spacing: normal; transition: background .18s, border-color .18s, box-shadow .18s, color .18s, transform .12s, opacity .18s; }
#flightCreation button:hover { box-shadow: none; }
#flightCreation :focus { outline: none; }
#flightCreation :focus-visible { outline: 2px solid rgba(var(--accent-rgb), .9); outline-offset: 2px; }
#flightCreation kbd { font-family: var(--fc-mono); font-size: 10px; padding: 1px 5px; border: 1px solid var(--fc-line); border-bottom-width: 2px; border-radius: 4px; color: var(--fc-text); background: rgba(95, 212, 255, .08); }

.fc-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fc-vignette { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(0, 0, 0, .55) 100%),
  repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px); }

.fc-shell { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0;
  padding: var(--safe-t, env(safe-area-inset-top, 0px)) var(--safe-r, env(safe-area-inset-right, 0px)) 0 var(--safe-l, env(safe-area-inset-left, 0px));
  transition: opacity .35s, transform .6s, filter .5s; }

/* ---- en-tête ---------------------------------------------------------- */
.fc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px var(--fc-pad) 14px; flex-shrink: 0; transition: opacity .3s, transform .4s; }
.fc-brand { min-width: 0; animation: fc-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.fc-kicker { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: .28em; color: var(--fc-cyan); }
.fc-rec { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-red); box-shadow: 0 0 10px var(--fc-red); animation: fc-blink 1.4s steps(2) infinite; }
.fc-title { margin-top: 4px !important; font-size: clamp(22px, 2.4vw, 32px); font-weight: 300; letter-spacing: .12em; text-transform: uppercase; color: #fff; text-shadow: 0 0 28px rgba(var(--accent-rgb), .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; }
.fc-sub { font-size: 13px; color: var(--fc-dim); }
.fc-sub b { color: var(--fc-text); font-weight: 600; }
.fc-veteran { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 4px 10px 4px 8px; font-size: 12px; color: var(--fc-dim); background: linear-gradient(90deg, rgba(242, 197, 114, .14), rgba(242, 197, 114, .02)); border-left: 2px solid var(--fc-gold); }
.fc-veteran b { color: var(--fc-gold); font-weight: 700; }
.fc-veteran-ico { color: var(--fc-gold); }

.fc-steps { display: flex; align-items: center; flex-shrink: 0; counter-reset: fcstep; animation: fc-rise .7s .08s cubic-bezier(.2, .8, .2, 1) both; }
.fc-step { display: flex; align-items: center; }
.fc-step + .fc-step::before { content: ""; width: 34px; height: 1px; margin: 0 4px; background: linear-gradient(90deg, var(--fc-line), rgba(95, 212, 255, .06)); }
.fc-step.is-done + .fc-step::before, .fc-step.is-active + .fc-step.is-active::before { background: linear-gradient(90deg, rgba(var(--accent-rgb), .9), rgba(var(--accent-rgb), .3)); }
#flightCreation .fc-stepbtn { display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 6px; background: transparent; border: 1px solid transparent; cursor: pointer; color: var(--fc-dim); clip-path: var(--fc-cut); }
#flightCreation .fc-stepbtn:disabled { cursor: default; opacity: .55; }
#flightCreation .fc-stepbtn:not(:disabled):hover { color: #fff; background: rgba(95, 212, 255, .08); }
.fc-step-n { display: grid; place-items: center; width: 28px; height: 28px; font-family: var(--fc-mono); font-size: 12px; font-weight: 700; border: 1px solid var(--fc-line); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(95, 212, 255, .05); }
.fc-step-l { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.fc-step.is-active .fc-stepbtn { color: #fff; }
.fc-step.is-active .fc-step-n { background: rgba(var(--accent-rgb), .9); color: #03101c; border-color: transparent; box-shadow: 0 0 18px rgba(var(--accent-rgb), .6); }
.fc-step.is-done .fc-step-n { background: rgba(var(--accent-rgb), .18); color: rgb(var(--accent-rgb)); }
.fc-step.is-done .fc-stepbtn { color: var(--fc-text); }

/* ---- corps ------------------------------------------------------------ */
.fc-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, .82fr) minmax(0, 1.5fr); gap: 22px; padding: 0 var(--fc-pad) 14px; }
#flightCreation[data-step="1"] .fc-body { grid-template-columns: minmax(0, 1fr); }
#flightCreation[data-step="1"] .fc-stage { display: none; }
#flightCreation[data-step="2"] .fc-body { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* scène */
.fc-stage { position: relative; min-height: 0; overflow: hidden; clip-path: var(--fc-cut-lg); border: 1px solid var(--fc-line);
  background: radial-gradient(ellipse at 50% 42%, rgba(var(--accent-rgb), .12), transparent 62%), linear-gradient(180deg, rgba(8, 20, 38, .72), rgba(2, 6, 14, .82));
  box-shadow: inset 0 0 60px rgba(var(--accent-rgb), .06); animation: fc-fade .8s .1s both; transition: background .6s; }
.fc-stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fc-corner { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(var(--accent-rgb), .7); pointer-events: none; transition: border-color .5s; }
.fc-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.fc-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.fc-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.fc-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.fc-stage-top { position: absolute; top: 14px; left: 36px; right: 36px; display: flex; justify-content: space-between; font-family: var(--fc-mono); font-size: 10px; letter-spacing: .16em; color: rgba(var(--accent-rgb), .75); pointer-events: none; }
.fc-stage-live { display: inline-flex; align-items: center; gap: 6px; }
.fc-stage-live i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--accent-rgb)); box-shadow: 0 0 8px rgb(var(--accent-rgb)); animation: fc-blink 1.1s steps(2) infinite; }
.fc-stage-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 18px; text-align: center; pointer-events: none; background: linear-gradient(0deg, rgba(1, 4, 10, .9), rgba(1, 4, 10, .55) 60%, transparent); }
.fc-stage-kicker { display: block; font-size: 10px; font-weight: 700; letter-spacing: .26em; color: rgb(var(--accent-rgb)); min-height: 14px; }
.fc-stage-title { display: block; margin-top: 2px; font-size: clamp(18px, 1.9vw, 26px); font-weight: 300; letter-spacing: .1em; text-transform: uppercase; color: #fff; text-shadow: 0 0 20px rgba(var(--accent-rgb), .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-stage-hull { display: block; font-size: 11px; color: var(--fc-dim); letter-spacing: .08em; margin-top: 2px; }
.fc-stage-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fc-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; font-family: var(--fc-mono); font-size: 12px; background: rgba(4, 12, 24, .7); border: 1px solid var(--fc-line-soft); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.fc-chip small { font-size: 9px; letter-spacing: .12em; color: var(--fc-dim); }
.fc-chip b { color: #fff; font-weight: 600; }
.fc-chip em { font-style: normal; font-size: 10px; }
.fc-chip.up { border-color: rgba(125, 255, 179, .35); } .fc-chip.up em { color: var(--fc-green); }
.fc-chip.down { border-color: rgba(255, 111, 125, .35); } .fc-chip.down em { color: var(--fc-red); }

/* pages */
.fc-pages { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 6px 8px 2px; scrollbar-width: thin; scrollbar-color: rgba(95, 212, 255, .3) transparent; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.fc-pages::-webkit-scrollbar { width: 6px; } .fc-pages::-webkit-scrollbar-thumb { background: rgba(95, 212, 255, .25); }
.fc-page.is-active { animation: fc-page-in .45s cubic-bezier(.2, .8, .2, 1) both; }
#flightCreation.dir-back .fc-page.is-active { animation-name: fc-page-back; }
.fc-page-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.fc-page-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #fff; }
.fc-page-head h2::before { content: ""; display: inline-block; width: 16px; height: 2px; margin: 0 10px 4px 0; background: rgb(var(--accent-rgb)); box-shadow: 0 0 8px rgb(var(--accent-rgb)); vertical-align: middle; }
.fc-page-head p { font-size: 12px; color: var(--fc-dim); }
.fc-mini-title { display: block; font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fc-dim); }

/* ---- cartes ----------------------------------------------------------- */
.fc-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 13px 12px; cursor: pointer; text-align: left;
  background: linear-gradient(165deg, rgba(var(--c-rgb), .085), rgba(6, 14, 26, .78) 42%, rgba(3, 8, 16, .86));
  border: 1px solid rgba(var(--c-rgb), .2); clip-path: var(--fc-cut);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .2s, background .25s, opacity .25s, transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.fc-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, rgb(var(--c-rgb)), rgba(var(--c-rgb), 0)); opacity: .35; transition: opacity .25s; }
.fc-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 20% 0%, rgba(var(--c-rgb), .22), transparent 55%); opacity: 0; transition: opacity .3s; }
.fc-card:hover { border-color: rgba(var(--c-rgb), .5); }
.has-sel > .fc-card:not(.is-sel) { opacity: .74; }
.has-sel > .fc-card:not(.is-sel):hover { opacity: 1; }
.fc-card.is-sel { border-color: rgb(var(--c-rgb)); background: linear-gradient(165deg, rgba(var(--c-rgb), .2), rgba(8, 18, 32, .86) 48%, rgba(3, 8, 16, .9)); box-shadow: inset 0 0 0 1px rgba(var(--c-rgb), .35), inset 0 0 38px rgba(var(--c-rgb), .12); transform: translateY(-2px); }
.fc-card.is-sel::before { opacity: 1; height: 3px; }
.fc-card.is-sel::after { opacity: 1; }
.fc-card:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85), inset 0 0 38px rgba(var(--c-rgb), .14); }
.fc-card-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.fc-thumb-wrap { position: relative; flex-shrink: 0; width: 54px; height: 54px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: radial-gradient(circle, rgba(var(--c-rgb), .16), rgba(2, 6, 14, .9) 70%); }
.fc-thumb-wrap::after { content: ""; position: absolute; inset: 0; clip-path: inherit; box-shadow: inset 0 0 0 1px rgba(var(--c-rgb), .5); }
.fc-thumb { width: 100%; height: 100%; display: block; }
.fc-card-name { min-width: 0; flex: 1; }
.fc-card-name small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgb(var(--c-rgb)); }
.fc-card-name b { display: block; font-size: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; line-height: 1.15; }
.fc-card-name > span { display: block; font-size: 11px; color: var(--fc-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-check { align-self: flex-start; display: grid; place-items: center; width: 22px; height: 22px; font-size: 12px; font-weight: 800; color: #03101c; background: rgb(var(--c-rgb)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.fc-card.is-sel .fc-check { opacity: 1; transform: none; }
.fc-lore { font-size: 12.5px; line-height: 1.4; color: #b5cadc; }
.fc-traits { display: grid; gap: 3px; }
.fc-traits li { display: flex; gap: 7px; font-size: 12px; line-height: 1.3; }
.fc-traits li i { flex-shrink: 0; width: 14px; height: 14px; margin-top: 1px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }
.fc-traits .pro { color: #c8f5dc; } .fc-traits .pro i { color: #03140b; background: var(--fc-green); }
.fc-traits .con { color: #ffc9ce; } .fc-traits .con i { color: #1c0306; background: var(--fc-red); }
.fc-ability { margin-top: auto; padding: 7px 10px; background: rgba(var(--c-rgb), .07); border-left: 2px solid rgba(var(--c-rgb), .8); }
.fc-ability-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fc-ability b { display: block; margin-top: 1px; font-size: 13px; color: #fff; font-weight: 600; }
.fc-ability p { font-size: 11.5px; color: #a9c1d6; margin-top: 1px; }
.fc-cd { display: inline-flex; align-items: center; gap: 5px; font-family: var(--fc-mono); font-size: 10px; color: rgb(var(--c-rgb)); white-space: nowrap; }
.fc-cd i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; }

/* origines */
.fc-origins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fc-dots { display: none; }

/* rôles */
.fc-roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fc-role .fc-thumb-wrap { width: 64px; height: 64px; }
.fc-role-ico { font-size: 11px; }
.fc-stats { display: grid; gap: 4px; padding: 8px 0 2px; border-top: 1px solid var(--fc-line-soft); }
.fc-stat { display: grid; grid-template-columns: 58px minmax(0, 1fr) 36px; align-items: center; gap: 8px; }
.fc-stat span { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fc-dim); }
.fc-bar { height: 6px; background: rgba(255, 255, 255, .06); clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 0 100%); overflow: hidden; }
.fc-bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(var(--c-rgb), .45), rgb(var(--c-rgb))); box-shadow: 0 0 8px rgba(var(--c-rgb), .6); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.fc-stat b { font-family: var(--fc-mono); font-size: 11px; font-weight: 500; text-align: right; color: #fff; }
.fc-stat.up b { color: var(--fc-green); } .fc-stat.down b { color: var(--fc-red); }
.fc-slots { display: flex; gap: 6px; }
.fc-slot { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 5px 7px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.fc-slot small { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--fc-dim); }
.fc-pips { display: flex; gap: 3px; }
.fc-pips i { width: 12px; height: 5px; background: rgba(255, 255, 255, .1); clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%); }
.fc-slot.w .fc-pips i.on { background: #ff6f7d; box-shadow: 0 0 6px #ff6f7d; }
.fc-slot.m .fc-pips i.on { background: #ffb347; box-shadow: 0 0 6px #ffb347; }
.fc-slot.u .fc-pips i.on { background: #5fd4ff; box-shadow: 0 0 6px #5fd4ff; }
.fc-slot.none { opacity: .5; }
.fc-perks ul { display: grid; gap: 3px; margin-top: 4px; }
.fc-perks li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #c9dcec; }
.fc-perks em { flex-shrink: 0; min-width: 44px; font-style: normal; font-family: var(--fc-mono); font-size: 10px; padding: 1px 5px; text-align: center; color: var(--fc-gold); border: 1px solid rgba(242, 197, 114, .35); }
.fc-hull-desc { font-size: 11.5px; line-height: 1.4; color: var(--fc-dim); padding-top: 8px; border-top: 1px dashed var(--fc-line-soft); }
.fc-hull-desc b { color: var(--fc-text); font-weight: 600; }

.fc-locked { margin-top: 14px; padding: 10px 12px; border: 1px dashed rgba(255, 255, 255, .12); background: rgba(3, 8, 16, .55); }
.fc-locked-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--fc-dim); }
.fc-locked-title b { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fc-text); }
.fc-locked-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.fc-locked-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 6px, transparent 6px 12px); border: 1px solid rgba(var(--c-rgb), .16); clip-path: var(--fc-cut); min-width: 0; }
.fc-locked-item::after { content: "🔒"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .6; }
.fc-locked-ico { font-size: 20px; filter: grayscale(1) brightness(.9); opacity: .6; }
.fc-locked-item div { min-width: 0; padding-right: 18px; }
.fc-locked-item b { display: block; font-size: 12px; color: rgba(var(--c-rgb), .8); }
.fc-locked-item small { display: block; font-size: 10.5px; color: var(--fc-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- étape vaisseau --------------------------------------------------- */
.fc-field { margin-bottom: 16px; }
.fc-label { display: flex; align-items: baseline; gap: 6px; margin-bottom: 7px; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fc-text); }
.fc-label small { font-size: 10px; letter-spacing: .04em; text-transform: none; font-weight: 400; color: var(--fc-dim); }
.fc-input-wrap { position: relative; display: flex; align-items: stretch; }
#flightCreation .fc-name { flex: 1; min-width: 0; width: auto; height: 50px; margin: 0; padding: 0 64px 0 16px; font-family: var(--fc-font); font-size: 20px; font-weight: 300; letter-spacing: .08em; color: #fff; background: linear-gradient(90deg, rgba(var(--accent-rgb), .08), rgba(3, 8, 16, .8)); border: 1px solid var(--fc-line); border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px)); user-select: text; -webkit-user-select: text; box-shadow: none; transition: border-color .2s, background .2s; }
#flightCreation .fc-name:focus { border-color: rgb(var(--accent-rgb)); background: linear-gradient(90deg, rgba(var(--accent-rgb), .16), rgba(3, 8, 16, .85)); box-shadow: none; outline: none; }
#flightCreation .fc-name.bad { border-color: var(--fc-red); }
.fc-count { position: absolute; right: 62px; top: 50%; transform: translateY(-50%); font-family: var(--fc-mono); font-size: 10px; color: var(--fc-dim); pointer-events: none; }
.fc-count.bad { color: var(--fc-red); }
#flightCreation .fc-dice { width: 50px; flex-shrink: 0; padding: 0; margin-left: 6px; font-size: 24px; line-height: 1; color: var(--fc-text); background: rgba(95, 212, 255, .08); border: 1px solid var(--fc-line); clip-path: var(--fc-cut); cursor: pointer; }
#flightCreation .fc-dice:hover { background: rgba(95, 212, 255, .2); color: #fff; }
#flightCreation .fc-dice:active { transform: rotate(-20deg) scale(.94); }
.fc-hint { display: block; margin-top: 5px; font-size: 11px; color: var(--fc-dim); }

.fc-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 6px; }
#flightCreation .fc-swatch { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 8px; text-align: left; background: rgba(4, 10, 20, .7); border: 1px solid rgba(255, 255, 255, .08); cursor: pointer; clip-path: var(--fc-cut); }
#flightCreation .fc-swatch:hover { border-color: rgba(var(--accent-rgb), .5); background: rgba(95, 212, 255, .08); }
#flightCreation .fc-swatch.is-sel { border-color: rgb(var(--accent-rgb)); background: rgba(var(--accent-rgb), .14); box-shadow: inset 0 0 18px rgba(var(--accent-rgb), .15); }
.fc-sw-chip { flex-shrink: 0; width: 30px; height: 30px; background: linear-gradient(135deg, var(--a) 0 46%, var(--b) 46% 80%, var(--k) 80%); clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%); }
.fc-swatch span { min-width: 0; }
.fc-swatch b { display: block; font-size: 11.5px; font-weight: 600; color: var(--fc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-swatch small { display: block; font-size: 9.5px; letter-spacing: .08em; color: rgb(var(--accent-rgb)); }
.fc-swatch[data-paint="origin"] { border-style: dashed; }

.fc-lights { display: flex; flex-wrap: wrap; gap: 10px; }
#flightCreation .fc-light { position: relative; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #fff 0 12%, var(--l) 42%, rgba(0, 0, 0, .5) 100%); border: 2px solid rgba(255, 255, 255, .08); box-shadow: 0 0 10px -2px var(--l); cursor: pointer; }
#flightCreation .fc-light:hover { transform: scale(1.08); box-shadow: 0 0 16px var(--l); }
#flightCreation .fc-light.is-sel { border-color: #fff; box-shadow: 0 0 0 3px rgba(1, 3, 10, .9), 0 0 0 4px var(--l), 0 0 20px var(--l); }

.fc-recap { position: relative; padding: 12px 14px; background: linear-gradient(160deg, rgba(var(--accent-rgb), .08), rgba(3, 8, 16, .85) 55%); border: 1px solid var(--fc-line); clip-path: var(--fc-cut); }
.fc-rc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fc-rc-id { font-family: var(--fc-mono); font-size: 10px; color: var(--fc-dim); }
.fc-recap dl { display: grid; gap: 0; }
.fc-rc-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, .04); font-size: 12.5px; }
.fc-rc-row dt { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fc-dim); padding-top: 2px; }
.fc-rc-row dd { color: var(--fc-text); min-width: 0; overflow-wrap: anywhere; }
.fc-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--c); box-shadow: 0 0 8px var(--c); transform: rotate(45deg); }
.fc-credits { font-family: var(--fc-mono); font-size: 15px; color: var(--fc-green); }
.fc-error { min-height: 0; margin-top: 10px !important; font-size: 13px; color: #ffd0d4; }
.fc-error.show { padding: 9px 12px; background: rgba(255, 70, 90, .14); border-left: 3px solid var(--fc-red); animation: fc-shake .38s; }
.fc-error.show::before { content: "⚠ "; color: var(--fc-red); }

/* ---- pied ------------------------------------------------------------- */
.fc-foot { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--fc-pad) calc(12px + var(--safe-b, env(safe-area-inset-bottom, 0px))); border-top: 1px solid var(--fc-line); background: linear-gradient(0deg, rgba(2, 6, 14, .92), rgba(2, 6, 14, .6)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: opacity .3s; }
.fc-keys { font-size: 11px; color: rgba(160, 190, 215, .6); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#flightCreation .fc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .16); clip-path: var(--fc-cut); cursor: pointer; white-space: nowrap; }
#flightCreation .fc-btn:disabled { cursor: not-allowed; opacity: .45; }
#flightCreation .fc-btn.ghost:not(:disabled):hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .3); }
#flightCreation .fc-btn.is-hidden { visibility: hidden; }
#flightCreation .fc-btn.primary { min-width: 220px; background: linear-gradient(180deg, rgba(var(--accent-rgb), .5), rgba(var(--accent-rgb), .18)); border-color: rgb(var(--accent-rgb)); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
#flightCreation .fc-btn.primary:not(:disabled):hover { background: linear-gradient(180deg, rgba(var(--accent-rgb), .72), rgba(var(--accent-rgb), .3)); box-shadow: 0 0 26px rgba(var(--accent-rgb), .45); }
#flightCreation .fc-btn.primary:not(:disabled):active { transform: translateY(1px); }
#flightCreation .fc-btn.primary.launch { min-width: 260px; background: linear-gradient(180deg, rgba(255, 196, 92, .75), rgba(214, 110, 20, .45)); border-color: #ffd27a; color: #fff; }
#flightCreation .fc-btn.primary.launch:not(:disabled) { animation: fc-pulse 1.8s ease-in-out infinite; }
#flightCreation .fc-btn.primary.launch:not(:disabled):hover { background: linear-gradient(180deg, rgba(255, 210, 120, .9), rgba(230, 130, 30, .6)); box-shadow: 0 0 30px rgba(255, 190, 90, .55); }
#flightCreation .fc-btn.primary.launch[aria-busy="true"], #flightCreation.is-launching .fc-btn.primary.launch { opacity: 1; cursor: progress; }
.fc-next-lbl { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.fc-next-lbl small { font-size: 9px; letter-spacing: .2em; opacity: .75; font-weight: 700; }
.fc-arrow { font-size: 17px; line-height: 1; }
.fc-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: fc-spin .8s linear infinite; }

/* ---- lancement -------------------------------------------------------- */
.fc-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, #fff 0, rgba(var(--accent-rgb), .9) 22%, rgba(var(--accent-rgb), .25) 55%, rgba(1, 3, 10, 0) 80%); }
#flightCreation.is-launching .fc-flash { animation: fc-flash .9s ease-in forwards; }
#flightCreation.is-launching .fc-head, #flightCreation.is-launching .fc-pages, #flightCreation.is-launching .fc-foot { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s; }
#flightCreation.is-launching .fc-stage { border-color: transparent; background: transparent; box-shadow: none; clip-path: none; overflow: visible; }
#flightCreation.is-launching .fc-stage-cap, #flightCreation.is-launching .fc-stage-top, #flightCreation.is-launching .fc-corner { opacity: 0; transition: opacity .25s; }
#flightCreation.is-launching .fc-shell { transform: scale(1.04); }
#flightCreationAfterglow { position: fixed; inset: 0; z-index: 61; pointer-events: none; background: radial-gradient(circle at 50% 45%, #fff 0, var(--accent, #5fd4ff) 30%, rgba(1, 3, 10, .2) 80%); animation: fc-afterglow .5s ease-out forwards; }

@keyframes fc-rise { from { opacity: 0; transform: translateY(-10px); } }
@keyframes fc-fade { from { opacity: 0; } }
@keyframes fc-page-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes fc-page-back { from { opacity: 0; transform: translateX(-24px); } }
@keyframes fc-blink { 50% { opacity: .3; } }
@keyframes fc-spin { to { transform: rotate(360deg); } }
@keyframes fc-pulse { 50% { box-shadow: 0 0 28px rgba(255, 190, 90, .5); } }
@keyframes fc-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes fc-flash { 0%, 45% { opacity: 0; } 85% { opacity: .95; } 100% { opacity: 1; } }
@keyframes fc-afterglow { from { opacity: 1; } to { opacity: 0; } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1320px) {
  #flightCreation .fc-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  #flightCreation { --fc-pad: 20px; }
  #flightCreation .fc-origins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #flightCreation .fc-body { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.3fr); }
  #flightCreation[data-step="2"] .fc-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
  #flightCreation .fc-keys { display: none; }
}
@media (max-width: 900px) and (min-width: 761px) and (orientation: landscape) {
  #flightCreation .fc-origins { grid-template-columns: minmax(0, 1fr); }
  #flightCreation .fc-step-l { display: none; }
}

/* téléphones et petites tablettes en portrait */
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  #flightCreation { --fc-pad: 16px; font-size: 13px; }
  #flightCreation .fc-head { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px var(--fc-pad) 10px; }
  #flightCreation .fc-kicker { font-size: 8.5px; letter-spacing: .18em; }
  #flightCreation .fc-title { font-size: 19px; letter-spacing: .07em; margin-top: 2px !important; }
  #flightCreation .fc-meta { margin-top: 4px; gap: 4px 10px; }
  #flightCreation .fc-sub { font-size: 12px; }
  #flightCreation .fc-sub-tail { display: none; }
  #flightCreation .fc-veteran { font-size: 11px; padding: 2px 8px 2px 6px; }
  #flightCreation .fc-veteran-sub { display: none; }
  #flightCreation .fc-steps { justify-content: space-between; }
  #flightCreation .fc-step { flex: 1; }
  #flightCreation .fc-step:first-child { flex: 0 0 auto; }
  #flightCreation .fc-step + .fc-step::before { flex: 1; width: auto; min-width: 10px; }
  #flightCreation .fc-stepbtn { padding: 4px 6px 4px 2px; gap: 6px; }
  #flightCreation .fc-step-n { width: 24px; height: 24px; font-size: 11px; }
  #flightCreation .fc-step-l { font-size: 10px; letter-spacing: .12em; }

  #flightCreation .fc-body, #flightCreation[data-step="2"] .fc-body { display: flex; flex-direction: column; gap: 12px; padding: 0 0 12px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #flightCreation .fc-stage { flex: 0 0 auto; display: flex; flex-direction: column; margin: 0 var(--fc-pad); }
  #flightCreation .fc-stage-canvas { position: relative; inset: auto; flex: 0 0 auto; height: clamp(150px, 23vh, 210px); }
  #flightCreation[data-step="2"] .fc-stage-canvas { height: clamp(170px, 26vh, 240px); }
  #flightCreation .fc-stage-top { left: 30px; right: 30px; top: 10px; font-size: 9px; }
  #flightCreation .fc-stage-cap { position: relative; padding: 0 12px 14px; margin-top: -6px; background: none; }
  #flightCreation .fc-stage-kicker { font-size: 9px; }
  #flightCreation .fc-stage-title { font-size: 16px; }
  #flightCreation .fc-stage-hull { font-size: 10.5px; }
  #flightCreation .fc-stage-stats { gap: 4px; margin-top: 6px; }
  #flightCreation .fc-chip { padding: 3px 7px; font-size: 11px; }
  #flightCreation .fc-pages { overflow: visible; padding: 0 var(--fc-pad); flex: 0 0 auto; }
  #flightCreation .fc-page-head { margin-bottom: 10px; }
  #flightCreation .fc-page-head p { font-size: 11.5px; }

  /* carrousel des origines */
  #flightCreation .fc-page[data-page="0"] { margin: 0 calc(var(--fc-pad) * -1); }
  #flightCreation .fc-page[data-page="0"] .fc-page-head { padding: 0 var(--fc-pad); }
  #flightCreation .fc-origins { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 4px var(--fc-pad) 8px; scroll-padding: 0 var(--fc-pad); scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
  #flightCreation .fc-origins::-webkit-scrollbar { display: none; }
  #flightCreation .fc-origin { flex: 0 0 min(84%, 460px); scroll-snap-align: center; transform: none; }
  #flightCreation .fc-origin.is-sel { transform: none; }
  #flightCreation .fc-origins.has-sel > .fc-card:not(.is-sel) { opacity: .6; }
  #flightCreation .fc-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
  #flightCreation .fc-dots i { width: 6px; height: 6px; background: rgba(255, 255, 255, .18); transform: rotate(45deg); transition: background .2s, width .2s; }
  #flightCreation .fc-dots i.on { background: rgb(var(--accent-rgb)); box-shadow: 0 0 8px rgb(var(--accent-rgb)); }

  /* rôles empilés */
  #flightCreation .fc-roles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #flightCreation .fc-role .fc-thumb-wrap { width: 56px; height: 56px; }
  #flightCreation .fc-role.is-sel { transform: none; }
  #flightCreation .fc-locked-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }

  #flightCreation .fc-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #flightCreation .fc-lights { display: grid; grid-template-columns: repeat(5, 40px); justify-content: space-between; gap: 10px 0; }
  #flightCreation .fc-light { width: 40px; height: 40px; }
  #flightCreation .fc-name { font-size: 18px; }
  #flightCreation .fc-rc-row { grid-template-columns: 82px minmax(0, 1fr); }

  #flightCreation .fc-foot { padding: 10px var(--fc-pad) calc(10px + var(--safe-b, env(safe-area-inset-bottom, 0px))); gap: 10px; }
  #flightCreation .fc-btn { min-height: 50px; padding: 0 16px; font-size: 12px; letter-spacing: .08em; }
  #flightCreation .fc-btn.ghost { flex: 0 0 auto; }
  #flightCreation .fc-btn.ghost span:not(.fc-arrow) { display: none; }
  #flightCreation .fc-btn.ghost.is-hidden { display: none; }
  #flightCreation .fc-btn.primary, #flightCreation .fc-btn.primary.launch { flex: 1; min-width: 0; }
}
/* tablettes en portrait : grilles plutôt que carrousel */
@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  #flightCreation .fc-page[data-page="0"] { margin: 0; }
  #flightCreation .fc-page[data-page="0"] .fc-page-head { padding: 0; }
  #flightCreation .fc-origins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; overflow: visible; padding: 4px 0 8px; scroll-snap-type: none; }
  #flightCreation .fc-origin { flex: none; }
  #flightCreation .fc-dots { display: none; }
  #flightCreation .fc-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #flightCreation .fc-locked-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #flightCreation .fc-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #flightCreation .fc-lights { grid-template-columns: repeat(10, 40px); }
  #flightCreation .fc-stage-canvas { height: clamp(200px, 24vh, 300px); }
  #flightCreation .fc-btn.primary, #flightCreation .fc-btn.primary.launch { flex: 0 1 360px; margin-left: auto; }
  #flightCreation .fc-btn.ghost span:not(.fc-arrow) { display: inline; }
}
@media (max-width: 380px) {
  #flightCreation .fc-step-l { font-size: 9px; letter-spacing: .06em; }
  #flightCreation .fc-origin { flex-basis: 88%; }
  #flightCreation .fc-lights { grid-template-columns: repeat(5, 36px); }
  #flightCreation .fc-light { width: 36px; height: 36px; }
  #flightCreation .fc-swatch b { font-size: 11px; }
}

/* écrans bas (paysage mobile) */
@media (max-height: 560px) and (min-width: 761px) {
  #flightCreation .fc-head { align-items: center; padding-top: 6px; padding-bottom: 6px; }
  #flightCreation .fc-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 14px; }
  #flightCreation .fc-kicker, #flightCreation .fc-sub, #flightCreation .fc-veteran-sub { display: none; }
  #flightCreation .fc-title { font-size: 17px; margin-top: 0 !important; }
  #flightCreation .fc-meta { margin-top: 0; }
  #flightCreation .fc-veteran { font-size: 11px; padding: 2px 8px 2px 6px; }
  #flightCreation .fc-step-n { width: 24px; height: 24px; }
  #flightCreation .fc-body { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 16px; padding-bottom: 8px; }
  #flightCreation .fc-page-head p { display: none; }
  #flightCreation .fc-page-head { margin-bottom: 8px; }
  #flightCreation .fc-foot { padding-top: 6px; padding-bottom: calc(6px + var(--safe-b, env(safe-area-inset-bottom, 0px))); }
  #flightCreation .fc-btn { min-height: 40px; }
  #flightCreation .fc-stage-stats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #flightCreation *, #flightCreation *::before, #flightCreation *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #flightCreation.is-launching .fc-flash { animation: fc-flash .9s ease-in forwards !important; }
}

/* 4.4 — rappel du départ Pilote → Empire */
.fc-journey { margin-top: 10px; padding: 9px 11px; border-left: 2px solid rgb(var(--accent-rgb)); background: rgba(var(--accent-rgb), .055); }
.fc-journey small { display:block; font-size:9px; font-weight:800; letter-spacing:.16em; color:rgb(var(--accent-rgb)); }
.fc-journey b { display:block; margin-top:3px; font-size:12px; color:#fff; }
.fc-journey p { margin-top:3px; font-size:11px; line-height:1.4; color:var(--fc-dim); }
