/* MES PRODUITS V4.10 — ergonomie de navigation, sans changement des visuels.
   Source V4.9 conservée ; ce fichier est volontairement chargé en dernier. */

/* Ordinateur : galerie illustrée des familles en haut, filtres détaillés à gauche.
   La liste de catégories du panneau latéral était un doublon de la galerie. */
@media (min-width: 901px) {
  #catalogSidebar .sidebar-label,
  #catalogSidebar .sidebar-categories { display: none !important; }
  #catalogSidebar { min-height: 0 !important; }
  #catalogSidebar .side-gender { margin-top: 7px; }
  .catalog-results .category-section { display: block !important; }
}

/* Mobile : l'option « Vue confortable » affiche DEUX colonnes,
   tandis que « Vue compacte » affiche UNE colonne, comme demandé. */
@media (max-width: 700px) {
  body:not(.compact-view) #productGrid.product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px !important;
    align-items: stretch;
  }
  body.compact-view #productGrid.product-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 15px !important;
  }
  #productGrid .product-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  #productGrid .product-visual {
    box-sizing: border-box !important;
    aspect-ratio: 4 / 3 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
  }
  #productGrid .product-visual > img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  #productGrid .product-body {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0 !important;
    padding: 11px 10px 12px !important;
    flex: 1 1 auto;
  }
  #productGrid .product-name {
    font-size: clamp(13px, 3.6vw, 17px) !important;
    line-height: 1.21 !important;
    overflow-wrap: anywhere;
  }
  #productGrid .product-brand { font-size: 10px !important; line-height: 1.25 !important; }
  #productGrid .product-detail { font-size: 10px !important; line-height: 1.33 !important; overflow-wrap: anywhere; min-height: 0 !important; }
  #productGrid .product-footer { gap: 5px !important; margin: 8px 0 9px !important; }
  #productGrid .product-size, #productGrid .product-quantity { font-size: 9px !important; padding: 5px 6px !important; }
  #productGrid .interest-action { width: 100%; min-height: 38px !important; padding: 7px 6px !important; font-size: 12px !important; }
  /* Cœur proprement centré et éloigné des bords, quelle que soit la vue. */
  #productGrid .product-visual .quick-heart {
    box-sizing: border-box !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 0 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-family: Arial, sans-serif !important;
    font-size: 25px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    color: #fff0f4 !important;
    background: rgba(65, 34, 52, .72) !important;
    border: 1px solid rgba(255, 255, 255, .20) !important;
    box-shadow: 0 2px 9px rgba(40, 15, 25, .19) !important;
    z-index: 7 !important;
    -webkit-tap-highlight-color: transparent;
  }
  #productGrid .product-visual .quick-heart.is-selected {
    background: #963b59 !important;
    color: #fff !important;
  }
  #productGrid .product-visual .quick-heart:focus-visible { outline: 2px solid white !important; outline-offset: 2px !important; }
  /* Pas d'ancienne grille horizontale sur les téléphones très étroits. */
  body.compact-view #productGrid .product-body { padding: 14px 15px 15px !important; }
  body.compact-view #productGrid .product-name { font-size: 20px !important; }
  body.compact-view #productGrid .product-detail { font-size: 12px !important; }
  body.compact-view #productGrid .interest-action { font-size: 14px !important; min-height: 43px !important; }
  .view-button { touch-action: manipulation; }
}
