/**
 * Homepage — category band under the hero.
 *
 * Self-contained on purpose. This block used to live in style.css next to the
 * hero's own rules, and a cleanup of the hero once took one of its fixes with
 * it. Nothing here depends on a neighbouring section.
 */

.pr-home-cats{
  --pr-hb-navy:#16215C;
  --pr-hb-muted:#5A6080;
  --pr-hb-desc:#4A5070;
  --pr-hb-container:1280px;
  --pr-hb-gutter:clamp(16px,4vw,40px);
}

/* =========================================================================
 * Bande des categories
 * ====================================================================== */
.pr-home-cats{
  position:relative;z-index:5;
  /* remonte par-dessus le heros : le panneau recouvre le bas du fond aqua
     au lieu de trancher le cercle rose en deux. Il porte la couleur de la
     page, pas du blanc : sous le heros il ne doit y avoir qu un seul fond,
     et l ombre suffit a detacher la bande de l aqua. */
  margin-block-start:-64px;
  background:var(--pr-bg);
  border-radius:40px 40px 0 0;
  padding-block:36px 40px;
  box-shadow:0 -16px 36px -26px rgba(22,33,92,.4);
}
.pr-home-cats__inner{
  max-width:var(--pr-hb-container);
  margin-inline:auto;
  padding-inline:var(--pr-hb-gutter);
}

.pr-home-cats__head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:20px;flex-wrap:wrap;
  margin-block-end:24px;
}
.pr-home-cats__title{
  margin:0;
  font-family:'Baloo Bhaijaan 2','IBM Plex Sans Arabic',Tahoma,sans-serif;
  font-weight:800;font-size:30px;line-height:1.25;
  color:var(--pr-hb-navy);
}
.pr-home-cats__sub{
  margin:4px 0 0;
  font-size:14px;color:var(--pr-hb-muted);line-height:1.5;
}
.pr-home-cats__all{
  display:inline-flex;align-items:center;gap:9px;
  min-height:44px;padding:0 22px;
  border:2px solid var(--pr-hb-navy);border-radius:999px;
  color:var(--pr-hb-navy);font-size:15px;font-weight:700;text-decoration:none;
  transition:background-color .2s ease,color .2s ease;
}
.pr-home-cats__all svg{width:17px;height:17px;flex:none;}
.pr-home-cats__all:hover{background:var(--pr-hb-navy);color:#fff;}
.pr-home-cats__all:focus-visible{outline:3px solid #2451D6;outline-offset:3px;}

.pr-home-cats__grid{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(5,1fr);gap:16px;
}
.pr-home-cats__grid li{margin:0;min-width:0;}

.pr-home-cats__card{
  position:relative;overflow:hidden;
  display:flex;flex-direction:column;justify-content:space-between;
  height:172px;padding:20px;
  border-radius:26px;text-decoration:none;
  transition:transform .2s ease,box-shadow .2s ease;
}
.pr-home-cats__card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 34px -20px rgba(22,33,92,.45);
}
.pr-home-cats__card:focus-visible{outline:3px solid var(--pr-hb-navy);outline-offset:3px;}

/* le disque qui deborde en bas a gauche */
.pr-home-cats__blur{
  position:absolute;width:110px;height:110px;border-radius:50%;
  background:rgba(255,255,255,.5);
  inset-block-end:-42px;inset-inline-end:-30px;
  pointer-events:none;
}

/* illustration en volume : plus de pastille blanche, une ombre douce suffit */
.pr-home-cats__ic{
  position:relative;z-index:1;
  width:72px;height:72px;flex:none;
  display:block;
  transition:transform .2s ease;
}
.pr-home-cats__ic img{
  width:100%;height:100%;display:block;object-fit:contain;
  filter:drop-shadow(0 8px 10px rgba(22,33,92,.16));
}
.pr-home-cats__card:hover .pr-home-cats__ic{transform:rotate(-6deg) scale(1.06);}

.pr-home-cats__foot{
  position:relative;z-index:1;
  display:flex;align-items:flex-end;justify-content:space-between;gap:10px;
}
.pr-home-cats__text{display:flex;flex-direction:column;gap:2px;min-width:0;}
.pr-home-cats__name{
  font-family:'Baloo Bhaijaan 2','IBM Plex Sans Arabic',Tahoma,sans-serif;
  font-weight:800;font-size:19px;line-height:1.25;color:var(--pr-hb-navy);
}
.pr-home-cats__desc{font-size:13px;line-height:1.4;color:var(--pr-hb-desc);}
.pr-home-cats__go{
  width:36px;height:36px;border-radius:50%;flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;
}
.pr-home-cats__go svg{width:17px;height:17px;display:block;}

/* --- les cinq couleurs --- */
.pr-home-cats__card.is-baby{background:#E3EBFF;}
.pr-home-cats__card.is-baby .pr-home-cats__go{background:#2451D6;}

.pr-home-cats__card.is-girls{background:#FCE3E8;}
.pr-home-cats__card.is-girls .pr-home-cats__go{background:#D6232A;}

.pr-home-cats__card.is-boys{background:#FFF1CC;}
.pr-home-cats__card.is-boys .pr-home-cats__go{background:#B7791F;}

.pr-home-cats__card.is-shoes{background:#DDF1F7;}
.pr-home-cats__card.is-shoes .pr-home-cats__go{background:#1E7A94;}

.pr-home-cats__card.is-acc{background:#F1E6FF;}
.pr-home-cats__card.is-acc .pr-home-cats__go{background:#6B3FB8;}

/* =========================================================================
 * <= 1024px
 * ====================================================================== */
@media (max-width:1024px){
  .pr-home-cats__grid{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:880px){
  .pr-home-cats__grid{grid-template-columns:repeat(2,1fr);}
}

/* =========================================================================
 * <= 768px : les categories deviennent un rail qui defile
 * ====================================================================== */
@media (max-width:768px){
  .pr-home-cats{
    margin-block-start:-32px;
    border-radius:32px 32px 0 0;
    padding-block:28px 32px;
  }
  .pr-home-cats__head{
    flex-direction:column;align-items:stretch;gap:14px;
    margin-block-end:18px;
  }
  .pr-home-cats__all{align-self:flex-start;}
  .pr-home-cats__title{font-size:24px;}

  .pr-home-cats__grid{
    display:flex;gap:12px;
    overflow-x:auto;scroll-snap-type:x mandatory;
    /* le rail va d'un bord a l'autre sans elargir la page */
    margin-inline:calc(var(--pr-hb-gutter) * -1);
    padding-inline:var(--pr-hb-gutter);
    padding-block-end:4px;
    scrollbar-width:none;-ms-overflow-style:none;
  }
  .pr-home-cats__grid::-webkit-scrollbar{display:none;}
  .pr-home-cats__grid li{flex:0 0 160px;scroll-snap-align:start;}
  .pr-home-cats__card{height:164px;padding:16px;border-radius:22px;}
  .pr-home-cats__ic{width:60px;height:60px;}
  .pr-home-cats__name{font-size:17px;}
  .pr-home-cats__desc{font-size:12px;}
  .pr-home-cats__go{width:32px;height:32px;}

}

/* =========================================================================
 * Mouvement reduit
 * ====================================================================== */
@media (prefers-reduced-motion: reduce){
  .pr-home-cats__card,
  .pr-home-cats__ic,
  .pr-home-cats__all{transition:none;}
  .pr-home-cats__card:hover,
  .pr-home-cats__card:hover .pr-home-cats__ic{transform:none;}
}
