/* =================================================================
   Studio — Cleaned & Consolidated CSS
   Notes:
   - Variables centralize z-index, colors, spacing.
   - Removed duplicates (case-grid, case-block, text styles, motions).
   - Grouped responsive rules; respected original visuals.
   ================================================================= */

/* ===============================
   Variables
=============================== */
:root {
  /* layout */
  --container-max: 1200px;
  --gap: 20px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;

  /* colors */
  --text: #fff;
  --bg-glass: rgba(255,255,255,0.08);
  --bg-glass-strong: rgba(255,255,255,0.10);
  --bg-overlay: rgba(0,0,0,0.95);
  --ink-weak: rgba(255,255,255,0.6);
  --ink-mid: rgba(255,255,255,0.85);

  /* accents */
  --accent-color: #A1FFCE;
  --accent-hover: #FAFFD1;

  /* effects */
  --blur: 10px;
  --shadow-1: 0 14px 40px rgba(0,0,0,.28);
  --shadow-2: 0 22px 58px rgba(0,0,0,.36);
  --shadow-3: 0 28px 72px rgba(0,0,0,.38);

  /* z-index */
  --z-header: 100;
  --z-menu: 2000;
  --z-logo: 2100;
  --z-burger: 2200;

  /* hero */
  --hero-min-h: clamp(60vh, 86vh, 100vh);
  --hero-gap-top: 120px;
}

/* ===============================
   Global
=============================== */
html, body {
  margin: 0; padding: 0; height: 100%; min-height: 100vh;
  font-family: 'Poppins', sans-serif; color: var(--text);
  background: url('../images/background2.png') no-repeat center/cover;
  overflow-x: hidden;
}

/* Section intro */
.section-header { text-align: center; padding: 96px 20px 56px; }
.section-header h1, .section-header p { max-width: 800px; margin: 0 auto; }

/* ===============================
   Hero
=============================== */
.studio-hero-block { padding: var(--hero-gap-top) 20px 20px; }

