/* BLOOM MODULES — premium interaction layer
   Reusable for quote configurator, cart, availability calendar, bento galleries,
   holographic equipment cards and FLIP catalog grids. */

:root{
  --bm-accent:var(--accent,#EA580C);
  --bm-accent-light:var(--accent-light,#F97316);
  --bm-accent-rgb:var(--accent-rgb,234,88,12);
  --bm-fg:var(--fg,#EDEDEF);
  --bm-muted:var(--fg-muted,#8A8F98);
  --bm-subtle:var(--fg-subtle,#5C606A);
  --bm-bg:var(--bg-deep,#020203);
  --bm-card:var(--bg-card,rgba(255,255,255,.045));
  --bm-elevated:var(--bg-elevated,#0a0a0f);
  --bm-line:var(--line,rgba(255,255,255,.1));
  --bm-line-strong:var(--line-strong,rgba(255,255,255,.18));
  --bm-radius:var(--r-card,16px);
  --bm-pill:var(--r-pill,999px);
  --bm-sans:var(--font-sans,'Geist',system-ui,sans-serif);
  --bm-serif:var(--font-quote,'Playfair Display',Georgia,serif);
  --bm-mono:var(--font-mono,'JetBrains Mono',Menlo,monospace);
  --bm-ease:var(--ease,cubic-bezier(.16,1,.3,1));
}

.bm-module,
.bm-module *{box-sizing:border-box}

.bm-module{
  position:relative;
  color:var(--bm-fg);
  font-family:var(--bm-sans);
  isolation:isolate;
}

.bm-module a{color:inherit}
.bm-module button{font:inherit}

.bm-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--bm-accent);
}

.bm-kicker::before{
  content:"";
  width:28px;
  height:1px;
  background:currentColor;
  opacity:.72;
}

.bm-title{
  margin:12px 0 10px;
  font-family:var(--bm-sans);
  font-size:clamp(28px,4vw,58px);
  font-weight:900;
  line-height:.94;
  letter-spacing:0;
  text-wrap:balance;
  color:var(--bm-fg);
}

.bm-title .it{
  color:var(--bm-accent);
  font-family:var(--bm-serif);
  font-style:italic;
  font-weight:400;
}

.bm-copy{
  max-width:64ch;
  color:var(--bm-muted);
  line-height:1.62;
  font-size:15px;
}

.bm-icon{
  width:44px;
  height:44px;
  display:inline-grid;
  place-items:center;
  border-radius:14px;
  color:var(--bm-accent);
  background:
    radial-gradient(circle at 35% 25%,rgba(var(--bm-accent-rgb),.18),transparent 42%),
    linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.025));
  border:1px solid color-mix(in srgb,var(--bm-accent) 35%,var(--bm-line));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 18px 38px -30px rgba(var(--bm-accent-rgb),.72);
}

.bm-icon svg{
  width:24px;
  height:24px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  overflow:visible;
}

.bm-icon [data-draw]{
  stroke-dasharray:80;
  stroke-dashoffset:80;
  animation:bmDraw 2.8s var(--bm-ease) infinite;
}

.bm-icon [data-pulse]{
  transform-box:fill-box;
  transform-origin:center;
  animation:bmIconPulse 2.3s ease-in-out infinite;
}

.bm-icon [data-spin]{
  transform-box:fill-box;
  transform-origin:center;
  animation:bmSpin 8s linear infinite;
}

@keyframes bmDraw{
  0%{stroke-dashoffset:80;opacity:.35}
  42%,72%{stroke-dashoffset:0;opacity:1}
  100%{stroke-dashoffset:-80;opacity:.35}
}
@keyframes bmIconPulse{
  0%,100%{transform:scale(1);opacity:.76}
  48%{transform:scale(1.18);opacity:1}
}
@keyframes bmSpin{to{transform:rotate(360deg)}}

/* Shared premium card surface */
.bm-glass{
  position:relative;
  overflow:hidden;
  border:1px solid var(--bm-line);
  border-radius:var(--bm-radius);
  background:
    radial-gradient(420px circle at var(--bm-x,50%) var(--bm-y,0%),rgba(var(--bm-accent-rgb),.16),transparent 56%),
    linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.024));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 30px 70px -48px rgba(0,0,0,.78);
  backdrop-filter:blur(16px);
}

.bm-glass::before{
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  background:linear-gradient(115deg,transparent 0 36%,rgba(255,255,255,.18) 44%,transparent 54% 100%);
  transform:translateX(-118%);
  transition:transform .85s var(--bm-ease);
  opacity:.62;
}

.bm-glass:hover::before{transform:translateX(118%)}

/* Holographic cards */
.bm-holo-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.bm-holo-card{
  --bm-rx:0deg;
  --bm-ry:0deg;
  --bm-x:50%;
  --bm-y:50%;
  position:relative;
  min-height:240px;
  padding:22px;
  transform:perspective(900px) rotateX(var(--bm-rx)) rotateY(var(--bm-ry)) translateZ(0);
  transition:transform .18s ease-out,border-color .35s var(--bm-ease),box-shadow .35s var(--bm-ease);
  will-change:transform;
}

.bm-holo-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(280px circle at var(--bm-x) var(--bm-y),rgba(255,255,255,.2),transparent 48%),
    repeating-linear-gradient(115deg,rgba(255,255,255,.055) 0 1px,transparent 1px 9px);
  mix-blend-mode:screen;
  opacity:.22;
  transition:opacity .3s var(--bm-ease);
}

