/* Avis Client — design system v2 (SaaS sobre) */
:root {
  color-scheme: light;
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #F5F7F8;
  --surface: #FFFFFF;
  --surface-2: #F8FAFA;
  --ink: #0F1C1F;
  --muted: #5B6B70;
  --line: #E3E8EA;
  --line-strong: #CBD5D8;
  --brand: #0D5560;
  --on-brand: #FFFFFF;
  --soft: #E3F0F1;
  --accent: #0D5560;
  --on-accent: #FFFFFF;
  --good: #167A4D;
  --good-bg: #E2F4EA;
  --warn: #9A6200;
  --warn-bg: #FCF1D9;
  --bad: #B83A25;
  --bad-bg: #FBE4DF;
  --seq1: #C6E2E4;
  --seq2: #7FBDC3;
  --seq3: #2F8792;
  --seq4: #0D5560;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 28, 31, .05), 0 4px 16px rgba(15, 28, 31, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1416; --surface: #121F22; --surface-2: #0F1A1D; --ink: #E8F1F2; --muted: #93A9AD;
    --line: #223539; --line-strong: #2F474C; --brand: #5CC2CC; --on-brand: #04242A; --soft: #15303A;
    --accent: #5CC2CC; --on-accent: #04242A;
    --good: #4CC28A; --good-bg: #12362A; --warn: #E3B04B; --warn-bg: #3A2D0E; --bad: #F0816B; --bad-bg: #3E1D17;
    --seq1: #1F4A50; --seq2: #2F7B84; --seq3: #5CB2BA; --seq4: #A6E3E8;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1416; --surface: #121F22; --surface-2: #0F1A1D; --ink: #E8F1F2; --muted: #93A9AD;
  --line: #223539; --line-strong: #2F474C; --brand: #5CC2CC; --on-brand: #04242A; --soft: #15303A;
  --accent: #5CC2CC; --on-accent: #04242A;
  --good: #4CC28A; --good-bg: #12362A; --warn: #E3B04B; --warn-bg: #3A2D0E; --bad: #F0816B; --bad-bg: #3E1D17;
  --seq1: #1F4A50; --seq2: #2F7B84; --seq3: #5CB2BA; --seq4: #A6E3E8;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
[hidden]:not([hidden="until-found" i]) { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
.num { font-variant-numeric: tabular-nums; }
.app { max-width: 1200px; margin: 0 auto; }

/* ── En-tête ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 650 17px var(--font-display); letter-spacing: -0.01em; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; overflow: hidden; flex: none; }
.mark.has-logo { background: var(--surface); border: 1px solid var(--line); padding: 2px; }
.mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tabs { display: flex; gap: 2px; }
.tabs a { padding: 7px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--surface); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.toplink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; padding: 7px 10px; border-radius: var(--r-sm); }
.toplink:hover { color: var(--ink); background: var(--surface); }
.user-pill { display: flex; align-items: center; gap: 10px; }
.who-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who-txt b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.who-txt small { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .who-txt { display: none; } }

/* ── Boutons ── */
.btn { border: 1px solid transparent; border-radius: 10px; padding: 11px 20px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary[disabled] { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.line { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.line:hover { background: var(--surface-2); }
.btn[disabled] { cursor: not-allowed; }
.btn.sm { padding: 7px 12px; font-size: 13.5px; border-radius: var(--r-sm); }

/* ── Formulaire client ── */
.stage { max-width: 560px; margin: 8px auto 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.pad { padding: 24px 22px 26px; }
.anim { animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wave { background: var(--brand); color: var(--on-brand); padding: 28px 24px 26px; position: relative; }
.wave svg { display: none; }
.wave .kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.wave h1 { font-size: clamp(26px, 7vw, 34px); line-height: 1.12; margin-top: 8px; }
.lead { color: var(--muted); margin: 0 0 18px; max-width: 52ch; }
.meta-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.meta-row b { color: var(--ink); }
.prog { display: flex; gap: 4px; margin-bottom: 10px; }
.prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.prog i.on { background: var(--brand); }
.qn { font-size: 13px; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.q { font-size: clamp(21px, 5.5vw, 26px); line-height: 1.2; margin-bottom: 6px; }
.hint { color: var(--muted); margin: 0 0 18px; }
.opt { width: 100%; min-height: 52px; padding: 11px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; font-weight: 500; font-size: 16px; display: flex; align-items: center; gap: 12px; transition: border-color .15s, background .15s, transform .1s; }
.opt:hover { border-color: var(--brand); background: var(--surface-2); }
.opt:active { transform: scale(.985); }
.opt[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 10px; }
.chips .opt { justify-content: center; padding: 10px 6px; font-weight: 650; font-size: 17px; }
.list { display: grid; gap: 8px; }
.cat { font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.cat:first-of-type { margin-top: 0; }
.dishes { display: flex; flex-wrap: wrap; gap: 8px; }
.dishes .opt { width: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 999px; }
.faces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.faces .opt { flex-direction: column; justify-content: center; text-align: center; min-height: 110px; padding: 14px 8px; gap: 8px; }
.faces svg { width: 44px; height: 44px; }
.rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rate .opt { justify-content: center; min-height: 64px; padding: 0; font-weight: 650; font-size: 22px; }
.ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; }
.thanks { text-align: center; padding: 40px 24px 36px; }
.thanks .ok { width: 72px; height: 72px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; margin: 0 auto 18px; }
.thanks h2 { font-size: 28px; margin-bottom: 8px; }
.thanks p { color: var(--muted); margin: 0 auto 22px; max-width: 36ch; }
.kinds { display: grid; gap: 12px; margin-top: 4px; }
.kind { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, transform .1s, box-shadow .15s; }
.kind:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.kind:active { transform: scale(.985); }
.kind .ic { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.kind .tx { display: block; min-width: 0; }
.kind .tx b { display: block; font: 650 17px var(--font-display); color: var(--ink); }
.kind .tx span { color: var(--muted); font-size: 14px; font-weight: 400; }
.company-info { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.company-info p { margin: 0; }
.company-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.company-links a { color: var(--brand); font-weight: 600; text-decoration: none; }
.company-links a:hover { text-decoration: underline; }

/* ── Champs ── */
textarea, .inp { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 128px; resize: vertical; }
select.inp { min-height: 52px; font-weight: 500; }
textarea.sm { min-height: 96px; }
textarea:focus, .inp:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--soft); }
.count { text-align: right; color: var(--muted); font-size: 12px; margin-top: 4px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0; }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); flex: none; }
.priv { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; margin-top: 10px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.sfield { display: grid; gap: 6px; }
.sfield label { font-size: 13px; font-weight: 600; }
.sfield small { color: var(--muted); font-size: 12px; }
.sblock { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; background: var(--surface-2); }
.sblock .r { display: flex; gap: 10px; align-items: center; justify-content: space-between; }

/* ── Segments, pastilles, avatars ── */
.seg { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 8px 10px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15,28,31,.06); }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
.seg.sm button { padding: 5px 10px; font-size: 13px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font: 650 12px var(--font-display); flex: none; }
.av.sm { width: 30px; height: 30px; font-size: 11px; }
.opt[aria-checked="true"] .av { background: var(--on-brand); color: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--brand); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }

/* ── Espace direction : coque applicative ── */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
.side { position: sticky; top: 16px; display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: transparent; border-radius: 10px; font-weight: 550; font-size: 14.5px; color: var(--muted); text-align: left; position: relative; }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.nav-item[aria-current="page"] svg { color: var(--brand); }
.nav-item .badge { margin-left: auto; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.content { min-width: 0; }
@media (max-width: 880px) {
  .shell { display: block; }
  .content { padding-bottom: 84px; }
  .side { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; top: auto; display: flex; justify-content: space-around; gap: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 16px rgba(15,28,31,.06); }
  .nav-item { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11.5px; text-align: center; flex: 1; justify-content: center; }
  .nav-item[aria-current="page"] { background: transparent; box-shadow: none; color: var(--brand); }
  .nav-item .badge { position: absolute; top: 0; left: 55%; margin: 0; height: 17px; min-width: 17px; font-size: 10.5px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

.dash { display: grid; gap: 16px; }
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.dhead h1 { font-size: clamp(24px, 4vw, 30px); }
.dtools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dtools .seg { margin: 0; }
.dash > .seg { width: fit-content; max-width: 100% !important; margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; box-shadow: 0 1px 2px rgba(15,28,31,.03); }
.panel h2 { font-size: 16px; margin-bottom: 2px; }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.banner { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-md); padding: 11px 16px; font-size: 14px; font-weight: 500; }
.sec-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; gap: 18px; } }
.big { font: 700 clamp(50px, 11vw, 68px)/1 var(--font-display); letter-spacing: -0.035em; }
.big small { font-size: .36em; color: var(--muted); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.delta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.dist { display: flex; gap: 2px; height: 26px; border-radius: 8px; overflow: hidden; background: var(--line); }
.dist span { display: block; min-width: 2px; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 14px; margin-top: 12px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.tile .l { color: var(--muted); font-size: 13px; font-weight: 500; }
.tile .v { font: 650 28px/1.15 var(--font-display); letter-spacing: -0.02em; margin-top: 4px; }
.tile .v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.tile .g { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.rows { display: grid; gap: 2px; }
.rowl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.rowl:first-child { border-top: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .nm { display: flex; flex-direction: column; min-width: 0; font-weight: 600; line-height: 1.25; }
.who .nm span { overflow-wrap: anywhere; }
.who small { font-weight: 400; color: var(--muted); font-size: 12px; }
.meter .t { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.meter .t b { color: var(--ink); font-size: 13.5px; }
.track { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
@media (max-width: 560px) { .rowl { grid-template-columns: 1fr 1fr; } .rowl .who { grid-column: 1/-1; } }
.dishrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.dishrow:first-child { border-top: 0; }
.dishrow .nm { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.dishrow .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.chartwrap { position: relative; }
.chartwrap svg { display: block; width: 100%; height: auto; }
.tip { position: absolute; top: 0; transform: translate(-50%, -110%); background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: var(--r-sm); font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 2; }

/* ── Avis à traiter ── */
.afilter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.afilter .seg { margin: 0; }
.afilter .inp { flex: 1; min-width: 180px; padding: 7px 12px; font-size: 14px; min-height: 0; border-radius: 10px; }
.alert { border-top: 1px solid var(--line); padding: 14px 0; }
.alert:first-child { border-top: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.alert .m { color: var(--muted); font-size: 13px; }
.alert q { display: block; margin-top: 6px; font-style: normal; quotes: none; overflow-wrap: anywhere; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.contact { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 8px; align-items: center; }
.contact b { font-weight: 600; }
.contact span { overflow-wrap: anywhere; }
.mini { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mini:hover { color: var(--ink); border-color: var(--brand); }
.stat { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.stat button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stat button:hover { color: var(--ink); }
.stat button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.stat .inp { flex: 1; min-width: 150px; padding: 6px 12px; font-size: 14px; min-height: 0; border-radius: 999px; }
.empty { color: var(--muted); padding: 14px 0; }
.panel.empty { text-align: center; padding: 36px 20px; }
.more { margin-top: 10px; }
.locked { text-align: center; padding: 48px 24px; }

/* ── Chargement (squelettes) ── */
.skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 25%, var(--surface-2) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; margin-bottom: 10px; }
.skel.lg { height: 28px; width: 45%; margin-bottom: 0; }
.skel.block { height: 150px; border-radius: var(--r-md); margin: 14px 0 0; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); z-index: 50; max-width: calc(100vw - 32px); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Authentification & administration ── */
.auth-stage { max-width: 540px; margin: 18px auto 0; }
.auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.auth-head h1 { font-size: clamp(22px, 5vw, 28px); margin-top: 4px; }
.auth-badge { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--soft); color: var(--brand); display: grid; place-items: center; flex: none; font-weight: 700; }
.auth-banner { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; }
.auth-banner.good { background: var(--good-bg); border-color: transparent; color: var(--good); font-weight: 500; }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.pw-rules li.ok { color: var(--good); font-weight: 600; }
.otp-input { text-align: center; letter-spacing: .3em; font-size: 24px; font-weight: 700; }
.totp-box { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.admin-row:first-child { border-top: 0; }
select.inp.role-sel { min-height: 36px; padding: 5px 12px; font-size: 13.5px; width: auto; }
.audit-list { display: grid; gap: 8px; }
.audit-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); display: grid; gap: 4px; }
.audit-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-body { font-size: 13.5px; overflow-wrap: anywhere; }

/* ── Personnalisation (logo, couleur) ── */
.logo-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-preview { width: 58px; height: 58px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-swatch { width: 46px; height: 46px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; flex: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch-btn { width: 28px; height: 28px; border-radius: 999px; border: 2px solid transparent; padding: 0; box-shadow: 0 0 0 1px var(--line-strong); }
.swatch-btn[aria-pressed="true"] { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }
