/* Comparateur viagogo — identité visuelle.
   Papier chaud et encre profonde, une seule couleur d'accent (le vert « bonne affaire »),
   Montserrat pour les titres et les prix, IBM Plex Sans pour le texte.
   Toutes les animations passent par transform/opacity et s'effacent si le système le demande. */

@import url('/fonts/fonts.css');

:root {
  /* courbes du marché : palette catégorielle validée (daltonisme, contraste), ordre fixe */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --bg: #f6f5f0;
  --panel: #ffffff;
  --surface: #efeee8;
  --surface-2: #e7e6df;
  --line: rgb(18 19 15 / 8%);
  --line-strong: rgb(18 19 15 / 15%);
  --text: #121311;
  --muted: #676862; /* 4,8:1 sur --surface, 4,5:1 sur --surface-2 */
  --accent: #0b7a53;
  --accent-bright: #12a873;
  --accent-ink: #ffffff;
  --accent-soft: rgb(11 122 83 / 10%);
  --ink: #101211;
  --ink-2: #1a1d1b;
  --ink-text: #f3f4ef;
  --ink-muted: #9da29b;
  --btn: #121311;
  --btn-text: #ffffff;
  --warn: #8a5300;
  --warn-soft: rgb(196 128 18 / 13%);
  --error: #a3271c;
  --error-soft: rgb(190 40 28 / 10%);
  --info-soft: rgb(40 80 200 / 8%);
  --glass: rgb(246 245 240 / 72%);
  --shadow-sm: 0 1px 2px rgb(16 18 17 / 6%);
  --shadow: 0 1px 2px rgb(16 18 17 / 5%), 0 8px 28px -6px rgb(16 18 17 / 12%);
  --shadow-lg: 0 2px 6px rgb(16 18 17 / 8%), 0 24px 60px -12px rgb(16 18 17 / 28%);
  --raised: #ffffff;
  --logo-tile: #121311;
  --logo-ink: #f6f5f0;
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Montserrat', 'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --font-text: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.5, 1);
  color-scheme: light;
  interpolate-size: allow-keywords;
}

@media (prefers-color-scheme: dark) {
  :root {
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --bg: #0a0b0a;
    --panel: #121412;
    --surface: #181b18;
    --surface-2: #20231f;
    --line: rgb(255 255 255 / 7%);
    --line-strong: rgb(255 255 255 / 13%);
    --text: #eef0eb;
    --muted: #8d918a;
    --accent: #3fd096;
    --accent-bright: #5fe3ad;
    --accent-ink: #062014;
    --accent-soft: rgb(63 208 150 / 12%);
    --ink: #060706;
    --ink-2: #111311;
    --btn: #f0f1ec;
    --btn-text: #0b0c0b;
    --warn: #f2b65a;
    --warn-soft: rgb(242 182 90 / 12%);
    --error: #f28b80;
    --error-soft: rgb(242 139 128 / 11%);
    --info-soft: rgb(120 150 255 / 9%);
    --glass: rgb(10 11 10 / 66%);
    --raised: #2a2e29;
    --logo-tile: #1d201d;
    --logo-ink: #eef0eb;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -8px rgb(0 0 0 / 55%);
    --shadow-lg: 0 2px 8px rgb(0 0 0 / 50%), 0 30px 70px -14px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  background: transparent; /* le fond est sur html : le halo passe derrière tout le contenu */
  color: var(--text);
  font: 400 14.5px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); color: var(--text); }

/* Halo d'ambiance : deux lueurs très douces qui dérivent lentement derrière le contenu. */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
  animation-play-state: paused;
}
body:has(.login, .hero)::before, body:has(.login, .hero)::after { opacity: 0.38; animation-play-state: running; }
body::before {
  top: -38vmax; left: -22vmax;
  background: radial-gradient(circle, rgb(18 168 115 / 22%), transparent 62%);
  animation: drift-a 36s ease-in-out infinite alternate paused;
}
body::after {
  top: -30vmax; right: -30vmax;
  background: radial-gradient(circle, rgb(18 168 115 / 9%), transparent 60%);
  animation: drift-b 44s ease-in-out infinite alternate paused;
}
@keyframes drift-a { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(-8vmax, 9vmax, 0) scale(0.94); } }
@media (prefers-color-scheme: dark) { body:has(.login, .hero)::before, body:has(.login, .hero)::after { opacity: 0.45; } }

h1, h2, h3, p { margin: 0; }
h1, h2, .display { font-family: var(--font-display); letter-spacing: -0.025em; }
h1 { font-size: 17px; font-weight: 750; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; font-family: var(--font-text); }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
a { color: var(--accent); text-decoration: none; }
input, select, button, textarea { font: inherit; color: inherit; }
button, a, summary, label, [role="link"], [role="button"] { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.num.reveal { animation: num-reveal 0.6s var(--ease-out) both; }
.num.drop { animation: num-drop 1.6s var(--ease-out); }
@keyframes num-reveal { from { opacity: 0; filter: blur(5px); transform: translateY(0.15em); } }
@keyframes num-drop { 0%, 35% { color: var(--accent-bright); } }

/* ---------- Mise en page ---------- */
.shell { min-height: 100vh; display: flow-root; }
.page {
  max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; view-transition-name: content;
  padding: 22px max(22px, env(safe-area-inset-right)) 140px max(22px, env(safe-area-inset-left));
}
@media (max-width: 640px) { .page { padding: 16px max(16px, env(safe-area-inset-right)) 130px max(16px, env(safe-area-inset-left)); gap: 14px; } body { font-size: 15px; } }

/* ---------- En-tête en verre ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px max(22px, env(safe-area-inset-right)) 12px max(22px, env(safe-area-inset-left));
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border-bottom: 1px solid var(--line);
  view-transition-name: top;
}
.top-inner { max-width: 1180px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: 0; padding: 0; }
.brand .logo { width: 30px; height: 30px; transition: transform 0.5s var(--ease-spring); }
.logo { display: block; flex: none; overflow: visible; border-radius: 28%; }
.logo-tile { fill: var(--logo-tile); }
.logo-line { fill: none; stroke: var(--logo-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo-dot { fill: #3fd096; stroke: var(--logo-tile); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; transition: transform 0.5s var(--ease-spring); }
@media (prefers-color-scheme: dark) { .logo { box-shadow: 0 0 0 1px rgb(255 255 255 / 9%); } }
@media (hover: hover) { .brand:hover .logo-dot { transform: translateY(1.5px); } }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.brand .wordmark small { font: 500 11px var(--font-text); color: var(--muted); letter-spacing: 0.01em; }

.tabs {
  position: fixed; z-index: 31; top: 9px; left: 50%; transform: translateX(-50%);
  display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); view-transition-name: tabs;
}
.tabs button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: color 0.25s var(--ease-out);
}
/* fenêtre moyenne : cinq onglets centrés entre le logo et la pastille */
.pill-short { display: none; }
@media (max-width: 430px) { .pill-long { display: none; } .pill-short { display: inline; } }
@media (min-width: 1041px) and (max-width: 1260px) {
  .brand .wordmark { display: none; }
  .tabs button { padding: 0 11px; }
  .pill-long { display: none; }
  .pill-short { display: inline; }
}
.tabs button:hover { color: var(--text); }
.tabs button svg { width: 17px; height: 17px; transition: transform 0.4s var(--ease-spring); }
.tabs button:active svg { transform: scale(0.85); }
.tabs button[aria-current="page"] { color: var(--text); }
.tab-indicator {
  position: absolute; z-index: 0; top: 4px; left: 0; height: 34px; border-radius: 999px;
  background: var(--raised); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-spring);
}
.tab-indicator.instant { transition: none; }
.count {
  font: 600 10.5px/17px var(--font-text); min-width: 18px; padding: 0 5px; border-radius: 9px; text-align: center;
  background: var(--text); color: var(--bg);
}
.count.bump { animation: bump 0.55s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.35); } }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }

@media (max-width: 1040px) {
  .top { padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
  .tabs {
    position: fixed; z-index: 30; top: auto; transform: none; bottom: calc(10px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
    display: flex; justify-content: space-around; padding: 6px; border-radius: 22px;
    background: var(--glass); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong);
  }
  .tabs button { flex: 1; flex-direction: column; gap: 2px; height: 52px; padding: 0; font-size: 10.5px; border-radius: 16px; }
  .tabs button svg { width: 22px; height: 22px; }
  .tabs button[aria-current="page"] { color: var(--accent); }
  .tab-indicator { top: 6px; height: 52px; border-radius: 16px; background: var(--accent-soft); box-shadow: none; }
  .tabs .count { position: absolute; top: 4px; left: calc(50% + 6px); }
  .tabs button > span:not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
/* téléphone étroit : chaque onglet prend la largeur de son libellé, plus une part égale du reste */
@media (max-width: 360px) { .tabs button { flex: 1 1 auto; font-size: 9.5px; min-width: 0; } }

/* ---------- Pastille de pays ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line); cursor: pointer;
  background: var(--panel); color: var(--muted); transition: background 0.3s, color 0.3s, transform 0.2s var(--ease-out);
}
.pill:active { transform: scale(0.96); }
.pill[data-tone="ok"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
@media (prefers-color-scheme: light) { .pill[data-tone="ok"], .item .avatar { color: #0a7550; } } /* 4,6:1 sur le vert pâle */
.pill[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill .live { width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative; }
.pill[data-tone="ok"] .live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ring 2.4s var(--ease-out) infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: 0.55; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background 0.2s, box-shadow 0.3s var(--ease-out), border-color 0.2s, opacity 0.2s;
  -webkit-user-select: none; user-select: none;
}
@media (hover: hover) { .btn:hover { border-color: var(--text); } }
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--btn); color: var(--btn-text); border-color: transparent; box-shadow: 0 6px 18px -8px rgb(16 18 17 / 60%); }
@media (hover: hover) { .btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgb(16 18 17 / 70%); } }
.btn.primary:active { transform: scale(0.97); }
.btn.accent { background: var(--accent-bright); color: #04150d; border-color: transparent; box-shadow: 0 8px 26px -10px rgb(18 168 115 / 80%); }
@media (hover: hover) { .btn.accent:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgb(18 168 115 / 90%); } }
.btn.danger { color: var(--error); }
@media (hover: hover) { .btn.danger:hover { border-color: var(--error); } }
.btn[disabled] { opacity: 0.38; cursor: default; transform: none; box-shadow: none; }
.btn.done { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.done svg { width: 16px; height: 16px; }
.btn.done svg path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; animation: draw-check 0.45s var(--ease-out) both; }
.btn.wide { width: 100%; }
.btn.small { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.big { height: 52px; font-size: 15.5px; padding: 0 22px; }
.btn .arrow { transition: transform 0.3s var(--ease-spring); }
.btn:hover .arrow { transform: translateX(3px); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 13.5px; font-weight: 500; position: relative; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out); }
.link:hover::after { transform: scaleX(1); }
.link.muted { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; }
.back .chev { transition: transform 0.3s var(--ease-spring); }
.back:hover .chev { transform: translateX(-3px); }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.small { font-size: 12.5px; }
.hint { color: var(--muted); }
.note { color: var(--muted); font-size: 12.5px; }

/* ---------- Champs ---------- */
input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="date"], input[type="url"], select {
  width: 100%; min-width: 0; height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out), background 0.2s;
}
input::placeholder { color: var(--muted); opacity: 1; } /* à 0.8, le contraste passait sous 4,5:1 */
input { text-overflow: ellipsis; }
input:hover, select:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line-strong)); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; min-width: 0; }
.field > input, .field > select { font-size: 15px; font-weight: 400; }
@media (pointer: coarse) { :root input:not([type="checkbox"]), :root select, :root textarea { font-size: 16px; } }
.fields { display: grid; grid-template-columns: 96px minmax(0, 1fr) 128px; gap: 10px; }
@media (max-width: 640px) { .fields { grid-template-columns: 80px minmax(0, 1fr) 104px; gap: 8px; } }
/* deux champs seulement (filtres d'une surveillance, sans prix maximum) : pas de colonne vide */
.fields:not(:has(> :nth-child(3))) { grid-template-columns: 96px minmax(0, 1fr); }
@media (max-width: 640px) { .fields:not(:has(> :nth-child(3))) { grid-template-columns: 80px minmax(0, 1fr); } }
/* téléphone : le champ du milieu (catégorie, nom : texte long) passe sur sa propre ligne, au-dessus des deux autres */
@media (max-width: 430px) {
  .fields:not(.lot-fields):not(.sales-criteria):has(> :nth-child(3)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fields:not(.lot-fields):not(.sales-criteria):has(> :nth-child(3)) > :nth-child(2) { grid-column: 1 / -1; order: -1; }
}

.searchbar { position: relative; display: flex; gap: 8px; align-items: center; }
.searchbar .icon { position: absolute; left: 18px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; transition: color 0.2s, transform 0.4s var(--ease-spring); }
.searchbar:focus-within .icon { color: var(--accent); transform: scale(1.08); }
.searchbar input { flex: 1; height: 56px; font-size: 16.5px; border-radius: 999px; padding: 0 112px 0 50px; box-shadow: var(--shadow); border-color: var(--line); }
.searchbar input:focus { box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow); }
.searchbar .btn { position: absolute; right: 7px; height: 42px; }
.searchbar .btn .go { display: none; width: 20px; height: 20px; }
.searchbar input { text-overflow: ellipsis; }
@media (max-width: 480px) {
  .searchbar input { padding: 0 58px 0 46px; }
  .searchbar .icon { left: 16px; }
  .searchbar .btn:not(.small) { width: 42px; padding: 0; }
  .searchbar .btn .btn-text { display: none; }
  .searchbar .btn .go { display: block; }
}
.searchbar.plain input { padding: 0 16px; height: 46px; border-radius: var(--radius-sm); box-shadow: none; }
.searchbar.plain .btn { position: static; height: 46px; width: auto; padding: 0 16px; }

