/*
  * File: custom.css
  * Purpose: Audi Store theme custom styles
  * Structure (progressively tidied):
  *  1) Fonts & Tokens (variables)
  *  2) Base & Resets
  *  3) Layout (navbar, containers, full-bleed)
  *  4) Components (campaign, tiles, filters, footer)
  *  5) Utilities & Motion
  * Note: Incremental formatting only, no visual changes.
  */
@import url("./tokens.css"); /* design tokens */
@import url("./base.css");   /* fonts */
@import url("./layout.css"); /* navbar, containers, full-bleed */
@import url("./utilities.css"); /* motion, reveal */
@import url("./components/campaign.css");
@import url("./components/tiles.css");
@import url("./components/filters.css");
@import url("./components/footer.css");
@import url("./components/vehicle-detail.css");
@import url("./components/features.css");
@import url("./components/loader.css");
@import url("./components/choices.css");
@import url("./components/conversion-bar.css");

/* Fix horizontal scroll - Clean approach */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  min-height: 100vh;
}

* {
  box-sizing: border-box;
}

/* Prevent media elements from causing overflow */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Prevent text overflow */
p, h1, h2, h3, h4, h5, h6 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.audi-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  height: 56px;
  margin-bottom: 0;
  width: 100%;
  gap: 0;
}

.audi-btn-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 56px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 4px;
  background-color: #000 !important;
  color: #fff !important;
  border: none;
  text-decoration: none;
  text-align: center;
  font-family: 'AudiType', sans-serif;
  font-size: 12px;
  font-stretch: 105%;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: normal;
  cursor: pointer;
  transition: color .25s cubic-bezier(0.75, 0.02, 0.5, 1),
              background-color .25s cubic-bezier(0.75, 0.02, 0.5, 1),
              box-shadow .25s cubic-bezier(0.75, 0.02, 0.5, 1),
              border-radius .25s cubic-bezier(0.75, 0.02, 0.5, 1);
  width: 100%;
}

.audi-btn-details:hover {
  background-color: #fff !important;
  color: #000 !important;
}

.audi-btn-details:active {
  background-color: #f6f6f6 !important;
  color: #000 !important;
}

.audi-tile-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  list-style: none;
  padding: 0 8px 0 0;
  margin: 6px 0 0;
  height: 32px;
}

.audi-tile-controls li {
  display: flex;
  align-items: center;
}

.audi-tile-controls .ctrl { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--colors-interaction-label-default-611444a);
  cursor: pointer;
  transition: color .25s cubic-bezier(0.75, 0.02, 0.5, 1);
  padding: 0;
  line-height: 0;
  position: relative;
}

.audi-tile-controls .ctrl .icon { 
  width: 24px;
  height: 24px;
  display: block;
}

.audi-tile-controls .ctrl::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 4px;
  background: rgba(0,0,0,0.06);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity .25s cubic-bezier(0.75, 0.02, 0.5, 1), transform .25s cubic-bezier(0.75, 0.02, 0.5, 1);
}

.audi-tile-controls .ctrl:hover::before, 
.audi-tile-controls .ctrl:focus-visible::before { 
  opacity: 1; 
  transform: scale(1); 
}

.audi-tile-controls .ctrl:active::before { 
  opacity: 1; 
  transform: scale(0.96); 
}

.audi-tile-controls .ctrl[disabled] { 
  opacity: 1; 
  cursor: default; 
  pointer-events: none; 
}

.audi-tile-controls .count { 
  font-size: 12px; 
  color: var(--colors-ui-secondary-611444a); 
  min-width: 28px; 
  text-align: center; 
}

/* CSS custom pour la page Nouvelles voitures */
/* Place ici (ou je peux ajouter) les styles extraits/simplifiés de la page source.
   Exemple d’ajustements génériques déjà présents dans style.css pour nos classes audi-*: */

/* Local webfonts: AudiType (placed under assets/fronts/AudiType v4.03 Web Fonts (TrueType)/) */
/* moved @font-face to base.css */

/* moved .audi-features inline SVG handling and badge styles to components/features.css */

/* moved @font-face (italic/bold/bolditalic) to base.css */

/* moved :root tokens to tokens.css */

/* Base apply */
body {
  font-family: var(--fontFamily-611444a);
  color: var(--colors-interaction-label-default-611444a);
  background: var(--colors-background-level-0-611444a);
}

/* Safeguard: enforce AudiType stack if Global Styles overrides body font */
html body { font-family: var(--fontFamily-611444a) !important; }

/* Normalize stretch to avoid variable-font overrides (e.g. AudiTypeVar) */
html body,
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6 {
  font-stretch: 100% !important;
}

