/* ============================================================================
   liste.css : liste des vehicules v2 (maquette storybook, aout 2026).
   Toutes les classes sont prefixees .cml- (+ .cv- pour le bandeau commerciaux,
   scope sous .cml-contacts). Charge par cgi-bin/liste.pl avec ?v= (les
   statiques ont 11 mois de cache navigateur : incrementer $CSS_VERSION a
   CHAQUE livraison de ce fichier).
   ========================================================================= */

/* fleche commune des selects (style.css du site impose son propre look) */
.cml-liste select.cml-fsel, .cml-liste .cml-sort select {
  -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important;
  height: 34px !important; min-height: 0 !important; padding: 0 26px 0 10px !important; margin: 0 !important;
  font-size: 12px !important; font-weight: 500 !important; line-height: 32px !important;
  color: #31363B !important; border: 1px solid #DFE3E7 !important; border-radius: 9px !important;
  box-shadow: none !important; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236E767E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center !important;
}
.cml-liste select.cml-fsel:hover, .cml-liste .cml-sort select:hover { border-color: #C6CCD2 !important; }
.cml-liste select.cml-fsel:disabled { color: #A6ADB3 !important; background-color: #F6F7F8 !important; cursor: default; }

.cml-liste { background: #F6F7F8; color: #1F2328; font-size: 14px; line-height: 1.45; }
.cml-liste *, .cml-liste *::before, .cml-liste *::after { box-sizing: border-box; }
.cml-liste a { text-decoration: none; color: inherit; }
.cml-liste img { max-width: 100%; }
.cml-liste select, .cml-liste input, .cml-liste button { font-family: inherit; }

/* ---------------- entete : titre + tri ---------------- */
.cml-hd-zone { background: #fff; border-bottom: 1px solid #E8EBEE; }
.cml-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; max-width: 1440px; margin: 0 auto; padding: 24px 28px 0; }
.cml-hd h1 { font-size: 24px; font-weight: 650; margin: 0; color: #1F2328; }
.cml-hd h1 small { font-size: 14px; color: #98A1A8; font-weight: 400; margin-left: 10px; }
.cml-hd-tools { display: flex; gap: 8px; align-items: center; }
.cml-sort { display: inline-flex; gap: 7px; align-items: center; font-size: 12.5px;
  color: #4B5157; white-space: nowrap; }

/* ---------------- barre de filtres ---------------- */
.cml-fbar { max-width: 1440px; margin: 0 auto; padding: 14px 28px 16px; }
.cml-fwrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cml-ftoggle, .cml-fmob { display: none; }
.cml-freset { width: 34px; height: 34px; border: 1px solid #DFE3E7; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; color: #6E767E;
  transform: scaleX(-1); background: #fff; flex: none; }
.cml-freset:hover { border-color: #C6CCD2; }
.cml-fsel { max-width: 156px; }
/* menus deroulants dessines (v2.js) : memes gabarits que les selects */
.cml-fwrap .v2dd { max-width: 156px; }
.cml-fwrap .v2dd-btn { height: 34px; }
.cml-hd-tools .v2dd-btn { height: 34px; font-size: 12.5px; color: #4B5157; }
.cml-hd-tools .v2dd-pop { left: auto; right: 0; }
/* selecteur en specificite ID : style.css blinde ses inputs avec une chaine
   input:not([type=radio]):not(...) x4 (0,4,1) + !important + min-height 55px */
#cml-filtres input.cml-fnum { width: 130px !important; flex: 0 0 130px; height: 34px !important;
  min-height: 0 !important; font-size: 12px !important; color: #31363B !important;
  border: 1px solid #DFE3E7 !important; border-radius: 9px !important; padding: 0 10px !important;
  margin: 0 !important; box-shadow: none !important; background: #fff !important;
  -moz-appearance: textfield !important; }
#cml-filtres input.cml-fnum::-webkit-outer-spin-button,
#cml-filtres input.cml-fnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#cml-filtres input.cml-fnum::placeholder { color: #98A1A8; }
#cml-filtres input.cml-fnum:hover { border-color: #C6CCD2 !important; }
.cml-fnum::-webkit-outer-spin-button, .cml-fnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* doubles curseurs prix / km */
.cml-frange { display: inline-flex; flex-direction: column; gap: 2px; font-size: 10.5px;
  color: #6E767E; min-width: 150px; }
.cml-frange i { font-style: normal; display: flex; justify-content: space-between; gap: 8px; }
.cml-frange i b { color: #1F2328; font-weight: 650; font-variant-numeric: tabular-nums; }
.cml-frange .track { position: relative; height: 18px; margin: 0 7px; touch-action: none; }
.cml-frange .track::before { content: ""; position: absolute; top: 7px; left: 0; right: 0;
  height: 4px; border-radius: 2px; background: #E8EBEE; }
.cml-frange .fill { position: absolute; top: 7px; height: 4px; background: #F5A45B; border-radius: 2px; }
.cml-frange input[type="range"] { position: absolute; inset: 0; width: 100%; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; }
.cml-frange input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto;
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2.5px solid #E8720C;
  box-shadow: 0 1px 3px rgba(10,12,14,.25); cursor: pointer; }
.cml-frange input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 11px; height: 11px;
  border-radius: 50%; background: #fff; border: 2.5px solid #E8720C; cursor: pointer; }

/* filtre membre (Mes criteres / Tous les vehicules) : markup existant restyle */
.cml-mfiltre { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 1 1 100%; }
.cml-mfiltre .based-own-criteria, .cml-mfiltre .all-cars { display: inline-flex; margin: 0 !important; }
.cml-mfiltre a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #31363B;
  border: 1px solid #DFE3E7; border-radius: 99px; padding: 7px 13px; background: #fff; white-space: nowrap; }
.cml-mfiltre a:hover { border-color: #C6CCD2; }
.cml-mfiltre a.checked { background: #FCF1E4; border-color: #EFC79A; color: #8A4B12; font-weight: 600; }
.cml-mfiltre a.based-own-criteria--link--manage { display: none; }

/* ---------------- bandeau des commerciaux (option B) ---------------- */
.cml-contacts { max-width: 1440px; margin: 0 auto; padding: 16px 28px 0; }
.cml-contacts .av { border-radius: 50%; overflow: hidden; background: #F1F3F5; display: inline-flex;
  align-items: center; justify-content: center; flex: none; font-size: 11px; color: #6E767E;
  width: 34px; height: 34px; font-weight: 600; }
.cml-contacts .av img { width: 100%; height: 100%; object-fit: cover; }
.cml-contacts .co { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #4B5157;
  overflow-wrap: anywhere; }
.cml-contacts .co svg { color: #98A1A8; flex: none; }
.cml-contacts .co a { color: inherit; }
.cml-contacts .co a:hover { color: #C25E05; }
.cml-contacts .lg { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #98A1A8;
  margin-top: 4px; flex-wrap: wrap; }
.cml-contacts .lg img { height: 11px !important; width: auto; border-radius: 2px; }
.cml-contacts .cowa { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px;
  font-weight: 600; color: #3E7A2C; }
.cml-contacts .qr { line-height: 0; border: 1px solid #E8EBEE; border-radius: 8px; padding: 4px;
  background: #fff; flex: none; }
.cv-band { display: flex; align-items: center; gap: 14px; border: 1px solid #E8EBEE; border-radius: 14px;
  background: #fff; padding: 12px 16px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.cv-band:hover { border-color: #DFE3E7; box-shadow: 0 3px 12px rgba(10,12,14,.05); }
.cv-b.ouvert .cv-band { border-color: #EFC79A; background: #FDF8F1; }
.cv-band .avs { display: flex; }
.cv-band .avs .av { margin-left: -10px; border: 2px solid #fff; }
.cv-band .avs .av:first-child { margin-left: 0; }
.cv-band > div { flex: 1; }
.cv-band b { display: block; font-size: 13.5px; font-weight: 650; }
.cv-band > div span { font-size: 12px; color: #6E767E; }
.cv-band .btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid #E8720C;
  color: #C25E05; background: #fff; border-radius: 9px; padding: 9px 14px; font-size: 12.5px;
  font-weight: 650; cursor: pointer; flex: none; }
.cv-band .btn i { font-style: normal; }
.cv-band .btn:hover { background: #FCF1E4; }
.cv-band .btn > svg { transition: transform .2s ease; }
.cv-b.ouvert .cv-band .btn > svg { transform: rotate(180deg); }
.cv-tiroir { display: none; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.cv-b.ouvert .cv-tiroir { display: grid; }
.cv-mini { display: flex; gap: 10px; align-items: center; border: 1px solid #E8EBEE; border-radius: 12px;
  background: #fff; padding: 10px; }
.cv-mini .av { width: 38px; height: 38px; }
.cv-mini > div { flex: 1; min-width: 0; }
.cv-mini b { display: block; font-size: 12.5px; font-weight: 650; margin-bottom: 2px; }
.cv-mini .vc { display: none; }

/* ---------------- grille des annonces ---------------- */
.cml-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 1440px; margin: 0 auto; padding: 18px 28px 30px; }
.cml-grid:hover .cml-card:not(:hover) { filter: blur(1.5px) saturate(.85); opacity: .75; }
.cml-card { background: #fff; border: 1px solid #E8EBEE; border-radius: 14px; overflow: hidden;
  position: relative; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease, opacity .25s ease; }
.cml-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(24,27,30,.10); }
.cml-card .ph { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #EDEFF1; display: block; }
.cml-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cml-card:hover .ph img { transform: scale(1.045); }
.cml-badge { position: absolute; top: 10px; left: 10px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; padding: 4px 9px; border-radius: 6px; background: #E8720C; color: #fff; z-index: 2; }
.cml-badge.pod { background: #22262A; }
.cml-card .bd { padding: 13px 15px 14px; display: flex; flex-direction: column; flex: 1; }
.cml-card .t { display: block; font-size: 15px; font-weight: 650; line-height: 1.25; color: #1F2328;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cml-card .t:hover { color: #C25E05; }
.cml-card .v { font-size: 12px; color: #98A1A8; margin: 1px 0 7px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-height: 16px; }
.cml-card .facts { font-size: 12px; color: #6E767E; margin-bottom: 9px; }
.cml-card .prow { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap; margin-top: auto; }
.cml-card .prow .p { font-size: 18px; font-weight: 700; color: #D9640A; white-space: nowrap; }
.cml-card .prow .p small { font-size: 11px; color: #98A1A8; font-weight: 400; margin-left: 3px; }
.cml-card .prow .p.pod { font-size: 14px; color: #1F2328; }
.cml-card .prow .p .old { font-size: 12px; color: #98A1A8; text-decoration: line-through;
  font-weight: 500; margin-right: 6px; }
.cml-card .prow .p.verrou { font-size: 12px; font-weight: 600; color: #6E767E; white-space: normal; }
.cml-card .prow a.verrou:hover { color: #C25E05; }
.cml-card .rem.ok { font-size: 11px; color: #3E7A2C; display: inline-flex; gap: 4px;
  align-items: center; white-space: nowrap; }
.cml-card .rem.warn { font-size: 11px; color: #8F5E08; background: #FBF3E2; padding: 2.5px 9px;
  border-radius: 99px; font-weight: 600; white-space: nowrap; }
.cml-card .actrow { display: flex; gap: 7px; align-items: center; margin-top: 9px; padding-top: 9px;
  border-top: 1px solid #F5F6F8; flex-wrap: wrap; }
.cml-card .actrow .waref { margin-left: auto; font-size: 10.5px; color: #98A1A8;
  font-family: ui-monospace, Menlo, monospace; }
.cml-card .actrow .waref.seul { margin-left: 0; }
.cml-card .cml-wa { display: inline-flex; align-items: center; color: #3E7A2C; }
.cml-card .cml-wa a { display: inline-flex; width: 14px; height: 14px; }
/* boutons offre / achat immediat (markup buttonsactionsmembreslisting) */
.cml-actions ul { display: contents; margin: 0; padding: 0; list-style: none; }
.cml-actions { display: contents; }
.cml-actions li { display: inline-flex; }
.cml-card .actrow .cml-actions a.btn { display: inline-flex !important; align-items: center; gap: 4px;
  font-size: 11px !important; font-weight: 600 !important; color: #C25E05 !important;
  background: #FCF1E4 !important; border: none !important; border-radius: 7px !important;
  padding: 4px 9px !important; line-height: 1.4 !important; height: auto !important;
  text-shadow: none !important; box-shadow: none !important; text-transform: none !important;
  margin: 0 !important; }
.cml-card .actrow .cml-actions a.btn:hover { background: #F7E3C9 !important; color: #8A4B12 !important; }

/* etat vide */
.cml-vide { grid-column: 1 / -1; background: #fff; border: 1px dashed #D8DCE0; border-radius: 14px;
  padding: 40px 30px; text-align: center; color: #C25E05; }
.cml-vide b { display: block; font-size: 17px; font-weight: 650; color: #1F2328; margin: 12px 0 6px; }
.cml-vide p { margin: 0 auto 16px; font-size: 13px; color: #6E767E; max-width: 480px; line-height: 1.6; }
.cml-fchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8A4B12;
  border: 1px solid #EFC79A; border-radius: 99px; padding: 8px 14px; background: #FCF1E4; font-weight: 600; }

/* ---------------- pagination ---------------- */
.cml-pagin { display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 6px 14px 30px; flex-wrap: wrap; }
.cml-pagin a, .cml-pagin span { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 9px;
  border: 1px solid #DFE3E7; background: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; color: #4B5157; }
.cml-pagin a:hover { border-color: #C6CCD2; }
.cml-pagin span.on { background: #1F2328; color: #fff; border-color: #1F2328; }
.cml-pagin span.dots { border: none; background: transparent; min-width: 18px; }
.cml-pagin a.off { pointer-events: none; opacity: .4; }

/* ---------------- tablette ---------------- */
@media (max-width: 1024px) {
  .cml-grid { grid-template-columns: repeat(2, 1fr); }
  .cv-tiroir { grid-template-columns: repeat(2, 1fr); }
  .cml-mfiltre { margin-left: 0; }
}

/* ---------------- mobile ---------------- */
@media (max-width: 560px) {
  .cml-hd { padding: 16px 15px 0; }
  .cml-hd h1 { font-size: 19px; }
  .cml-hd h1 small { display: block; margin: 2px 0 0; }
  .cml-hd-tools { width: 100%; justify-content: space-between; }
  .cml-hd-tools .cml-sort { flex: 1; }
  .cml-hd-tools .cml-sort select { width: 100%; }
  .cml-fbar { padding: 10px 15px 12px; }
  /* filtres replies derriere un bouton (case a cocher, sans JS) */
  .cml-fmob { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #31363B;
    border: 1px solid #DFE3E7; border-radius: 99px; padding: 8px 14px; background: #fff; cursor: pointer; }
  .cml-fwrap { display: none; margin-top: 10px; }
  .cml-ftoggle:checked ~ .cml-fwrap { display: flex; }
  .cml-fsel { max-width: none; flex: 1 1 44%; }
  .cml-fwrap .v2dd { max-width: none; flex: 1 1 44%; }
  .cml-fwrap .v2dd-btn { width: 100%; }
  .cml-fwrap .v2dd-pop { left: 0; right: 0; min-width: 0; }
  .cml-frange { flex: 1 1 100%; }
  #cml-filtres input.cml-fnum { flex: 1 1 44%; width: auto !important; }
  .cml-contacts { padding: 10px 15px 0; }
  .cv-band { gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
  .cv-band > div b { font-size: 12.5px; }
  .cv-band > div span { font-size: 11px; }
  .cv-band .avs .av { width: 28px; height: 28px; margin-left: -8px; }
  .cv-band .btn { flex: 1 1 100%; justify-content: center; }
  .cv-tiroir { grid-template-columns: 1fr; }
  /* sur telephone on ne scanne pas son propre ecran : vCard directe */
  .cv-mini { flex-wrap: wrap; }
  .cv-mini .qr { display: none; }
  .cv-mini .vc { display: flex; align-items: center; justify-content: center; gap: 7px;
    flex: 1 1 100%; border: 1px solid #DFE3E7; border-radius: 9px; padding: 9px 0; font-size: 12px;
    font-weight: 600; color: #C25E05; background: #fff; }
  .cml-grid { grid-template-columns: 1fr; gap: 14px; padding: 12px 15px 24px; }
  .cml-grid:hover .cml-card:not(:hover) { filter: none; opacity: 1; }
  .cml-card .ph { aspect-ratio: 16/9; }
}

/* ---------------- accessibilite ---------------- */
@media (prefers-reduced-motion: reduce) {
  .cml-liste *, .cml-liste *::before, .cml-liste *::after { transition: none !important; }
  .cml-card:hover { transform: none; }
  .cml-grid:hover .cml-card:not(:hover) { filter: none; opacity: 1; }
}
