/* 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 {
  --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: #6d6e68;
  --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%);
  --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 {
    --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%);
    --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: var(--bg);
  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.5;
}
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;
}
body::after {
  top: -30vmax; right: -30vmax;
  background: radial-gradient(circle, rgb(196 160 80 / 14%), transparent 60%);
  animation: drift-b 44s ease-in-out infinite alternate;
}
@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::before, body::after { opacity: 0.55; } }

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 { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Mise en page ---------- */
.shell { min-height: 100vh; }
.page { max-width: 820px; margin: 0 auto; padding: 22px 22px 140px; display: flex; flex-direction: column; gap: 16px; view-transition-name: content; }
@media (max-width: 640px) { .page { padding: 16px 16px 130px; 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 22px;
  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 img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 4px 14px -4px rgb(11 122 83 / 55%); transition: transform 0.5s var(--ease-spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.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; transition: color 0.25s var(--ease-out);
}
.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(--panel); 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(--accent); color: var(--accent-ink);
  animation: pop 0.5s var(--ease-spring);
}
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }

@media (max-width: 900px) {
  .top { padding: 10px 16px; }
  .tabs {
    position: fixed; z-index: 30; top: auto; transform: none; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    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); }
}

/* ---------- 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; }
.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;
}
.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%); }
.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%); }
.btn.accent:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgb(18 168 115 / 90%); }
.btn.danger { color: var(--error); }
.btn.danger:hover { border-color: var(--error); }
.btn[disabled] { opacity: 0.38; cursor: default; transform: none; box-shadow: none; }
.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: 0.8; }
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; }
.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; } }

.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 22px 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.plain input { padding-left: 16px; height: 46px; border-radius: var(--radius-sm); box-shadow: none; }
.searchbar.plain .btn { position: static; height: 46px; }

/* Interrupteur à ressort */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 6px 0; }
.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; transition: color 0.2s; }
.seg button[aria-pressed="true"] { color: var(--text); background: var(--panel); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-weight: 600; animation: seg-in 0.4s var(--ease-spring); }
@keyframes seg-in { from { transform: scale(0.88); } }

/* 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); animation: pop 0.4s var(--ease-spring); }
.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: 7px; padding: 2px 8px; 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 .count-label { color: var(--muted); font: 600 13px var(--font-display); }

.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 > summary .plus { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; transition: transform 0.45s var(--ease-spring), background 0.2s; flex: none; }
.filters-card[open] > summary .plus { transform: rotate(135deg); background: var(--accent-soft); color: var(--accent); }
.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; }
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; animation: rise 0.45s var(--ease-out) both; }
.banner.info { background: var(--info-soft); }
.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); } }
.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 { 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; }
.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 { opacity: 0.5; }
.event-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.event .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(--accent-bright); border-color: transparent; }
input[type="checkbox"]:not([role="switch"])::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #04150d; 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); }

.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)); 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); animation: float-in 0.55s var(--ease-spring) both;
}
@keyframes float-in { from { transform: translate(-50%, 140%); } }
.actionbar .btn { height: 48px; }
.actionbar .btn.primary { flex: 1; }
@media (max-width: 900px) { .actionbar { bottom: calc(86px + env(safe-area-inset-bottom)); border-radius: 22px; } }
.page:has(.actionbar) { padding-bottom: 160px; }
@media (max-width: 900px) { .page:has(.actionbar) { padding-bottom: 220px; } }

/* ---------- 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);
  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;
  animation: orbit 6s linear infinite;
}
@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; gap: 10px; margin-bottom: 6px; }
.best .label { 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; }
.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%); }
@media (max-width: 640px) { .best { padding: 20px; border-radius: 22px; } .best .price strong { font-size: 46px; } }

/* ---------- Résultats ---------- */
.result { padding: 14px 0; }
.result-main { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: start; }
.price-sm { font: 800 19px/1.2 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 700 11px var(--font-display); background: var(--surface); color: var(--muted); margin-right: 6px; vertical-align: 2px; }
.result-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.result-text .when { font: 700 14.5px var(--font-display); letter-spacing: -0.015em; }
.others { margin: 8px 0 0 96px; font-size: 13px; }
.others summary { cursor: pointer; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.others summary::-webkit-details-marker { display: none; }
.others summary::before { content: "›"; display: inline-block; transition: transform 0.35s var(--ease-spring); }
.others[open] summary::before { transform: rotate(90deg); }
.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 > .btn { grid-column: 2; justify-self: start; }
  .others { margin-left: 82px; }
}

/* ---------- Surveillances ---------- */
.watch { cursor: pointer; gap: 12px; }
.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 { 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(--error); background: var(--error-soft); }
.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(--warn); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: 0.8; }
.spark .last { fill: var(--accent-bright); }
.spark .last-ring { fill: var(--accent-bright); opacity: 0.35; transform-box: fill-box; transform-origin: center; animation: ring 2.4s var(--ease-out) infinite; }
.spark.draw .line { animation: draw 1.1s var(--ease-out) both; }
.spark.draw .area { animation: fade 1.2s ease 0.25s 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[data-tone="ok"]::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ring 2.6s var(--ease-out) infinite; }
.dot.pulse { animation: breathe 1s ease-in-out infinite; }
.hero-watch { gap: 14px; }
.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; }
.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 16px var(--font-display); letter-spacing: -0.02em; }
.alerts > li { padding: 10px 0; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

/* ---------- É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: 360px; margin: 14vh auto 0; display: flex; flex-direction: column; gap: 14px; padding: 0 20px; animation: rise 0.7s var(--ease-out) both; }
.login .brand img { width: 46px; height: 46px; border-radius: 13px; }
.login h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; }
.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 { 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; }
.history > li:hover { background: var(--surface); }
.history .best-mini { font: 800 15px var(--font-display); letter-spacing: -0.02em; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); }
.steps li { counter-increment: s; display: flex; gap: 10px; }
.steps li::before { content: counter(s); flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--font-display); background: var(--surface); color: var(--text); }
.empty { text-align: center; padding: 34px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.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 .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.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; max-width: calc(100% - 32px);
  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); }
.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: 900px) { .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-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; animation: word-in 0.8s var(--ease-out) both; animation-delay: calc(var(--w, 0) * 70ms + 60ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(0.45em) rotate(2deg); filter: blur(6px); } }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 46ch; animation: rise 0.8s var(--ease-out) 0.35s both; }
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .glance { grid-template-columns: 1fr 1fr; } .glance-card:last-child { 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;
}
.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 24px/1.1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.glance-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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); }

.form-error { color: var(--error); margin: 2px 0 0; }
.sheet:focus { outline: none; }
