/* =========================
   THEME + FONT
========================= */

:root{
  --bg-base: #FDF1DE;
  --ink: #121826;

  --dropdown-bg: rgba(255,255,255,0.94);
  --dropdown-border: rgba(17,24,39,0.12);
  --dropdown-shadow: 0 18px 40px rgba(17,24,39,0.14);

  --accent-blue: #304ffe;  
}

@font-face{
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html, body{
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-base) !important;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

button, input, select, textarea{
  font: inherit;
}

body{ font-weight: 420; }

h1, h2{
  font-weight: 650;
  margin: 0;
}

/* content wrapper */
.page{
  position: relative;
  z-index: 1;
  background: transparent;
}

/* main padding */
main{ padding: 2rem; }

/* =========================
   HERO SLOGAN
========================= */

.hero-slogan--center{
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 1.2rem 0 0.8rem;
}

.hero-slogan__title{
  margin: 0;
  max-width: min(1100px, 92vw);
  font-weight: 420;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  color: #121826;
}

.hero-slogan__et{
  display: inline-block;
  font-weight: 420;
  font-size: 0.70em;
  margin: 0 .18em;
  opacity: .95;
}

.hero-slogan__bat{
  display: inline-block;
  font-weight: 420;
  font-size: 0.70em;
  margin: 0 .18em;
  opacity: .95;
  padding-left: 3.2em;
}

.hero-slogan__eco{
  display: inline-block;
  font-weight: 420;
  font-size: 0.8em;
  margin: 0 .18em;
  opacity: .95;
}

.hero-slogan__comma{ margin-left: .06em; }

/* surlignage */
.hl{
  position: relative;
  display: inline-block;
  padding: 0 .06em;
}
.hl--bold{ font-weight: 820; }

.hl::before{
  content:"";
  position:absolute;
  left: -0.02em;
  right: -0.02em;
  bottom: 0.10em;
  height: 0.32em;
  background: #ffe84a;
  z-index: 0;
  transform: scaleX(0);
  transform-origin: left;
  animation: hl-sweep 1.05s ease forwards;
  border-radius: 2px;
}

.hl > span{
  position: relative;
  z-index: 1;
}

@keyframes hl-sweep{ to{ transform: scaleX(1); } }

.hero-slogan__title .hl:nth-of-type(1)::before{ animation-delay: .10s; }
.hero-slogan__title .hl:nth-of-type(2)::before{ animation-delay: .25s; }
.hero-slogan__title .hl:nth-of-type(3)::before{ animation-delay: .40s; }

@media (prefers-reduced-motion: reduce){
  .hl::before{ animation: none; transform: scaleX(1); }
}

/* =========================
   SEARCH INPUT
========================= */

#search{
  font-family: inherit;
  font-size: inherit;
  width: min(288px, 100%);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.18);
  background: rgba(255,255,255,0.85);
  outline: none;
}

#search:focus{
  border-color: rgba(95,255,189,0.85);
  box-shadow: 0 0 0 4px rgba(95,255,189,0.22);
}

/* =========================
   PRODUCT GRID (4 columns max)
========================= */

.product-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3rem 1.75rem;
  margin: 0;                 /* IMPORTANT: pas de marge parasite */
  padding: 0;                /* IMPORTANT: pas de padding parasite */
}

@media (max-width: 1200px){
  .product-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px){
  .product-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .product-grid{ grid-template-columns: 1fr; }
}

/* =========================
   PRODUCT CARD (catalog)
========================= */

.product-card{
  position: relative;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 10px 30px rgba(17,24,39,0.10);
}

.product-card__top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.product-card__brand{
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(18,24,38,0.85);
}

.product-card__brand-logo{
  width: 92px;
  height: 32px;
  object-fit: contain;
  object-position: right center;
  display: block;
  background: #fff;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid rgba(17,24,39,0.08);
}

