/* Refonte UX nuit du 14/10 · poste « voitures » : Voitures (liste dense, cartes compactes,
   en-tête sur une ligne), fiche (bande d'identité compacte), achat (chiffrages), ajout.
   Surcharge seulement : palette marine et menthe, composants existants. */

/* ---------- En-tête d'écran sur une ligne ---------- */
.ux-v-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 10px; }
.ux-v-tete h1 { margin: 0; font-size: 22px; font-weight: 780; letter-spacing: -.01em; white-space: nowrap; }
.ux-v-compte { font-weight: 600; color: hsl(215 20% 42%); }
.ux-v-onglets.aw-tabs { margin: 0; border: 0; padding: 0; }
.ux-v-actions { margin-left: auto; gap: 8px; }
.ux-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barre d'outils du parc : une ligne ---------- */
.gg-toolbar.ux-v-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.ux-v-barre .fw-filter-row { flex-wrap: nowrap; gap: 4px; }
.ux-v-barre .fw-filter-row button { padding: 5px 10px; white-space: nowrap; }
.ux-v-n { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px; font-weight: 800; background: hsl(var(--primary) / .1); color: hsl(var(--primary)); text-align: center; }
.ux-v-recherche { flex: 1 1 220px; max-width: 320px; margin: 0; }
.ux-v-recherche input { width: 100%; padding: 6px 10px; }
.ux-v-resultat { margin: 0; font-size: 12px; color: hsl(215 20% 42%); white-space: nowrap; }
.ux-v-stats { margin-left: auto; }
.ux-v-stats[open] { flex-basis: 100%; }
.ux-v-option { padding: 5px 10px; font-size: 13px; }

