/* WATT Back-office — palette configurable (vert naturel) */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root {
  --wt-surface: var(--theme-surface, #FFFFFF);
  --wt-bg: var(--theme-bg, #F6F8F6);
  --wt-sage: var(--theme-sage, #DDEBE2);
  --wt-accent: var(--theme-accent, #6E9B80);
  --wt-primary: var(--theme-primary, #315B48);
  --wt-ink: var(--theme-text, #303833);
  --wt-muted: #6B746F;
  --wt-border: #E2E8E4;
  --wt-soft: var(--theme-sage, #DDEBE2);
  --wt-danger: #B42318;
  --wt-danger-bg: #FEF3F2;
  --wt-ok: #315B48;
  --wt-ok-bg: #EAF3EE;
  --wt-warn: #7A5B00;
  --wt-warn-bg: #F7F3E8;
  --wt-shadow: 0 1px 2px rgba(48, 56, 51, 0.04), 0 8px 24px rgba(48, 56, 51, 0.05);
  --wt-radius: 12px;
  --wt-radius-sm: 8px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", "Plus Jakarta Sans", sans-serif;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--wt-ink);
  background: var(--wt-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--wt-primary); }
button, input, select { font: inherit; }
.muted { color: var(--wt-muted); margin: 0; font-size: 0.9rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.btn {
  font-weight: 600;
  border-radius: var(--wt-radius-sm);
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  min-height: 2rem;
}
.btn-primary {
  background: var(--wt-primary);
  color: #fff;
  border-color: var(--wt-primary);
}
.btn-primary:hover { filter: brightness(0.95); color: #fff; }
.btn-secondary {
  background: var(--wt-surface);
  color: var(--wt-ink);
  border-color: var(--wt-border);
}
.btn-secondary:hover { background: var(--wt-sage); }
.btn-ghost {
  background: transparent;
  border-color: var(--wt-border);
  color: var(--wt-muted);
}
.btn-ghost:hover { background: var(--wt-sage); color: var(--wt-ink); }
.btn-danger {
  background: var(--wt-danger-bg);
  color: var(--wt-danger);
  border-color: #f5c6c2;
}
.btn-sm { min-height: 1.85rem; padding: 0.28rem 0.65rem; font-size: 0.75rem; }
.w-100 { width: 100%; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  background: var(--wt-surface);
  border-right: 1px solid var(--wt-border);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.5rem 1.1rem;
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: var(--wt-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.brand-logo-img {
  display: block;
  height: 4.5rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}

.brand-logo-img--login {
  margin: 0 auto 0.75rem;
  height: 4rem;
  max-width: 10rem;
}

.bo-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.bo-upload {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--wt-border);
  border-radius: 12px;
  background: var(--wt-bg);
}

.bo-upload__preview {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 12px;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.bo-upload__preview--icon {
  width: 3.75rem;
  height: 3.75rem;
}

.bo-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bo-upload__placeholder {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: var(--wt-primary);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.bo-upload__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.bo-upload__body strong {
  font-size: 0.92rem;
  color: var(--wt-ink);
}

.bo-upload__body .muted {
  font-size: 0.78rem;
  margin: 0;
}

.bo-upload__drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.25rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--wt-border);
  border-radius: 10px;
  background: var(--wt-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bo-upload__drop:hover,
.bo-upload__drop.is-dragover {
  border-color: var(--wt-primary);
  background: #f3f8f5;
}

.bo-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.bo-upload__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--wt-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

.bo-upload__name {
  font-size: 0.8rem;
  color: var(--wt-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.bo-upload__name.is-selected {
  color: var(--wt-ink);
  font-weight: 500;
}

.bo-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--wt-muted);
  margin-top: 0.15rem;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--wt-primary);
}
.brand-slogan {
  font-size: 0.68rem;
  color: var(--wt-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  overflow: auto;
  padding-inline: 0.25rem;
}

.sidebar-group {
  margin: 1rem 0.7rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8A938D;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--wt-ink);
  font-weight: 500;
  font-size: 0.9rem;
}

.sidebar-link:hover {
  background: var(--wt-sage);
  color: var(--wt-primary);
}

.sidebar-link.is-active {
  background: var(--wt-primary);
  color: #fff;
}

.sidebar-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.sidebar-tree {
  border-radius: 8px;
}

.sidebar-tree__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--wt-ink);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.sidebar-tree__summary::-webkit-details-marker { display: none; }

.sidebar-tree__summary:hover {
  background: var(--wt-sage);
  color: var(--wt-primary);
}

.sidebar-tree.is-active > .sidebar-tree__summary {
  color: var(--wt-primary);
  font-weight: 600;
}

.sidebar-tree__chevron {
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  opacity: 0.65;
  transition: transform 0.18s ease;
}

.sidebar-tree[open] > .sidebar-tree__summary .sidebar-tree__chevron {
  transform: rotate(180deg);
}

.sidebar-tree__items {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.15rem 0 0.35rem 0.35rem;
}

.sidebar-link--sub {
  padding-left: 2.35rem;
  font-size: 0.86rem;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.75rem 0.35rem 0.25rem;
  border-top: 1px solid var(--wt-border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.4rem;
}

.sidebar-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--wt-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex: 0 0 auto;
  overflow: hidden;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.85rem;
}

.sidebar-user-plan {
  margin: 0;
  font-size: 0.72rem;
  color: var(--wt-muted);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.75rem 0.5rem;
}

.app-page-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--wt-primary);
}

.app-page-sub {
  margin: 0.2rem 0 0;
  color: var(--wt-muted);
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-badge {
  background: var(--wt-sage);
  color: var(--wt-primary);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.app-content { padding: 0.75rem 1.75rem 2rem; }
.bo-page,
.bo-stack,
[data-bo-open-modal] {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.bo-home__kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.bo-kpi {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--wt-shadow);
}

.bo-kpi:hover { border-color: var(--wt-accent); }

.bo-kpi__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wt-muted);
}

.bo-kpi__value {
  margin: 0.35rem 0 0.15rem;
  font-weight: 600;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  color: var(--wt-ink);
}

.bo-kpi__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--wt-muted);
}

.bo-kpi.is-alert {
  border-color: #f5c6c2;
  background: #fffafa;
}

.bo-kpi.is-accent {
  border-color: var(--wt-sage);
  background: var(--wt-surface);
}

.bo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 0.75rem;
  box-shadow: var(--wt-shadow);
}

.bo-toolbar--users { margin-bottom: 0.85rem; }

.bo-table-wrap--users {
  overflow-x: hidden;
  max-width: 100%;
}

.bo-table--users {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  font-size: 0.82rem;
}

.bo-table--users th,
.bo-table--users td {
  padding: 0.42rem 0.45rem;
  vertical-align: middle;
  overflow: hidden;
}

.bo-table--users th {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.bo-table--users th:nth-child(1),
.bo-table--users td:nth-child(1) { width: 24%; }
.bo-table--users th:nth-child(2),
.bo-table--users td:nth-child(2) { width: 14%; }
.bo-table--users th:nth-child(3),
.bo-table--users td:nth-child(3) { width: 10%; }
.bo-table--users th:nth-child(4),
.bo-table--users td:nth-child(4) { width: 11%; }
.bo-table--users th:nth-child(5),
.bo-table--users td:nth-child(5) { width: 18%; }
.bo-table--users th:nth-child(6),
.bo-table--users td:nth-child(6) { width: 23%; }

.bo-table--users .bo-col-actions {
  width: 23%;
  white-space: normal;
  text-align: right;
}

.bo-table--users .bo-user-cell {
  min-width: 0;
  gap: 0.45rem;
}

.bo-table--users .bo-user-avatar {
  width: 1.65rem;
  height: 1.65rem;
}

.bo-table--users .bo-user-avatar--fallback {
  font-size: 0.62rem;
}

.bo-table--users .bo-user-cell__text {
  min-width: 0;
  overflow: hidden;
}

.bo-table--users .bo-user-cell__text strong {
  font-size: 0.84rem;
}

.bo-table--users .bo-user-cell__text strong,
.bo-table--users .bo-user-cell__text .muted,
.bo-table--users td .mono,
.bo-table--users td .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.bo-table--users .bo-user-cell__text .muted,
.bo-table--users td .muted {
  font-size: 0.72rem;
}

.bo-table--users td .mono {
  font-size: 0.78rem;
}

.bo-status-stack {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
}

.bo-table--users .status-pill {
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}

.bo-row-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  white-space: normal;
  max-width: 100%;
}

.bo-row-actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.bo-row-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
}

.bo-col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.bo-row-link { cursor: pointer; }
.bo-row-link:hover td { background: #f3f8f5; }
.bo-row-link:focus-visible { outline: 2px solid var(--wt-accent); outline-offset: -2px; }

.bo-dossier-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
  margin-bottom: 1rem;
}

.bo-dossier-hero__identity {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: min(100%, 320px);
  flex: 1 1 360px;
}

.bo-dossier-hero__title {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--wt-ink);
}

.bo-dossier-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.15rem;
}

.bo-dossier-actions form {
  display: inline-flex;
  margin: 0;
}

.bo-dossier-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bo-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: var(--wt-radius);
  border: 1px solid #e8d9a8;
  background: var(--wt-warn-bg);
}

.bo-toolbar input,
.bo-toolbar select {
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  background: #fff;
  min-height: 2rem;
  color: var(--wt-ink);
}

.bo-toolbar input[type="search"] {
  min-width: min(280px, 100%);
  flex: 1 1 220px;
}

.bo-panel-list,
.bo-panel {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
  overflow: hidden;
}

.bo-panel-list__head,
.bo-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--wt-border);
}

