/*
 * MoziMotors theme for /v2 — loaded after siaracash.css.
 * Remaps SiaraCash's purple + teal palette onto MoziMotors: primary burgundy #551f26 (client choice,
 * 2026-10-01) in place of SiaraCash's green/teal, navy #050b20 for dark text, footer and bands.
 * Light tints are warm (blush) instead of lavender so they sit with the burgundy.
 * Unlayered, so these win over the tokens siaracash.css declares inside @layer theme / base.
 */
:root {
  /* SiaraCash purple (footer, dark bands, headings, main buttons) → navy */
  --color-brand-purple: #050b20;
  --color-brand-purple-hover: #0b1a3a;
  --color-brand-purple-soft: #f7eff0;
  --color-brand-purple-soft-2: #eddcdf;
  --color-brand-purple-border: #dcbfc4;
  --color-brand-purple-accent: #551f26;

  /* SiaraCash green/teal (main buttons, links, highlights) → MoziMotors burgundy */
  --color-brand-teal: #551f26;
  --color-brand-teal-hover: #3f161c;
  --color-brand-teal-active: #551f26;
  --color-brand-teal-soft: #f7eff0;
  --color-brand-teal-soft-2: #eddcdf;
  --color-brand-teal-tint: #fbf7f7;
  --color-brand-teal-text: #551f26;

  /* SiaraCash navy (badges, calculator CTA) → deep navy */
  --color-brand-navy: #0b1a3a;
  --color-brand-navy-hover: #050b20;

  /* Text */
  --color-brand-dark: #050b20;
  --color-ink-strong: #050b20;

  /* shadcn tokens used by the search card, comboboxes and inputs */
  --primary: #551f26;
  --ring: #551f26;
  --color-primary: #551f26;
}

/* Listing and car pages (.cc-* scope): primary = burgundy too */
.cc-root,
.cc-scope {
  --cc-primary: #551f26;
  --cc-primary-dark: #3f161c;
  --cc-primary-text: #551f26;
  --cc-primary-tint: #f7eff0;
  --cc-teal: #551f26;
  --cc-accent: #551f26;
}