.hero-card {
  position: relative; margin: 0 auto; max-width: var(--container-max);
  aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  background: rgba(255,255,255,0.06); backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.12);
  isolation: isolate;
}
.hero-card::before{ content:""; position:absolute; inset:0;
  background: radial-gradient(120% 120% at 50% -10%, rgba(255,255,255,0.12), rgba(255,255,255,0) 40%);
  pointer-events:none;
}
.hero-card video, .hero-card .hero-poster { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.hero-card .hero-poster{ transition:opacity .4s ease; }
.hero-card.is-playing .hero-poster{ opacity:0; visibility:hidden; }

.play-btn{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  display:inline-flex; align-items:center; gap:.6rem;
  padding:14px 18px; border-radius:999px; border:1px solid rgba(255,255,255,.35);
  background:rgba(0,0,0,.35); color:#fff; font-weight:700; letter-spacing:.02em;
  backdrop-filter:blur(6px); cursor:pointer; z-index:2;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.play-btn svg{ width:20px; height:20px; }
.play-btn:hover{ transform:translate(-50%,-50%) scale(1.04); background:rgba(0,0,0,.45); box-shadow:0 6px 22px rgba(0,0,0,.35); }
.play-btn:focus-visible{ outline:2px solid var(--accent-color); outline-offset:4px; }
.hero-card.is-playing .play-btn{ opacity:0; pointer-events:none; }

/* Mobile portrait hero */
@media (max-width: 768px) {
  .hero-card { aspect-ratio: 9/16; max-height: 90vh; }
}

/* ===============================
   Header & Navigation
=============================== */
.header{
  background: none; box-shadow: none; height:auto; position:absolute; inset:0 auto auto 0;
  width:100%; padding:0; z-index: var(--z-header);
}

.burger-menu{
  position: fixed; top:20px; left:20px; z-index: var(--z-burger);
  display:flex; flex-direction:column; justify-content:space-between;
  width:28px; height:22px; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.burger-menu span{
  display:block; width:100%; height:3px; background:#fff; border-radius:2px;
  transform-origin:50% 50%; transition: transform .28s ease, opacity .28s ease, background .28s ease;
}
.burger-menu.open span { background:#fff; }
.burger-menu.open span:nth-child(1){ transform: translateY(9px) rotate(45deg); }
.burger-menu.open span:nth-child(2){ opacity: 0; }
.burger-menu.open span:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }

.logo{
  position: fixed; top:16px; left:50%; transform:translateX(-50%);
  z-index: var(--z-logo); text-align:center;
}
.logo img{ height:56px; transition: transform .3s ease; }
.logo:hover img{ transform: scale(1.05); }

.menu{
  display:none; position:fixed; inset:0; width:100vw; height:100vh; z-index: var(--z-menu);
  background: var(--bg-overlay); justify-content:center; align-items:center; flex-direction:column; gap:20px;
  opacity:0; transform:scale(1.04); transition: opacity .4s ease, transform .4s ease;
}
.menu.open{ display:flex; opacity:1; transform:scale(1); }
.menu a{
  color:#fff; text-transform:uppercase; font-weight:700; text-align:center; text-decoration:none;
  font-size: clamp(1.25rem, 3.6vw, 1.75rem); transition: color .25s ease;
}
.menu a:hover{ color:#ddd; }

/* ===============================
   Cases — horizontal carousel (CSS-first)
=============================== */
.case-grid{
  display:flex; flex-wrap:nowrap; gap:20px; overflow-x:auto; padding: 28px 20px;
  scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; scroll-behavior:smooth;
  perspective:1000px; /* subtle depth */
  /* premium viewport fade */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  scrollbar-gutter: stable both-edges;
}
.case-grid::-webkit-scrollbar{ height:0; display:none; }

.case-block{
  flex: 0 0 min(78vw, 520px);
  max-width: 520px;
  position: relative; display:grid; grid-template-rows:auto 1fr; gap:14px;
  padding:14px; border-radius: var(--radius-md); overflow:hidden; scroll-snap-align:center;
  background: var(--bg-glass); border:1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(var(--blur)); box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease, opacity .35s ease;
  transform: translateZ(0) scale(var(--s,1)) rotateY(var(--ry,0deg)); transform-origin:center;
  will-change: transform, box-shadow, opacity;
  animation: caseIn .7s ease both;
}
.case-block::before{
  content:""; position:absolute; inset:-35% -15% auto -15%; height:55%;
  background: radial-gradient(60% 60% at 50% 30%, rgba(255,255,255,.14), rgba(255,255,255,0) 70%);
  pointer-events:none; z-index:0;
}
.case-block:hover {
  /* on compose avec les variables dynamiques */
  transform: translateY(-6px) scale(calc(var(--s, 1) * 1.02)) rotateY(var(--ry, 0deg));
  box-shadow: var(--shadow-2);
  background: var(--bg-glass-strong);
}

/* Staggered entrance */
.case-block:nth-child(1) { animation-delay: .00s; }
.case-block:nth-child(2) { animation-delay: .08s; }
.case-block:nth-child(3) { animation-delay: .16s; }
.case-block:nth-child(4) { animation-delay: .24s; }
.case-block:nth-child(5) { animation-delay: .32s; }
.case-block:nth-child(6) { animation-delay: .40s; }
@keyframes caseIn { from { opacity: 0; transform: translateY(18px) scale(.965); } to { opacity: 1; transform: translateY(0) scale(1); } }

.case-media{ position:relative; width:100%; aspect-ratio:9/16; border-radius: var(--radius-sm); overflow:hidden; isolation:isolate; }
.case-media::after{ content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.10) 100%); pointer-events:none; }
.case-media img, .case-media video{ width:100%; height:100%; object-fit:cover; display:block; transform: scale(1.02); transition: transform .6s ease; }
@media (hover:hover){ .case-block:hover .case-media img, .case-block:hover .case-media video{ transform: translateY(-1px) scale(1.07); } }

.case-text{ position:relative; z-index:1; text-align:left; padding: 8px 14px 18px; }
.case-text h2{ font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight:900; letter-spacing:.08em; margin:0 0 6px; text-transform:uppercase; color:#fff; }
.case-text p{ margin:0; font-size: clamp(0.98rem, 1.2vw, 1.1rem); line-height:1.7; color: rgba(255,255,255,.92); }

.case-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.case-tags span{ font-size:.82rem; font-weight:600; color: rgba(255,255,255,.95); border:1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); padding:6px 10px; border-radius:999px; backdrop-filter: blur(6px); transition: background .25s ease, border-color .25s ease, transform .25s ease; }
.case-tags span:hover{ background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.30); transform: translateY(-1px); }

.case-cta{ margin-top:12px; }
.case-cta a{ display:inline-flex; align-items:center; gap:.5rem; padding:10px 14px; border-radius:999px; border:1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color:#fff; font-weight:700; text-decoration:none; letter-spacing:.02em; backdrop-filter: blur(6px); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.case-cta a:hover{ transform: translateY(-1px); background: rgba(0,0,0,.45); box-shadow: 0 6px 22px rgba(0,0,0,.35); }

/* ===============================
   Text blocks — enhanced
=============================== */
.section-header .kicker{ display:inline-block; font-size:.8rem; letter-spacing:.22em; text-transform:uppercase; color:rgba(255,255,255,.85); background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); padding:6px 10px; border-radius:999px; margin-bottom:14px; backdrop-filter: blur(6px); }
.section-header h1{ font-size: clamp(2rem, 5.6vw, 3.6rem); font-weight:900; line-height:1.1; letter-spacing:.01em; margin:8px auto 12px; background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.78) 70%, rgba(255,255,255,.55) 100%); -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:0 1px 0 rgba(0,0,0,.12); }
.section-header p{ font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.75; color: rgba(255,255,255,.9); }
.section-header .lead{ font-size: clamp(1.15rem, 1.6vw, 1.35rem); color: rgba(255,255,255,.95); }

