/* =========================================================
   CARRÉMENT SAINT-CHAMOND — PAGE COMMERCANTS
   Le global du thème fournit les variables --csc-*.
   ========================================================= */

.csc-directory-page{overflow:hidden}
.csc-directory-page svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.csc-directory-page button,.csc-directory-page input,.csc-directory-page select{font:inherit}

/* HERO */
.csc-directory-hero{position:relative;padding:72px 0 34px;background:linear-gradient(180deg,#f8fcff 0%,#fff 86%);overflow:hidden}
.csc-directory-hero::before{content:"";position:absolute;left:-100px;top:80px;width:260px;height:260px;border-radius:58px;border:2px solid rgba(74,147,200,.07);transform:rotate(15deg)}
.csc-directory-hero__grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(440px,.95fr);align-items:center;gap:50px;min-height:500px}
.csc-directory-hero__copy{position:relative;z-index:2;max-width:760px}
.csc-directory-hero h1{margin:12px 0 24px;font-size:clamp(48px,5.2vw,78px);line-height:.98;letter-spacing:-.055em;color:var(--csc-text)}
.csc-directory-hero h1 strong{color:var(--csc-primary);font-weight:900}
.csc-directory-hero__copy>p{max-width:690px;margin:0;color:var(--csc-text-light);font-size:17px;line-height:1.8}
.csc-directory-hero__meta{display:flex;align-items:center;gap:22px;flex-wrap:wrap;margin-top:28px}
.csc-directory-count{display:inline-flex;align-items:baseline;gap:8px;color:var(--csc-text-light);font-size:13px;font-weight:700}
.csc-directory-count strong{font-size:28px;color:var(--csc-text);line-height:1}
.csc-directory-hero__scene{position:relative;min-width:0;color:var(--csc-primary);transition:transform .16s ease-out}
.csc-directory-hero__scene svg{display:block;width:100%;height:auto;overflow:visible}
.csc-directory-hero__scene .csc-dir-cloud{fill:#fff;stroke:none;filter:drop-shadow(0 10px 18px rgba(74,147,200,.12))}
.csc-directory-hero__scene .csc-dir-shop,.csc-directory-hero__scene .csc-dir-building,.csc-directory-hero__scene .csc-dir-tree,.csc-directory-hero__scene .csc-dir-person{color:#4a93c8}
.csc-directory-hero__scene .csc-dir-tree circle{fill:#eaf5fb;stroke:#4a93c8}
.csc-directory-hero__scene .csc-dir-heart{fill:#e9b98d;stroke:none}
.csc-directory-hero__scene .csc-dir-road{stroke:#c6ddea;stroke-width:3}
.csc-dir-cloud--one{animation:cscDirCloud 11s ease-in-out infinite alternate}
.csc-dir-cloud--two{animation:cscDirCloud 14s ease-in-out infinite alternate-reverse}
.csc-dir-tree--one{transform-box:fill-box;transform-origin:center bottom;animation:cscDirTree 5s ease-in-out infinite alternate}
.csc-dir-tree--two{transform-box:fill-box;transform-origin:center bottom;animation:cscDirTree 6.2s ease-in-out infinite alternate-reverse}
.csc-dir-heart{transform-box:fill-box;transform-origin:center;animation:cscDirHeart 2.5s ease-in-out infinite}
.csc-dir-person{animation:cscDirFloat 4.2s ease-in-out infinite alternate}

@keyframes cscDirCloud{from{transform:translateX(-5px)}to{transform:translateX(14px)}}
@keyframes cscDirTree{from{transform:rotate(-1.2deg)}to{transform:rotate(1.5deg)}}
@keyframes cscDirHeart{0%,100%{transform:scale(1)}12%{transform:scale(1.09)}25%{transform:scale(1)}38%{transform:scale(1.05)}}
@keyframes cscDirFloat{from{transform:translateY(0)}to{transform:translateY(-6px)}}

/* BROWSER */
.csc-directory-browser{padding:52px 0 96px;background:#fff}
.csc-directory-filter-head{display:flex;justify-content:space-between;align-items:end;gap:30px;margin-bottom:24px}
.csc-directory-filter-head h2{margin:6px 0 0;font-size:clamp(30px,3vw,44px);line-height:1.08;letter-spacing:-.04em;color:var(--csc-text)}
.csc-filter-reset{border:0;background:transparent;color:var(--csc-primary);font-weight:800;cursor:pointer;padding:8px 0}

.csc-directory-filters{display:grid;grid-template-columns:minmax(280px,1.6fr) minmax(180px,.72fr) minmax(180px,.72fr) auto;gap:12px;align-items:end;padding:18px 0 22px;border-top:1px solid var(--csc-border);border-bottom:1px solid var(--csc-border)}

.csc-filter-search{height:54px;display:flex;align-items:center;gap:12px;padding:0 16px;border:1px solid var(--csc-border);border-radius:16px;background:#fff;transition:border-color .2s ease,box-shadow .2s ease}
.csc-filter-search:focus-within{border-color:rgba(74,147,200,.65);box-shadow:0 0 0 4px rgba(74,147,200,.10)}
.csc-filter-search__icon{width:22px;height:22px;display:grid;place-items:center;color:var(--csc-primary);flex:0 0 auto}
.csc-filter-search__icon svg{width:20px;height:20px}
.csc-filter-search input{width:100%;border:0;outline:0;background:transparent;color:var(--csc-text);font-size:15px}
.csc-filter-search input::placeholder{color:#91a0aa}

.csc-filter-select{display:grid;gap:6px}
.csc-filter-select>span{font-size:10px;text-transform:uppercase;letter-spacing:.1em;font-weight:900;color:var(--csc-text-light);padding-left:2px}
.csc-filter-select select{height:54px;border:1px solid var(--csc-border);border-radius:16px;background:#fff;color:var(--csc-text);padding:0 38px 0 14px;outline:0;cursor:pointer}
.csc-filter-select select:focus{border-color:rgba(74,147,200,.65);box-shadow:0 0 0 4px rgba(74,147,200,.10)}

.csc-filter-toggles{display:flex;gap:8px}
.csc-filter-toggle{height:54px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--csc-border);border-radius:16px;background:#fff;color:var(--csc-text);padding:0 14px;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap;transition:all .2s ease}
.csc-filter-toggle span{width:19px;height:19px;color:var(--csc-primary)}
.csc-filter-toggle svg{width:19px;height:19px}
.csc-filter-toggle:hover{border-color:#bcdcec;transform:translateY(-1px)}
.csc-filter-toggle[aria-pressed="true"]{background:var(--csc-primary-soft);border-color:#b7d9ed;color:var(--csc-primary)}

.csc-directory-sector-strip{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;padding:18px 2px 10px;scroll-snap-type:x proximity}
.csc-directory-sector-strip::-webkit-scrollbar{display:none}
.csc-directory-sector-strip button{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;height:42px;border:0;border-radius:999px;padding:0 14px 0 7px;background:#f6f9fb;color:var(--csc-text-light);font-size:12px;font-weight:800;cursor:pointer;scroll-snap-align:start;transition:all .2s ease}
.csc-directory-sector-strip button>span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--csc-primary);font-size:11px;box-shadow:0 4px 12px rgba(74,147,200,.08)}
.csc-directory-sector-strip button:hover,.csc-directory-sector-strip button.is-active{background:var(--csc-primary-soft);color:var(--csc-primary)}
.csc-directory-sector-strip button.is-active>span{background:var(--csc-primary);color:#fff}

.csc-directory-results-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:34px 0 24px}
.csc-directory-results-head p{margin:0;color:var(--csc-text-light);font-size:13px}
.csc-directory-results-head p strong{font-size:20px;color:var(--csc-text);margin-right:4px}
.csc-directory-results-head__hint{color:var(--csc-text-light);font-size:12px}

/* GRID */
.csc-directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:46px 30px}
.csc-merchant-card{min-width:0;transition:opacity .2s ease,transform .2s ease}
.csc-merchant-card[hidden]{display:none!important}

.csc-merchant-card__visual{position:relative;display:block;aspect-ratio:1/1;border-radius:24px;background:linear-gradient(135deg,#eff8fd,#fff);text-decoration:none;isolation:isolate}
.csc-square-offset::before{content:"";position:absolute;inset:11px -11px -11px 11px;border:2px solid rgba(74,147,200,.35);border-radius:24px;z-index:-1;transition:transform .28s ease,border-color .28s ease}
.csc-merchant-card:hover .csc-square-offset::before{transform:translate(4px,4px);border-color:rgba(74,147,200,.55)}
.csc-merchant-card__visual>img{width:100%;height:100%;object-fit:cover;display:block;border-radius:24px;box-shadow:var(--csc-shadow-sm);transition:transform .5s cubic-bezier(.2,.7,.2,1),filter .3s ease}
.csc-merchant-card:hover .csc-merchant-card__visual>img{transform:scale(1.02)}
.csc-merchant-card__fallback{width:100%;height:100%;display:grid;place-items:center;border-radius:24px;background:linear-gradient(135deg,#eaf5fb,#fff);color:var(--csc-primary);font-size:84px;font-weight:900;box-shadow:var(--csc-shadow-sm)}

.csc-merchant-card__status{position:absolute;left:15px;bottom:15px;display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border-radius:999px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);font-size:10px;font-weight:900;color:var(--csc-text);box-shadow:0 8px 20px rgba(20,45,62,.10)}
.csc-merchant-card__status i{width:7px;height:7px;border-radius:50%;background:#94a3ad}
.csc-merchant-card__status.is-open i{background:#31a86a;box-shadow:0 0 0 4px rgba(49,168,106,.12)}
.csc-merchant-card__gift{position:absolute;right:15px;top:15px;width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);color:#c68447;box-shadow:0 8px 20px rgba(20,45,62,.10)}
.csc-merchant-card__gift svg{width:20px;height:20px}

.csc-merchant-card__body{padding:26px 8px 0 7px}
.csc-merchant-card__sector{display:block;margin:0 0 8px;color:var(--csc-primary);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.09em}
.csc-merchant-card h2{margin:0;font-size:23px;line-height:1.15;letter-spacing:-.03em}
.csc-merchant-card h2 a{color:var(--csc-text);text-decoration:none}
.csc-merchant-card h2 a:hover{color:var(--csc-primary)}
.csc-merchant-card__slogan{margin:10px 0 0;color:var(--csc-text-light);font-size:13px;line-height:1.6;min-height:2.8em}
.csc-merchant-card__footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px}
.csc-merchant-card__location{display:flex;align-items:center;gap:7px;color:var(--csc-text-light);font-size:11px;font-weight:700;min-width:0}
.csc-merchant-card__location svg{width:15px;height:15px;flex:0 0 auto;color:var(--csc-primary)}
.csc-merchant-card__arrow{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--csc-primary-soft);color:var(--csc-primary);transition:transform .2s ease,background .2s ease,color .2s ease}
.csc-merchant-card__arrow svg{width:17px;height:17px}
.csc-merchant-card:hover .csc-merchant-card__arrow{transform:translateX(3px);background:var(--csc-primary);color:#fff}

/* EMPTY */
.csc-directory-empty{text-align:center;padding:80px 20px 20px}
.csc-directory-empty>span{width:62px;height:62px;border-radius:20px;display:grid;place-items:center;margin:0 auto 18px;background:var(--csc-primary-soft);color:var(--csc-primary)}
.csc-directory-empty>span svg{width:30px;height:30px}
.csc-directory-empty h2{margin:0 0 10px;font-size:28px;letter-spacing:-.03em}
.csc-directory-empty p{margin:0 auto 22px;max-width:540px;color:var(--csc-text-light)}

/* JOIN */
.csc-directory-join{position:relative;padding:30px 0 90px;background:linear-gradient(180deg,#fff,#f3f9fd)}
.csc-directory-join__inner{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto 280px;align-items:center;gap:34px;min-height:250px;overflow:hidden}
.csc-directory-join h2{margin:7px 0 12px;font-size:clamp(32px,3.6vw,50px);line-height:1.04;letter-spacing:-.045em;max-width:720px}
.csc-directory-join p{margin:0;max-width:650px;color:var(--csc-text-light);line-height:1.7}
.csc-directory-join__scene{color:var(--csc-primary)}
.csc-directory-join__scene svg{display:block;width:100%;height:auto}
.csc-dir-mini-shop path,.csc-dir-mini-tree circle,.csc-dir-mini-tree path{fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.csc-dir-mini-tree circle{fill:#eaf5fb}
.csc-dir-mini-heart{fill:#e9b98d;stroke:none;transform-box:fill-box;transform-origin:center;animation:cscDirHeart 2.6s ease-in-out infinite}
.csc-dir-mini-ground{stroke:#c6ddea;stroke-width:3}
.csc-dir-mini-tree{transform-box:fill-box;transform-origin:center bottom;animation:cscDirTree 5.4s ease-in-out infinite alternate}

/* REVEAL */
[data-csc-reveal]{opacity:0;transform:translateY(18px);transition:opacity .58s ease,transform .58s ease}
[data-csc-reveal].is-visible{opacity:1;transform:none}

@media(max-width:1180px){
  .csc-directory-hero__grid{grid-template-columns:1fr;min-height:auto}
  .csc-directory-hero__scene{max-width:760px;margin:0 auto}
  .csc-directory-filters{grid-template-columns:1.4fr 1fr 1fr}
  .csc-filter-toggles{grid-column:1/-1}
  .csc-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .csc-directory-join__inner{grid-template-columns:minmax(0,1fr) auto}
  .csc-directory-join__scene{display:none}
}

@media(max-width:760px){
  .csc-directory-hero{padding:42px 0 18px}
  .csc-directory-hero__grid{gap:16px}
  .csc-directory-hero h1{font-size:clamp(42px,13vw,58px)}
  .csc-directory-hero__copy>p{font-size:15px;line-height:1.7}
  .csc-directory-hero__meta{align-items:flex-start;flex-direction:column;gap:12px}
  .csc-directory-hero__scene{margin-top:-4px}

  .csc-directory-browser{padding:46px 0 68px}
  .csc-directory-filter-head{align-items:flex-start;flex-direction:column;gap:10px}
  .csc-directory-filter-head h2{font-size:31px}

  .csc-directory-filters{grid-template-columns:1fr;gap:12px;padding:16px 0 18px}
  .csc-filter-toggles{grid-column:auto;display:grid;grid-template-columns:1fr 1fr}
  .csc-filter-toggle{white-space:normal;line-height:1.2;padding:0 10px}

  .csc-directory-sector-strip{margin-right:calc(var(--csc-gutter,18px) * -1)}
  .csc-directory-results-head{align-items:flex-start;flex-direction:column;gap:7px;margin-top:26px}

  .csc-directory-grid{grid-template-columns:1fr;gap:48px}
  .csc-merchant-card__body{padding-top:24px}
  .csc-merchant-card__slogan{min-height:0}
  .csc-square-offset::before{inset:9px -9px -9px 9px}

  .csc-directory-join{padding-bottom:64px}
  .csc-directory-join__inner{grid-template-columns:1fr;gap:22px}
  .csc-directory-join .csc-btn{width:100%;justify-content:center}
}

@media(prefers-reduced-motion:reduce){
  [data-csc-reveal]{opacity:1;transform:none;transition:none}
  .csc-dir-cloud--one,.csc-dir-cloud--two,.csc-dir-tree--one,.csc-dir-tree--two,.csc-dir-heart,.csc-dir-person,.csc-dir-mini-heart,.csc-dir-mini-tree{animation:none!important}
  .csc-directory-hero__scene,.csc-merchant-card__visual>img,.csc-square-offset::before,.csc-merchant-card__arrow{transition:none!important}
}


/* =========================================================
   V2 — FILTRES INTÉGRÉS AU HERO + RÉFÉRENTIELS VISUELS
   ========================================================= */

.csc-directory-hero{padding-bottom:0}
.csc-directory-hero__grid{padding-bottom:22px}

.csc-directory-hero__filters{
  position:relative;
  z-index:8;
  padding:0 0 38px;
}

.csc-directory-hero__filters::before{
  content:"";
  position:absolute;
  inset:-8px -18px 18px;
  border-radius:30px;
  background:rgba(255,255,255,.74);
  backdrop-filter:blur(16px);
  box-shadow:0 16px 44px rgba(30,72,96,.06);
  pointer-events:none;
}

.csc-directory-hero__filters>*{position:relative;z-index:1}

.csc-directory-hero__filters-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:24px;
  padding:18px 2px 14px;
}

.csc-directory-hero__filters-head>div{
  display:grid;
  gap:2px;
}

.csc-directory-hero__filters-head strong{
  font-size:clamp(19px,1.6vw,26px);
  letter-spacing:-.03em;
  color:var(--csc-text);
}

.csc-directory-filters--hero{
  grid-template-columns:minmax(300px,1.45fr) minmax(225px,.78fr) minmax(225px,.78fr) auto;
  border-top:1px solid rgba(74,147,200,.13);
  border-bottom:0;
  padding:14px 0 12px;
}

/* Custom select visuel */
.csc-visual-select{
  position:relative;
  min-width:0;
}

.csc-visual-select__trigger{
  width:100%;
  min-width:0;
  height:54px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  border:1px solid var(--csc-border);
  border-radius:16px;
  background:#fff;
  color:var(--csc-text);
  padding:7px 12px 7px 8px;
  cursor:pointer;
  text-align:left;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.csc-visual-select__trigger:hover,
.csc-visual-select.is-open .csc-visual-select__trigger{
  border-color:#b9d9eb;
  box-shadow:0 0 0 4px rgba(74,147,200,.08);
}

.csc-visual-select__preview,
.csc-visual-select__thumb,
.csc-directory-sector-strip__thumb{
  width:38px;
  height:38px;
  border-radius:12px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:var(--csc-primary-soft);
  color:var(--csc-primary);
  flex:0 0 auto;
}

.csc-visual-select__preview img,
.csc-visual-select__thumb img,
.csc-directory-sector-strip__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.csc-visual-select__fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:900;
  color:var(--csc-primary);
  background:linear-gradient(135deg,#eaf5fb,#fff);
}

.csc-visual-select__copy{
  min-width:0;
  display:grid;
  gap:1px;
}

.csc-visual-select__copy small{
  font-size:9px;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-weight:900;
  color:var(--csc-text-light);
}

.csc-visual-select__copy strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  color:var(--csc-text);
}

.csc-visual-select__chevron{
  color:var(--csc-primary);
  font-size:16px;
  transition:transform .18s ease;
}

.csc-visual-select.is-open .csc-visual-select__chevron{
  transform:rotate(180deg);
}

.csc-visual-select__menu{
  position:absolute;
  z-index:30;
  top:calc(100% + 8px);
  left:0;
  width:max(100%,260px);
  max-height:340px;
  overflow:auto;
  padding:7px;
  border:1px solid #dce8ef;
  border-radius:18px;
  background:rgba(255,255,255,.98);
  box-shadow:0 22px 50px rgba(20,45,62,.15);
  backdrop-filter:blur(14px);
}

.csc-visual-select__menu[hidden]{display:none}

.csc-visual-select__menu button{
  width:100%;
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:7px;
  border:0;
  border-radius:13px;
  background:transparent;
  color:var(--csc-text);
  text-align:left;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:background .16s ease,color .16s ease;
}

.csc-visual-select__menu button:hover,
.csc-visual-select__menu button.is-active{
  background:var(--csc-primary-soft);
  color:var(--csc-primary);
}

/* Mini filtres visuels */
.csc-directory-sector-strip{
  padding:10px 2px 2px;
  gap:10px;
}

.csc-directory-sector-strip button{
  height:auto;
  min-width:88px;
  display:grid;
  justify-items:center;
  gap:7px;
  padding:7px 9px 8px;
  border-radius:16px;
  background:transparent;
  scroll-snap-align:start;
}

.csc-directory-sector-strip button>span.csc-directory-sector-strip__thumb{
  width:52px;
  height:52px;
  border-radius:16px;
  box-shadow:0 7px 18px rgba(74,147,200,.08);
}

.csc-directory-sector-strip button strong{
  max-width:90px;
  font-size:10px;
  line-height:1.15;
  text-align:center;
  color:var(--csc-text-light);
  white-space:normal;
}

.csc-directory-sector-strip button:hover,
.csc-directory-sector-strip button.is-active{
  background:transparent;
}

.csc-directory-sector-strip button:hover .csc-directory-sector-strip__thumb,
.csc-directory-sector-strip button.is-active .csc-directory-sector-strip__thumb{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(74,147,200,.15);
  outline:2px solid rgba(74,147,200,.28);
  outline-offset:2px;
}

.csc-directory-sector-strip button.is-active strong{
  color:var(--csc-primary);
}

/* La zone résultats commence plus près du hero */
.csc-directory-browser{
  padding-top:30px;
}

.csc-directory-results-head{
  margin-top:8px;
}

@media(max-width:1180px){
  .csc-directory-filters--hero{
    grid-template-columns:minmax(280px,1.3fr) minmax(210px,.85fr) minmax(210px,.85fr);
  }

  .csc-directory-filters--hero .csc-filter-toggles{
    grid-column:1/-1;
  }
}

@media(max-width:760px){
  .csc-directory-hero__grid{
    padding-bottom:4px;
  }

  .csc-directory-hero__filters{
    padding-bottom:22px;
  }

  .csc-directory-hero__filters::before{
    inset:-2px -12px 8px;
    border-radius:24px;
  }

  .csc-directory-hero__filters-head{
    padding:14px 2px 10px;
    align-items:flex-start;
  }

  .csc-directory-hero__filters-head strong{
    font-size:18px;
  }

  .csc-directory-filters--hero{
    grid-template-columns:1fr;
    gap:10px;
    padding-top:10px;
  }

  .csc-directory-filters--hero .csc-filter-toggles{
    grid-column:auto;
  }

  .csc-visual-select__menu{
    width:100%;
    max-height:300px;
  }

  /* vrai carousel tactile pour les mini activités */
  .csc-directory-sector-strip{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:92px;
    gap:9px;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scroll-snap-type:x mandatory;
    padding:12px 4px 10px;
    margin-right:calc(var(--csc-gutter,18px) * -1);
  }

  .csc-directory-sector-strip button{
    width:92px;
    min-width:92px;
    scroll-snap-align:start;
  }

  .csc-directory-sector-strip button>span.csc-directory-sector-strip__thumb{
    width:54px;
    height:54px;
  }

  .csc-directory-browser{
    padding-top:20px;
  }
}


/* =========================================================
   V3 — FILTRE OUVERT DESKTOP / DRAWER MOBILE
   ========================================================= */
.csc-directory-hero__filters{position:relative;z-index:8;padding:4px 0 34px}
.csc-directory-hero__filters::before{display:none!important}
.csc-directory-hero__filters>*{position:relative;z-index:1}
.csc-directory-hero__filters-head{padding:12px 0 12px;border-top:1px solid rgba(74,147,200,.12)}
.csc-directory-hero__filters-actions{display:flex;align-items:center;gap:10px}
.csc-filter-drawer-close{display:none}
.csc-directory-filters--hero{grid-template-columns:minmax(300px,1.45fr) minmax(220px,.78fr) minmax(220px,.78fr) auto;padding:12px 0 10px;border-top:0;border-bottom:0}
.csc-directory-sector-strip{padding:8px 0 0}
.csc-mobile-filter-button,.csc-filter-backdrop{display:none}
.csc-filter-search,.csc-visual-select__trigger,.csc-filter-toggle{box-shadow:none}
.csc-filter-search:hover,.csc-visual-select__trigger:hover,.csc-filter-toggle:hover{border-color:#bfddea}

@media(max-width:760px){
  body.csc-filter-drawer-open{overflow:hidden}
  .csc-directory-hero__filters{position:fixed!important;z-index:100002;top:0;right:0;bottom:0;left:auto;width:min(92vw,410px)!important;max-width:none!important;margin:0!important;padding:0 20px 28px!important;background:#fff;overflow-y:auto;overscroll-behavior:contain;transform:translateX(104%);transition:transform .28s cubic-bezier(.2,.75,.25,1);box-shadow:-18px 0 50px rgba(20,45,62,.16)}
  .csc-directory-hero__filters.is-open{transform:translateX(0)}
  .csc-directory-hero__filters-head{position:sticky;top:0;z-index:5;margin:0 -20px;padding:18px 20px 14px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-top:0;border-bottom:1px solid var(--csc-border);align-items:center}
  .csc-directory-hero__filters-head .csc-kicker{font-size:10px}
  .csc-directory-hero__filters-head strong{font-size:17px}
  .csc-directory-hero__filters-actions{align-self:center}
  .csc-filter-drawer-close{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--csc-border);border-radius:50%;background:#fff;color:var(--csc-text);font-size:24px;line-height:1;cursor:pointer;flex:0 0 auto}
  .csc-directory-hero__filters-head .csc-filter-reset{display:none!important}
  .csc-directory-filters--hero{display:grid;grid-template-columns:1fr!important;gap:12px;padding:20px 0 14px}
  .csc-filter-search,.csc-visual-select__trigger{height:58px}
  .csc-filter-toggles{display:grid!important;grid-template-columns:1fr 1fr;gap:10px}
  .csc-filter-toggle{min-height:54px;height:auto;white-space:normal}
  .csc-directory-sector-strip{display:grid;grid-auto-flow:column;grid-auto-columns:88px;grid-template-columns:none;gap:10px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:none;margin:4px -20px 0;padding:12px 20px 18px}
  .csc-directory-sector-strip::-webkit-scrollbar{display:none}
  .csc-directory-sector-strip button{width:88px;min-width:88px;scroll-snap-align:start}
  .csc-visual-select__menu{position:static;width:100%;margin-top:8px;max-height:260px;box-shadow:none;border-radius:15px;background:#f8fbfd}
  .csc-mobile-filter-button{position:fixed;z-index:99998;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:150px;height:52px;padding:0 19px;border:0;border-radius:999px;background:var(--csc-primary);color:#fff;box-shadow:0 16px 36px rgba(40,107,154,.28);font-size:14px;font-weight:900;cursor:pointer}
  .csc-mobile-filter-button__icon{width:20px;height:20px;display:grid;place-items:center}
  .csc-mobile-filter-button__icon svg{width:19px;height:19px}
  .csc-mobile-filter-button strong{min-width:22px;height:22px;display:grid;place-items:center;padding:0 6px;border-radius:999px;background:#fff;color:var(--csc-primary);font-size:10px}
  .csc-filter-backdrop{position:fixed;z-index:100001;inset:0;display:block;border:0;background:rgba(18,36,48,.34);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .22s ease}
  .csc-filter-backdrop.is-open{opacity:1;pointer-events:auto}
  .csc-filter-backdrop[hidden]{display:none}
  .csc-directory-hero{padding-bottom:22px}
  .csc-directory-browser{padding-top:24px;padding-bottom:90px}
}
@media(prefers-reduced-motion:reduce){.csc-directory-hero__filters,.csc-filter-backdrop{transition:none!important}}


/* =========================================================
   CORRECTIF — MENUS DE FILTRE AU-DESSUS DES RÉSULTATS
   Le filtre est placé dans le hero : overflow:hidden coupait les menus.
   ========================================================= */

@media(min-width:761px){
  .csc-directory-hero{
    overflow:visible!important;
    position:relative;
    z-index:5;
  }

  .csc-directory-hero__filters{
    position:relative;
    z-index:50!important;
    isolation:isolate;
  }

  .csc-directory-filters--hero{
    position:relative;
    z-index:20;
    overflow:visible!important;
  }

  .csc-visual-select{
    position:relative;
    z-index:1;
  }

  .csc-visual-select.is-open{
    z-index:200!important;
  }

  .csc-visual-select__menu{
    z-index:500!important;
  }

  .csc-directory-browser{
    position:relative;
    z-index:1;
  }
}

/* Le drawer mobile reste indépendant du hero. */
@media(max-width:760px){
  .csc-directory-hero{
    overflow:hidden;
  }

  .csc-directory-hero__filters{
    z-index:100020!important;
  }

  .csc-filter-backdrop{
    z-index:100019!important;
  }

  .csc-mobile-filter-button{
    z-index:100018!important;
  }
}

/* Drawer mobile CSC hors du hero, croix toujours accessible */
@media(max-width:760px){body>.csc-directory-hero__filters{position:fixed!important;z-index:100110!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;max-height:100dvh!important;width:min(92vw,410px)!important;overflow-y:auto!important;transform:translateX(104%)!important;visibility:visible!important;opacity:1!important;transition:transform .28s ease!important;background:#fff!important}body>.csc-directory-hero__filters.is-open{transform:translateX(0)!important}body>.csc-filter-backdrop{position:fixed!important;inset:0!important;z-index:100109!important}body .csc-filter-drawer-close{display:grid!important;position:relative;z-index:4;pointer-events:auto!important}}
