/*
 * MDE Classic 0.1.5 — couche graphique de test
 * Première étape : pages catégorie uniquement.
 * Aucun template, JS, header ou footer n'est modifié.
 */

body#category {
  --mde-blue: #0B4F8A;
  --mde-blue-text: #1B537E;
  --mde-blue-dark: #073967;
  --mde-yellow: #FFD25F;
  --mde-cream: #FFFEF1;
  --mde-pale-blue: #E5EFEF;
  --mde-champagne: #FFEBB9;
  --mde-ink: #2F3D49;
  --mde-muted: #667684;
  --mde-radius: 12px;
  color: var(--mde-ink);
  font-family: Arial, Helvetica, sans-serif;
}

/* Fond de la zone boutique : moins froid que le gris Classic. */
body#category #wrapper {
  background: #f7f8f5;
}

body#category #wrapper .container {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

/* Fil d'Ariane discret. */
body#category .breadcrumb {
  margin-bottom: 1.1rem;
  color: var(--mde-muted);
  font-size: .9rem;
}
body#category .breadcrumb a {
  color: var(--mde-blue-text);
}
body#category .breadcrumb a:hover {
  color: var(--mde-blue-dark);
}

/* Colonne de gauche : le champagne MDE doit être réellement visible. */
body#category #left-column .block-categories,
body#category #left-column #search_filters {
  padding: 1.15rem;
  border: 1px solid rgba(11, 79, 138, .28);
  border-radius: var(--mde-radius);
  background: var(--mde-champagne);
  box-shadow: 0 7px 18px rgba(47, 61, 73, .05);
}

/* Les facettes restent structurées, mais sans effet « boîtes dans la boîte ». */
body#category #left-column #search_filters .facet {
  margin: 0;
  padding: .8rem 0;
  border: 0;
  border-bottom: 1px solid rgba(11, 79, 138, .18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body#category #left-column #search_filters .facet:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body#category #left-column .block-categories a,
body#category #left-column #search_filters a,
body#category #left-column .facet-label a {
  color: var(--mde-ink);
}
body#category #left-column .block-categories a:hover,
body#category #left-column #search_filters a:hover,
body#category #left-column .facet-label a:hover {
  color: var(--mde-blue);
}

body#category #left-column .block-categories .h6,
body#category #left-column #search_filters > .h6 {
  color: var(--mde-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
body#category #left-column #search_filters .facet-title {
  color: var(--mde-blue-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

/* En-tête de catégorie. */
body#category .block-category {
  min-height: 0;
  margin-bottom: 1.35rem;
  padding: 1.55rem 1.65rem;
  border: 2px solid var(--mde-blue);
  border-radius: var(--mde-radius);
  background: linear-gradient(135deg, var(--mde-cream) 0%, var(--mde-pale-blue) 100%);
  box-shadow: none;
}

body#category .block-category h1,
body#category .block-category .h1 {
  margin-bottom: .6rem;
  color: var(--mde-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: 400;
  line-height: 1.05;
  text-transform: none;
}

body#category .block-category .category-cover img {
  border-radius: 10px;
}

body#category .block-category #category-description,
body#category .block-category #category-description p {
  color: var(--mde-ink);
  line-height: 1.55;
}

/* Sous-catégories : reprise du langage des cartes MDE. */
body#category #subcategories {
  margin-bottom: 1.35rem;
  padding: 1.35rem;
  border: 1px solid rgba(11, 79, 138, .20);
  border-radius: var(--mde-radius);
  background: var(--mde-pale-blue);
}

body#category #subcategories .subcategory-heading,
body#category #subcategories .h1,
body#category #subcategories .h2,
body#category #subcategories h2 {
  color: var(--mde-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-transform: none;
}

body#category #subcategories ul li .subcategory-image a {
  border: 1px solid rgba(11, 79, 138, .16);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

body#category #subcategories ul li .subcategory-name {
  color: var(--mde-blue);
  font-weight: 700;
}
body#category #subcategories ul li .subcategory-name:hover {
  color: var(--mde-blue-dark);
}