.bo-panel-list__head h2,
.bo-panel__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.bo-panel__head > div { min-width: 0; }
.bo-panel__head .muted {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.bo-table-wrap { overflow-x: auto; }
.bo-table { width: 100%; border-collapse: collapse; }

.bo-table th,
.bo-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--wt-border);
}

.bo-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wt-muted);
  font-weight: 700;
  background: var(--wt-bg);
}

.bo-table tr:hover td { background: var(--wt-bg); }
.bo-table tr.is-inactive { opacity: 0.55; }

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-pill.is-on,
.status-pill.is-ok {
  background: var(--wt-ok-bg);
  color: var(--wt-ok);
}

.status-pill.is-off,
.status-pill.is-fail {
  background: var(--wt-danger-bg);
  color: var(--wt-danger);
}

.status-pill.is-pending {
  background: var(--wt-warn-bg);
  color: var(--wt-warn);
}

.bo-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.bo-pagination__btn {
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  background: #fff;
  color: var(--wt-ink);
}

.bo-pagination__btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.bo-user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bo-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
}

.bo-user-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wt-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.bo-user-cell__text strong { display: block; }

.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.toast-stack {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  top: auto;
  z-index: 1080;
  width: min(360px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-stack .alert {
  pointer-events: auto;
  margin: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 28px rgba(48, 56, 51, 0.12);
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  color: var(--wt-ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast-stack .alert.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-stack .alert-success {
  background: #f3f4f3;
  border-color: #c8cdc8;
  color: #1a1a1a;
}

.toast-stack .alert-error,
.toast-stack .alert-danger {
  background: #fff;
  border-color: #d4d4d4;
  color: #2a2a2a;
}

.toast-stack .alert-warning,
.toast-stack .alert-info {
  background: #fff;
  border-color: #d4d4d4;
  color: #2a2a2a;
}

/* Auth (login / OTP) — composition marque + formulaire */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--wt-bg);
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 3.5rem);
  color: #f4faf6;
  background: var(--wt-primary);
  animation: auth-brand-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(244, 250, 246, 0.55) 1px, transparent 0);
  background-size: 28px 28px;
  animation: auth-pattern-drift 18s linear infinite;
}

