/* Krousty Factory homepage video section ("Say my name.").
   Fonts come from the site (fatbold, "Montserrat 2"). Buttons set their own colours for
   :hover/:focus because the theme styles bare buttons. */
/* Type matches the homepage section titles and paragraphs exactly:
   titles fatbold 106/90/74/62.4px, line-height 1, letter-spacing 2px, uppercase;
   text "Montserrat 2" 400, 22px/33px (18px/27px on mobile).
   Width matches the other sections: 50px side padding, content up to 1500px. */
/* the jagged edges scale with the section width (1520x128 image at 102% width), so the
   vertical padding is the edge height plus a fixed gap: content never touches the teeth */
.kf-lab{--p:#702871;--o:#FFB14B;--k:#161416;--edges:url(img/yellow-edges.png);--edge-h:calc(100vw * .0875);--gap:56px;position:relative;background:var(--k);color:#fff;overflow:hidden;padding:calc(var(--edge-h) + var(--gap)) 50px calc(var(--edge-h) + var(--gap))}
.kf-lab::before{content:"";position:absolute;inset:0;pointer-events:none;background:
  radial-gradient(ellipse 32% 50% at 72% 58%,rgba(112,40,113,.45),transparent 70%),
  linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px) 0 0/48px 48px,
  linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px) 0 0/48px 48px}
/* jagged edges: the site's own "yellow-edges" shape, orange on top (from the hero), purple at the bottom (into the next section) */
.kf-lab__edge{position:absolute;left:-1%;width:102%;aspect-ratio:1520/128;z-index:1;pointer-events:none;background:var(--o);
  -webkit-mask:var(--edges) center/100% 100% no-repeat;mask:var(--edges) center/100% 100% no-repeat}
/* the 1deg tilt (same as the site's own edges) lifts one corner: start the edge above/below the
   section so the tilted band still covers it; the overflow is clipped */
.kf-lab__edge--top{top:calc(var(--edge-h) * -.22);transform:rotate(1deg)}
.kf-lab__edge--bottom{bottom:calc(var(--edge-h) * -.22);background:var(--p);transform:scaleY(-1) rotate(1deg)}