/* Apply to common text-bearing elements to override block-specific fonts */
h1, h2, h3, h4, h5, h6,
p, span, small, strong, em,
ul, ol, li, dt, dd,
label, a,
button, input, select, textarea,
nav, .navbar, .nav-link, .btn,
.audi-vehicles, .audi-toolbar, .audi-filters, .audi-tiles {
  font-family: var(--fontFamily-611444a) !important;
}

/* Links */
a { color: var(--colors-interaction-primary-default-611444a); text-decoration: none; }
a:hover { color: var(--colors-interaction-primary-hover-611444a); text-decoration: underline; }

/* Do not underline buttons (including link-styled buttons) */
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.btn:focus-visible,
.audi-btn,
.audi-btn:hover,
.audi-btn:focus,
.audi-btn:active,
.audi-btn:focus-visible { text-decoration: none !important; }

/* Buttons (generic) */
.btn {
  border-radius: 0;
  transition: all .2s var(--easing-611444a);
}
.btn-dark {
  color: var(--colors-ui-inverted-611444a);
  background: var(--colors-interaction-primary-default-611444a);
  border-color: var(--colors-interaction-primary-default-611444a);
}
.btn-dark:hover { background: var(--colors-interaction-primary-hover-611444a); border-color: var(--colors-interaction-primary-hover-611444a); }
.btn-outline-dark { color: var(--colors-interaction-primary-default-611444a); border-color: var(--colors-ui-divider-611444a); }
.btn-outline-dark:hover { color: var(--colors-ui-inverted-611444a); background: var(--colors-interaction-primary-default-611444a); border-color: var(--colors-interaction-primary-default-611444a); }

/* Navbar */
.audi-navbar {
  background: var(--colors-base-grey-0-611444a) !important;
  border-bottom: 1px solid var(--colors-ui-divider-611444a);
  padding-top: 0.75rem;   /* ~12px */
  padding-bottom: 0.75rem;/* ~12px */
}
.audi-navbar .nav-link { color: var(--colors-interaction-label-default-611444a); }
.audi-navbar .nav-link:hover { color: var(--colors-interaction-label-hover-611444a); }
.audi-navbar .navbar-brand svg path { fill: var(--colors-ui-primary-611444a); }

/* Header tabs: layout and look */
.audi-navbar .navbar-nav {
  position: static;
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  height: 44px;
  padding: 0;
  margin: 0;
  gap: 40px; /* consistent spacing between tabs */
  top: 0;
  visibility: visible;
  z-index: 1;
  align-items: center;
}
.audi-navbar .navbar-nav .nav-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;          /* centers 20px-high link inside 44px bar */
  -webkit-box-flex: 0;
  flex: 0 0 auto;               /* do not stretch; keep natural width */
  margin-right: 0;              /* per user */
}
.audi-navbar .navbar-nav .nav-link {
  box-sizing: border-box;
  display: block;            /* per user */
  height: 20px;              /* per user */
  line-height: 20px;         /* per user */
  padding: 0;                /* per user */
  font-size: 16px;           /* per user */
  font-family: 'AudiType', sans-serif; /* per user */
  font-stretch: 100%;
  color: rgb(102, 102, 102); /* base color */
  cursor: pointer;           /* per user */
  -webkit-box-flex: 0;       /* do not stretch */
  flex-grow: 0;              /* do not stretch */
  width: auto;               /* natural width */
  white-space: nowrap;       /* per user */
  text-wrap: nowrap;         /* per user */
  text-decoration: none !important; /* no underline */
  transition: color .2s ease; /* smooth color fade */
}
.audi-navbar .navbar-nav .nav-link:hover,
.audi-navbar .navbar-nav .nav-link:focus,
.audi-navbar .navbar-nav .nav-link:active {
  text-decoration: none !important; /* keep no underline */
  color: #000; /* fade to black on interaction */
}
/* Active/current tab color */
.audi-navbar .navbar-nav .nav-link.active,
.audi-navbar .navbar-nav .nav-item.active > .nav-link {
  color: #000;
}
/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .audi-navbar .navbar-nav .nav-link { transition: none; }
}
/* If global a:hover sets underline, this specificity overrides it */
.audi-navbar a,
.audi-navbar a:hover,
.audi-navbar a:focus { text-decoration: none !important; }

/* FAQ accordion overrides */
.accordion-button {
  background-color: #fff;
  color: #303030;
  box-shadow: none;
  border: 0;
  font-weight: 400;
  font-size: 1.05rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.accordion-button:not(.collapsed) {
  color: #111;
  background-color: #fff;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
}

.accordion-button:focus {
  z-index: 3;
  border-color: transparent;
  box-shadow: none;
}

.accordion-button::after {
  filter: grayscale(100%);
  opacity: 0.6;
}

.accordion-button:not(.collapsed)::after {
  opacity: 0.85;
}

.accordion-item {
  border-color: #e6e6e6 !important;
}

.accordion-body {
  color: #5a5a5a;
  font-size: 0.97rem;
  line-height: 1.6;
}

/* Helpers pour container large */
.audi-container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 16px; 
}

