/* Cockpit nuit — direction B. Chargée après style.css. Aucun style inline. */

:root {
  --glide: cubic-bezier(.4, 0, .2, 1);
  background-color: #08080A;
  background-image: radial-gradient(880px 260px at 50% -40px, rgba(255, 255, 255, .05), transparent 70%);
  min-height: 100%;
}

html,
body {
  min-height: 100%;
  background-color: #08080A;
  background-image: radial-gradient(880px 260px at 50% -40px, rgba(255, 255, 255, .05), transparent 70%);
  color: #F4F4F5;
}

body { min-height: 100vh; }

::selection { background: rgba(229, 41, 60, .35); }

button,
a,
input,
select,
textarea,
summary { -webkit-tap-highlight-color: rgba(255, 255, 255, .08); }

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 2px solid #FF8A96; outline-offset: 3px; }

.site-header { border-bottom-color: rgba(255, 255, 255, .07); }

.header-inner,
main { max-width: min(1440px, calc(100% - 64px)); margin-left: auto; margin-right: auto; }

main { padding: 12px 32px 32px; }

h1 { font-size: 24px; line-height: 1.15; letter-spacing: -.03em; }

.page-heading { align-items: flex-end; margin-bottom: 10px; }

.menu-toggle { border-radius: 12px; }

.menu-toggle:hover { background: #17171B; }

#navigation {
  background: #111114;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 240ms var(--glide), transform 240ms var(--glide);
}

#navigation.is-open { opacity: 1; transform: none; pointer-events: auto; }

#navigation a:hover,
.menu-action:hover { background: rgba(255, 255, 255, .05); }

#navigation a[aria-current="page"],
#navigation a[aria-current="page"]:hover { color: #FF8A96; }

.button { border-color: rgba(255, 255, 255, .1); border-radius: 10px; background: transparent; }

.button.primary,
.button.primary:hover,
.button.primary:focus-visible {
  background: #C41628;
  border-color: #C41628;
  color: #fff;
}

