/* ==========================================================================
   Atlantic Boat Market — abm-components.css
   Composants UI premium réutilisables
   --------------------------------------------------------------------------
   Couche additive globale : header, cards, CTA, badges, formulaires,
   cockpit, tunnel annonce, responsive et micro-interactions.
   Ne remplace pas abm-base.css, abm-account.css, abm-listing.css,
   abm-home.css ou abm-create-funnel.css.
   ========================================================================== */

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
  --abm-navy-950: #07111f;
  --abm-navy-900: #0b1628;
  --abm-navy-850: #0f1d33;
  --abm-navy-800: #14233a;

  --abm-blue-700: #1652f0;
  --abm-blue-600: #2563eb;
  --abm-blue-500: #3b82f6;
  --abm-cyan-500: #22d3ee;

  --abm-gold-600: #b98221;
  --abm-gold-500: #d7aa52;
  --abm-gold-400: #f0c977;

  --abm-green-600: #059669;
  --abm-green-500: var(--abm-color-success, #10b981);
  --abm-red-600: #dc2626;
  --abm-red-500: var(--abm-color-danger, #ef4444);
  --abm-orange-500: var(--abm-color-warning, #f59e0b);

  --abm-ink-950: #020617;
  --abm-ink-900: var(--abm-color-text, #111827);
  --abm-ink-800: #1f2937;
  --abm-ink-700: var(--abm-color-text-soft, #334155);
  --abm-ink-600: var(--abm-color-muted-strong, #475569);
  --abm-ink-500: var(--abm-color-muted, #64748b);
  --abm-ink-400: #94a3b8;

  --abm-line: rgba(15, 23, 42, 0.10);
  --abm-line-strong: rgba(15, 23, 42, 0.18);

  --abm-surface: var(--abm-color-surface, #ffffff);
  --abm-surface-soft: var(--abm-color-bg-soft, #f8fafc);
  --abm-surface-blue: var(--abm-color-info-soft, #eef5ff);
  --abm-surface-gold: #fff7e6;
  --abm-surface-green: #ecfdf5;
  --abm-surface-red: #fef2f2;

  --abm-radius-xs: 10px;
  --abm-radius-sm: 12px;
  --abm-radius-md: 18px;
  --abm-radius-lg: 26px;
  --abm-radius-xl: 34px;

  --abm-shadow-xs: 0 6px 18px rgba(15, 23, 42, 0.06);
  --abm-shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.08);
  --abm-shadow-md: 0 20px 55px rgba(15, 23, 42, 0.12);
  --abm-shadow-premium: 0 24px 80px rgba(7, 17, 31, 0.16);

  --abm-focus: var(--abm-shadow-focus, 0 0 0 4px rgba(245, 179, 1, 0.24));
  --abm-transition: 0.18s ease;
}

/* ==========================================================================
   2. Base de cohérence
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.abm-container {
  width: min(100% - 32px, 1440px);
  margin-inline: auto;
}

::selection {
  color: var(--abm-color-text, #111827);
  background: rgba(245, 179, 1, 0.28);
}

:focus-visible {
  outline: none;
  box-shadow: var(--abm-focus);
}

/* ==========================================================================
   3. Header / navigation premium
   ========================================================================== */

.abm-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.14), transparent 28%),
    linear-gradient(135deg, var(--abm-navy-950), var(--abm-navy-850));
  color: rgba(255, 255, 255, 0.86);
}

.abm-topbar-inner {
  min-height: 42px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.abm-topbar-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 0.86rem;
}

.abm-topbar-copy strong {
  color: #fff;
  letter-spacing: -0.01em;
}

.abm-topbar-badge,
.abm-badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid rgba(240, 201, 119, 0.34);
  border-radius: 999px;
  background: rgba(240, 201, 119, 0.10);
  color: var(--abm-gold-400);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.abm-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  background:
    linear-gradient(180deg, rgba(246, 248, 251, 0.96), rgba(246, 248, 251, 0.74) 82%, rgba(246, 248, 251, 0));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 0;
}

.abm-header-panel {
  margin: 12px 0 0;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% 0%, rgba(245, 179, 1, 0.18), transparent 31%),
    radial-gradient(circle at 88% 0%, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0f2740 54%, #123452 100%);
  box-shadow:
    0 18px 46px rgba(15, 39, 64, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  overflow: visible;
}

.abm-header-main {
  min-height: 72px;
  padding: 9px 0 8px;
  display: grid;
  grid-template-columns: minmax(230px, auto) minmax(320px, 1fr) minmax(240px, auto);
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.abm-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  border-radius: 18px;
}

.abm-brand:hover {
  color: #fff;
}

.abm-brand-logo {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  filter: none;
}

.abm-brand-title {
  font-weight: 950;
  letter-spacing: -0.03em;
  color: #fff;
}

.abm-brand-sub {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.74rem;
  font-weight: 750;
}

.abm-search-form {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 28px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.abm-search-form .abm-search-input {
  border: 0;
  box-shadow: none;
  background: transparent;
  min-height: 46px;
}

.abm-search-input::placeholder {
  color: #7c8798;
}

.abm-search-form .abm-search-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #173d63, #0f2740);
  box-shadow: 0 14px 28px rgba(15, 39, 64, 0.28);
}

.abm-search-form .abm-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(15, 39, 64, 0.32);
}

.abm-header-actions .abm-header-cta,
.abm-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(155, 105, 0, 0.28);
  background: linear-gradient(180deg, #f7c542 0%, #f5b301 100%);
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 14px 30px rgba(245, 179, 1, 0.26);
}

.abm-header-actions .abm-header-cta:hover,
.abm-header-cta:hover {
  color: #111827;
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffd35b 0%, #f5b301 100%);
  box-shadow: 0 18px 40px rgba(245, 179, 1, 0.30);
}

.abm-language-shell {
  min-height: 44px;
  min-width: 86px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.abm-language-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  color: var(--abm-navy, #0b2545);
  font-size: .88rem;
  font-weight: 950;
  white-space: nowrap;
}

.abm-language-switcher {
  color: var(--abm-ink-700);
  font-weight: 800;
}

.abm-nav-wrap {
  margin-top: 0;
  width: 100%;
}

.abm-header-nav {
  min-height: 48px;
  padding: 8px 0 10px;
  border-top: 0;
}

.abm-nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.abm-navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  transition:
    transform var(--abm-transition),
    box-shadow var(--abm-transition),
    border-color var(--abm-transition),
    background var(--abm-transition);
}

.abm-navbtn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.abm-navbtn--ghost {
  background: #fff;
  color: #0f2740;
  border-color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.abm-navbtn--ghost:hover {
  color: #0f2740;
  background: #fff;
}

.abm-account-toggle {
  flex: 0 0 auto;
  width: auto;
}

.abm-account-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.abm-account-toggle[aria-expanded="true"] .abm-account-inline-arrow {
  transform: rotate(90deg);
}

.abm-account-menu-inline {
  display: none;
  flex: 0 1 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.abm-account-menu-inline.is-open {
  display: inline-flex;
}

.abm-account-menu-inline[hidden] {
  display: none !important;
}

.abm-account-toggle,
.abm-account-menu-inline > a,
.abm-account-menu-inline > span,
.abm-account-menu-inline > form > button {
  flex: 0 0 auto;
  width: auto;
  max-width: 112px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.abm-account-inline-link {
  background: rgba(255, 255, 255, 0.96);
  color: #0f2740;
  border-color: rgba(255, 255, 255, 0.22);
  font-size: 0.72rem;
  font-weight: 850;
}

.abm-account-inline-link.is-disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}

.abm-account-logout-form {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  max-width: 112px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.abm-account-logout-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
}

.abm-account-menu-inline .is-disabled,
.abm-account-menu-inline [aria-disabled="true"] {
  opacity: 0.48;
  pointer-events: none;
  cursor: not-allowed;
}

@media (min-width: 992px) {
  .abm-header-panel,
  .abm-header-inner,
  .abm-nav-wrap,
  .abm-header-nav {
    max-width: 100%;
    overflow: hidden;
  }

  .abm-header-nav,
  .abm-nav-main {
    overflow: hidden;
  }

  .abm-nav-main {
    flex-wrap: nowrap;
  }

  .abm-navbtn {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ==========================================================================
   4. Sections / panels / cards
   ========================================================================== */

.abm-section,
.abm-premium-section {
  padding-block: clamp(32px, 5vw, 76px);
}

.abm-section-head,
.abm-premium-head {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(18px, 3vw, 34px);
}

.abm-section-kicker,
.abm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--abm-blue-700);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.abm-section-title,
.abm-premium-title {
  color: var(--abm-ink-900);
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.04;
  margin: 0 0 10px;
}

.abm-section-sub,
.abm-section-subtitle,
.abm-premium-subtitle {
  max-width: 720px;
  color: var(--abm-ink-600);
  font-size: 0.96rem;
  line-height: 1.65;
}

.card,
.abm-card,
.abm-premium-card,
.abm-listing-card,
.abm-dashboard-card,
.abm-panel {
  border: 1px solid var(--abm-line);
  border-radius: var(--abm-radius-lg);
  background: var(--abm-surface);
  box-shadow: var(--abm-shadow-sm);
  transition:
    transform var(--abm-transition),
    box-shadow var(--abm-transition),
    border-color var(--abm-transition),
    background var(--abm-transition);
}

/* On évite de forcer un padding global sur toutes les cards :
   les templates gèrent déjà souvent leur propre spacing. */
.abm-card-pad,
.abm-card-body,
.abm-component-card {
  padding: 18px;
}

.abm-card:hover,
.abm-premium-card:hover,
.abm-listing-card:hover,
.abm-dashboard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: var(--abm-shadow-md);
}

.abm-card-highlight {
  border-left: 4px solid var(--abm-color-amber, #f5b301);
}

.abm-card-premium,
.abm-glass-card {
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--abm-shadow-md);
}

.abm-dark-panel {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 28%),
    linear-gradient(135deg, var(--abm-navy-950), var(--abm-navy-850));
  box-shadow: var(--abm-shadow-premium);
}

.abm-dark-panel .text-muted,
.abm-dark-panel .abm-section-sub,
.abm-dark-panel .abm-section-subtitle,
.abm-dark-panel .abm-premium-subtitle {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* ==========================================================================
   5. CTA / boutons / badges
   ========================================================================== */

.btn,
.abm-btn,
.abm-cta-primary,
.abm-cta-secondary,
.abm-cta-ghost {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: -0.01em;
  transition:
    transform var(--abm-transition),
    box-shadow var(--abm-transition),
    border-color var(--abm-transition),
    background var(--abm-transition),
    color var(--abm-transition);
}

.btn:hover,
.abm-btn:hover,
.abm-cta-primary:hover,
.abm-cta-secondary:hover,
.abm-cta-ghost:hover {
  transform: translateY(-1px);
}

.abm-btn:active,
.abm-cta-primary:active,
.abm-cta-secondary:active,
.abm-cta-ghost:active {
  transform: scale(0.97);
}

.abm-btn:focus,
.abm-cta-primary:focus,
.abm-cta-secondary:focus,
.abm-cta-ghost:focus {
  outline: none;
  box-shadow: var(--abm-focus);
}

.abm-cta-primary {
  border: 1px solid rgba(155, 105, 0, 0.28);
  color: var(--abm-color-text, #111827);
  background: linear-gradient(180deg, var(--abm-color-amber-soft, #f7c542), var(--abm-color-amber, #f5b301));
  box-shadow: 0 14px 30px rgba(245, 179, 1, 0.22);
}

.btn-primary {
  border: 1px solid rgba(155, 105, 0, 0.28) !important;
  color: var(--abm-color-text, #111827) !important;
  background: linear-gradient(180deg, var(--abm-color-amber-soft, #f7c542), var(--abm-color-amber, #f5b301)) !important;
  box-shadow: 0 14px 30px rgba(245, 179, 1, 0.22);
}

.abm-cta-primary:hover {
  color: var(--abm-color-text, #111827);
  box-shadow: 0 18px 42px rgba(245, 179, 1, 0.30);
}

.btn-primary:hover {
  color: var(--abm-color-text, #111827) !important;
  box-shadow: 0 18px 42px rgba(245, 179, 1, 0.30);
}

.abm-cta-secondary {
  border-color: var(--abm-line-strong);
  color: var(--abm-ink-700);
  background: #fff;
}

.btn-outline-secondary {
  border-color: var(--abm-line-strong) !important;
  color: var(--abm-ink-700) !important;
  background: #fff !important;
}

.abm-cta-secondary:hover {
  border-color: rgba(245, 179, 1, 0.38);
  color: var(--abm-color-navy, #0f2740);
  box-shadow: var(--abm-shadow-sm);
}

.btn-outline-secondary:hover {
  border-color: rgba(245, 179, 1, 0.38) !important;
  color: var(--abm-color-navy, #0f2740) !important;
  box-shadow: var(--abm-shadow-sm);
}

.abm-cta-ghost {
  color: var(--abm-ink-700);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--abm-line);
}

.abm-pill,
.abm-chip,
.abm-badge,
.badge {
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: -0.005em;
}

.abm-chip,
.abm-pill,
.abm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--abm-line);
  background: #fff;
  color: var(--abm-ink-700);
  font-size: 0.82rem;
}

.abm-chip--blue,
.abm-badge--soft {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.08);
  color: var(--abm-blue-700);
}

.abm-chip--gold {
  border-color: rgba(215, 170, 82, 0.28);
  background: rgba(215, 170, 82, 0.12);
  color: #8a5b10;
}

.abm-chip--success,
.abm-badge--good {
  border-color: rgba(22, 163, 74, 0.18);
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.abm-chip--warn,
.abm-badge--warn {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.abm-chip--danger,
.abm-badge--danger {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.10);
  color: #991b1b;
}

.abm-chip--dark,
.abm-badge--dark {
  border-color: var(--abm-navy-900);
  background: var(--abm-navy-900);
  color: #fff;
}

/* ==========================================================================
   6. Formulaires premium
   ========================================================================== */

.form-control,
.form-select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select {
  border-color: var(--abm-line-strong);
  border-radius: 16px;
  color: var(--abm-ink-900);
  font-weight: 650;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: rgba(245, 179, 1, 0.62);
  box-shadow: var(--abm-focus);
}

.form-label,
label {
  color: var(--abm-ink-700);
  font-weight: 850;
}

.helptext,
.form-text {
  color: var(--abm-ink-500);
}

/* ==========================================================================
   7. Intel rail météo / événements
   ========================================================================== */

.abm-intel-rail {
  margin-top: 14px;
}

.abm-intel-card {
  border: 1px solid var(--abm-line);
  border-radius: var(--abm-radius-md);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.abm-intel-title {
  color: var(--abm-ink-900);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.abm-intel-sub {
  color: var(--abm-ink-500);
  font-size: 0.82rem;
  font-weight: 750;
}

/* ==========================================================================
   8. Cockpit vendeur
   ========================================================================== */

.abm-cockpit-priority {
  background:
    radial-gradient(circle at top left, rgba(255, 214, 92, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(12, 28, 44, 0.98), rgba(22, 47, 72, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.abm-cockpit-priority .abm-next-action-kicker,
.abm-cockpit-priority p,
.abm-cockpit-priority .abm-section-sub {
  color: rgba(255, 255, 255, 0.74);
}

.abm-cockpit-action {
  display: flex;
  align-items: center;
  gap: 14px;
}

.abm-cockpit-action > div {
  flex: 1;
}

/* ==========================================================================
   9. Phase 3 — Tunnel annonce intelligent
   ========================================================================== */

#abm-live-checklist,
#abm-blocking-action,
.abm-funnel-intelligence-card {
  position: relative;
  overflow: hidden;
}

#abm-live-checklist::before,
#abm-blocking-action::before,
.abm-funnel-intelligence-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--abm-blue-600), var(--abm-cyan-500));
  opacity: 0.92;
}

#abm-live-checklist {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 30%),
    linear-gradient(180deg, #fff, #f8fbff);
}

#abm-live-checklist .abm-section-title,
#abm-blocking-action .abm-section-title {
  margin-bottom: 6px;
}

#abm-checklist-items,
.abm-live-checklist-items {
  display: grid;
  gap: 8px;
}

#abm-checklist-items [data-check],
.abm-live-checklist-items [data-check],
.abm-funnel-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--abm-red-600);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  transition:
    color var(--abm-transition),
    background var(--abm-transition),
    border-color var(--abm-transition),
    transform var(--abm-transition);
}

#abm-checklist-items [data-check].is-ok,
.abm-live-checklist-items [data-check].is-ok,
.abm-funnel-check-row.is-ok {
  color: #065f46;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.20);
}

#abm-checklist-items [data-check].is-missing,
.abm-live-checklist-items [data-check].is-missing,
.abm-funnel-check-row.is-missing {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.18);
}

#abm-checklist-items [data-check]:hover,
.abm-live-checklist-items [data-check]:hover,
.abm-funnel-check-row:hover {
  transform: translateX(2px);
}

#abm-blocking-action {
  border-left: 4px solid var(--abm-orange-500);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 32%),
    linear-gradient(180deg, #fff, #fffaf0);
}

#abm-blocking-action.is-ready {
  border-left-color: var(--abm-green-500);
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 32%),
    linear-gradient(180deg, #fff, #f1fff8);
}

#abm-blocking-action.is-blocked {
  border-left-color: var(--abm-orange-500);
}

#abm-blocking-text {
  color: var(--abm-ink-700);
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.5;
}

#abm-blocking-action.is-ready #abm-blocking-text {
  color: #065f46;
}

#abm-blocking-action.is-blocked #abm-blocking-text {
  color: #92400e;
}

.abm-score-block,
.abm-quality-signal-card {
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.86);
}

.abm-score-block-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.abm-score-block-title {
  color: var(--abm-ink-700);
  font-size: 0.82rem;
  font-weight: 850;
}

.abm-score-block-value {
  color: var(--abm-ink-900);
  font-size: 0.82rem;
  font-weight: 900;
}

.abm-score-mini {
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.abm-score-mini > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--abm-blue-600), var(--abm-cyan-500));
}

/* ==========================================================================
   10. Barres mobiles / sticky actions
   ========================================================================== */

.abm-mobile-bar,
.abm-mobile-bar--sticky {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--abm-line);
  box-shadow: 0 -10px 34px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.abm-mobile-bar--sticky {
  position: sticky;
  bottom: 0;
  z-index: 50;
}

/* ==========================================================================
   11. Footer / liens utilitaires
   ========================================================================== */

.abm-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.18), transparent 30%),
    linear-gradient(135deg, var(--abm-navy-950), var(--abm-navy-850));
  color: rgba(255, 255, 255, 0.76);
}