.auth-brand__pattern::after {
  content: "";
  position: absolute;
  inset: 12% auto auto 8%;
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  border: 1px solid rgba(244, 250, 246, 0.18);
  border-radius: 50%;
  animation: auth-ring 1.1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand__content {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  margin-top: auto;
  margin-bottom: auto;
  animation: auth-rise 0.75s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand__logo {
  display: block;
  height: clamp(5.5rem, 12vw, 8.5rem);
  width: auto;
  max-width: min(20rem, 78vw);
  object-fit: contain;
  margin: 0 0 1.5rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.2));
}

.auth-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 16px;
  background: rgba(244, 250, 246, 0.12);
  border: 1px solid rgba(244, 250, 246, 0.2);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.auth-brand__name {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.auth-brand__tagline {
  margin: 0;
  max-width: 22rem;
  font-size: clamp(1.05rem, 2.1vw, 1.25rem);
  line-height: 1.4;
  font-weight: 500;
  color: rgba(244, 250, 246, 0.88);
}

.auth-brand__foot {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 250, 246, 0.5);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--wt-accent) 18%, transparent) 1px, transparent 0),
    var(--wt-bg);
  background-size: 22px 22px, auto;
  animation: auth-panel-in 0.7s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-panel__inner {
  width: min(420px, 100%);
  padding: clamp(1.35rem, 3vw, 1.85rem);
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: calc(var(--wt-radius) + 6px);
  box-shadow: var(--wt-shadow);
}

