/* ============================================================
   Page liste des moteurs (Phase 3.4)
   ============================================================ */

.moteur-list-section {
  margin-top: 2rem;
}

.moteur-list-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.moteur-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.moteur-list-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.moteur-list-item:hover {
  background-color: #f0f4ff;
  text-decoration: none;
  color: inherit;
}

.moteur-list-item__code {
  font-family: monospace;
  font-size: 0.8rem;
  color: #6c757d;
  white-space: nowrap;
  flex-shrink: 0;
}

.moteur-list-item__name {
  font-size: 0.9rem;
}

/* ============================================================
   Page moteur (Phase 3.5) — vues éclatées
   ============================================================ */

/* Séparateur header / contenu */
.moteur-category-separator {
  border: none;
  border-top: 1px solid #05095F;
  margin: 1.5rem 0;
}

/* Encart vues éclatées */
.moteur-ev-section {
  margin-top: 2rem;
}

.moteur-ev-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

/* Barre de recherche EV */
.moteur-ev-search-bar {
  position: relative;
  margin-bottom: 1rem;
}

.moteur-ev-search-bar__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.moteur-ev-search-bar__input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
}

.moteur-ev-search-bar__input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.moteur-ev-search-bar__icon {
  position: absolute;
  right: 0.6rem;
  font-size: 1.25rem;
  color: #6c757d;
  pointer-events: none;
}

/* Grille des vues éclatées */
.moteur-ev-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.moteur-ev-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(50% - 0.375rem);
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.moteur-ev-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.moteur-ev-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.moteur-ev-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.moteur-ev-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.moteur-ev-thumb-placeholder .material-icons {
  font-size: 2rem;
  color: #adb5bd;
}

.moteur-ev-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  margin-bottom: 0.4rem;
}

.moteur-ev-detail-link {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  text-align: center;
  text-decoration: underline;
}

.moteur-ev-search__empty {
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0.5rem 0;
}

/* Desktop : 3 cartes par ligne */
@media (min-width: 992px) {
  .moteur-ev-card {
    width: calc(33.333% - 0.5rem);
  }
}

/* ============================================================
   Page moteur — filtre catégorie colonne gauche (n_cat)
   ============================================================ */

.moteur-product-filter .card-header span {
  font-size: 0.875rem;
  font-weight: 600;
}

.moteur-product-filter__select {
  cursor: pointer;
}

.moteur-product-filter__select .list {
  max-height: 200px;
  overflow-y: auto;
}

/* ============================================================
   Page moteur — liste produits
   ============================================================ */

.moteur-products-section {
  margin-top: 2.5rem;
}

.moteur-products-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.moteur-category-page #js-product-list-top {
  margin-top: 2rem;
}

/* ============================================================
   Page moteur — lien "Voir toutes les pièces compatibles"
   ============================================================ */

.moteur-designation-search-link {
  margin: 1.5rem 0 1rem;
  text-align: center;
}


/* Mobile : padding latéral + espacement H2/barre/résumé/description courte */
@media (max-width: 991px) {
  .moteur-category-subtitle,
  .moteur-category-separator,
  .moteur-category-extra,
  .moteur-search-bar {
    padding-right: 0.625rem;
    padding-left: 0.625rem;
  }

  .moteur-category-subtitle {
    margin-top: 1.25rem;
  }

  .moteur-category-title--with-image,
  .moteur-category-title--with-image + .block-category-inner {
    margin-top: 1.25rem;
  }
}
