/* ============================================================================
   DealUp — components.css
   Tous les composants réutilisables de l'interface.
   ========================================================================== */

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink-700);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .875rem; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              opacity var(--t-base) var(--ease);
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--violet-200); }
.btn:active { transform: translateY(0) scale(.975); box-shadow: var(--shadow-xs); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; }

.btn--primary {
  border-color: transparent;
  background: var(--grad-brand);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 22px -12px rgba(255, 255, 255, .35);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(0,0,0,.06) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn--primary:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 30px -14px rgba(255, 255, 255, .4);
  filter: saturate(107%) brightness(1.03);
  border-color: transparent;
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-500); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); color: var(--violet-700); box-shadow: none; }
.btn--soft { border-color: transparent; background: var(--violet-50); color: var(--violet-700); }
.btn--soft:hover { background: var(--violet-100); border-color: transparent; }
.btn--sm { padding: 8px 13px; font-size: .8rem; }
.btn--lg { padding: 14px 24px; font-size: .95rem; }
.btn--block { width: 100%; }
.btn--danger { color: #f1a2bd; border-color: rgba(241, 162, 189, .3); background: rgba(201, 88, 125, .12); }
.btn--danger:hover { background: rgba(201, 88, 125, .2); color: #ffd0df; border-color: rgba(241, 162, 189, .5); }

/* Bouton icône */
.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  color: var(--ink-500);
  background: transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--violet-700); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-active { background: rgba(255, 255, 255, .12); color: var(--violet-700); }
.icon-btn__badge {
  position: absolute; top: 3px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--grad-brand); color: var(--bg);
  font-size: .64rem; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--bg);
  animation: pop-in var(--t-slow) var(--ease-spring) both;
}
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Avatar */
.avatar {
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--grad-brand); color: var(--bg);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--violet-200);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.avatar:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--violet-300); }
.avatar--lg { width: 56px; height: 56px; font-size: 1.05rem; }

/* Nom du compte connecté, affiché à côté de l'avatar. */
.account-name {
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-700);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Carte générique ---------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.card--pad { padding: 22px; }
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

/* Apparition progressive */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.is-in {
  animation: reveal-in 460ms var(--ease) both;
  animation-delay: var(--d, 0ms);
}
@keyframes reveal-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: .72rem; font-weight: 600; letter-spacing: -.005em;
  background: var(--violet-50); color: var(--violet-700);
  border: 1px solid var(--violet-100);
}
.badge .icon { width: 13px; height: 13px; stroke-width: 2; }
.badge--sky  { background: rgba(143, 163, 189, .14); color: #b9c6d8; border-color: rgba(143, 163, 189, .25); }
.badge--mint { background: rgba(79, 173, 161, .14); color: #7fd8c4; border-color: rgba(79, 173, 161, .28); }
.badge--sand { background: rgba(201, 162, 92, .14); color: #e7c08a; border-color: rgba(201, 162, 92, .28); }
.badge--muted{ background: var(--surface-muted); color: var(--ink-400); border-color: var(--line); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-full);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-600); font-size: .8rem; font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--violet-300); color: var(--violet-700); background: var(--violet-50); transform: translateY(-1px); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--violet-100); border-color: var(--violet-300); color: var(--violet-700); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.chip__x { display: grid; place-items: center; opacity: .6; transition: opacity var(--t-fast) var(--ease); }
.chip:hover .chip__x { opacity: 1; }
.chip__x .icon { width: 12px; height: 12px; stroke-width: 2.2; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); flex: none; }
.dot--on { background: var(--mint-500); box-shadow: 0 0 0 3px rgba(79, 173, 161, .18); }
.dot--off { background: var(--ink-300); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }

/* Indicateur de veille : un point qui respire */
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: var(--r-full);
  font-size: .76rem; font-weight: 600; color: var(--ink-500);
  background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.live-pill.is-on { color: var(--mint-700); border-color: rgba(79, 173, 161, .3); background: rgba(79, 173, 161, .12); }
.live-pill__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); position: relative;
}
.live-pill.is-on .live-pill__dot { background: var(--mint-500); }
.live-pill.is-on .live-pill__dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--mint-500); opacity: 0;
  animation: live-ring 2.2s var(--ease) infinite;
}
@keyframes live-ring {
  0% { transform: scale(.5); opacity: .8; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- Tuiles d'indicateurs (tableau de bord) ---------- */


/* ---------- Statistiques (démonstration) ---------- */
.stat {
  position: relative; overflow: hidden;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-brand); opacity: .85;
}
.stat__icon {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--violet-600);
  margin-bottom: 14px;
}
.stat__label { font-size: .8rem; color: var(--ink-400); font-weight: 500; }
.stat__value {
  font-size: 2rem; font-weight: 700; letter-spacing: -.04em; color: var(--ink-900);
  line-height: 1.1; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.stat__delta { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--mint-500); font-weight: 600; }
.stat__delta .icon { width: 14px; height: 14px; }
.stat__delta.is-flat { color: var(--ink-400); }