.auth-panel__head {
  margin-bottom: 1.45rem;
}

.auth-panel__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wt-accent);
}

.auth-panel__head h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--wt-ink);
}

.auth-panel__head .muted {
  margin: 0;
  max-width: 28rem;
  line-height: 1.45;
}

.auth-alert {
  background: var(--wt-danger-bg);
  color: var(--wt-danger);
  border: 1px solid #f5c6c2;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--wt-ink);
}

.auth-field input {
  width: 100%;
  border: 1px solid var(--wt-border);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  background: var(--wt-bg);
  color: var(--wt-ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-field input::placeholder { color: #9aa39d; }

.auth-field input:focus {
  outline: none;
  background: var(--wt-surface);
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wt-accent) 35%, transparent);
}

.auth-field__control {
  position: relative;
  display: block;
}

.auth-field__control--icon input {
  padding-left: 2.75rem;
  padding-right: 2.85rem;
}

.auth-field__icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--wt-muted);
  display: inline-flex;
  pointer-events: none;
}

.auth-field__control input:focus + .auth-field__toggle,
.auth-field__control--icon:focus-within .auth-field__icon {
  color: var(--wt-primary);
}

.auth-field__toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--wt-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-field__toggle:hover {
  background: var(--wt-sage);
  color: var(--wt-ink);
}

.auth-otp {
  letter-spacing: 0.4em;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: 1rem !important;
}

.auth-submit {
  width: 100%;
  min-height: 3.05rem;
  margin-top: 0.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 12px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.03); }
.auth-submit:active { transform: translateY(0); }

.auth-secondary { margin-top: 0.75rem; }

.auth-panel__hint {
  margin: 1.35rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--wt-muted);
}

.auth-panel__hint--link {
  margin-top: 0.65rem;
}

.auth-panel__hint a {
  color: var(--wt-primary);
  font-weight: 600;
}

.auth-panel__lock {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--wt-ok);
  box-shadow: 0 0 0 3px var(--wt-ok-bg);
  flex-shrink: 0;
}

@keyframes auth-brand-in {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

@keyframes auth-panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes auth-ring {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: none; }
}

@keyframes auth-pattern-drift {
  from { background-position: 0 0; }
  to { background-position: 28px 28px; }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-brand {
    min-height: auto;
    padding: 1.65rem 1.35rem 1.85rem;
    justify-content: flex-end;
  }

  .auth-brand__content {
    margin: 0;
    text-align: left;
  }

  .auth-brand__logo {
    height: clamp(4.25rem, 18vw, 5.75rem);
    margin-bottom: 1rem;
  }

  .auth-brand__name {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }

  .auth-brand__tagline {
    font-size: 1rem;
    max-width: 18rem;
  }

  .auth-brand__pattern::after {
    width: 220px;
    height: 220px;
    inset: auto -40px -60px auto;
  }

  .auth-brand__foot { display: none; }

  .auth-panel {
    padding: 1.25rem 1.1rem 2rem;
    align-items: start;
    background: var(--wt-bg);
  }

  .auth-panel__inner {
    width: 100%;
    padding: 1.25rem 1.15rem 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-brand,
  .auth-brand__content,
  .auth-brand__pattern,
  .auth-brand__pattern::after,
  .auth-panel,
  .auth-submit {
    animation: none !important;
    transition: none !important;
  }
}

/* Compat anciennes classes login */
.login-page { min-height: 100vh; }
.login-card,
.login-error { display: none; }

/* Settings + tabs */
.bo-tabs { display: flex; flex-direction: column; gap: 1rem; }

.bo-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: 1px solid var(--wt-border);
  padding-bottom: 0.35rem;
}

.bo-tabs__tab {
  padding: 0.55rem 0.9rem;
  border-radius: 8px 8px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wt-muted);
}

.bo-tabs__tab:hover {
  color: var(--wt-primary);
  background: var(--wt-sage);
}

.bo-tabs__tab.is-active {
  color: var(--wt-primary);
  background: var(--wt-surface);
  box-shadow: inset 0 -2px 0 var(--wt-primary);
}