/* Hauteur légère augmentée pour le header */
.audi-navbar .navbar-brand svg {
  height: 28px; /* un peu plus grand que 24px */
  width: auto;
}

/* Mobile navbar: ensure full list is visible when collapsed menu is open */
@media (max-width: 991.98px) {
  /* Add some breathing room inside the collapse */
  .audi-navbar .navbar-collapse {
    padding: 8px 0;
  }
  /* Stack links vertically and remove fixed bar height */
  .audi-navbar .navbar-nav {
    height: auto;              /* override fixed 44px */
    flex-direction: column;    /* vertical list */
    align-items: flex-start;   /* left align */
    gap: 12px;                 /* vertical spacing */
  }
  .audi-navbar .navbar-nav .nav-item { width: 100%; }
  .audi-navbar .navbar-nav .nav-link {
    height: auto;              /* allow multi-line */
    line-height: 1.4;
    padding: 6px 0;
    white-space: normal;       /* allow wrapping on small screens */
    text-wrap: wrap;
  }
}

/* moved footer styles to components/footer.css */

/* moved layout full-bleed and navbar helpers to layout.css */

/* moved motion & reveal utilities to utilities.css */

/* moved campaign banner to components/campaign.css */

/* moved tiles, results bar, and placeholder to components/tiles.css */

/* (moved) legacy .audi-vd-switch styles removed; see assets/css/components/vd-toggle.css */

/* (moved) .audi-vd-toggle styles now live in assets/css/components/vd-toggle.css */

/* moved archive title styles to components/tiles.css */

/* moved filters UI and price range to components/filters.css */

/* moved remaining tiles and per-tile slider rules to components/tiles.css */

/* moved vehicle detail page enhancements to components/vehicle-detail.css */

/* moved tile slider nav, availability badges, and animations to components/tiles.css */

/* moved tile body/title and price animation rules to components/tiles.css */

/* moved .audi-features list and pin masks to components/features.css */

/* moved tile body/title rules to components/tiles.css */
.audi-tile-title + .audi-tile-sub { margin-top: 2px; }
/* Card subtitle (modèle) juste en dessous */
.audi-tile-sub {
  margin: 0;
  color: var(--colors-ui-tertiary-611444a);
  font-family: var(--fontFamily-611444a);
  font-size: 12px;
  line-height: 18px; /* Reduced from 20px */
  font-weight: 400;
  font-stretch: 105% !important; /* override global reset */
  letter-spacing: normal;
  display: block;
  height: 18px; /* enforce one-line block height */
  margin-bottom: 16px; /* Reduced from 28px to save space */
  overflow: hidden;
}
.audi-price { 
  display: flex !important;
  align-items: center;
  font-size: 14px; 
  margin-top: 4px;
  height: 60px !important; /* Fixed height for all price blocks */
  overflow: hidden;
}
/* Force inner divs to take full width */
.audi-price > div {
  width: 100%;
}
.audi-price .label { 
  color: var(--colors-ui-tertiary-611444a); 
  display: inline-block;
  margin-right: 6px;
}
/* Bigger price for cards (subtle) */
.audi-tile .audi-price .value { 
  font-weight: 700; 
  font-size: 18px; 
  line-height: 1.15;
  display: inline-block;
}
.audi-tile .audi-price .value.text-danger {
  display: inline-block !important;
}

/* Old price (crossed out) styling */
.audi-price-old {
  display: inline-block !important;
  margin-left: 4px;
}

/* Mobile specific adjustments for old price */
@media (max-width: 640px) {
  .audi-tile .audi-price .value { font-size: 17px; }
  
  /* Make old price more visible and allow it to overflow slightly on mobile */
  .audi-price-old {
    font-size: 0.85rem !important;
    opacity: 0.65 !important;
    margin-left: 2px;
  }
  
  /* Allow price line to wrap and overflow if needed */
  .audi-price-line1 {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
}

/* Price entrance animation: fade + slide up when tile reveals */
.audi-tile.reveal .audi-price { opacity: 0; transform: translateY(8px); }
.audi-tile.reveal-visible .audi-price {
  opacity: 1;
  transform: none;
  transition: opacity .45s var(--easing-611444a) .08s, transform .45s var(--easing-611444a) .08s;
}
@media (prefers-reduced-motion: reduce) {
  .audi-tile.reveal .audi-price,
  .audi-tile.reveal-visible .audi-price { opacity: 1; transform: none; transition: none; }
}
.audi-features {
  display: flex;
  flex-wrap: wrap;          /* wrap to multiple rows */
  gap: 10px;                /* column/row gap */
  margin-top: 8px;          /* breathing room above features */
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--colors-ui-secondary-611444a);
  height: 64px;             /* FORCE exactly 2 rows x 28px + 8px gap */
  min-height: 64px;         /* enforce minimum */
  max-height: 64px;         /* enforce maximum */
  overflow: hidden;         /* hide rows beyond 2 */
}