/* ---------- Deal Score : anneau (démonstration) ---------- */
.score {
  display: inline-flex; align-items: center; gap: 12px;
}
.score__ring { position: relative; flex: none; display: grid; place-items: center; }
.score__ring svg { transform: rotate(-90deg); overflow: visible; }
.score__track { stroke: var(--line); fill: none; }
.score__bar {
  fill: none; stroke-linecap: round;
  stroke: var(--score-color, var(--violet-500));
  stroke-dasharray: var(--circ) var(--circ);
  stroke-dashoffset: var(--circ);
  transition: stroke-dashoffset 900ms var(--ease);
}
.score.is-animated .score__bar { stroke-dashoffset: var(--offset); }
.score__num {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center;
  line-height: 1;
}
.score__num b {
  font-size: var(--num-size, 1.02rem); font-weight: 700; color: var(--ink-900);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.score__num small { font-size: .58rem; color: var(--ink-400); font-weight: 600; margin-top: 2px; }
.score__meta { min-width: 0; }
.score__label { font-size: .82rem; font-weight: 600; color: var(--score-color, var(--violet-600)); }
.score__hint { font-size: .74rem; color: var(--ink-400); }

.score[data-tier="excellent"]   { --score-color: var(--score-excellent); }
.score[data-tier="tresbon"]     { --score-color: var(--score-tresbon); }
.score[data-tier="interessant"] { --score-color: var(--score-interessant); }
.score[data-tier="moyen"]       { --score-color: var(--score-moyen); }

/* Deal Score : barre (variante compacte) */
.score-bar { width: 100%; }
.score-bar__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.score-bar__val { font-size: .82rem; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.score-bar__val span { color: var(--ink-300); font-weight: 600; font-size: .72rem; }
.score-bar__track {
  margin-top: 7px; height: 6px; border-radius: var(--r-full);
  background: var(--line); overflow: hidden;
}
.score-bar__fill {
  height: 100%; width: 0; border-radius: var(--r-full);
  background: linear-gradient(90deg, color-mix(in srgb, var(--score-color) 65%, white), var(--score-color));
  transition: width 800ms var(--ease);
}

/* ---------- Carte deal ---------- */
.deal-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.deal-card:hover, .deal-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--violet-200);
}
.deal-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--m1, var(--violet-100)) 0%, var(--m2, var(--sky-100)) 100%);
  overflow: hidden;
}
.deal-card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 30% 20%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
}
.deal-card__img {
  width: 58%; height: auto; color: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 8px 16px rgba(50, 40, 100, .16));
  transition: transform var(--t-slow) var(--ease);
}
.deal-card:hover .deal-card__img { transform: scale(1.045) translateY(-2px); }
.deal-card__media-top {
  position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: flex-start; gap: 8px;
}
.deal-card__ribbon {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--r-full);
  background: rgba(17, 17, 17, .92);
  backdrop-filter: blur(6px);
  font-size: .7rem; font-weight: 700; color: var(--score-color, var(--violet-700));
  box-shadow: var(--shadow-xs);
}
.deal-card__ribbon .icon { width: 13px; height: 13px; stroke-width: 2; }
.fav-btn {
  margin-left: auto;
  width: 32px; height: 32px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(17, 17, 17, .9);
  backdrop-filter: blur(6px);
  color: var(--ink-400);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.fav-btn:hover { transform: scale(1.09); color: var(--violet-600); background: var(--surface-muted); }
.fav-btn .icon { width: 17px; height: 17px; }
.fav-btn[aria-pressed="true"] { color: var(--rose-500); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; stroke: currentColor; }
.fav-btn.is-bump { animation: fav-bump 420ms var(--ease-spring); }
@keyframes fav-bump {
  35% { transform: scale(1.32); }
  60% { transform: scale(.92); }
  100% { transform: scale(1); }
}

.deal-card__body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.deal-card__brand {
  font-size: .7rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; color: var(--violet-500);
}
.deal-card__title {
  font-size: .95rem; font-weight: 600; color: var(--ink-900); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-card__title a::after { content: ""; position: absolute; inset: 0; }
.deal-card__price-row { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.deal-card__price { font-size: 1.35rem; font-weight: 700; letter-spacing: -.035em; color: var(--ink-900); line-height: 1; }
.deal-card__est { font-size: .78rem; color: var(--ink-400); text-decoration: line-through; }
.deal-card__save {
  font-size: .74rem; font-weight: 700; color: #7fd8c4;
  background: rgba(79, 173, 161, .14); border: 1px solid rgba(79, 173, 161, .28);
  padding: 2px 8px; border-radius: var(--r-full);
}
.deal-card__specs {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: .76rem; color: var(--ink-400);
}
.deal-card__specs li { display: inline-flex; align-items: center; gap: 5px; }
.deal-card__specs .icon { width: 13px; height: 13px; color: var(--ink-300); }
.deal-card__foot {
  margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.deal-card__cta { position: relative; z-index: 3; }

/* Variante « live » : une annonce réellement collectée, avec sa photo */
.deal-card--live .deal-card__media--photo {
  background: var(--grad-soft);
}
.deal-card--live .deal-card__media--photo::after {
  background: linear-gradient(180deg, rgba(20, 16, 50, .18) 0%, rgba(20, 16, 50, 0) 38%, rgba(20, 16, 50, 0) 70%, rgba(20, 16, 50, .12) 100%);
}
.deal-card--live .opp-card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slower) var(--ease);
}
.deal-card--live:hover .opp-card__img { transform: scale(1.05); }
.deal-card--live .opp-card__ph { width: 100%; height: 100%; }
.deal-card--live.is-matched { border-color: var(--violet-300); box-shadow: var(--shadow-sm), 0 0 0 3px rgba(255, 255, 255, .08); }
.deal-card__ribbon--match { background: var(--violet-600); color: var(--bg); box-shadow: var(--shadow-glow); }
.deal-card__ribbon--time { color: var(--ink-500); }
.deal-card__open {
  all: unset; cursor: pointer; color: inherit; font: inherit; display: block;
  transition: color var(--t-fast) var(--ease);
}
.deal-card__open:hover { color: var(--violet-700); }
.deal-card__open:focus-visible { outline: 2px solid var(--violet-500); outline-offset: 3px; border-radius: var(--r-xs); }
.deal-card__match {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: .72rem; font-weight: 600; color: var(--violet-700);
  background: var(--violet-50); border: 1px solid var(--violet-100);
}
.deal-card__match .icon { width: 12px; height: 12px; stroke-width: 2; flex: none; }
.deal-card__meta { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-400); }
.deal-card__meta .icon { width: 13px; height: 13px; }
.deal-card__source {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; color: var(--ink-400); text-transform: capitalize;
}
.deal-card__source .icon { width: 14px; height: 14px; }

/* Variante horizontale (favoris / listes) */
.deal-row {
  display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.deal-row:hover { border-color: var(--violet-200); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.deal-row__media {
  aspect-ratio: 1; border-radius: var(--r-sm); display: grid; place-items: center;
  background: linear-gradient(150deg, var(--m1) 0%, var(--m2) 100%);
}
.deal-row__media img { width: 58%; }

/* ---------- Carte alerte ---------- */
.alert-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.alert-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-live); opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.alert-card.is-active::before { opacity: 1; }
.alert-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--violet-200); }
.alert-card.is-paused { opacity: .78; background: var(--surface-muted); }
.alert-card.is-paused .alert-card__mark { filter: grayscale(1); opacity: .6; }
.alert-card__head { display: flex; align-items: flex-start; gap: 12px; }
.alert-card__ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.alert-card__mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: var(--grad-brand); color: var(--bg);
  font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em;
  box-shadow: 0 6px 14px -6px rgba(255, 255, 255, .3);
}
.alert-card__title { font-size: 1.02rem; font-weight: 600; color: var(--ink-900); }
.alert-card__sub { font-size: .78rem; color: var(--ink-400); margin-top: 3px; }
.alert-card__status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; font-weight: 600; color: var(--ink-500);
  background: var(--surface-muted); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: var(--r-full); white-space: nowrap;
}
.alert-card.is-active .alert-card__status { color: #7fd8c4; background: rgba(79, 173, 161, .14); border-color: rgba(79, 173, 161, .28); }
/* Les critères tiennent en une ligne de texte : ce qu'on lit, pas des boutons */
.alert-card__criteria {
  display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0;
  font-size: .86rem; color: var(--ink-400); line-height: 1.5;
}
.alert-card__criteria span + span::before { content: "·"; margin: 0 8px; color: var(--ink-300); }
.alert-card__criteria b { color: var(--ink-800); font-weight: 600; }
.alert-card__actions { display: flex; gap: 2px; flex-wrap: wrap; padding-top: 4px; margin: 0 -6px; }
.alert-card__actions .btn--ghost { border-color: transparent; background: transparent; color: var(--ink-500); padding-inline: 10px; }
.alert-card__actions .btn--ghost:hover { color: var(--ink-900); background: rgba(255, 255, 255, .06); }
.btn--danger-text:hover { color: var(--rose-500) !important; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: .8rem; font-weight: 600; color: var(--ink-700); }
.field__hint { font-size: .74rem; color: var(--ink-400); }
.field__error { font-size: .75rem; color: #f1a2bd; display: none; }
.field.has-error .field__error { display: block; animation: reveal-in 260ms var(--ease) both; }
.field.has-error .input, .field.has-error .select { border-color: rgba(241, 162, 189, .45); background: rgba(201, 88, 125, .08); }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-800);
  font-size: .875rem;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }
.input:hover, .select:hover { border-color: var(--violet-200); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--violet-500); box-shadow: var(--shadow-ring); background: var(--surface);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d88ab' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 17px;
  padding-right: 36px; cursor: pointer;
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group .icon { position: absolute; left: 13px; color: var(--ink-300); pointer-events: none; transition: color var(--t-fast) var(--ease); }
.input-group:focus-within .icon { color: var(--violet-500); }
.input-group .input { padding-left: 40px; }
.input-group__suffix {
  position: absolute; right: 14px; font-size: .82rem; color: var(--ink-400); font-weight: 600; pointer-events: none;
}
.input-group--suffix .input { padding-right: 38px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .field--full { grid-column: 1 / -1; }

/* Segmented control */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 4px; padding: 4px;
  background: var(--surface-muted); border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  text-align: center; padding: 8px 10px; border-radius: 9px;
  font-size: .8rem; font-weight: 600; color: var(--ink-500);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.segmented label:hover { color: var(--violet-700); }
.segmented input:checked + label { background: var(--surface); color: var(--violet-700); box-shadow: var(--shadow-xs); }
.segmented input:focus-visible + label { outline: 2px solid var(--violet-500); outline-offset: 1px; }

/* Range */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track {
  height: 5px; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--violet-400) var(--pct, 50%), var(--line) var(--pct, 50%));
}
.range::-moz-range-track { height: 5px; border-radius: var(--r-full); background: var(--line); }
.range::-moz-range-progress { height: 5px; border-radius: var(--r-full); background: var(--violet-400); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 17px; height: 17px; margin-top: -6px; border-radius: 50%;
  background: #fff; border: 1px solid var(--violet-300);
  box-shadow: 0 2px 6px rgba(88, 74, 168, .28);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.range::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 1px solid var(--violet-300);
  box-shadow: 0 2px 6px rgba(88, 74, 168, .28);
}
.range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.range:active::-webkit-slider-thumb { transform: scale(1.2); box-shadow: var(--shadow-ring); }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch--row { width: 100%; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  width: 42px; height: 24px; border-radius: var(--r-full);
  background: var(--line-strong); position: relative; flex: none;
  transition: background var(--t-base) var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(25, 22, 48, .25);
  transition: transform var(--t-base) var(--ease-spring);
}
.switch input:checked + .switch__track { background: var(--grad-brand); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--violet-500); outline-offset: 2px; }
.switch__text { font-size: .85rem; color: var(--ink-700); font-weight: 600; }
.switch__text small { display: block; font-size: .74rem; color: var(--ink-400); font-weight: 400; }