/* Gradients that were hard-coded with SiaraCash lavender */
.mz-hero-grad {
  background-image: linear-gradient(180deg, #ffffff 0%, #fbf8f8 60%, #f5eeef 100%);
}
.mz-hero-grad-m {
  background-image: linear-gradient(180deg, #ffffff 0%, #f5eeef 100%);
}
.mz-soft-grad {
  background-image: linear-gradient(160deg, #f7eff0 0%, #fbf8f8 100%);
}
.mz-stripe {
  background-image: linear-gradient(135deg, #551f26 0%, #050b20 100%);
}

/* Brand-tinted shadows */
.mz-shadow-fab {
  box-shadow: 0 8px 20px rgba(85, 31, 38, 0.4);
}
.mz-shadow-cta {
  box-shadow: 0 8px 20px -8px rgba(5, 11, 32, 0.55);
}
.mz-shadow-pill {
  box-shadow: 0 10px 30px rgba(5, 11, 32, 0.35);
}
.mz-shadow-soft {
  box-shadow: 0 6px 20px rgba(85, 31, 38, 0.1);
}
.mz-shadow-docs {
  filter: drop-shadow(0 18px 34px rgba(5, 11, 32, 0.26));
}

/* Main action buttons (« Prendre RDV », pré-accord, filters…) in the primary burgundy */
.cc-btn-primary {
  background: #551f26;
  color: #fff;
}
.cc-btn-primary:hover {
  background: #3f161c;
}

/* Home hero (client mockup): the showroom photo is anchored to the far edge at full height, the page behind the
   headline matches its light wall (#f0f0f0), and its near edge fades into it. Below 1600px the photo slides
   outwards so the people stay clear of the headline. In Arabic (RTL) everything is mirrored. */
.mz-hero-stage {
  height: 500px;
  background: linear-gradient(180deg, #f7f7f7 0%, #f0f0f0 100%);
}
/* Below 1600px the photo shrinks (min 360px tall) so the people stay right of the headline while the
   car's front and its plate stay on screen; it then sits on the stage floor with its top edge faded out. */
.mz-hero-media {
  --h: clamp(360px, min(34.7vw - 26px, 69.4vw - 470px), 500px);
  bottom: 0;
  height: var(--h);
  right: max(calc(10px - 0.12 * var(--h)), min(0px, calc((100vw - 1600px) * 0.8)));
}
.mz-hero-photo {
  width: auto;
  max-width: none;
}
.mz-hero-fade {
  background:
    linear-gradient(90deg, #f3f3f3 0%, rgba(243, 243, 243, 0) 22%),
    linear-gradient(180deg, #f6f6f6 0%, rgba(246, 246, 246, 0) 30%);
}
[dir="rtl"] .mz-hero-media {
  right: auto;
  left: max(calc(10px - 0.12 * var(--h)), min(0px, calc((100vw - 1600px) * 0.8)));
}
[dir="rtl"] .mz-hero-photo {
  transform: scaleX(-1);
}
[dir="rtl"] .mz-hero-fade {
  background:
    linear-gradient(270deg, #f3f3f3 0%, rgba(243, 243, 243, 0) 22%),
    linear-gradient(180deg, #f6f6f6 0%, rgba(246, 246, 246, 0) 30%);
}
.mz-hero-photo-m {
  object-position: 68% center;
}
[dir="rtl"] .mz-hero-photo-m {
  transform: scaleX(-1);
}
/* Sell hero: more content beside the photo (city picker + stats), so the photo sits further out. */
.mz-hero-media-sell {
  right: calc(min(0px, calc((100vw - 1600px) * 0.8)) - 180px);
}
[dir="rtl"] .mz-hero-media-sell {
  right: auto;
  left: calc(min(0px, calc((100vw - 1600px) * 0.8)) - 180px);
}

/* Burgundy is too dark on navy: headings/accents on dark bands use a light rose tint of it. */
.mz-on-dark-accent {
  color: #e8b4bb;
}

/* Contact cards: icon circle fills burgundy when the card is hovered */
.group:hover .mz-icon-hover {
  background: #551f26;
  color: #fff;
}

/* ---------- MoziMotors car card (CarCard.tsx) ----------
   Photo inset in a white frame, segmented photo bar, badges sitting on the photo's lower edge,
   name + year tag, icon specs, burgundy price. */
.mz-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #ece6e7;
  box-shadow: 0 1px 2px rgba(5, 11, 32, 0.04), 0 8px 24px -14px rgba(85, 31, 38, 0.22);
  color: #050b20;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
@media (hover: hover) {
  .mz-card:hover {
    transform: translateY(-3px);
    border-color: #dcbfc4;
    box-shadow: 0 2px 4px rgba(5, 11, 32, 0.05), 0 22px 40px -18px rgba(85, 31, 38, 0.38);
  }
  .mz-card:hover .mz-card-slide.is-on img {
    transform: scale(1.04);
  }
}
.mz-card:focus-visible {
  outline: 2px solid #551f26;
  outline-offset: 2px;
}
.mz-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #f4f1f1;
}
.mz-card-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mz-card-slide.is-on {
  opacity: 1;
}
.mz-card-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.mz-card-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 11, 32, 0.38) 0%, rgba(5, 11, 32, 0) 26%, rgba(5, 11, 32, 0) 62%, rgba(5, 11, 32, 0.5) 100%);
}
.mz-card-bars {
  position: absolute;
  top: 10px;
  inset-inline-start: 12px;
  inset-inline-end: 52px;
  z-index: 2;
  display: flex;
  gap: 4px;
}
.mz-card-bars span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.2s ease;
}
.mz-card-bars span.is-on {
  background: #fff;
}
.mz-card-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.mz-card-fav,
.mz-card-next {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #050b20;
  box-shadow: 0 2px 8px rgba(5, 11, 32, 0.18);
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.mz-card-fav {
  top: 8px;
  inset-inline-end: 8px;
  width: 34px;
  height: 34px;
}
.mz-card-fav:hover,
.mz-card-fav.is-on {
  color: #551f26;
}
.mz-card-next {
  top: 50%;
  inset-inline-end: 10px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
}
@media (hover: hover) {
  .mz-card-next {
    opacity: 0;
  }
  .mz-card:hover .mz-card-next,
  .mz-card-next:focus-visible {
    opacity: 1;
  }
}
.mz-card-badges {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mz-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #050b20;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mz-card-badge.is-cert {
  background: #551f26;
  color: #fff;
}
.mz-card-badge .mz-card-ico {
  width: 13px;
  height: 13px;
}
.mz-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 6px 4px;
}
.mz-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mz-card-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #050b20;
}
.mz-card-year {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f7eff0;
  color: #551f26;
  font-size: 12px;
  font-weight: 700;
}
.mz-card-version {
  min-height: 1.45em;
  margin-top: 2px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: #6b7280;
}
.mz-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
}
.mz-card-specs li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
}
.mz-card-specs .mz-card-ico {
  color: #551f26;
}
.mz-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}
.mz-card-specs + .mz-card-foot {
  border-top: 1px dashed #e6dcdd;
}
.mz-card-price {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #551f26;
  white-space: nowrap;
}
.mz-card-city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  color: #6b7280;
  white-space: nowrap;
}