.abm-footer a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.abm-footer a:hover {
  color: #fff;
}

/* ==========================================================================
   12. Responsive : desktop complet, tablette simplifiée, mobile priorisé
   ========================================================================== */

@media (max-width: 1199.98px) {
  .abm-container {
    width: min(100% - 28px, 1040px);
  }

  .abm-header-panel {
    border-radius: 22px;
  }

  .abm-section-head,
  .abm-premium-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 991.98px) {
  .abm-topbar-copy span:not(.abm-topbar-badge) {
    display: none;
  }

  .abm-header {
    position: sticky;
  }

  .abm-header-panel {
    padding: 12px;
  }

  .abm-header-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .abm-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .abm-language-shell {
    display: inline-flex;
  }

  .abm-nav-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .abm-navbtn {
    width: 100%;
  }

  .abm-account-menu-inline {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .abm-account-menu-inline.is-open {
    display: inline-flex;
  }

  .abm-account-inline-link,
  .abm-account-logout-btn {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    border-radius: 14px;
    font-size: 0.82rem;
    white-space: normal;
  }

  .abm-account-logout-form {
    width: 100%;
    max-width: 100%;
  }

  .abm-intel-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .abm-cockpit-action {
    flex-direction: column;
    align-items: stretch;
  }

  .abm-cockpit-action .abm-btn-sm,
  .abm-cockpit-action a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 767.98px) {
  .abm-container {
    width: min(100% - 20px, 680px);
  }

  .abm-topbar-inner {
    min-height: 38px;
  }

  .abm-topbar-actions {
    display: none;
  }

  .abm-header-panel {
    margin: 8px 0;
    padding: 10px;
    border-radius: 18px;
  }

  .abm-brand-sub {
    display: none;
  }

  .abm-brand-title {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.98rem;
  }

  .abm-brand-logo {
    max-height: 36px;
  }

  .abm-header-cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .abm-header-cta-icon {
    display: none;
  }

  .abm-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
  }

  .abm-search-form {
    border-radius: 16px;
  }

  .abm-search-input {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .abm-nav-wrap {
    margin-top: 8px;
  }

  .abm-header-nav {
    padding-top: 8px;
  }

  .abm-nav-main {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .abm-account-menu-inline {
    display: none;
  }

  .abm-account-menu-inline.is-open {
    display: inline-flex;
  }

  .abm-navbtn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .abm-intel-rail {
    display: none;
  }

  .abm-section,
  .abm-premium-section {
    padding-block: 28px;
  }

  .abm-section-title,
  .abm-premium-title,
  h1 {
    letter-spacing: -0.045em;
    line-height: 1.04;
  }

  .abm-section-sub,
  .abm-section-subtitle,
  .abm-premium-subtitle {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .card,
  .abm-card,
  .abm-premium-card,
  .abm-listing-card,
  .abm-dashboard-card,
  .abm-panel {
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  }

  .btn,
  .abm-btn,
  .abm-cta-primary,
  .abm-cta-secondary,
  .abm-cta-ghost {
    min-height: 42px;
  }

  .abm-btn,
  .abm-cta-primary,
  .abm-cta-secondary,
  .abm-cta-ghost {
    width: 100%;
    justify-content: center;
  }

  #abm-live-checklist,
  #abm-blocking-action {
    margin-top: 12px !important;
  }

  #abm-checklist-items [data-check],
  .abm-live-checklist-items [data-check],
  .abm-funnel-check-row {
    font-size: 0.86rem;
    padding: 8px 9px;
  }

  .abm-mobile-bar,
  .abm-mobile-bar--sticky {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
  }
}

@media (max-width: 420px) {
  .abm-nav-main,
  .abm-header-main {
    grid-template-columns: 1fr;
  }

  .abm-header-actions {
    justify-content: stretch;
  }

  .abm-header-cta {
    width: 100%;
  }
}

/* ==========================================================================
   13. Accessibilité mouvement
   ========================================================================== */

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

.abm-consent-banner{position:fixed;right:clamp(10px,2vw,18px);bottom:clamp(10px,2vw,18px);left:clamp(10px,2vw,18px);z-index:99999;display:flex;flex-wrap:wrap;gap:10px;align-items:center;max-width:min(980px,calc(100vw - 20px));margin-inline:auto;padding:12px 14px;border:1px solid rgba(255,255,255,.14);border-radius:16px;background:rgba(15,39,64,.96);color:#fff;box-shadow:0 16px 42px rgba(15,39,64,.20)}
.abm-consent-copy{flex:1 1 280px;margin:0;font-size:.88rem;line-height:1.42}
.abm-consent-options{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.abm-consent-option{display:inline-flex;align-items:center;gap:5px;min-height:32px;margin:0;color:rgba(255,255,255,.88);font-size:.78rem;font-weight:760}
.abm-consent-link{color:#f5b301;font-weight:850;text-decoration:none}
.abm-consent-link:hover{color:#ffd35b}
.abm-consent-btn{min-height:34px;padding:0 12px;border-radius:999px;font-size:.8rem;font-weight:850;cursor:pointer}
.abm-consent-btn--accept{border:0;background:#f5b301;color:#0f2740}
.abm-consent-btn--save{border:0;background:#fff;color:#0f2740}
.abm-consent-btn--reject{border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.08);color:#fff}
@media (max-width:640px){
  .abm-consent-banner{align-items:center;max-height:min(34vh,240px);overflow-y:auto;padding:9px;border-radius:14px}
  .abm-consent-copy,.abm-consent-options{flex-basis:100%;width:100%}
  .abm-consent-copy{font-size:.8rem;line-height:1.34}
  .abm-consent-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .abm-consent-option{min-height:28px;font-size:.72rem}
  .abm-consent-link{flex:0 0 auto;width:auto}
  .abm-consent-btn{flex:1 1 112px;min-width:0;min-height:38px}
}
@media (max-width:420px){
  .abm-consent-options{grid-template-columns:1fr}
  .abm-consent-btn{flex-basis:100%}
}
@media (min-width: 992px) {
  .abm-header .abm-container,
  .abm-proads-dock .abm-container,
  .abm-header-intelligence-zone .abm-container {
    width: min(100% - 32px, 1440px);
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: 0;
  }

  .abm-header-panel {
    width: 100%;
    overflow: hidden;
  }

  .abm-header-nav,
  .abm-nav-wrap {
    width: 100%;
    min-width: 0;
  }

  .abm-nav-main {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .abm-navbtn,
  .abm-account-toggle,
  .abm-account-menu-inline > a,
  .abm-account-menu-inline > span,
  .abm-account-menu-inline > form > button {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 112px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .abm-account-menu-inline {
    display: none;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
  }

  .abm-account-menu-inline.is-open {
    display: contents;
  }

  .abm-account-menu-inline[hidden] {
    display: none;
  }

  .abm-account-menu-inline > form {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    max-width: 112px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .abm-account-menu-inline > a,
  .abm-account-menu-inline > span,
  .abm-account-menu-inline > form {
    flex: 0 0 auto;
    width: auto;
    max-width: 112px;
    min-width: 0;
  }

  .abm-account-menu-inline .is-disabled,
  .abm-account-menu-inline [aria-disabled="true"] {
    opacity: .48;
    pointer-events: none;
    cursor: not-allowed;
  }
}

@media (max-width: 991.98px) {
  .abm-account-menu-inline {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
}

/* ==========================================================================
   14. ABM UI primitives bridge
   --------------------------------------------------------------------------
   Migrated to market/css/components/* so this legacy file no longer owns the
   shared primitives. Keep this marker while older diffs still reference the
   historical section number.
   ========================================================================== */

/* ==========================================================================
   15. Marketplace listing card
   --------------------------------------------------------------------------
   Extracted from market/partials/_listing_card.html so repeated includes do
   not inject CSS into the DOM. Keep selectors scoped to the existing classes
   used by the Django partial.
   ========================================================================== */

.abm-listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border: 1px solid rgba(15, 39, 64, .10);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, .98));
  box-shadow: 0 14px 34px rgba(15, 39, 64, .08);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.abm-listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(15, 39, 64, .12);
  border-color: rgba(15, 39, 64, .16);
}

.abm-listing-cover {
  position: relative;
  display: block;
  height: 220px;
  min-height: 220px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(15, 39, 64, .08), rgba(15, 39, 64, .14)),
    #eef3f9;
}

.abm-listing-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 39, 64, .00) 0%, rgba(15, 39, 64, .04) 45%, rgba(15, 39, 64, .20) 100%);
  pointer-events: none;
}

.abm-listing-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.abm-listing-card:hover .abm-listing-cover img {
  transform: scale(1.045);
}

.abm-listing-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  color: #64748b;
  font-weight: 800;
  font-size: .92rem;
  background:
    radial-gradient(circle at top right, rgba(245, 179, 1, .14), transparent 28%),
    linear-gradient(135deg, rgba(245, 179, 1, .05), rgba(13, 110, 253, .04));
}

.abm-badge-stack {
  position: absolute;
  top: .85rem;
  left: .85rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: calc(100% - 1.7rem);
}

.abm-badge-stack .abm-chip {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.abm-fav {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 2;
}

.abm-fav-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .94);
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 39, 64, .12);
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
  cursor: pointer;
}

.abm-fav-btn:hover {
  transform: translateY(-1px);
  background: #fff7dd;
  box-shadow: 0 14px 28px rgba(15, 39, 64, .14);
}

.abm-listing-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  flex: 1 1 auto;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, .84));
}