/* ---------- Barre d'outils / filtres ---------- */
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.toolbar--sticky {
  position: sticky; top: calc(var(--header-h) + 10px); z-index: 20;
  background: var(--glass-strong);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.toolbar .input-group { flex: 1 1 260px; }
.toolbar__sort { display: flex; align-items: center; gap: 8px; }
.toolbar__sort .field__label { white-space: nowrap; }

.filters { display: flex; flex-direction: column; gap: 4px; }
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group__title {
  font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-400); margin-bottom: 12px;
}
.filter-options { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-check { display: flex; align-items: center; gap: 9px; padding: 5px 0; cursor: pointer; font-size: .84rem; color: var(--ink-600); transition: color var(--t-fast) var(--ease); }
.filter-check input { position: absolute; opacity: 0; pointer-events: none; }
.filter-check__box {
  width: 18px; height: 18px; border-radius: 6px; flex: none;
  border: 1px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: var(--bg);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.filter-check__box .icon { width: 12px; height: 12px; stroke-width: 2.6; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.filter-check input:checked + .filter-check__box { background: var(--grad-brand); border-color: transparent; transform: scale(1.06); }
.filter-check input:checked + .filter-check__box .icon { opacity: 1; }
.filter-check input:focus-visible + .filter-check__box { outline: 2px solid var(--violet-500); outline-offset: 2px; }
.filter-check:hover { color: var(--violet-700); }
.filter-check__count { margin-left: auto; font-size: .74rem; color: var(--ink-300); font-variant-numeric: tabular-nums; }

.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 14px; }
.results-bar__count { font-size: .85rem; color: var(--ink-500); }
.results-bar__count b { color: var(--ink-900); font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- États vides ---------- */
.empty {
  text-align: center; padding: 56px 24px;
  background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.empty__icon {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--violet-500);
}
.empty__icon .icon { width: 26px; height: 26px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--ink-400); font-size: .88rem; max-width: 42ch; margin: 0 auto 20px; }

/* ---------- Page détail (démonstration) ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: start; }
.detail__media {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--m1) 0%, var(--m2) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.detail__media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 28% 18%, rgba(255,255,255,.6), rgba(255,255,255,0) 72%);
}
.detail__media img { width: 52%; color: rgba(255,255,255,.94); filter: drop-shadow(0 16px 28px rgba(50, 40, 100, .2)); }
.detail__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.detail__thumb {
  min-width: 0;
  aspect-ratio: 1; border-radius: var(--r-md); border: 1px solid var(--line);
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--m1) 0%, var(--m2) 100%);
  opacity: .55; cursor: pointer;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.detail__thumb img { width: 52%; color: rgba(255,255,255,.95); }
.detail__thumb:hover, .detail__thumb.is-on { opacity: 1; transform: translateY(-2px); border-color: var(--violet-200); }

.detail__title { margin-top: 8px; font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); }
.detail__price-block {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.detail__price { font-size: 2.4rem; font-weight: 700; letter-spacing: -.045em; color: var(--ink-900); line-height: 1; }
.detail__price-meta { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; color: var(--ink-400); }
.detail__price-meta s { color: var(--ink-400); }
.detail__price-meta b { color: #7fd8c4; font-size: .88rem; }

.score-panel {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 22px; border-radius: var(--r-lg);
  background: var(--grad-soft);
  border: 1px solid var(--violet-100);
}
.score-panel__text h3 { font-size: 1.05rem; }
.score-panel__text p { font-size: .82rem; color: var(--ink-500); margin-top: 4px; max-width: 34ch; }

.ai-analysis { margin-top: 24px; }
.ai-analysis__head { display: flex; align-items: center; gap: 10px; }
.ai-analysis__head .icon { color: var(--violet-500); }
.ai-list { margin-top: 14px; display: grid; gap: 10px; }
.ai-list li {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .86rem; color: var(--ink-600);
  animation: reveal-in 400ms var(--ease) both;
}
.ai-list li b { color: var(--ink-900); font-weight: 600; }
.ai-list__tick {
  width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 1px;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--violet-600);
}
.ai-list__tick .icon { width: 13px; height: 13px; stroke-width: 2.4; }

.detail__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.fact {
  padding: 13px 15px; border-radius: var(--r-md);
  background: var(--surface-muted); border: 1px solid var(--line);
}
.fact dt { font-size: .72rem; color: var(--ink-400); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fact dd { margin: 4px 0 0; font-size: .9rem; color: var(--ink-900); font-weight: 600; }

.seller {
  display: flex; align-items: center; gap: 13px;
  padding: 15px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); margin-top: 22px;
}
.seller__name { font-size: .88rem; font-weight: 600; color: var(--ink-900); }
.seller__meta { font-size: .76rem; color: var(--ink-400); display: flex; align-items: center; gap: 6px; }
.seller__meta .icon { width: 13px; height: 13px; color: var(--sand-500); fill: var(--sand-300); }

.detail__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.detail__note { margin-top: 12px; font-size: .74rem; color: var(--ink-300); }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .84rem; font-weight: 600; color: var(--ink-500);
  padding: 7px 12px 7px 8px; border-radius: var(--r-full);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.back-link:hover { background: rgba(255, 255, 255, .08); color: var(--violet-700); }
.back-link:hover .icon { transform: translateX(-2px); }
.back-link .icon { transition: transform var(--t-fast) var(--ease); }

/* ---------- Panneau notifications ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade-in var(--t-base) var(--ease) both;
}
.scrim.is-out { animation: fade-out var(--t-fast) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

.notif-panel {
  position: fixed; z-index: 90; top: 12px; right: 12px; bottom: 12px;
  width: min(400px, calc(100vw - 24px));
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: panel-in var(--t-slow) var(--ease) both;
}
.notif-panel.is-out { animation: panel-out var(--t-base) var(--ease) both; }
@keyframes panel-in  { from { opacity: 0; transform: translateX(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes panel-out { to { opacity: 0; transform: translateX(18px) scale(.985); } }

.notif-panel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--line);
}
.notif-panel__head h2 { font-size: 1.02rem; }
.notif-panel__list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.notif-panel__foot { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-muted); }

.notif {
  display: flex; gap: 12px; width: 100%; text-align: left;
  padding: 13px; border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  animation: reveal-in 340ms var(--ease) both;
}
.notif:hover { background: var(--surface-muted); border-color: var(--line); transform: translateX(2px); }
.notif.is-unread { background: var(--violet-50); }
.notif.is-unread:hover { background: var(--violet-100); }
.notif__icon {
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--violet-600);
}
.notif__icon--mint { background: rgba(79, 173, 161, .14); color: #7fd8c4; }
.notif__icon--sky { background: rgba(143, 163, 189, .14); color: #b9c6d8; }
.notif__icon--sand { background: rgba(201, 162, 92, .14); color: #e7c08a; }
.notif__body { min-width: 0; flex: 1; }
.notif__title { font-size: .85rem; font-weight: 600; color: var(--ink-900); display: flex; align-items: center; gap: 7px; }
.notif__title .dot { width: 6px; height: 6px; background: var(--violet-500); box-shadow: none; }
.notif__text { font-size: .8rem; color: var(--ink-500); margin-top: 2px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif__text b { color: var(--ink-800); font-weight: 600; }
.notif__time { font-size: .72rem; color: var(--ink-300); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.notif__score {
  align-self: center; flex: none;
  font-size: .74rem; font-weight: 700; color: var(--violet-700);
  background: var(--violet-50); border: 1px solid var(--violet-100);
  padding: 4px 9px; border-radius: var(--r-full);
  white-space: nowrap;
}

/* ---------- Modale ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal {
  position: relative; z-index: 2;
  width: min(640px, 100%);
  max-height: min(86dvh, 820px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in var(--t-slow) var(--ease-spring) both;
}
.modal.is-out { animation: modal-out var(--t-fast) var(--ease) both; }
@keyframes modal-in  { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.99); } }

.modal__head {
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--grad-hero);
}
.modal__head h2 { font-size: 1.2rem; }
.modal__head p { font-size: .84rem; color: var(--ink-500); margin-top: 5px; max-width: 46ch; }
.modal__close { margin-left: auto; }
.modal__body { padding: 24px 26px; overflow-y: auto; }
.modal__foot {
  padding: 16px 26px; border-top: 1px solid var(--line);
  background: var(--surface-muted);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.modal__reassure {
  display: flex; align-items: center; gap: 9px;
  font-size: .78rem; color: var(--ink-400); flex: 1 1 240px;
}
.modal__reassure .icon { color: var(--mint-500); width: 16px; height: 16px; flex: none; }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed; z-index: 120; left: 50%; bottom: 24px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  --toast-accent: #3a3a3a;
  position: relative; overflow: hidden;
  pointer-events: auto;
  display: flex; align-items: center; gap: 11px;
  padding: 12px 18px 13px 14px;
  border-radius: var(--r-md);
  background: rgba(245, 245, 247, .96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #0a0a0a; font-size: .85rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--t-slow) var(--ease-spring) both;
}
.toast.is-out { animation: toast-out var(--t-base) var(--ease) both; }
.toast__icon {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .07); color: var(--toast-accent);
}
.toast__icon .icon { width: 16px; height: 16px; }
.toast__bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--toast-accent); opacity: .8;
  transform-origin: left; animation: toast-bar 3.4s linear both;
}
.toast.is-error { --toast-accent: #b4485f; }
.toast.is-live { --toast-accent: #2f7f74; }
.toast.is-heart { --toast-accent: #c9587d; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Paramètres ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.setting-row {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row:first-child { padding-top: 0; }
.setting-row__text { flex: 1; min-width: 0; }
.setting-row__text strong { display: block; font-size: .88rem; color: var(--ink-900); font-weight: 600; }
.setting-row__text span { font-size: .78rem; color: var(--ink-400); }

.profile-card { display: flex; align-items: center; gap: 16px; }
.profile-card__name { font-size: 1.05rem; font-weight: 600; color: var(--ink-900); }
.profile-card__mail { font-size: .82rem; color: var(--ink-400); }

/* ---------- Layout page Deals (filtres + grille) ---------- */
.deals-layout { display: grid; grid-template-columns: 254px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 22px; }
.filters-panel {
  position: sticky; top: calc(var(--header-h) + 18px);
  padding: 6px 20px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  max-height: calc(100dvh - var(--header-h) - 36px);
  overflow-y: auto;
}
.toolbar--sticky ~ .deals-layout .filters-panel { top: calc(var(--header-h) + 96px); max-height: calc(100dvh - var(--header-h) - 112px); }
.filters-panel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 0 4px;
}
.filters-panel__head h2 { font-size: .95rem; }
.filters-panel__close { display: none; margin-left: auto; }
.filters-toggle { display: none; }

/* ---------- Onglets bottom-nav ---------- */
.bottom-nav { display: none; }

/* ---------- Divers ---------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.kbd {
  font-size: .7rem; font-family: inherit; font-weight: 600; color: var(--ink-400);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 6px; background: var(--surface);
}


/* ============================================================================
   Opportunités — tableau de bord
   ========================================================================== */

.view__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.view__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); letter-spacing: -.02em; margin-top: 8px; }