.bo-settings { display: flex; flex-direction: column; gap: 1rem; }

.bo-settings-panel {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.15rem;
  box-shadow: var(--wt-shadow);
}

.bo-settings-panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wt-primary);
}

.bo-settings-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.bo-settings-field label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.bo-settings-field input {
  width: 100%;
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.bo-settings-actions { margin-top: 1rem; }

.bo-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.bo-color-field {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--wt-border);
  border-radius: 10px;
  background: var(--wt-bg);
  cursor: pointer;
}

.bo-color-field__swatch {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  border: 1px solid var(--wt-border);
  flex-shrink: 0;
}

.bo-color-field__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.bo-color-field__meta strong {
  font-size: 0.85rem;
  color: var(--wt-ink);
}

.bo-color-field input[type="color"] {
  width: 2rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.bo-color-field__hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--wt-muted);
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  width: 5.5rem;
}

.bo-theme-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--wt-bg);
  border: 1px solid var(--wt-border);
  display: grid;
  gap: 0.75rem;
}

.bo-theme-preview__brand {
  font-weight: 800;
  color: var(--wt-primary);
  font-size: 1.1rem;
}

.bo-theme-preview__card {
  background: var(--wt-surface);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--wt-shadow);
}

.bo-theme-preview__card span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wt-muted);
  font-weight: 600;
}

.bo-theme-preview__card strong {
  font-size: 1.35rem;
  color: var(--wt-ink);
}

/* ——— Système (style Tour) ——— */
.bo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.bo-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
}

.bo-hero-card--profile { align-items: flex-start; }

.bo-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wt-accent);
}

.bo-hero-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--wt-ink);
}

.bo-hero-card__text { margin: 0; color: var(--wt-muted); font-size: 0.92rem; }
.bo-hero-card__actions { margin-top: 0.85rem; }
.bo-hero-card__aside { text-align: right; flex-shrink: 0; }
.bo-hero-card__stat {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--wt-primary);
  font-variant-numeric: tabular-nums;
}

.bo-progress {
  margin-top: 0.75rem;
  height: 6px;
  border-radius: 999px;
  background: rgba(49, 91, 72, 0.12);
  overflow: hidden;
}
.bo-progress > span {
  display: block;
  height: 100%;
  background: var(--wt-primary);
  border-radius: inherit;
}

.bo-meter {
  margin-top: 0.45rem;
  height: 5px;
  border-radius: 999px;
  background: rgba(49, 91, 72, 0.1);
  overflow: hidden;
}
.bo-meter > span {
  display: block;
  height: 100%;
  background: var(--wt-accent);
}

.bo-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-top: 0;
}

.bo-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--wt-sage);
  color: var(--wt-primary);
}
.bo-status--ok { background: #e4f3ea; color: #1f6b3a; }
.bo-status--warn { background: #fff1e6; color: #9a4b12; }
.bo-status--info { background: var(--wt-sage); color: var(--wt-primary); }

.bo-tips {
  margin: 0;
  padding: 0.75rem 1.15rem 1.15rem 2rem;
  color: var(--wt-ink);
  font-size: 0.92rem;
}
.bo-tips li { margin: 0.35rem 0; }

.bo-timeline {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1.15rem 1.15rem;
}
.bo-timeline li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 0.65rem;
  padding: 0.45rem 0;
}
.bo-timeline__dot {
  width: 8px;
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--wt-accent);
}
.bo-timeline__title { margin: 0; font-weight: 600; font-size: 0.9rem; }

.bo-meta {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 1rem 1.15rem 1.25rem;
}
.bo-meta > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
}
.bo-meta dt { margin: 0; color: var(--wt-muted); font-size: 0.82rem; }
.bo-meta dd { margin: 0; font-weight: 600; }