/* Mobile: allow more rows to show all pins including CO2 */
@media (max-width: 767.98px) {
  .audi-features {
    height: auto;           /* Allow natural height on mobile */
    min-height: 64px;       /* At least 2 rows */
    max-height: none;       /* Remove max height to show all features */
  }
}
/* Rectangular pins (no rounded corners) */
.audi-features li {
  display: flex;
  align-items: center;               /* center vertically */
  justify-content: space-between;    /* icon + label spacing */
  column-gap: 8px;
  row-gap: 8px;
  padding: 4px 12px;                 /* Audi pin padding */
  height: 28px;
  min-height: 28px;
  background-color: rgba(0,0,0,0.05);/* Audi subtle bg */
  border: 0;                          /* no border per Audi pins */
  border-radius: 0;                   /* square corners */
  color: var(--colors-interaction-label-default-611444a);
  font-family: var(--fontFamily-611444a);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  font-stretch: 105% !important;
  letter-spacing: normal;
  width: max-content;                 /* shrink to content */
  max-width: 100%;
}

/* Feature pin icons */
.audi-features .pin::before,
.list-unstyled .pin::before {
  content: '';
  display: inline-block;
  flex: 0 0 14px;
  width: 14px; height: 14px; margin-right: 6px;
  background: currentColor;
  -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100% 100%;
  mask-position: center; mask-repeat: no-repeat; mask-size: 100% 100%;
  background-position: center; background-repeat: no-repeat; background-size: 100% 100%;
}
/* Energy (fuel) */
.audi-features .pin.energy::before,
.list-unstyled .pin.energy::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2h8a2 2 0 0 1 2 2v13a3 3 0 1 1-6 0H8v3H6V2zm4 4h4V4h-4v2zm10.59 1.17 1.41 1.41V18a2 2 0 1 1-4 0V9l-2-2 1.41-1.41 1.59 1.59c.38.38.59.88.59 1.41V18a1 1 0 0 0 2 0V7.17z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2h8a2 2 0 0 1 2 2v13a3 3 0 1 1-6 0H8v3H6V2zm4 4h4V4h-4v2zm10.59 1.17 1.41 1.41V18a2 2 0 1 1-4 0V9l-2-2 1.41-1.41 1.59 1.59c.38.38.59.88.59 1.41V18a1 1 0 0 0 2 0V7.17z'/></svg>");
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M6 2h8a2 2 0 0 1 2 2v13a3 3 0 1 1-6 0H8v3H6V2zm4 4h4V4h-4v2zm10.59 1.17 1.41 1.41V18a2 2 0 1 1-4 0V9l-2-2 1.41-1.41 1.59 1.59c.38.38.59.88.59 1.41V18a1 1 0 0 0 2 0V7.17z'/></svg>");
}
/* Power (bolt) */
.audi-features .pin.power::before,
.list-unstyled .pin.power::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 2 3 14h7l-1 8 10-12h-7l1-8z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 2 3 14h7l-1 8 10-12h-7l1-8z'/></svg>");
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M13 2 3 14h7l-1 8 10-12h-7l1-8z'/></svg>");
}
/* Drivetrain (axle/wheel abstract) */
.audi-features .pin.drivetrain::before,
.list-unstyled .pin.drivetrain::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 7a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm14 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6zM4 10h16v2H4zM11 9h2v6h-2z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 7a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm14 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6zM4 10h16v2H4zM11 9h2v6h-2z'/></svg>");
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M5 7a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm14 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6zM4 10h16v2H4zM11 9h2v6h-2z'/></svg>");
}
/* Transmission icons */
.audi-features .pin.transmission.manual::before,
.list-unstyled .pin.transmission.manual::before {
  /* Shift gate icon */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 4v16h2V13h4v7h2V13h4v7h2V4h-2v7h-4V4h-2v7H8V4H6z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 4v16h2V13h4v7h2V13h4v7h2V4h-2v7h-4V4h-2v7H8V4H6z'/></svg>");
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M6 4v16h2V13h4v7h2V13h4v7h2V4h-2v7h-4V4h-2v7H8V4H6z'/></svg>");
}
.audi-features .pin.transmission.auto::before,
.list-unstyled .pin.transmission.auto::before {
  /* Gear icon */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19.4 13a7.7 7.7 0 0 0 .1-2l2.1-1.6-2-3.5-2.5 1a7.8 7.8 0 0 0-1.7-1L13.1 2h-4l-.3 2.9a7.8 7.8 0 0 0-1.7 1L4.6 5.9l-2 3.5L4.7 11a7.7 7.7 0 0 0 0 2l-2.1 1.6 2 3.5 2.5-1c.5.4 1.1.7 1.7 1l.3 2.9h4l.3-2.9c.6-.3 1.2-.6 1.7-1l2.5 1 2-3.5L19.4 13zM12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19.4 13a7.7 7.7 0 0 0 .1-2l2.1-1.6-2-3.5-2.5 1a7.8 7.8 0 0 0-1.7-1L13.1 2h-4l-.3 2.9a7.8 7.8 0 0 0-1.7 1L4.6 5.9l-2 3.5L4.7 11a7.7 7.7 0 0 0 0 2l-2.1 1.6 2 3.5 2.5-1c.5.4 1.1.7 1.7 1l.3 2.9h4l.3-2.9c.6-.3 1.2-.6 1.7-1l2.5 1 2-3.5L19.4 13zM12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>");
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M19.4 13a7.7 7.7 0 0 0 .1-2l2.1-1.6-2-3.5-2.5 1a7.8 7.8 0 0 0-1.7-1L13.1 2h-4l-.3 2.9a7.8 7.8 0 0 0-1.7 1L4.6 5.9l-2 3.5L4.7 11a7.7 7.7 0 0 0 0 2l-2.1 1.6 2 3.5 2.5-1c.5.4 1.1.7 1.7 1l.3 2.9h4l.3-2.9c.6-.3 1.2-.6 1.7-1l2.5 1 2-3.5L19.4 13zM12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>");
}
/* CO2 (leaf) */
.audi-features .pin.co2::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 21c7 0 14-5 14-14V3h-4C6 3 3 10 3 17v4h2zm4-6c2-3 5-5 8-6-1 3-3 6-6 8-1 1-2 2-4 3 1-2 2-3 2-5z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 21c7 0 14-5 14-14V3h-4C6 3 3 10 3 17v4h2zm4-6c2-3 5-5 8-6-1 3-3 6-6 8-1 1-2 2-4 3 1-2 2-3 2-5z'/></svg>");
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M5 21c7 0 14-5 14-14V3h-4C6 3 3 10 3 17v4h2zm4-6c2-3 5-5 8-6-1 3-3 6-6 8-1 1-2 2-4 3 1-2 2-3 2-5z'/></svg>");
}
.audi-tile-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 10px; font-size: 13px; color: var(--colors-ui-secondary-611444a); }
.audi-tile-colors .label { color: var(--colors-ui-tertiary-611444a); margin-right: 2px; }
/* Black pins like other page */
.audi-tile-colors .color-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  background: var(--colors-ui-primary-611444a);
  border: 1px solid var(--colors-ui-primary-611444a);
  border-radius: 0;
  color: var(--colors-ui-inverted-611444a);
}
.audi-tile-colors .color-item .swatch { width: 14px; height: 14px; border-radius: 2px; border: 1px solid rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.audi-tile-colors .color-item .code { color: var(--colors-ui-inverted-611444a); font-weight: 600; letter-spacing: .1px; }
.audi-actions { margin-top: auto; }
.audi-dealer {
  display: block;
  height: 20px;
  margin: 0 0 4px 0;
  width: 100%;
  max-width: 100%;
  font-family: 'AudiType', sans-serif;
  font-size: 12px;
  font-stretch: 105%;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 20px;
  text-decoration: none;
  color: #666666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audi-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 1px solid var(--colors-interaction-primary-default-611444a); border-radius: 0; text-decoration: none; color: var(--colors-interaction-primary-default-611444a); transition: all .2s var(--easing-611444a); }
.audi-btn:hover { background: var(--colors-interaction-primary-default-611444a); color: var(--colors-ui-inverted-611444a); }

/* Small CO2 note under card CTA */
.audi-co2-note {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 11px;
  line-height: 16px;
  color: var(--colors-ui-tertiary-611444a);
}

/* Round color swatches (shared between detail and archive) */
.audi-colors { margin-top: 8px; }
/* Show color label on vehicle detail */
.audi-vehicle-single .audi-colors .audi-colors-label {
  display: inline-block;
  margin: 0 0 6px 0;
  font-size: 13px;
  color: var(--colors-ui-secondary-611444a);
}
.audi-vehicle-single .audi-choices {
  display: flex;
  flex-direction: column;            /* stack blocks vertically */
  align-items: flex-start;
  gap: 12px;
}
.audi-vehicle-single .audi-choices .audi-colors,
.audi-vehicle-single .audi-choices .audi-rims {
  display: flex;
  flex-direction: column;            /* put label above list */
  align-items: flex-start;
  gap: 6px;
}
.audi-vehicle-single .audi-choice-sep { display: none !important; }
.audi-colors .audi-colors-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 18px;
  row-gap: 16px;
  padding: 8px 0 12px 0;
  overflow: visible; /* avoid clipping when scaled */
}
.audi-color-swatch {
  width: 26px; height: 26px; border-radius: 9999px; /* ultra smooth circle */
  display: inline-block; cursor: pointer; position: relative;
  border: none; /* remove hard 1px border that can alias */
  /* subtle outer hairline + inner highlight using subpixel shadows for smoothing */
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.12);
  background-clip: padding-box; /* avoid halo seams */
  transform-origin: center center;
  transition: transform .15s ease, box-shadow .15s ease;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* Active: enlarge the swatch with visible ring */
.audi-color-swatch.active { 
  transform: scale(1.15); 
  box-shadow: 0 0 0 3px #666, 0 2px 8px rgba(0,0,0,.25); 
}
.audi-color-swatch:hover { box-shadow: 0 0 0 0.5px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.55), 0 2px 6px rgba(0,0,0,.18); }
/* Reset swatch: neutral, with slash icon */
.audi-color-reset {
  background: linear-gradient(135deg, transparent 45%, rgba(0,0,0,.6) 46%, rgba(0,0,0,.6) 54%, transparent 55%),
              #f1f1f1;
}
@media (max-width: 575.98px) {
  .audi-colors .audi-colors-list { column-gap: 14px; row-gap: 14px; padding: 8px 0 12px 0; }
  .audi-color-swatch { width: 24px; height: 24px; }
  .audi-color-swatch.active { 
    transform: scale(1.15); 
    box-shadow: 0 0 0 2px #666, 0 2px 6px rgba(0,0,0,.25); 
  }
}