.view__sub { color: var(--ink-400); font-size: .92rem; margin-top: 6px; }
.view__sub strong { color: var(--ink-800); font-weight: 600; font-variant-numeric: tabular-nums; }
.view__sep { margin: 0 8px; color: var(--line-strong); }

.dash-head__side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opp-filters { display: flex; gap: 6px; padding: 4px; border-radius: var(--r-full); background: var(--surface-muted); border: 1px solid var(--line); }
.opp-filters .chip { border-color: transparent; background: transparent; }
.opp-filters .chip[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-xs); border-color: var(--line); }

/* ---------- Grille ---------- */

.grid--opps { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- Carte ---------- */

.opp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}

.opp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--violet-200); }
.opp-card:focus-within { border-color: var(--violet-300); box-shadow: var(--shadow-ring); }

/* L'opportunité jamais consultée se distingue par un liseré, sans crier. */
.opp-card--new { border-color: var(--violet-400); box-shadow: var(--shadow-sm), 0 0 0 3px rgba(255, 255, 255, .08); }

.opp-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--grad-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.opp-card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 16, 50, .16) 0%, rgba(20, 16, 50, 0) 36%, rgba(20, 16, 50, 0) 72%, rgba(20, 16, 50, .1) 100%);
}

.opp-card__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--t-slower) var(--ease);
}
.opp-card:hover .opp-card__img { transform: scale(1.05); }

