/* LDK Atelier : système de design du prototype. Police Geist (OFL, fichier local). */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-bright: #14b8a6;
  --brand-soft: #e6f6f4;
  --brand-line: #a7e3dc;
  --accent: #f59e0b;

  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-2: #edf1f5;

  --ok: #047857;
  --ok-soft: #e8f7f0;
  --warn: #b45309;
  --warn-soft: #fef6e7;
  --danger: #c81e1e;
  --danger-soft: #fdeeee;
  --info: #1d4ed8;
  --info-soft: #ecf2ff;
  --violet: #6d28d9;
  --violet-soft: #f3edff;

  --side-bg: #0b1220;
  --side-bg-2: #131c2e;
  --side-ink: #cbd5e1;
  --side-muted: #7c889c;
  --side-active: rgba(20, 184, 166, 0.14);

  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --shadow-s: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-l: 0 20px 60px rgba(15, 23, 42, 0.22);
  --focus: 0 0 0 3px rgba(20, 184, 166, 0.35);

  --side-w: 252px;
  --top-h: 60px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-bright: #2dd4bf;
  --brand-soft: rgba(45, 212, 191, 0.12);
  --brand-line: rgba(45, 212, 191, 0.35);
  --bg: #0a0f1a;
  --surface: #111827;
  --surface-2: #0f1624;
  --surface-3: #1a2333;
  --ink: #e5e9f0;
  --ink-2: #c3cad6;
  --muted: #8f9bb0;
  --faint: #64708a;
  --line: #233044;
  --line-2: #1b2638;
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --info: #93b4ff;
  --info-soft: rgba(147, 180, 255, 0.12);
  --violet: #c4b5fd;
  --violet-soft: rgba(196, 181, 253, 0.12);
  --side-bg: #070b14;
  --side-bg-2: #0f1626;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-l: 0 20px 60px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 18px; font-weight: 620; }