.bm-holo-card:hover{
  border-color:color-mix(in srgb,var(--bm-accent) 58%,transparent);
  box-shadow:0 34px 90px -52px rgba(var(--bm-accent-rgb),.95),inset 0 1px 0 rgba(255,255,255,.08);
}

.bm-holo-card:hover::after{opacity:.48}

.bm-holo-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:28px;
}

.bm-holo-label{
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:800;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--bm-accent);
}

.bm-holo-title{
  font-size:22px;
  font-weight:850;
  line-height:1.05;
  letter-spacing:0;
  color:var(--bm-fg);
  margin:0 0 10px;
  text-wrap:balance;
}

.bm-holo-copy{
  color:var(--bm-muted);
  font-size:14px;
  line-height:1.5;
}

.bm-holo-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:22px;
}

.bm-token{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:1px solid var(--bm-line);
  border-radius:var(--bm-pill);
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--bm-muted);
  background:rgba(255,255,255,.025);
}

.bm-add{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid color-mix(in srgb,var(--bm-accent) 55%,var(--bm-line));
  border-radius:var(--bm-pill);
  padding:12px 16px;
  margin-top:24px;
  background:rgba(var(--bm-accent-rgb),.08);
  color:var(--bm-fg);
  cursor:pointer;
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  transition:transform .28s var(--bm-ease),background .28s var(--bm-ease),border-color .28s var(--bm-ease);
}

.bm-add svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8}
.bm-add:hover{transform:translateY(-2px);background:var(--bm-accent);border-color:var(--bm-accent)}
.bm-add:active{transform:translateY(0) scale(.98)}

/* Quote configurator */
.bm-estimator{
  margin-top:34px;
  padding:24px;
  container-type:inline-size;
}

.bm-estimator-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:22px;
  align-items:stretch;
  margin-top:24px;
}

.bm-panel{
  border:1px solid var(--bm-line);
  border-radius:calc(var(--bm-radius) - 2px);
  background:rgba(0,0,0,.16);
  padding:18px;
}

.bm-control-label{
  display:flex;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--bm-muted);
}

.bm-control-value{color:var(--bm-accent)}

.bm-range{
  width:100%;
  accent-color:var(--bm-accent);
}

.bm-segmented,
.bm-toggle-grid{
  display:grid;
  gap:8px;
}

.bm-segmented{grid-template-columns:1fr;margin:12px 0 18px}
.bm-toggle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

.bm-choice{
  border:1px solid var(--bm-line);
  border-radius:13px;
  padding:11px 10px;
  background:rgba(255,255,255,.026);
  color:var(--bm-muted);
  cursor:pointer;
  text-align:center;
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  transition:all .28s var(--bm-ease);
}

.bm-choice[aria-pressed="true"],
.bm-choice:hover{
  border-color:var(--bm-accent);
  color:var(--bm-fg);
  background:rgba(var(--bm-accent-rgb),.1);
}

.bm-result{
  display:grid;
  align-content:space-between;
  gap:18px;
  min-height:100%;
  background:
    radial-gradient(280px circle at 30% 0%,rgba(var(--bm-accent-rgb),.18),transparent 58%),
    rgba(255,255,255,.035);
}

.bm-result-number{
  font-size:clamp(34px,4vw,58px);
  font-weight:950;
  line-height:.92;
  letter-spacing:0;
  color:var(--bm-fg);
  white-space:nowrap;
}

.bm-result-number span{
  color:var(--bm-accent);
  font-family:var(--bm-serif);
  font-style:italic;
  font-weight:400;
}

.bm-result-note{
  color:var(--bm-muted);
  line-height:1.45;
  font-size:13px;
}

.bm-result-rail{
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.bm-result-rail i{
  display:block;
  height:100%;
  width:var(--bm-progress,45%);
  background:linear-gradient(90deg,var(--bm-accent),var(--bm-accent-light));
  border-radius:inherit;
  transition:width .55s var(--bm-ease);
}

/* Availability calendar */
.bm-calendar{
  margin:18px 0 22px;
  padding:18px;
}

.bm-calendar-head,
.bm-calendar-week,
.bm-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:7px;
}

