/* Typographies de la charte MLOCTET+ : DIN Pro (textes), Roketto (titre principal, avec parcimonie) */
@font-face { font-family: "DIN Pro"; src: url("/fonts/dinpro-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "DIN Pro"; src: url("/fonts/dinpro-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "DIN Pro"; src: url("/fonts/dinpro-700.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Roketto"; src: url("/fonts/roketto.woff2") format("woff2"); font-display: swap; }
.brand-title { font-family: "Roketto", "DIN Pro", system-ui, sans-serif; font-weight: 400; letter-spacing: .01em; }

:root {
  /* Charte MLOCTET+ : bleu #16417b, crème #fff0db, blanc */
  --blue: #16417b;
  --cream: #fff0db;
  --bg: #fdf8f0;
  --surface: #ffffff;
  --surface-2: #fff4e4;
  --text: #0f2747;
  --muted: #5d6c83;
  --border: #eadfcc;
  --brand: #16417b;
  --brand-ink: #fff0db;
  --brand-soft: #fff0db;
  --nav-bg: #16417b;
  --nav-ink: #fff0db;
  --ok: #18794e;
  --ok-soft: #e3f4ea;
  --warn: #a35200;
  --warn-soft: #fde9cf;
  --bad: #c42b2b;
  --bad-soft: #fbe5e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 65, 123, .06), 0 2px 6px rgba(22, 65, 123, .06);
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #0a182c;
    --surface: #10243f;
    --surface-2: #17304f;
    --text: #fff6ea;
    --muted: #a9b6cb;
    --border: #213d63;
    --brand: #fff0db;
    --brand-ink: #16417b;
    --brand-soft: #1b3a63;
    --nav-bg: #0d1f38;
    --nav-ink: #fff0db;
    --ok: #4cc38a;
    --ok-soft: #12301f;
    --warn: #f0a548;
    --warn-soft: #33240f;
    --bad: #ff7b7b;
    --bad-soft: #3a1a1d;
    --shadow: none;
    color-scheme: dark;
  } }
:root[data-theme="dark"] {
    --bg: #0a182c;
    --surface: #10243f;
    --surface-2: #17304f;
    --text: #fff6ea;
    --muted: #a9b6cb;
    --border: #213d63;
    --brand: #fff0db;
    --brand-ink: #16417b;
    --brand-soft: #1b3a63;
    --nav-bg: #0d1f38;
    --nav-ink: #fff0db;
    --ok: #4cc38a;
    --ok-soft: #12301f;
    --warn: #f0a548;
    --warn-soft: #33240f;
    --bad: #ff7b7b;
    --bad-soft: #3a1a1d;
    --shadow: none;
    color-scheme: dark;
  }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15.5px/1.45 "DIN Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) h1 { color: var(--text); } }
:root[data-theme="dark"] h1 { color: var(--text); }
h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; }