.opp-card__ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--violet-400); }
.opp-card__ph .icon { width: 34px; height: 34px; }

.opp-card__flag {
  position: absolute; z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--violet-600);
  color: var(--bg);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: var(--shadow-glow);
}
.opp-card__when {
  position: absolute; z-index: 2; bottom: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-full);
  background: rgba(17, 17, 17, .85); backdrop-filter: blur(6px);
  color: var(--ink-600); font-size: .7rem; font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.opp-card__when .icon { width: 12px; height: 12px; }
.opp-card__fav { position: absolute; z-index: 2; top: 10px; right: 10px; margin: 0; }

.opp-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 18px;
  flex: 1;
}

.opp-card__brand {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 2px;
}

.opp-card__title { font-size: .98rem; line-height: 1.35; }

/* Le titre est le point d'entrée accessible de la carte : un vrai bouton,
   stylé comme un titre. */
.opp-card__open {
  all: unset;
  cursor: pointer;
  color: var(--ink-900);
  font: inherit;
  display: block;
  transition: color var(--t-fast) var(--ease);
}

.opp-card__open:hover { color: var(--violet-700); }
.opp-card__open:focus-visible { outline: 2px solid var(--violet-500); outline-offset: 3px; border-radius: var(--r-xs); }

.opp-card__price { font-size: 1.3rem; font-weight: 700; color: var(--ink-900); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.opp-card__specs { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--ink-500); }
.opp-card__specs li { display: inline-flex; align-items: center; gap: 6px; }
.opp-card__specs .icon { width: 14px; height: 14px; color: var(--ink-300); }