/* Barre de résultats / tri. */
body#category .products-selection {
  margin-bottom: 1.15rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #fff;
}
body#category .products-sort-order .select-title {
  border: 1px solid rgba(11, 79, 138, .25);
  border-radius: 7px;
  color: var(--mde-blue-dark);
  background: #fff;
  box-shadow: none;
}

/* Cartes produits : plus douces, sans toucher à leur structure. */
body#category .products .product-miniature,
body#category .product-miniature {
  margin-bottom: 1.25rem;
}
body#category .product-miniature .thumbnail-container {
  border: 1px solid rgba(11, 79, 138, .14);
  border-radius: var(--mde-radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(47, 61, 73, .07);
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}
body#category .product-miniature .thumbnail-container:hover {
  border-color: rgba(11, 79, 138, .34);
  box-shadow: 0 12px 28px rgba(47, 61, 73, .12);
}
body#category .product-miniature .product-description {
  background: var(--mde-cream);
}
body#category .product-miniature .product-title a {
  color: var(--mde-blue-dark);
  font-weight: 600;
}
body#category .product-miniature .product-title a:hover {
  color: var(--mde-blue);
}
body#category .product-miniature .product-price-and-shipping,
body#category .product-miniature .price {
  color: var(--mde-blue-dark);
  font-weight: 700;
}
body#category .product-miniature .discount-percentage,
body#category .product-miniature .discount-amount,
body#category .product-miniature .product-flag.discount {
  background: var(--mde-yellow);
  color: var(--mde-blue-dark);
}

/* Liens et contrôles propres à la catégorie. */
body#category a {
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
body#category .pagination .current a,
body#category .pagination a:hover {
  color: var(--mde-blue);
}

/* Responsive : on évite les effets décoratifs qui prennent trop de place. */
@media (max-width: 767px) {
  body#category #wrapper .container {
    padding-top: .75rem;
  }
  body#category .block-category {
    padding: 1.15rem;
    border-width: 1px;
  }
  body#category #subcategories {
    padding: 1rem;
  }
  body#category .products-selection {
    padding: .5rem .65rem;
  }
  body#category .product-miniature .thumbnail-container:hover {
    transform: none;
  }
}

/* =========================================================
   MDE — Listes spéciales du footer
   Promotions / Nouveaux produits / Meilleures ventes
   03/10/2026
   Habillage graphique uniquement : aucune logique PrestaShop,
   aucun filtre, tri, pagination ou favori n'est modifié.
   ========================================================= */

body:is(#prices-drop, #new-products, #best-sales) {
  --mde-blue: #1B537E;
  --mde-blue-dark: #123D60;
  --mde-yellow: #FFD25F;
  --mde-cream: #FFFDF6;
  --mde-pale-blue: #E5EFEF;
  --mde-pink: #F5E2DC;
  --mde-ink: #2F3D49;
  --mde-muted: #667684;
  --mde-line: rgba(27, 83, 126, .18);
  --mde-radius: 12px;

  color: var(--mde-ink);
  font-family: Arial, Helvetica, sans-serif;
}

/* Fond général */
body:is(#prices-drop, #new-products, #best-sales) #wrapper {
  background: #f7f8f5;
}

body:is(#prices-drop, #new-products, #best-sales) #wrapper > .container {
  padding-top: 1.1rem;
  padding-bottom: 2rem;
}

/* Fil d'Ariane */
body:is(#prices-drop, #new-products, #best-sales) .breadcrumb {
  margin-bottom: 1rem;
  color: var(--mde-muted);
  font-size: .9rem;
}

body:is(#prices-drop, #new-products, #best-sales) .breadcrumb a {
  color: var(--mde-blue);
}