.bm-calendar-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}

.bm-calendar-month{
  font-weight:850;
  color:var(--bm-fg);
  letter-spacing:0;
}

.bm-calendar-nav{
  display:flex;
  gap:8px;
}

.bm-calendar-nav button,
.bm-day{
  border:1px solid var(--bm-line);
  background:rgba(255,255,255,.026);
  color:var(--bm-muted);
  border-radius:12px;
  cursor:pointer;
  transition:all .24s var(--bm-ease);
}

.bm-calendar-nav button{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
}

.bm-calendar-nav button svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8}
.bm-calendar-nav button:hover,
.bm-day:hover{color:var(--bm-fg);border-color:var(--bm-accent);background:rgba(var(--bm-accent-rgb),.08)}

.bm-calendar-week{
  margin-bottom:7px;
  font-family:var(--bm-mono);
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--bm-subtle);
}

.bm-calendar-week span{text-align:center}

.bm-day{
  min-height:38px;
  font-family:var(--bm-mono);
  font-size:11px;
  font-weight:800;
}

.bm-day[disabled]{
  cursor:not-allowed;
  opacity:.28;
}

.bm-day.is-today{color:var(--bm-accent);border-color:color-mix(in srgb,var(--bm-accent) 35%,var(--bm-line))}
.bm-day.is-selected{background:var(--bm-accent);border-color:var(--bm-accent);color:#fff;box-shadow:0 12px 26px -20px rgba(var(--bm-accent-rgb),.9)}
.bm-day.is-empty{pointer-events:none;opacity:0}

.bm-calendar-status{
  margin-top:12px;
  color:var(--bm-muted);
  font-size:12px;
  line-height:1.45;
}

.bm-calendar-status strong{color:var(--bm-fg)}

/* Quote cart */
.bm-cart-button{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:70;
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid color-mix(in srgb,var(--bm-accent) 50%,var(--bm-line));
  border-radius:var(--bm-pill);
  padding:13px 16px;
  background:rgba(8,8,10,.84);
  color:var(--bm-fg);
  box-shadow:0 18px 54px -28px rgba(0,0,0,.85),0 0 0 1px rgba(255,255,255,.035) inset;
  backdrop-filter:blur(18px);
  cursor:pointer;
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:850;
  letter-spacing:.16em;
  text-transform:uppercase;
  transition:transform .3s var(--bm-ease),background .3s var(--bm-ease),border-color .3s var(--bm-ease);
}

.bm-cart-button:hover{transform:translateY(-3px);border-color:var(--bm-accent);background:rgba(18,18,22,.92)}
.bm-cart-button svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7}
.bm-cart-count{
  min-width:22px;
  height:22px;
  display:inline-grid;
  place-items:center;
  border-radius:50%;
  background:var(--bm-accent);
  color:#fff;
  font-size:10px;
  letter-spacing:0;
}

.bm-cart-backdrop{
  position:fixed;
  inset:0;
  z-index:78;
  background:rgba(0,0,0,.58);
  opacity:0;
  pointer-events:none;
  transition:opacity .28s var(--bm-ease);
}

.bm-cart-backdrop.is-open{opacity:1;pointer-events:auto}

.bm-cart-drawer{
  position:fixed;
  top:18px;
  right:18px;
  bottom:18px;
  z-index:80;
  width:min(430px,calc(100vw - 36px));
  display:flex;
  flex-direction:column;
  transform:translateX(calc(100% + 28px));
  transition:transform .42s var(--bm-ease);
}

.bm-cart-drawer.is-open{transform:translateX(0)}
.bm-cart-drawer .bm-glass{height:100%;padding:22px;display:flex;flex-direction:column}

.bm-cart-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding-bottom:18px;
  border-bottom:1px solid var(--bm-line);
}

.bm-cart-close{
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid var(--bm-line);
  background:rgba(255,255,255,.04);
  color:var(--bm-fg);
  cursor:pointer;
}

.bm-cart-items{
  display:grid;
  gap:10px;
  padding:18px 0;
  overflow:auto;
  flex:1;
}

.bm-cart-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--bm-line);
  border-radius:14px;
  padding:12px;
  background:rgba(255,255,255,.03);
}

