@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');
/* Tableau de bord — Réclamations */
:root {
  --bg: #f1f3f5;
  --surface: #ffffff;
  --text: #172026;
  --muted: #5d6873;
  --line: #e1e5e9;
  --primary: #1d5c63;
  --primary-ink: #ffffff;
  --danger: #d6363f;
  --ok-bg: #e7f6ec; --ok-ink: #1d6b3a;
  --err-bg: #fdecec; --err-ink: #a32028;
  --internal: #fff8e1;
  --radius: 14px;
  --amber: #b45309; --amber-soft: #fdf1e3;
  --green: #1f7a4d; --green-soft: #e4f2ea;
  --primary-soft: color-mix(in srgb, var(--primary) 12%, white);
}
* { box-sizing: border-box; }
body { margin: 0; font: 500 15px/1.55 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
h3 { font-size: .95rem; margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* Barre du haut */
.topbar { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: .7rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); }
.brand.big { font-size: 1.3rem; justify-content: center; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 800; }
.tenant { padding: .15rem .6rem; border-radius: 99px; background: var(--bg); font-size: .85rem; }
.topbar nav { display: flex; gap: .3rem; flex: 1; }
.topbar nav a { padding: .4rem .8rem; border-radius: 8px; color: var(--muted); }
.topbar nav a.active, .topbar nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.who { font-size: .85rem; color: var(--muted); }

.container { max-width: 1240px; margin: 0 auto; padding: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem; }
.card.flush { padding: 0; overflow-x: auto; }

/* Boutons et champs */
.btn { display: inline-block; border: 0; border-radius: 8px; padding: .55rem 1rem; background: var(--primary); color: var(--primary-ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.block { width: 100%; }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
input, select, textarea { width: 100%; font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
label input, label select { margin-top: .25rem; color: var(--text); }
label.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
label.inline input { width: auto; margin: 0; }
.form.narrow { max-width: 520px; }
.grid2, .grid3 { display: grid; gap: 0 1rem; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form input { width: auto; flex: 1; }
.hint { font-size: .85rem; color: var(--muted); }
.hint.warn { color: #9a6200; }

.alert { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.err { background: var(--err-bg); color: var(--err-ink); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; color: var(--text); }
.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }

/* Filtres et tableau */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters input[type=search] { flex: 1 1 240px; }
.filters select { flex: 0 1 180px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: #f7f9ff; }
.table tr.disabled td { opacity: .55; }
.table .empty { text-align: center; color: var(--muted); padding: 2rem; }
.actions details summary { cursor: pointer; color: var(--primary); }
.actions details form { display: flex; gap: .4rem; margin-top: .4rem; }
.actions details input, .actions details select { width: 170px; padding: .3rem .5rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; }
.tabs a { padding: .35rem .8rem; border-radius: 99px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.tabs a.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Badges */
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #eef0f4; color: #3a4252; white-space: nowrap; }
.st-new { background: #e4ecff; color: #1f4fd6; }
.st-open { background: #fff1d6; color: #8a5a00; }
.st-pending { background: #f1e6ff; color: #6b2fb3; }
.st-resolved { background: #e3f5ea; color: #1d6b3a; }
.st-closed { background: #eceef1; color: #59606d; }
.pr-low { background: #eef0f4; color: #59606d; }
.pr-normal { background: #e8f1fb; color: #2a5b8f; }
.pr-high { background: #ffe9d6; color: #a14e00; }
.pr-urgent { background: #fde2e3; color: #b0222b; }

/* Fiche réclamation */
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.ticket-head h1 { margin: .2rem 0 .4rem; }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; }
@media (max-width: 900px) { .ticket-grid { grid-template-columns: 1fr; } }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: .8rem; }
.msg.client { border-left: 4px solid #9aa3b5; }
.msg.staff { border-left: 4px solid var(--primary); }
.msg.internal { background: var(--internal); border-left: 4px solid #e0a800; }
.msg .meta { font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.tag { background: #e0a800; color: #fff; padding: 0 .4rem; border-radius: 4px; font-size: .75rem; }
.atts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.atts img { width: 140px; height: 105px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.atts .file { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.reply-bar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .6rem; }
.reply-bar input[type=file] { width: auto; flex: 1; border: 0; padding: 0; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.timeline li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }

/* Pages de connexion / installation / pages publiques */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login { width: 100%; max-width: 380px; text-align: center; }
.login label { text-align: left; }
.install { width: 100%; max-width: 780px; }
.checks { list-style: none; padding: 0; margin: 0; columns: 2; }
.checks .ok { color: var(--ok-ink); } .checks .ko { color: var(--err-ink); font-weight: 600; }
.code-big { font-size: 1.6rem; letter-spacing: .1em; font-family: ui-monospace, monospace; }
.public { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem; }
.public h2 { margin-top: 1.6rem; }

/* --- Version 1.1 --- */
.brand-logo { max-height: 34px; max-width: 160px; display: block; }
.badge.late { background: #fde2e3; color: #b0222b; }
.stars { color: #e0a800; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #d6d9e0; }
.stat.alert b { color: #b0222b; }
.toolbar { display: flex; gap: .5rem; justify-content: flex-end; margin: -0.4rem 0 1rem; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.kpi b { display: block; font-size: 1.6rem; line-height: 1.15; }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi small { display: block; color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1.2rem; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }
.chart svg { width: 100%; height: auto; display: block; }
.chart .legend { display: flex; gap: 1rem; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.color-row { display: flex; gap: .6rem; align-items: center; }
.color-row input[type=color] { width: 56px; height: 40px; padding: 2px; }
.logo-preview { max-height: 60px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.grid4 { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mono-box { font-family: ui-monospace, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; word-break: break-all; }
.rating-box { background: #fffbea; border: 1px solid #f0d78a; }
.match { font-size: .82rem; color: var(--muted); margin-top: .2rem; max-width: 520px; }
.match mark { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 3px; }
.canned-pick { margin-bottom: .6rem; max-width: 340px; }
.topbar nav { flex-wrap: wrap; }
.topbar nav a { white-space: nowrap; padding: .4rem .65rem; }
.who { white-space: nowrap; }

/* ===================== Design 1.4 ===================== */
h1 { font-weight: 800; letter-spacing: -.02em; font-size: 1.7rem; }
h2 { font-weight: 800; letter-spacing: -.01em; }
h3 { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); font-weight: 800; }
b, strong { font-weight: 700; }
.topbar { padding: .75rem 1.5rem; gap: 1rem; }
.topbar nav a { font-weight: 600; }
.topbar nav a.active { background: var(--primary-soft); color: var(--primary); }
.logo { border-radius: 9px; }
.card { border-radius: var(--radius); box-shadow: none; }
.btn { border-radius: 11px; font-weight: 800; padding: .6rem 1.05rem; }
.btn.small { border-radius: 9px; }
input, select, textarea { border-radius: 11px; border-width: 1.5px; font-family: inherit; font-weight: 500; }
label { font-weight: 700; color: var(--text); font-size: .88rem; }
.alert { border-radius: 12px; font-weight: 600; }
.badge { border-radius: 7px; font-weight: 700; }
.st-new { background: #e7eef9; color: #2a4c86; }
.st-open { background: var(--primary-soft); color: var(--primary); }
.st-pending { background: var(--amber-soft); color: var(--amber); }
.st-resolved { background: var(--green-soft); color: var(--green); }
.st-closed { background: #eceff2; color: #5d6873; }
.table th { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 700; background: #f7f8fa; color: var(--muted); }
.table td { padding: .8rem .9rem; }
.table tr.row-link:hover td { background: #f7f9fa; }
.subj { font-weight: 700; }
.stat { border-radius: var(--radius); }
.stat b, .kpi b { font-weight: 800; letter-spacing: -.02em; }
.tabs a.active { background: var(--primary); border-color: var(--primary); }
.msg { border-radius: 16px; border-left-width: 1px; }
.msg.client { border-left: 1px solid var(--line); }
.msg.staff { border-left: 1px solid var(--line); background: var(--primary-soft); border-color: transparent; }
.msg.internal { border: 1px dashed #e2c46d; border-left: 1px dashed #e2c46d; }
.msg .meta b { color: var(--text); }

/* Barre de suivi (même élément que dans l'application) */
.track { display: flex; align-items: center; }
.track .d { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c5ccd3; background: #fff; flex: none; }
.track .d.done { background: var(--primary); border-color: var(--primary); }
.track .d.now { border: 3px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.track .d.wait { border: 3px solid var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.track .d.ok { background: var(--green); border-color: var(--green); }
.track .b { flex: 1; height: 3px; border-radius: 2px; background: #dce1e6; margin: 0 4px; }
.track .b.done { background: var(--primary); } .track .b.ok { background: var(--green); }
.track.mini { width: 92px; }
.track.mini .d { width: 9px; height: 9px; border-width: 2px; }
.track.mini .d.now, .track.mini .d.wait { border-width: 2px; box-shadow: 0 0 0 3px var(--primary-soft); }
.track.mini .d.wait { box-shadow: 0 0 0 3px var(--amber-soft); }
.track-card { padding: 1.1rem 1.2rem; }
.track-card .track { margin: .3rem .1rem; }
.track-card .track .d { width: 16px; height: 16px; }
.track-labels { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: .35rem; }
.track-labels span { flex: 1; } .track-labels span:nth-child(2) { text-align: center; } .track-labels span:last-child { text-align: right; }
.track-labels .cur { color: var(--text); font-weight: 800; }
.track-text { font-weight: 700; font-size: .88rem; margin-top: .55rem; }
.track-text.wait { color: var(--amber); } .track-text.ok { color: var(--green); } .track-text.now { color: var(--primary); }
.state-cell { display: flex; flex-direction: column; gap: .3rem; }
.state-cell .lbl { font-size: .78rem; font-weight: 700; }
.state-cell .lbl.wait { color: var(--amber); } .state-cell .lbl.ok { color: var(--green); } .state-cell .lbl.now { color: var(--primary); }
.prio-stripe { box-shadow: inset 4px 0 0 var(--stripe, transparent); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ref { font-variant-numeric: tabular-nums; font-weight: 600; }
.ticket-head .ref { font-size: .9rem; }
/* Connexion : bandeau + formulaire */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); margin: 0; }
.auth-hero { background: var(--primary); color: #fff; padding: 3rem 3.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero .brand { color: #fff; font-size: 1.1rem; }
.auth-hero .logo { background: rgba(255,255,255,.16); }
.auth-hero h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 1rem; max-width: 14ch; }
.auth-hero p { color: rgba(255,255,255,.82); font-size: 1.05rem; max-width: 42ch; margin: 0 0 1rem; }
.auth-form { align-self: center; justify-self: center; width: 100%; max-width: 380px; padding: 2rem 1.5rem; }
.auth-form h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-form .muted.small { margin: 0 0 1.4rem; }
@media (max-width: 820px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { padding: 2rem 1.5rem 2.2rem; gap: 2rem; }
}

/* Pages publiques : formulaire de dépôt et suivi sans application (v1.5) */
body.pub { background: var(--bg); }
.pub-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem; display: flex; justify-content: center; align-items: center; min-height: 76px; }
.pub-name { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; }
.pub-main { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.pub-intro h1 { font-size: 1.7rem; letter-spacing: -.02em; margin: .4rem 0 .4rem; }
.pub-intro p { margin: 0 0 1.2rem; }
.pub-card { padding: 1.3rem 1.3rem 1.4rem; margin-bottom: 1rem; }
.pub-card.form label { display: block; margin-bottom: .9rem; }
.pub-card.form input:not([type=checkbox]):not([type=radio]), .pub-card.form select, .pub-card.form textarea { display: block; width: 100%; margin-top: .3rem; padding: .7rem .8rem; font-size: 1rem; }
.pub-card.form input[type=file] { padding: .55rem; background: #f7f8fa; }
.pub-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.pub-step { display: flex; align-items: center; gap: .55rem; font-size: 1.02rem; font-weight: 800; margin: .4rem 0 .9rem; }
.pub-step span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .85rem; }
.pub-step:not(:first-of-type) { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pub-card.form .consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; color: var(--muted); margin: 1.2rem 0; }
.pub-card.form .consent input { margin-top: .25rem; width: 18px; height: 18px; flex: none; }
.btn.big { padding: .9rem 1rem; font-size: 1.05rem; border-radius: 13px; }
.btn[disabled] { opacity: .65; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-title { font-size: 1.35rem; margin: .2rem 0 1rem; letter-spacing: -.01em; }
.pub-card .track .d { width: 16px; height: 16px; }
.pub-h2 { font-size: 1rem; font-weight: 800; margin: 1.5rem 0 .7rem; }
.pub .msg { margin-bottom: .7rem; }
.pub .msg.client { background: var(--surface); }
.pub-done { text-align: center; border: 1.5px solid color-mix(in srgb, var(--green) 30%, white); }
.pub-done h1 { font-size: 1.4rem; margin: .5rem 0; }
.pub-check { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 1.6rem; font-weight: 800; }
.pub .center { text-align: center; }
.pub .reply textarea { margin-top: 0; }
.pub .reply .reply-bar { display: flex; gap: .7rem; align-items: center; justify-content: space-between; margin-top: .7rem; flex-wrap: wrap; }
.pub .reply input[type=file] { flex: 1; min-width: 0; margin: 0 !important; display: inline-block !important; width: auto !important; }
.rate-pick { display: inline-flex; flex-direction: row-reverse; gap: .2rem; margin-bottom: .9rem; }
.rate-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pub-card.form .rate-pick label { display: inline; margin: 0; font-size: 2.1rem; line-height: 1; color: #d5dade; cursor: pointer; }
.rate-pick label:hover, .rate-pick label:hover ~ label, .rate-pick input:checked ~ label { color: #e0a31a; }
.rate-pick input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 4px; }
.pub-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 1rem 2rem; }
.badge.web { margin-left: .35rem; background: #eef0fb; color: #3d4aa0; }
@media (max-width: 560px) {
  .pub-row { grid-template-columns: 1fr; }
  .pub-intro h1 { font-size: 1.45rem; }
  .pub-card { padding: 1.1rem; }
}

/* Réclamations par e-mail (v1.6) */
.inbound-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.inbound-status.good { border-color: color-mix(in srgb, var(--green) 35%, white); }
.inbound-status.good b { color: var(--green); }
.inbound-status.bad { border-color: #f0b4b4; background: var(--err-bg); }
.inbound-status.bad b { color: var(--err-ink); }
details.help summary { cursor: pointer; }
details.help ol { margin: .8rem 0 .4rem; padding-left: 1.2rem; line-height: 1.7; }
.alert.narrow { max-width: 520px; }
.narrow.wide, .form.narrow.wide, .alert.narrow.wide { max-width: 680px; }
.imap-row { display: grid; grid-template-columns: 2fr 1.3fr .8fr; gap: 0 .8rem; } @media (max-width: 640px) { .imap-row { grid-template-columns: 1fr; } }

/* Messages vocaux (v1.7) */
.voice-msg { display: flex; flex-direction: column; gap: .3rem; min-width: 260px; }
.voice-msg span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.voice-msg audio { width: 100%; max-width: 360px; height: 40px; }
.voice { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.voice-live, .voice-ready { display: inline-flex; align-items: center; gap: .5rem; }
.voice-live[hidden], .voice-ready[hidden], .voice-rec[hidden], input[hidden] { display: none !important; }
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: #d6363f; animation: voice-blink 1s infinite; }
.voice-time { font-variant-numeric: tabular-nums; min-width: 2.6em; }
.voice-ready audio { height: 36px; max-width: 240px; }
@keyframes voice-blink { 50% { opacity: .25; } }
.reply-bar input[type=file] { flex: 0 1 auto; max-width: 260px; } .reply-bar > .btn[type=submit] { margin-left: auto; } .pub .reply .reply-bar input[type=file] { flex: 1 1 160px; }

/* Super-administrateur (v1.8) */
.topbar nav .dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: .72rem; font-weight: 800; color: #fff; margin-left: .2rem; vertical-align: 1px; }
.topbar nav .dot.err { background: #d6363f; } .topbar nav .dot.warn { background: var(--amber); }
.kpi.alert b { color: var(--err-ink); }
.kpi .delta { font-size: .78rem; font-weight: 700; margin-left: .3rem; }
.kpi .delta.up { color: var(--green); } .kpi .delta.down { color: var(--err-ink); }
.health-list { list-style: none; margin: 0; padding: 0; }
.health-list li { display: grid; grid-template-columns: 28px 1fr; gap: .2rem .6rem; padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
.health-list li:first-child { border-top: 0; }
.health-list .ico { grid-row: span 3; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; margin-top: 1px; }
.health-list .ok .ico { background: var(--green); } .health-list .warn .ico { background: var(--amber); } .health-list .err .ico { background: #d6363f; }
.health-list .t { font-weight: 800; } .health-list .d { color: var(--text); font-size: .9rem; } .health-list .f { color: var(--muted); font-size: .84rem; }
.health-list .err { background: #fff7f7; } .health-list .warn { background: #fffbf3; }
.pill { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eceff2; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); } .pill.err { background: var(--err-bg); color: var(--err-ink); } .pill.warn { background: var(--amber-soft); color: var(--amber); }
.tenant-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tenant-head img { max-height: 48px; max-width: 160px; }
.tenant-head .grow { flex: 1; }
.two-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 980px) { .two-cols { grid-template-columns: 1fr; } }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 1px dashed var(--line); padding: .15rem .45rem; border-radius: 6px; user-select: all; }
.plain-list { list-style: none; padding: 0; margin: 0; } .plain-list li { padding: .5rem 0; border-top: 1px solid var(--line); display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; } .plain-list li:first-child { border-top: 0; }
.imp-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: #7a3a06; color: #fff; padding: .6rem 1.5rem; font-size: .9rem; }
.imp-banner .btn { background: #fff; color: #7a3a06; }
.imp-banner > span { flex: 1 1 420px; } .imp-banner form { flex: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; } .row-actions form { margin: 0; }
/* Abonnements (v2.0) */
.usage { display: grid; gap: .55rem; margin: .4rem 0 1rem; }
.usage-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; font-size: .88rem; }
.usage-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #e7ebef; overflow: hidden; }
.usage-row .bar i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.usage-row .bar i.high { background: var(--amber); } .usage-row .bar i.full { background: #d6363f; }
.sub-banner { background: var(--amber-soft); color: #7a3a06; border-bottom: 1px solid #f1d9b8; padding: .55rem 1.5rem; font-weight: 600; font-size: .9rem; }
.sub-banner.err { background: var(--err-bg); color: var(--err-ink); border-color: #f3c4c4; }
.danger-zone { border-color: #f3c4c4; margin-top: 1.2rem; } .danger-zone h2 { color: var(--err-ink); }
/* Annonces (v2.2) */
.ann-banner { display: flex; align-items: center; gap: 1rem; justify-content: space-between; background: #e8f0fb; color: #23436f; border-bottom: 1px solid #cddcf2; padding: .55rem 1.5rem; font-weight: 600; font-size: .9rem; }
.ann-banner.warn { background: var(--amber-soft); color: #7a3a06; border-color: #f1d9b8; }
.ann-close { background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.ann-close:hover { opacity: 1; }
.topbar nav { flex-wrap: nowrap; overflow-x: auto; }