/* Interrupteur à ressort */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 6px 0; }
.switch:has(> .seg), .switch:has(> .row > .seg) { flex-wrap: wrap; row-gap: 8px; }
.switch:has(> .seg) > span:first-child { flex: 1 1 150px; }
.switch .sub { display: block; font-size: 12.5px; color: var(--muted); }
.switch input {
  appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; position: relative; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-strong); transition: background 0.3s var(--ease-out), border-color 0.3s;
}
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 22%); transition: transform 0.45s var(--ease-spring), width 0.2s;
}
.switch input:active::after { width: 26px; }
.switch input:checked { background: var(--accent-bright); border-color: transparent; }
.switch input:checked::after { transform: translateX(18px); }
.switch input:checked:active::after { transform: translateX(14px); }

/* Segments */
.seg { position: relative; display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; border: 0; background: none; height: 28px; padding: 0 11px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: color 0.2s, background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.3s var(--ease-spring); }
.seg button:active { transform: scale(0.94); }
.seg button[aria-pressed="true"] { color: var(--text); background: var(--raised); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .seg button[aria-pressed="true"], .tab-indicator { box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%), 0 0 0 1px var(--line); }
}

/* Puces */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--panel); font-size: 13.5px; font-weight: 500; white-space: nowrap; user-select: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease-spring);
}
.chip:hover { border-color: var(--text); }
.chip:active { transform: scale(0.94); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.chip[aria-pressed="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }
.page.first .chip[aria-pressed="true"]::before { animation: pop 0.4s var(--ease-spring) var(--since, 0ms) both; }
.chip.ghost { border-style: dashed; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11.5px; font-weight: 500; border-radius: 999px; padding: 2px 9px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.tag[data-tone="ok"] { background: var(--accent-soft); color: var(--accent); }
.tag[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.tag[data-tone="error"] { background: var(--error-soft); color: var(--error); }

/* ---------- Cartes, sections, listes ---------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s;
}
.card.soft { background: var(--surface); border-color: transparent; box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head { display: flex; align-items: baseline; gap: 9px; margin-top: 8px; }
.section-head .right { margin-left: auto; }
.section-head .right.row { flex-wrap: nowrap; }
@media (max-width: 640px) { .section-head { flex-wrap: wrap; row-gap: 10px; } .section-head > h2 { white-space: nowrap; } }
.section-head .count-label:not(:empty) { align-self: center; color: var(--muted); font: 600 12px/1 var(--font-text); padding: 5px 9px; border-radius: 999px; background: var(--surface); white-space: nowrap; }

.filters-card { padding: 0; gap: 0; overflow: hidden; }
.filters-card > summary { padding: 15px 18px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font: 700 15px var(--font-display); letter-spacing: -0.02em; }
.filters-card > summary::-webkit-details-marker { display: none; }
.filters-card > summary .summary-text { margin-left: auto; font: 500 12.5px var(--font-text); color: var(--muted); text-align: right; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.filters-card .filters-body { padding: 2px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
details::details-content { block-size: 0; overflow: clip; transition: block-size 0.4s var(--ease-out), content-visibility 0.4s allow-discrete; }
/* un seul marqueur de dépliant partout : le chevron qui pivote */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; width: 0.7em; margin-right: 4px; font-weight: 600; transition: transform 0.35s var(--ease-spring); }
details[open] > summary::before { transform: rotate(90deg); }
.filters-card > summary::before { margin-right: 0; color: var(--muted); }
details[open]::details-content { block-size: auto; }
.filter-block { display: flex; flex-direction: column; gap: 8px; }
.filter-block > .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { border-top: 1px solid var(--line); }
.list > li:last-child { border-bottom: 1px solid var(--line); }
.list.cards > li { border: 0; }
.list.compact > li { padding: 10px 2px; display: flex; flex-direction: column; }

.item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 10px; margin: 0 -10px; width: calc(100% + 20px);
  border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; transition: background 0.2s;
}
.item:hover { background: var(--surface); }
.item .grow { display: flex; flex-direction: column; gap: 2px; }
.item .avatar { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; font: 800 15px var(--font-display); color: var(--accent); background: var(--accent-soft); }
.item .chev { color: var(--muted); transition: transform 0.35s var(--ease-spring), color 0.2s; }
.item:hover .chev { transform: translateX(4px); color: var(--text); }

.banner { border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.banner.info { background: none; border: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 14px; }
.banner.info > p { font-size: 13px; color: var(--muted); }
.banner.ok { background: var(--accent-soft); }
.banner.warn { background: var(--warn-soft); }
.banner.warn > p { color: var(--warn); }
.banner.error { background: var(--error-soft); }
.banner.error > p { color: var(--error); }

/* ---------- Chargements ---------- */
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; flex: none; background: conic-gradient(from 0deg, transparent 0 25%, var(--accent-bright)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#content :is(.spinner, .progress.indeterminate .bar, .dot.pulse), #content .bar::after { animation-delay: var(--t0, 0s); }
.progress { position: relative; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar { position: relative; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width 0.6s var(--ease-out); overflow: hidden; }
.bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 55%), transparent); transform: translateX(-100%); animation: sheen 1.6s ease-in-out infinite; }
@keyframes sheen { to { transform: translateX(100%); } }
.progress.indeterminate .bar { width: 35% !important; animation: slide 1.4s var(--ease-out) infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.skel.line { height: 14px; }
.skel.block { height: 140px; border-radius: var(--radius); }
.task-card .count-up { font: 700 13px var(--font-display); color: var(--text); }
.splash { min-height: 70vh; display: grid; place-items: center; }
.splash img, .splash .logo { width: 54px; height: 54px; border-radius: 15px; animation: breathe 1.6s ease-in-out infinite; box-shadow: 0 10px 30px -8px rgb(11 122 83 / 60%); }
@keyframes breathe { 50% { transform: scale(0.92); opacity: 0.75; } }

/* ---------- Dates à cocher ---------- */
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 380px) { .filters { grid-template-columns: minmax(0, 1fr); } }
.event { display: flex; gap: 13px; align-items: flex-start; padding: 13px 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; transition: background 0.2s; }
.event:hover { background: var(--surface); }
.event.dim .event-text, .event.dim .when { color: var(--muted); } /* sans annonce : en gris, lisible */
.event-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* dates déjà couvertes par une surveillance ou une courbe : à droite de la ligne, sans l'allonger */
.event-text { flex: 1 1 auto; }
.event .covered { display: flex; gap: 12px; margin-left: auto; padding-top: 2px; flex-shrink: 0; color: var(--muted); font-size: 12.5px; }
.event .cov { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.event .cov svg { width: 15px; height: 15px; }
.event:hover .cov { color: var(--text); }
@media (max-width: 560px) {
  .event .covered { gap: 8px; }
  .event .cov-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.when { font: 700 14.5px var(--font-display); letter-spacing: -0.015em; }
input[type="checkbox"]:not([role="switch"]) {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border-radius: 7px; cursor: pointer; position: relative;
  border: 1.5px solid var(--line-strong); background: var(--panel); transition: background 0.25s var(--ease-out), border-color 0.25s, transform 0.3s var(--ease-spring);
}
input[type="checkbox"]:not([role="switch"]):active { transform: scale(0.88); }
input[type="checkbox"]:not([role="switch"]):checked { background: var(--text); border-color: transparent; }
input[type="checkbox"]:not([role="switch"])::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg) scale(0); transform-origin: 60% 60%; transition: transform 0.35s var(--ease-spring);
}
input[type="checkbox"]:not([role="switch"]):checked::after { transform: rotate(45deg) scale(1); }

/* ventes probables : heure, ce qui est parti, montant */
.sales-list > li.sale { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 11px 0; }
.sale-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-day { display: block; }
.sale-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sale-main .tag { margin-left: 6px; vertical-align: 1px; }
.sale-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.sale-amount strong { font: 700 15px var(--font-display); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .sales-list > li.sale { grid-template-columns: minmax(0, 1fr) auto; }
  .sale-time { grid-column: 1 / -1; }
  .sale-day { display: inline; margin-right: 6px; }
}
/* carte Serveur : lignes libellé / valeur, jauge des pages */
.kv { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); gap: 12px; padding: 7px 0; font-size: 14px; border-top: 1px solid var(--line); }
.card-head + .kv { border-top: 0; }
.meter { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent-bright) 16%, transparent); overflow: hidden; margin: 2px 0 6px; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--accent-bright); transition: width 0.6s var(--ease-out); }
.meter[data-tone="warn"] { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.meter[data-tone="warn"] > span { background: var(--warn); }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 2px; } }