.bm-cart-item strong{display:block;font-size:13px;color:var(--bm-fg)}
.bm-cart-item small{display:block;margin-top:3px;color:var(--bm-muted);font-family:var(--bm-mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase}
.bm-cart-remove{
  border:0;
  background:transparent;
  color:var(--bm-subtle);
  cursor:pointer;
  font-size:20px;
  line-height:1;
}

.bm-cart-empty{
  display:grid;
  place-items:center;
  min-height:190px;
  text-align:center;
  color:var(--bm-muted);
  border:1px dashed var(--bm-line);
  border-radius:16px;
  padding:24px;
}

.bm-cart-actions{
  display:grid;
  gap:10px;
  padding-top:18px;
  border-top:1px solid var(--bm-line);
}

.bm-cart-actions a,
.bm-cart-actions button{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  min-height:46px;
  border-radius:var(--bm-pill);
  border:1px solid var(--bm-line-strong);
  text-decoration:none;
  cursor:pointer;
  font-family:var(--bm-mono);
  font-size:10px;
  font-weight:850;
  letter-spacing:.15em;
  text-transform:uppercase;
  background:transparent;
  color:var(--bm-fg);
}

.bm-cart-actions a:first-child{
  background:var(--bm-accent);
  border-color:var(--bm-accent);
}

/* Bento réalisations */
.bm-bento-section{
  position:relative;
  padding:9vh 4vw 6vh;
  border-top:1px solid var(--bm-line);
  border-bottom:1px solid var(--bm-line);
  background:
    radial-gradient(640px circle at 12% 12%,rgba(var(--bm-accent-rgb),.1),transparent 55%),
    linear-gradient(180deg,rgba(255,255,255,.018),transparent);
}

.bm-bento-inner{max-width:1560px;margin:0 auto}
.bm-bento-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,440px);
  gap:48px;
  align-items:end;
  margin-bottom:32px;
}

.bm-bento-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr .9fr;
  grid-auto-rows:220px;
  gap:14px;
}

.bm-bento-card{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:var(--bm-radius);
  border:1px solid var(--bm-line);
  background:var(--bm-elevated);
  color:var(--bm-fg);
  text-decoration:none;
  transform:translateZ(0);
}

.bm-bento-card:nth-child(1){grid-row:span 2}
.bm-bento-card:nth-child(4){grid-column:span 2}
.bm-bento-card img,
.bm-bento-card video{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:saturate(.92) brightness(.82);
  transition:transform 1.2s var(--bm-ease),filter .5s var(--bm-ease);
}

.bm-bento-card:hover img,
.bm-bento-card:hover video{
  transform:scale(1.08);
  filter:saturate(1.05) brightness(1);
}

.bm-bento-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.72));
  pointer-events:none;
}

.bm-bento-meta{
  position:absolute;
  left:18px;
  right:18px;
  bottom:16px;
  z-index:2;
}

.bm-bento-label{
  display:block;
  margin-bottom:8px;
  font-family:var(--bm-mono);
  font-size:9px;
  font-weight:850;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--bm-accent);
}

.bm-bento-title{
  display:block;
  font-size:20px;
  font-weight:850;
  line-height:1.05;
  text-wrap:balance;
}

/* FLIP grid helpers */
[data-bm-flip-grid] > *{
  transition:border-color .32s var(--bm-ease),box-shadow .32s var(--bm-ease),transform .42s var(--bm-ease),opacity .32s var(--bm-ease);
}
[data-bm-flip-grid] > *.bm-filtering-out{
  opacity:0;
  transform:scale(.965) translateY(14px);
  pointer-events:none;
}

/* Formules and catalogue upgrades */
.bm-formule-action{
  margin-top:16px;
}

.formule[data-bm-formula="1"]{
  opacity:1!important;
  transform:none!important;
}

/* Responsive */
@media(max-width:980px){
  .bm-estimator-grid,
  .bm-bento-head{grid-template-columns:1fr}
  .bm-holo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bm-bento-grid{grid-template-columns:1fr 1fr;grid-auto-rows:200px}
  .bm-bento-card:nth-child(1){grid-row:span 1}
  .bm-bento-card:nth-child(4){grid-column:span 1}
}

@container (min-width:760px){
  .bm-estimator-grid{grid-template-columns:minmax(0,1.05fr) minmax(300px,.75fr)}
  .bm-segmented{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:640px){
  .bm-estimator{padding:18px;margin-top:24px}
  .bm-estimator-grid{gap:14px}
  .bm-segmented{grid-template-columns:1fr}
  .bm-toggle-grid{grid-template-columns:1fr}
  .bm-holo-grid{grid-template-columns:1fr}
  .bm-holo-card{min-height:210px}
  .bm-calendar{padding:14px}
  .bm-day{min-height:34px;border-radius:10px}
  .bm-bento-section{padding:7vh 4vw}
  .bm-bento-grid{grid-template-columns:1fr;grid-auto-rows:240px}
  .bm-cart-button{left:18px;right:18px;justify-content:center;bottom:18px}
}

@media (prefers-reduced-motion:reduce){
  .bm-icon [data-draw],
  .bm-icon [data-pulse],
  .bm-icon [data-spin],
  .bm-glass::before{animation:none!important;transition:none!important}
}