.bo-dir { list-style: none; margin: 0; padding: 0; }
.bo-dir__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--wt-border);
}
.bo-dir__row:last-child { border-bottom: 0; }
.bo-dir__row.is-active-smtp {
  background: color-mix(in srgb, var(--wt-sage) 55%, #fff);
}
.bo-dir__main { display: flex; gap: 0.75rem; align-items: center; min-width: 0; }
.bo-dir__side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.bo-avatar-sm {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wt-sage);
  color: var(--wt-primary);
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.bo-avatar-lg {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wt-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  cursor: default;
}
.bo-avatar-lg--photo {
  background: var(--wt-sage);
}
.bo-avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bo-avatar-lg:focus-visible {
  outline: 2px solid var(--wt-accent);
  outline-offset: 3px;
}

.bo-inline-form { display: inline-flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.bo-table__actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.bo-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.bo-actions--panel {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
}

.bo-hero-card--profile {
  gap: 1.35rem;
  align-items: center;
}

.app-page-sub {
  margin: 0.25rem 0 0;
  color: var(--wt-muted);
  font-size: 0.92rem;
}

.bo-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem 1.15rem;
}
.bo-stat-chip {
  display: inline-flex;
  flex-direction: column;
  min-width: 4.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--wt-border);
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.bo-stat-chip.is-active {
  border-color: var(--wt-primary);
  background: var(--wt-sage);
}
.bo-stat-chip strong { font-size: 1.05rem; }
.bo-stat-chip span { font-size: 0.72rem; color: var(--wt-muted); }

.bo-live {
  margin-top: 0.25rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  background: var(--wt-surface);
  box-shadow: var(--wt-shadow);
}
.bo-live__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.bo-live__title { margin: 0; font-size: 1.05rem; }
.bo-live__status { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--wt-muted); }
.bo-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f9e5e;
  box-shadow: 0 0 0 4px rgba(47, 158, 94, 0.15);
}

.sidebar-user-card { text-decoration: none; color: inherit; }
.sidebar-avatar--photo {
  padding: 0;
  overflow: hidden;
}
.sidebar-avatar--photo img { width: 100%; height: 100%; object-fit: cover; }

.bo-modal {
  width: min(560px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(88vh, 860px);
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--wt-ink);
  box-shadow: none;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.bo-modal--wide { width: min(720px, calc(100vw - 1.5rem)); }
.bo-modal[open].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.bo-modal::backdrop {
  background: rgba(20, 35, 28, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.bo-modal[open].is-visible::backdrop { opacity: 1; }

.bo-modal__sheet,
.bo-modal__card {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 860px);
  background: var(--wt-surface);
  border-radius: 1rem;
  border: 1px solid var(--wt-border);
  box-shadow:
    0 1px 2px rgba(20, 35, 28, 0.04),
    0 24px 56px -20px rgba(20, 35, 28, 0.28);
  overflow: hidden;
}

.bo-modal__head,
.bo-modal__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  flex-shrink: 0;
}
.bo-modal__head {
  border-bottom: 1px solid var(--wt-border);
  align-items: flex-start;
}
.bo-modal__head > div { min-width: 0; flex: 1; }
.bo-modal__head h2 { margin: 0; font-size: 1.05rem; font-weight: 750; }
.bo-modal__head .muted { margin: 0.2rem 0 0; font-size: 0.85rem; }
.bo-modal__close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--wt-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.bo-modal__close:hover {
  background: var(--wt-sage);
  color: var(--wt-primary);
}
.bo-modal__body {
  padding: 1rem 1.15rem;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}
.bo-modal__foot {
  border-top: 1px solid var(--wt-border);
  justify-content: flex-end;
  flex-wrap: wrap;
}
.bo-modal__foot-left { margin-right: auto; }

.bo-hidden-form { display: none !important; }

.bo-form-grid {
  display: grid;
  gap: 0.75rem;
}
.bo-form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.bo-form-grid .bo-field--full,
.bo-label.bo-field--full { grid-column: 1 / -1; }
.bo-label,
.bo-form-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wt-ink);
}
.bo-form-grid input,
.bo-form-grid select,
.bo-modal__body input[type="text"],
.bo-modal__body input[type="email"],
.bo-modal__body input[type="password"],
.bo-modal__body input[type="file"],
.bo-modal__body select,
.bo-modal__body textarea {
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  background: #fff;
  color: var(--wt-ink);
  width: 100%;
  box-sizing: border-box;
}
.bo-form-grid input:focus,
.bo-modal__body input:focus,
.bo-modal__body select:focus,
.bo-modal__body textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--wt-accent) 45%, transparent);
  border-color: var(--wt-accent);
}

.bo-user-edit {
  display: grid;
  gap: 1.1rem;
  padding-bottom: 5.5rem;
}

.bo-user-edit__alert { margin: 0; }