/* Hide color swatches on listing/archive pages; keep them visible on vehicle detail */
.audi-vehicles .audi-colors { display: none !important; }
.audi-vehicles .audi-tile-colors { display: none !important; }
/* Also hide color swatches inside the vehicle-detail Suggestions section */
.audi-suggestions .audi-colors { display: none !important; }
.audi-suggestions .audi-tile-colors { display: none !important; }
/* Extra guard: target the specific list container used by suggestions */
#audi-sugg-list .audi-colors { display: none !important; }
#audi-sugg-list .audi-tile-colors { display: none !important; }

/* Loader overlay */
:root {
  --loader-main-color: rgba(255, 255, 255, 0.96); /* overlay background, near-white */
  --loader-point-color: #000000;                   /* Audi black dots */
  --loader-size: 6px;
}
.loader {
  background-color: var(--loader-main-color);
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  z-index: 100000;
}
.loader__element {
  border-radius: 100%;
  border: var(--loader-size) solid var(--loader-point-color);
  margin: calc(var(--loader-size) * 2);
}
.loader__element:nth-child(1) { animation: preloader .6s ease-in-out alternate infinite; }
.loader__element:nth-child(2) { animation: preloader .6s ease-in-out alternate .2s infinite; }
.loader__element:nth-child(3) { animation: preloader .6s ease-in-out alternate .4s infinite; }
@keyframes preloader { 100% { transform: scale(2); } }

