/* Correctifs de déploiement : chargés après styles.css avec version anti-cache. */

/* Le logo reste contenu dans le header, y compris avant le chargement complet. */
.site-header .header-inner {
  height: 4.8rem;
  min-height: 4.8rem;
}

.site-header .brand {
  flex: 0 0 auto;
  height: 100%;
  max-width: 13.5rem;
  overflow: hidden;
}

.site-header .brand .site-logo {
  display: block !important;
  width: auto !important;
  height: 3.8rem !important;
  max-width: 13.2rem !important;
  object-fit: contain !important;
  object-position: left center !important;
}

/* Les couvertures occupent toujours la carte sans afficher le texte alternatif. */
.catalogue-page-grid .catalog-cover-image {
  position: relative;
  aspect-ratio: 210 / 297;
  background: #f8fafc;
}

.catalogue-page-grid .catalog-cover-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 1120px) {
  .site-header .brand {
    max-width: 12rem;
  }

  .site-header .brand .site-logo {
    height: 3.35rem !important;
    max-width: 11.8rem !important;
  }
}

@media (max-width: 760px) {
  .site-header .header-inner {
    height: 4.35rem;
    min-height: 4.35rem;
  }

  .site-header .brand {
    max-width: calc(100vw - 5.5rem);
  }

  .site-header .brand .site-logo {
    height: 2.9rem !important;
    max-width: min(11rem, calc(100vw - 5.5rem)) !important;
  }

  .catalogue-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.35rem .85rem !important;
  }
}

@media (max-width: 350px) {
  .catalogue-page-grid {
    grid-template-columns: 1fr !important;
    max-width: 15rem !important;
  }
}