.opp-card__meta { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-400); }
.opp-card__meta .icon { width: 14px; height: 14px; }

.opp-card__alert {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start; max-width: 100%;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: .74rem; font-weight: 600; color: var(--violet-700);
  background: var(--violet-50); border: 1px solid var(--violet-100);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opp-card__alert span { color: var(--ink-400); font-weight: 500; }
.opp-card__alert .icon { width: 13px; height: 13px; stroke-width: 2; flex: none; }

.opp-card__foot { margin-top: auto; padding-top: 4px; }
.opp-card__foot .btn { width: 100%; justify-content: center; }

/* ---------- Charger plus ---------- */

.opp-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; }
.opp-more__error { color: #f1a2bd; font-size: .86rem; }

/* ---------- Détail ---------- */

.opp-detail { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 22px; align-items: start; }

.opp-detail__media {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--grad-soft);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.opp-detail__media .opp-card__img { width: 100%; height: 100%; object-fit: cover; }

.opp-detail__info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.opp-detail__price { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }

.opp-detail__list { display: flex; flex-direction: column; gap: 8px; }
.opp-detail__row { display: flex; gap: 12px; font-size: .88rem; }
.opp-detail__row dt { color: var(--ink-400); min-width: 104px; }
.opp-detail__row dd { color: var(--ink-800); font-weight: 500; margin: 0; }

.opp-detail__desc { font-size: .88rem; color: var(--ink-500); line-height: 1.6; white-space: pre-line; }

/* ---------- Squelettes de chargement ---------- */

.sk {
  position: relative;
  overflow: hidden;
  background: var(--surface-muted);
  border-radius: var(--r-xs);
}

.sk::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  animation: sk-sweep 1.4s infinite;
}

@keyframes sk-sweep { to { transform: translateX(100%); } }

.sk--line { display: block; height: 12px; }
.sk--price { height: 22px; }
.sk--w30 { width: 30%; } .sk--w40 { width: 40%; } .sk--w60 { width: 60%; } .sk--w80 { width: 80%; }
.sk--mark { width: 42px; height: 42px; border-radius: 13px; flex: none; }
.sk--chip { width: 84px; height: 28px; border-radius: var(--r-sm); }
.sk--block { display: block; height: 58px; border-radius: var(--r-md); }

.opp-card--ghost { pointer-events: none; cursor: default; }
.opp-card--ghost:hover { transform: none; box-shadow: var(--shadow-sm); }
.opp-card--ghost .opp-card__media { border-radius: 0; }
.opp-card--ghost .opp-card__media::after { display: none; }

/* Fantômes du catalogue et des alertes : la place, le rythme, pas la carte. */
.deal-ghost, .alert-ghost {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  pointer-events: none;
}
.deal-ghost .deal-card__media { aspect-ratio: 4 / 3; border-radius: 0; background: var(--surface-muted); }
.deal-ghost .deal-card__media::after { display: none; }
.deal-ghost .deal-card__body { padding: 15px 16px 16px; gap: 12px; }
.alert-ghost { gap: 16px; padding: 20px; }
.alert-ghost .alert-card__head { align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .sk::after { animation: none; }
  .live-pill__dot::after { animation: none; }
  .btn--primary::after { display: none; }
}

/* ---------- Connexion Google ----------
   Le seul bouton portant une marque tierce : fond blanc, bordure nette, le
   « G » en couleurs, un libellé unique. L'état d'attente couvre le départ
   vers Google, pendant lequel un second clic n'a aucun sens. */