.abm-listing-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.abm-listing-top > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.abm-listing-model {
  color: #64748b;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: .01em;
}

.abm-listing-title {
  margin: 0;
  color: #111827;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.abm-listing-price {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  min-width: 112px;
  text-align: right;
}

.abm-listing-price-main {
  color: #111827;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.abm-listing-price-sub {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.3;
  font-weight: 700;
}

.abm-listing-location {
  color: #475569;
  font-size: .88rem;
  line-height: 1.5;
  margin: 2px 0 0;
}

.abm-listing-soft {
  border: 1px solid rgba(15, 39, 64, .08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(255, 255, 255, 1));
  padding: 12px;
  display: grid;
  gap: 8px;
}

.abm-listing-soft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.abm-listing-soft-label {
  color: #475569;
  font-size: .84rem;
  line-height: 1.45;
  font-weight: 700;
}

.abm-listing-soft-score {
  color: #111827;
  font-size: .88rem;
  line-height: 1.3;
  font-weight: 900;
}

.abm-listing-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.abm-listing-footer .abm-btn {
  flex: 1 1 0;
}

.abm-listing-footer .abm-btn--dark {
  min-width: 140px;
}

.abm-listing-footer .abm-btn--ghost {
  min-width: 120px;
}

@media (max-width: 768px) {
  .abm-listing-cover {
    height: 210px;
    min-height: 210px;
  }

  .abm-listing-body {
    padding: 14px;
    gap: 12px;
  }

  .abm-listing-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .abm-listing-price {
    min-width: 0;
    text-align: left;
  }

  .abm-listing-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .abm-listing-footer .abm-btn {
    width: 100%;
  }
}
