:root {
  --bg: #0b1120; --panel: #111a2e; --panel-2: #16213a; --line: #24304a; --line-2: #334166;
  --text: #e5e9f2; --muted: #93a0b8; --faint: #64708a;
  --primary: #6366f1; --primary-2: #818cf8; --green: #10b981; --amber: #f59e0b; --red: #f43f5e;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-2); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Boutons et champs */
.btn { font: inherit; font-size: .875rem; font-weight: 600; border: 1px solid transparent; border-radius: 12px; padding: .6rem 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none; transition: background .15s, transform .05s; color: var(--text); background: var(--panel-2); border-color: var(--line-2); }
.btn:hover:not(:disabled) { background: #1d2a48; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 24px -10px rgba(99,102,241,.7); }
.btn.primary:hover:not(:disabled) { background: #5558e8; }
.btn.green { background: var(--green); border-color: var(--green); color: #04261b; }
.btn.green:hover:not(:disabled) { background: #0ea371; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.big { padding: .9rem 1.4rem; font-size: 1rem; }
.btn.block { width: 100%; }
.icon-btn { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .25rem .4rem; border-radius: 8px; }
.icon-btn:hover { color: var(--red); background: rgba(244,63,94,.1); }
label.field { display: grid; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
input[type=text], input[type=number], input[type=search], textarea, select {
  width: 100%; font: inherit; font-size: .9rem; color: var(--text); background: #0d1527; border: 1px solid var(--line-2); border-radius: 12px; padding: .6rem .75rem;
}
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
textarea { resize: vertical; }
.toggle { display: flex; align-items: center; gap: .6rem; font-size: .85rem; cursor: pointer; padding: .6rem .75rem; border: 1px solid var(--line-2); border-radius: 12px; background: #0d1527; }
.toggle input { width: 1rem; height: 1rem; accent-color: var(--primary); }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(11,17,32,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; }
.logo { width: 40px; height: 40px; display: block; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(249, 115, 22, .35)); }
.brand strong { font-size: 1.05rem; }
.top-actions { display: flex; align-items: center; gap: .5rem; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(12px); }
.lang-switch a, .lang-switch button { font: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-decoration: none; background: none; border: 0; padding: .32rem .5rem; border-radius: 7px; cursor: pointer; }
.lang-switch .on { color: #fff; background: rgba(129,140,248,.25); box-shadow: inset 0 0 0 1px rgba(165,180,252,.35); }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: rgba(99,102,241,.12); color: var(--primary-2); border: 1px solid rgba(99,102,241,.3); white-space: nowrap; }
.pill.low { background: rgba(245,158,11,.12); color: var(--amber); border-color: rgba(245,158,11,.35); }

/* Cartes */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.panel h2 { font-size: 1rem; display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; }
.step { width: 24px; height: 24px; border-radius: 50%; background: rgba(99,102,241,.18); color: var(--primary-2); font-size: .75rem; display: inline-grid; place-items: center; font-weight: 700; }
.step.g { background: rgba(16,185,129,.16); color: var(--green); }
.banner { border-radius: 12px; padding: .7rem 1rem; font-size: .85rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; border: 1px solid; }
.banner.info { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.35); color: #c7cbff; }
.banner.ok { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.35); color: #a7f3d0; }
.banner.err { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.4); color: #fecdd3; }
@media (max-width: 600px) {
  .brand strong { display: none; }
  .top-actions { gap: .35rem; }
  .top-actions .btn { padding: .45rem .6rem; font-size: .78rem; }
}
