/* ============================================================
   BOXE ACADÉMIE BRIVE · Page E-shop
   Chargé UNIQUEMENT par eshop.html, APRÈS styles.css.
   Rappel : toute valeur vw/vh/svh s'écrit calc(N / var(--site-zoom)).
   ============================================================ */

/* ============ Hero ============ */
.page-hero--shop {
  padding-bottom: clamp(44px, calc(5vw / var(--site-zoom)), 76px);
}
.page-hero--shop .page-hero-bg img {
  filter: grayscale(1) brightness(0.28) contrast(1.15);
  object-position: center 35%;
}
.page-hero--shop .page-hero-overlay {
  background:
    radial-gradient(55% 75% at 88% 30%, rgba(255, 90, 31, 0.13), transparent 70%),
    linear-gradient(175deg, rgba(11, 11, 13, 0.88) 0%, rgba(11, 11, 13, 0.7) 45%, rgba(11, 11, 13, 0.98) 100%);
}
.shop-hero-head { margin-bottom: clamp(28px, calc(3.4vw / var(--site-zoom)), 44px); }
.shop-hero-head .section-title { font-size: clamp(44px, calc(6.6vw / var(--site-zoom)), 94px); }
.shop-hero-head .section-title em { font-style: normal; color: var(--accent); }
.shop-hero-head .section-sub { max-width: 620px; }

.shop-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Flèche « lien externe » dans les boutons */
.btn--ext span { display: inline-flex; align-items: center; gap: 11px; }
.shop-ext { width: 17px; height: 17px; flex: none; transform: translateY(-1px); }

/* Bandeau méta (3 items) */
.shop-meta {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: clamp(32px, calc(4vw / var(--site-zoom)), 56px);
  border: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.shop-meta li {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border-right: 1px solid var(--line); min-width: 0;
}
.shop-meta li:last-child { border-right: none; }
.shop-meta svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.shop-meta span { font-size: 13.5px; color: var(--ink-dim); line-height: 1.35; min-width: 0; }
.shop-meta strong {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
}

/* ============ Barre de filtres (sticky sous la nav) ============ */
.shop-filterbar {
  position: sticky; top: var(--nav-h); z-index: 900;
  background: rgba(11, 11, 13, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: top 0.4s var(--ease-out);
}
/* La nav se masque au scroll descendant : la barre remonte pour coller en haut */
.shop-filterbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 0; min-width: 0;
}
.shop-filters-scroll { min-width: 0; flex: 1 1 auto; }
.shop-filters { display: flex; gap: 10px; flex-wrap: wrap; }

.shop-filter {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  font-family: var(--display); font-weight: 800; font-size: 16px;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-dim); white-space: nowrap; flex: none;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.2s var(--ease-punch);
}
.shop-filter em {
  font-style: normal; font-family: var(--body); font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.08em; color: var(--accent);
  padding: 2px 7px; border: 1px solid rgba(255, 90, 31, 0.35);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.shop-filter:hover { color: var(--ink); border-color: rgba(255, 90, 31, 0.5); }
.shop-filter.is-on {
  background: var(--accent); border-color: var(--accent); color: #0d0803;
}
.shop-filter.is-on em { color: #0d0803; border-color: rgba(13, 8, 3, 0.35); background: rgba(255, 255, 255, 0.28); }
.shop-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shop-count {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); white-space: nowrap; flex: none;
}
.shop-count strong {
  font-family: var(--display); font-weight: 900; font-size: 20px;
  letter-spacing: 0.04em; color: var(--accent); margin-right: 5px;
}

/* ============ Catalogue ============ */
.shop-catalogue { padding-top: clamp(56px, calc(7vw / var(--site-zoom)), 96px); }
.shop-cat { scroll-margin-top: calc(var(--nav-h) + 90px); }
.shop-cat + .shop-cat { margin-top: clamp(64px, calc(8vw / var(--site-zoom)), 118px); }
.shop-cat.is-hidden { display: none; }

.shop-cat-head {
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  gap: 10px 28px; padding-bottom: 20px; margin-bottom: clamp(26px, calc(3vw / var(--site-zoom)), 40px);
  border-bottom: 1px solid var(--line);
}
.shop-cat-title {
  grid-column: 1; font-family: var(--display); font-weight: 900;
  font-size: clamp(34px, calc(4.6vw / var(--site-zoom)), 62px);
  letter-spacing: 0.01em; text-transform: uppercase; line-height: 0.95;
}
.shop-cat-title span { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.shop-cat-desc { grid-column: 1; color: var(--ink-dim); font-size: 15.5px; max-width: 620px; }
.shop-cat-count {
  grid-column: 2; grid-row: 1 / span 2; align-self: end;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}

.shop-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, calc(1.6vw / var(--site-zoom)), 22px);
}

/* ============ Carte produit ============ */
.shop-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  transition: border-color 0.35s, background 0.35s, transform 0.4s var(--ease-out);
}
.shop-card.is-hidden { display: none; }
.shop-card:hover { border-color: rgba(255, 90, 31, 0.6); background: var(--bg-3); transform: translateY(-4px); }