.btn--google {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink-800);
  gap: 12px;
  border-color: var(--line-strong);
  font-weight: 600;
}
.btn--google:hover { border-color: rgba(255, 255, 255, .28); background: var(--surface-muted); box-shadow: var(--shadow-sm); }
.btn--google:active { background: #1c1c1c; }
.btn--google[aria-busy="true"] { opacity: .78; pointer-events: none; }
.btn--google[aria-busy="true"] .btn--google__mark { animation: google-spin 1s linear infinite; }
.btn--google__mark {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
}
.google-mark { width: 18px; height: 18px; display: block; }
.btn--google__label { white-space: nowrap; }
@keyframes google-spin { to { transform: rotate(360deg); } }

.auth-modal { display: flex; flex-direction: column; gap: 14px; padding: 6px 0 4px; }
.auth-modal__note { margin: 0; font-size: .86rem; color: var(--ink-400); line-height: 1.5; text-align: center; }
.auth-modal .btn--google { min-height: 54px; border-radius: var(--r-full); }
/* ---------- Centre de notifications (mode live) ----------
   Une notification = une vignette, un titre, un texte, l'alerte concernée,
   le prix, et une action « Voir l'offre ». Le bouton principal couvre toute la
   ligne ; la suppression est un second bouton, discret, à droite. */
.notif { position: relative; align-items: stretch; padding: 0; gap: 0; }
.notif__main {
  all: unset; box-sizing: border-box;
  display: flex; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 13px; border-radius: inherit; font: inherit; color: inherit;
}
.notif__main:focus-visible { outline: 2px solid var(--violet-500); outline-offset: -2px; }
.notif__thumb {
  width: 52px; height: 52px; border-radius: 12px; flex: none; overflow: hidden;
  background: var(--grad-soft); display: grid; place-items: center;
}
.notif__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.notif__thumb .opp-card__ph { width: 100%; height: 100%; }
.notif__thumb .opp-card__ph .icon { width: 20px; height: 20px; }
.notif__alert {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: .72rem; font-weight: 600; color: var(--violet-700);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif__meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.notif__meta .notif__time { margin-top: 0; }
.notif__price {
  font-size: .78rem; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums;
}
.notif__cta {
  align-self: center; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; font-weight: 600; color: var(--violet-700);
  opacity: .85; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.notif:hover .notif__cta { opacity: 1; transform: translateX(2px); }
.notif__remove {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px;
  opacity: 0; transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.notif:hover .notif__remove, .notif:focus-within .notif__remove, .notif__remove:focus-visible { opacity: 1; }
.notif.is-out { animation: notif-out 180ms var(--ease) both; }
@keyframes notif-out { to { opacity: 0; transform: translateX(14px); } }
.notif--ghost { padding: 13px; gap: 12px; pointer-events: none; animation: none; }
.sk--thumb { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.notif-panel__more { display: flex; justify-content: center; padding: 8px 0 4px; }
.setting-row.is-soon .setting-row__text { opacity: .7; }
.setting-row.is-soon .switch { opacity: .55; cursor: not-allowed; }

/* Toast avec action : plus large, plus long, un bouton à droite */
.toast__text { min-width: 0; }
.toast--action { padding-right: 10px; max-width: min(520px, calc(100vw - 32px)); }
.toast__action {
  flex: none; margin-left: 4px;
  padding: 7px 12px; border-radius: var(--r-full);
  background: rgba(0, 0, 0, .08); color: #0a0a0a;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.toast__action:hover { background: rgba(0, 0, 0, .14); transform: translateY(-1px); }
.toast__action:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }
.toast__bar { animation-duration: var(--toast-duree, 3.4s); }
@media (hover: none) {
  .notif__remove { opacity: .8; }
}
@media (max-width: 720px) {
  .notif__cta { display: none; }
  .notif__main { padding: 12px; gap: 10px; }
  .notif__thumb { width: 46px; height: 46px; }
  .toast--action { flex-wrap: wrap; justify-content: center; }
}


/* ---------- Contexte du tableau de bord : une ligne, pas des tuiles ---------- */
.view__meta {
  display: flex; flex-wrap: wrap; gap: 4px 0; margin: 14px 0 22px;
  font-size: .88rem; color: var(--ink-400);
}
.view__meta b { color: var(--ink-800); font-weight: 600; }
.view__meta span + span::before { content: "·"; margin: 0 10px; color: var(--ink-300); }

/* ---------- Paramètres (session) : une page, pas une grille de cartes ---------- */
.account {
  display: flex; flex-direction: column; gap: 34px; max-width: 640px;
}
.account__head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.account__name { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink-900); }
.account__mail { margin: 2px 0 0; font-size: .88rem; color: var(--ink-400); }
.account__since { margin: 6px 0 0; font-size: .78rem; color: var(--ink-300); }
.account__section h2 { font-size: 1.02rem; margin-bottom: 4px; }
.account__section > p { color: var(--ink-400); font-size: .88rem; margin-bottom: 14px; }
.account__radar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.account__radar p { margin: 0; font-size: .9rem; color: var(--ink-500); }
.account__radar b { color: var(--ink-900); font-weight: 600; }
.account__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-400); font-size: .84rem; }

/* ---------- Résultat d'une alerte : une ligne d'état, pas une boîte ---------- */
.alert-card__result {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: start;
  padding: 14px 0 4px; border-top: 1px solid var(--line); margin-top: 2px;
}
.alert-card__result > .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--ink-400); }
.alert-card__result.is-waiting > .icon { color: var(--ink-300); }
.alert-card__result div { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; color: var(--ink-400); line-height: 1.45; }
.alert-card__result b { color: var(--ink-900); font-weight: 600; }
.alert-card__result.is-waiting b { color: var(--ink-700); }
.alert-card__link { grid-column: 2; justify-self: start; margin-top: 2px; padding-inline: 10px; border-color: transparent; }

/* ---------- Limite de l'offre atteinte (tableau de bord) ---------- */
.quota { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 14px 0 4px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 16px;
  background: rgba(255, 255, 255, .04); }
.quota__text { flex: 1 1 220px; min-width: 0; }
.quota__title { margin: 0; font-weight: 700; color: var(--ink-900); font-size: .95rem; }
.quota__sub { margin: 4px 0 0; font-size: .86rem; color: var(--ink-500); line-height: 1.45; }
.quota__sub b { color: var(--ink-900); }