.bo-user-edit__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 1rem;
  align-items: stretch;
  padding: 1.15rem 1.25rem;
  border-radius: calc(var(--wt-radius) + 2px);
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  box-shadow: var(--wt-shadow);
}

.bo-user-edit__hero-main {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-width: 0;
}

.bo-user-edit__hero-copy { min-width: 0; }

.bo-user-edit__name {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
  font-weight: 750;
  color: var(--wt-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bo-user-edit__meta {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--wt-muted);
}

.bo-user-edit__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.bo-user-edit__hero-side {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bo-user-edit__brand {
  width: 100%;
  min-height: 8.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
}

.bo-user-edit__brand-logo {
  display: block;
  width: min(100%, 220px);
  height: auto;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(48, 56, 51, 0.12));
}

.bo-user-edit__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 28px;
  background: var(--wt-primary);
  color: #fff;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 28px rgba(49, 91, 72, 0.28);
}

.bo-user-edit__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1.15rem;
  align-items: start;
}

.bo-user-edit__card {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--wt-shadow);
  margin-bottom: 1rem;
}

.bo-user-edit__card--geo {
  background: var(--wt-surface);
  border-color: var(--wt-border);
}

.bo-geo-path {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.bo-geo-path.is-set {
  background: transparent;
  border: 0;
}

.bo-geo-path__pin {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--wt-muted);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wt-muted) 18%, transparent);
}

.bo-geo-path.is-set .bo-geo-path__pin {
  background: var(--wt-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wt-primary) 18%, transparent);
}

.bo-geo-path__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--wt-ink);
  letter-spacing: -0.01em;
}

.bo-geo-fields .bo-label__row,
.bo-geo-search .bo-label__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.bo-geo-fields .bo-label__row em,
.bo-geo-search .bo-label__row em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--wt-muted);
}

.bo-geo-search { position: relative; margin-bottom: 0.85rem; }
.bo-geo-zone { position: relative; display: grid; gap: 0.3rem; }

.bo-geo-search__field {
  position: relative;
  display: flex;
  align-items: center;
}

.bo-geo-search__icon {
  position: absolute;
  left: 0.85rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--wt-muted);
  border-radius: 50%;
  pointer-events: none;
}

.bo-geo-search__icon::after {
  content: "";
  position: absolute;
  right: -0.28rem;
  bottom: -0.22rem;
  width: 0.4rem;
  height: 2px;
  background: var(--wt-muted);
  transform: rotate(45deg);
  border-radius: 1px;
}

.bo-geo-search__input {
  width: 100%;
  min-height: 2.55rem;
  padding-left: 2.2rem !important;
  padding-right: 4.5rem !important;
}

.bo-geo-search__clear {
  position: absolute;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--wt-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.bo-geo-search__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 0.15rem);
  z-index: 30;
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--wt-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--wt-shadow);
}

.bo-geo-search__item {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--wt-ink);
}

.bo-geo-search__item:hover,
.bo-geo-search__item:focus {
  background: var(--wt-sage);
  outline: none;
}

.bo-geo-search__item strong { font-weight: 700; }
.bo-geo-search__item span {
  font-size: 0.78rem;
  color: var(--wt-muted);
  font-weight: 600;
}

.bo-geo-search__empty {
  margin: 0;
  padding: 0.75rem;
  color: var(--wt-muted);
  font-size: 0.85rem;
}

.bo-user-edit__card--sticky {
  position: sticky;
  top: 1rem;
  margin-bottom: 0;
}

.bo-user-edit__summary .bo-eyebrow { margin-bottom: 0.65rem; }

.bo-user-edit__dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.bo-user-edit__dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--wt-border);
}

.bo-user-edit__dl > div:last-of-type { border-bottom: 0; padding-bottom: 0; }

.bo-user-edit__dl dt {
  margin: 0;
  font-size: 0.78rem;
  color: var(--wt-muted);
  font-weight: 500;
}

.bo-user-edit__dl dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--wt-ink);
  text-align: right;
}

.bo-user-edit__aside-actions {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--wt-border);
}

.bo-user-edit__aside-actions .btn { width: 100%; min-height: 2.35rem; }

.bo-user-edit__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--wt-border);
}

.bo-user-edit__step {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 750;
  color: #fff;
  background: var(--wt-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wt-sage) 70%, transparent);
}

.bo-user-edit__head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--wt-primary);
  letter-spacing: -0.01em;
}

.bo-user-edit__head .muted {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
}