/* filtres du salon des ventes : artistes, leurs dates dessous */
.sales-filters { display: flex; flex-direction: column; gap: 10px; }
.sales-filters[open] > summary { margin-bottom: 4px; }
.sales-filters h3 { margin: 6px 0 0; }
.sales-pick, .sales-pick ul { list-style: none; margin: 0; padding: 0; }
.sales-pick > li { padding: 6px 0; border-top: 1px solid var(--line); }
.sales-pick > li:first-child { border-top: 0; }
.sales-pick ul { margin: 2px 0 0 34px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; min-height: 32px; }
.pick.included { color: var(--muted); cursor: default; }
.pick input:disabled { opacity: 0.55; cursor: default; }
.sales-filters .sales-criteria { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .sales-filters .sales-criteria { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sales-filters > .row { margin-top: 2px; }

.actionbar {
  position: fixed; z-index: 25; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(776px, calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))); display: flex; gap: 8px; padding: 8px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}
.page.first .actionbar { animation: float-in 0.55s var(--ease-spring) var(--since, 0ms) both; }
@keyframes float-in { from { transform: translate(-50%, 140%); } }
.actionbar .btn { height: 48px; }
.actionbar .btn.primary { flex: 1; min-width: 0; }
.actionbar .label-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.page:has(.actionbar) { padding-bottom: 160px; }
/* téléphone : pendant le choix des dates, la barre d'action prend la place des onglets (retour par « ‹ Recherche ») */
@media (max-width: 1040px) {
  .actionbar { bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 22px; }
  .tabs { transition: transform 0.4s var(--ease-out), opacity 0.25s ease; }
  body:has(.actionbar) .tabs { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .page:has(.actionbar) { padding-bottom: 130px; }
}

/* ---------- Le moins cher : carte d'encre ---------- */
.best {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 24px; padding: 22px; color: var(--ink-text);
  background: radial-gradient(120% 140% at 100% 0%, rgb(18 168 115 / 28%), transparent 55%), linear-gradient(160deg, var(--ink-2), var(--ink));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgb(95 227 173 / 16%);
  display: flex; flex-direction: column; gap: 4px;
}
.best::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), rgb(95 227 173 / 0%), rgb(95 227 173 / 75%), rgb(95 227 173 / 0%) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
}
.best.fresh::before { animation: orbit 1.6s var(--ease-out) both, glint 1.7s ease both; }
@keyframes glint { 0% { opacity: 0; } 15%, 65% { opacity: 1; } 100% { opacity: 0; } }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes orbit { to { --angle: 360deg; } }
.best .best-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 6px; }
.best .label { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; font: 700 12px var(--font-text); color: var(--accent-bright); letter-spacing: 0.01em; }
.best .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.best .price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.best .price strong { font: 800 52px/0.95 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #ffffff, #c9f1de); -webkit-background-clip: text; background-clip: text; color: transparent; }
.best .price > span { color: var(--ink-muted); font-size: 14px; }
/* le prix qui défile hérite du dégradé de son parent */
.best .price strong .num { font: inherit; letter-spacing: inherit; color: inherit; }
.best .what { font: 700 17px var(--font-display); letter-spacing: -0.02em; }
.best p { color: var(--ink-text); }
.best .muted, .best .sub { color: var(--ink-muted); }
.best .tag { background: rgb(255 255 255 / 9%); color: var(--ink-text); }
.best .tag[data-tone="warn"] { background: rgb(242 182 90 / 16%); color: #f2c27a; }
.best .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.best .btn:not(.accent) { background: rgb(255 255 255 / 8%); color: var(--ink-text); border-color: rgb(255 255 255 / 14%); }
.best .btn:not(.accent):hover { background: rgb(255 255 255 / 14%); border-color: rgb(255 255 255 / 30%); }
.best .btn.done { color: #5fe3ad; border-color: rgb(95 227 173 / 45%); }
@media (max-width: 640px) { .best { padding: 20px; border-radius: 22px; } .best .price strong { font-size: 46px; } }

/* ---------- Résultats ---------- */
.result { padding: 4px 0; }
.result-main {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: start; color: inherit;
  padding: 12px 10px; margin: 0 -10px; border-radius: 12px; transition: background 0.2s;
}
@media (hover: hover) { .result-main:hover { background: var(--surface); } .result-main:hover .open { color: var(--text); } .result-main:hover .arrow { transform: translateX(3px); } }
.result-main .open { display: inline-flex; align-items: center; gap: 5px; font: 600 13px var(--font-text); color: var(--muted); transition: color 0.2s; padding-top: 2px; }
.result-main .arrow { transition: transform 0.3s var(--ease-spring); }
.result.is-best .price-sm { color: var(--accent); }
.price-sm { font: 800 18px/1.2 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.result-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.others { margin: 0 0 10px 96px; font-size: 13px; }
.others summary { color: var(--muted); display: inline-flex; align-items: center; gap: 1px; }
.others ul { list-style: none; padding: 8px 0 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.others a { font: 700 13.5px var(--font-display); }
.muted-block { color: var(--muted); font-size: 13px; }
.muted-block summary { cursor: pointer; }
.muted-block ul { padding-left: 16px; margin: 6px 0 0; }
@media (max-width: 640px) {
  .result-main { grid-template-columns: 70px 1fr; }
  .result-main > .open { display: none; }
  .others { margin-left: 82px; }
}

/* ---------- Surveillances ---------- */
.watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
@media (max-width: 720px) { .watch-grid { grid-template-columns: minmax(0, 1fr); } }
.watch { cursor: pointer; gap: 12px; }
.watch-top h2 { overflow-wrap: break-word; hyphens: auto; }
@media (hover: hover) { .watch:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); } }
.watch:active { transform: translateY(-1px) scale(0.995); }
.watch-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.watch-price { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.watch-price strong { font: 800 26px/1.05 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.trend { font: 700 12px var(--font-display); display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; }
.trend.down { color: var(--accent); background: var(--accent-soft); }
.trend.up { color: var(--muted); background: var(--surface); }
.spark { width: 100%; height: 44px; display: block; overflow: visible; }
.spark.small { width: 84px; height: 26px; }
.spark .line { fill: none; stroke: var(--accent-bright); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { opacity: 0.9; }
.spark .threshold { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 4; opacity: 0.6; }
.spark .last { fill: none; stroke: var(--accent-bright); stroke-width: 6; stroke-linecap: round; }
.spark.draw .line { animation: draw 1.1s var(--ease-out) both; }
.spark.draw .area { animation: fade 1.2s ease 0.25s both; }
.spark.draw .last { animation: fade 0.4s ease 0.9s both; }
@keyframes draw { from { stroke-dashoffset: var(--len, 600); } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.watch-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.status-line { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; position: relative; transform: translateY(-1px); }
.dot[data-tone="ok"] { background: var(--accent-bright); }
.dot[data-tone="warn"] { background: var(--warn); }
.dot[data-tone="error"] { background: var(--error); }
.dot.pulse { animation: breathe 1s ease-in-out infinite; }
.hero-watch { gap: 14px; }
.hero-watch .watch-price strong { font-size: 44px; }
.hero-watch .spark:not(.mplot) { height: 96px; } /* graphique du Marché : la hauteur de son cadre */
@media (max-width: 400px) {
  .hero-watch .watch-top { flex-direction: column; gap: 8px; }
  .hero-watch .watch-price { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 10px; text-align: left; }
  .hero-watch .watch-price strong { font-size: 34px; }
}
.per-event > li { padding: 13px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; }
.per-event .right { display: flex; align-items: center; gap: 12px; }
@media (max-width: 480px) { .per-event .spark.small { display: none; } }
.per-event .remove { min-width: 36px; min-height: 36px; margin-left: 2px; display: inline-grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; transition: background .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-spring); }
.per-event .remove:hover { background: var(--surface-2); color: var(--text); }
.per-event .remove:active { transform: scale(.88); }
.per-event .price-link { font: 800 18px var(--font-display); letter-spacing: -0.02em; color: var(--text); }
.per-event li.is-min .price-link { color: var(--accent); }
.alerts > li { padding: 10px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.alert-text { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.alerts a { font: 700 14px var(--font-display); color: var(--text); }

/* ---------- Écran distant, connexion, divers ---------- */
.screen-wrap { display: flex; flex-direction: column; gap: 8px; }
.screen { width: 100%; aspect-ratio: 1280 / 900; object-fit: contain; border: 1px solid var(--line-strong); border-radius: 14px; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: var(--surface); display: block; box-shadow: var(--shadow); }
.login {
  max-width: 380px; min-height: 100vh; min-height: 100svh; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 24px 20px 12vh; animation: rise 0.7s var(--ease-out) both;
}
.login .brand { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 16px; cursor: default; }
.login .brand .logo { width: 44px; height: 44px; }
.login h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.045em; }
.login .wordmark small { font-size: 13px; margin-top: 4px; }
.login input { height: 52px; font-size: 16px; border-radius: 14px; }
.login .shake { animation: shake 0.45s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.history > li { position: relative; padding: 14px 10px; margin: 0 -10px; border-radius: 12px; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; cursor: pointer; transition: background 0.2s; }
.list.history > li { border: 0; }
.history > li + li::before { content: ""; position: absolute; top: 0; left: 10px; right: 10px; border-top: 1px solid var(--line); transition: opacity 0.2s; }
@media (hover: hover) { .history > li:hover { background: var(--surface); } .history > li:hover::before, .history > li:hover + li::before { opacity: 0; } }
.history .best-mini, .recent-jobs .best-mini { font: 700 15.5px var(--font-display); letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.best-mini .from { font: 500 12.5px var(--font-text); color: var(--muted); margin-right: 4px; } /* « dès » en retrait, le prix d'abord */
.history .tag { justify-self: end; align-self: center; }
.empty { text-align: center; padding: 34px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.card.soft.empty { background: none; padding: 56px 16px; }
.card.soft.empty > p:not(.big) { max-width: 44ch; }
.empty .big { font: 800 20px var(--font-display); letter-spacing: -0.03em; color: var(--text); }

/* Fenêtre (création de surveillance) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(8 9 8 / 42%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.3s ease both; }
.sheet {
  width: min(580px, 100%); max-height: 92vh; overflow: auto; background: var(--panel); color: var(--text);
  border-radius: 26px 26px 0 0; padding: 12px 20px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-lg); animation: sheet-up 0.55s var(--ease-spring) both;
}
.sheet > * { flex-shrink: 0; }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 4px; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-backdrop.settled:not(.closing), .sheet-backdrop.settled:not(.closing) .sheet { animation: none; }
.sheet-backdrop.closing { animation: fade-out 0.22s ease both; }
.sheet-backdrop.closing .sheet { animation: sheet-down 0.25s var(--ease-out) both; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@media (min-width: 641px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 26px; padding-top: 22px; animation: sheet-pop 0.45s var(--ease-spring) both; }
  .sheet .grabber { display: none; }
  .sheet-backdrop.closing .sheet { animation: sheet-unpop 0.2s ease both; }
}
@keyframes sheet-pop { from { transform: translateY(16px) scale(0.96); opacity: 0; } }
@keyframes sheet-unpop { to { transform: translateY(10px) scale(0.97); opacity: 0; } }

/* Notification */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 9px; width: max-content; max-width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
  padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--btn); color: var(--btn-text); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: toast-in 0.55s var(--ease-spring) both;
}
.toast svg { width: 18px; height: 18px; color: var(--accent-bright); }
@media (prefers-color-scheme: dark) { .toast svg { color: #0b7a53; } }
.toast svg path { stroke-dasharray: 24; animation: draw-check 0.5s var(--ease-out) 0.2s both; }
@keyframes draw-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.toast.out { animation: toast-out 0.3s var(--ease-out) both; }
@keyframes toast-in { from { transform: translate(-50%, 140%) scale(0.9); opacity: 0; } }
@keyframes toast-out { to { transform: translate(-50%, 40%) scale(0.96); opacity: 0; } }
@media (max-width: 1040px) { .toast { bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* ---------- Entrées en scène ---------- */
.enter { animation: rise 0.55s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 38ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.flash { animation: flash 1.2s var(--ease-out); }
@keyframes flash { 0% { background: var(--accent-soft); } }

/* Transitions entre écrans (navigateurs qui les connaissent) */
::view-transition-old(content) { animation: vt-out 0.18s ease both; }
::view-transition-new(content) { animation: vt-in 0.42s var(--ease-out) both; }
::view-transition-old(top), ::view-transition-new(top), ::view-transition-old(tabs), ::view-transition-new(tabs) { animation: none; mix-blend-mode: normal; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  body::before, body::after { animation: none; }
}

/* ---------- Accueil ---------- */
.hero { padding: 26px 0 6px; display: flex; flex-direction: column; gap: 12px; }
.hero-title { font: 800 clamp(34px, 6.4vw, 54px)/1.02 var(--font-display); letter-spacing: -0.05em; max-width: 12ch; }
.hero-title .word { display: inline-block; }
.page.first .hero-title .word { animation: word-in 0.8s var(--ease-out) both; animation-delay: calc(var(--w, 0) * 70ms + 60ms + var(--since, 0ms)); }
@keyframes word-in { from { opacity: 0; transform: translateY(0.45em) rotate(2deg); filter: blur(6px); } }
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; } /* une tuile seule garde un tiers */
@media (max-width: 640px) { .glance { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .glance-card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.glance-card {
  text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s;
}
@media (hover: hover) { .glance-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); } }
.glance-card:active { transform: translateY(-1px) scale(0.985); }
.glance-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.glance-value { font: 800 26px/1.1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-top: auto; }
.glance-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .glance-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
.glance-card.accent { background: radial-gradient(120% 140% at 100% 0%, rgb(18 168 115 / 26%), transparent 60%), linear-gradient(160deg, var(--ink-2), var(--ink)); color: var(--ink-text); border-color: transparent; }
.glance-card.accent .glance-label, .glance-card.accent .glance-sub { color: var(--ink-muted); }
.glance-card.accent .glance-value { color: #fff; }
.glance-card.warn .glance-value { color: var(--warn); }
@media (prefers-color-scheme: dark) { .glance-card.accent { box-shadow: inset 0 0 0 1px rgb(95 227 173 / 16%); } }

.form-error { color: var(--error); margin: 2px 0 0; }
@media (pointer: fine) { .install-tip { display: none; } }
.sheet:focus { outline: none; }

/* ---------- Mes billets (vendeurs) ---------- */
.lot.sold { opacity: 0.62; }
.lot.sold:hover { opacity: 1; }
.rank-badge {
  font: 700 12px/1 var(--font-display); letter-spacing: -0.01em; padding: 5px 9px; border-radius: 999px;
  background: var(--surface); color: var(--muted);
}
.page.first .rank-badge { animation: pop 0.5s var(--ease-spring) var(--since, 0ms) both; }
.rank-badge[data-first] { background: var(--accent-soft); color: var(--accent); }
.lot-market { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.lot-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lot-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.lot-value { font: 700 16px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-tone="good"] { color: var(--accent); }
[data-tone="bad"] { color: var(--error); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface); min-width: 0; }
.stat-value { font: 800 20px/1.1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: auto; }
.advice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.page.first .advice { animation: rise 0.5s var(--ease-out) var(--since, 0ms) both; }
.advice p { margin: 0; }
.advice.good { background: var(--accent-soft); border-color: transparent; }
.advice.warn { background: var(--warn-soft); border-color: transparent; }
.ladder { margin: 4px 0 0; position: relative; }
/* histogramme des prix concurrents : barres arrondies en haut, posées sur une ligne de base */
.lhist { position: relative; height: 64px; margin-top: 24px; border-bottom: 1px solid var(--line-strong); }
.lbar { position: absolute; bottom: 0; transform: translateX(-50%); background: var(--muted); opacity: 0.55; border-radius: 4px 4px 0 0; transform-origin: bottom; }
.lbar.first { background: var(--text); opacity: 0.85; } /* la tranche du moins cher */
.lbar:hover { opacity: 1; }
.lme { position: absolute; top: -6px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--accent-bright); box-shadow: 0 0 0 2px var(--panel); }
.lme-label { position: absolute; top: -24px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; font: 700 11.5px var(--font-display); color: var(--text); white-space: nowrap; }
.lme-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); }
.lme-label.start { transform: none; }
.lme-label.end { transform: translateX(-100%); }
.laxis { position: relative; height: 18px; margin: 7px 0 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.laxis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.laxis span.start { transform: none; }
.laxis span.end { transform: translateX(-100%); }
.page.first .lbar { animation: bar-in 0.5s var(--ease-spring) both; animation-delay: calc(var(--d, 0ms) + var(--since, 0ms)); }
.page.first .lme, .page.first .lme-label { animation: fade 0.4s ease calc(0.35s + var(--since, 0ms)) both; }
@keyframes tick-in { from { transform: scaleY(0); opacity: 0; } }
.margins { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.margins th, .margins td { text-align: right; padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.margins th:first-child { text-align: left; white-space: normal; }
.margins thead th { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.margins tbody th { font-weight: 500; }
.margins td { font-weight: 600; }
.sold-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.fields.lot-fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.field.wide { grid-column: 1 / -1; }
.sellers .seller { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.invite-link { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--accent-soft); } /* entrée : data-k */
.invite-link input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.invite-title { font: 800 22px/1.15 var(--font-display); letter-spacing: -0.03em; margin: 6px 0 0; }
@media (max-width: 360px) { .margins thead th { white-space: normal; } .margins th, .margins td { padding: 8px 3px; } }
@media (max-width: 640px) {
  .lot-market, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .margins th, .margins td { padding: 8px 4px; font-size: 12.5px; }
  .fields.lot-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .ladder .tick, .ladder .me, .advice, .invite-link, .rank-badge { animation: none; }
}

.watch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Marché ---------- */
.mcontrols { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.mcontrol { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 8px; }
.mcontrol .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.mcard { gap: 12px; }
.mchart { position: relative; }
.mchart-empty { padding: 28px 0; text-align: center; }
.mplot-wrap { position: relative; margin-left: 52px; margin-right: 60px; } /* place des prix en bout de ligne */
.mplot { width: 100%; height: 100%; display: block; overflow: visible; }
.mplot .mgrid { stroke: var(--line); stroke-width: 1; }
.mplot .mband { fill: var(--accent-bright); opacity: 0.1; }
.mplot .mband-edge { stroke: var(--accent-bright); stroke-width: 1; opacity: 0.45; }
.mplot .mguide { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: 0.8; }
.mplot .marea { opacity: 0.1; }
.mplot .mpt { fill: none; stroke-width: 5; stroke-linecap: round; }
/* ventes probables en points : encre du texte, cerclées du fond (lisibles sur la ligne) */
.mplot .mmark-ring { fill: none; stroke: var(--panel); stroke-width: 11; stroke-linecap: round; }
.mplot .mmark { fill: none; stroke: var(--text); stroke-width: 7; stroke-linecap: round; opacity: 0.85; }
.mlegend i.dot, .mtip-row i.dot, .curve-sales i.dot { display: inline-block; width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--text); opacity: 0.85; }
.curve-sales { display: flex; align-items: center; gap: 8px; margin: -2px 0 0; color: var(--muted); }
.mplot .mend-ring, .mplot .mdot-ring { fill: none; stroke: var(--panel); stroke-width: 12; stroke-linecap: round; }
.mplot .mend-dot, .mplot .mdot { fill: none; stroke-width: 8; stroke-linecap: round; }
.mplot.crossing .mend-ring, .mplot.crossing .mend-dot { opacity: 0.35; } /* au survol, les points du réticule passent devant */
.mplot .mperiod { fill: var(--surface); opacity: 0.9; }
.mlegend-period { color: var(--muted); }
.mlegend-period b { display: inline-block; width: 12px; height: 10px; border-radius: 3px; background: var(--surface-2); }
.mlegend-band b { display: inline-block; width: 12px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--accent-bright) 14%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent-bright) 50%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--accent-bright) 50%, transparent); }
.mlegend { margin-top: 10px; }
.mlegend i.dash, .mends i.dash { width: 16px; border-top: 2px dashed var(--muted); } /* assez long pour qu'on voie les tirets */
.mends span.guide { color: var(--muted); font-weight: 600; }
.mlegend.phone-only { display: none; }
@media (max-width: 640px) { .mlegend.phone-only { display: flex; } }
.mplot .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mplot .line.unslotted { stroke-dasharray: 3 4; }
.mplot .line.single { stroke-width: 7; stroke-dasharray: none; }
.mplot .ma { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.55; }
.mplot .mcross { stroke: var(--muted); stroke-width: 1; opacity: 0; transition: opacity 0.15s; }
.mplot.crossing .mcross { opacity: 0.7; }
.mplot.draw .line { animation: draw 1.2s var(--ease-out) both; }
.mylabels span { position: absolute; left: -52px; width: 46px; text-align: right; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mxlabels { position: relative; height: 20px; margin: 6px 60px 0 52px; }
.mxlabels span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.mends span { position: absolute; right: 0; transform: translate(calc(100% + 6px), -50%); display: inline-flex; align-items: center; gap: 4px; font: 700 11.5px var(--font-display); color: var(--text); white-space: nowrap; background: var(--panel); padding: 1px 4px; border-radius: 6px; }
.mends i, .mlegend i, .mtip-row i, .curve .key { display: inline-block; width: 12px; height: 0; border-top: 2px solid var(--c); border-radius: 2px; }
.mtip-row i.dash { border-top: 2px dashed var(--text); opacity: 0.6; }
.curve .key { margin-right: 8px; vertical-align: middle; width: 14px; }
.curve .key.unslotted { border-top-style: dashed; }
.mhit { position: absolute; inset: 0; cursor: crosshair; touch-action: pan-y; border-radius: 8px; }
.mhit:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mtip {
  position: absolute; top: 6px; left: 0; z-index: 3; min-width: 150px; max-width: min(240px, calc(100% + 40px)); padding: 9px 11px; border-radius: 12px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); font-size: 12px;
  opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.2s var(--ease-out);
}
.mtip.on { opacity: 1; transform: none; }
.mtip-time { color: var(--muted); margin-bottom: 4px; }
.mtip-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.mtip-row strong { font: 700 13px var(--font-display); font-variant-numeric: tabular-nums; }
.mtip-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.mlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-left: 52px; }
.mlegend span { display: inline-flex; align-items: center; gap: 6px; }
.msold { margin: 0 60px 0 52px; display: flex; flex-direction: column; gap: 6px; }
.msold-bars { position: relative; height: 56px; border-bottom: 1px solid var(--line-strong); }
.msold .mbar { position: absolute; bottom: 0; transform: translateX(-50%); background: var(--muted); opacity: 0.6; border-radius: 4px 4px 0 0; transform-origin: bottom; }
.msold .mbar:hover { opacity: 1; }
.msold-max { position: absolute; top: -2px; left: -44px; width: 38px; text-align: right; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msold-head { flex-wrap: nowrap; align-items: baseline; }
.nowrap { white-space: nowrap; }
.page.first .msold .mbar { animation: bar-in 0.5s var(--ease-spring) both; animation-delay: calc(var(--d, 0ms) + var(--since, 0ms)); }
@keyframes bar-in { from { transform: scaleY(0); } }
.trend-tag { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1 var(--font-display); padding: 5px 9px; border-radius: 999px; background: var(--surface); color: var(--text); white-space: nowrap; }
.page.first .trend-tag { animation: pop 0.5s var(--ease-spring) var(--since, 0ms) both; }
.trend-tag.flat { color: var(--muted); }
.trend-tag.down { color: var(--accent); background: var(--accent-soft); }
.curve.paused { opacity: 0.7; }
.sheet-list { max-height: 40vh; overflow: auto; margin: 0 -4px; padding: 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recent-jobs { display: flex; flex-direction: column; gap: 4px; }
.recent-jobs .item { padding: 10px; }
.recent-jobs .list.compact > li { padding: 0; }
@media (max-width: 1040px) {
  .tabs button[data-tab="history"] { display: none; } /* accessible depuis l'accueil */
}
@media (max-width: 640px) {
  .mplot-wrap, .mxlabels, .mlegend, .msold { margin-left: 40px; margin-right: 0; }
  .mylabels span { left: -42px; width: 38px; font-size: 10.5px; }
  .mends { display: none; }
  .mcontrols { gap: 8px 12px; }
  .mcontrol .seg button { padding: 0 9px; }
}
@media (max-width: 480px) { .actionbar .est { display: none; } .actionbar { gap: 6px; } .actionbar .btn { padding: 0 14px; } }
.actionbar #curves-btn svg { display: none; width: 19px; height: 19px; }
@media (max-width: 400px) {
  .actionbar .unit, .actionbar #curves-btn .btn-text { display: none; }
  .actionbar #curves-btn svg { display: block; }
  .actionbar .btn { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .msold .mbar, .trend-tag, .mtip { animation: none; transition: none; }
}

@media (min-width: 901px) {
  .page-title { font-size: 36px; letter-spacing: -0.045em; line-height: 1.02; }
  .section-head { margin-top: 20px; }
  .section-head:has(.page-title) { margin-top: 4px; }
  .hero { padding: 44px 0 14px; }
  .filters { grid-template-columns: 1.1fr 1.4fr 1fr 1fr; }
}
@media (min-width: 1041px) {
  .actionbar { width: auto; max-width: calc(100% - 24px); }
  .actionbar .btn.primary { flex: none; padding: 0 24px; }
}

/* mouvement réduit : aucune entrée de premier affichage (ces règles l'emportent par leur place) */
@media (prefers-reduced-motion: reduce) {
  .page.first .chip[aria-pressed="true"]::before, .page.first .actionbar, .page.first .hero-title .word, .page.first .rank-badge,
  .page.first .advice, .page.first .ladder .tick, .page.first .ladder .me, .page.first .msold .mbar, .page.first .trend-tag { animation: none; }
}

/* Radar */
.link.danger { color: var(--error); }
.radar-resume { margin: 0 0 4px; color: var(--muted); }
.radar-event h3 { margin: 0; font-size: 16px; color: var(--text); }
.radar-event > p { margin: 6px 0 0; }
.radar-signals { display: flex; flex-wrap: wrap; gap: 6px; }
.radar-verdict { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border-left: 3px solid var(--line-strong); }
.radar-verdict[data-tone="ok"] { border-left-color: var(--accent); }
.radar-verdict[data-tone="warn"] { border-left-color: var(--warn); }
.radar-verdict p { margin: 0 0 6px; }
.radar-todo > li, .radar-cal > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 11px 0; }
.radar-todo > li > span:nth-child(2), .radar-cal > li > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.radar-todo > li > details, .radar-cal > li > a { grid-column: 2; }
.radar-date { display: flex; flex-direction: column; min-width: 64px; font-variant-numeric: tabular-nums; }
.radar-refs { margin-top: 8px; }
.radar-refs ul, .radar-feed { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.radar-refs li, .radar-feed > li { display: flex; flex-direction: column; gap: 3px; }
.radar-feed > li { padding: 10px 0; }
.radar-quote { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.radar-paste { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.radar-paste textarea { width: 100%; resize: vertical; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text); }
.radar-paste input { flex: 1; min-width: 160px; }
.radar-steps { margin: 8px 0 12px; padding-left: 20px; color: var(--muted); }
.radar-steps li { margin: 3px 0; }

/* Mes billets : sous-navigation, tableau de bord, prix, calendrier */
.billets-nav { margin: 0 0 4px; align-self: flex-start; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); }
.kpi strong { font: 700 22px var(--font-display); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sales-bars { margin: 12px 0 8px; }
.sbars { display: flex; align-items: flex-end; gap: 2px; height: 110px; }
.sbar { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: var(--accent); }
.sbar.zero { background: var(--line); }
.period-seg { align-self: flex-start; }
.sbars-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.sale-form .fields { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sale-actions { gap: 10px; margin-top: 4px; }
.pricing-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.pricing-grid > span { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pricing-suggest { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.pricing-floor { margin-top: 10px; }
.pricing-floor input { width: 90px; margin-left: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text); font: inherit; }
.cal-nav strong { text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; padding-bottom: 4px; }
.cal-day { min-height: 52px; padding: 6px; border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.cal-day.empty { background: none; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-n { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-dots i, .cal-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); box-shadow: 0 0 0 2px var(--surface); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 0; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
[data-kind="concert"] { background: var(--text) !important; }
[data-kind="livraison"], [data-kind="invendu"] { background: var(--warn) !important; }
[data-kind="paiement"] { background: var(--accent) !important; }
[data-kind="mise_en_vente"] { background: #3a6fe0 !important; }
.radar-cal > li.past { opacity: 0.6; }
.purchase-found { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cal-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.sale-edit { grid-column: 1 / -1; padding: 10px 0 4px; }
.sale-edit .fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Plateformes */
[data-k="plateformes"] h3 { margin: 18px 0 6px; font-size: 14px; }
.platform-app { margin-top: 10px; }
.platform-app code { font-size: 12px; overflow-wrap: anywhere; }
[data-k="plateformes"] p[data-tone="warn"] { color: var(--warn); }
.platform-app form.fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
@media (max-width: 560px) { .platform-app form.fields { grid-template-columns: 1fr; } }

/* Version commerciale : inscription, formules */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.login-links { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.plan { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); }
.plan.current { box-shadow: inset 0 0 0 2px var(--accent); }
.plan-price { font: 700 20px var(--font-display); }
.plan-features { margin: 0; padding-left: 18px; color: var(--muted); }
.plan-features li { margin: 2px 0; }
.plan > :last-child { margin-top: auto; align-self: flex-start; }

.ext-code { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; }
.ext-code strong { font: 700 30px var(--font-display); letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }
.onboarding .steps { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.onboarding .steps li { display: flex; align-items: center; gap: 10px; }
.onboarding .steps li.done { color: var(--muted); text-decoration: line-through; }
.step-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.done .step-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-box svg { width: 14px; height: 14px; }
.customer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 10px 0; }
.radar-claim { font: 700 15px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; user-select: all; }
.radar-guild { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