/* Plaque blanche carrée : les visuels 300x300 sont sur fond blanc */
.shop-card-media {
  position: relative; background: #fff;
  aspect-ratio: 1 / 1; overflow: hidden;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%, 0 18px);
}
.shop-card-media img {
  width: 100%; height: 100%;
  object-fit: contain; padding: 10px;
  transition: transform 0.55s var(--ease-out);
}
.shop-card:hover .shop-card-media img { transform: scale(1.07); }
/* Liseré orange au survol, à l'intérieur du biseau */
.shop-card-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--accent);
  opacity: 0; transition: opacity 0.35s;
}
.shop-card:hover .shop-card-media::after { opacity: 1; }

.shop-card-body {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 16px 18px; flex: 1 1 auto; min-width: 0;
}
.shop-card-name {
  font-family: var(--display); font-weight: 800; font-size: 20px;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.08;
  overflow-wrap: anywhere;
  /* deux lignes réservées : les catégories et les prix s'alignent d'une carte à l'autre */
  min-height: 2.16em;
}
.shop-card-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim);
}
.shop-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: auto; padding-top: 14px; flex-wrap: wrap;
}
.shop-card-price {
  font-family: var(--display); font-weight: 900; font-size: 27px;
  letter-spacing: 0.02em; color: var(--accent); line-height: 1;
}
.shop-card-btn { padding: 9px 16px; font-size: 13.5px; }

/* Message « aucun produit » (sécurité, jamais atteint avec 3 catégories) */
.shop-empty {
  text-align: center; color: var(--ink-dim);
  font-family: var(--display); font-weight: 800; font-size: 22px;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 60px 0;
}

/* ============ Comment ça marche ============ */
.shop-how { background: var(--bg-2); }
.shop-steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, calc(2vw / var(--site-zoom)), 26px);
}
.shop-step {
  position: relative; padding: 34px 28px 30px;
  background: var(--bg); border: 1px solid var(--line); min-width: 0;
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
  transition: border-color 0.35s, transform 0.4s var(--ease-out);
}
.shop-step:hover { border-color: rgba(255, 90, 31, 0.5); transform: translateY(-4px); }
.shop-step-num {
  position: absolute; top: 16px; right: 20px;
  font-family: var(--display); font-weight: 900; font-size: 46px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 90, 31, 0.32);
}
.shop-step-ico {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; margin-bottom: 20px;
  border: 1px solid rgba(255, 90, 31, 0.35); color: var(--accent);
  background: rgba(255, 90, 31, 0.07);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
}
.shop-step-ico svg { width: 27px; height: 27px; }
.shop-step h3 {
  font-family: var(--display); font-weight: 800; font-size: 23px;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.1; margin-bottom: 10px;
}
.shop-step p { color: var(--ink-dim); font-size: 15px; line-height: 1.6; }

/* ============ Bande CTA finale ============ */
/* La façade est très claire : on descend la luminosité pour garder le titre lisible */
.shop-band .salle-band-bg img { filter: grayscale(1) brightness(0.24) contrast(1.15); }
.shop-band-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============ Mention discrète ============ */
.shop-note {
  padding: 34px 0 52px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px;
  font-size: 12.5px; color: var(--ink-dim); line-height: 1.6;
}
.shop-note p { max-width: 640px; }
.shop-note a {
  color: var(--ink); font-weight: 700; white-space: nowrap;
  border-bottom: 1px solid rgba(255, 90, 31, 0.6);
  transition: color 0.25s, border-color 0.25s;
}
.shop-note a:hover { color: var(--accent); border-color: var(--accent); }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .shop-meta { grid-template-columns: 1fr; }
  .shop-meta li { border-right: none; border-bottom: 1px solid var(--line); }
  .shop-meta li:last-child { border-bottom: none; }
  .shop-steps { grid-template-columns: 1fr; }
  .shop-cat-head { grid-template-columns: 1fr; }
  .shop-cat-count { grid-column: 1; grid-row: auto; align-self: start; }
}
@media (max-width: 820px) {
  /* Filtres : rail scrollable avec accroche, sans débordement de page */
  .shop-filterbar-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .shop-filters-scroll {
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .shop-filters-scroll::-webkit-scrollbar { display: none; }
  .shop-filters { flex-wrap: nowrap; width: max-content; }
  .shop-filter { scroll-snap-align: start; }
  .shop-count { align-self: flex-start; }
}
@media (max-width: 700px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .shop-hero-head .section-title { font-size: clamp(40px, calc(11vw / var(--site-zoom)), 58px); }
  .shop-hero-actions { flex-direction: column; }
  .shop-hero-actions .btn { width: 100%; }
  .shop-band-actions { flex-direction: column; }
  .shop-band-actions .btn { width: 100%; }
  .shop-filter { padding: 11px 15px; font-size: 15px; }
  .shop-card-name { font-size: 18px; }
  .shop-card-price { font-size: 24px; }
  .shop-card-body { padding: 13px 13px 15px; }
  .shop-card-foot { gap: 9px; }
  .shop-card-btn { width: 100%; padding: 11px 14px; }
  .shop-step { padding: 28px 20px 24px; }
  .shop-step-num { font-size: 38px; top: 14px; right: 16px; }
  .shop-note { padding: 28px 0 42px; }
}
@media (max-width: 400px) {
  .shop-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card, .shop-card-media img, .shop-step, .shop-filterbar { transition: none; }
  .shop-card:hover, .shop-step:hover { transform: none; }
  .shop-card:hover .shop-card-media img { transform: none; }
}