/* Inline variant: use inside blocks instead of overlay */
.loader--inline {
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  background: transparent;
  padding: 24px 0;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .audi-tiles { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 767px) {
  .audi-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .audi-tiles { grid-template-columns: 1fr; }
}

/* ===== Toolbar & Filters ===== */
.audi-toolbar { border-bottom: 1px solid var(--colors-ui-divider-611444a); margin-bottom: 12px; }
.audi-link-back { color: var(--colors-ui-primary-611444a); text-decoration: none; }
.audi-link-back:hover { text-decoration: underline; }

/* Desktop sidebar */
.audi-filters { 
  position: -webkit-sticky; /* Safari */
  position: sticky; 
  top: 80px; 
  background: var(--colors-background-card-611444a); 
  border: 1px solid var(--colors-ui-divider-611444a); 
  border-radius: 0; 
  padding: 16px;
  align-self: flex-start; /* Important pour sticky dans un conteneur flex */
  z-index: 10;
}

/* Assurer que le conteneur parent permet le sticky */
.audi-vehicles .row,
.audi-vehicles .container-fluid {
  overflow: visible !important;
}

/* Le aside doit aussi permettre le sticky */
aside.col-12.col-lg-3 {
  position: relative;
  height: fit-content;
}
.audi-filter-group { margin-bottom: 16px; }
.audi-filter-separator {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 0 0 16px 0;
}
.audi-filter-title { font-weight: var(--fontWeights-bold-611444a); margin: 0 0 8px; font-size: 14px; }
.audi-filter-options .form-check { margin-bottom: 6px; }

/* Offcanvas (mobile) */
.offcanvas .audi-filters { position: static; border: 0; border-radius: 0; padding: 0; max-height: none; overflow-y: visible; }

/* ===== Vehicle detail: layout and components ===== */
.audi-vehicle-single .col-12.col-lg-5 { position: sticky; top: 80px; align-self: flex-start; }
.audi-vehicle-single h1.h3 { font-family: var(--fontFamily-611444a); font-stretch: 130%; font-weight: 400; margin: 0; }
.audi-vehicle-single .text-muted { color: var(--colors-ui-tertiary-611444a) !important; }
.audi-vehicle-single .audi-price { padding: 12px 0; border-top: 1px solid var(--colors-ui-divider-611444a); border-bottom: 1px solid var(--colors-ui-divider-611444a); }
.audi-vehicle-single .audi-price .label { font-size: 14px; color: var(--colors-ui-tertiary-611444a); }
.audi-vehicle-single .audi-price .value { font-size: 28px; font-weight: 700; line-height: 1.2; }

/* Gallery frame */
.audi-vehicle-single .audi-main-image { background: #fafafa; border: 1px solid var(--colors-ui-divider-611444a); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.audi-vehicle-single .audi-main-image { overflow: hidden; }
.audi-vehicle-single .audi-main-image img { object-fit: cover; object-position: center; transition: transform .35s ease; will-change: transform; }
@media (hover:hover) and (pointer:fine) {
  .audi-vehicle-single .audi-main-image:hover img { transform: scale(1.1); }
  .audi-vehicle-single .audi-main-image { cursor: zoom-in; }
}
@media (prefers-reduced-motion: reduce) {
  .audi-vehicle-single .audi-main-image img { transition: none; }
}

/* Thumbnails */
.audi-vehicle-single .audi-thumbnails .d-flex { gap: 10px; }
.audi-vehicle-single .audi-thumbnails img { width: 88px !important; height: 66px !important; object-fit: cover; border: 2px solid transparent; transition: border-color .15s ease, transform .15s ease; }
.audi-vehicle-single .audi-thumbnails img:hover { border-color: rgba(0,0,0,.35); transform: translateY(-1px); }
.audi-vehicle-single .audi-thumbnails img.active { border-color: #000 !important; }

/* Rims section alignment */
.audi-vehicle-single .audi-rims { margin-top: 14px; }
.audi-vehicle-single .audi-rims-label {
  display: inline-block;
  margin: 0 0 6px 0;
  font-size: 13px;
  color: var(--colors-ui-secondary-611444a);
}
.audi-vehicle-single .audi-rims-list { display: flex; flex-wrap: wrap; gap: 12px; }
.audi-vehicle-single .audi-rim-option { min-width: 110px; }

/* Equipment list */
.audi-vehicle-single .audi-equip { margin-top: 8px; }
.audi-vehicle-single .audi-equip-title { font-weight: 600; font-size: 14px; margin: 8px 0; color: var(--colors-ui-secondary-611444a); }
.audi-vehicle-single .audi-equip-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px 14px;
  max-height: 168px; /* collapsed height ~ 6 rows */
  overflow: hidden;
}
.audi-vehicle-single .audi-equip.is-expanded .audi-equip-list { max-height: none; }
.audi-vehicle-single .audi-equip-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 1.35;
  color: var(--colors-ui-secondary-611444a);
}
.audi-vehicle-single .audi-equip-item::before {
  content: '';
  width: 12px; height: 12px; flex: 0 0 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 6l6 6-6 6-1.41-1.41L12.17 12 7.59 7.41 9 6z'/></svg>") no-repeat center/100% 100%;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 6l6 6-6 6-1.41-1.41L12.17 12 7.59 7.41 9 6z'/></svg>") no-repeat center/100% 100%;
}
.audi-vehicle-single .audi-equip-item .price {
  margin-left: 4px;
  font-weight: 600;
  color: #000;
}
.audi-vehicle-single .audi-equip-toggle { margin-top: 6px; font-size: 13px; color: var(--colors-ui-primary-611444a); text-decoration: none; background: transparent; border: 0; padding: 0; }
.audi-vehicle-single .audi-equip-toggle:hover { text-decoration: underline; }

/* CTAs */
.audi-vehicle-single .btn { font-stretch: 110%; }
@media (max-width: 767.98px) {
  .audi-vehicle-single .btn { width: 100%; }
  .audi-vehicle-single .audi-equip-list { grid-template-columns: 1fr; }
}

/* ===== Square look: global resets for Bootstrap components ===== */
/* Buttons and badges */
.btn, .btn-sm, .btn-lg, .badge { border-radius: 0 !important; }
/* Form controls */
.form-control, .form-select, .input-group-text { border-radius: 0 !important; }
/* Offcanvas, modal, dropdown, cards */
.offcanvas, .offcanvas-header, .offcanvas-body,
.modal-content, .dropdown-menu, .card, .card-img, .card-img-top { border-radius: 0 !important; }
/* Images inside tiles/banners */
.audi-tile img, .audi-campaign-img { border-radius: 0 !important; }

/* Fade-in images only when fully loaded */
.audi-tile img,
.audi-campaign-img {
  opacity: 0;
  transition: opacity .35s ease;
}
.audi-tile img.is-loaded,
.audi-campaign-img.is-loaded {
  opacity: 1;
}

/* Prevent duplicate icons on vehicle detail (inline SVG icons are injected) */
.audi-vehicle-single .audi-features .pin::before { display: none !important; }

/* Google Maps width reduction */
iframe[src*="google.com/maps"],
iframe[src*="maps.google"],
.wp-block-embed iframe[src*="google.com/maps"],
.wp-block-embed iframe[src*="maps.google"],
.google-map iframe,
.map-container iframe {
  max-width: 66.666% !important; /* 2/3 width (reduce by 1/3) */
  width: 66.666% !important;
  margin: 0 auto !important; /* Center the map */
}

/* Responsive: full width on mobile */
@media (max-width: 767.98px) {
  iframe[src*="google.com/maps"],
  iframe[src*="maps.google"],
  .wp-block-embed iframe[src*="google.com/maps"],
  .wp-block-embed iframe[src*="maps.google"],
  .google-map iframe,
  .map-container iframe {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }
}

/* Force conversion bar buttons visibility */
.audi-conversion-bar .audi-conv-buttons .audi-conv-primary,
.audi-conversion-bar .audi-conv-buttons .audi-conv-secondary {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Video section styling */
.audi-video-section {
  border-radius: 8px;
  overflow: hidden;
}

.audi-video-wrapper {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.audi-video-wrapper iframe {
  border-radius: 8px;
}

/* Responsive video adjustments */
@media (max-width: 767.98px) {
  .audi-video-section .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .audi-video-wrapper {
    border-radius: 4px;
  }
  
  .audi-video-wrapper iframe {
    border-radius: 4px;
  }
}

/* Search Popup Styles */
.audi-search-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.audi-search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.audi-search-modal {
  position: relative;
  background: white;
  border-radius: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.audi-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.audi-search-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
  letter-spacing: -0.01em;
}

.audi-search-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  border-radius: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audi-search-close:hover {
  background: #e0e0e0;
  color: #000;
}

.audi-search-input-wrapper {
  position: relative;
  padding: 24px 32px;
  background: white;
}

.audi-search-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  background: #fafafa;
}

.audi-search-input:focus {
  border-color: #000;
  background: white;
}

.audi-search-submit {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audi-search-results {
  flex: 1;
  overflow-y: auto;
  max-height: calc(85vh - 180px);
  padding: 0;
  background: white;
}

.audi-search-result-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #f0f0f0;
}

.audi-search-result-item:hover {
  background: #f8f8f8;
}

.audi-search-result-item:last-child {
  border-bottom: none;
}

.audi-search-result-image {
  width: 100px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f5f5f5;
}

.audi-search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audi-search-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audi-search-result-title {
  font-weight: 600;
  color: #000;
  margin-bottom: 0;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.audi-search-result-price {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.audi-search-no-results {
  text-align: center;
  padding: 60px 32px;
  color: #999;
  font-size: 15px;
}

/* Search icon styles */
.audi-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px !important;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.audi-search-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.audi-search-icon:active {
  transform: scale(0.95);
}

.audi-search-icon svg {
  display: block;
  transition: stroke 0.2s ease;
}

/* Mobile responsive */
@media (max-width: 767.98px) {
  /* Make search icon larger and more visible on mobile */
  .audi-search-icon {
    padding: 10px !important;
  }
  
  .audi-search-icon svg {
    width: 26px;
    height: 26px;
  }
  
  .audi-search-popup {
    padding-top: 0;
    align-items: stretch;
  }
  
  .audi-search-modal {
    width: 100%;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }
  
  .audi-search-header {
    padding: 16px 20px 12px;
  }
  
  .audi-search-input-wrapper {
    padding: 0 20px 12px;
  }
  
  .audi-search-result-image {
    width: 70px;
    height: 52px;
  }
}

/* Hover effect for address links */
.hover-bg-light {
  transition: background-color 0.2s ease;
}

.hover-bg-light:hover {
  background-color: #f8f9fa !important;
  cursor: pointer;
}