/* --- layout --- */
.app { display: flex; min-height: 100vh; }
.nav {
  /* La zone de la barre d'accueil iPhone s'AJOUTE à la hauteur de la barre (elle ne doit pas l'écraser). */
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; background: var(--nav-bg); border-top: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav .brand { display: none; }
.nav .brand img { width: 168px; display: block; }
.topbar { display: flex; align-items: center; justify-content: center; background: var(--nav-bg); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
.topbar img { height: 34px; }
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--nav-ink); opacity: .72; font-size: 11.5px; font-weight: 600; position: relative;
}
.nav a svg { width: 24px; height: 24px; flex-shrink: 0; }
.nav a.active { color: var(--nav-ink); opacity: 1; }
.nav a.active svg { stroke-width: 2.4; }
.nav .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
main { flex: 1; min-width: 0; padding: 16px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) {
  .nav { position: sticky; top: 0; height: 100vh; width: 220px; flex-direction: column; border-top: 0; border-right: 1px solid var(--border); padding: 16px 10px; gap: 2px; }
  .nav .brand { display: block; padding: 8px 10px 26px; }
  .topbar { display: none; }
  .nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; font-size: 14.5px; padding: 10px 12px; border-radius: 8px; }
  .nav a:hover { opacity: 1; background: rgba(255, 240, 219, .08); }
  .nav a.active { background: rgba(255, 240, 219, .16); }
  .nav .who { margin-top: auto; color: var(--nav-ink); opacity: .7; font-size: 12.5px; padding: 8px 12px; }
  .nav .badge { position: static; margin-left: auto; }
  main { padding: 28px 32px 40px; }
}

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* --- surfaces --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 12px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 12px; }
.grid.kpis { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid.kpis { grid-template-columns: repeat(4, 1fr); } .grid.two { grid-template-columns: 1fr 1fr; } }
.kpi { padding: 14px 16px; }
.kpi .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi.alert { border-color: var(--warn); background: var(--warn-soft); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list a.row { display: flex; align-items: center; gap: 12px; color: inherit; width: 100%; }
.qty { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; text-align: right; white-space: nowrap; }

/* --- controls --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 10px; cursor: pointer; min-height: 44px;
}
@media (hover: hover) { .btn:hover { background: var(--surface-2); } }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }

.scan { display: flex; gap: 8px; }
.scan input { font-size: 17px; }
.scan .btn { flex: none; }
.search-big { position: relative; }
.search-big input { padding-left: 42px; font-size: 17px; min-height: 52px; }
.search-big svg { position: absolute; left: 13px; top: 15px; width: 22px; height: 22px; color: var(--muted); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 99px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--text); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--bad); color: #fff; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); font-size: 14px; }
.notice.warn { background: var(--warn-soft); }

/* --- stepper / tabs --- */
.stepper { display: flex; gap: 6px; margin-bottom: 14px; }
.stepper button {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px; font: inherit; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 10px; cursor: pointer;
}
.stepper button .n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.stepper button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.stepper button.on .n { background: var(--brand); color: var(--brand-ink); }
.stepper button:disabled { cursor: default; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tabs button { text-align: left; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.tabs button .v { font-size: 24px; font-weight: 700; display: block; font-variant-numeric: tabular-nums; }
.tabs button .l { font-size: 12.5px; color: var(--muted); }
.tabs button.ok.on { border-color: var(--ok); background: var(--ok-soft); }
.tabs button.missing.on { border-color: var(--warn); background: var(--warn-soft); }
.tabs button.unexpected.on { border-color: var(--bad); background: var(--bad-soft); }
.tabs button.ok .v { color: var(--ok); } .tabs button.missing .v { color: var(--warn); } .tabs button.unexpected .v { color: var(--bad); }

.sn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 8px; padding: 6px 6px 6px 10px; }
.sn-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); transition: width .2s; }
.progress.done > div { background: var(--ok); }

/* --- toast / modal --- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { padding: 12px 14px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 500; box-shadow: 0 6px 24px rgba(0,0,0,.2); animation: pop .15s ease-out; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal .sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 18px; }
@media (min-width: 700px) { .modal { align-items: center; } .modal .sheet { border-radius: 16px; } }
.camera video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 4/3; object-fit: cover; }
.camera .last { margin-top: 10px; min-height: 22px; font-weight: 600; text-align: center; }

.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.skeleton { color: var(--muted); padding: 30px; text-align: center; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.scroll-x { overflow-x: auto; }
.login { max-width: 380px; margin: 14vh auto 0; text-align: center; }
.login img { width: 240px; margin: 4px auto 14px; display: block; }
.login form { text-align: left; }
.nav .who { display: none; }
@media (min-width: 900px) { .nav .who { display: block; } }
.kpi .v { color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kpi .v { color: var(--text); } }
:root[data-theme="dark"] .kpi .v { color: var(--text); }
.nav:empty { display: none; }

/* connexion et double authentification (identique à MLOCTET+ Compta) */
.login .auth-body { text-align: left; }
.login h3 { margin: 6px 0 6px; font-size: 17px; }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: 220px; margin: 8px auto 12px; }
.qr img { width: 100%; display: block; image-rendering: pixelated; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; background: var(--surface-2); padding: 14px; border-radius: 10px; margin: 10px 0; }
input.otp { font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 10px 0 0; text-decoration: underline; }
.steps { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login img.logo-light { content: url("/icons/logo-cream.svg"); } }
:root[data-theme="dark"] .login img.logo-light { content: url("/icons/logo-cream.svg"); }