.product-card__image{
  text-align: center;
  margin: 0.75rem 0 1rem;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__image img{
  max-width: 210px;
  max-height: 190px;
  object-fit: contain;
  pointer-events: none;
}

.product-card__image img.is-small{
  transform: scale(1.6);
  transform-origin: center;
}

.product-card__body{ flex: 1; }

.product-card__title{
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #131824;
}

.product-card__refs{
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.product-card__ref{
  display: flex;
  gap: 0.25rem;
}

.product-card__ref .label{ color: #666; }
.product-card__ref .value{ font-weight: 500; }

.product-card__excerpt{
  white-space: pre-line;
  font-size: 0.85rem;
  color: #2b2f36;
  margin: 0.5rem 0 0;
  line-height: 1.35;
  overflow: visible;
  max-height: none;
}

/* bouton Lire plus */
.read-more{
  font-family: inherit;
  display: inline-block;
  margin-top: 0.4rem;
  border: 0;
  background: transparent;
  color: rgba(103, 201, 135);
  cursor: pointer;
  padding: 0;
  font-weight: 650;
  font-size: 0.82rem;
}
.read-more:hover{ text-decoration: underline; }

/* Desktop par défaut : la carte n'est PAS cliquable */
.product-card{ cursor: default; }

/* on désactive tout "lien étiré" par défaut (desktop) */
.product-card__link::after{
  content: none;
}

/* Mobile/tactile : carte cliquable + bouton caché */
@media (hover: none) and (pointer: coarse){

  .product-card{ cursor: pointer; }

  /* cacher le bouton */
  .product-card__footer{ display: none; }

  /* activer le lien étiré (toute la carte cliquable) */
  .product-card__link{
    position: static; /* ok */
  }
  .product-card__link::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius: inherit;
    z-index: 3;
  }

  /* garder les éléments interactifs au-dessus */
  .read-more,
  .product-card__compare,
  .product-card__compare input{
    position: relative;
    z-index: 4;
  }
}

/* Mobile / tactile : éviter l'espace vide dans les cards */
@media (hover: none) and (pointer: coarse){
  .product-card{ min-height: auto; }
  .product-card__body{ flex: 0 0 auto; }
}

/* footer */
.btn-primary{
  position: relative;
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  background: rgba(103, 201, 135);
  color: #121826;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(17,24,39,0.10);
  box-shadow: 0 10px 24px rgba(17,24,39,0.10);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}

.btn-primary:hover{
  background: rgba(95,255,189,0.22);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(17,24,39,0.14);
}

.btn-primary:active{ transform: translateY(0); }

/* =========================
   GLOBAL BACKGROUND DECOR
========================= */

.bg-decor{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-decor::before{
  content:"";
  position:absolute;
  inset:-25%;
  background:
    radial-gradient(900px 700px at 20% 20%, rgba(39, 96, 255, 0.16), transparent 60%),
    radial-gradient(900px 700px at 85% 25%, rgba(95, 255, 189, 0.14), transparent 60%),
    radial-gradient(900px 700px at 75% 95%, rgba(255, 198, 74, 0.12), transparent 62%);
  filter: blur(8px);
}

.bg-blob{
  position:absolute;
  background-repeat:no-repeat;
  background-size:contain;
  opacity: 0.22;
}

.blob-snc{
  width: 2000px;
  height: 2000px;
  right: 0px;
  top: 80px;
  background-image: url("/assets/bg/snc-logo-light.webp");
  opacity: 0.8;
  mix-blend-mode: multiply;
}

.blob-flower{
  width: 560px;
  height: 560px;
  left: 0px;
  top: 700px;
  background-image: url("/assets/bg/flower.webp");
  opacity: 0.8;
}

.blob-dot{
  width: 260px;
  height: 260px;
  left: 1050px;
  bottom: 320px;
  background-image: url("/assets/bg/blue-dot.webp");
  opacity: 0.5;
}

@media (max-width: 900px){
  .blob-snc{ width: 560px; height: 560px; right: -220px; top: 120px; opacity: 0.32; }
}

/* =========================
   LAYOUT: SIDEBAR + GRID (STABLE)
========================= */

.catalog-layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  column-gap: 1.5rem;
  row-gap: .75rem;
  align-items:start;
  grid-template-areas:
    "filters list"
    "filters pagination";
}
.catalog-layout > .filters{ grid-area: filters; }
.catalog-layout > #liste-produits{ grid-area: list; }
.catalog-layout > #pagination{ grid-area: pagination; }

/* reset marges */
.toolbar{ margin: 0 0 1rem; }
.content{ min-width: 0; margin: 0; padding: 0; }
.results-bar{ margin: 0; }
.product-grid{ margin: 0; padding: 0; }

/* affectation des zones (mets les class/ids exacts) */
.catalog-layout > .filters{ 
  grid-area: filters; 
  grid-area: filters;
  grid-row: 1 / -1;
  align-self: start;
}

.catalog-layout > .toolbar{ grid-area: toolbar; margin: 0 0 1rem; }
.catalog-layout > #liste-produits{ grid-area: list; margin-top: 0; }
.catalog-layout > #pagination{ grid-area: pagination; margin: 1.25rem 0 0; margin-top: 2.5rem; }

/* 1) La sidebar (zone "filters") doit occuper TOUTES les lignes */
.catalog-layout [style], /* garde vide si tu n'as pas de style inline */
.catalog-layout > .filters,
.catalog-layout .filters {
  grid-row: 1 / -1;
  align-self: start;
}

/* 2) Fix: la dernière ligne doit aussi “inclure” filters */
.catalog-layout{
  grid-template-areas:
    "filters  toggle"
    "filters  results"
    "filters  list"
    "filters  pagination";
}

/* 3) Verrouille les rows pour éviter que la gauche recalibre la droite */
.catalog-layout{
  grid-template-rows: auto auto 1fr auto;
}

/* 4) Assure que la colonne droite reste collée en haut */
.catalog-layout > .display-toggle,
.catalog-layout > .results-bar{margin-bottom: 0;}
.catalog-layout > #liste-produits,
.catalog-layout > #pagination{
  align-self: start;
}

/* IMPORTANT si #liste-produits contient .product-grid */
#liste-produits .product-grid{ margin-top: 0 !important; }


/* responsive */
@media (max-width: 1100px){
  .catalog-layout{
    grid-template-columns: 1fr;
    grid-template-areas:
      "toggle"
      "results"
      "filters"
      "list"
      "pagination";
  }

  .filters{
    position: static;
    max-height: none;
  }
}

/* =========================
   DISPLAY TOGGLE (cartes / lignes)
========================= */

.display-toggle{
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  justify-self: start;
}

.display-toggle__label{
  font-weight: 740;
  font-size: .92rem;
}

.display-toggle__switch{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.18);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.display-toggle__track{
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(17,24,39,0.16);
  position: relative;
}

.display-toggle__thumb{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform .18s ease;
  box-shadow: 0 6px 18px rgba(17,24,39,0.12);
}

.display-toggle__switch[aria-checked="true"] .display-toggle__thumb{
  transform: translateX(20px);
}

/* =========================
   MODE "LIGNES"
========================= */

.product-grid.is-list{
  grid-template-columns: 1fr !important;
  gap: 2.5rem;
}

.product-grid.is-list .product-card{
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1rem;
  align-items: stretch;
}

.product-grid.is-list .product-card__image{
  height: 100%;
  margin: 0;
  min-height: 160px;
}

.product-grid.is-list .product-card__image img{
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-grid.is-list .product-card__top,
.product-grid.is-list .product-card__body,
.product-grid.is-list .product-card__compare,
.product-grid.is-list .product-card__footer{
  grid-column: 2;
}

@media (max-width: 600px){
  .product-grid.is-list .product-card{ grid-template-columns: 1fr; }
  .product-grid.is-list .product-card__top,
  .product-grid.is-list .product-card__body,
  .product-grid.is-list .product-card__compare,
  .product-grid.is-list .product-card__footer{ grid-column: 1; }
}

@media (max-width: 900px){
  .product-grid.is-list .product-card{ grid-template-columns: 1fr; }
  .product-grid.is-list .product-card__top,
  .product-grid.is-list .product-card__body,
  .product-grid.is-list .product-card__compare,
  .product-grid.is-list .product-card__footer{ grid-column: 1; }
}


/* =========================
   FILTERS SIDEBAR
========================= */

.filters{
  margin-top: 23px;
  position: sticky;
  top: 120px;
  z-index: 5;
  max-height: calc(100vh - 120px - 20px);
}

.filters__card{
  margin: 0; /* IMPORTANT */
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(17,24,39,0.10);
  padding: 1rem;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
}

.filters__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}

.filters__title{
  font-size: 1.05rem;
  font-weight: 740;
}

.filters__reset{
  border: 1px solid rgba(17,24,39,0.12);
  background: rgba(103, 201, 135);
  color: #121826;
  border-radius: 999px;
  padding: .35rem .6rem;
  font-weight: 650;
  cursor: pointer;
}
.filters__reset:hover{ background: rgba(95,255,189,0.22); }

.filters__search input{
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.14);
  background: rgba(255,255,255,0.88);
  padding: .55rem .75rem;
  outline: none;
}
.filters__search input:focus{
  border-color: rgba(48,79,254,0.55);
  box-shadow: 0 0 0 4px rgba(48,79,254,0.12);
}