.accent-underline{ position:relative; display:inline-block; }
.accent-underline::after{ content:""; position:absolute; left:0; right:0; bottom:-4px; height:6px; background: linear-gradient(90deg, var(--accent-color), var(--accent-hover)); opacity:.6; border-radius:6px; transform: translateY(2px); }

.case-text a, .section-header a{ color:#fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: rgba(255,255,255,.5); transition: text-decoration-color .2s ease, color .2s ease; }
.case-text a:hover, .section-header a:hover{ text-decoration-color: rgba(255,255,255,.9); }

.meta-chips{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:12px; }
.meta-chips .chip{ font-size:.8rem; color:rgba(255,255,255,.9); border:1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); padding:6px 10px; border-radius:999px; backdrop-filter: blur(6px); }

/* ===============================
   Services
=============================== */
.services-section{ max-width:1100px; margin:100px auto; padding:40px 20px; text-align:center; }
.services-section h2{ font-size:2.5rem; font-weight:900; margin-bottom:60px; text-transform:uppercase; letter-spacing:2px; }
.services-container{ display:grid; grid-template-columns: repeat(2, 1fr); gap:40px; }
.service-block{ position:relative; overflow:hidden; text-align:left; padding:50px 30px; border-radius: var(--radius-lg); background: var(--bg-glass); border:1px solid rgba(255,255,255,.15); backdrop-filter: blur(12px); box-shadow: 0 15px 40px rgba(0,0,0,0.3); transition: transform .4s ease, box-shadow .4s ease, background .4s ease; }
.service-block::before{ content:""; position:absolute; inset:0; background: radial-gradient(60% 60% at 20% 0%, rgba(255,255,255,0.18), transparent 70%); opacity:0; transition: opacity .5s ease; }
.service-block:hover{ transform: translateY(-8px) scale(1.015); box-shadow: 0 22px 56px rgba(0,0,0,0.38); background: rgba(255,255,255,0.1); }
.service-block:hover::before{ opacity:1; }
.service-content{ position:relative; z-index:1; }
.service-block h3{ font-size:1.9rem; font-weight:800; margin:0 0 8px; text-transform:uppercase; letter-spacing:.04em; }
.service-tagline{ font-size:1.15rem; font-weight:600; margin:0 0 14px; color: rgba(255,255,255,0.92); }
.service-description{ font-size:1rem; line-height:1.7; color: rgba(255,255,255,0.86); margin:0 0 22px; }
.service-tags{ display:flex; flex-wrap:wrap; gap:10px; }
.service-tags span{ font-size:.85rem; font-weight:600; color: rgba(255,255,255,0.95); border:1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); padding:6px 14px; border-radius:999px; backdrop-filter: blur(6px); transition: background .3s ease, transform .3s ease, border-color .3s ease; }
.service-tags span:hover{ background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.32); transform: translateY(-2px); }

