/* Catalogues — écrans Figma « 02.1 - Page Catalogue Solutions » (1440), « … - Mobile » (375),
   « Pop-In Filtres » (770) et « Pop-In Filtres - Mobile » (375) */

.page-catalogue main { padding-bottom: 64px; }
/* La réassurance ne colle plus à la dernière rangée de produits. */
.page-catalogue .reassurance { margin-top: 72px; }

/* ——— Actions : filtres et comparateur ——— */
.catalogue__actions { display: flex; justify-content: flex-end; gap: 24px; margin-top: 44px; }
.catalogue__filtres { gap: 10px; padding: 15px 29px; }
.catalogue__filtres .icone { width: 20px; height: 20px; }

/* ——— Catégories et grille de produits ——— */
.categorie { margin-top: 32px; }
.categorie + .categorie { margin-top: 64px; }
.categorie__titre { min-height: 50px; }
.grille-produits { display: grid; grid-template-columns: repeat(3, minmax(0, 411px)); justify-content: space-between; gap: 24px 16px; margin-top: 24px; }
.grille-produits .carte-produit__specs,
.grille-produits .carte-produit__desc { color: var(--noir); }
@media (min-width: 1280px) {
  .grille-produits .carte-produit { min-height: 620px; }
}
@media (max-width: 1279px) and (min-width: 768px) {
  .grille-produits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) and (min-width: 768px) {
  .grille-produits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-produits .carte-produit__nom { font-size: 24px; }
}

/* ——— Pop-in filtres : volet à gauche (bureau), plein écran (mobile) ——— */
.filtres {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(770px, 100%);
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #ECECEC;
  color: var(--noir);
  overflow: hidden;
}
.filtres::backdrop { background: rgba(35, 35, 35, .5); }
.filtres[open] { animation: filtres-volet .28s cubic-bezier(.4, 0, .2, 1); }
.filtres[open]::backdrop { animation: filtres-voile .28s ease; }
@keyframes filtres-volet { from { transform: translateX(-100%); } }
@keyframes filtres-voile { from { opacity: 0; } }
.filtres__formulaire { display: flex; flex-direction: column; height: 100%; }
.filtres__corps { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.filtres__entete { padding: 62px 24px 0 80px; }
.filtres__titre { min-height: 56px; font: 600 40px/48px var(--police-titre); color: var(--titre); }
.filtres__fermer { position: absolute; top: 19px; right: 19px; display: grid; place-items: center; width: 32px; height: 32px; }
.filtres__fermer .icone { width: 22px; height: 22px; }

.filtres__groupe { min-inline-size: 0; margin: 0; padding: 31px 24px 40px 80px; border: 0; border-top: 1px solid rgba(35, 35, 35, .2); }
.filtres__groupe--tri { padding-top: 14px; padding-bottom: 26px; border-top: 0; }
/* Légende flottante : elle reste dans la boîte du groupe au lieu de chevaucher la bordure */
.filtres__legende { float: left; width: 100%; margin-bottom: 25px; padding: 0; font: 600 24px/28.8px var(--police-titre); color: var(--titre); }
.filtres__groupe--tri .filtres__legende { margin-bottom: 7px; }
.filtres__options, .filtres__puces { clear: both; }

.filtres__options { display: flex; flex-direction: column; gap: 8px; }
.filtres__option { position: relative; display: flex; align-items: center; gap: 10px; font: 400 18px/26px var(--police-texte); color: #000; cursor: pointer; }
.filtres__option input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.filtres__case { width: 24px; height: 24px; }
.filtres__option input:checked ~ .filtres__case--vide,
.filtres__option input:not(:checked) ~ .filtres__case--cochee { display: none; }
.filtres__option input:focus-visible ~ .filtres__case { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }

.filtres__puces { display: flex; flex-wrap: wrap; gap: 14px 20px; max-width: 530px; }
.puce-filtre { position: relative; display: inline-flex; cursor: pointer; }
.puce-filtre input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.puce-filtre span {
  padding: 11px 19px;
  border: 1px solid rgba(73, 71, 66, .5);
  border-radius: 10px;
  background: var(--blanc);
  font: 600 16px/20px var(--police-titre);
  color: var(--titre);
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.puce-filtre:hover span { border-color: var(--titre); }
.puce-filtre input:checked + span { background: var(--corail); border-color: var(--corail); color: var(--blanc); }
.puce-filtre input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

.filtres__pied { padding: 32px 24px 60px 80px; border-top: 1px solid rgba(0, 0, 0, .2); }
.filtres__valider { padding: 18px 40px; font: 400 24px/30.2px var(--police-texte); }

@media (max-width: 1023px) and (min-width: 768px) {
  .filtres__entete, .filtres__groupe { padding-left: 48px; }
  .filtres__pied { padding: 24px 24px 32px 48px; }
}

/* ——— Mobile ——— */
@media (max-width: 767px) {
  .page-catalogue main { padding-bottom: 0; }
  .page-catalogue .reassurance { margin-top: 40px; }

  .catalogue__actions { justify-content: center; gap: 28px; margin-top: 0; padding-block: 16px; }
  .catalogue__filtres { width: 116px; gap: 5px; padding: 7px 0; }
  .catalogue__comparer { padding: 10px 16px; border-radius: 100px; font-size: 13px; line-height: 16.4px; }

  .categorie, .categorie + .categorie { margin-top: 0; padding-block: 16px 24px; }
  .categorie__titre { min-height: 0; font-size: 32px; line-height: 38px; }
  .grille-produits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }

  .filtres { width: 100%; }
  .filtres[open] { animation-name: filtres-montee; }
  @keyframes filtres-montee { from { transform: translateY(100%); } }
  .filtres__corps { padding: 24px 16px; }
  .filtres__entete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding: 0; }
  .filtres__titre { min-height: 0; font-size: 32px; line-height: 38.4px; }
  .filtres__fermer { position: static; margin-right: -5px; }
  .filtres__groupe, .filtres__groupe--tri { padding: 23px 0 24px; border-top: 1px solid rgba(35, 35, 35, .1); }
  .filtres__groupe:last-child { padding-bottom: 0; }
  .filtres__legende { margin-bottom: 16px; font-size: 20px; font-weight: 700; line-height: 24px; }
  .filtres__groupe--tri .filtres__legende { margin-bottom: 16px; }
  .filtres__options { gap: 4px; }
  .filtres__option { gap: 12px; padding-block: 6px; font-size: 16px; line-height: 24px; color: var(--noir); }
  .filtres__puces { gap: 12px; max-width: none; }
  .puce-filtre span { padding: 9px 15px; font-size: 14px; line-height: 18px; color: var(--marron); }
  .filtres__pied { padding: 16px 16px 12px; border-top-color: rgba(35, 35, 35, .1); background: var(--fond-mobile); }
  .filtres__valider { width: 100%; padding: 14px 40px; font-size: 16px; line-height: 24px; }
}
@media (max-width: 359px) {
  .catalogue__actions { gap: 12px; }
}

/* ——— Bouton « En savoir plus » des cartes de catégorie ——— */
/* La carte est déjà une colonne : la zone texte prend la place restante (flex),
   surtout pas 100 % de hauteur, ce qui étirait la carte et rognait le visuel. */
.carte-produit__texte { flex: 1; }
.carte-produit__cta { align-self: flex-start; margin-top: auto; padding: 12px 28px; }
.carte-produit:hover .carte-produit__cta { background: var(--corail-survol); }
@media (max-width: 767px) {
  .carte-produit__cta { align-self: stretch; justify-content: center; margin-top: 12px; padding: 12px 20px; }
}