/* Accueil : actions rapides en une rangée sous les chiffres clés */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.quick .btn { padding-left: 10px; padding-right: 10px; }
.quick .badge { position: static; margin-left: 2px; }
/* Sur téléphone, la barre du bas offre déjà Entrée / Sorties / Inventaire : pas de doublon. */
@media (max-width: 899px) { .quick { display: none; } }

/* Mention des outils internes sur l’écran de connexion */
.staff-only { display: inline-flex; align-items: center; margin: 0 0 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 99px; }

/* ===================== DV Experts : demandes et parc ===================== */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.seg button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.items li:first-child { border-top: 0; }
.items .grow { flex: 1; min-width: 0; }
.items .code { min-width: 34px; text-align: center; }
.qtybox { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qtybox button { width: 42px; height: 42px; border: 0; background: var(--surface-2); color: var(--text); font-size: 20px; cursor: pointer; }
.qtybox button:disabled { opacity: .35; cursor: default; }
.qtybox output { width: 38px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 17px; }
.items li.on .code { background: var(--brand); color: var(--brand-ink); }
.packbtn { margin-bottom: 8px; }
.packbtn.on { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.recap { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (min-width: 900px) { .recap { bottom: 12px; } }
.st-new { background: var(--brand-soft); color: var(--brand); }
.st-progress, .st-ordered { background: var(--warn-soft); color: var(--warn); }
.st-delivered { background: var(--ok-soft); color: var(--ok); }
.st-cancelled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.eq-service { background: var(--ok-soft); color: var(--ok); }
.eq-stock { background: var(--brand-soft); color: var(--brand); }
.eq-repair { background: var(--warn-soft); color: var(--warn); }
.eq-out { background: var(--bad-soft); color: var(--bad); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; font-weight: 500; white-space: pre-wrap; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .msg { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin-top: 4px; white-space: pre-wrap; }
.timeline li.mine .msg { background: var(--brand-soft); }
table.matrix td, table.matrix th { text-align: center; }
table.matrix td:first-child, table.matrix th:first-child { text-align: left; }
table.matrix td.zero { color: var(--muted); opacity: .5; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tiles .kpi { margin: 0; }
.filters { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0; }
@media (min-width: 700px) { .filters { grid-template-columns: 2fr 1fr 1fr; } }
.row-click { cursor: pointer; }
.list > li.row-click:hover { background: var(--surface-2); }
.sitechips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.sitechips .chip { white-space: nowrap; }
.chip .n { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.req { color: var(--bad); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.switch:first-of-type { border-top: 0; }
.grid + .card, .card + .grid, .grid + .grid, .tiles + .card { margin-top: 12px; }
@media (max-width: 699px) {
  .recap { flex-wrap: nowrap; padding: 10px 12px; }
  .recap #recap { font-size: 13px; line-height: 1.3; }
  .recap .btn { flex: none; }
}

/* ===================== Charte croisée DV Experts (cyan #00AEEF) × MLOCTET+ (bleu #16417b, crème) ===================== */
:root { --accent: #00aeef; --accent-ink: #062b4a; --accent-soft: #e1f5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #34c3f5; --accent-ink: #04182b; --accent-soft: #0d3350; --brand: #8fdcf8; --brand-ink: #04182b; --brand-soft: #123659; } }
:root[data-theme="dark"] { --accent: #34c3f5; --accent-ink: #04182b; --accent-soft: #0d3350; --brand: #8fdcf8; --brand-ink: #04182b; --brand-soft: #123659; }
.topbar { border-bottom: 3px solid var(--accent); }
.cobrand { display: flex; align-items: center; gap: 10px; }
.cobrand img { height: 30px; display: block; }
.cobrand img.dv { height: 36px; width: 36px; }
.cobrand .x { color: var(--accent); font-weight: 700; font-size: 18px; }
.nav { box-shadow: inset 0 3px 0 var(--accent); }
@media (min-width: 900px) {
  .nav { box-shadow: inset -3px 0 0 var(--accent); }
  .nav .brand { padding: 6px 10px 22px; }
  .nav .brand .cobrand { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav .brand .cobrand img.dv { width: 64px; height: 64px; }
  .nav .brand .cobrand img:not(.dv) { width: 150px; height: auto; }
  .nav .brand .cobrand .x { display: none; }
  .nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
}
@media (max-width: 899px) { .nav a.active::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); } }
.nav .badge, .badge { background: var(--accent); color: var(--accent-ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg button.on { box-shadow: inset 0 -3px 0 var(--accent); }
input:focus, select:focus, textarea:focus { outline-color: var(--accent); }
.kpi:hover, .list > li.row-click:hover { border-color: var(--accent); }
h1::after { content: ""; display: block; width: 42px; height: 3px; background: var(--accent); border-radius: 3px; margin-top: 6px; }
.login { border-top: 4px solid var(--accent); }
.login .cobrand { justify-content: center; gap: 14px; margin: 4px 0 14px; }
.login .cobrand img.dv { width: 84px; height: 84px; }
.login .cobrand img:not(.dv) { width: 170px; height: auto; margin: 0; }
.login .cobrand .x { font-size: 22px; }
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.accent { color: var(--accent); } }
:root[data-theme="dark"] .tag.accent { color: var(--accent); }

/* Icônes dans les titres et fenêtres : taille du texte (correctif de l'icône géante dans Mon compte) */
h1 svg, h2 svg, h3 svg, .tag svg, .notice svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin-right: 4px; flex: none; }

/* Journal */
.audit td { vertical-align: top; }
.audit .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-create { background: var(--ok-soft); color: var(--ok); }
.k-update, .k-settings, .k-import { background: var(--brand-soft); color: var(--brand); }
.k-delete, .k-error, .k-login_failed { background: var(--bad-soft); color: var(--bad); }
.k-login, .k-logout, .k-email { background: var(--accent-soft); color: var(--accent-ink); }
.k-security { background: var(--warn-soft); color: var(--warn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-login, :root:not([data-theme="light"]) .k-logout, :root:not([data-theme="light"]) .k-email { color: var(--accent); } }
:root[data-theme="dark"] .k-login, :root[data-theme="dark"] .k-logout, :root[data-theme="dark"] .k-email { color: var(--accent); }
.filters.audit-f { grid-template-columns: 1fr; }
@media (min-width: 700px) { .filters.audit-f { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; } }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.filters.inv-f { grid-template-columns: 1fr; }
@media (min-width: 700px) { .filters.inv-f { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.items li .sub { font-size: 12.5px; color: var(--muted); }

/* Sélecteur de thème */
.themesel { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.themesel button { border: 0; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; padding: 9px 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.themesel button + button { border-left: 1px solid var(--border); }
.themesel button.on { background: var(--accent); color: var(--accent-ink); }
.themesel svg { width: 16px; height: 16px; }
.nav .themequick { display: none; }
@media (min-width: 900px) { .nav .themequick { display: flex; margin: 0 12px 4px; } .nav .themequick button { padding: 6px 10px; background: transparent; color: var(--nav-ink); } .nav .themequick { border-color: rgba(255, 240, 219, .25); } .nav .themequick button + button { border-left-color: rgba(255, 240, 219, .25); } .nav .themequick button.on { background: var(--accent); color: var(--accent-ink); } .nav .who { margin-top: 0; } }
.nav .spacer { display: none; }
@media (min-width: 900px) { .nav .spacer { display: block; flex: 1; } }

/* Éditeur de modèles d'e-mail */
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.tagchips button { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.tagchips button:hover { border-color: var(--accent); }
.editor { display: grid; gap: 12px; }
@media (min-width: 1000px) { .editor { grid-template-columns: 1fr 1fr; } }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 380px; line-height: 1.5; }
.mailframe { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 10px; background: #f4f1ea; }
.modal .sheet.wide { max-width: 1180px; }
@media (min-width: 900px) { .nav .themequick button { flex: 1; justify-content: center; } }