/* ===============================
   Stats
=============================== */
.stats-section{ max-width:1200px; width:100%; margin:50px auto 0; padding:20px 0; display:flex; justify-content:space-around; align-items:center; background:transparent; }
.stat-block{ text-align:center; padding:10px; box-sizing:border-box; }
.stat-block h3{ font-size:70px; font-weight:900; margin-bottom:5px; }
.stat-block p{ font-size:1rem; line-height:1.6; color: rgba(255,255,255,0.85); }

/* ===============================
   Logos Marquee
=============================== */
.client-logos{ max-width:1000px; width:100%; margin:50px auto; display:flex; justify-content:center; align-items:center; padding:40px 0; }
.logo-wrapper{ display:flex; gap:50px; justify-content:center; align-items:center; animation: scroll-logos 25s linear infinite; }
.logo-wrapper img{ width:200px; height:auto; object-fit:contain; }
@keyframes scroll-logos{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }

/* ===============================
   Footer
=============================== */
footer{ width:100%; background:#000; text-align:center; font-size:.75rem; color: var(--ink-weak); padding:15px; position:relative; }
footer::before{ content:""; position:absolute; top:0; left:0; width:100%; height:4px; background: linear-gradient(90deg, var(--accent-color), var(--accent-hover)); }
.follow-us{ margin-top:10px; font-size:.875rem; }
.follow-us a{ margin-left:10px; font-weight:700; transition: color .2s ease; }
.follow-us a:hover{ color: var(--accent-color); }

/* ===============================
   Utilities
=============================== */
.text-center{ text-align:center; }
.mt-2{ margin-top:2rem; }
.mb-2{ margin-bottom:2rem; }
.p-1{ padding:1rem; }

/* ===============================
   Responsive
=============================== */
@media (max-width: 1024px){ .logo img{ height:52px; } }
@media (max-width: 900px){ .case-grid{ gap:22px; } }
@media (max-width: 860px){ .services-container{ grid-template-columns:1fr; } }
@media (max-width: 768px){
  :root{ --hero-gap-top: 96px; }
  .services-section, .stats-section, .client-logos{ max-width:100%; margin:20px auto; }
  .stats-section{ flex-direction:column; align-items:center; gap:22px; padding:28px 20px; margin:40px auto 0; max-width:500px; }
  .stat-block{ width:100%; min-height:120px; background: var(--bg-glass); border:1px solid rgba(255,255,255,0.2); border-radius: var(--radius-md); backdrop-filter: blur(var(--blur)); box-shadow: 0 10px 28px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.08); padding:22px 16px; text-align:center; position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:center; }
  .stat-block::before{ content:""; position:absolute; inset:0; background: radial-gradient(circle at top, rgba(255,255,255,0.15), transparent 70%); opacity:.8; pointer-events:none; }
  .stat-block h3{ font-size: clamp(38px, 12vw, 60px); line-height:1; margin:0 0 8px; font-weight:900; background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,.8) 70%, rgba(255,255,255,.55) 100%); -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:0 2px 12px rgba(0,0,0,0.25); }
  .stat-block p{ margin:0; font-size:1rem; line-height:1.6; color: rgba(255,255,255,0.92); font-weight:500; }
}
@media (max-width: 600px){ .case-block{ flex-basis:88%; max-width:none; } }
@media (max-width: 520px){ .case-block{ flex-basis:88%; } }

/* ===============================
   Accessibility / Motion
=============================== */
@media (prefers-reduced-motion: reduce){
  .logo-wrapper{ animation-duration:0s; }
  .menu, .service-block, .case-block{ transition:none; }
}

/* Plus d'air avant le footer */
.cases-section{ margin-bottom: 140px; }

/* (Optionnel) réduit le “pop” sur mobile très étroit */
@media (max-width: 520px){
  .case-block{ --s: 1; } /* base sans sur-amplifier si le JS n’a pas encore tourné */
}
