/* ==========================================================
   Accueil EHBH Motion : configurateur de pub + fabrication en direct
   ========================================================== */

/* ---------- 1. Configurateur ---------- */
.cfg { position: relative; min-height: 100vh; min-height: 100svh; padding: 110px 0 60px; display: flex; align-items: center; overflow: hidden; }
.cfg::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 50% 60% at 72% 45%, rgba(198, 164, 103, .14), transparent 70%); }
.cfg__inner { position: relative; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.cfg__inner > * { min-width: 0; }
.cfg h1 { font-size: clamp(44px, min(6vw, 10.5vh), 96px); line-height: .98; }
.cfg .lead { margin: min(24px, 2.6vh) 0 min(34px, 3.6vh); font-size: 17px; }
.cfg__group { margin-bottom: min(22px, 2.4vh); }
.cfg__label { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.cfg__choices { display: flex; flex-wrap: wrap; gap: 8px; }
.cfg__choices button { background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 11px 18px; font-size: 14px; display: inline-flex; align-items: baseline; gap: 6px; transition: border-color .3s, background .3s, color .3s; }
.cfg__choices button b { font-weight: 500; }
.cfg__choices button:hover { border-color: var(--muted); }
.cfg__choices button[aria-checked="true"] { border-color: var(--gold); background: rgba(198, 164, 103, .1); color: var(--gold-soft); }
.cfg__actions { margin-top: min(30px, 3.4vh); align-items: center; gap: 24px; }
.cfg__note { margin-top: 18px; font-size: 12px; color: #5d5a54; }

.cfg__preview { display: flex; align-items: center; justify-content: center; gap: 34px; }

/* Téléphone (bordure fine) */
.pv-phone { position: relative; aspect-ratio: 9 / 18.6; border-radius: 13% / 6.3%; padding: 1.6%; background: #0c0d0f;
  box-shadow: 0 0 0 1px #4a4c52, 0 0 0 2px #1a1b1e, inset 0 0 0 1px rgba(255, 255, 255, .08), 0 50px 90px -24px rgba(0, 0, 0, .95); }
.pv-phone__island { position: absolute; z-index: 5; left: 50%; top: 2.6%; width: 28%; height: 2.6%; margin-left: -14%; background: #000; border-radius: 20px; }
.pv-phone__screen { position: relative; height: 100%; border-radius: 11.5% / 5.5%; overflow: hidden; background: #000; }
.pv-phone--hero { width: min(300px, 25vw, 40vh); }

/* La pub qui se joue */
.ad { position: absolute; inset: 0; color: #fff; font-family: var(--serif); }
.ad video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.ad.is-changing video { opacity: .2; }
.ad::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 26%, transparent 52%, rgba(0,0,0,.75)); pointer-events: none; }
.ad > *:not(video) { position: absolute; z-index: 2; }
.ad__brand { top: 9%; left: 0; right: 0; text-align: center; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; font-family: var(--sans); font-weight: 500; }
.ad__stage { inset: 22% 8% 30%; display: grid; place-items: center; text-align: center; }
.ad__beat { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.05; text-shadow: 0 4px 24px rgba(0,0,0,.55); }
.ad__beat em { font-style: italic; color: var(--gold-soft); }
.ad__beat.is-in { animation: beatIn .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes beatIn { from { opacity: 0; transform: scale(1.18); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.ad__sub { left: 8%; right: 8%; bottom: 13%; text-align: center; font-family: var(--sans); font-size: 10px; background: rgba(0,0,0,.6); padding: 4px 8px; border-radius: 3px; opacity: 0; transition: opacity .3s; }
.ad__sub.is-on { opacity: 1; }
.ad__end { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(8, 9, 11, .55); opacity: 0; transition: opacity .5s; }
.ad__end.is-on { opacity: 1; }
.ad__end small { font-family: var(--sans); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); }
.ad__end b { font-weight: 500; font-size: 26px; text-align: center; padding: 0 10%; }
.ad__sticker { display: none; }
.ad__progress { left: 8%; right: 8%; bottom: 7%; height: 2px; background: rgba(255,255,255,.25); }
.ad__progress span { display: block; height: 100%; width: 0; background: var(--gold); }
.ad__bars { display: none; top: 4.5%; left: 6%; right: 6%; gap: 4px; }
.ad__bars i { flex: 1; height: 2px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.ad__bars i b { position: absolute; inset: 0; width: 0; background: #fff; }
/* Variante Story : barres en haut et pastille cliquable */
.ad[data-format="story"] .ad__bars { display: flex; }
.ad[data-format="story"] .ad__progress { display: none; }
.ad[data-format="story"] .ad__brand { top: 8%; }
.ad[data-format="story"] .ad__end b { display: none; }
.ad[data-format="story"] .ad__sticker { display: block; position: static; font-family: var(--sans); font-size: 12px; font-weight: 600; background: #fff; color: #111; padding: 9px 16px; border-radius: 999px; }
/* Variante Pub 30 s : bandeau « voix off » */
.ad[data-format="pub"] .ad__brand::after { content: " · Voix off"; color: var(--gold-soft); letter-spacing: .1em; text-transform: none; font-weight: 400; }

/* Anatomie de la vidéo */
.anat { position: relative; width: 210px; }
.anat__title { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.anat__track { display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); padding-left: 16px; }
.anat__seg { font-size: 13px; color: var(--muted); padding: 8px 12px; border: 1px solid var(--line); transition: border-color .3s, color .3s, background .3s; }
.anat__seg small { display: block; font-size: 10px; color: #5d5a54; }
.anat__seg.is-on { border-color: var(--gold); color: var(--ink); background: rgba(198, 164, 103, .08); }

/* ---------- 2. Méthode : la vidéo se fabrique ---------- */
.bs { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.bs > * { min-width: 0; }
.bs__stage { grid-column: 2; grid-row: 1; position: sticky; top: 12vh; align-self: start; height: 76vh; min-height: 460px; display: flex; flex-direction: column; }
.bs__steps { grid-column: 1; grid-row: 1; }
.bs__step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .5s; }
.bs__step.is-active { opacity: 1; }
.bs__step .num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 24px; }
.bs__step h3 { font-size: clamp(40px, 4.4vw, 64px); margin: 10px 0 16px; }
.bs__step p { color: var(--muted); font-size: 17px; max-width: 430px; }
.bs__step .result { margin-top: 18px; color: var(--gold-soft); font-size: 14px; }
.bs__screen { position: relative; flex: 1; border: 1px solid var(--line); background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(198, 164, 103, .08), transparent 70%), var(--bg2); overflow: hidden; }
.bs__progress { list-style: none; display: flex; margin-top: 16px; border-top: 1px solid var(--line); }
.bs__progress li { flex: 1; padding-top: 10px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #5d5a54; position: relative; transition: color .4s; }
.bs__progress li::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--gold); transition: width .5s; }
.bs__progress li.is-done { color: var(--muted); } .bs__progress li.is-done::before { width: 100%; }
.bs__progress li.is-active { color: var(--gold); } .bs__progress li.is-active::before { width: 100%; }

/* Chaque étape est une maquette qui apparaît à son tour */
.mk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .6s, transform .7s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.bs__screen[data-stage="1"] .mk--brief, .bs__screen[data-stage="2"] .mk--script, .bs__screen[data-stage="3"] .mk--board,
.bs__screen[data-stage="4"] .mk--edit, .bs__screen[data-stage="5"] .mk--voice, .bs__screen[data-stage="6"] .mk--deliver { opacity: 1; transform: none; }
.mk__title { font-family: var(--serif); font-size: 26px; margin-bottom: 12px; }
.mk__title small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 8px; letter-spacing: .1em; }
.sb__img { display: block; background: var(--poster, #222) center / cover; }

.mk--brief ul, .mk--script > * { width: min(420px, 80%); }
.mk--brief { flex-direction: column; }
.mk--brief ul { list-style: none; border: 1px solid var(--gold); background: var(--bg); padding: 8px 20px; }
.mk--brief li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mk--brief li:first-child { border-top: 0; }
.mk--brief li span { color: var(--muted); }
.mk--brief li b { font-weight: 500; color: var(--gold-soft); text-align: right; }

.mk--script { flex-direction: column; }
.mk--script .mk__title, .mk--script .mk__line, .mk--script .mk__ok { width: min(440px, 82%); }
.mk__line { background: #f4efe6; color: #1d2a3a; padding: 12px 16px; border-left: 3px solid var(--gold); margin-bottom: 8px; }
.mk__line span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8a7a5e; }
.mk__line b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.mk__ok { color: #6fbf8b; font-size: 13px; margin-top: 6px; }

.mk--board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 6%; align-content: center; }
.sb { display: flex; flex-direction: column; gap: 6px; }
.sb .sb__img { aspect-ratio: 9 / 16; border: 1px solid var(--line); filter: grayscale(.85) contrast(1.1) sepia(.15); }
.sb__img--1 { background-position: 50% 20%; } .sb__img--2 { background-position: 30% 60%; background-size: 160%; } .sb__img--3 { background-position: 80% 50%; background-size: 180%; } .sb__img--4 { filter: brightness(.45) grayscale(.6); }
.sb span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.sb b { font-family: var(--serif); font-weight: 400; font-size: 14px; line-height: 1.15; }

.mk--edit { flex-direction: column; gap: 14px; padding: 0 7%; }
.ed__monitor { position: relative; width: 100%; aspect-ratio: 16 / 7; border: 1px solid var(--line); overflow: hidden; }
.ed__monitor .sb__img { position: absolute; inset: 0; }
.ed__tc { position: absolute; right: 10px; bottom: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; background: rgba(0,0,0,.6); padding: 2px 6px; }
.ed__tracks { position: relative; width: 100%; background: #0a0b0d; border: 1px solid var(--line); padding: 8px 10px 8px 0; }
.ed__tracks p { position: relative; height: 24px; margin: 3px 0 3px 38px; }
.ed__tracks p span { position: absolute; left: -32px; top: 4px; font-size: 10px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.ed__tracks i { position: absolute; top: 0; bottom: 0; font-style: normal; font-size: 10px; padding: 4px 6px; border-radius: 3px; overflow: hidden; white-space: nowrap; }
.ed__t { background: rgba(198, 164, 103, .35); color: var(--ink); }
.ed__v { background: var(--poster, #333) center / cover; opacity: .9; }
.ed__v--2 { background-position: 20% 60%; } .ed__v--3 { background-position: 80% 30%; }
.ed__a { background: rgba(111, 191, 139, .25); color: #bfe6cc; }
.ed__a--voice { background: rgba(159, 183, 216, .3); color: #d5e2f3; }
.ed__head { position: absolute; top: 0; bottom: 0; left: 38px; width: 2px; background: var(--gold-soft); }
.bs__screen[data-stage="4"] .ed__head { animation: playhead 6s linear infinite; }
@keyframes playhead { to { left: calc(100% - 4px); } }

.mk--voice { gap: 30px; padding: 0 6%; }
.vo__phone { position: relative; width: 150px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.vo__phone .sb__img { position: absolute; inset: 0; }
.vo__sub { position: absolute; left: 8%; right: 8%; bottom: 10%; font-size: 10px; text-align: center; background: rgba(0,0,0,.65); padding: 4px 6px; }
.vo__panel { max-width: 300px; }
.vo__wave { display: flex; align-items: center; gap: 3px; height: 60px; margin-bottom: 16px; }
.vo__wave i { flex: 1; background: var(--gold); border-radius: 2px; height: 30%; }
.bs__screen[data-stage="5"] .vo__wave i { animation: wave 1.1s ease-in-out infinite; }
.vo__wave i:nth-child(3n) { animation-delay: .15s !important; } .vo__wave i:nth-child(3n+1) { animation-delay: .35s !important; } .vo__wave i:nth-child(4n) { animation-delay: .55s !important; }
@keyframes wave { 50% { height: 95%; } }
.vo__opt { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.vo__opt b { color: var(--ink); font-weight: 500; }

.mk--deliver { flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 0 6%; align-content: center; }
.dl { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.dl .sb__img { border: 1px solid var(--gold); box-shadow: 0 20px 40px -16px rgba(0,0,0,.8); }
.dl--916 { width: 110px; aspect-ratio: 9 / 16; } .dl--45 { width: 150px; aspect-ratio: 4 / 5; } .dl--169 { width: 240px; aspect-ratio: 16 / 9; }
.dl small { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.dl__ok { flex-basis: 100%; text-align: center; color: #6fbf8b; font-size: 13px; }

/* ---------- 3. Formats ---------- */
.ft { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ft > * { min-width: 0; }
.ft__card { border: 1px solid var(--line); background: var(--bg); padding: 30px 24px; display: flex; flex-direction: column; transition: border-color .4s, transform .4s; }
.ft__card:hover { border-color: rgba(198, 164, 103, .5); transform: translateY(-4px); }
.ft__ratio { display: block; height: 70px; margin-bottom: 22px; }
.ft__ratio::before { content: ""; display: block; height: 100%; border: 1px solid var(--gold); background: rgba(198, 164, 103, .08); }
.ft__ratio--916::before { width: 40px; } .ft__ratio--45::before { width: 56px; } .ft__ratio--169::before { width: 124px; height: 70px; }
.ft__ratio--multi { display: flex; align-items: flex-end; gap: 6px; } .ft__ratio--multi::before { display: none; }
.ft__ratio--multi i { border: 1px solid var(--gold); background: rgba(198, 164, 103, .08); }
.ft__ratio--multi i:nth-child(1) { width: 30px; height: 54px; } .ft__ratio--multi i:nth-child(2) { width: 44px; height: 44px; } .ft__ratio--multi i:nth-child(3) { width: 70px; height: 40px; }
.ft__dur { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 20px; }
.ft__card h3 { font-size: 30px; margin: 4px 0 10px; }
.ft__card p:not(.ft__dur) { color: var(--muted); font-size: 14px; flex: 1; }
.ft__card small { margin-top: 18px; font-size: 11px; color: var(--gold-soft); letter-spacing: .04em; }

/* ---------- 4. Formules ---------- */
.fm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fm > * { min-width: 0; }
.fm__card { position: relative; border: 1px solid var(--line); background: var(--bg2); padding: 42px 32px 34px; display: flex; flex-direction: column; transition: border-color .4s, transform .4s; }
.fm__card:hover { border-color: rgba(198, 164, 103, .5); transform: translateY(-4px); }
.fm__card--featured { border-color: var(--gold); background: linear-gradient(180deg, rgba(198, 164, 103, .09), var(--bg2) 55%); }
.fm__badge { position: absolute; top: -12px; left: 32px; background: var(--gold); color: var(--bg); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; padding: 5px 12px; }
.fm__name { font-family: var(--serif); font-size: 36px; line-height: 1; }
.fm__pitch { color: var(--muted); font-size: 15px; margin: 14px 0 22px; }
.fm__card ul { list-style: none; border-top: 1px solid var(--line); flex: 1; }
.fm__card li { padding: 11px 0 11px 22px; border-bottom: 1px solid var(--line); font-size: 15px; position: relative; }
.fm__card li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 11px; top: 14px; }
.fm__price { margin-top: 22px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.fm__included { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 50px; border-top: 1px solid var(--line); }
.fm__included li { padding: 24px 20px 0 0; color: var(--muted); font-size: 14px; }
.fm__included li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.fm__included b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--ink); margin-bottom: 4px; }

/* ---------- Écrans moyens et téléphones ---------- */
@media (max-width: 1100px) { .ft { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1020px) {
  .cfg { min-height: 0; padding-top: 120px; }
  .cfg__inner { grid-template-columns: 1fr; gap: 40px; }
  .pv-phone--hero { width: min(280px, 60vw); }
  .fm { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .fm__included { grid-template-columns: 1fr 1fr; gap: 20px 0; }
  .fm__included li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 960px) {
  .bs { display: block; }
  .bs__stage { position: sticky; top: 84px; z-index: 2; height: 46vh; min-height: 300px; background: var(--bg); padding-bottom: 8px; }
  .bs__step { min-height: 90vh; justify-content: flex-end; padding-bottom: 8vh; }
  .bs__step h3 { font-size: 40px; }
  .mk--board { gap: 6px; } .sb b { font-size: 11px; }
  .vo__phone { width: 100px; } .vo__opt { font-size: 12px; }
  .dl--916 { width: 70px; } .dl--45 { width: 95px; } .dl--169 { width: 150px; }
  .mk__line b { font-size: 15px; } .mk--brief li { font-size: 12px; padding: 7px 0; }
}
@media (max-width: 640px) {
  .anat { display: none; }
  .cfg__choices button { padding: 9px 13px; font-size: 13px; }
  .ft { grid-template-columns: 1fr; }
  .fm__included { grid-template-columns: 1fr; }
  .fm__included li, .fm__included li + li { border-left: 0; padding-left: 0; }
  .bs__progress li { font-size: 7.5px; letter-spacing: .02em; text-align: center; }
  .mk--board { grid-template-columns: repeat(2, 1fr); padding: 0 12%; } .sb:nth-child(n+3) { display: none; }
  .mk--voice { gap: 14px; } .vo__panel .vo__opt:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bs__step { opacity: 1; } }
.ad__brand { font-size: 11px; letter-spacing: .22em; padding: 0 6%; }
.ad[data-format="pub"] .ad__brand::after { display: block; margin-top: 4px; font-size: 10px; }
.mk--board { align-items: start; }

/* Formats : les cadres montrent une vraie image dans le bon format */
.ft__ratio { height: 110px; }
.ft__ratio::before, .ft__ratio--multi i { background-size: cover; background-position: center; border-color: rgba(198, 164, 103, .6); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); }
.ft__ratio--916::before { width: 62px; background-image: url("/motion/assets/img/secteur-mode.jpg"); }
.ft__ratio--45::before { width: 88px; background-image: url("/motion/assets/img/secteur-beaute.jpg"); }
.ft__ratio--169::before { width: 196px; height: 110px; background-image: url("/motion/assets/img/secteur-immobilier.jpg"); }
.ft__ratio--multi i { background-image: url("/motion/assets/img/secteur-restaurant.jpg"); }
.ft__ratio--multi i:nth-child(1) { width: 52px; height: 92px; }
.ft__ratio--multi i:nth-child(2) { width: 74px; height: 74px; }
.ft__ratio--multi i:nth-child(3) { width: 112px; height: 63px; }
.ft__card:hover .ft__ratio::before, .ft__card:hover .ft__ratio--multi i { border-color: var(--gold); }