/* Titre de page */
body:is(#prices-drop, #new-products, #best-sales) #main h1,
body:is(#prices-drop, #new-products, #best-sales) #main .h1 {
  margin-bottom: .55rem;
  color: var(--mde-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
  text-transform: none;
}

/* Compteur de produits */
body:is(#prices-drop, #new-products, #best-sales) #js-product-list-top p,
body:is(#prices-drop, #new-products, #best-sales) .total-products p {
  color: var(--mde-muted);
}

/* Barre de tri */
body:is(#prices-drop, #new-products, #best-sales) .products-selection {
  margin-bottom: 1.15rem;
  padding: .65rem .8rem;
  border-radius: 10px;
  background: transparent;
}

body:is(#prices-drop, #new-products, #best-sales) .products-sort-order .select-title {
  border: 1px solid rgba(27, 83, 126, .26);
  border-radius: 7px;
  background: #fff;
  color: var(--mde-blue-dark);
  box-shadow: none;
}

/* Colonne de gauche : on conserve toutes les fonctions,
   mais on l'intègre à la charte MDE. */
body:is(#prices-drop, #new-products, #best-sales) #left-column .block-categories,
body:is(#prices-drop, #new-products, #best-sales) #left-column #search_filters {
  margin-bottom: 1rem;
  padding: 1.15rem;
  border: 3px solid var(--mde-yellow);
  border-radius: var(--mde-radius);
  background: var(--mde-cream);
  box-shadow: none;
}

body:is(#prices-drop, #new-products, #best-sales) #left-column .block-categories .h6,
body:is(#prices-drop, #new-products, #best-sales) #left-column #search_filters > .h6 {
  color: var(--mde-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

body:is(#prices-drop, #new-products, #best-sales) #left-column #search_filters .facet {
  border-bottom-color: var(--mde-line);
}

body:is(#prices-drop, #new-products, #best-sales) #left-column #search_filters .facet-title {
  color: var(--mde-blue-dark);
}

body:is(#prices-drop, #new-products, #best-sales) #left-column a {
  color: var(--mde-ink);
}

body:is(#prices-drop, #new-products, #best-sales) #left-column a:hover {
  color: var(--mde-blue);
}

/* Cartes produits : reprise directe du langage MDE validé */
body:is(#prices-drop, #new-products, #best-sales) .product-miniature {
  margin-bottom: 1.25rem;
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .thumbnail-container {
  border: 2px solid var(--mde-yellow);
  border-radius: var(--mde-radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(47, 61, 73, .06);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .thumbnail-container:hover {
  box-shadow: 0 12px 28px rgba(47, 61, 73, .11);
  transform: translateY(-1px);
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .product-description {
  background: var(--mde-cream);
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .product-title a {
  color: var(--mde-blue-dark);
  font-weight: 700;
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .product-title a:hover {
  color: var(--mde-blue);
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .product-price-and-shipping,
body:is(#prices-drop, #new-products, #best-sales) .product-miniature .price {
  color: var(--mde-blue-dark);
  font-weight: 700;
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .regular-price {
  color: var(--mde-muted);
  opacity: .85;
}

/* Promotions / nouveau : badges en jaune MDE */
body:is(#prices-drop, #new-products, #best-sales) .product-miniature .discount-percentage,
body:is(#prices-drop, #new-products, #best-sales) .product-miniature .discount-amount,
body:is(#prices-drop, #new-products, #best-sales) .product-miniature .product-flag.discount,
body:is(#prices-drop, #new-products, #best-sales) .product-miniature .product-flag.new {
  background: var(--mde-yellow) !important;
  color: var(--mde-blue-dark) !important;
}

/* État vide : carte simple et chaleureuse */
body:is(#prices-drop, #new-products, #best-sales) #js-product-list .alert,
body:is(#prices-drop, #new-products, #best-sales) .products .alert,
body:is(#prices-drop, #new-products, #best-sales) .product-list-empty {
  padding: 1.25rem 1.4rem;
  border: 3px solid var(--mde-yellow);
  border-radius: var(--mde-radius);
  background: var(--mde-cream);
  color: var(--mde-ink);
  box-shadow: none;
}

body:is(#prices-drop, #new-products, #best-sales) #js-product-list .alert strong,
body:is(#prices-drop, #new-products, #best-sales) .products .alert strong,
body:is(#prices-drop, #new-products, #best-sales) .product-list-empty strong {
  color: var(--mde-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

/* Pagination */
body:is(#prices-drop, #new-products, #best-sales) .pagination .current a,
body:is(#prices-drop, #new-products, #best-sales) .pagination a:hover {
  color: var(--mde-blue);
}

/* Mobile */
@media (max-width: 767px) {
  body:is(#prices-drop, #new-products, #best-sales) #wrapper > .container {
    padding-top: .75rem;
  }

  body:is(#prices-drop, #new-products, #best-sales) #left-column .block-categories,
  body:is(#prices-drop, #new-products, #best-sales) #left-column #search_filters {
    border-width: 2px;
  }

  body:is(#prices-drop, #new-products, #best-sales) .products-selection {
    padding: .5rem 0;
  }

  body:is(#prices-drop, #new-products, #best-sales) .product-miniature .thumbnail-container:hover {
    transform: none;
  }
}


/* =========================================================
   MDE — Listes footer : hiérarchie finale
   03/10/2026
   ========================================================= */

body:is(#prices-drop, #new-products, #best-sales) .products-selection,
body:is(#prices-drop, #new-products, #best-sales) #js-product-list-top {
  padding: .7rem .9rem;
  border: 1px solid rgba(27, 83, 126, .28);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

body:is(#prices-drop, #new-products, #best-sales) .product-miniature .thumbnail-container {
  border: 3px solid var(--mde-yellow) !important;
}

body:is(#prices-drop, #new-products, #best-sales) #js-product-list .alert,
body:is(#prices-drop, #new-products, #best-sales) .products .alert,
body:is(#prices-drop, #new-products, #best-sales) .product-list-empty {
  border: 1px solid rgba(27, 83, 126, .28) !important;
  border-radius: 10px;
  background: #fff !important;
  box-shadow: none;
}

body:is(#prices-drop, #new-products, #best-sales) #js-product-list .alert strong,
body:is(#prices-drop, #new-products, #best-sales) .products .alert strong,
body:is(#prices-drop, #new-products, #best-sales) .product-list-empty strong {
  color: var(--mde-blue);
}

@media (max-width: 767px) {
  body:is(#prices-drop, #new-products, #best-sales) .products-selection,
  body:is(#prices-drop, #new-products, #best-sales) #js-product-list-top {
    padding: .55rem .65rem;
  }

  body:is(#prices-drop, #new-products, #best-sales) .product-miniature .thumbnail-container {
    border-width: 2px !important;
  }
}

/* =========================================================
   MDE — Nouveaux produits : suppression de la barre vide
   03/10/2026
   Le wrapper #js-product-list-top existe même sans produit :
   on ne l'habille plus. Seule la vraie barre .products-selection
   reçoit le cadre bleu.
   ========================================================= */

body:is(#prices-drop, #new-products, #best-sales) #js-product-list-top {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* La vraie barre résultats / tri reste bien encadrée quand elle existe. */
body:is(#prices-drop, #new-products, #best-sales) .products-selection {
  padding: .7rem .9rem;
  border: 1px solid rgba(27, 83, 126, .28);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

/* État vide "Nouveaux produits" : carte sobre et institutionnelle. */
body#new-products #js-product-list .alert,
body#new-products #js-product-list .product-list-empty,
body#new-products #js-product-list .products > .alert {
  max-width: 760px;
  margin: .75rem auto 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(27, 83, 126, .28) !important;
  border-radius: 10px;
  background: #fff !important;
  color: var(--mde-ink);
  box-shadow: none;
}

/* =========================================================
   MDE — Nouveaux produits : carte vide alignée sur la barre Promotions
   03/10/2026
   ========================================================= */

/* Aucun faux bandeau au-dessus lorsqu'il n'y a pas de produits. */
body#new-products #js-product-list-top {
  display: none !important;
}

/* Le message "Aucun produit..." devient la vraie carte de la page :
   même logique visuelle que la barre Promotions. */
body#new-products #js-product-list .alert,
body#new-products #js-product-list .product-list-empty,
body#new-products #js-product-list .products > .alert {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 1rem 1.2rem !important;
  border: 1px solid rgba(27, 83, 126, .28) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

/* Titre de l'état vide */
body#new-products #js-product-list .alert strong,
body#new-products #js-product-list .product-list-empty strong,
body#new-products #js-product-list .products > .alert strong {
  color: var(--mde-blue-dark) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

/* Le champ de recherche reste plus discret dans la carte. */
body#new-products #js-product-list .alert .search-widget,
body#new-products #js-product-list .product-list-empty .search-widget {
  margin-top: .85rem;
}

/* =========================================================
   MDE — Nouveaux produits : ciblage réel du bloc vide
   03/10/2026
   Classic utilise ici : section#content.page-content.page-not-found
   ========================================================= */

/* Le conteneur technique vide ne doit jamais former une barre. */
body#new-products #js-product-list-top {
  display: none !important;
}

/* Le vrai bloc "Aucun produit disponible..." */
body#new-products #js-product-list > section#content.page-content.page-not-found,
body#new-products #js-product-list .page-content.page-not-found {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 1rem 1.2rem !important;
  border: 1px solid rgba(27, 83, 126, .28) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

/* Même ton que la barre Promotions : lisible, mais secondaire. */
body#new-products #js-product-list .page-not-found h4 {
  margin: 0 0 .55rem !important;
  color: var(--mde-blue-dark) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

body#new-products #js-product-list .page-not-found p {
  margin-bottom: .8rem !important;
  color: var(--mde-muted) !important;
}

/* Recherche : conservée, simplement mieux intégrée. */
body#new-products #js-product-list .page-not-found #search_widget,
body#new-products #js-product-list .page-not-found .search-widget {
  margin: .75rem 0 0 auto !important;
}


/* =========================================================
   MDE — Harmonisation des vraies catégories avec les listings footer
   03/10/2026
   On conserve l'introduction et les sous-catégories déjà validées.
   On aligne uniquement les éléments communs : colonne gauche,
   barre résultats/tri et cartes produits.
   ========================================================= */

/* Colonne gauche : crème + cadre jaune 3 px, comme Promotions */
body#category #left-column .block-categories,
body#category #left-column #search_filters {
  margin-bottom: 1rem;
  padding: 1.15rem;
  border: 3px solid var(--mde-yellow) !important;
  border-radius: var(--mde-radius);
  background: var(--mde-cream) !important;
  box-shadow: none !important;
}

body#category #left-column .block-categories .h6,
body#category #left-column #search_filters > .h6 {
  color: var(--mde-blue-text, var(--mde-blue));
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

body#category #left-column #search_filters .facet {
  border-bottom-color: rgba(27, 83, 126, .18);
}

/* Barre résultats / tri : blanc + contour bleu discret 1 px */
body#category .products-selection {
  margin-bottom: 1.15rem;
  padding: .7rem .9rem !important;
  border: 1px solid rgba(27, 83, 126, .28) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}

body#category .products-sort-order .select-title {
  border: 1px solid rgba(27, 83, 126, .28);
  border-radius: 7px;
  background: #fff;
  color: var(--mde-blue-dark);
  box-shadow: none;
}

/* Cartes produits : jaune MDE 3 px, priorité visuelle aux produits */
body#category .product-miniature .thumbnail-container {
  border: 3px solid var(--mde-yellow) !important;
  border-radius: var(--mde-radius);
  overflow: hidden;
}

/* Badges : jaune MDE */
body#category .product-miniature .discount-percentage,
body#category .product-miniature .discount-amount,
body#category .product-miniature .product-flag.discount,
body#category .product-miniature .product-flag.new {
  background: var(--mde-yellow) !important;
  color: var(--mde-blue-dark) !important;
}

/* Mobile : conserver la hiérarchie sans alourdir */
@media (max-width: 767px) {
  body#category #left-column .block-categories,
  body#category #left-column #search_filters {
    border-width: 2px !important;
  }

  body#category .products-selection {
    padding: .55rem .65rem !important;
  }

  body#category .product-miniature .thumbnail-container {
    border-width: 2px !important;
  }
}