.button.primary:hover { background: #A91020; border-color: #A91020; }

.button.quiet:hover { background: #17171B; border-color: rgba(255, 255, 255, .16); }

.metrics,
.business-metrics {
  gap: 16px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.business-metrics { grid-template-columns: 1.25fr 1fr 1fr; }

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.kpi-grid .revenue-period { grid-column: span 2; }

@media (min-width: 1101px) {
  .kpi-grid .stock-value-metric,
  .kpi-grid .funds-metric { grid-column: span 2; }
}

.kpi-grid .metric-value { white-space: normal; overflow-wrap: anywhere; }

.metric-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 4px;
}

.metric-badge {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  color: #F4F4F5;
  letter-spacing: 0;
  white-space: nowrap;
}

.kpi-grid .metric {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.kpi-grid .metric > :last-child { margin-top: auto; }

.metric,
.weekly-chart,
.daily-comparison,
.table-wrap,
.auth-panel,
.detail-content,
.empty,
.repricer-banner,
.cockpit-card {
  background: #111114;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.metric,
.weekly-chart,
.daily-comparison,
.auth-panel,
.detail-content,
.repricer-banner { position: relative; }

.metric,
.weekly-chart,
.daily-comparison { overflow: hidden; padding: 12px 16px; }

.cockpit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(320px circle at 50% 0%, rgba(255, 255, 255, .09), transparent 55%);
  transition: opacity 120ms ease-out;
}

.metric:hover::before,
.weekly-chart:hover::before,
.daily-comparison:hover::before,
.auth-panel:hover::before,
.metric:has(.is-missing)::before,
.weekly-chart:has(.is-missing)::before,
.daily-comparison:has(.is-missing)::before,
.table-wrap::before { opacity: 0; }

.metric > *:not(.sr-only),
.weekly-chart > *:not(.sr-only),
.daily-comparison > *:not(.sr-only),
.auth-panel > *:not(.sr-only) { position: relative; z-index: 1; }

.metric h2 { margin-bottom: 8px; font-weight: 500; letter-spacing: 0; }

.metric-period {
  display: block;
  margin-top: 2px;
  color: #F4F4F5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.metric-value {
  margin-bottom: 6px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.03em;
}

.business-metrics .metric-value { font-size: 26px; }

.profit-metric .metric-value { font-size: 30px; }

.kpi-grid .metric-value,
.kpi-grid .profit-metric .metric-value { font-size: 28px; }

.metric-value.is-missing,
.chart-amount.is-missing,
.sales-change.is-missing,
.numeric.is-missing,
strong.is-missing {
  color: #F4F4F5;
  text-shadow: none;
  filter: none;
}

.rise { animation: cockpit-rise 320ms var(--ease) both; }

.d0 { animation-delay: 0ms; }
.d1 { animation-delay: 40ms; }
.d2 { animation-delay: 80ms; }
.d3 { animation-delay: 120ms; }
.d4 { animation-delay: 160ms; }
.d5 { animation-delay: 200ms; }
.d6 { animation-delay: 240ms; }
.d7 { animation-delay: 280ms; }

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

.numeric,
.metric-value,
.chart-amount,
.repricer-table td,
.repricer-table strong {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "calt" 0, "frac" 0, "numr" 0, "dnom" 0, "sups" 0, "subs" 0, "ordn" 0;
  font-variant-position: normal;
  vertical-align: baseline;
}

.sales-charts {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.daily-comparison { border-left: 0; padding-left: 16px; }

.chart-heading { min-height: 0; margin-bottom: 8px; }

.chart-heading h2 { font-size: 13px; font-weight: 500; color: #A1A1AA; }

.chart-heading p,
.chart-date,
.chart-source,
.chart-partial { color: #A1A1AA; }

.chart-heading .sales-change { color: #F4F4F5; font-size: 16px; font-weight: 600; }

.sales-change.is-down { color: #FF8A96; }

.sales-change.is-up { color: #34D399; }

.sales-change.is-missing { color: #A1A1AA; font-size: 13px; font-weight: 500; }

.sales-chart-svg { height: 120px; overflow: hidden; }

.curve-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }

.curve-area { fill: #fff; opacity: .05; }

.curve-line {
  fill: none;
  stroke: #F4F4F5;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.curve-partial {
  fill: none;
  stroke: #A1A1AA;
  stroke-width: 2;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.chart-baseline { stroke: rgba(255, 255, 255, .08); }

.table-wrap { padding: 4px 16px 8px; overflow: auto; }

.auth-panel { max-width: 440px; margin: 28px auto 0; padding: 28px 24px 8px; }

dialog {
  background: #111114;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.field > input,
.field > select,
.field > textarea,
.inline-select,
.month-control input {
  background: #08080A;
  color: #F4F4F5;
  border-color: #6A6A74;
  border-radius: 10px;
}

.repricer-banner.repricer-simulation {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 0;
  border-left: 3px solid #E5293C;
  border-radius: 0;
  color: #F4F4F5;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
}

.repricer-banner.repricer-prices {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 0;
  border-left: 3px solid #A1A1AA;
  border-radius: 0;
  background: transparent;
  color: #F4F4F5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: break-word;
}

.preprod-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid #E5293C;
  background: #17171B;
  color: #F4F4F5;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
}

.purchase-sources:not([open]) > :not(summary),
.purchase-roi:not([open]) > :not(summary) { display: none; }

.purchase-sources p,
.purchase-roi p { overflow-wrap: break-word; }

.purchase-compact { display: none; }

.purchase-table td { padding-top: 8px; padding-bottom: 8px; }

.purchase-roi > summary,
.purchase-sources > summary { cursor: pointer; }

@media (max-width: 600px) {
  .purchase-table tr { padding-top: 8px; padding-bottom: 8px; }
  .purchase-table td.product-cell { margin-bottom: 0; }
  .purchase-table .purchase-compact { display: block; margin: 2px 0 0; }
  .purchase-table tr:not(:has(details.purchase-sources[open])) > .purchase-extra:not(.purchase-roi-cell) { display: none; }
  .purchase-table tr:has(details.purchase-sources[open]) .purchase-compact { display: none; }
  .purchase-table td[data-label="Étape"] { flex-wrap: wrap; align-items: center; }
  .purchase-table .inline-select { max-width: 9.5rem; }
  .purchase-table tr.purchase-group {
    border-top: 0;
    padding-top: 12px;
    padding-bottom: 0;
  }
  .purchase-table .purchase-group th {
    display: block;
    width: 100%;
    border: 0;
    padding-right: 0;
    padding-left: 0;
    overflow: visible;
    text-overflow: clip;
  }
  .purchase-table .purchase-group-bar { width: 100%; }
  .purchase-table .purchase-subtotal {
    margin-left: auto;
    text-align: right;
  }
}

.repricer-margin-alert,
.repricer-margin-alert .cell-secondary,
.floor-warning,
.roi-fail { color: #E5293C; }

.roi-pass { color: #4CC38A; }

.floor-warning { border-color: #FF8A96; }

.qonto-panel,
.sales-charts,
.stock-alerts { border-color: rgba(255, 255, 255, .07); }

#notice { border-color: rgba(255, 255, 255, .16); background: #111114; }

.empty { padding: 20px 16px; }

@media (max-width: 900px) {
  .header-inner,
  main { padding-left: 16px; padding-right: 16px; }
  .business-metrics,
  .sales-charts { grid-template-columns: 1fr; }
  .metric-value,
  .business-metrics .metric-value,
  .profit-metric .metric-value { font-size: 28px; }
}

.revenue-period { overflow: visible; }
.revenue-period .metric-title-row { flex-direction: column; align-items: stretch; gap: 8px; }
.revenue-period .metric-caption { min-height: 2.8em; min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.revenue-period .cell-secondary { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; min-width: 0; max-width: 100%; }
.revenue-period .period-note { flex: 1 1 12em; min-width: 0; max-width: 100%; overflow: visible; text-overflow: unset; white-space: normal; overflow-wrap: break-word; }
.revenue-period .cell-secondary .link-button { flex: 0 0 auto; margin: 0; min-height: 24px; padding: 0; font-size: 11px; position: relative; z-index: 1; white-space: nowrap; }
.revenue-period > .source { position: relative; z-index: 1; }
.revenue-period .metric-value { transition: opacity 180ms linear; }
.revenue-period .metric-value.is-pending { opacity: .45; }

.period-control { position: relative; max-width: 100%; }
.period-switch {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 100%;
  overflow: visible;
  scrollbar-width: none;
}
.period-switch::-webkit-scrollbar { display: none; }
.period-thumb {
  position: absolute;
  z-index: 0;
  top: 2px;
  bottom: 2px;
  left: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  pointer-events: none;
}
.period-thumb.is-ready { transition: left 260ms var(--glide), width 260ms var(--glide), top 260ms var(--glide), height 260ms var(--glide); }
.period-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #A1A1AA;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color 150ms linear;
}
.period-radios { display: contents; }
.period-option[aria-checked="true"],
.period-custom.is-current { color: #F4F4F5; }
.period-option:hover { color: #F4F4F5; background: transparent; }
.period-option:focus { outline: none; }
.period-option:focus-visible { outline: 2px solid #FF8A96; outline-offset: 2px; }

.weekly-chart { overflow: visible; }
.curve-frame { position: relative; height: 120px; }
.curve-frame .sales-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.curve-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% / 7);
  opacity: 0;
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 240ms var(--glide), opacity 150ms linear;
  pointer-events: none;
}
.curve-guide.is-on { opacity: 1; }
.curve-guide::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, .14);
  transform: translateX(-0.5px);
}
.curve-dot {
  position: absolute;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  box-sizing: border-box;
  background: #08080A;
  border: 2px solid #F4F4F5;
  pointer-events: none;
  transform: scale(1);
  transition: transform 240ms var(--glide), box-shadow 240ms var(--glide);
}
.curve-dot.is-today { background: #E5293C; border-color: #E5293C; }
.curve-dot.is-partial { border-style: dashed; }
.curve-dot.is-missing { background: transparent; border: 2px solid #6A6A74; }
.curve-dot.is-active { transform: scale(1.4); box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.curve-dot.is-today.is-active { box-shadow: 0 0 0 4px rgba(229, 41, 60, .25); }
.curve-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  touch-action: pan-y;
}
.curve-hit:focus-visible { outline: 2px solid #FF8A96; outline-offset: 3px; }
.curve-col { min-height: 44px; }
.chart-tip {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  max-width: calc(100% - 16px);
  padding: 6px 10px;
  border-radius: 10px;
  background: #1E1E23;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  color: #F4F4F5;
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms linear, transform 240ms var(--glide);
}
.chart-tip.is-on { opacity: 1; transition-duration: 160ms, 240ms; }
.chart-tip-date, .chart-tip-values { display: block; white-space: nowrap; }
.chart-tip-date { color: #A1A1AA; }
@keyframes tip-fade { 0% { opacity: 1; } 45% { opacity: .6; } 100% { opacity: 1; } }
.chart-tip.is-fading .chart-tip-date, .chart-tip.is-fading .chart-tip-values { animation: tip-fade 120ms linear; }
.chart-labels li { transition: color 150ms linear; }
.chart-labels li.is-active, .chart-labels li.is-active .chart-date, .chart-labels li.is-active .chart-amount { color: #F4F4F5; }
.html-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 120px; align-items: end; }
.html-bar-col { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.html-bar { display: block; width: 28px; height: var(--h, 0%); border-radius: 6px; background: rgba(244, 244, 245, .82); }
.html-bar.is-partial { background: #A1A1AA; }
.html-bar.is-today { background: #E5293C; }
.html-bar.is-zero { height: 2px; width: 28px; background: #F4F4F5; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid .revenue-period { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .period-option { min-height: 44px; }
}

@media (max-width: 600px) {
  .metrics:not(.stock-metrics) { grid-template-columns: 1fr; }
  .kpi-grid .revenue-period { grid-column: auto; }
  .metrics.kpi-grid .metric-value { font-size: 28px; }
  .revenue-period .metric-title-row { flex-direction: column; align-items: stretch; }
  .period-control, .period-switch { width: 100%; min-width: 0; }
}

@media (max-width: 420px) {
  .period-option { padding: 6px 8px; font-size: 12px; }
}

.chart-euro-legend { display: none; }

@media (max-width: 390px) {
  .sales-charts .chart-amount {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
  }
  .chart-euro-legend { display: inline; }
}

.stock-table {
  max-width: 100%;
}
.stock-table table {
  width: 100%;
  table-layout: fixed;
}
.stock-table th,
.stock-table td,
.stock-table .product-title,
.stock-table .cell-secondary,
.stock-table strong {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 1440px) {
  .stock-table th,
  .stock-table td,
  .stock-table strong {
    white-space: normal;
    overflow-wrap: break-word;
  }
}

@media (max-width: 390px) {
  .table-wrap.stock-table {
    max-width: 100%;
    overflow-x: auto;
  }
  .stock-table th,
  .stock-table td,
  .stock-table strong {
    white-space: normal;
    overflow-wrap: break-word;
  }
}

.product-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 12px;
}

.product-kpi {
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: #111114;
}

.product-kpi h2 {
  margin: 0 0 4px;
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 500;
}

.product-kpi p {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
}

.product-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.product-chip {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: transparent;
  color: #F4F4F5;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
}

.product-chip.is-current {
  background: #F4F4F5;
  color: #111114;
  border-color: #F4F4F5;
}

.stock-table table,
.repricer-table table { table-layout: auto; }

.purchase-table { overflow-x: clip; }

.purchase-table table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.purchase-col-qty { width: 8%; }
.purchase-col-amount { width: 12%; }
.purchase-col-unit { width: 9%; }
.purchase-col-stage { width: 16%; }
.purchase-col-roi { width: 13%; }

.purchase-table th,
.purchase-table td.product-cell {
  overflow: hidden;
  min-width: 0;
}

.purchase-table th {
  text-overflow: ellipsis;
}

.stock-table th,
.repricer-table th,
.purchase-table th,
.stock-table td,
.repricer-table td,
.purchase-table td { vertical-align: middle; }

.stock-table td.numeric,
.repricer-table td.numeric,
.purchase-table td.numeric,
.stock-table th.numeric,
.repricer-table th.numeric,
.purchase-table th.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}

.stock-table td.numeric .cell-secondary,
.repricer-table td.numeric .cell-secondary,
.purchase-table td.numeric .cell-secondary {
  white-space: nowrap;
  overflow-wrap: normal;
}

.stock-table td.price-cell .price-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  margin-left: auto;
}

.stock-table td.price-cell.numeric .cell-secondary {
  white-space: normal;
  text-align: right;
}

.stock-table .product-title,
.purchase-table .product-title {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.stock-bar {
  display: flex;
  width: 100%;
  max-width: 148px;
  height: 6px;
  margin: 0 0 4px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
}

.stock-seg { display: block; height: 100%; min-width: 2px; }

.stock-seg-ok { background: #F4F4F5; }

.stock-seg-reserved { background: #6A6A74; }

.stock-seg-inbound {
  background: repeating-linear-gradient(-45deg, #C4C4CC 0 2px, transparent 2px 4px);
}

.stock-seg-dead { background: #E5293C; }

.stock-seg-empty { background: transparent; min-width: 0; }

.cover-badge,
.advice-badge,
.roi-badge {
  display: inline-block;
  max-width: 100%;
  padding: 1px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cover-badge { color: #F4F4F5; border-color: rgba(255, 255, 255, .28); }

.cover-badge.is-missing { color: #A1A1AA; border-style: dashed; }

.cover-badge.is-urgent,
.advice-down,
.roi-badge-fail {
  color: #E5293C;
  border-color: color-mix(in srgb, #E5293C 45%, transparent);
  background: color-mix(in srgb, #E5293C 8%, transparent);
}

.advice-keep,
.roi-badge-pass {
  color: #4CC38A;
  border-color: color-mix(in srgb, #4CC38A 45%, transparent);
  background: color-mix(in srgb, #4CC38A 8%, transparent);
}

.advice-align {
  color: #6B9FE8;
  border-color: color-mix(in srgb, #6B9FE8 45%, transparent);
  background: color-mix(in srgb, #6B9FE8 8%, transparent);
}

.advice-missing,
.roi-badge-missing {
  color: #A1A1AA;
  border-color: color-mix(in srgb, #A1A1AA 45%, transparent);
  background: color-mix(in srgb, #A1A1AA 8%, transparent);
}

.stock-spark { display: block; width: 72px; height: 22px; margin-left: auto; }

.stock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  color: #A1A1AA;
  font-size: 11px;
}

.stock-legend > span { display: inline-flex; align-items: center; gap: 6px; }

.stock-swatch {
  display: inline-block;
  width: 16px;
  height: 8px;
  border-radius: 2px;
}

.purchase-table .inline-select {
  width: 100%;
  min-height: 28px;
  max-width: 100%;
  padding: 2px 1.6rem 2px 8px;
  font-size: 12px;
}

.row-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  max-width: 100%;
}

.purchase-group th {
  padding-top: 14px;
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 600;
}

.purchase-group-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.roi-reason {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  margin-left: auto;
  color: #A1A1AA;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stock-table .product-sku-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
  max-width: 100%;
}

.stock-table .product-detail {
  display: inline;
  min-width: 0;
}

.stock-table .product-detail > summary {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.stock-table .product-detail[open] {
  flex: 1 0 100%;
  display: block;
}

.repricer-table .product-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 801px) {
  .repricer-table .product-cell {
    max-width: 32ch;
    min-width: 0;
    overflow: hidden;
  }
}

.repricer-table tr.repricer-offer td { border-bottom: 0; }

.repricer-table td.repricer-why-cell {
  max-width: none;
  padding-top: 0;
  overflow: visible;
  white-space: normal;
}

.repricer-table td.repricer-why-cell .source p {
  min-width: 0;
  max-width: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.purchase-table td { padding-top: 6px; padding-bottom: 6px; }

.stock-table td,
.repricer-table td { padding-top: 6px; padding-bottom: 6px; }

@media (max-width: 800px) {
  .product-kpis { grid-template-columns: 1fr 1fr; }
  .product-kpi p { font-size: 18px; }
  .stock-table td.stock-cell,
  .stock-table td.spark-cell,
  .stock-table td[data-label="Vendus"],
  .stock-table td[data-label="Prix · Buy Box"] {
    display: block;
    text-align: right;
  }
  .stock-table td.stock-cell:before,
  .stock-table td.spark-cell:before,
  .stock-table td[data-label="Vendus"]:before,
  .stock-table td[data-label="Prix · Buy Box"]:before {
    float: left;
  }
  .stock-bar { max-width: 100%; }
  .repricer-table.table-wrap { overflow: visible; }
  .repricer-table table,
  .repricer-table tbody,
  .repricer-table tr,
  .repricer-table td { display: block; width: 100%; min-width: 0; }
  .repricer-table thead { display: none; }
  .repricer-table tr { border-top: 1px solid rgba(255, 255, 255, .12); padding: 12px 0; }
  .repricer-table td {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    border: 0;
    padding: 4px 0;
    text-align: right;
  }
  .repricer-table td:before {
    content: attr(data-label);
    margin-right: auto;
    color: #A1A1AA;
    font-size: 11px;
    text-align: left;
  }
  .repricer-table td.product-cell { display: block; text-align: left; max-width: none; }
  .repricer-table td.product-cell:before { display: none; }
  .repricer-table td.repricer-why-cell { display: block; text-align: left; justify-content: flex-start; }
  .repricer-table td.repricer-why-cell:before { content: none; }
}

@media (max-width: 390px) {
  .product-kpis { gap: 8px; }
  .product-kpi { padding: 8px 10px; }
  .product-chip { font-size: 11px; }
  .purchase-table .product-title { max-width: 100%; }
  .advice-badge,
  .roi-badge,
  .cover-badge { max-width: 100%; }
}

.auth-panel .auth-recovery {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 400;
  min-height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
  }
  .rise { animation: none; opacity: 1; transform: none; }
  .curve-dot.is-active { transform: none; }
}

@media (min-width: 801px) {
  body[data-auth-state="authenticated"] #navigation,
  body[data-auth-state="authenticated"] #navigation[hidden] {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    margin: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    border-radius: 0;
    z-index: 30;
  }
  body[data-auth-state="authenticated"] #navigation .menu-actions { margin-top: auto; }
  body[data-auth-state="authenticated"] .menu-toggle { display: none !important; }
  body[data-auth-state="authenticated"] .site-header { margin-left: 220px; }
  body[data-auth-state="authenticated"] main { padding-left: 252px; }
}

.revenue-band {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.home-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-figures .metric { min-height: 148px; }
.home-figures.kpi-grid .stock-value-metric,
.home-figures.kpi-grid .funds-metric,
.home-figures.kpi-grid .cash-metric,
.home-figures.kpi-grid .profit-metric { grid-column: auto; }

.stock-table table { table-layout: fixed; }
.stock-table tbody td { vertical-align: middle; }
.product-decision, .product-rate { display: block; }
.product-rate { font-variant-numeric: tabular-nums; }
.spark-hit { fill: transparent; }
.spark-tip { display: block; min-height: 1.1em; font-size: 12px; color: #A1A1AA; }
.spark-tip:empty { visibility: hidden; }
.stock-spark:focus { outline: 1px solid rgba(255, 255, 255, .35); outline-offset: 2px; }

.stock-table tbody tr:last-child td,
.purchase-table tbody tr:last-child td,
.repricer-table tbody tr:last-child td { border-bottom: 0; }
.table-wrap { padding-bottom: 12px; }

#notice:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: #17171B;
  line-height: 1.45;
}
#notice .button { margin: 0; flex: none; }

@media (max-width: 800px) {
  .revenue-band, .home-figures { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 390px) {
  .revenue-band, .home-figures { grid-template-columns: 1fr; }
}

/* Produits and Repricer stay inside the viewport.
   Money does not break per digit. On a narrow content box the least
   useful columns collapse; their figures stay in Détails / Pourquoi ce prix. */
.table-wrap.stock-table,
.table-wrap.repricer-table {
  max-width: 100%;
  overflow-x: clip;
  container-type: inline-size;
  container-name: catalog;
}

.stock-table table,
.repricer-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.stock-table tbody tr {
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.stock-table th,
.stock-table td,
.repricer-table th,
.repricer-table td { padding: 8px 6px; }

.stock-table th:first-child,
.stock-table td:first-child,
.repricer-table th:first-child,
.repricer-table td:first-child { padding-left: 2px; }

.stock-table th:last-child,
.stock-table td:last-child,
.repricer-table th:last-child,
.repricer-table td:last-child { padding-right: 2px; }

.stock-table td.product-cell,
.repricer-table td.product-cell {
  min-width: 0;
  max-width: none;
  width: auto;
}

.stock-table col.col-product,
.stock-table th.col-product { width: 24%; }

.stock-table col.col-stock,
.stock-table th.col-stock { width: 16%; }

.stock-table col.col-cover,
.stock-table th.col-cover { width: 10%; }

.stock-table col.col-sold,
.stock-table th.col-sold { width: 9%; }

.stock-table col.col-spark,
.stock-table th.col-spark { width: 8%; }

.stock-table col.col-price,
.stock-table th.col-price { width: 17%; }

.stock-table col.col-roi,
.stock-table th.col-roi { width: 8%; }

.stock-table col.col-capital,
.stock-table th.col-capital { width: 8%; }

.repricer-table col.col-product,
.repricer-table th.col-product { width: 22%; }

.repricer-table col.col-now,
.repricer-table th.col-now { width: 9%; }

.repricer-table col.col-box,
.repricer-table th.col-box { width: 13%; }

.repricer-table col.col-advice,
.repricer-table th.col-advice { width: 12%; }

.repricer-table col.col-target,
.repricer-table th.col-target { width: 9%; }

.repricer-table col.col-margin,
.repricer-table th.col-margin { width: 9%; }

.repricer-table col.col-margin-next,
.repricer-table th.col-margin-next { width: 10%; }

.repricer-table col.col-floor,
.repricer-table th.col-floor { width: 8%; }

.repricer-table col.col-action,
.repricer-table th.col-action { width: 8%; }

.stock-table th,
.repricer-table th,
.stock-table th.numeric,
.repricer-table th.numeric {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.25;
  font-size: 11px;
}

.stock-table td.numeric,
.repricer-table td.numeric,
.stock-table td.numeric strong,
.repricer-table td.numeric strong,
.stock-table td.price-cell strong {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.stock-table td.numeric,
.repricer-table td,
.stock-table td.numeric strong,
.repricer-table td.numeric strong { font-size: 12px; }

.stock-table .cell-secondary,
.repricer-table .cell-secondary,
.stock-table td.price-cell,
.stock-table td.price-cell .cell-secondary,
.repricer-table td.col-box,
.repricer-table th.col-box {
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

.stock-table td.price-cell strong { white-space: nowrap; }

.stock-table .stock-bar { max-width: 100%; }

.stock-table .stock-spark {
  width: 100%;
  max-width: 72px;
  height: 22px;
}

.stock-table td.spark-cell { overflow: hidden; }

.repricer-table .advice-badge,
.stock-table .cover-badge {
  white-space: normal;
  line-height: 1.25;
}

.repricer-table td.col-box,
.repricer-table th.col-box { text-align: right; }

.repricer-table td.col-action { text-align: right; }

.repricer-table td.col-action .button.small {
  padding: 4px 8px;
  min-height: 28px;
  white-space: nowrap;
}

@media (min-width: 801px) {
  .stock-table td.numeric,
  .repricer-table td.numeric,
  .repricer-table td.col-box,
  .repricer-table td.col-advice,
  .stock-table td.spark-cell { overflow: hidden; }

  @container catalog (max-width: 860px) {
    .stock-table col.col-spark { visibility: collapse; width: 0; }
    .stock-table th.col-spark,
    .stock-table td.spark-cell { width: 0; max-width: 0; padding-left: 0; padding-right: 0; border-width: 0; overflow: hidden; }
    .repricer-table col.col-margin { visibility: collapse; width: 0; }
    .repricer-table th.col-margin,
    .repricer-table td.col-margin { width: 0; max-width: 0; padding: 0; border-width: 0; overflow: hidden; }
    .stock-table col.col-product,
    .stock-table th.col-product { width: 28%; }
    .stock-table col.col-stock,
    .stock-table th.col-stock { width: 18%; }
    .stock-table col.col-cover,
    .stock-table th.col-cover { width: 10%; }
    .stock-table col.col-sold,
    .stock-table th.col-sold { width: 10%; }
    .stock-table col.col-price,
    .stock-table th.col-price { width: 18%; }
    .stock-table col.col-roi,
    .stock-table th.col-roi { width: 8%; }
    .stock-table col.col-capital,
    .stock-table th.col-capital { width: 8%; }
    .repricer-table col.col-product,
    .repricer-table th.col-product { width: 24%; }
    .repricer-table col.col-now,
    .repricer-table th.col-now { width: 10%; }
    .repricer-table col.col-box,
    .repricer-table th.col-box { width: 15%; }
    .repricer-table col.col-advice,
    .repricer-table th.col-advice { width: 14%; }
    .repricer-table col.col-target,
    .repricer-table th.col-target { width: 10%; }
    .repricer-table col.col-margin-next,
    .repricer-table th.col-margin-next { width: 10%; }
    .repricer-table col.col-floor,
    .repricer-table th.col-floor { width: 8%; }
    .repricer-table col.col-action,
    .repricer-table th.col-action { width: 9%; }
  }

  @container catalog (max-width: 720px) {
    .stock-table col.col-spark,
    .stock-table col.col-capital { visibility: collapse; width: 0; }
    .stock-table th.col-spark,
    .stock-table td.spark-cell,
    .stock-table th.col-capital,
    .stock-table td.col-capital { width: 0; max-width: 0; padding-left: 0; padding-right: 0; border-width: 0; overflow: hidden; }
    .repricer-table col.col-margin,
    .repricer-table col.col-margin-next { visibility: collapse; width: 0; }
    .repricer-table th.col-margin,
    .repricer-table td.col-margin,
    .repricer-table th.col-margin-next,
    .repricer-table td.col-margin-next { width: 0; max-width: 0; padding: 0; border-width: 0; overflow: hidden; }
    .stock-table col.col-product,
    .stock-table th.col-product { width: 32%; }
    .stock-table col.col-stock,
    .stock-table th.col-stock { width: 18%; }
    .stock-table col.col-cover,
    .stock-table th.col-cover { width: 12%; }
    .stock-table col.col-sold,
    .stock-table th.col-sold { width: 12%; }
    .stock-table col.col-price,
    .stock-table th.col-price { width: 16%; }
    .stock-table col.col-roi,
    .stock-table th.col-roi { width: 10%; }
    .repricer-table col.col-product,
    .repricer-table th.col-product { width: 26%; }
    .repricer-table col.col-now,
    .repricer-table th.col-now { width: 12%; }
    .repricer-table col.col-box,
    .repricer-table th.col-box { width: 16%; }
    .repricer-table col.col-advice,
    .repricer-table th.col-advice { width: 14%; }
    .repricer-table col.col-target,
    .repricer-table th.col-target { width: 12%; }
    .repricer-table col.col-floor,
    .repricer-table th.col-floor { width: 9%; }
    .repricer-table col.col-action,
    .repricer-table th.col-action { width: 11%; }
  }
}

@media (max-width: 800px) {
  .stock-table table,
  .repricer-table table { min-width: 0; }
  .stock-table td.numeric,
  .repricer-table td.numeric { white-space: normal; overflow: visible; }
  .stock-table td.price-cell .price-stack { width: auto; max-width: 100%; margin-left: auto; }
  .stock-table td.price-cell strong,
  .repricer-table td.numeric strong {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* v42o hotfix: collapsed columns must not wrap their text per letter
   (otherwise the header and rows grow to ~200 px at 1024–1180). */
@media (min-width: 801px) {
  @container catalog (max-width: 860px) {
    .stock-table th.col-spark,
    .stock-table td.spark-cell,
    .repricer-table th.col-margin,
    .repricer-table td.col-margin { font-size: 0; line-height: 0; white-space: nowrap; visibility: hidden; }
    .stock-table th.col-spark > *,
    .stock-table td.spark-cell > *,
    .repricer-table th.col-margin > *,
    .repricer-table td.col-margin > * { display: none; }
  }
  @container catalog (max-width: 720px) {
    .stock-table th.col-capital,
    .stock-table td.col-capital,
    .repricer-table th.col-margin-next,
    .repricer-table td.col-margin-next { font-size: 0; line-height: 0; white-space: nowrap; visibility: hidden; }
    .stock-table th.col-capital > *,
    .stock-table td.col-capital > *,
    .repricer-table th.col-margin-next > *,
    .repricer-table td.col-margin-next > * { display: none; }
  }
}