/* same content box as the hero: text on the left edge, visual on the right half */
.kf-lab__in{position:relative;z-index:2;max-width:1500px;margin:0 auto;display:grid;grid-template-columns:minmax(0,640px) minmax(0,1fr);gap:80px;align-items:center}
.kf-lab__title{font-family:fatbold,sans-serif;font-weight:400;font-size:106px;line-height:1;letter-spacing:2px;text-transform:uppercase;color:#fff;margin:0}
.kf-lab__title span{color:var(--o)}
.kf-lab__text{font-family:"Montserrat 2",sans-serif;font-weight:400;font-size:22px;line-height:33px;color:#fff;max-width:640px;margin:28px 0 0}
.kf-lab__text b{font-weight:700;color:var(--o)}


/* desktop: a large thumbnail with a play button; the video opens in a popup.
   tablet and phone: the inline player below. */
.kf-lab__stage{position:relative;display:flex;justify-content:flex-end;align-items:center}
.kf-lab__thumb{position:relative;display:block;width:min(560px,100%);aspect-ratio:4/5;padding:0;margin:0;border:10px solid var(--o);border-radius:0;box-shadow:none;background:#000;cursor:pointer;overflow:hidden}
.kf-lab__thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.kf-lab__play{position:absolute;left:50%;top:50%;z-index:1;width:112px;height:112px;margin:-56px 0 0 -56px;display:flex;align-items:center;justify-content:center;background:var(--o);color:var(--k);box-shadow:8px 8px 0 var(--k);transition:transform .2s,background .2s}
.kf-lab__play svg{width:46px;height:46px;margin-left:6px}
.kf-lab__thumb:hover img{transform:scale(1.04)}
.kf-lab__thumb:hover .kf-lab__play{transform:scale(1.08);background:#fff}
.kf-lab__thumb:focus-visible{outline:4px solid #fff;outline-offset:6px}
.kf-lab__media{display:none}
/* inline player (tablet and phone) */
.kf-lab__media{position:relative;z-index:1;aspect-ratio:9/16}
.kf-lab__frame{position:absolute;inset:0;z-index:1;border:10px solid var(--o);box-shadow:none;background:#000;overflow:hidden}
.kf-lab__frame video{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}
.kf-lab__bar{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;gap:10px;padding:28px 10px 10px;background:linear-gradient(transparent,rgba(22,20,22,.85))}
.kf-lab__btn{flex:none;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border:0;border-radius:0;padding:0;background:var(--o);color:var(--k);cursor:pointer}
.kf-lab__btn:hover{background:#fff}
.kf-lab__btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
.kf-lab__btn svg{width:20px;height:20px}
.kf-lab__btn[data-state=playing] .i-play,.kf-lab__btn:not([data-state=playing]) .i-pause{display:none}
.kf-lab__btn[data-state=on] .i-off,.kf-lab__btn:not([data-state=on]) .i-on{display:none}
.kf-lab__track{flex:1;height:4px;background:rgba(255,255,255,.3);cursor:pointer;position:relative}
.kf-lab__track i{position:absolute;left:0;top:0;bottom:0;width:100%;background:var(--o);transform-origin:left;transform:scaleX(0)}
.kf-lab__track::before{content:"";position:absolute;left:0;right:0;top:-10px;bottom:-10px}
.kf-lab__spinner{position:absolute;top:50%;left:50%;width:44px;height:44px;margin:-22px 0 0 -22px;border:4px solid rgba(255,255,255,.25);border-top-color:var(--o);border-radius:50%;animation:kf-spin .8s linear infinite;display:none;pointer-events:none}
.kf-lab__frame.is-loading .kf-lab__spinner{display:block}
@keyframes kf-spin{to{transform:rotate(360deg)}}

@media (max-width:1366px){
 .kf-lab{--gap:48px}
 .kf-lab__title{font-size:90px}
 .kf-lab__thumb{width:min(480px,100%)}
 .kf-lab__in{grid-template-columns:minmax(0,560px) minmax(0,1fr);gap:60px}
}
@media (max-width:1200px){
 .kf-lab__in{grid-template-columns:minmax(0,480px) minmax(0,1fr)}
}
@media (max-width:1024px){
 .kf-lab{--gap:44px}
 .kf-lab__title{font-size:74px}
 .kf-lab__in{grid-template-columns:1fr;gap:48px;justify-items:center;text-align:center}
 .kf-lab__stage{width:100%;justify-content:center}
 .kf-lab__thumb{display:none}
 .kf-lab__media{display:block}
 .kf-lab__text{margin-left:auto;margin-right:auto}
 .kf-lab__media{height:auto;width:min(400px,100%)}
 .kf-lab::before{background:radial-gradient(ellipse 70% 40% at 50% 70%,rgba(112,40,113,.6),transparent 70%),linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px) 0 0/40px 40px,linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px) 0 0/40px 40px}
}
@media (max-width:767px){
 .kf-lab{--gap:36px;padding-left:5%;padding-right:5%}
 .kf-lab__title{font-size:62.4px}
 .kf-lab__text{font-size:18px;line-height:27px;margin-top:20px}
 .kf-lab__media{width:82%}
 .kf-lab__frame{border-width:8px}
}

/* popup player */
.kf-lab-modal{--o:#FFB14B;--k:#161416;position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:4vh 4vw;background:rgba(22,20,22,.92);opacity:0;transition:opacity .2s}
.kf-lab-modal[hidden]{display:none}
.kf-lab-modal.is-open{opacity:1}
.kf-lab-modal__box{position:relative;height:min(92vh,1100px);aspect-ratio:9/16;max-width:100%;border:10px solid var(--o);box-shadow:none;background:#000}
.kf-lab-modal__box video{width:100%;height:100%;display:block;object-fit:contain;background:#000}
.kf-lab-modal__close{position:absolute;top:-4px;right:-64px;width:52px;height:52px;display:flex;align-items:center;justify-content:center;border:0;border-radius:0;padding:0;background:var(--o);color:var(--k);cursor:pointer}
.kf-lab-modal__close:hover{background:#fff}
.kf-lab-modal__close:focus-visible{outline:3px solid #fff;outline-offset:2px}
.kf-lab-modal__close svg{width:26px;height:26px}
@media (max-width:767px){.kf-lab-modal__close{right:6px;top:6px}}

/* theme overrides */
.kf-lab *,.kf-lab *::before,.kf-lab *::after{box-sizing:border-box}
.kf-lab .kf-lab__btn,.kf-lab .kf-lab__btn:focus{margin:0;border:0;border-radius:0;box-shadow:none;background:var(--o);color:var(--k);text-transform:none;line-height:1}
.kf-lab .kf-lab__btn:hover{background:#fff;color:var(--k)}
.kf-lab .kf-lab__title{margin:0;padding:0}
.kf-lab .kf-lab__text{padding:0}
.kf-lab video{max-width:none}
.kf-lab .kf-lab__thumb,.kf-lab .kf-lab__thumb:hover,.kf-lab .kf-lab__thumb:focus{padding:0;margin:0;border:10px solid var(--o);box-shadow:none;border-radius:0;background:#000;color:inherit;text-transform:none}
.kf-lab .kf-lab__thumb img{max-width:none;height:100%;border-radius:0}
.kf-lab-modal .kf-lab-modal__close,.kf-lab-modal .kf-lab-modal__close:focus{margin:0;border:0;border-radius:0;box-shadow:none;background:var(--o);color:var(--k);padding:0}
.kf-lab-modal .kf-lab-modal__close:hover{background:#fff;color:var(--k)}
.kf-lab-modal video{max-width:none}

/* The homepage's "Le succès en chiffres" section draws its own orange edge at its top
   (Elementor image c8930e1). With this section above it, our purple edge replaces it. */
body:has(.kf-lab) .elementor-element-c8930e1{display:none}
