/* SNCF Client — style commun du site (thème sombre unique, couleurs du mod) */
:root {
  color-scheme: dark;
  --bg: #0b0d14; --bg2: #10131c; --card: #121520; --line: rgba(255,255,255,.08);
  --text: #f2f0fa; --soft: #d9d4e8; --muted: #9c97ae; --dim: #a9a3ba;
  --violet: #b56cff; --violet-l: #c98cff; --violet-ink: #160a24; --pink: #ff6ec7;
  --green: #4ade80; --green-l: #8ff0b4; --gold: #ffd45c; --blue: #9ccbff; --red: #ffb3b3; --discord: #5865f2;
  --head: "Space Grotesk", system-ui, sans-serif; --body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.55; }
a { color: #d9b8ff; } a:hover { color: #fff; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--head); margin: 0; line-height: 1.1; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--violet-l); font-weight: 600; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
[hidden] { display: none !important; }

/* Barre du haut */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(11,13,20,.88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.07); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 18px; }
.navlinks { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; flex: 1 1 auto; }
.navlinks a { color: #c9c4d8; text-decoration: none; }
.navlinks a:hover, .navlinks a[aria-current] { color: #fff; }
.tabs { display: flex; gap: 6px; font-size: 14px; flex: 1 1 auto; }
.tabs a { padding: 8px 14px; border-radius: 10px; color: #c9c4d8; text-decoration: none; }
.tabs a[aria-current] { background: rgba(181,108,255,.16); color: #fff; font-weight: 600; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); color: var(--text); text-decoration: none; }
.userchip img, .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--violet), var(--pink)); flex: none; }
.userchip .names { display: flex; flex-direction: column; line-height: 1.2; }
.userchip .names small { font-size: 12px; color: var(--muted); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--violet); color: var(--violet-ink); }
.btn-primary:hover { background: var(--violet-l); color: var(--violet-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.16); }
.btn-ghost:hover { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: #6c77ff; color: #fff; }
.btn-ok { background: var(--green); color: #062012; }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(255,92,92,.5); }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 12px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Cartes, puces, formulaires */
.card { padding: 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.t-probleme { background: rgba(255,92,92,.16); color: var(--red); }
.t-suggestion { background: rgba(255,212,92,.16); color: #ffe39a; }
.t-question { background: rgba(90,169,255,.16); color: var(--blue); }
.s-ouvert { color: var(--blue); } .s-repondu { color: var(--green-l); } .s-ferme { color: var(--muted); }
.ok-pill { background: rgba(74,222,128,.14); color: var(--green-l); }
.warn-pill { background: rgba(255,212,92,.14); color: #ffe39a; }
.bad-pill { background: rgba(255,92,92,.14); color: var(--red); }
.none-pill { background: rgba(255,255,255,.07); color: var(--muted); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #c9c4d8; }
input[type=text], input[type=search], select, textarea { min-height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--text); font: inherit; padding: 9px 12px; }
select { background: #171a26; }
textarea { resize: vertical; }
.dropzone { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; border: 2px dashed rgba(201,140,255,.4); background: rgba(181,108,255,.05); cursor: pointer; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #c9c4d8; font: inherit; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(181,108,255,.16); color: #fff; border-color: var(--violet-l); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; }
table.list td { padding: 10px 8px; border-top: 1px solid rgba(255,255,255,.06); }
.scroll-x { overflow-x: auto; }
.empty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: rgba(88,101,242,.12); border: 1px solid rgba(88,101,242,.35); font-size: 14px; color: #c1c7ff; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: #1d2130; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 500; }
.toast.err { border-color: rgba(255,92,92,.6); color: var(--red); }
pre.log { margin: 0; max-height: 260px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: #07080d; border: 1px solid var(--line); font: 12px/1.6 ui-monospace, Consolas, monospace; color: #b9b3c9; white-space: pre; }
pre.log .warn { color: var(--gold); } pre.log .err { color: #ff8a8a; }
.footer { border-top: 1px solid rgba(255,255,255,.07); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 26px; font-size: 13px; color: #8e89a0; }
.footer a { color: #8e89a0; }

/* Mise en page à deux colonnes (liste + détail) */
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.split > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.split > .main { flex: 2 1 560px; min-width: 0; }
.item { text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.item[aria-current="true"] { border-color: var(--violet-l); background: rgba(181,108,255,.12); }
.item .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg .bubble { flex: 1 1 auto; min-width: 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.staff .bubble { background: rgba(181,108,255,.10); }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline div { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.timeline time { color: var(--muted); width: 110px; flex: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
