/* =====================================================================
   AutoPilot V2 · lot L3 (multi-garage) : garage ACTIF dans la barre.
   Même langage que la recherche en verre de l'en-tête (identite.css) :
   verre sur marine, trait menthe au focus. La seule couleur nouvelle est
   la pastille propre à chaque garage (--garage-couleur, posée par le
   serveur), qui le distingue d'un coup d'œil. Aucun !important.
   ===================================================================== */

header.v2-entete .v2-garage-actif {
  --garage-couleur: #3d8bfd;
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 0; flex: 0 0 auto;
  padding: 6px 10px 6px 8px;
  border-radius: 11px;
  background: hsl(var(--band-line) / .07);
  border: 1px solid hsl(var(--band-line) / .16);
  box-shadow: inset 0 1px 0 hsl(var(--band-line) / .14), inset 3px 0 0 var(--garage-couleur);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  color: #fff;
}
.v2-garage-actif .v2-garage-pastille {
  width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%;
  background: var(--garage-couleur);
  box-shadow: 0 0 0 2px hsl(var(--band-line) / .85), 0 0 10px var(--garage-couleur);
}
.v2-garage-actif .v2-garage-textes { display: flex; flex-direction: column; min-width: 0; max-width: 200px; line-height: 1.15; }
.v2-garage-actif .v2-garage-nom { font-size: 13.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-garage-actif .v2-garage-sous { font-size: 11.5px; color: hsl(212 35% 82%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-garage-actif select.v2-garage-choix {
  flex-shrink: 0; max-width: 92px;
  font: inherit; font-size: 12px; font-weight: 650;
  color: hsl(var(--menthe));
  background: hsl(var(--band-line) / .08);
  border: 1px solid hsl(var(--menthe) / .45);
  border-radius: 8px; padding: 5px 6px; cursor: pointer;
}
.v2-garage-actif select.v2-garage-choix option { color: hsl(var(--foreground)); background: #fff; }
.v2-garage-actif select.v2-garage-choix:focus-visible { outline: none; box-shadow: 0 0 0 3px hsl(var(--menthe) / .35); }
.v2-garage-actif select.v2-garage-choix:disabled { opacity: .6; cursor: progress; }
.v2-garage-actif .v2-garage-erreur {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 5;
  font-size: 12px; padding: 4px 8px; border-radius: 6px;
  background: hsl(var(--destructive-doux)); color: hsl(var(--destructive-fort));
}

/* Écrans moyens : le garage actif garde sa place, le menu et la recherche se resserrent. */
@media (max-width: 1640px) and (min-width: 1101px) {
  header.v2-entete { gap: 16px; }
  header.v2-entete nav.v2-nav { grid-template-columns: repeat(6, minmax(0, 104px)); }
  header.v2-entete nav.v2-nav a { font-size: 13px; padding: 9px 4px; }
  .v2-search input { width: 180px; }
  .v2-garage-actif .v2-garage-textes { max-width: 190px; }
}
@media (max-width: 1100px) {
  .v2-garage-actif .v2-garage-textes { max-width: 150px; }
}
@media (max-width: 600px) {
  /* Téléphone : le garage actif a sa propre ligne, lisible en entier, sous la marque. */
  header.v2-entete .v2-garage-actif { flex: 1 1 100%; }
  .v2-garage-actif .v2-garage-textes { max-width: none; flex: 1 1 auto; }
}
