/* Speedy Flow — console d'administration.
 * Cadre arrondi sur fond doux, barre latérale claire, cartes blanches.
 * Identité : bleu Speedy Flow, papier beige, Playfair Display + Inter. */
:root {
  --backdrop: #E9E6DD;
  --frame: #FFFFFF;
  --side: #F6F3EA;
  --paper: #FBF9F3;
  --paper-2: #F2EFE6;
  --card: #FFFFFF;
  --ink: #1E1E1B;
  --muted: #6B6A62;
  --faint: #A09E94;
  --hairline: rgba(30, 30, 20, 0.08);
  --hairline-2: rgba(30, 30, 20, 0.14);
  --blue: #223CE2;
  --blue-deep: #14228F;
  --blue-light: #8E9CFF;
  --blue-soft: rgba(34, 60, 226, 0.08);
  --night: #17171A;
  --green: #1F8A55;
  --green-soft: rgba(31, 138, 85, 0.10);
  --orange: #CC6B29;
  --orange-soft: rgba(204, 107, 41, 0.11);
  --red: #D23B2C;
  --red-soft: rgba(210, 59, 44, 0.10);
  --shadow-sm: 0 1px 2px rgba(20, 20, 10, 0.05);
  --shadow: 0 1px 2px rgba(20, 20, 10, 0.04), 0 4px 16px rgba(20, 20, 10, 0.04);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --backdrop: #0A0A0B; --frame: #141416; --side: #18181B; --paper: #141416; --paper-2: #222226; --card: #1C1C20;
    --ink: #ECEBE6; --muted: #A3A29B; --faint: #75746E; --hairline: rgba(255,255,255,.07); --hairline-2: rgba(255,255,255,.13);
    --blue: #6F84FF; --blue-deep: #A9B5FF; --blue-light: #3D4FC9; --blue-soft: rgba(111,132,255,.14); --night: #ECEBE6;
    --green: #4CC38A; --green-soft: rgba(76,195,138,.14); --orange: #F09A5B; --orange-soft: rgba(240,154,91,.14);
    --red: #F07A6C; --red-soft: rgba(240,122,108,.14); --shadow-sm: none; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --backdrop: #0A0A0B; --frame: #141416; --side: #18181B; --paper: #141416; --paper-2: #222226; --card: #1C1C20;
  --ink: #ECEBE6; --muted: #A3A29B; --faint: #75746E; --hairline: rgba(255,255,255,.07); --hairline-2: rgba(255,255,255,.13);
  --blue: #6F84FF; --blue-deep: #A9B5FF; --blue-light: #3D4FC9; --blue-soft: rgba(111,132,255,.14); --night: #ECEBE6;
  --green: #4CC38A; --green-soft: rgba(76,195,138,.14); --orange: #F09A5B; --orange-soft: rgba(240,154,91,.14);
  --red: #F07A6C; --red-soft: rgba(240,122,108,.14); --shadow-sm: none; --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; }
body {
  background: var(--backdrop); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }

/* Démarrage */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.94); } }

/* ── Cadre ─────────────────────────────────────────────────────────────── */
.shell {
  display: grid; grid-template-columns: 252px minmax(0, 1fr);
  width: calc(100% - 40px); max-width: 1480px; margin: 20px auto; min-height: calc(100vh - 40px);
  background: var(--frame); border-radius: 28px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(20,20,10,.04), 0 30px 80px rgba(20,20,10,.08);
}
.side {
  background: var(--side); padding: 22px 14px 14px; position: sticky; top: 20px; align-self: start;
  height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--hairline);
}
/* Le menu défile ; les réglages et le compte restent toujours visibles en bas. */
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 4px; scrollbar-width: thin; }
.side-tools { border-top: 1px solid var(--hairline); padding-top: 10px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; background: #223CE2; display: grid; place-items: center; flex: none; }
.brand-logo img { width: 17px; height: 17px; filter: brightness(0) invert(1); }
.brand b { font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand .tag { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: var(--blue-soft); border-radius: 6px; padding: 1px 6px; margin-left: 2px; }

.nav { display: grid; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 10px; color: var(--ink);
  font-weight: 500; font-size: 14px; opacity: .78; transition: background .15s, opacity .15s, box-shadow .15s;
}
.nav-link:hover { background: var(--hairline); text-decoration: none; opacity: 1; }
.nav-link.active { background: var(--card); opacity: 1; font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--hairline); }
.nav-link svg { width: 17px; height: 17px; flex: none; }
.nav-link .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 650; border-radius: 99px; padding: 0 7px; line-height: 19px; }
.nav-link { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font-family: inherit; }
.nav-row { position: relative; }
.nav-row .nav-link { padding-right: 36px; }
.nav-row .count { margin-right: 22px; }
.nav-toggle {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 7px;
  border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.nav-toggle:hover { background: var(--hairline); color: var(--ink); }
.nav-toggle svg { width: 15px; height: 15px; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.nav-group.open .nav-toggle svg { transform: rotate(180deg); }
/* Sous-menu repliable : la hauteur s'anime de 0 à son contenu. */
.subnav { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s cubic-bezier(.2,.8,.2,1), opacity .2s; opacity: 0; }
.nav-group.open .subnav { grid-template-rows: 1fr; opacity: 1; }
.subnav > div { overflow: hidden; min-height: 0; display: grid; margin-left: 19px; padding-left: 14px; border-left: 1px solid var(--hairline-2); }
.nav-group.open .subnav > div { margin-top: 2px; margin-bottom: 4px; }
.subnav a { position: relative; color: var(--muted); font-size: 13.5px; padding: 6px 10px; border-radius: 8px; font-weight: 500; }
.subnav a::before { content: ""; position: absolute; left: -14px; top: 50%; width: 10px; border-top: 1px solid var(--hairline-2); }
.subnav a:hover { color: var(--ink); text-decoration: none; background: var(--hairline); }
.subnav a.active { color: var(--ink); font-weight: 600; }
.nav-sep { height: 1px; background: var(--hairline); margin: 10px 8px; }

.launch { margin-top: 18px; background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--hairline); }
.launch .t { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13.5px; }
.launch .t svg { width: 16px; height: 16px; color: var(--blue); }
.launch .left { font-size: 12px; font-weight: 600; margin: 8px 0 6px; display: flex; align-items: center; gap: 8px; }
.launch .left .meter { flex: 1; height: 5px; }
.launch p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.launch .btn { width: 100%; justify-content: center; }

.side-tools { margin-top: 10px; display: grid; gap: 2px; }
.side-tools .nav-link .switch { margin-left: auto; }
.side-user { margin-top: 12px; display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 9px 10px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--hairline); }
.side-user .who { min-width: 0; flex: 1; }
.side-user b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: var(--muted); font-size: 11.5px; }