.bo-user-edit__main .bo-form-grid { margin: 0; }

.bo-user-edit__main .bo-form-grid input,
.bo-user-edit__main .bo-form-grid select {
  min-height: 2.45rem;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bo-user-edit__main .bo-form-grid input:focus,
.bo-user-edit__main .bo-form-grid select:focus {
  outline: none;
  border-color: var(--wt-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wt-accent) 28%, transparent);
}

.bo-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--wt-border);
}

.bo-switch {
  display: inline-flex !important;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  cursor: pointer;
  font-weight: 550 !important;
  color: var(--wt-ink);
  user-select: none;
}

.bo-switch input {
  position: absolute;
  opacity: 0;
  width: 1px !important;
  height: 1px;
  pointer-events: none;
}

.bo-switch__track {
  position: relative;
  width: 2.4rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: #d5ddd8;
  transition: background 0.18s ease;
}

.bo-switch__track::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(48, 56, 51, 0.22);
  transition: transform 0.18s ease;
}

.bo-switch input:checked + .bo-switch__track {
  background: var(--wt-primary);
}

.bo-switch input:checked + .bo-switch__track::after {
  transform: translateX(1.05rem);
}

.bo-switch input:focus-visible + .bo-switch__track {
  outline: 2px solid color-mix(in srgb, var(--wt-accent) 55%, transparent);
  outline-offset: 2px;
}

.bo-switch__label { font-size: 0.88rem; line-height: 1.3; }
.bo-switch__label em { font-style: normal; }

.bo-user-edit__bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--wt-border);
  background: color-mix(in srgb, #fff 92%, var(--wt-sage));
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(48, 56, 51, 0.1);
}

.bo-user-edit__bar .muted {
  margin: 0;
  font-size: 0.82rem;
}

.bo-user-edit__actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.bo-user-edit__actions .btn { min-height: 2.35rem; padding-inline: 1rem; }

@media (max-width: 960px) {
  .bo-user-edit__hero,
  .bo-user-edit__layout { grid-template-columns: 1fr; }
  .bo-user-edit__card--sticky { position: static; }
  .bo-user-edit__aside { display: none; }
  .bo-user-edit { padding-bottom: 6.5rem; }
}

.bo-profile-photo {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.bo-profile-photo__preview {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wt-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  overflow: hidden;
  flex-shrink: 0;
}
.bo-profile-photo__preview.is-photo { background: var(--wt-sage); }
.bo-profile-photo__preview img { width: 100%; height: 100%; object-fit: cover; }
.bo-profile-photo__fields { flex: 1; min-width: 0; }

.bo-check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500 !important;
  margin: 0.35rem 0;
  cursor: pointer;
}
.bo-check input { width: auto !important; margin-top: 0.15rem; flex-shrink: 0; }
.bo-check-row,
.bo-check-stack { display: flex; flex-direction: column; gap: 0.15rem; }
.bo-check-row { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 0.85rem; }

.bo-perm-group {
  border: 1px solid var(--wt-border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin: 0.85rem 0 0;
}
.bo-perm-group legend {
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wt-primary);
}

.field-error { color: #b42318; font-size: 0.78rem; font-weight: 500; }
.btn-danger {
  background: #b42318;
  color: #fff;
  border: 1px solid #b42318;
}
.btn-danger:hover { filter: brightness(0.95); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: relative; height: auto; }
  .bo-grid-2 { grid-template-columns: 1fr; }
  .bo-hero-card { flex-direction: column; align-items: flex-start; }
  .bo-hero-card__aside { text-align: left; }
  .bo-form-grid--2 { grid-template-columns: 1fr; }
  .bo-modal,
  .bo-modal--wide {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: 100dvh;
  }
  .bo-modal__sheet,
  .bo-modal__card { max-height: 100dvh; border-radius: 12px; }
}

/* Marques partenaires (Wave / Orange Money / Woyofal) — logos nus */
.bo-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wt-ink);
  white-space: nowrap;
}
.bo-brand-pill img {
  height: 1.35rem;
  width: auto;
  max-width: 2.4rem;
  object-fit: contain;
  background: transparent;
}
.bo-kpi__brand,
.bo-tab-brand {
  height: 1.15rem;
  width: auto;
  max-width: 2.2rem;
  object-fit: contain;
  vertical-align: -0.15rem;
  margin-right: 0.25rem;
  background: transparent;
}