/* ---------- Liste dense : 36 px par ligne ---------- */
.ux-liste .fw-table { font-size: 13px; }
.ux-liste .fw-table th { padding: 6px 8px; font-size: 12px; white-space: nowrap; position: sticky; top: 0; background: #f6f9fc; z-index: 1; }
.ux-liste .fw-table td { padding: 3px 8px; height: 36px; vertical-align: middle; white-space: nowrap; }
.ux-liste .fw-table tbody tr:hover { background: hsl(var(--accent)); }
.ux-liste .ux-num { text-align: right; font-variant-numeric: tabular-nums; }
.ux-liste th.ux-num .ux-tri { justify-content: flex-end; }
.ux-liste .ux-fin { background: hsl(var(--menthe-doux) / .55); }
.ux-liste th.ux-fin { background: hsl(var(--menthe-doux)); }
.ux-liste .ux-negatif { color: #b42318; font-weight: 700; }
.ux-liste .ux-voiture { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.ux-liste .ux-voiture small { color: hsl(215 20% 42%); font-size: 12px; }
.ux-liste-photo { width: 40px; height: 28px; border-radius: 5px; flex: none; }
.ux-liste-photo.v2-sans-photo b, .ux-liste-photo b { font-size: 9px; padding: 0 3px; }
.ux-liste-photo small { display: none; }
.ux-liste .ux-badges .badge { margin-right: 3px; }
.ux-liste td .badge { padding: 1px 7px; font-size: 11px; line-height: 16px; }
.ux-liste td .v2-reste svg, .ux-cc .v2-reste svg { width: 20px; height: 20px; }
.ux-liste td .v2-reste { line-height: 20px; }
.ux-liste .ux-lieu { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ux-liste .v2-reste { display: inline-flex; align-items: center; gap: 6px; }
.ux-tri { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: inherit; width: 100%; }
.ux-tri:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; border-radius: 4px; }
.ux-tri-sens { font-size: 9px; color: hsl(var(--primary)); }

/* ---------- Tableau : cartes compactes ---------- */
.gg-board.ux-v-compact { align-items: start; }
.gg-board.ux-v-compact .gg-lane { padding: 10px 8px 8px; }
.gg-board.ux-v-compact .gg-lane-title { margin-bottom: 6px; }
.gg-board.ux-v-compact .gg-lane-title h2 { font-size: 15px; }
.gg-car.ux-cc { display: flex; gap: 8px; align-items: center; padding: 6px 8px; margin: 5px 0; border-radius: 10px; background: #fff; border: 1px solid hsl(var(--bord, 214 30% 88%)); text-decoration: none; color: inherit; min-height: 0; }
.gg-car.ux-cc:hover, .gg-car.ux-cc:focus-visible { border-color: hsl(var(--primary) / .5); box-shadow: 0 2px 8px hsl(215 50% 20% / .08); }
.ux-cc-photo { width: 48px; height: 36px; border-radius: 6px; flex: none; }
.ux-cc-photo b { font-size: 10px; padding: 0 3px; }
.ux-cc-photo small { display: none; }
.ux-cc-texte { display: grid; gap: 1px; min-width: 0; flex: 1; }
.ux-cc-l1 { display: flex; justify-content: space-between; gap: 6px; min-width: 0; }
.ux-cc-l1 strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ux-cc-jours { font-size: 11px; font-weight: 700; color: hsl(215 20% 42%); white-space: nowrap; }
.ux-cc-texte small { font-size: 12px; color: hsl(215 20% 38%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-cc-l3 { display: flex; align-items: center; gap: 4px; font-size: 11px; min-width: 0; overflow: hidden; white-space: nowrap; }
.ux-cc-l3 .badge { font-size: 10px; padding: 1px 6px; }
.ux-cc-l3 .v2-reste { display: inline-flex; align-items: center; gap: 4px; color: hsl(215 20% 38%); overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 800px) {
  .ux-v-tete h1 { font-size: 19px; }
  .ux-v-actions { margin-left: 0; }
  .ux-v-barre .fw-filter-row { overflow-x: auto; max-width: 100%; }
  .ux-v-recherche { max-width: none; flex-basis: 100%; }
  .ux-v-stats { margin-left: 0; }
}

/* ---------- Fiche : bande d'identité compacte (≈ 140 px) ---------- */
.ux-fil.fw-breadcrumb { margin-bottom: 8px; }
.ux-fil .btn { padding: 4px 10px; }
.fw-identity.ux-bande {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; align-items: center;
  gap: 16px; padding: 12px 18px; min-height: 0;
  background: radial-gradient(700px 200px at 0% 0%, hsl(var(--menthe) / .14), transparent 70%), linear-gradient(105deg, hsl(213 70% 99%), hsl(213 70% 95%));
}
.ux-bande-photo { all: unset; position: relative; cursor: pointer; display: block; width: 120px; height: 90px; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px hsl(215 50% 20% / .18); }
.ux-bande-photo:focus-visible { outline: 3px solid hsl(var(--primary)); outline-offset: 2px; }
.ux-bande-vignette { width: 120px; height: 90px; border-radius: 10px; }
.ux-bande-nb { position: absolute; right: 5px; bottom: 5px; font-size: 11px; font-weight: 700; color: #fff; background: hsl(215 50% 15% / .72); border-radius: 999px; padding: 1px 7px; }
.ux-bande-id { min-width: 0; display: grid; gap: 4px; }
.ux-bande-id h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-bande-id h2 small { margin-left: 10px; font-size: 13px; font-weight: 500; color: hsl(var(--muted-foreground)); letter-spacing: 0; }
.ux-bande .fw-id-facts.v2-faits { gap: 6px; flex-wrap: wrap; }
.ux-bande .fw-id-facts.v2-faits span { white-space: nowrap; font-size: 12px; padding-top: 3px; padding-bottom: 3px; }
.fw-axes.ux-faits { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; border: 0; grid-template-columns: none; }
.ux-faits span { font-size: 12px; min-width: 0; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: hsl(215 25% 25%); }
.ux-faits em { font-style: normal; color: hsl(var(--muted-foreground)); }
.ux-faits strong { font-weight: 650; font-size: 12px; }
.ux-bande-prix { display: grid; justify-items: end; gap: 3px; text-align: right; }
.ux-bande-prix strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: hsl(var(--sport-azur-fort, 213 91% 34%)); }
.ux-bande-prix small { font-size: 11px; color: hsl(var(--muted-foreground)); }
.ux-bande-actions { display: grid; gap: 6px; justify-items: stretch; }
.ux-bande-actions .btn { white-space: nowrap; }
.ux-galerie { padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.ux-galerie .v2-galerie { max-width: 560px; }
.fw-full .fw-attention, .fw-compact .fw-attention { padding: 7px 18px; flex-wrap: nowrap; min-height: 0; }
.fw-attention > div { min-width: 0; display: flex; gap: 10px; align-items: baseline; overflow: hidden; }
.fw-attention > div strong { white-space: nowrap; }
.fw-attention > div span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-pied { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.ux-pied:empty { display: none; }
.ux-voir-comme { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }

/* Commerce (fiche compacte à droite) : la bande se replie sur deux lignes. */
.fw-compact .fw-identity.ux-bande { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
.fw-compact .ux-bande-photo, .fw-compact .ux-bande-vignette { width: 72px; height: 54px; }
.fw-compact .ux-bande-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
.fw-compact .ux-bande-id h2 { font-size: 18px; }

@media (max-width: 800px) {
  .fw-identity.ux-bande { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px 10px; padding: 10px 12px; }
  .ux-bande-photo, .ux-bande-vignette { width: 72px; height: 54px; }
  .ux-bande-id h2 { font-size: 18px; white-space: normal; }
  .ux-bande-id h2 small { display: block; margin: 2px 0 0; font-size: 12px; }
  .ux-bande .fw-id-facts.v2-faits span:nth-child(n+3) { display: none; }
  .ux-faits { display: none !important; }
  .ux-bande-prix strong { font-size: 18px; }
  .ux-bande-actions { grid-column: 1 / -1; display: flex; gap: 6px; }
  .ux-bande-actions .btn { flex: 1; padding: 6px 8px; font-size: 13px; }
  .fw-full .fw-attention { padding: 6px 12px; }
  .fw-attention > div span { display: none; }
  .fw-attention .btn { display: none; }
  .ux-galerie { padding: 8px 12px; }
  .ux-bande .fw-kicker { display: none; }
  .ux-bande-id h2 small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ux-bande .fw-id-facts.v2-faits { flex-wrap: nowrap; }
  .ux-fil.fw-breadcrumb { flex-wrap: nowrap; }
  .ux-fil.fw-breadcrumb > a:not(.btn), .ux-fil.fw-breadcrumb > span, .ux-fil.fw-breadcrumb > strong { display: none; }
  .ux-fil.fw-breadcrumb > div { width: auto; margin-left: auto; gap: 6px; display: flex; }
  .fw-full .fw-view-heading { display: none; }
}

/* ---------- Ajout et chiffrage ---------- */
.ux-aj-tete { display: grid; gap: 12px; }
.ux-aj-recherche { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ux-aj-recherche .c3-champ { flex: 1 1 260px; max-width: 420px; margin: 0; }
.ux-aj-natures.v2-natures .v2-nature { padding: 8px 12px; }
.ux-sim-actions { flex-wrap: wrap; gap: 8px; align-items: center; }
.ux-chiffrages h3 small.ux-discret { font-weight: 500; font-size: 12px; color: hsl(var(--muted-foreground)); }
.ux-chiffrages tr.ux-actif { background: hsl(var(--menthe-doux)); }
.ux-actions-ligne { display: flex; gap: 4px; justify-content: flex-end; }
