/* =========================================================
   ESPACE CLIENT MW HOSTING : mêmes couleurs que le site
   ========================================================= */
:root {
  color-scheme: light;
  --primary: #1a2a4a; --primary-ink: #f5f7fc; --accent: #6b8dc4; --accent-soft: rgba(107, 141, 196, .14);
  --bg: #f5f7fc; --bg-alt: #eaeff8; --surface: #ffffff; --line: #dbe3f0; --text: #1a2a4a; --muted: #55678a;
  --ok: #1f9d5c; --warn: #c9861a; --bad: #d64545;
  --shadow: 0 24px 50px -28px rgba(26, 42, 74, .35);
  --side: #1a2a4a; --side-ink: #dfe7f5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #8baad4; --primary-ink: #0d1b2a; --accent: #8baad4; --accent-soft: rgba(139, 170, 212, .14);
  --bg: #0d1b2a; --bg-alt: #102236; --surface: #132a40; --line: #1f3b58; --text: #e7eef8; --muted: #94a9c6;
  --ok: #2fbf71; --warn: #e3a52b; --bad: #e5534b;
  --shadow: 0 24px 50px -28px rgba(0, 0, 0, .7);
  --side: #0a1622; --side-ink: #c9d6ea;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 400 15px/1.6 "Red Hat Text", system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: "Red Hat Display", system-ui, sans-serif; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font: 500 .88em ui-monospace, "Cascadia Code", Consolas, monospace; padding: 2px 6px; border-radius: 6px; background: var(--bg-alt); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.right { text-align: right; }
.center { text-align: center; justify-content: center; }

/* Bandeau mode démo */
.demobar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 16px; font-size: .82rem; font-weight: 600; background: color-mix(in srgb, var(--warn) 18%, var(--bg)); color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.demobar i { color: var(--warn); }

/* Marque */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.1rem "Red Hat Display", sans-serif; color: inherit; }
.brand:hover { text-decoration: none; }
.brand span:last-child { font-weight: 500; opacity: .8; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); font-size: .78rem; font-weight: 800; opacity: 1 !important; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 20px; border-radius: 11px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: transform .15s, background-color .2s, border-color .2s, opacity .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.btn--danger { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn--danger-ghost { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn--small { height: 36px; padding: 0 14px; font-size: .88rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 8px; font-size: .8rem; }
.icon-btn.is-done { color: var(--ok); border-color: var(--ok); }
[data-theme-toggle] .fa-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .fa-sun { display: inline; color: #f5c451; }
:root[data-theme="dark"] [data-theme-toggle] .fa-moon { display: none; }

/* Formulaires */
.form { display: grid; gap: 16px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__row { display: flex; justify-content: flex-end; font-size: .88rem; margin-top: -6px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .86rem; font-weight: 600; }
.field small { color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea, .input, .inline-form input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .inline-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:disabled { opacity: .7; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--accent); }
.inline-form { display: flex; gap: 8px; margin-top: 14px; }
.inline-form input { height: 36px; }

/* Alertes et pastilles */
.alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .92rem; border: 1px solid; }
.alert > span { flex: 1; min-width: 200px; }
.alert form { display: inline; }
.alert--ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.alert--ok > i { color: var(--ok); }
.alert--warn { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.alert--warn > i { color: var(--warn); }
.alert--bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.alert--bad > i { color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.badge--warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.badge--bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.badge--muted { color: var(--muted); background: var(--bg-alt); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot--off { background: var(--bad); }
.dot--wait { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* Icônes des produits (logos des jeux comme sur le site) */
.pico { --c: var(--accent); position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; overflow: hidden; color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 72%, #000)); }
.pico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pico img + i { visibility: hidden; }
.pico--sm { width: 32px; height: 32px; border-radius: 9px; font-size: .8rem; }
.pico--lg { width: 58px; height: 58px; border-radius: 16px; font-size: 1.4rem; }

/* ---------- Pages de connexion ---------- */
body.auth { min-height: 100vh; background: radial-gradient(ellipse at top, var(--accent-soft), transparent 60%), var(--bg); }
.auth__wrap { width: min(440px, 100% - 32px); margin: 0 auto; padding: 56px 0 40px; display: grid; justify-items: center; gap: 24px; }
.auth__wrap--wide { width: min(640px, 100% - 32px); }
.auth__card { width: 100%; padding: 32px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.auth__card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth__card > .muted { margin: 0 0 22px; }
.auth__switch { margin: 20px 0 0; text-align: center; font-size: .92rem; color: var(--muted); }
.auth__foot { font-size: .86rem; color: var(--muted); }
.auth__foot a { color: var(--muted); }

/* ---------- Structure connectée ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 22px 14px; background: var(--side); color: var(--side-ink); overflow-y: auto; }
.side .brand { padding: 0 8px; color: #fff; }
.side .brand__mark { background: #8baad4; color: #0d1b2a; }
.side__nav { display: grid; gap: 2px; }
.side__nav a, .side__foot a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-ink); font-weight: 500; text-decoration: none; opacity: .85; transition: background-color .15s, opacity .15s; }
.side__nav a i, .side__foot a i { width: 18px; text-align: center; opacity: .8; }
.side__nav a:hover, .side__foot a:hover { background: rgba(255, 255, 255, .06); opacity: 1; }
.side__nav a.is-on { background: rgba(139, 170, 212, .18); color: #fff; opacity: 1; }
.side__nav a em { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--warn); color: #1a1205; }
.side__sep { margin: 14px 12px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .5; }
.side__foot { margin-top: auto; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 1.35rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__actions { display: flex; align-items: center; gap: 10px; }
.side-toggle { display: none; }
.content { padding: 26px 28px 60px; max-width: 1240px; width: 100%; }
.hello { margin: 0 0 18px; color: var(--muted); font-size: 1.02rem; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: .9rem; }

/* Menu utilisateur */
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary .fa-chevron-down { font-size: .7rem; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; flex: none; }
.avatar--staff { background: var(--primary); color: var(--primary-ink); font-size: .7rem; }
.usermenu__pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); z-index: 20; }
.usermenu__who { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu__who small { color: var(--muted); }
.usermenu__pop a, .usermenu__pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; font-weight: 500; }
.usermenu__pop a:hover, .usermenu__pop button:hover { background: var(--bg-alt); text-decoration: none; }

/* Cartes et grilles */
.card { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head h2 { font-size: 1.08rem; }
.card__head a { font-size: .86rem; font-weight: 600; }
.card.narrow { max-width: 560px; }
.card.narrow.center { margin-inline: auto; display: grid; justify-items: center; gap: 12px; text-align: center; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .grid2, .grid2 + .card, .card + .grid2 { margin-top: 18px; }
.stack { display: grid; gap: 18px; }
.stack .card { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.kpi > i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.kpi b { display: block; font: 800 1.25rem "Red Hat Display", sans-serif; }
.kpi small { color: var(--muted); }
.kpi--warn > i { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }

/* Listes */
.svc-list { display: grid; gap: 8px; }
.svc { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s; }
.svc:hover { border-color: var(--accent); transform: translateY(-1px); }
.svc__main { flex: 1; min-width: 0; display: grid; }
.svc__main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc__live { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.svc > .fa-chevron-right { color: var(--muted); font-size: .8rem; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a, .row-static { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: var(--text); text-decoration: none !important; }
.rows a:hover strong { color: var(--accent); }
.rows span:first-child { flex: 1; min-width: 0; display: grid; }
.rows small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows--big a { padding: 14px 6px; }
.rows .fa-chevron-right { color: var(--muted); font-size: .8rem; }
.specs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.specs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.specs li:last-child { border-bottom: 0; }
.specs span { color: var(--muted); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--muted); }
.empty > i { font-size: 2rem; color: var(--accent); margin-bottom: 6px; }
.empty strong { color: var(--text); font-size: 1.05rem; }
.empty p { margin: 0 0 10px; max-width: 420px; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: color-mix(in srgb, var(--bg-alt) 60%, transparent); }
.table tfoot td { border-bottom: 0; font-size: 1rem; }
.table--compact td { padding: 8px 10px; font-size: .84rem; }
.cell-prod { display: flex; align-items: center; gap: 10px; }
.searchbar { display: flex; align-items: center; gap: 10px; padding: 0 14px; margin-bottom: 16px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); max-width: 420px; }
.searchbar i { color: var(--muted); }
.searchbar input { flex: 1; border: 0; background: none; outline: none; height: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .84rem; text-decoration: none !important; }
.chip.is-on { border-color: var(--accent); background: var(--accent-soft); }

/* Page d'un service */
.hero-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-card__main { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.hero-card__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-card__title h2 { font-size: 1.45rem; }
.hero-card .muted { margin: 0; }
.addr { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.addr code { font-size: .95rem; padding: 6px 10px; }
.power { display: flex; gap: 8px; flex-wrap: wrap; }
.live-state { font-size: .82rem; font-weight: 700; color: var(--muted); }
.live-state--ok { color: var(--ok); }
.live-state--warn { color: var(--warn); }
.meters { display: grid; gap: 16px; }
.meter__top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: .9rem; }
.meter__top span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), #5ec8e5); transition: width .6s ease; }
.bar--big { height: 14px; }
.actions-list { display: grid; gap: 8px; }
.actions-list form { margin: 0; }
.action { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-align: left; cursor: pointer; text-decoration: none !important; transition: border-color .2s; }
.action:hover { border-color: var(--accent); }
.action > i:first-child { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.action span { flex: 1; display: grid; }
.action small { color: var(--muted); }
.action > i:last-child { color: var(--muted); font-size: .8rem; }
.action.is-disabled { opacity: .6; cursor: default; }
.big-ico { font-size: 2.6rem; color: var(--accent); }
.big-ico.is-ok { color: var(--ok); }

/* Commande */
.order-cat { margin-bottom: 30px; }
.order-cat h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.order-cat h2 i { color: var(--accent); }
.order-cat > p { margin: 4px 0 14px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.product { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s, box-shadow .2s; }
.product:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.product small { color: var(--muted); }
.product__price { margin-top: 4px; color: var(--muted); font-size: .88rem; }
.product__price b { color: var(--text); font-size: 1.1rem; }
.order { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.order__sum { position: sticky; top: 90px; display: grid; gap: 14px; margin: 0; }
.order__prod { display: flex; align-items: center; gap: 12px; }
.order__prod div { display: grid; }
.order__prod small { color: var(--muted); }
.order__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-block: 1px solid var(--line); }
.order__total b { font: 800 1.6rem "Red Hat Display", sans-serif; }
.pay-methods { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: 1.3rem; }
.pay-methods span { font-size: .78rem; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tier input, .period input { position: absolute; opacity: 0; pointer-events: none; }
.tier__box { display: grid; gap: 6px; height: 100%; padding: 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; transition: border-color .2s, background-color .2s; }
.tier__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 700 1.05rem "Red Hat Display", sans-serif; }
.tier__name em { font: 700 .66rem "Red Hat Text", sans-serif; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-style: normal; }
.tier__box small { color: var(--muted); }
.tier__price b { font: 800 1.35rem "Red Hat Display", sans-serif; }
.tier__box ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; }
.tier__box li { display: flex; justify-content: space-between; gap: 8px; }
.tier__box li span { color: var(--muted); }
.tier input:checked + .tier__box { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.tier input:focus-visible + .tier__box, .period input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.period { position: relative; }
.period span { display: grid; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.period small { color: var(--muted); }
.period em { font-style: normal; color: var(--ok); font-weight: 700; }
.period input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }

/* Tickets */
.thread { display: grid; gap: 12px; margin: 10px 0 18px; }
.msg { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.msg--staff { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.msg__who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.msg__who small { color: var(--muted); margin-left: auto; }
.msg__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.reply textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); resize: vertical; }
.reply__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.steps { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }

/* Facture */
.invoice { max-width: 860px; }
.invoice__head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.invoice__head h2 { font-size: 1.8rem; }
.invoice__to { display: grid; padding: 14px 16px; border-radius: 12px; background: var(--bg-alt); margin-bottom: 20px; max-width: 360px; }
.invoice__to small { color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }

@media print {
  .side, .top, .demobar, .back, .no-print, .alert { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .card { border: 0; padding: 0; }
  body { background: #fff; color: #000; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .order { grid-template-columns: 1fr; }
  .order__sum { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; width: 270px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0, 0, 0, .3); }
  .side.is-open { transform: none; }
  .side-toggle { display: inline-grid; }
  .top { padding: 12px 16px; }
  .content { padding: 18px 16px 50px; }
  .usermenu__name, .top__actions .btn span { display: none; }
  .tiers, .periods { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .auth__card { padding: 24px 20px; }
  .svc__live { display: none; }
}
