/* ==========================================================
   Accueil EHBH Flow & Labs : configurateur d'outil + construction 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; }

/* ---------- 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; }

/* ---------- É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; }


/* ==========================================================
   L'outil en direct (application fictive)
   ========================================================== */
.cfg__inner { grid-template-columns: .85fr 1.15fr; }
.cfg__choices button b { font-weight: 500; }
.app { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #f6f5f2; color: #1b1f27; font-size: 12px;
  box-shadow: 0 50px 100px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.06); }
.app__bar { display: flex; align-items: center; gap: 6px; background: #1d2026; padding: 9px 12px; }
.app__bar i { width: 8px; height: 8px; border-radius: 50%; }
.app__bar i:nth-child(1) { background: #ff5f57; } .app__bar i:nth-child(2) { background: #febc2e; } .app__bar i:nth-child(3) { background: #28c840; }
.app__bar > span { margin: 0 auto; font-size: 11px; color: #9aa0a8; background: rgba(255,255,255,.06); padding: 3px 30px; border-radius: 5px; }
.app__body { display: grid; grid-template-columns: 170px 1fr; height: min(420px, 52vh); min-height: 340px; }
.app__side { background: #10131a; color: #c9ccd3; padding: 16px 12px; }
.app__logo { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; font-size: 12px; font-weight: 600; color: #fff; line-height: 1.2; }
.app__logo b { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #10131a; font-family: var(--serif); font-size: 15px; }
.app__side ul { list-style: none; display: grid; gap: 3px; }
.app__side li { padding: 8px 10px; border-radius: 6px; font-size: 12px; opacity: .65; }
.app__side li.is-on { background: rgba(198,164,103,.16); color: var(--gold-soft); opacity: 1; }
.app__main { padding: 16px 18px; overflow: hidden; position: relative; }
.app__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.app__title { font-size: 16px; font-weight: 600; }
.app__live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #2f8a52; background: #e3f3e8; padding: 4px 10px; border-radius: 999px; }
.app__live i { width: 7px; height: 7px; border-radius: 50%; background: #2f8a52; animation: ping2 1.8s infinite; }
@keyframes ping2 { 0% { box-shadow: 0 0 0 0 rgba(47,138,82,.5); } 70%, 100% { box-shadow: 0 0 0 6px rgba(47,138,82,0); } }
.view { display: none; }
.app[data-besoin="auto"] .view--auto, .app[data-besoin="plan"] .view--plan { display: block; }
.app[data-besoin="crm"] .view--crm { display: grid; }

/* Demandes traitées automatiquement */
.feed { list-style: none; display: grid; gap: 8px; }
.feed li { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; background: #fff; border: 1px solid #e6e3dc; border-radius: 10px; padding: 10px 12px; animation: feedIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.feed__ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #f1ede4; font-size: 14px; }
.feed b { display: block; font-size: 12.5px; }
.feed small { color: #6b7080; font-size: 11px; }
.feed__status { font-size: 10.5px; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: #eef0f4; color: #5b6275; transition: background .4s, color .4s; }
.feed__status.is-ai { background: #efe6ff; color: #6b3fc4; }
.feed__status.is-wait { background: #fff1d6; color: #9a6a00; }
.feed__status.is-done { background: #e3f3e8; color: #2f8a52; }

/* CRM en colonnes */
.kanban { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.col { background: #ecebe6; border-radius: 10px; padding: 10px; min-height: 230px; }
.col > p { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #6b7080; margin-bottom: 8px; }
.col__cards { display: grid; gap: 7px; }
.kcard { background: #fff; border-radius: 8px; padding: 9px 10px; box-shadow: 0 2px 6px rgba(0,0,0,.06); animation: feedIn .5s cubic-bezier(.2,.8,.2,1) both; }
.kcard b { display: block; font-size: 12px; }
.kcard small { font-size: 10.5px; color: #6b7080; }
.kcard.is-new { outline: 2px solid var(--gold); }

/* Planning de la semaine */
.cal__head, .cal__row { display: grid; grid-template-columns: 38px repeat(5, 1fr); gap: 5px; }
.cal__head b { font-size: 11px; text-align: center; color: #6b7080; font-weight: 500; }
.cal__grid { display: grid; gap: 5px; margin-top: 6px; }
.cal__row > span { font-size: 10px; color: #9aa0ab; padding-top: 6px; }
.cal__slot { height: 40px; border-radius: 6px; background: #ecebe6; font-size: 10px; padding: 4px 6px; overflow: hidden; line-height: 1.25; }
.cal__slot.is-on { background: #1b1f27; color: #f1e3c2; animation: feedIn .45s cubic-bezier(.2,.8,.2,1) both; }
.cal__slot.is-on small { display: block; opacity: .7; }

/* Notification */
.app__toast { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 10px; align-items: center; background: #10131a; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 16px 30px -10px rgba(0,0,0,.6); font-size: 11.5px; max-width: 270px;
  opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s; }
.app__toast.is-on { opacity: 1; transform: none; }
.app__toast i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #10131a; font-style: normal; flex-shrink: 0; }
.app__toast b { display: block; }
.app__toast span { opacity: .7; }

/* ==========================================================
   Méthode : maquettes de chaque étape
   ========================================================== */
.bs__screen[data-stage="1"] .mk--diag, .bs__screen[data-stage="2"] .mk--flow, .bs__screen[data-stage="3"] .mk--mock,
.bs__screen[data-stage="4"] .mk--dev, .bs__screen[data-stage="5"] .mk--data, .bs__screen[data-stage="6"] .mk--follow { opacity: 1; transform: none; }
.mk { flex-direction: column; padding: 0 7%; }
.mk__note { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }

.dg__rows { width: min(460px, 100%); display: grid; gap: 12px; }
.dg__rows p { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; font-size: 14px; }
.dg__rows i { display: block; height: 14px; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.bs__screen[data-stage="1"] .dg__rows i { width: var(--w); }

.fl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fl__node { border: 1px solid var(--line); background: var(--bg); padding: 12px 14px; font-size: 14px; min-width: 240px; text-align: center; }
.fl__node small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.fl__node--human { border-color: var(--gold); }
.fl__arrow { width: 1px; height: 20px; background: var(--gold); position: relative; }
.fl__arrow::after { content: ""; position: absolute; bottom: 0; left: -3px; border-top: 6px solid var(--gold); border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
.bs__screen[data-stage="2"] .fl > * { animation: buildIn .6s cubic-bezier(.2,.8,.2,1) both; }
.bs__screen[data-stage="2"] .fl > :nth-child(3) { animation-delay: .25s; }
.bs__screen[data-stage="2"] .fl > :nth-child(5) { animation-delay: .5s; }
.bs__screen[data-stage="2"] .fl > :nth-child(7) { animation-delay: .75s; }
@keyframes buildIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.mo { position: relative; width: min(480px, 100%); aspect-ratio: 16 / 10; display: grid; grid-template-columns: 22% 1fr; background: #f2f2f2; border-radius: 8px; overflow: hidden; outline: 1px dashed #8a8a8a; }
.mo__side { background: #dcdcdc; padding: 12px 10px; display: grid; gap: 8px; align-content: start; }
.mo__side i, .mo__main b, .mo__cards i, .mo__table i { display: block; background: #c9c9c9; border-radius: 3px; }
.mo__side i { height: 10px; }
.mo__main { padding: 14px; display: grid; gap: 10px; align-content: start; }
.mo__main b { height: 14px; width: 40%; }
.mo__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mo__cards i { height: 46px; outline: 1px dashed #9a9a9a; }
.mo__table { display: grid; gap: 6px; }
.mo__table i { height: 12px; }
.mo__cursor { position: absolute; left: 60%; top: 52%; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gold); }
.bs__screen[data-stage="3"] .mo__cursor { animation: tap 1.6s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.7); opacity: .5; } }

.dv { list-style: none; width: min(460px, 100%); display: grid; gap: 8px; }
.dv li { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--line); background: var(--bg); padding: 12px 14px; font-size: 14px; }
.dv li span { font-size: 12px; color: var(--muted); }
.dv li.is-done span { color: #6fbf8b; }
.dv li.is-now { border-color: var(--gold); }
.dv li.is-now span { color: var(--gold-soft); }

.mk--data { flex-direction: row; gap: 14px; }
.xl { background: #fff; color: #222; border-radius: 6px; overflow: hidden; font-size: 11px; width: 42%; box-shadow: 0 20px 40px -16px rgba(0,0,0,.8); }
.xl__name { background: #1e7145; color: #fff; padding: 6px 10px; font-size: 10px; }
.xl--after .xl__name { background: #10131a; color: var(--gold-soft); }
.xl p:not(.xl__name) { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; border-bottom: 1px solid #e5e5e5; }
.xl i { font-style: normal; padding: 6px 8px; border-right: 1px solid #eee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl i.err { color: #c0392b; background: #fdecea; }
.xl i.ok { color: #2f8a52; }
.xl__arrow { font-size: 26px; color: var(--gold); }

.mk--follow { flex-direction: row; gap: 18px; align-items: center; justify-content: center; }
.lg, .sw { border: 1px solid var(--line); background: var(--bg); padding: 14px 16px; width: 46%; }
.lg .mk__title, .sw .mk__title { font-size: 20px; }
.lg p:not(.mk__title) { font-size: 13px; padding: 6px 0; border-top: 1px dashed var(--line); }
.lg span { color: var(--gold); font-family: ui-monospace, Consolas, monospace; font-size: 11px; margin-right: 8px; }
.sw__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; padding: 8px 0; border-top: 1px dashed var(--line); }
.sw__row small { color: var(--gold-soft); font-size: 11px; }
.sw__toggle { width: 30px; height: 16px; border-radius: 999px; background: #3a3d45; position: relative; flex-shrink: 0; }
.sw__toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .3s; }
.sw__toggle.is-on { background: #2f8a52; }
.sw__toggle.is-on::after { left: 16px; }

/* ==========================================================
   Ce qu'on prend en charge
   ========================================================== */
.tk { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tk > * { min-width: 0; }
.tk__col { border: 1px solid var(--line); background: var(--bg); padding: 34px 32px; }
.tk__label { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.tk ul { list-style: none; }
.tk li { padding: 14px 0 14px 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; position: relative; }
.tk li::before { content: "✦"; position: absolute; left: 0; top: 17px; color: var(--gold); font-size: 11px; }
.tk li b { display: block; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 22px; margin-bottom: 2px; }

/* ==========================================================
   Calculateur de temps
   ========================================================== */
.calc { border: 1px solid var(--line); background: var(--bg2); padding: 30px; }
.calc__head, .calc__rows p { display: grid; grid-template-columns: 1fr 110px 90px; gap: 12px; align-items: center; }
.calc__head { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.calc__rows p { padding: 10px 0; border-bottom: 1px solid var(--line); }
.calc__rows label { font-size: 15px; }
.calc input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 15px; padding: 8px 10px; outline: none; }
.calc input:focus { border-color: var(--gold); }
.calc__res { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0 24px; }
.calc__res p { text-align: center; }
.calc__res p + p { border-left: 1px solid var(--line); }
.calc__res b { display: block; font-variant-numeric: lining-nums tabular-nums; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; color: var(--gold-soft); }
.calc__res span { font-size: 12px; color: var(--muted); }

/* ---------- Écrans moyens et téléphones ---------- */
@media (max-width: 1020px) { .cfg__inner { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .tk { grid-template-columns: 1fr; }
  .app__body { grid-template-columns: 1fr; height: 360px; }
  .app__side { display: none; }
  .mk--data { flex-direction: column; } .xl { width: 90%; } .xl__arrow { transform: rotate(90deg); }
  .mk--follow { flex-direction: column; } .lg { width: 100%; padding: 10px 12px; } .lg p:not(.mk__title) { font-size: 11px; padding: 4px 0; } .sw { display: none; }
  .dg__rows p { grid-template-columns: 110px 1fr; font-size: 12px; }
  .fl__node { min-width: 180px; font-size: 12px; padding: 7px 10px; } .fl__arrow { height: 12px; }
  .dv li { font-size: 12px; padding: 8px 10px; }
}
@media (max-width: 640px) {
  .app { font-size: 11px; } .app__main { padding: 12px; }
  .feed li { grid-template-columns: 28px 1fr; } .feed__status { grid-column: 2; justify-self: start; }
  .kanban { grid-template-columns: 1fr 1fr; } .kanban .col:last-child { display: none; }
  .calc { padding: 20px 16px; } .calc__head, .calc__rows p { grid-template-columns: 1fr 64px 64px; gap: 8px; } .calc__rows label { font-size: 13px; }
  .calc__res b { font-size: 30px; }
  .app__toast { left: 12px; right: 12px; max-width: none; }
  .mk--flow .mk__title { display: none; } .fl { gap: 3px; } .fl__node { padding: 5px 10px; } .fl__arrow { height: 9px; }
  .mk--data { gap: 4px; } .xl i { padding: 4px 6px; } .xl__arrow { font-size: 18px; } .mk--data .xl:first-child p:last-child { display: none; }
}
