body.cj-public--bellerose{overflow-x:clip;max-width:100vw}
/* Bellerose inventaire — public + membre (display/responsive only) */
.cj-public-top{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:.75rem 1rem;background:#0f172a;color:#fff;flex-wrap:wrap}
.cj-public-top nav{display:flex;flex-wrap:wrap;gap:.35rem .5rem;align-items:center;min-width:0}
.cj-public-top a{color:#e2e8f0;text-decoration:none;margin-left:0;min-height:40px;display:inline-flex;align-items:center;padding:.25rem .35rem}
.cj-public-top__brand{font-weight:700;color:#fff!important;margin-left:0!important}
.cj-public-foot{padding:1rem;text-align:center;color:#64748b}
.cj-page--public-bellerose{padding:1rem 1rem 2rem;max-width:1400px;margin:0 auto;width:100%;min-width:0;overflow-x:clip}
.cj-public-bel-header{display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;align-items:flex-start;margin-bottom:1rem}
.cj-public-bel-header h1{margin:.15rem 0;font-size:clamp(1.25rem,4vw,1.75rem);overflow-wrap:anywhere}
.cj-public-bel-counters,.cj-bel-inv-counters{display:flex;flex-wrap:wrap;gap:.5rem .85rem;font-size:.85rem;background:#f8fafc;border:1px solid #e2e8f0;border-radius:.5rem;padding:.5rem .75rem;max-width:100%}
.cj-public-bel-filters{display:flex;flex-wrap:nowrap;gap:.4rem;margin-bottom:.75rem;align-items:center;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:.25rem;max-width:100%;scrollbar-width:thin}
.cj-public-bel-filters .cj-btn{flex:0 0 auto;min-height:44px;white-space:nowrap}
.cj-public-bel-filters .cj-btn.is-on{background:#1d4ed8;color:#fff}
.cj-public-bel-search{flex:0 0 auto}
.cj-public-bel-search input{min-width:9rem;max-width:40vw;min-height:44px;padding:.35rem .5rem;border:1px solid #cbd5e1;border-radius:.5rem;font:inherit}
.cj-bellerose-workspace--public{min-height:60dvh;border:1px solid #e2e8f0;border-radius:.75rem;overflow:hidden;background:#fff;width:100%}
.cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{position:relative;height:min(70dvh,720px);touch-action:none;overscroll-behavior:contain}
.cj-bellerose-workspace--public .cj-bellerose-svg{width:100%;height:100%;display:block;touch-action:none}
.cj-bel-canvas-tools{position:absolute;z-index:3;top:.5rem;left:.5rem;display:flex;flex-wrap:wrap;gap:.25rem;background:rgba(255,255,255,.94);padding:.25rem;border-radius:.5rem;border:1px solid #e2e8f0;max-width:calc(100% - 1rem)}
.cj-bel-canvas-tools .cj-btn{min-width:44px;min-height:44px}
.cj-bel-inv-modal{border:none;border-radius:.75rem;padding:0;max-width:min(560px,96vw);width:100%;max-height:min(92dvh,860px);overflow:hidden}
.cj-bel-inv-modal::backdrop{background:rgba(15,23,42,.45)}
.cj-bel-inv-modal__inner{padding:1rem 1.1rem 1.25rem;position:relative;max-height:min(92dvh,860px);overflow-y:auto;-webkit-overflow-scrolling:touch}
.cj-bel-inv-modal__close{position:absolute;right:.5rem;top:.5rem;min-width:44px;min-height:44px;border:0;background:#f1f5f9;border-radius:999px;cursor:pointer;z-index:2}
.cj-bel-inv-modal__gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.5rem;margin-bottom:.75rem}
.cj-bel-inv-modal__photo{width:100%;height:100px;object-fit:cover;border-radius:.4rem;background:#e2e8f0}
.cj-bel-inv-modal__meta{list-style:none;padding:0;margin:.5rem 0 1rem}
.cj-bel-inv-modal__meta li{padding:.2rem 0;border-bottom:1px solid #f1f5f9;overflow-wrap:anywhere}
.cj-bel-inv-modal__cta{margin-top:1rem}
.cj-bel-inv-modal__cta .cj-btn{min-height:44px;width:100%;justify-content:center}

/* Member inventory panel */
.cj-bel-inv-panel{border-left:1px solid #e2e8f0;background:#fff;display:flex;flex-direction:column;min-width:260px;max-width:340px;max-height:100%;overflow:hidden;flex:0 0 auto}
.cj-bel-inv-panel .cj-bel-panel-head{display:flex;justify-content:space-between;align-items:center;padding:.5rem .75rem;border-bottom:1px solid #e2e8f0;gap:.5rem}
.cj-bel-inv-filters-admin{display:grid;gap:.35rem;padding:.5rem .75rem;border-bottom:1px solid #f1f5f9}
.cj-bel-inv-filters-admin input,.cj-bel-inv-filters-admin select{min-height:44px;width:100%;font:inherit;padding:.4rem .55rem;border:1px solid #cbd5e1;border-radius:.4rem}
.cj-bel-inv-list{list-style:none;margin:0;padding:.5rem;overflow:auto;flex:1;-webkit-overflow-scrolling:touch}
.cj-bel-inv-item{display:flex;justify-content:space-between;gap:.5rem;padding:.45rem .5rem;border:1px solid #e2e8f0;border-radius:.45rem;margin-bottom:.4rem;background:#f8fafc;min-width:0}
.cj-bel-inv-item.is-unplaced{cursor:grab;border-style:dashed}
.cj-bel-inv-item__sub{font-size:.78rem;color:#64748b;overflow-wrap:anywhere}
.cj-bel-inv-item__actions{display:flex;flex-direction:column;gap:.25rem}
.cj-bel-inv-item__actions .cj-btn{min-height:40px}
.cj-bel-inv-badge{font-size:.7rem;padding:.1rem .35rem;border-radius:.25rem;background:#e2e8f0}
.cj-bel-inv-badge--disponible{background:#dcfce7;color:#166534}
.cj-bel-inv-badge--reserve{background:#ffedd5;color:#9a3412}
.cj-bel-inv-badge--vendu{background:#fee2e2;color:#991b1b}
.cj-bel-inv-badge--reparation{background:#dbeafe;color:#1e40af}
.cj-bel-inv-slot.is-drop .cj-bel-inv-slot__rect{stroke:#2563eb;stroke-width:3}
.cj-bel-inv-history-table{width:100%;border-collapse:collapse;font-size:.78rem}
.cj-bel-inv-history-table th,.cj-bel-inv-history-table td{border-bottom:1px solid #e2e8f0;padding:.25rem;text-align:left}

/* Receive form */
.cj-page--receive{padding:1rem;max-width:640px;margin:0 auto;width:100%;min-width:0}
.cj-receive-form{max-width:100%;width:100%;display:grid;gap:.75rem;padding:1rem;background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;box-sizing:border-box}
.cj-receive-form label{display:grid;gap:.25rem;font-weight:600;font-size:.9rem}
.cj-receive-form input,.cj-receive-form select,.cj-receive-form textarea{font-weight:400;padding:.55rem .7rem;border:1px solid #cbd5e1;border-radius:.5rem;min-height:44px;width:100%;max-width:100%;font:inherit;box-sizing:border-box}
.cj-receive-pos{border:1px solid #e2e8f0;border-radius:12px;padding:.75rem;display:grid;gap:.65rem}
.cj-receive-preview{display:flex;flex-wrap:wrap;gap:.4rem}
.cj-receive-preview img{width:72px;height:72px;object-fit:cover;border-radius:8px}
.cj-receive-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.cj-receive-actions .cj-btn{min-height:44px}
.cj-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

@media (max-width:900px){
  .cj-bel-inv-panel{max-width:none;width:100%;min-width:0;max-height:38dvh;border-left:0;border-top:1px solid #e2e8f0;order:3}
  .cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{height:min(58dvh,560px)}
  /* Keep plan usable: inventory panel below canvas, not overlaying */
  .cj-bellerose-editor .cj-bel-inv-panel,
  #cj-bel-editor .cj-bel-inv-panel{position:relative;z-index:1}
}
@media (max-width:640px){
  .cj-public-top{padding:.65rem .75rem}
  .cj-page--public-bellerose{padding:.75rem .65rem 1.5rem}
  .cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{height:min(62dvh,560px)}
  .cj-bel-inv-modal{max-width:100vw;max-height:100dvh;border-radius:16px 16px 0 0;margin:auto 0 0}
  .cj-bel-inv-modal__inner{max-height:100dvh;padding-top:3rem}
  .cj-bel-inv-modal__gallery{grid-template-columns:1fr 1fr}
  .cj-bel-inv-modal__photo{height:120px}
  .cj-receive-form{padding:.85rem;border-radius:.65rem}
  .cj-bel-canvas-tools{top:.35rem;left:.35rem;right:.35rem;max-width:none}
}
@media (max-width:430px){
  .cj-public-bel-search input{min-width:7rem;max-width:36vw}
  .cj-bel-inv-counters,.cj-public-bel-counters{font-size:.78rem;gap:.35rem .55rem}
}

.cj-bel-inv-panel.is-collapsed{display:none}
@media (max-width:900px){
  .cj-bel-mobile-bar #cj-bel-toggle-inv{min-height:44px}
}

/* ===== ContPark-like public Terrain Bellerose (presentation only) ===== */
body.cj-park{
  display:flex;flex-direction:column;min-height:100dvh;background:#f4f6f3;
  overflow-x:clip;max-width:100vw;
}
body.cj-park .cj-public-header{flex:0 0 auto}
body.cj-park .cj-public-header__inner{max-width:none;padding:8px 16px}
body.cj-park .cj-public-nav{max-width:none}
body.cj-park .cj-public-main,body.cj-park .cj-park-main{
  flex:1 1 auto;max-width:none;margin:0;padding:0;width:100%;min-width:0;
  display:flex;flex-direction:column;min-height:0;
}
.cj-park-header-cta{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:40px;padding:0 12px;border-radius:999px;
  background:#fff;color:#0f172a;font-weight:700;font-size:.82rem;text-decoration:none;
  white-space:nowrap;
}
.cj-park-stage{
  display:flex;flex:1 1 auto;min-height:0;width:100%;
  position:relative;
}
.cj-park-map{flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column;position:relative}
/* Workspace fills stage; canvas-wrap MUST fill workspace (no green void under legend) */
body.cj-park .cj-bellerose-workspace--public{
  flex:1 1 auto;min-height:0;border:0;border-radius:0;background:#d7e2d2;
  display:flex;flex-direction:column;overflow:hidden;position:relative;
}
/* height:0 + flex:1 = hauteur définie pour que svg height:100% ne reste pas à 150px (défaut SVG) */
body.cj-park .cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{
  position:relative;flex:1 1 auto;min-height:280px;height:0 !important;
  width:100%;touch-action:none;overscroll-behavior:contain;
}
body.cj-park .cj-bellerose-workspace--public .cj-bellerose-svg{
  width:100%;height:100%;min-height:100%;display:block;
}
.cj-park-toolbar{
  position:absolute;z-index:6;top:.55rem;left:.55rem;right:.55rem;
  display:flex;flex-wrap:nowrap;gap:.35rem;align-items:center;
  overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;
  background:rgba(255,255,255,.94);border:1px solid #e2e8f0;border-radius:999px;
  padding:.3rem .55rem .3rem .4rem;box-shadow:0 8px 24px rgba(15,23,42,.08);
  scrollbar-width:thin;max-width:calc(100% - 1.1rem);
  /* léger fondu = indice de scroll horizontal */
  mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 12px),rgba(0,0,0,.35) 100%);
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 12px),rgba(0,0,0,.35) 100%);
}
.cj-park-toolbar::-webkit-scrollbar{height:4px}
.cj-park-toolbar::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}
.cj-park-chip{
  flex:0 0 auto;min-height:36px;padding:.25rem .75rem;border:0;border-radius:999px;
  background:transparent;color:#334155;font:inherit;font-weight:600;font-size:.86rem;
  cursor:pointer;white-space:nowrap;scroll-snap-align:start;
}
.cj-park-chip.is-on{background:#1d4ed8;color:#fff}
.cj-park-search{flex:0 0 auto;margin-left:.15rem}
.cj-park-search input{
  min-width:8.5rem;max-width:34vw;min-height:36px;padding:.25rem .7rem;
  border:1px solid #cbd5e1;border-radius:999px;font:inherit;background:#fff;
}
.cj-park-legend{
  position:absolute;z-index:5;left:.65rem;bottom:.65rem;
  display:flex;flex-wrap:wrap;gap:.35rem .7rem;align-items:center;
  background:rgba(255,255,255,.94);border:1px solid #e2e8f0;border-radius:.65rem;
  padding:.4rem .65rem;font-size:.75rem;color:#334155;max-width:min(420px,70%);
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}
.cj-park-legend span{display:inline-flex;align-items:center;gap:.3rem;white-space:nowrap}
.cj-park-swatch{width:12px;height:12px;border-radius:3px;display:inline-block;border:1px solid transparent;box-sizing:border-box}
.cj-park-swatch--20{background:#3b82f6}
.cj-park-swatch--40{background:#f59e0b}
.cj-park-swatch--empty{background:#f8fafc;border:1.5px dashed #1d4ed8}
.cj-park-swatch--reserve{background:#fff;border:2px solid #ef4444}
.cj-park-swatch--sold{background:#ea580c}
.cj-park-swatch--limit{background:transparent;border:1.5px dashed #ef4444}
.cj-park-controls{
  position:absolute;z-index:5;right:.65rem;bottom:.65rem;
  display:flex;flex-direction:column;gap:.3rem;align-items:center;
  background:rgba(255,255,255,.94);border:1px solid #e2e8f0;border-radius:.75rem;
  padding:.35rem;box-shadow:0 6px 18px rgba(15,23,42,.08);
}
.cj-park-ctrl{
  min-width:40px;min-height:40px;border:0;border-radius:.5rem;background:#f8fafc;
  font:inherit;font-weight:700;cursor:pointer;color:#0f172a;
}
.cj-park-ctrl.is-on,.cj-park-ctrl:hover{background:#e2e8f0}
.cj-park-zoom{font-size:.72rem;color:#64748b;min-width:2.4rem;text-align:center}
.cj-park-sidebar{
  flex:0 0 340px;width:340px;max-width:100%;background:#fff;border-left:1px solid #e2e8f0;
  min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;z-index:8;
}
.cj-park-sidebar[hidden]{display:none !important}
.cj-park-sidebar.is-open{display:block !important}
.cj-park-sidebar__inner{padding:1rem 1.05rem 1.4rem;position:relative}
.cj-park-sidebar__close{
  position:absolute;right:.5rem;top:.5rem;min-width:40px;min-height:40px;
  border:0;background:#f1f5f9;border-radius:999px;cursor:pointer;z-index:2;
}
.cj-park-sidebar h2{margin:.25rem 0 .5rem;font-size:1.15rem;padding-right:2.5rem;overflow-wrap:anywhere}
.cj-park-hero{
  width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:.6rem;background:#e2e8f0;margin-bottom:.65rem;
}
.cj-park-thumbs{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.65rem}
.cj-park-thumbs img{width:64px;height:48px;object-fit:cover;border-radius:.35rem;background:#e2e8f0}
.cj-park-badge{display:inline-block;font-size:.72rem;font-weight:700;padding:.15rem .45rem;border-radius:.3rem}
.cj-park-stats{
  flex:0 0 auto;
  display:flex;flex-wrap:wrap;gap:.55rem 1.1rem;align-items:center;justify-content:center;
  padding:.7rem 1rem;background:#fff;border-top:1px solid #e2e8f0;
  font-size:.88rem;color:#334155;
}
.cj-park-stats span{display:inline-flex;align-items:baseline;gap:.35rem}
.cj-park-stats strong{font-size:1.15rem;color:#0f172a}
.cj-park-foot{flex:0 0 auto;padding:.55rem 1rem;font-size:.82rem}
.cj-park-empty{
  position:absolute;inset:auto 50% 4.5rem auto;transform:translateX(50%);
  z-index:4;background:rgba(255,255,255,.92);padding:.4rem .7rem;border-radius:.5rem;
  font-size:.78rem;color:#475569;pointer-events:none;white-space:nowrap;
}
.cj-bel-inv-slot.is-selected .cj-bel-inv-slot__rect{stroke:#1d4ed8;stroke-width:2.5}
.cj-bel-inv-slot.is-free .cj-bel-inv-slot__rect{stroke-linecap:round;stroke-linejoin:round}
.cj-bel-inv-slot.is-free{cursor:pointer}
/* Fond carte = gazon (pas blanc « vide ») — le SVG ne remplit pas hors terrain */
body.cj-park .cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{
  background:#d7e2d2;
}
body.cj-park .cj-bellerose-workspace--public .cj-bellerose-svg{
  background:#d7e2d2;
}
.cj-park-empty{
  inset:auto auto 5.2rem 50%;
  transform:translateX(-50%);
  white-space:normal;
  max-width:min(320px,86%);
  text-align:center;
  line-height:1.35;
  box-shadow:0 6px 18px rgba(15,23,42,.12);
  border:1px solid #e2e8f0;
}
.cj-park-empty[hidden]{display:none !important}

@media (max-width:900px){
  .cj-park-stage{flex-direction:column}
  .cj-park-sidebar{
    position:fixed;left:0;right:0;bottom:0;z-index:30;
    flex:0 0 auto;width:100%;max-height:min(56dvh,420px);
    border-left:0;border-top:1px solid #e2e8f0;
    border-radius:16px 16px 0 0;box-shadow:0 -8px 28px rgba(15,23,42,.18);
  }
  .cj-park-legend{max-width:calc(100% - 4.6rem);font-size:.7rem}
  .cj-park-header-cta{display:none}
  /* Ne pas étirer main jusqu’en bas (évite le vide entre stats et footer) */
  body.cj-park .cj-park-main{min-height:0;flex:0 1 auto}
  body.cj-park{justify-content:flex-start;min-height:0}
  body.cj-park .cj-park-foot{padding:.45rem 1rem}
  /* Hauteur carte utile (~52dvh) : stats juste dessous */
  body.cj-park .cj-park-stage{min-height:0;flex:0 1 auto;max-height:min(58dvh,560px)}
  body.cj-park .cj-bellerose-workspace--public{flex:1 1 auto;min-height:min(52dvh,480px)}
  body.cj-park .cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{
    min-height:0;height:0 !important;
  }
  body.cj-park .cj-park-foot{margin-top:0}
}
@media (max-width:640px){
  .cj-park-toolbar{
    border-radius:14px;top:.4rem;left:.4rem;right:.4rem;max-width:none;
    padding-right:.75rem;
  }
  .cj-park-search{margin-left:0}
  .cj-park-search input{min-width:6.5rem;max-width:38vw}
  .cj-park-controls{right:.4rem;bottom:.4rem}
  .cj-park-legend{left:.4rem;bottom:.4rem}
  .cj-park-sidebar{max-height:min(58dvh,460px)}
  .cj-park-stats{font-size:.78rem;gap:.4rem .7rem;padding:.55rem .7rem}
  .cj-park-stats strong{font-size:1rem}
}
@media (max-width:430px){
  .cj-park-chip{min-height:34px;padding:.2rem .55rem;font-size:.8rem}
  body.cj-park .cj-bellerose-workspace--public .cj-bellerose-canvas-wrap{
    min-height:0;
  }
  .cj-park-toolbar{
    mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 14px),rgba(0,0,0,.4) 100%);
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 14px),rgba(0,0,0,.4) 100%);
  }
}
@media (min-width:1280px){
  .cj-park-sidebar{flex-basis:380px;width:380px}
}