.filters__panel{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.filters__panel::-webkit-scrollbar{ width: 10px; }
.filters__panel::-webkit-scrollbar-thumb{
  background: rgba(17,24,39,0.18);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.86);
}

/* Accordéons */
.filter-group{
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.72);
}

.filter-group__summary{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  list-style: none;
  cursor: pointer;
  padding: .65rem .75rem;
  font-weight: 720;
  user-select: none;
}
.filter-group__summary::-webkit-details-marker{ display:none; }

.filter-group__count{
  font-size: .78rem;
  opacity: .7;
  font-weight: 650;
}

.filter-group__body{
  padding: .55rem .65rem .75rem;
  border-top: 1px solid rgba(17,24,39,0.08);
}

.filter-chips{
  display:flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.filter-chip{
  border: 1px solid rgba(17,24,39,0.12);
  background: rgba(95,255,189,0.22);
  color: #121826;
  border-radius: 999px;
  padding: .35rem .55rem;
  font-size: .82rem;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

.filter-chip:hover{ background: rgba(103, 201, 135); }

.filter-chip.is-active{
  background: rgba(103, 201, 135);
  border-color: rgba(95,255,189,0.55);
  font-weight: 720;
}

.filter-chip__n{
  opacity: .65;
  margin-left: .35rem;
  font-weight: 650;
}

/* ===== FACETS ===== */

.facet-group{
  border-top: 1px solid rgba(17,24,39,0.10);
  padding-top: .5rem;
  margin-top: .5rem;
}
.facet-group:first-child{
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.facet-group__header{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  padding: .45rem .5rem;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.facet-group__header:hover{ background: rgba(17,24,39,0.06); }

.facet-group__title{
  display:flex;
  align-items:baseline;
  gap:.5rem;
  font-weight: 700;
  font-size: .9rem;
  color: #121826;
}

.facet-group__count{
  font-size: .78rem;
  font-weight: 650;
  opacity: .6;
}

.facet-group__chev{
  width: 22px;
  height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  border: 1px solid rgba(17,24,39,0.12);
  background: rgba(255,255,255,0.65);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.facet-group__chev::before{
  content:"";
  width: 14px;
  height: 14px;
  display:block;
  opacity: .8;
  background: no-repeat center / 14px 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23121826' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.facet-group__header:hover .facet-group__chev{
  background: rgba(17,24,39,0.06);
  border-color: rgba(17,24,39,0.18);
}

.facet-group__items{
  margin: .25rem 0 0;
  padding: .25rem 0 0.25rem .15rem;
  display: none;
}

.facet-group.is-open .facet-group__items{ display: block; }
.facet-group.is-open .facet-group__chev{ transform: rotate(180deg); }

.facet-item{
  display:flex;
  align-items:center;
  gap:.45rem;
  padding: .28rem .35rem;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.facet-item:hover{ background: rgba(17,24,39,0.06); }

.facet-item input{
  width: 14px;
  height: 14px;
}

.facet-item__label{
  font-size: .85rem;
  line-height: 1.15;
}

.facet-item__count{
  margin-left: auto;
  font-size: .78rem;
  opacity: .55;
}

/* =========================
   FILTERS ACTIVE PILLS
========================= */

.filters-active{
  margin-top: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.filters-active:empty{ display: none; }

.filters-active__pill{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: 999px;
  padding: .34rem .55rem;
  font-size: .82rem;
  font-weight: 700;
  background: rgba(95,255,189,0.22);
  border: 1px solid rgba(95,255,189,0.55);
  color: #121826;
}

.filters-active__pill button{
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(17,24,39,0.12);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.filters-active__pill button:hover{ background: rgba(17,24,39,0.06); }

/* =========================
   TOOLBAR: search + sort
========================= */

.sort{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

.toolbar{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.sort__label{
  font-weight: 740;
  font-size: .92rem;
}

.sort__select{
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.18);
  background: rgba(255,255,255,0.85);
  padding: .55rem .9rem;
  outline: none;
  cursor: pointer;
}

.sort__select:focus{
  border-color: rgba(95,255,189,0.75);
  box-shadow: 0 0 0 4px rgba(95,255,189,0.18);
}

@media (max-width: 700px){
  .sort{ width: 100%; justify-content: flex-end; }
}

/* =========================
   PAGINATION (centrée, numérotée)
   (cleanup: une seule règle #pagination)
========================= */

#pagination{
  width: 100%;
  display: block;
  text-align: center;
}

.pagination{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  width: auto;
  margin: 0 auto;
}

.pagination__btn{
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.14);
  background: rgba(255,255,255,0.80);
  padding: .42rem .7rem;
  font-weight: 700;
  font-size: .88rem;
  color: #121826;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.pagination__btn:hover{
  background: rgba(95,255,189,0.22);
  border-color: rgba(95,255,189,0.45);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17,24,39,0.10);
}

.pagination__btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination__btn.is-active{
  background: rgba(103, 201, 135);
  border-color: rgba(95,255,189,0.55);
}

.pagination__dots{
  opacity: .6;
  padding: 0 .2rem;
  font-weight: 800;
}

/* =========================
   COMPARE (catalog)
========================= */

.product-card__compare{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  margin-bottom: .75rem;
  font-size: .82rem;
  font-weight: 700;
  opacity: .9;
}
.product-card__compare input{ width: 16px; height: 16px; }

.product-card__compare input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: rgba(103, 201, 135);
}

.compare-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: .75rem 1rem;
  border-top: 1px solid rgba(17,24,39,0.12);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

body.has-compare-bar .page{
  padding-bottom: calc(var(--compare-bar-h, 86px) + env(safe-area-inset-bottom, 0px));
}

.compare-bar__inner{
  max-width: none;
  margin: 0;
  display:flex;
  align-items:center;
  justify-content: flex-start;
  gap: 1rem;
}

.compare-bar__left{
  display:flex;
  align-items:baseline;
  gap: .75rem;
  min-width: 0;
  flex: 0 0 auto;
}

.compare-bar__hint{
  opacity:.7;
  font-size:.82rem;
}

.compare-bar__actions{
  display:flex;
  gap: .5rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
  align-items: stretch;
}

.compare-bar__actions .btn{
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
}

.compare-items{
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: .9rem;      /* décale par rapport au texte “Comparaison …” */
  min-width: 0;
  overflow: hidden;
}

.compare-item{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.10);
  background: rgba(255,255,255,0.70);
  max-width: 240px;
}

.compare-item__img{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(17,24,39,0.08);
  display: block;
}

.compare-item__name{
  font-size: .82rem;
  font-weight: 650;
  color: #121826;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal */
.compare-modal{ position: fixed; inset: 0; z-index: 60; }
.compare-modal__backdrop{
  position:absolute; inset:0;
  background: rgba(17,24,39,0.35);
  backdrop-filter: blur(2px);
}
.compare-modal__panel{
  position: relative;
  width: min(1100px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  margin: 1rem auto;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(17,24,39,0.18);
  overflow: hidden;
  display:flex;
  flex-direction: column;
}
.compare-modal__head{
  position: sticky;
  top: 0;
  z-index: 10;

  padding: .9rem 1rem;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17,24,39,0.10);
}

.compare-modal__body{
  padding: 1rem;
  overflow: auto;
}

/* Table comparaison */
.compare-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .9rem;
}
.compare-table th, .compare-table td{
  padding: .65rem .7rem;
  border-bottom: 1px solid rgba(17,24,39,0.10);
  vertical-align: top;
}
.compare-table th{
  text-align:left;
  position: sticky;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  z-index: 1;
}
.compare-pill{
  display:inline-block;
  padding: .28rem .52rem;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.12);
  background: rgba(95,255,189,0.22);
  font-weight: 700;
  margin: .2rem .2rem 0 0;
}
.compare-missing{ opacity:.55; font-style: italic; }

/* =========================
   FILTRES : DESKTOP (>= 1101px)
========================= */
.filters{
  position: sticky;
  top: 120px;
  z-index: 5;
  max-height: calc(100vh - 120px - 20px);
}

.filters-mobilebar{ display: none; }
.filters-mobile-btn{ display: none; }
.filters__apply{ display: none; }
.filters-overlay{ display: none !important; }


/* =========================
   FILTRES : TABLET/MOBILE (<= 1100px)
   Drawer + bouton
========================= */
@media (max-width: 1100px){

  /* Barre du haut (bouton) */
  .filters-mobilebar{
    display: block;
    position: sticky;
    top: 0;
    z-index: 60;
    margin: 0 0 1rem;
  }

  .filters-mobile-btn{
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    border: 1px solid rgba(17,24,39,0.18);
    background: rgba(255,255,255,0.85);
    font-weight: 740;
    cursor: pointer;
  }

  .filters-mobile-btn__count{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 .4rem;
    border-radius: 999px;
    border: 1px solid rgba(17,24,39,0.12);
    background: rgba(95,255,189,0.22);
    font-size: .78rem;
    font-weight: 800;
  }

  /* On cache la sidebar dans le flux */
  .catalog-layout > .filters{
    display: none;
    position: static;
    max-height: none;
  }

  /* Overlay */
  .filters-overlay{
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(17,24,39,0.35);
    backdrop-filter: blur(2px);
  }

  /* Drawer ouvert */
  .catalog-layout > .filters.is-open{
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    padding: 1rem;
    z-index: 90;
  }

  .filters__card{
    width: min(560px, 100%);
    max-height: calc(100vh - 2rem);
  }

  /* bouton "Appliquer" visible en mobile/tablette */
  .filters__apply{
    display: inline-flex;
    border: 1px solid rgba(17,24,39,0.12);
    background: rgba(103, 201, 135);
    color: #121826;
    border-radius: 999px;
    padding: .35rem .6rem;
    font-weight: 750;
    cursor: pointer;
  }
}

/* hidden HTML */
[hidden]{ display:none !important; }

/* =========================
   COMPARE BAR — responsive
========================= */
.compare-bar{
  padding: .6rem .75rem;
}

/* base: tout peut rétrécir sans déborder */
.compare-bar__inner{
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.compare-bar__left{
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  flex: 1 1 auto;
}

.compare-bar__meta{
  display: flex;
  align-items: baseline;
  gap: .5rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.compare-bar__hint{
  max-width: 38vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* la liste d’items doit pouvoir scroller */
.compare-items{
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.compare-items::-webkit-scrollbar{ display:none; }

.compare-item{
  flex: 0 0 auto;
  max-width: 220px;
}

.compare-item__name{
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* actions: toujours visibles, compactes */
.compare-bar__actions{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
  margin-left: auto;
  max-width: none;      /* IMPORTANT: supprime le 160px */
  flex-direction: row;  /* IMPORTANT: pas en colonne */
}

/* boutons plus compacts sur mobile */
@media (max-width: 600px){
  .compare-bar__hint{ display:none; } /* optionnel mais efficace */
  .compare-item__name{ display:none; } /* garde juste l’icône/miniature */
  .compare-item{ padding: .25rem .35rem; }
  .compare-bar__actions .pagination__btn{
    padding: .35rem .55rem;
    font-size: .82rem;
  }
}

/* =========================
   RESPONSIVE: toolbar alignée à gauche
   + bouton filtres FIXE (pas flottant)
========================= */

/* 1) Sur mobile/tablette: "Trier par" à gauche (comme Affichage / Filtres) */
@media (max-width: 1100px){
  .toolbar{
    justify-content: flex-start;
    align-items: center;
  }

  /* le bloc sort ne pousse plus à droite */
  .sort{
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  /* optionnel: select prend toute la largeur */
  .sort__select{
    width: 100%;
    max-width: 360px; /* ajuste si tu veux */
  }
}

/* Si tu avais une règle @media (max-width:700px) qui force sort à droite,
   celle-ci la neutralise */
@media (max-width: 700px){
  .sort{ justify-content: flex-start; }
}


/* 2) Bouton "Filtres" FIXE (collé) et non flottant */

/* Par défaut: la barre est dans le flux (pas fixed, pas floating) */
.filters-mobilebar{
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  margin: 0 0 1rem;
}

/* Sur mobile/tablette, si tu l’avais en sticky, on le remet en "fixe" au layout */
@media (max-width: 1100px){
  .filters-mobilebar{
    position: static !important; /* pas sticky */
    top: auto !important;
    z-index: auto !important;
  }
}