/* ── En-tête ───────────────────────────────────────────────────────────── */
.content { min-width: 0; background: var(--frame); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 24px 32px 0; }
.topbar .hello { min-width: 0; flex: 1; }
.topbar .hello b { font-size: 19px; font-weight: 650; letter-spacing: -.01em; display: block; }
.topbar .hello span { color: var(--muted); font-size: 13.5px; }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--hairline-2); background: var(--card);
  display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; transition: background .15s;
}
.icon-btn:hover { background: var(--paper-2); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--frame); }
.topsearch { position: relative; width: 300px; }
.topsearch input { width: 100%; height: 38px; border-radius: 11px; border: 1px solid var(--hairline-2); background: var(--paper); padding: 0 40px 0 36px; outline: none; }
.topsearch input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); background: var(--card); }
.topsearch svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.topsearch kbd { position: absolute; right: 9px; top: 9px; font: 600 11px Inter, sans-serif; color: var(--faint); border: 1px solid var(--hairline-2); border-radius: 6px; padding: 1px 6px; }
.mobile-menu { display: none; }
.more-menu { position: absolute; right: 0; top: 46px; background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 16px 40px rgba(20,20,10,.12); padding: 6px; min-width: 210px; z-index: 40; display: none; }
.more-menu.open { display: grid; }
.more-menu a { color: var(--ink); padding: 8px 10px; border-radius: 8px; font-weight: 500; display: flex; align-items: center; gap: 9px; }
.more-menu a:hover { background: var(--paper-2); text-decoration: none; }
.more-menu svg { width: 16px; height: 16px; color: var(--muted); }
.more-wrap { position: relative; }

.main { padding: 26px 32px 40px; }
.demo-banner { margin: 0 0 20px; padding: 9px 14px; border-radius: 11px; background: var(--orange-soft); color: var(--orange); font-weight: 550; font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }

/* Titres */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 30px; letter-spacing: -.01em; line-height: 1.1; margin: 0; }
h1 em { font-style: italic; color: var(--blue); }
h2 { font-size: 15px; font-weight: 650; margin: 0; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
h2 svg { width: 17px; height: 17px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.section-title h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 24px; }
.section-title h2 em { font-style: italic; color: var(--blue); }
.sub { color: var(--muted); margin: 5px 0 0; font-size: 13.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Cartes ────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.two { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.halves { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); min-width: 0; }
.card.soft { background: var(--paper); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-body { padding: 16px 18px 18px; }
.card-head .hint { color: var(--muted); font-size: 12.5px; }
.card-head .sub { margin-top: 2px; }

.kpi { padding: 15px 18px 16px; display: grid; gap: 4px; }
.kpi .label { color: var(--ink); font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 7px; }
.kpi .label svg { width: 16px; height: 16px; color: var(--muted); }
.kpi .bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.kpi .value { font-size: 32px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi .delta { font-size: 12.5px; color: var(--muted); }
.kpi .spark { width: 64px; height: 34px; flex: none; color: var(--blue); }
.trend { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--green-soft); color: var(--green); letter-spacing: .01em; }
.trend.down { background: var(--red-soft); color: var(--red); }
.trend.flat { background: var(--paper-2); color: var(--muted); }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.table-box { margin: 14px 18px 18px; border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 550; color: var(--muted); font-size: 13px; padding: 11px 14px; border-bottom: 1px solid var(--hairline); white-space: nowrap; background: var(--paper); }
td { padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--paper); }
td.right, th.right { text-align: right; }
.task { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.task .dot { flex: none; width: 8px; height: 8px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 650; font-size: 12px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 54px; height: 54px; font-size: 19px; }
.person b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 40px 18px; }
.empty b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* Pastilles */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 7px; padding: 1px 8px; font-size: 12.5px; font-weight: 550; line-height: 22px; white-space: nowrap; background: var(--paper-2); color: var(--muted); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.solid { background: var(--blue); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Contrôles */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--hairline-2); background: var(--card); font-weight: 550; font-size: 13.5px; white-space: nowrap; color: var(--ink);
  transition: background .15s, border-color .15s, transform .1s; box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--paper-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.dark { background: var(--night); border-color: var(--night); color: var(--frame); }
.btn.dark:hover { opacity: .9; background: var(--night); }
.btn.muted { background: var(--paper-2); border-color: transparent; box-shadow: none; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.square { width: 34px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.input, select.input, textarea.input {
  height: 34px; border-radius: 10px; border: 1px solid var(--hairline-2); background: var(--card); padding: 0 11px; min-width: 0;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
select.input { padding-right: 30px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6A62' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; font-weight: 500; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search { position: relative; }
.search .input { padding-left: 34px; width: 300px; }
.search svg { position: absolute; left: 11px; top: 9px; width: 16px; height: 16px; color: var(--faint); }
.segmented { display: inline-flex; background: var(--paper-2); border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; font-weight: 550; font-size: 13px; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch { position: relative; width: 36px; height: 21px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--hairline-2); border-radius: 99px; cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(15px); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* Listes */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--hairline); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .meta, .meta { color: var(--muted); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ── Graphiques ────────────────────────────────────────────────────────── */
.chart { width: 100%; height: 220px; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--hairline); }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--blue); opacity: .88; }
.chart .bar.alt { fill: var(--blue-light); }
.chart .bar:hover { opacity: 1; }
.area-wrap { position: relative; margin-top: 8px; }
.area-wrap svg { width: 100%; height: 250px; display: block; overflow: visible; }
.area-wrap .grid-line { stroke: var(--hairline); }
.area-wrap .axis { fill: var(--muted); font-size: 12px; }
.area-wrap .line { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.area-wrap .pt { fill: var(--card); stroke: var(--blue); stroke-width: 1.6; }
.area-wrap .cursor { stroke: var(--blue); stroke-width: 1.4; opacity: 0; }
.area-wrap .cursor-pt { fill: var(--blue); stroke: var(--card); stroke-width: 3; opacity: 0; }
.area-wrap.hover .cursor, .area-wrap.hover .cursor-pt { opacity: 1; }
.area-wrap .hatch line { stroke: var(--hairline-2); }
.tip {
  position: absolute; pointer-events: none; background: var(--card); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 10px 12px; min-width: 160px; box-shadow: 0 10px 30px rgba(20,20,10,.12); opacity: 0; transform: translate(-50%, calc(-100% - 14px));
  transition: opacity .12s; font-size: 13px; z-index: 2; left: 0; top: 0;
}
.area-wrap.hover .tip { opacity: 1; }
.tip .top { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.tip .val { color: var(--muted); margin: 4px 0 6px; }
.tip .meter { height: 4px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--hairline); border-radius: 9px; padding: 5px 10px; font-size: 12.5px; color: var(--muted); background: var(--card); }
.chip b { color: var(--ink); font-weight: 650; }
.donut { position: relative; width: 190px; height: 190px; margin: 10px auto 20px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.donut circle { transition: stroke-width .15s; }
.donut circle:hover { stroke-width: 26; }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut .center span { color: var(--muted); font-size: 13px; }
.donut .center b { font-size: 34px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; }
.meter { height: 7px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.meter i.warn { background: var(--orange); }
.split-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--paper-2); }
.split-bar i { display: block; height: 100%; }

/* Actions rapides */
.quick { display: flex; flex-direction: column; }
.quick .input { width: 100%; height: 40px; }
.quick .recent { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.quick .recent a { color: var(--ink); font-weight: 550; }
.tools { display: flex; gap: 10px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.tool { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hairline-2); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s, color .15s; }
.tool:hover { transform: translateY(-1px); border-color: var(--blue); color: var(--blue); text-decoration: none; }
.tool svg { width: 17px; height: 17px; }
.quick .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.quick .pair .btn { justify-content: center; height: 42px; }

/* Intégrations */
.integ { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--hairline); align-items: flex-start; }
.integ:first-child { border-top: 0; }
.integ .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.integ .grow { flex: 1; min-width: 0; }
.integ p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* Fenêtre */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 15, 12, .38); display: grid; place-items: center; z-index: 80; padding: 16px; animation: fade .15s ease-out; }
.modal { background: var(--card); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,.25); animation: rise .2s cubic-bezier(.2,.8,.2,1); }
.modal-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #17171A; color: #fff; padding: 10px 16px; border-radius: 11px; font-weight: 550; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--red); }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); text-align: center; background: var(--frame); border-radius: 28px; padding: 36px 28px 28px; box-shadow: 0 30px 80px rgba(20,20,10,.08); }
.login-card .brand-logo { width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 18px; }
.login-card .brand-logo img { width: 28px; height: 28px; }
.login-card h1 { font-size: 30px; }
.login-card .card { padding: 0; border: 0; margin-top: 22px; text-align: left; display: grid; gap: 12px; }
.google { justify-content: center; height: 42px; width: 100%; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.login-card .input { width: 100%; height: 42px; }
.login-card .btn.primary { width: 100%; justify-content: center; height: 42px; }
.login-note { color: var(--muted); font-size: 12.5px; margin: 18px 0 0; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: var(--blue-soft); color: var(--blue-deep); }
.alert.error { background: var(--red-soft); color: var(--red); }

.skeleton { background: linear-gradient(90deg, var(--paper-2), var(--hairline), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.fade-in { animation: fade .25s ease-out; }
@media (prefers-reduced-motion: reduce) { .fade-in, .modal, .modal-bg, .boot-mark { animation: none; } }

/* Barre latérale réduite */
.shell { transition: grid-template-columns .25s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 861px) {
  .shell.slim { grid-template-columns: 76px minmax(0, 1fr); }
  .shell.slim .side { padding-left: 12px; padding-right: 12px; }
  .shell.slim .brand b, .shell.slim .brand .tag, .shell.slim .nav-link span, .shell.slim .nav-toggle, .shell.slim .subnav,
  .shell.slim .launch, .shell.slim .side-tools .switch, .shell.slim .side-user .who, .shell.slim .side-user .btn { display: none; }
  .shell.slim .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .shell.slim .nav-link { justify-content: center; position: relative; padding-left: 0; padding-right: 0; }
  .shell.slim .nav-link .count { position: absolute; top: 1px; right: 4px; margin: 0; padding: 0 5px; line-height: 16px; font-size: 10px; }
  .shell.slim .side-user { justify-content: center; padding: 8px 0; }
}
.side-tools #collapse { color: var(--muted); }

/* ── Site : aperçu dans un navigateur ──────────────────────────────────── */
.browser { border: 1px solid var(--hairline-2); border-radius: 14px; overflow: hidden; background: var(--card); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--paper-2); border-bottom: 1px solid var(--hairline); }
.browser-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline-2); }
.browser-url { margin-left: 10px; flex: 1; min-width: 0; background: var(--card); border-radius: 7px; padding: 3px 10px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-view { position: relative; height: 560px; overflow: hidden; background: var(--paper); margin: 0 auto; transition: max-width .25s; }
.browser-view.tablette { max-width: 600px; }
.browser-view.mobile { max-width: 340px; }
.browser-view iframe { border: 0; position: absolute; top: 0; left: 0; transform-origin: 0 0; background: #fff; }
.banner-preview { background: #0E1440; color: #E6E9FF; text-align: center; font-size: 13px; padding: 8px 12px; border-radius: 9px; font-weight: 550; }

/* ── Applications ──────────────────────────────────────────────────────── */
.platforms { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.platform-card { display: flex; flex-direction: column; }
.platform-card .card-body { flex: 1; }
.platform-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.platform-icon svg { width: 21px; height: 21px; }
.platform-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--hairline); color: var(--ink); font-weight: 550; font-size: 13.5px; }
.platform-foot:hover { background: var(--paper); text-decoration: none; }
.platform-foot svg { width: 15px; height: 15px; color: var(--muted); }

.device-stage { min-height: 420px; display: grid; place-items: center; align-content: center; padding: 20px 0 10px; }
.device { position: relative; background: #17171A; box-shadow: 0 20px 50px rgba(20,20,10,.18); }
.mock-screen {
  position: absolute; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 18px;
  background: linear-gradient(160deg, #FBF8EE, #E3E7FF); transition: filter .2s;
}
.mock-app { display: grid; justify-items: center; gap: 6px; text-align: center; color: #1E1E1B; }
.mock-app b { font-size: 15px; font-weight: 650; }
.mock-app small { font-size: 11.5px; color: #6B6A62; }
.mock-logo { width: 44px; height: 44px; border-radius: 13px; background: #223CE2; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(34,60,226,.3); }
.mock-logo img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.mock-pill { display: flex; align-items: center; gap: 3px; background: rgba(23,23,26,.92); color: #fff; border-radius: 99px; padding: 7px 14px 7px 12px; font-size: 11.5px; font-weight: 550; }
.mock-pill i { width: 3px; border-radius: 2px; background: #6F84FF; animation: wave 1s ease-in-out infinite; }
.mock-pill i:nth-child(1) { height: 8px; } .mock-pill i:nth-child(2) { height: 14px; animation-delay: .1s; } .mock-pill i:nth-child(3) { height: 10px; animation-delay: .2s; }
.mock-pill i:nth-child(4) { height: 16px; animation-delay: .3s; } .mock-pill i:nth-child(5) { height: 9px; animation-delay: .4s; }
.mock-pill span { margin-left: 7px; }
@keyframes wave { 50% { transform: scaleY(.45); } }
.mock-state { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 2; display: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis;
  font-size: 11.5px; font-weight: 600; border-radius: 99px; padding: 5px 11px; }
.mock-state.off { display: block; background: #D23B2C; color: #fff; }
.mock-state.soon { display: block; background: #17171A; color: #fff; }
.mock-screen.dim .mock-app, .mock-screen.dim .mock-pill { filter: grayscale(1); opacity: .45; }
/* Mac */
.device.laptop { width: 440px; max-width: 100%; aspect-ratio: 16 / 10.4; border-radius: 16px 16px 4px 4px; padding: 12px; }
.device.laptop .mock-screen { inset: 12px; border-radius: 6px; }
.laptop-base { width: 520px; max-width: 112%; height: 14px; background: linear-gradient(#D9D6CE, #B9B6AE); border-radius: 2px 2px 14px 14px; box-shadow: 0 10px 24px rgba(20,20,10,.15); }
/* Windows */
.device.desktop { width: 440px; max-width: 100%; aspect-ratio: 16 / 9.6; border-radius: 10px; padding: 10px; }
.device.desktop .mock-screen { inset: 10px 10px 34px; border-radius: 3px; background: linear-gradient(160deg, #E8EEFF, #FBF8EE); }
.taskbar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 22px; background: #232327; border-radius: 0 0 3px 3px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.taskbar span { width: 14px; height: 14px; border-radius: 4px; background: #44444A; }
.taskbar span.on { background: #223CE2; }
.stand { width: 90px; height: 46px; background: linear-gradient(#CFCCC4, #B4B1A9); clip-path: polygon(30% 0, 70% 0, 82% 100%, 18% 100%); }
.stand::after { content: ""; }
/* Téléphones */
.device.phone { width: 210px; aspect-ratio: 9 / 19.2; border-radius: 34px; padding: 9px; }
.device.phone .mock-screen { inset: 9px; border-radius: 26px; }
.phone-notch { position: absolute; z-index: 3; top: 16px; left: 50%; transform: translateX(-50%); width: 64px; height: 18px; border-radius: 99px; background: #17171A; }
.device.phone.android { border-radius: 26px; }
.device.phone.android .mock-screen { border-radius: 19px; }
.device.phone.android .phone-notch { width: 11px; height: 11px; top: 18px; }
.device.phone .mock-pill { position: absolute; bottom: 26px; }
.device.phone .mock-state { top: 40px; }
/* Montre */
.device.watch { width: 170px; height: 204px; border-radius: 46px; padding: 12px; }
.device.watch .mock-screen { inset: 12px; border-radius: 36px; background: #000; gap: 10px; }
.device.watch .mock-app b { color: #fff; font-size: 13px; }
.device.watch .mock-app small { display: none; }
.device.watch .mock-logo { width: 38px; height: 38px; border-radius: 50%; }
.device.watch .mock-pill { padding: 5px 10px; font-size: 10px; }
.device.watch .mock-pill span { display: none; }
.device.watch .mock-state { top: 10px; font-size: 10px; padding: 4px 8px; }
.watch-crown { position: absolute; right: -7px; top: 58px; width: 9px; height: 30px; border-radius: 4px; background: #2A2A2E; }
.watch-crown::before, .watch-crown::after { content: ""; position: absolute; left: 0; }
.device.watch::before, .device.watch::after { content: ""; position: absolute; left: 30px; right: 30px; height: 40px; background: #2A2A2E; z-index: -1; }
.device.watch::before { top: -34px; border-radius: 14px 14px 0 0; }
.device.watch::after { bottom: -34px; border-radius: 0 0 14px 14px; }

@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topsearch { width: 220px; }
}
@media (max-width: 1080px) {
  .two, .halves { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; margin: 0; width: 100%; border-radius: 0; min-height: 100vh; }
  .side { position: fixed; inset: 0 auto 0 0; width: 264px; height: 100vh; z-index: 70; transform: translateX(-100%); transition: transform .25s; }
  .shell.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .side-tools #collapse { display: none; }
  .browser-view { height: 460px; }
  .mobile-menu { display: grid; }
  .topbar { padding: 16px 16px 0; flex-wrap: wrap; }
  .topbar .hello { flex-basis: calc(100% - 152px); }
  .topsearch { order: 3; width: 100%; }
  .topbar .opt { display: none; }
  .main { padding: 18px 16px 40px; }
  h1 { font-size: 26px; }
  .search .input { width: 100%; }
  .search { flex: 1; }
  .form-row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .hide-sm { display: none; }
  .table-box { margin: 12px 0 0; border-left: 0; border-right: 0; border-radius: 0; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
}

/* ── Moteurs IA ────────────────────────────────────────────────────────── */
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flow > i { flex: 1; min-width: 18px; height: 2px; background: repeating-linear-gradient(90deg, var(--hairline-2) 0 6px, transparent 6px 10px); }
.flow-step { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--hairline); }
.flow-step svg { grid-row: span 2; width: 18px; height: 18px; color: var(--muted); }
.flow-step b { font-size: 13.5px; font-weight: 650; }
.flow-step small { color: var(--muted); font-size: 11.5px; }
.flow-step.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.flow-step.on svg { color: var(--blue); }
.custom-box { transition: box-shadow .2s, border-color .2s; }
.custom-box.highlight { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input[type="range"] { width: 100%; accent-color: var(--blue); }
.levers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.levers > div { background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; }
.levers b { font-size: 13.5px; }
.levers p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* ── Contenus ──────────────────────────────────────────────────────────── */
.post-thumb { width: 54px; height: 40px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; overflow: hidden; flex: none; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb svg { width: 18px; height: 18px; }
.md-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.md-tools .btn { height: 28px; padding: 0 9px; font-size: 12.5px; background: var(--paper-2); }
textarea.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.6; }
.post-preview { background: #FBF8EE; color: #1E1E1B; border-radius: 14px; padding: 22px; border: 1px solid rgba(30,30,20,.08); max-height: 760px; overflow-y: auto; }
.post-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.post-preview .pv-tag { display: inline-block; font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #223CE2; background: rgba(34,60,226,.08); border-radius: 6px; padding: 2px 8px; }
.post-preview h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 30px; line-height: 1.12; margin: 12px 0 8px; letter-spacing: -.01em; }
.post-preview h3 em { color: #223CE2; }
.post-preview .pv-excerpt { color: #66655E; font-size: 16px; margin: 0 0 6px; }
.post-preview .pv-excerpt:empty { display: none; }
.post-preview .pv-meta { color: #66655E; font-size: 12.5px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(30,30,20,.08); }
.post-preview .pv-body { font-size: 15px; line-height: 1.7; }
.post-preview .pv-body h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 22px; margin: 22px 0 6px; }
.post-preview .pv-body p.intro { font-size: 17px; }
.post-preview .pv-body blockquote { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 3px solid #223CE2; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 19px; }
.post-preview .pv-body .note { background: #fff; border: 1px solid rgba(30,30,20,.08); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.post-preview .pv-body .note p { margin: 4px 0 0; }
.post-preview .pv-body ul, .post-preview .pv-body ol { padding-left: 20px; }
.post-preview.nouveaute h3 { font-size: 26px; }
@media (max-width: 860px) { .levers { grid-template-columns: 1fr; } .flow > i { display: none; } }

/* ── Offres ────────────────────────────────────────────────────────────── */
.plans-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.plan-admin { display: flex; flex-direction: column; }
.plan-admin .card-body { flex: 1; }
.plan-admin.muted { opacity: .72; }
.plan-price { margin: 16px 0 2px; display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 30px; font-weight: 650; letter-spacing: -.03em; }
.plan-price span { color: var(--muted); font-size: 13px; }
.price-hint.warn { color: var(--red); }
details.more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.pp-stage { background: #FBF8EE; border-radius: 14px; padding: 34px 22px 22px; display: grid; place-items: center; }
.pp-card { position: relative; width: min(330px, 100%); background: #fff; color: #1E1E1B; border: 1.5px solid rgba(30,30,20,.1); border-radius: 24px; padding: 44px 22px 24px; }
.pp-card.pop { border: 2px solid #1E1E1B; }
.pp-sticker { position: absolute; top: -16px; left: 50%; transform: translateX(-50%) rotate(-4deg); font: 600 17px "Playfair Display", Georgia, serif; padding: 5px 16px; border-radius: 999px; background: #FF6B4A; color: #fff; white-space: nowrap; box-shadow: 0 5px 0 rgba(0,0,0,.08); }
.pp-sticker.pro { background: #E3E7FF; color: #14228F; transform: translateX(-50%) rotate(2deg); }
.pp-for { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #66655E; margin: 0 0 8px; }
.pp-price { font-family: "Playfair Display", Georgia, serif; font-size: 40px; line-height: 1.05; margin: 0; }
.pp-price small { font-family: Inter, sans-serif; font-size: 15px; color: #66655E; }
.pp-sub { font-size: 12.5px; color: #66655E; margin: 6px 0 18px; }
.pp-btn { display: block; text-align: center; border: 1.5px solid #1E1E1B; border-radius: 999px; padding: 10px; font-weight: 600; font-size: 14px; }
.pp-btn.pill { background: #223CE2; border-color: #223CE2; color: #fff; }
.pp-inc { font-style: italic; color: #66655E; font-size: 13.5px; margin: 20px 0 10px; }
.pp-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; }
.pp-card li::before { content: "✓  "; font-weight: 700; }
.pp-badge { position: absolute; right: 18px; top: 18px; font-size: 11.5px; font-weight: 650; color: #223CE2; background: rgba(34,60,226,.08); border-radius: 6px; padding: 2px 8px; }
table.cmp td { padding: 6px 8px; }
table.cmp td .input { width: 100%; height: 32px; }
table.cmp .cmp-cell { text-align: center; min-width: 110px; }
table.cmp tr.cmp-group td { background: var(--paper); }
table.cmp tr.cmp-group .input { font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; }
.cmp-act { white-space: nowrap; width: 1%; }
.cmp-act .btn { width: 28px; height: 28px; }

/* Menu : un fondu en bas signale qu'il reste des entrées à faire défiler. */
.side-scroll { -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); padding-bottom: 22px; }

/* Outils du bas : une seule ligne d'icônes, le menu garde toute la hauteur. */
.side-tools { display: flex !important; gap: 4px; justify-content: space-between; }
.tool-btn { flex: 1; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.tool-btn:hover { background: var(--hairline); color: var(--ink); text-decoration: none; }
.tool-btn.on, .tool-btn.active { background: var(--card); color: var(--blue); box-shadow: var(--shadow-sm), 0 0 0 1px var(--hairline); }
.tool-btn svg { width: 17px; height: 17px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-link { padding-top: 6px; padding-bottom: 6px; }
.nav-sep { margin: 7px 8px; }
.brand { padding-bottom: 16px; }
@media (min-width: 861px) { .shell.slim .side-tools { flex-direction: column; } }
/* Bandeau d'annonce piloté depuis la console (site_settings.topbar) */
.topbar.tb { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 44px; font-size: 14px; line-height: 1.3; }
.tb.tb-nuit { background: #0E1440; color: #E6E9FF; }
.tb.tb-bleu { background: #223CE2; color: #fff; }
.tb.tb-orange { background: #F26B1D; color: #fff; }
.tb.tb-clair { background: #F3F0E8; color: #1E1E1B; border-bottom: 1px solid rgba(30,30,20,.08); }
.tb.tb-degrade { background: linear-gradient(90deg, #0E1440, #223CE2, #7B5CFF, #0E1440); color: #fff; }
.tb .tb-track { position: relative; width: 100%; max-width: 1100px; height: 38px; }
.tb .tb-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(100%); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.tb .tb-msg.on { opacity: 1; transform: none; }
.tb .tb-msg.out { opacity: 0; transform: translateY(-100%); }
.tb a.tb-msg:hover .tb-text { text-decoration: underline; text-underline-offset: 3px; }
.tb .tb-text { overflow: hidden; text-overflow: ellipsis; }
.tb .tb-badge { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.16); }
.tb.tb-clair .tb-badge { background: #223CE2; color: #fff; }
.tb .tb-arrow { flex: none; transition: transform .2s ease; }
.tb a.tb-msg:hover .tb-arrow { transform: translateX(3px); }
.tb .tb-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .7; font-size: 17px; line-height: 1; cursor: pointer; }
.tb .tb-close:hover { opacity: 1; background: rgba(255,255,255,.14); }
/* Défilement continu */
.tb.fx-defilement .tb-track { display: flex; overflow: hidden; max-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tb.fx-defilement .tb-loop { display: flex; flex: none; gap: 56px; padding-right: 56px; animation: tb-marquee var(--tb-dur, 30s) linear infinite; }
.tb.fx-defilement .tb-msg { position: static; opacity: 1; transform: none; flex: none; }
.tb.fx-defilement:hover .tb-loop { animation-play-state: paused; }
@keyframes tb-marquee { to { transform: translateX(-100%); } }
/* Reflet lumineux */
.tb.fx-reflet::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-100%); animation: tb-shine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes tb-shine { 60%, 100% { transform: translateX(100%); } }
/* Dégradé animé */
.tb.fx-degrade { background-size: 300% 100% !important; animation: tb-flow 9s ease-in-out infinite alternate; }
.tb.fx-degrade:not(.tb-degrade) { background-image: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.18), rgba(255,255,255,0)); }
@keyframes tb-flow { to { background-position: 100% 0; } }
/* Badge qui pulse */
.tb.fx-pulse .tb-badge { animation: tb-pulse 1.8s ease-out infinite; }
@keyframes tb-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 100% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } }
.tb.tb-clair.fx-pulse .tb-badge { animation-name: tb-pulse-blue; }
@keyframes tb-pulse-blue { 0% { box-shadow: 0 0 0 0 rgba(34,60,226,.5); } 100% { box-shadow: 0 0 0 9px rgba(34,60,226,0); } }
@media (max-width: 640px) { .topbar.tb { padding: 0 36px 0 12px; font-size: 13px; } .tb .tb-badge { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .tb .tb-msg { transition: none; }
  .tb.fx-defilement .tb-loop, .tb.fx-reflet::after, .tb.fx-degrade, .tb.fx-pulse .tb-badge { animation: none; }
}
.form-row.three { grid-template-columns: repeat(3, 1fr); }
input[type=range] { width: 100%; accent-color: var(--blue); }
.tb-stage { border-radius: 12px; overflow: hidden; border: 1px solid var(--hairline); background: #fff; }
.tb-stage.off .topbar { opacity: .35; }
.tb-stage-nav { display: flex; align-items: center; gap: 18px; padding: 14px 18px; }
.tb-stage-nav i { display: block; width: 64px; height: 8px; border-radius: 9px; background: #E9E6DD; }
.tb-stage-nav i:first-child { width: 96px; background: #1E1E1B; }
.tb-stage-nav b { margin-left: auto; font-size: 12px; background: #1E1E1B; color: #fff; padding: 6px 12px; border-radius: 99px; }
.tb-row { display: grid; grid-template-columns: 110px 1.6fr 1fr 150px auto; gap: 8px; margin-bottom: 8px; }
.tb-row-tools { display: flex; gap: 4px; }
@media (max-width: 1100px) { .tb-row { grid-template-columns: 1fr 1fr; } .tb-row [name=text] { grid-column: 1 / -1; order: -1; } .form-row.three { grid-template-columns: 1fr; } }
/* Notifications : choix du type et aperçu de l'app */
.kind-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.kind-picker button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hairline); background: var(--card); color: var(--muted); border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.kind-picker button svg { width: 15px; height: 15px; }
.kind-picker button.on { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.np-window { position: relative; background: #F4F1EA; border-radius: 14px; border: 1px solid rgba(30,30,20,.1); overflow: hidden; color: #1E1E1B; font-size: 12px; }
.np-pop { color: #1E1E1B; font-size: 12px; }
.np-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; }
.np-bar > span { width: 9px; height: 9px; border-radius: 50%; background: #E0DCD2; }
.np-icons { margin-left: auto; display: flex; gap: 8px; }
.np-icons i { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid rgba(30,30,20,.1); display: grid; place-items: center; position: relative; }
.np-icons svg { width: 13px; height: 13px; }
.np-bell b { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: #F26B1D; border: 2px solid #F4F1EA; }
.np-body { display: grid; grid-template-columns: 1fr 44%; gap: 12px; margin: 0 10px 10px; background: #fff; border-radius: 12px; padding: 14px; }
.np-hello { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.np-hello em { color: #223CE2; font-style: normal; }
.np-hero { height: 64px; border-radius: 10px; background: linear-gradient(135deg, #1A2BB0, #223CE2); margin-bottom: 10px; }
.np-line { height: 8px; border-radius: 9px; background: #EEEBE3; margin-bottom: 7px; }
.np-line.short { width: 60%; }
.np-rail { display: grid; gap: 10px; align-content: start; }
.np-stats { background: #F4F1EA; border-radius: 10px; padding: 10px; line-height: 1.7; color: #66655E; }
.np-stats b { color: #1E1E1B; font-size: 14px; }
.np-card { position: relative; background: #F4F1EA; border-radius: 10px; padding: 12px; display: grid; gap: 6px; transition: opacity .2s; }
.np-card.important { background: #FFF4EC; box-shadow: inset 0 0 0 1.5px #F26B1D; }
.np-card.off { opacity: .25; }
.np-card b { font-size: 13px; padding-right: 16px; }
.np-card p { margin: 0; color: #66655E; line-height: 1.45; }
.np-x { position: absolute; top: 8px; right: 10px; color: #8B8A82; }
.np-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.np-kind svg, .np-ico svg { width: 12px; height: 12px; }
.np-btn { justify-self: start; margin-top: 4px; background: #1E1E1B; color: #fff; border-radius: 8px; padding: 6px 11px; font-weight: 600; }
.np-card.important .np-btn { background: #F26B1D; }
.np-pop { position: relative; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.16); border: 1px solid rgba(30,30,20,.08); transition: opacity .2s; }
.np-label { margin: 0 2px 8px; font-size: 12px; font-weight: 650; color: var(--muted); }
.np-window + .np-label { margin-top: 16px; }
.np-pop.off { opacity: .3; }
[hidden] { display: none !important; }
.np-pop-head { display: flex; justify-content: space-between; padding: 10px 12px; font-weight: 700; border-bottom: 1px solid rgba(30,30,20,.06); }
.np-pop-head span { font-weight: 500; color: #223CE2; }
.np-item { display: grid; grid-template-columns: 26px 1fr 8px; gap: 9px; padding: 10px 12px; }
.np-item b { display: block; }
.np-item p { margin: 2px 0; color: #66655E; line-height: 1.4; }
.np-item small { color: #8B8A82; }
.np-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #EEF0FD; color: #223CE2; }
.np-dot { width: 8px; height: 8px; border-radius: 50%; background: #223CE2; margin-top: 4px; }
.k-nouveaute { color: #223CE2; } .np-ico.k-nouveaute { background: #EEF0FD; }
.k-evenement { color: #1F8A4C; } .np-ico.k-evenement { background: #E6F5EC; }
.k-maintenance { color: #C25A12; } .np-ico.k-maintenance { background: #FFF1E6; }
.k-abonnement { color: #C8312B; } .np-ico.k-abonnement { background: #FDECEB; }
.k-promo { color: #7B5CFF; } .np-ico.k-promo { background: #F1EDFF; }
.k-info { color: #66655E; } .np-ico.k-info { background: #F1EFE9; }
.kind-picker button.on.k-nouveaute, .kind-picker button.k-nouveaute:hover { color: #223CE2; }
/* Barre latérale immobile : sur ordinateur, seule la colonne de droite défile. */
@media (min-width: 861px) {
  html { scrollbar-gutter: auto; }
  body { overflow: hidden; }
  .shell { height: calc(100vh - 40px); min-height: 0; }
  .side { position: relative; top: 0; height: 100%; }
  .content { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
}
/* Bouton retour du portal */
.back-btn { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 8px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; flex: none; transition: background .15s, transform .15s; }
.back-btn svg { width: 18px; height: 18px; transition: transform .15s; }
.back-btn:hover { background: var(--paper-2); }
.back-btn:hover svg { transform: translateX(-2px); }
.back-btn:active { transform: scale(.97); }
.crumbs { display: flex; align-items: center; gap: 4px; }
.crumbs svg { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 860px) { .back-btn span { display: none; } .back-btn { padding: 0 8px; } }
/* Page normale : le portal occupe toute la fenêtre, sans cadre ni marge autour. */
body { background: var(--frame); }
.shell { width: 100%; max-width: none; margin: 0; min-height: 100vh; border-radius: 0; box-shadow: none; }
.side { top: 0; height: 100vh; }
.main { max-width: 1680px; }
@media (min-width: 861px) {
  .shell { height: 100vh; }
}