/* ---------- « Combien vaut votre voiture ? » sell band (SellCta.tsx) ---------- */
.mz-sell {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 28px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 22px;
  border-radius: 24px;
  color: #fff;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 22px),
    linear-gradient(120deg, #6a2730 0%, #551f26 45%, #2c0f14 100%);
  box-shadow: 0 24px 48px -28px rgba(85, 31, 38, 0.65);
}
@media (min-width: 1024px) {
  .mz-sell {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 56px;
    padding: 56px 64px;
  }
}
.mz-sell-glow {
  position: absolute;
  inset-inline-end: -120px;
  top: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.mz-sell-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.mz-sell-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.mz-sell-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}
.mz-sell-text {
  max-width: 560px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
@media (min-width: 1024px) {
  .mz-sell-title {
    font-size: 40px;
  }
  .mz-sell-text {
    font-size: 17px;
  }
}
.mz-sell-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 14px 24px;
  border-radius: 999px;
  background: #fff;
  color: #551f26;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mz-sell-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5);
}
.mz-sell-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 18px;
}
/* Spotlight so the black SUV reads on the burgundy. */
.mz-sell-visual::before {
  content: "";
  position: absolute;
  inset: -12% -6% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 238, 0.55), rgba(255, 236, 238, 0.18) 55%, rgba(255, 236, 238, 0));
  pointer-events: none;
}
.mz-sell-ground {
  position: absolute;
  bottom: 12px;
  left: 10%;
  right: 10%;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.mz-sell-car {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(0 16px 16px rgba(0, 0, 0, 0.35));
}
@media (min-width: 1024px) {
  /* Car on the start side, facing the text. */
  .mz-sell {
    grid-template-columns: 440px minmax(0, 1fr);
  }
  .mz-sell-car {
    max-width: none;
    transform: scale(1.08);
  }
}
/* In Arabic the car sits on the right: mirror it so it still faces the text. */
[dir="rtl"] .mz-sell-car {
  transform: scaleX(-1);
}
@media (min-width: 1024px) {
  [dir="rtl"] .mz-sell-car {
    transform: scale(-1.08, 1.08);
  }
}

/* Header « Estimer ma voiture »: no room next to the logo and menu on the narrowest phones (< 360px). */
@media (max-width: 359px) {
  .mz-header-cta {
    display: none !important;
  }
}
