/* QR Studio — feuille de styles */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --ink: #15171a;
  --ink-2: #4a4f57;
  --ink-3: #868b93;
  --line: #e7e5e0;
  --line-2: #d9d6cf;
  --accent: #4338ca;
  --accent-soft: #eef0ff;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fff7e8;
  --bad: #b91c1c;
  --bad-soft: #fef1f1;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(21, 23, 26, .04), 0 2px 8px rgba(21, 23, 26, .04);
  --shadow-lg: 0 1px 2px rgba(21, 23, 26, .05), 0 12px 32px -8px rgba(21, 23, 26, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 28px; font-weight: 650; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); }
p { margin: 0; }
a { color: inherit; }
code { font: 500 12.5px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(245, 244, 241, .85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; display: inline-block; background: url("favicon.svg") center / contain no-repeat; }
.brand-mark.big { width: 48px; height: 48px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(21, 23, 26, .05); color: var(--ink); }
.nav a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav-out { margin-left: 6px; }

/* ---------- Mise en page ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; font-weight: 500; text-decoration: none; margin: 0 0 8px -4px; }
.back:hover { color: var(--ink); }
.back .ico { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
.grid-3 .card + .card { margin-top: 0; }
.stack { display: grid; gap: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: 550 14px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn-primary:hover { background: #000; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #f2c9c9; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-block { width: 100%; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.field > span { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.field.compact { gap: 4px; }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=url], select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
  font: 400 15px/1 inherit; font-family: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23868b93' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") right 12px center no-repeat; cursor: pointer; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: #b1b4ba; }
.hint { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }

.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; cursor: pointer; user-select: none; }
.switch small { color: var(--ink-3); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 34px; height: 20px; flex: none; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.indent { margin: 12px 0 0 44px; }

.range { display: grid; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
.range span { display: flex; justify-content: space-between; }
.range output { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }

/* ---------- Messages ---------- */
.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 20px; font-size: 14px; border: 1px solid; }
.flash-ok { background: var(--ok-soft); border-color: #c4ead2; color: #14532d; }
.flash-error { background: var(--bad-soft); border-color: #f5cccc; color: #7f1d1d; }
.flash-info { background: var(--accent-soft); border-color: #d9dcfb; color: #312e81; }
.warn-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: #7c3a06; font-size: 13px; line-height: 1.45; }
.warn-line .ico { width: 16px; height: 16px; margin-top: 1px; color: var(--warn); }

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: #efede8; color: var(--ink-2); vertical-align: middle; letter-spacing: 0; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; font: 500 12.5px/1 inherit; font-family: inherit; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip .ico { width: 14px; height: 14px; }
.chip.is-copied { background: var(--ok-soft); border-color: #c4ead2; color: var(--ok); }

/* ---------- Connexion ---------- */
.auth { min-height: calc(100vh - 96px); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 36px 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 24px; text-align: center; }
.auth-card > p { text-align: center; margin: 8px 0 24px; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card .btn { margin-top: 6px; height: 44px; }

/* ---------- Tableau de bord ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 2px; align-content: start; box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink-3); }
.trend { font-size: 12px; font-weight: 550; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--bad); }

.qr-list { display: grid; gap: 10px; }
.qr-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 190px auto; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px 14px 14px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.qr-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.qr-row.is-paused .qr-thumb { opacity: .4; filter: grayscale(1); }
.qr-thumb { display: block; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.qr-thumb canvas { width: 100% !important; height: 100% !important; display: block; }
.qr-thumb.lg { width: 112px; height: 112px; border-radius: 14px; flex: none; }
.qr-main { min-width: 0; display: grid; gap: 5px; justify-items: start; }
.qr-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qr-title a { font-weight: 600; font-size: 15.5px; text-decoration: none; letter-spacing: -0.01em; }
.qr-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.qr-target { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; max-width: 100%; }
.qr-target .ico { width: 14px; height: 14px; }
.qr-target span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-stats { display: flex; align-items: center; gap: 14px; }
.qr-num { display: grid; line-height: 1.15; }
.qr-num strong { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.qr-num span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.spark { width: 96px; height: 28px; flex: none; overflow: visible; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--accent-soft); stroke: none; }
.qr-actions { display: flex; gap: 6px; }
.qr-actions .btn { height: 36px; padding: 0 12px; font-size: 13.5px; }

.empty { text-align: center; padding: 64px 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty-art { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty-art .ico { width: 28px; height: 28px; }
.empty h2 { margin-bottom: 6px; }
.empty p { margin-bottom: 20px; }

/* ---------- Éditeur ---------- */
.designer { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.designer-preview { position: sticky; top: 84px; }
.step { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; flex: none; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; }
.mode-body { display: grid; gap: 4px; height: 100%; padding: 14px 14px 14px 42px; border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color .15s, box-shadow .15s, background .15s; }
.mode-body::before { content: ""; position: absolute; left: 14px; top: 16px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; transition: border .15s; }
.mode input:checked + .mode-body { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--surface-2); }
.mode input:checked + .mode-body::before { border: 5px solid var(--ink); }
.mode input:focus-visible + .mode-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode strong { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode small { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }

.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.preset { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 8px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font: 500 13px/1 inherit; font-family: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.preset i { width: 18px; height: 18px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.preset:hover { border-color: var(--ink-3); }
.preset.is-active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.sub { margin-top: 22px; }
.sub h3 { margin-bottom: 10px; }
.sub.two { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.glyphs { display: flex; flex-wrap: wrap; gap: 8px; }
.glyph { position: relative; cursor: pointer; display: grid; justify-items: center; gap: 6px; width: 80px; padding: 10px 4px 8px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); transition: border-color .15s, box-shadow .15s, background .15s; }
.glyph input { position: absolute; opacity: 0; }
.glyph svg { width: 34px; height: 34px; fill: var(--ink); color: var(--ink); }
.glyph span { font-size: 11.5px; color: var(--ink-2); font-weight: 500; text-align: center; line-height: 1.2; }
.glyph:hover { border-color: var(--ink-3); }
.glyph:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--surface-2); }
.glyph:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; transition: border-color .15s; }
.color:hover { border-color: var(--ink-3); }
.color input[type=color] { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; padding: 0; border: none; border-radius: 9px; background: none; cursor: pointer; flex: none; }
.color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color input[type=color]::-webkit-color-swatch { border: none; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.color input[type=color]::-moz-color-swatch { border: none; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.color span { display: grid; gap: 2px; }
.color strong { font-size: 13px; font-weight: 550; }
.color code { color: var(--ink-3); font-size: 12px; }
.color-grid .field.compact > span { font-size: 12px; }
.color-grid .field.compact { align-content: center; }

.logo-zone { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 18px; transition: border-color .15s, background .15s; }
.logo-zone.is-drop { border-color: var(--accent); background: var(--accent-soft); }
.logo-empty { display: grid; justify-items: center; gap: 8px; text-align: center; }
.logo-filled { display: flex; align-items: center; gap: 16px; }
.logo-filled img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: repeating-conic-gradient(#f1efea 0% 25%, #fff 0% 50%) 50% / 12px 12px; border: 1px solid var(--line); padding: 6px; }
.logo-btns { display: flex; gap: 8px; }

.details summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 1.75px solid var(--ink-3); border-bottom: 1.75px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.details[open] summary { margin-bottom: 4px; }
.details[open] summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.details .field { margin-top: 18px; }

.danger { border-color: #f1dede; }
.danger-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.danger-row:first-of-type { border-top: 0; padding-top: 0; }
.danger-row div { display: grid; gap: 2px; }
.danger-row strong { font-size: 14px; }
.danger-row small { font-size: 12.5px; color: var(--ink-3); }

.preview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-lg); }
.preview-stage { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% 40%, #fdfcfa, #efede8); border: 1px solid var(--line); }
.preview-stage.is-transparent { background: repeating-conic-gradient(#ebe8e2 0% 25%, #fbfaf8 0% 50%) 50% / 18px 18px; }
#preview { width: 100%; aspect-ratio: 1; filter: drop-shadow(0 6px 18px rgba(21, 23, 26, .12)); }
#preview canvas { width: 100% !important; height: 100% !important; display: block; border-radius: 4px; }
.read-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; font-weight: 550; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.read-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.read-status[data-state=pending] .dot { animation: pulse 1s infinite ease-in-out; }
.read-status[data-state=ok] { background: var(--ok-soft); color: #14532d; }
.read-status[data-state=ok] .dot { background: var(--ok); box-shadow: 0 0 0 3px #c9efd7; }
.read-status[data-state=warn] { background: var(--warn-soft); color: #7c3a06; }
.read-status[data-state=warn] .dot { background: var(--warn); }
.read-status[data-state=bad] { background: var(--bad-soft); color: #7f1d1d; }
.read-status[data-state=bad] .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.preview-card .warn-line { margin-top: 8px; }
.preview-url { display: grid; gap: 4px; margin: 14px 2px 16px; font-size: 12px; }
.preview-url code { color: var(--ink); word-break: break-all; font-size: 12.5px; }
.save-row .btn { height: 46px; font-size: 15px; }
.dl { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.dl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dl-head select { width: auto; height: 32px; font-size: 13px; border-radius: 8px; }
.dl-btns { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }
.dl-btns .btn { height: 38px; padding: 0 8px; font-size: 13px; gap: 6px; }
.dl-btns .ico { width: 16px; height: 16px; }
.dl .hint { margin-top: 10px; }

/* ---------- Statistiques ---------- */
.stats-hero { display: flex; gap: 24px; align-items: center; margin-bottom: 20px; }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin: 0; flex: 1; min-width: 0; }
.meta div { min-width: 0; }
.meta dt { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 3px; }
.meta dd { margin: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta dd a { text-decoration: none; }
.meta dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
.period { display: inline-flex; gap: 2px; padding: 3px; background: #ebe9e4; border-radius: 10px; margin-bottom: 16px; }
.period a { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 550; text-decoration: none; color: var(--ink-2); }
.period a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid.base { stroke: var(--line-2); }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); }
.chart .hit { fill: transparent; }
.chart .bar-g:hover .hit { fill: rgba(67, 56, 202, .05); }
.chart .bar-g:hover .bar { fill: #3730a3; }
.split { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.split-head { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.split-val { font-variant-numeric: tabular-nums; }
.split-val em { font-style: normal; color: var(--ink-3); margin-left: 6px; font-size: 12.5px; }
.split-track { height: 6px; border-radius: 6px; background: #f0eee9; overflow: hidden; }
.split-fill { height: 100%; border-radius: 6px; background: var(--accent); }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; height: 120px; }
.hour { display: grid; grid-template-rows: 1fr 16px; gap: 6px; }
.hour-bar { align-self: end; background: var(--accent); border-radius: 3px 3px 1px 1px; opacity: .9; }
.hour span { font-size: 10.5px; color: var(--ink-3); text-align: center; }
.privacy { margin-top: 20px; text-align: center; }

/* ---------- Compte ---------- */
.users { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 4px; }
.users li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.users li > div { flex: 1; display: grid; }
.users small { color: var(--ink-3); font-size: 12.5px; }
.users strong { font-size: 14px; display: flex; gap: 8px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.sub-title { margin-bottom: 12px; font-size: 13px; }

/* ---------- Page publique (QR inactif) ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.notice-card { max-width: 380px; text-align: center; background: var(--surface); padding: 40px 32px; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.notice-card h1 { font-size: 21px; margin: 18px 0 8px; }
.notice-card p { color: var(--ink-2); }

/* ---------- Écrans moyens et mobiles ---------- */
@media (max-width: 1020px) {
  .designer { grid-template-columns: 1fr; }
  .designer-preview { position: static; order: -1; }
  .preview-card { max-width: 440px; margin: 0 auto; }
  .qr-row { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .qr-stats { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 20px 16px 48px; }
  .topbar-in { padding: 0 16px; }
  .nav a span { display: none; }
  .nav a { padding: 8px 10px; }
  h1 { font-size: 23px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 23px; }
  .qr-row { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .qr-thumb { width: 56px; height: 56px; }
  .qr-actions { grid-column: 1 / -1; }
  .qr-actions .btn { flex: 1; }
  .modes, .grid-2, .row-2, .color-grid, .sub.two { grid-template-columns: 1fr; }
  .glyph { width: calc(33.333% - 6px); }
  .stats-hero { flex-direction: column; align-items: flex-start; }
  .meta { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .indent { margin-left: 0; }
  .hours span { font-size: 9px; }
}