h3 { font-size: 15.5px; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; letter-spacing: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------- Mise en page ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 14px 12px 12px;
  scrollbar-width: thin; scrollbar-color: #253047 transparent;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: #fff; }
.side-brand:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, #14b8a6, #0f766e); color: #fff; flex: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.logo-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
/* Logo LDK Atelier (casque et clé, argent) : sans pastille, légère ombre pour le détacher du fond sombre. */
.logo-mark.logo-ldk { width: 36px; height: 36px; background: none; box-shadow: none; border-radius: 0; }
.logo-mark.logo-ldk img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.side-atelier {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--side-bg-2); border: 1px solid #1d2840; color: #e2e8f0;
  border-radius: 10px; padding: 8px 10px; margin-bottom: 14px; cursor: default;
}
.side-atelier .av { width: 28px; height: 28px; border-radius: 7px; background: #1f2a40; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #5eead4; flex: none; }
.side-atelier .t { font-size: 13px; font-weight: 600; line-height: 1.2; }
.side-atelier .s { font-size: 11.5px; color: var(--side-muted); }
.nav-group { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--side-muted); padding: 14px 10px 6px; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
  color: var(--side-ink); font-size: 14px; font-weight: 500; margin: 1px 0; position: relative;
}
.nav-link svg { color: #8b97ab; flex: none; }
.nav-link:hover { background: rgba(255,255,255,0.05); text-decoration: none; color: #fff; }
.nav-link.active { background: var(--side-active); color: #fff; }
.nav-link.active svg { color: #2dd4bf; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #2dd4bf; }
.nav-link .count { margin-left: auto; font-size: 11.5px; font-weight: 600; background: #1f2a40; color: #cbd5e1; border-radius: 999px; padding: 1px 8px; min-width: 22px; text-align: center; }
.nav-link .count.hot { background: #b91c1c; color: #fff; }
.nav-link .soon { margin-left: auto; font-size: 10px; color: var(--side-muted); border: 1px solid #253047; border-radius: 999px; padding: 0 6px; }
.side-foot { margin-top: auto; padding-top: 14px; }
.trial-card { background: linear-gradient(160deg, #13253a, #0f1a2b); border: 1px solid #1f3350; border-radius: 12px; padding: 12px; font-size: 12.5px; color: #cbd5e1; }
.trial-card b { color: #fff; }
.trial-bar { height: 5px; background: #1f2a40; border-radius: 99px; margin: 8px 0 2px; overflow: hidden; }
.trial-bar span { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #5eead4); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.top-title { font-size: 16px; font-weight: 620; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; max-width: 45%; }
.top-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(360px, 30vw); min-width: 44px; flex: 0 1 auto;
  height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; font-size: 13.5px;
}
.top-search:hover { border-color: #cbd5e1; }
.top-search kbd { margin-left: auto; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.content { padding: 24px 28px 48px; width: 100%; max-width: 1440px; margin: 0 auto; }
.content.narrow { max-width: 980px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 550; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
  text-decoration: none !important; user-select: none;
}
.btn:hover { background: var(--surface-3); border-color: #cbd5e1; }
.btn svg { flex: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(15,118,110,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
:root[data-theme="dark"] .btn.primary { color: #042f2e; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-ghost { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); }
:root[data-theme="dark"] .btn.soft { color: var(--brand); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

kbd {
  font-family: inherit; font-size: 11px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--surface-2);
}

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--danger); margin-left: 2px; }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-size: 14px; transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:hover, .select:hover, .textarea:hover { border-color: #cbd5e1; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-bright); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.sm, .select.sm { height: 32px; font-size: 13px; border-radius: 8px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 34px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sep { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* Puces sélectionnables (types d'appareils, accessoires, défauts…) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink-2);
  transition: all .12s;
}
.chip:hover { border-color: #cbd5e1; background: var(--surface-2); }
.chip.on, .chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-strong); }
:root[data-theme="dark"] .chip.on, :root[data-theme="dark"] .chip[aria-pressed="true"] { color: var(--brand); }
.chip.dashed { border-style: dashed; color: var(--muted); }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-s); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.card-body { padding: 18px 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 650; margin-bottom: 10px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.back-link:hover { color: var(--ink); text-decoration: none; }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px 18px; position: relative; overflow: hidden; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 26px; font-weight: 680; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.tint-brand { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.stat.tint-ok { background: linear-gradient(160deg, var(--ok-soft), var(--surface) 70%); }
.stat.tint-warn { background: linear-gradient(160deg, var(--warn-soft), var(--surface) 70%); }
.stat.tint-info { background: linear-gradient(160deg, var(--info-soft), var(--surface) 70%); }
.stat.tint-violet { background: linear-gradient(160deg, var(--violet-soft), var(--surface) 70%); }
.stat.clickable { cursor: pointer; transition: border-color .12s, transform .12s; }
.stat.clickable:hover { border-color: #cbd5e1; transform: translateY(-1px); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
:root[data-theme="dark"] .badge.brand { color: var(--brand); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.outline { background: transparent; border: 1px solid var(--line); }
.badge-statut { border: 1px solid transparent; }

/* Avatars */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; flex: none; letter-spacing: 0.02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.table th:first-child { border-top-left-radius: var(--radius-l); }
.table th:last-child { border-top-right-radius: var(--radius-l); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.table .t-main { font-weight: 600; }
.table .t-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Onglets et segments ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-weight: 550; font-size: 13.5px;
  color: var(--muted); border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--brand-strong); border-bottom-color: var(--brand); }
:root[data-theme="dark"] .tab.on { color: var(--brand); }
.tab .n { font-size: 11px; background: var(--surface-3); border-radius: 99px; padding: 0 7px; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 8px; cursor: pointer; font-weight: 550; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }

/* Barre de filtres */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input-icon { flex: 1; min-width: 220px; max-width: 420px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fpill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 550; color: var(--ink-2); transition: all .12s;
}
.fpill:hover { border-color: #cbd5e1; }
.fpill .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.fpill.on { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.fpill .sw { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-l); display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-height: 160px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; font-weight: 620; font-size: 13.5px; }
.kcol-head .n { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; }
.kcol-bar { height: 3px; border-radius: 99px; margin: 0 14px 8px; }
.kcol-body { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kcol.drop { outline: 2px dashed var(--brand-bright); outline-offset: -4px; background: var(--brand-soft); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow-s); transition: box-shadow .12s, transform .12s, border-color .12s; }
.kcard:hover { box-shadow: var(--shadow); border-color: #cbd5e1; }
.kcard.dragging { opacity: .5; transform: rotate(1deg); }
.kcard .top { display: flex; align-items: center; gap: 6px; }
.kcard .num { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); }
.kcard .dev { font-weight: 620; margin-top: 6px; line-height: 1.25; }
.kcard .cli { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kcard .pb { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .bot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.kcard .price { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }
.kcard.late { border-left: 3px solid var(--danger); }
.kcard.prio-haute { border-left: 3px solid var(--warn); }
.kempty { text-align: center; color: var(--faint); font-size: 12.5px; padding: 18px 0; }

/* ---------- Étapes (assistant) et frise de statuts ---------- */
.stepper { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.step { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--faint); font-size: 14px; white-space: nowrap; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; border: 1.5px solid var(--line); background: var(--surface); }
.step.on { color: var(--ink); }
.step.on .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.done { color: var(--ok); }
.step.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--line); border-radius: 99px; min-width: 20px; }
.step-line.done { background: var(--ok); }

.flow { display: flex; align-items: flex-start; overflow-x: auto; padding: 6px 2px 2px; }
.flow-item { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; cursor: pointer; border: 0; background: none; padding: 0 4px; }
.flow-item::before { content: ""; position: absolute; top: 17px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: var(--line); }
.flow-item:first-child::before { display: none; }
.flow-item.done::before, .flow-item.on::before { background: var(--brand-bright); }
.flow-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; border: 2px solid var(--line); background: var(--surface); position: relative; z-index: 1; transition: transform .12s; }
.flow-item:hover .flow-dot { transform: scale(1.06); }
.flow-item.done .flow-dot { background: var(--brand-soft); border-color: var(--brand-bright); }
.flow-item.on .flow-dot { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-soft); }
.flow-label { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.flow-item.on .flow-label { color: var(--ink); }
.flow-date { font-size: 11px; color: var(--faint); }

/* Chronologie (historique) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--surface); background: var(--brand-bright); box-shadow: 0 0 0 1px var(--line); }
.timeline .tt { font-size: 13.5px; font-weight: 550; }
.timeline .ts { font-size: 12px; color: var(--muted); }

/* ---------- Bandeaux ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.banner svg { flex: none; margin-top: 1px; }
.banner.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); color: var(--info); }
.banner.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }
.banner.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.banner .grow { color: var(--ink-2); }
.banner b { color: var(--ink); }

/* État vide */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ei { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-soft); color: var(--brand); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 16px; }

/* ---------- Fenêtres modales ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-l); animation: pop .18s cubic-bezier(.2,.9,.3,1.2); display: flex; flex-direction: column; max-height: 88vh; }
.modal.lg { max-width: 820px; }
.modal.xl { max-width: 1080px; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head .mi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.modal-head h2 { font-size: 17px; }
.modal-head .ms { font-size: 13px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Menu déroulant */
.dropdown { position: fixed; z-index: 120; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-l); padding: 6px; animation: pop .12s ease; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 13.5px; color: var(--ink); text-decoration: none !important; }
.dd-item:hover, .dd-item.active { background: var(--surface-3); }
.dd-item svg { color: var(--muted); flex: none; }
.dd-item.danger { color: var(--danger); }
.dd-item.danger svg { color: var(--danger); }
.dd-sep { height: 1px; background: var(--line-2); margin: 6px 4px; }
.dd-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 6px 10px 4px; font-weight: 650; }

/* Notifications éphémères */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-l); font-size: 13.5px; font-weight: 550; max-width: 420px; animation: pop .2s ease; }
.toast.ok svg { color: #34d399; }
.toast.erreur { background: #7f1d1d; color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .2s; }

/* Palette de recherche (Ctrl K) */
.palette { max-width: 640px; }
.palette .pin { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette .pin input { border: 0; outline: none; background: none; font-size: 16px; flex: 1; }
.palette .pin input:focus-visible { box-shadow: none; }
.palette .pres { max-height: 420px; overflow-y: auto; padding: 8px; }
.pgroup { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 10px 10px 4px; font-weight: 650; }
.pitem { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.pitem.active { background: var(--brand-soft); }
.pitem .pi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.pitem .pt { font-weight: 560; font-size: 14px; }
.pitem .ps { font-size: 12.5px; color: var(--muted); }
.pitem mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; }

/* Signature */
.sig-pad { width: 100%; height: 220px; border: 1.5px dashed var(--line); border-radius: 14px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-img { max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }

/* Lignes de prestations */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; text-align: left; padding: 6px 6px; }
.lines td { padding: 4px 6px; vertical-align: middle; }
.lines .input { height: 34px; }
.lines .c-qte { width: 70px; }
.lines .c-pu { width: 120px; }
.lines .c-rem { width: 84px; }
.lines .c-tot { width: 110px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.lines .c-act { width: 40px; }
.lines tr.readonly td { padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
.totals { margin-left: auto; width: min(320px, 100%); display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.totals .grand { font-size: 18px; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--line); }
.totals .grand + .grand { border: 0; }

/* Pages d'authentification */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--surface); }
.auth-side { background: radial-gradient(1200px 600px at -10% -10%, #134e4a 0%, transparent 60%), radial-gradient(800px 500px at 120% 120%, #1e3a5f 0%, transparent 60%), #0b1220; color: #e2e8f0; padding: 44px 52px; display: flex; flex-direction: column; gap: 28px; }
.auth-side h1 { font-size: 38px; line-height: 1.08; letter-spacing: -0.03em; color: #fff; font-weight: 700; }
.auth-side h1 em { font-style: normal; background: linear-gradient(90deg, #5eead4, #fcd34d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side .lead { color: #aab6c8; font-size: 16px; max-width: 460px; }
.auth-feats { display: grid; gap: 14px; margin-top: 6px; }
.auth-feat { display: flex; gap: 12px; align-items: flex-start; }
.auth-feat .fi { width: 34px; height: 34px; border-radius: 10px; background: rgba(45, 212, 191, .12); color: #5eead4; display: grid; place-items: center; flex: none; }
.auth-feat b { color: #fff; display: block; font-weight: 600; }
.auth-feat span { color: #94a3b8; font-size: 13.5px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box h2 { font-size: 26px; letter-spacing: -0.02em; }
.auth-box .sub { color: var(--muted); margin: 6px 0 24px; }
.auth-switch { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; gap: 10px; }
.pw-meter { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #94a3b8; font-size: 13px; margin-top: auto; }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.trust svg { color: #34d399; }

/* Divers */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand-bright); border-radius: 99px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--top-h) + 18px); display: flex; flex-direction: column; gap: 14px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--line); }
.stars button.on { color: var(--accent); }
.pattern-grid { display: grid; grid-template-columns: repeat(3, 34px); gap: 10px; }
.pattern-grid button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; }
.pattern-grid button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--line-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bar-chart .b { flex: 1; background: var(--brand-soft); border-radius: 5px 5px 2px 2px; position: relative; min-height: 2px; transition: background .12s; }
.bar-chart .b.today { background: var(--brand-bright); }
.bar-chart .b:hover { background: var(--brand); }

/* Écran plein (caisse) : sans menu ni barre du haut */
body.plein-ecran .shell { grid-template-columns: minmax(0, 1fr); }
body.plein-ecran .sidebar, body.plein-ecran .topbar, body.plein-ecran .scrim { display: none; }
body.plein-ecran .content { max-width: none; padding: 0; }

/* ---------- Mobile ---------- */
.scrim { display: none; }
@media (max-width: 1100px) {
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 90; transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-l); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.45); }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .menu-btn { display: inline-flex; }
  .top-title { flex: 0 1 auto; min-width: 0; max-width: none; }
  .top-actions { flex: none; }
  .top-search { width: auto; margin-left: auto; }
  .top-search span, .top-search kbd { display: none; }
  .hide-m { display: none !important; }
  .content { padding: 16px 16px 40px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 22px; gap: 18px; }
  .auth-side h1 { font-size: 28px; }
  .auth-feats, .trust { display: none; }
  .kv { grid-template-columns: 110px 1fr; }
  .modal { max-height: 92vh; border-radius: 18px; }
  .overlay { padding: 3vh 8px 8px; }
  .stepper .step span.l { display: none; }
  .table .hide-m { display: none; }
  .kanban { grid-auto-columns: 84%; }
}

/* ---------- Impression (le document s'imprime dans un cadre dédié, voir impression.js) ---------- */
@media print {
  .sidebar, .topbar, .toasts, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

/* ---------- Site internet (éditeur #/site) et demandes en ligne (#/demandes) ---------- */
.se { display: flex; flex-direction: column; gap: 14px; }
.se-barre { position: sticky; top: calc(var(--top-h) + 8px); z-index: 20; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 14px; box-shadow: var(--shadow); }
.se-etat { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 260px; }
.se-etat-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-statut { height: 26px; padding: 0 11px; font-size: 13px; }
.se-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.se-actions kbd { margin-left: 4px; }
.se-sale { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.se-sale.on { color: var(--warn); font-weight: 600; }
.se-bascule { display: none; align-self: flex-start; }
.se-grille { display: grid; grid-template-columns: minmax(360px, 480px) minmax(0, 1fr); gap: 16px; align-items: start; }
.se-panneau { min-width: 0; }
.se-onglets { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line-2); }
.se-onglet { border: 1px solid transparent; background: none; border-radius: 9px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; color: var(--muted); cursor: pointer; }
.se-onglet:hover { background: var(--surface-3); color: var(--ink); }
.se-onglet.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.se-zone { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.se-sec-tete { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; }
.se-zone > .se-sec-tete:first-child { margin-top: 0; }
.se-sec-tete h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.se-sec-tete p { margin-top: 2px; }
.se-faux { color: var(--danger) !important; }
.se-bon { color: var(--ok) !important; }
.se-faux-champ { border-color: var(--danger) !important; }
.se-compte { align-self: flex-end; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -2px; }
.se-compte.trop { color: var(--warn); font-weight: 600; }
.se-kv { grid-template-columns: 110px minmax(0, 1fr); }
.se-kv dd { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* Aperçu */
.se-apercu { position: sticky; top: calc(var(--top-h) + 76px); min-width: 0; overflow: hidden; }
.se-apercu-tete { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.se-apercu-tete .select { flex: 1 1 160px; min-width: 0; max-width: 280px; }
.se-apercu-note { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border-bottom: 1px solid var(--line-2); }
.se-cadre { position: relative; height: calc(100vh - var(--top-h) - 190px); min-height: 440px; background: var(--surface-3); display: flex; justify-content: center; align-items: flex-start; overflow: hidden; }
.se-cadre[data-appareil="telephone"] { padding: 14px; }
.se-ecran { overflow: hidden; background: #fff; flex: none; box-sizing: content-box; }
.se-cadre[data-appareil="telephone"] .se-ecran { border: 8px solid #0f172a; border-radius: 30px; box-shadow: var(--shadow); }
.se-cadre iframe { display: block; border: 0; background: #fff; transform-origin: 0 0; }
.se-cadre.charge::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: se-tourne .8s linear infinite; }
@keyframes se-tourne { to { transform: rotate(360deg); } }

/* Pages */
.se-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.se-page { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.se-page.off { background: var(--surface-2); }
.se-page.off .se-page-l1 .input { color: var(--muted); }
.se-ordre { display: flex; flex-direction: column; gap: 2px; grid-row: 1 / span 2; align-self: start; }
.se-ordre .btn.icon.sm { height: 24px; }
.se-page-corps { display: contents; }
.se-page-l1 { display: flex; align-items: center; gap: 8px; grid-column: 2; grid-row: 1; min-width: 0; }
.se-page-l1 .input { flex: 1; min-width: 0; font-weight: 600; }
.se-page-l2 { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; grid-column: 2 / 4; grid-row: 2; }
.se-page-i { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.se-page-i.lg { width: 36px; height: 36px; border-radius: 11px; }
.se-slug { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.se-slug .input { width: 140px; }
.se-slug.large { display: flex; }
.se-slug.large .input { width: auto; flex: 1; }
.se-slug-fixe { padding: 4px 0; }
.se-page-act { display: flex; gap: 2px; align-items: center; grid-column: 3; grid-row: 1; }
.se-page-act .btn { white-space: nowrap; }
.se-fil { margin: -4px 0 -2px -6px; }
.se-page-tete { display: flex; align-items: center; gap: 10px; }
.se-page-champs { display: flex; flex-direction: column; gap: 10px; }
.se-info-page { margin-top: 2px; }
.se-blocs { display: flex; flex-direction: column; gap: 8px; }
.se-vide-blocs { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.se-bloc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); scroll-margin-top: calc(var(--top-h) + 96px); }
.se-bloc.ouvert { border-color: var(--brand-line); box-shadow: var(--shadow-s); }
.se-bloc.masque .se-bloc-titre { opacity: .6; }
.se-bloc-tete { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; }
.se-bloc-titre { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 6px; border-radius: 9px; cursor: pointer; color: var(--ink); }
.se-bloc-titre:hover { background: var(--surface-2); }
.se-bloc-i { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.se-bloc.ouvert .se-bloc-i { background: var(--brand-soft); color: var(--brand); }
.se-bloc-nom { display: block; font-weight: 600; font-size: 13.5px; }
.se-bloc-resume { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-bloc-act { display: flex; gap: 0; flex: none; }
.se-bloc-act .btn.icon.sm { width: 28px; }
.se-bloc-corps { border-top: 1px solid var(--line-2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.se-groupe { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.se-groupe legend { font-size: 12.5px; font-weight: 650; color: var(--ink-2); padding: 0 4px; }
.se-lien .input { margin-top: 6px; }
.se-note-bloc { display: flex; gap: 6px; align-items: flex-start; }
.se-note-bloc svg { flex: none; margin-top: 2px; }
.se-img { display: flex; align-items: center; gap: 12px; }
.se-img img, .se-img-vide { width: 96px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-3); flex: none; }
.se-img-vide { display: grid; place-items: center; color: var(--faint); }
.se-img-act { display: flex; gap: 6px; flex-wrap: wrap; }
.se-liste { display: flex; flex-direction: column; gap: 8px; }
.se-liste > .btn { align-self: flex-start; }
.se-item { border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.se-item-tete { display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line-2); }
.se-item-corps { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.se-etiquettes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.se-etiquettes .chip { gap: 4px; padding-right: 4px; }
.se-etiquettes .input { width: 180px; }
.se-x { border: 0; background: none; color: inherit; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.se-x:hover { background: rgba(0, 0, 0, .08); }
.se-icone-choix { gap: 6px; align-self: flex-start; }
.se-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.se-type { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--ink); }
.se-type:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.se-type b { display: block; font-size: 13.5px; }
.se-type span span { font-size: 12px; color: var(--muted); }
.se-type-i { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.se-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.se-icone { height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.se-icone:hover { border-color: var(--brand-line); color: var(--brand); }
.se-icone.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Médiathèque */
.se-media-depot { display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); flex-wrap: wrap; }
.se-media-depot.on { border-color: var(--brand-bright); background: var(--brand-soft); }
.se-media-di { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.se-medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.se-media { border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.se-media.on { border-color: var(--brand); }
.se-media-choix { display: block; width: 100%; padding: 0; border: 0; background: var(--surface-3); cursor: pointer; aspect-ratio: 4 / 3; }
.se-media-choix img { width: 100%; height: 100%; object-fit: cover; display: block; }
.se-media-info { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; }
.se-media-info .tiny { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Apparence : miniatures des modèles (couleurs du site public, pas de l'application) */
.se-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.se-modele { border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.se-modele:hover { border-color: var(--brand-line); }
.se-modele.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.se-modele-t { display: flex; flex-direction: column; }
.se-mini { --mf: #ffffff; --mt: #0f172a; --ml: #e2e8f0; --mc: #f1f5f9; --mr: 4px; position: relative; display: block; height: 78px; border-radius: 8px; background: var(--mf); border: 1px solid var(--ml); overflow: hidden; }
.se-mini i, .se-mini b { position: absolute; display: block; }
.se-mini .h { left: 0; right: 0; top: 0; height: 12px; border-bottom: 1px solid var(--ml); }
.se-mini .h b { top: 4px; width: 12px; height: 3px; border-radius: 2px; background: var(--mt); opacity: .5; }
.se-mini .h b:nth-child(1) { left: 6px; width: 18px; opacity: .9; }
.se-mini .h b:nth-child(2) { right: 26px; }
.se-mini .h b:nth-child(3) { right: 8px; }
.se-mini .t { left: 8px; top: 20px; width: 58%; height: 6px; border-radius: 3px; background: var(--mt); }
.se-mini .t2 { left: 8px; top: 30px; width: 40%; height: 4px; border-radius: 2px; background: var(--mt); opacity: .35; }
.se-mini .bt { left: 8px; top: 39px; width: 26px; height: 8px; border-radius: var(--mr); background: var(--acc, #0f766e); }
.se-mini .c { position: absolute; left: 8px; right: 8px; bottom: 7px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.se-mini .c i { position: static; height: 16px; border-radius: var(--mr); background: var(--mc); border: 1px solid var(--ml); }
.se-mini-nuit { --mf: #0b1220; --mt: #e5e9f0; --ml: #1f2a3d; --mc: #131c2e; }
.se-mini-chaleureux { --mf: #fbf6ee; --mt: #3b2f25; --ml: #eadfcd; --mc: #f3e9da; --mr: 6px; }
.se-mini-atelier { --mf: #eef1f4; --mt: #1f2933; --ml: #cfd6de; --mc: #ffffff; --mr: 2px; }
.se-mini-atelier .h { background: #1f2933; }
.se-mini-atelier .h b { background: #e5e9f0; }
.se-mini-minimal { --mf: #ffffff; --mt: #111111; --ml: #ececec; --mc: #ffffff; --mr: 0; }
.se-mini-minimal .t { width: 44%; height: 5px; }
.se-couleurs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.se-pastille { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.se-pastille.on { box-shadow: 0 0 0 2px var(--ink); }
.se-couleur-libre { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; cursor: pointer; background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); }
.se-couleur-libre input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.se-polices { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.se-police { border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-align: left; }
.se-police.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.se-police-aa { font-size: 24px; line-height: 1.1; font-weight: 600; }
.se-coin { width: 14px; height: 14px; border: 2px solid currentColor; border-right: 0; border-bottom: 0; display: inline-block; margin-top: 4px; }
.se-coin-arrondis { border-top-left-radius: 7px; }
.se-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.se-logo img { max-height: 54px; max-width: 180px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 4px; }

/* Infos et horaires */
.se-horaires { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.se-jour { display: grid; grid-template-columns: 76px 72px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line-2); }
.se-jour:last-child { border-bottom: 0; }
.se-jour.ferme { background: var(--surface-2); }
.se-jour.faux { background: var(--danger-soft); }
.se-jour-nom { font-weight: 600; font-size: 13.5px; }
.se-plages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.se-plage { display: inline-flex; align-items: center; gap: 4px; }
.se-plage .input { width: 92px; padding: 0 6px; }
.se-etapes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }

/* Modules, référencement, publication */
.se-module { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.se-module-tete { display: flex; align-items: center; gap: 10px; }
.se-chiffre { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.se-chiffre > b { font-size: 20px; font-variant-numeric: tabular-nums; }
.se-chiffre > span { flex: 1; min-width: 150px; font-size: 13px; color: var(--ink-2); }
.se-seos { display: flex; flex-direction: column; gap: 8px; }
.se-seo { border: 1px solid var(--line); border-radius: 12px; }
/* Référencement local : communes autour de l'atelier et points à faire pour Google */
.se-villes-tete { margin: 14px 0 6px; }
.se-villes { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.se-ville { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.se-ville:last-child { border-bottom: 0; }
.se-ville.on { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.se-ville input { flex: none; }
.se-points { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.se-point { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.se-point-i { flex: none; margin-top: 2px; color: var(--warn); }
.se-point.ok .se-point-i { color: var(--ok); }
.se-seo summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; list-style: none; border-radius: 12px; }
.se-seo summary::-webkit-details-marker { display: none; }
.se-seo summary:hover { background: var(--surface-2); }
.se-seo[open] summary { border-bottom: 1px solid var(--line-2); border-radius: 12px 12px 0 0; }
.se-seo-corps { padding: 12px; }
.se-google { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.se-g-url { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-g-titre { font-size: 16px; color: var(--info); line-height: 1.3; overflow-wrap: anywhere; }
.se-g-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.se-copie { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.se-copie .mono { flex: 1; min-width: 0; }
.se-prefixe { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.se-prefixe span { display: flex; align-items: center; padding: 0 8px 0 10px; background: var(--surface-3); color: var(--muted); font-size: 12px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.se-prefixe .input { border: 0; border-radius: 0; flex: 1; min-width: 0; }
.se-controles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.se-controles li { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 13.5px; }
.se-controles li > svg { flex: none; margin-top: 2px; }
.se-controles li.ok > svg { color: var(--ok); }
.se-controles li.ko > svg { color: var(--warn); }
.se-tuiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.se-tuiles .stat { padding: 12px 14px; }
.se-tuiles .stat .v { font-size: 22px; }

@media (max-width: 1100px) {
  .se-grille { grid-template-columns: minmax(0, 1fr); }
  .se-bascule { display: inline-flex; }
  .se[data-vue="reglages"] .se-apercu { display: none; }
  .se[data-vue="apercu"] .se-panneau { display: none; }
  .se-apercu { position: static; }
  .se-cadre { height: calc(100vh - var(--top-h) - 230px); min-height: 420px; }
}
@media (max-width: 560px) {
  .se-barre { position: static; padding: 10px; }
  .se-actions { justify-content: flex-start; }
  .se-zone { padding: 12px 12px 16px; }
  .se-onglets { padding: 8px; }
  .se-onglet span { font-size: 12.5px; }
  .se-slug .input { width: 104px; }
  .se-jour { grid-template-columns: 1fr auto auto; grid-template-areas: "n f c" "p p p"; }
  .se-jour-nom { grid-area: n; } .se-jour-ferme { grid-area: f; } .se-plages { grid-area: p; } .se-jour > .btn { grid-area: c; }
  .se-bloc-act .btn.icon.sm { width: 26px; }
  .se-kv { grid-template-columns: 96px minmax(0, 1fr); }
}

/* Demandes en ligne */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 18px; align-items: start; }
.dl-col-liste { min-width: 0; }
.dl-col-fiche { position: sticky; top: calc(var(--top-h) + 18px); min-width: 0; }
.dl-outils .select { width: auto; min-width: 170px; }
.dl-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dl-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; color: var(--ink); }
.dl-item:hover { border-color: var(--brand-line); }
.dl-item.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.dl-item.neuve .dl-nom::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-bright); margin-left: 6px; vertical-align: middle; }
.dl-item-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-l1 { display: flex; align-items: baseline; gap: 8px; }
.dl-nom { font-weight: 650; font-size: 14.5px; flex: 1; min-width: 0; }
.dl-quand { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dl-l2 { font-size: 13px; color: var(--ink-2); display: block; }
.dl-l3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.dl-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--ink-2); }
.dl-ico.lg { width: 42px; height: 42px; border-radius: 13px; }
.dl-ico.info { background: var(--info-soft); color: var(--info); }
.dl-ico.violet { background: var(--violet-soft); color: var(--violet); }
.dl-ico.brand { background: var(--brand-soft); color: var(--brand); }
.dl-ico.warn { background: var(--warn-soft); color: var(--warn); }
.dl-expire { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 550; }
.dl-expire.urgent { color: var(--warn); }
.dl-rien { display: flex; gap: 10px; align-items: center; padding: 14px 16px; color: var(--muted); font-size: 13.5px; margin-top: 12px; }
.dl-fiche-tete { align-items: flex-start; }
.dl-retour { display: none; }
.dl-fiche-corps { display: flex; flex-direction: column; gap: 16px; }
.dl-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.dl-sec .section-title { margin: 0; }
.dl-kv { grid-template-columns: 92px minmax(0, 1fr); }
.dl-contacts .btn { flex: 0 0 auto; }
.dl-texte { white-space: pre-wrap; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.dl-presta { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.dl-presta svg { flex: none; margin-top: 2px; color: var(--muted); }
.dl-article { display: flex; gap: 10px; align-items: center; }
.dl-principales .btn { flex: 1 1 auto; }
.dl-statuts { gap: 6px; }
.dl-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-notes li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.dl-notes p { white-space: pre-wrap; font-size: 13.5px; }
.dl-note-saisie { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dl-note-saisie .textarea { width: 100%; }
@media (max-width: 1100px) {
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl-col-fiche { position: static; }
  .dl[data-sel="1"] .dl-col-liste { display: none; }
  .dl[data-sel="0"] .dl-col-fiche { display: none; }
  .dl-retour { display: inline-flex; }
}
@media (max-width: 560px) {
  .dl-item { padding: 10px 12px; gap: 10px; }
  .dl-outils .select { flex: 1 1 100%; }
  .dl-principales .btn, .dl-contacts .btn { flex: 1 1 auto; }
}

/* ---------- Plusieurs boutiques (sélecteur) et marque blanche (marque.js, reseau-commun.js) ---------- */
.top-boutique {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 9px; min-width: 0; max-width: 260px;
  border-radius: 10px; border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-strong);
  cursor: pointer; font-size: 13px; flex: 0 1 auto;
}
:root[data-theme="dark"] .top-boutique { color: var(--brand); }
.top-boutique:hover { border-color: var(--brand-bright); }
.top-boutique svg { flex: none; }
.top-boutique .tb-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.12; text-align: left; }
.top-boutique .tb-nom { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-boutique .tb-ville { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-atelier.side-atelier-multi { cursor: pointer; font: inherit; }
.side-atelier.side-atelier-multi:hover { border-color: #2a3a58; background: #17223a; }
.side-atelier .sa-chev { color: var(--side-muted); display: inline-grid; flex: none; }
.top-boutique-m { display: none; }
@media (max-width: 860px) {
  /* Sur téléphone, la boutique en cours a sa propre bande sous la barre du haut. */
  .top-boutique { display: none; }
  .top-boutique-m {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 0 16px; position: sticky; top: var(--top-h); z-index: 29;
    border: 0; border-bottom: 1px solid var(--brand-line); background: linear-gradient(var(--brand-soft), var(--brand-soft)), var(--bg);
    color: var(--brand-strong); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  }
  :root[data-theme="dark"] .top-boutique-m { color: var(--brand); }
  .top-boutique-m .tb-m-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-boutique-m svg { flex: none; }
  body.plein-ecran .top-boutique-m { display: none; }
}
.logo-mark.avec-image { background: #fff; overflow: hidden; padding: 0; }
.logo-mark.avec-image img { width: 100%; height: 100%; object-fit: contain; }
.side-brand .logo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-brand .logo-sous { font-size: 10.5px; color: var(--side-muted); font-weight: 500; margin-left: -4px; align-self: flex-end; padding-bottom: 3px; white-space: nowrap; }
.marque-perso .logo-mark:not(.avec-image) { background: var(--marque-mark); font-weight: 700; font-size: 15px; }
.marque-perso .nav-link.active svg { color: var(--marque-vive); }
.marque-perso .nav-link.active::before { background: var(--marque-vive); }
.marque-perso .side-atelier .av { color: var(--marque-vive); }
.marque-perso .trial-bar span { background: var(--marque-vive); }
.marque-perso .btn.primary { box-shadow: 0 1px 2px var(--marque-ombre), inset 0 1px 0 rgba(255,255,255,.12); }
:root.marque-perso[data-theme="dark"] .btn.primary { color: var(--marque-sur); }
.marque-perso .auth-side { background: radial-gradient(1200px 600px at -10% -10%, var(--marque-fond) 0%, transparent 60%), radial-gradient(800px 500px at 120% 120%, #1e3a5f 0%, transparent 60%), #0b1220; }
.marque-perso .auth-side h1 em { background: linear-gradient(90deg, var(--marque-vive), #fcd34d); -webkit-background-clip: text; background-clip: text; }
.marque-perso .auth-feat .fi { background: color-mix(in srgb, var(--marque-vive) 14%, transparent); color: var(--marque-vive); }
