/* ===========================================================================
   IFA — Site corporate · composants riches
   constellation hero · démo interactive · mock dashboard · tweaks panel
   =========================================================================== */

/* ---------------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(40px, 6vw, 72px); padding-bottom: var(--section-pad); overflow: clip; }
.hero-grid-bg {
  position: absolute; inset: 0; background-image: url('ifa/grid.svg'); background-size: 24px 24px;
  opacity: .9; pointer-events: none; z-index: 0;
  -webkit-mask-image: radial-gradient(120% 80% at 78% 18%, #000 0%, transparent 58%);
  mask-image: radial-gradient(120% 80% at 78% 18%, #000 0%, transparent 58%);
}
.hero .container { position: relative; z-index: 1; }
.hero-layout { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { max-width: 620px; }
.hero-copy .display { max-width: 13ch; }
.hero-copy .lead { max-width: 44ch; margin-top: 26px; }
.hero-copy .eyebrow { margin-bottom: 24px; }
.hero-actions { margin-top: 34px; }
.hero-reassure { margin-top: 30px; }

.hero-amber-badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px;
  background: var(--ifa-amber-50); border: 1px solid var(--ifa-amber-100); color: var(--ifa-amber-700);
  padding: 7px 14px 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.hero-amber-badge .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ifa-amber); }

/* ---------------------------------------------------------------------------
   CONSTELLATION — visuel "agent" du hero
   --------------------------------------------------------------------------- */
.constellation { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 540px; margin-inline: auto; }
.constellation svg { width: 100%; height: 100%; overflow: visible; }
.cn-arc { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.cn-link { stroke: var(--ifa-navy); stroke-width: 1.6; stroke-linecap: round; opacity: .28;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.cn-node { transform-box: fill-box; transform-origin: center; }
.cn-pulse { transform-box: fill-box; transform-origin: center; }

html:not([data-anim="off"]) .cn-link { animation: cnDraw 1.1s var(--ease-out) forwards; animation-delay: var(--delay, 0s); }
html:not([data-anim="off"]) .cn-node { opacity: 0; animation: cnPop .6s var(--ease-out) forwards; animation-delay: var(--delay, 0s); }
html:not([data-anim="off"]) .cn-pulse { animation: cnPulse 2.8s ease-in-out infinite; animation-delay: var(--delay, 0s); }
html[data-anim="off"] .cn-link { stroke-dashoffset: 0; }

@keyframes cnDraw { to { stroke-dashoffset: 0; } }
@keyframes cnPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes cnPulse { 0%,100% { transform: scale(1); opacity: .25; } 50% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cn-link { stroke-dashoffset: 0 !important; animation: none !important; }
  .cn-node { opacity: 1 !important; animation: none !important; }
  .cn-pulse { animation: none !important; opacity: 0 !important; }
}

/* floating moment chips orbiting the constellation */
.cn-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border-1); border-radius: 999px;
  padding: 7px 13px 7px 10px; font-size: 13px; font-weight: 500; color: var(--fg-1);
  box-shadow: var(--shadow-1); white-space: nowrap;
}
.cn-chip svg { width: 15px; height: 15px; }
.cn-chip .k { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; }
.cn-chip.c1 { top: 6%; left: -4%; color: var(--ifa-navy); }
.cn-chip.c1 svg { color: var(--ifa-navy); }
.cn-chip.c2 { top: 40%; right: -8%; }
.cn-chip.c2 svg { color: var(--ifa-agent); }
.cn-chip.c3 { bottom: 7%; left: 4%; }
.cn-chip.c3 svg { color: var(--ifa-teal); }
html:not([data-anim="off"]) .cn-chip { animation: chipFloat 6s ease-in-out infinite; }
html:not([data-anim="off"]) .cn-chip.c2 { animation-delay: -2s; }
html:not([data-anim="off"]) .cn-chip.c3 { animation-delay: -4s; }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .cn-chip { animation: none !important; } }

/* ---------------------------------------------------------------------------
   DÉMO INTERACTIVE — "Comment ça marche"
   --------------------------------------------------------------------------- */
.demo { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 4vw, 52px); align-items: stretch; }
.demo-rail { display: flex; flex-direction: column; gap: 10px; }
.demo-tab {
  text-align: left; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--r-card);
  padding: 20px 22px; cursor: pointer; position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 16px;
  align-items: start; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.demo-tab:hover { border-color: var(--border-strong); }
.demo-tab .num-badge {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  background: var(--accent-50); color: var(--accent-700); border: 1px solid var(--accent-100);
}
.demo-tab h4 { margin: 2px 0 4px; font-size: calc(17px * var(--type-scale)); font-weight: 600; }
.demo-tab p { margin: 0; font-size: calc(14px * var(--type-scale)); color: var(--fg-2); line-height: 1.5; }
.demo-tab.active { border-color: var(--border-2); background: var(--ifa-surface); box-shadow: var(--shadow-2); }
.demo-tab.active::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.demo-tab.active .num-badge { background: var(--accent); color: #fff; border-color: var(--accent); }
.demo-tab.active h4 { color: var(--accent-700); }
.demo-tab .prog { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); border-radius: 0 0 0 var(--r-card); }
.demo-tab.active .prog { animation: demoProg var(--demo-dur, 4.4s) linear forwards; }
@keyframes demoProg { to { width: 100%; } }

.demo-stage {
  background: var(--ifa-navy); border-radius: var(--r-shell); position: relative; overflow: hidden;
  min-height: 420px; display: flex; flex-direction: column;
}
.demo-stage .grid-deco { position: absolute; inset: 0; background-image: url('ifa/grid.svg'); background-size: 22px 22px; opacity: .35; mix-blend-mode: screen; pointer-events: none; }
.demo-screen { position: absolute; inset: 0; padding: 26px; display: flex; flex-direction: column; opacity: 0; transform: translateY(10px); transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); pointer-events: none; }
.demo-screen.show { opacity: 1; transform: none; pointer-events: auto; }
.demo-win {
  background: var(--ifa-surface); border-radius: 12px; box-shadow: var(--shadow-2); overflow: hidden;
  display: flex; flex-direction: column; height: 100%;
}
.demo-win-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--border-1); background: var(--ifa-paper); }
.demo-win-bar .dots { display: flex; gap: 6px; }
.demo-win-bar .dots i { width: 10px; height: 10px; border-radius: 999px; background: var(--ifa-ink-150); display: block; }
.demo-win-bar .addr { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-win-body { padding: 20px; flex: 1; min-height: 0; overflow: hidden; }

/* screen 1: créer un lien */
.dm-form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dm-form-row label { font-size: 12px; font-weight: 500; color: var(--fg-2); }
.dm-input { border: 1px solid var(--border-2); border-radius: var(--r-input); padding: 10px 12px; font-size: 13.5px; color: var(--fg-1); background: var(--bg-2); display: flex; align-items: center; justify-content: space-between; }
.dm-input .ph { color: var(--fg-3); }
.dm-link-out { margin-top: 6px; display: flex; align-items: center; gap: 10px; background: var(--ifa-agent-50); border: 1px solid var(--ifa-agent-100); border-radius: var(--r-input); padding: 11px 14px; }
.dm-link-out svg { width: 16px; height: 16px; color: var(--ifa-agent); flex: none; }
.dm-link-out .url { font-family: var(--font-mono); font-size: 12px; color: var(--ifa-agent-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* screen 2: parcours locataire (phone) */
.dm-phone { width: 220px; margin: 0 auto; background: var(--ifa-navy); border-radius: 26px; padding: 9px; box-shadow: var(--shadow-2); }
.dm-phone .scr { background: var(--ifa-paper); border-radius: 19px; overflow: hidden; padding: 16px; min-height: 300px; }
.dm-msg { background: var(--bg-2); border: 1px solid var(--border-1); border-radius: 12px; padding: 13px; font-size: 12.5px; color: var(--fg-1); line-height: 1.5; }
.dm-progress-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.dm-pstep { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg-2); }
.dm-pstep .b { width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; flex: none; }
.dm-pstep.done .b { background: var(--ifa-teal); border-color: var(--ifa-teal); color: #fff; }
.dm-pstep.done { color: var(--fg-1); }
.dm-pstep.curr .b { border-color: var(--ifa-agent); box-shadow: 0 0 0 3px var(--ifa-agent-50); }

/* screen 3: suivi agence (dashboard mini) */
.dm-track { display: flex; flex-direction: column; gap: 12px; }
.dm-track-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-1); border-radius: var(--r-card); background: var(--bg-2); }
.dm-track-row .av { width: 30px; height: 30px; border-radius: 999px; background: var(--ifa-navy-100); color: var(--ifa-navy); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none; }
.dm-track-row .meta { flex: 1; min-width: 0; }
.dm-track-row .meta .n { font-size: 13px; font-weight: 500; }
.dm-track-row .meta .s { font-size: 11.5px; color: var(--fg-3); font-family: var(--font-mono); }

.demo-caption { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 14px 16px; }

/* ---------------------------------------------------------------------------
   MOCK DASHBOARD (preuve produit) — browser frame
   --------------------------------------------------------------------------- */
.browser {
  border: 1px solid var(--border-2); border-radius: var(--r-shell); overflow: hidden; background: var(--bg-2);
  box-shadow: var(--shadow-2);
}
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-1); background: var(--ifa-paper); }
.browser-bar .dots { display: flex; gap: 7px; }
.browser-bar .dots i { width: 11px; height: 11px; border-radius: 999px; background: var(--ifa-ink-150); display: block; }
.browser-bar .url { flex: 1; max-width: 420px; margin-inline: auto; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: 999px; padding: 6px 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); text-align: center; }

.dash { display: grid; grid-template-columns: 210px 1fr; min-height: 480px; background: var(--ifa-paper); }
.dash-sb { background: var(--ifa-paper-2); border-right: 1px solid var(--border-1); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.dash-sb .brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 14px; border-bottom: 1px solid var(--border-1); margin-bottom: 8px; }
.dash-sb .brand img { height: 17px; }
.dash-sb .sec { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); padding: 12px 8px 4px; }
.dash-nav { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.dash-nav svg { width: 15px; height: 15px; flex: none; opacity: .8; }
.dash-nav .ct { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); background: var(--ifa-ink-50); padding: 1px 6px; border-radius: 999px; }
.dash-nav.active { background: var(--ifa-surface); color: var(--fg-1); box-shadow: var(--shadow-1); }
.dash-nav.active .ct { background: var(--ifa-agent-50); color: var(--ifa-agent-700); }
.dash-foot { margin-top: auto; padding: 12px 9px 4px; border-top: 1px solid var(--border-1); display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--fg-2); }
.dash-foot .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ifa-teal); box-shadow: 0 0 0 3px rgba(15,140,126,.16); }

.dash-main { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dash-kpi { background: var(--ifa-surface); border: 1px solid var(--border-1); border-radius: var(--r-card); padding: 13px 15px; }
.dash-kpi .eb { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); }
.dash-kpi .v { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 5px; }
.dash-kpi .d { font-size: 11px; font-weight: 500; margin-top: 2px; }
.dash-kpi .d.up { color: var(--ifa-teal-700); }
.dash-kpi .d.flat { color: var(--fg-3); }

.dash-panel { background: var(--ifa-surface); border: 1px solid var(--border-1); border-radius: var(--r-card); overflow: hidden; }
.dash-panel-h { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border-1); }
.dash-panel-h .t { font-size: 13px; font-weight: 600; }
.dash-tbl { width: 100%; border-collapse: collapse; }
.dash-tbl th { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--border-1); background: var(--ifa-paper); font-weight: 500; }
.dash-tbl td { padding: 12px 16px; font-size: 12.5px; border-bottom: 1px solid var(--ifa-ink-75); }
.dash-tbl tr:last-child td { border-bottom: 0; }
.dash-cli { display: flex; align-items: center; gap: 9px; }
.dash-cli .av { width: 26px; height: 26px; border-radius: 999px; background: var(--ifa-navy-100); color: var(--ifa-navy); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; flex: none; }
.dash-cli .n { font-size: 12.5px; font-weight: 500; }
.dash-cli .id { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }
.dash-amt { font-variant-numeric: tabular-nums; font-weight: 500; }
.mini-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 1; border: 1px solid transparent; }
.mini-pill .dot { width: 5px; height: 5px; border-radius: 999px; }
.mini-pill.teal { background: var(--ifa-teal-50); color: var(--ifa-teal-700); border-color: var(--ifa-teal-100); }
.mini-pill.teal .dot { background: var(--ifa-teal); }
.mini-pill.amber { background: var(--ifa-amber-50); color: var(--ifa-amber-700); border-color: var(--ifa-amber-100); }
.mini-pill.amber .dot { background: var(--ifa-amber); }
.mini-pill.agent { background: var(--ifa-agent-50); color: var(--ifa-agent-700); border-color: var(--ifa-agent-100); }
.mini-pill.agent .dot { background: var(--ifa-agent); }
.mini-pill.neutral { background: var(--ifa-ink-50); color: var(--fg-2); border-color: var(--border-1); }

.dash-callout {
  position: absolute; right: -14px; top: 22%; z-index: 3;
  background: var(--ifa-surface); border: 1px solid var(--border-2); border-left: 2px solid var(--ifa-agent);
  border-radius: var(--r-card); box-shadow: var(--shadow-2); padding: 13px 15px; width: 220px;
}
.dash-callout .tag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--ifa-agent); display: inline-flex; align-items: center; gap: 6px; }
.dash-callout .tag::before { content: '★'; }
.dash-callout p { margin: 7px 0 0; font-size: 12.5px; color: var(--fg-1); line-height: 1.45; }
.dash-wrap { position: relative; }

/* ---------------------------------------------------------------------------
   Compliance / role separation diagram
   --------------------------------------------------------------------------- */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid rgba(242,244,247,.16); border-radius: var(--r-card); overflow: hidden; }
.role-col { padding: 26px 24px; border-right: 1px solid rgba(242,244,247,.16); position: relative; }
.role-col:last-child { border-right: 0; }
.role-col .step-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--ifa-agent-300); text-transform: uppercase; }
.role-col h4 { margin: 14px 0 6px; font-size: calc(19px * var(--type-scale)); font-weight: 600; color: var(--ifa-ink-0); }
.role-col p { margin: 0; font-size: 14px; color: var(--ifa-navy-100); line-height: 1.55; }
.role-col .role-ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(242,244,247,.07); border: 1px solid rgba(242,244,247,.14); display: flex; align-items: center; justify-content: center; color: var(--ifa-ink-0); }
.role-col .role-ic svg { width: 20px; height: 20px; }
.role-col.is-ifa { background: rgba(61,107,255,.08); }
.role-col.is-ifa .role-ic { background: var(--ifa-agent); border-color: var(--ifa-agent); }
@media (max-width: 760px) { .roles { grid-template-columns: 1fr; } .role-col { border-right: 0; border-bottom: 1px solid rgba(242,244,247,.16); } .role-col:last-child { border-bottom: 0; } }

/* checklist on navy */
.trace-list { display: flex; flex-direction: column; gap: 0; }
.trace { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid rgba(242,244,247,.12); }
.trace:first-child { border-top: 0; }
.trace .b { width: 24px; height: 24px; border-radius: 7px; background: var(--ifa-teal); display: flex; align-items: center; justify-content: center; color: #fff; }
.trace .b svg { width: 14px; height: 14px; }
.trace .lbl { font-size: calc(15px * var(--type-scale)); color: var(--ifa-ink-0); }
.trace .ts { font-family: var(--font-mono); font-size: 11px; color: var(--ifa-navy-300); }

/* ---------------------------------------------------------------------------
   Vertical cards (immobilier / animaux)
   --------------------------------------------------------------------------- */
.vert-card { position: relative; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.vert-card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vert-card .ic-big { width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.vert-card .ic-big svg { width: 26px; height: 26px; }
.vert-card.immo .ic-big { background: var(--ifa-navy); color: var(--fg-on-navy); }
.vert-card.animaux .ic-big { background: var(--ifa-amber-50); color: var(--ifa-amber-700); border: 1px solid var(--ifa-amber-100); }
.vert-card .meta-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-3); font-family: var(--font-mono); }

/* ---------------------------------------------------------------------------
   Partner logo wall (placeholders)
   --------------------------------------------------------------------------- */
.logo-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--border-1); border-radius: var(--r-card); overflow: hidden; background: var(--bg-2); }
.logo-cell { height: 92px; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1); color: var(--ifa-ink-300); }
.logo-cell .ph { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 16px; color: var(--ifa-ink-300); }
.logo-cell .ph .g { width: 22px; height: 22px; border-radius: 6px; background: var(--ifa-ink-100); }
.logo-wall .logo-cell:nth-child(4n) { border-right: 0; }
.logo-wall .logo-cell:nth-last-child(-n+4) { border-bottom: 0; }
@media (max-width: 720px) {
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .logo-cell:nth-child(4n) { border-right: 1px solid var(--border-1); }
  .logo-cell:nth-child(2n) { border-right: 0; }
}

/* ---------------------------------------------------------------------------
   Coming-soon waitlist
   --------------------------------------------------------------------------- */
.waitlist { display: flex; gap: 10px; max-width: 460px; }
.waitlist input { flex: 1; height: 52px; border: 1px solid var(--border-2); border-radius: var(--r-input); padding: 0 16px; font-family: inherit; font-size: 15px; color: var(--fg-1); background: var(--bg-2); }
.waitlist input::placeholder { color: var(--fg-3); }
.waitlist input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-50); }
.waitlist.on-navy-form input { background: rgba(242,244,247,.06); border-color: rgba(242,244,247,.2); color: var(--ifa-ink-0); }
.waitlist.on-navy-form input::placeholder { color: var(--ifa-navy-300); }
.waitlist-note { font-size: 12.5px; color: var(--fg-3); margin-top: 12px; display: flex; align-items: center; gap: 7px; }
@media (max-width: 520px) { .waitlist { flex-direction: column; } }

/* ---------------------------------------------------------------------------
   TWEAKS PANEL
   --------------------------------------------------------------------------- */
#tweaks-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; font-family: var(--font-sans); }
#tweaks-root[hidden] { display: none; }
.tw-panel {
  width: 296px; background: var(--ifa-surface); border: 1px solid var(--border-2);
  border-radius: var(--r-card); box-shadow: var(--shadow-2); overflow: hidden;
}
.tw-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--border-1); cursor: grab; }
.tw-head .agent-mark { width: 22px; height: 22px; border-radius: 6px; }
.tw-head .t { font-size: 13.5px; font-weight: 600; }
.tw-head .x { margin-left: auto; width: 26px; height: 26px; border-radius: 6px; border: 0; background: transparent; color: var(--fg-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tw-head .x:hover { background: var(--ifa-ink-50); color: var(--fg-1); }
.tw-body { padding: 14px 15px; display: flex; flex-direction: column; gap: 16px; max-height: 70vh; overflow: auto; }
.tw-group .tw-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); margin-bottom: 8px; }
.tw-seg { display: flex; gap: 0; border: 1px solid var(--border-2); border-radius: var(--r-input); overflow: hidden; background: var(--ifa-paper); }
.tw-seg button { flex: 1; border: 0; background: transparent; padding: 8px 6px; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--fg-2); cursor: pointer; border-right: 1px solid var(--border-1); transition: background var(--dur-fast), color var(--dur-fast); }
.tw-seg button:last-child { border-right: 0; }
.tw-seg button:hover { background: var(--ifa-ink-50); }
.tw-seg button.on { background: var(--ifa-navy); color: var(--fg-on-navy); }
.tw-swatches { display: flex; gap: 8px; }
.tw-sw { flex: 1; height: 38px; border-radius: var(--r-input); border: 1px solid var(--border-2); cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--fg-2); background: var(--bg-2); }
.tw-sw .chip { width: 13px; height: 13px; border-radius: 999px; }
.tw-sw.on { border-color: var(--ifa-navy); box-shadow: 0 0 0 1px var(--ifa-navy); color: var(--fg-1); }
.tw-foot { padding: 11px 15px; border-top: 1px solid var(--border-1); }
.tw-reset { width: 100%; background: transparent; border: 1px solid var(--border-2); border-radius: var(--r-input); padding: 8px; font-family: inherit; font-size: 12.5px; color: var(--fg-2); cursor: pointer; }
.tw-reset:hover { background: var(--ifa-ink-50); color: var(--fg-1); }

@media (max-width: 520px) { .tw-panel { width: min(296px, calc(100vw - 36px)); } }

/* hero variant copy visibility */
.hv { display: none; }
html[data-hero="promise"] .hv-promise,
html[data-hero="distrib"] .hv-distrib,
html[data-hero="moment"] .hv-moment { display: block; }

/* ===========================================================================
   RESPONSIVE — composants riches (hero · démo · dashboard)
   =========================================================================== */

/* ---- Hero : passage en 1 colonne ---- */
@media (max-width: 960px) {
  .hero-layout { grid-template-columns: 1fr; gap: clamp(36px, 8vw, 56px); }
  .hero-copy { max-width: 640px; }
  .hero-copy .display, .hero-copy .lead { max-width: none; }
  /* visuel sous le texte, recentré */
  .hero-visual { order: 2; }
  .constellation { max-width: 460px; }
}
@media (max-width: 560px) {
  /* constellation plus compacte + chips ramenées dans le cadre */
  .constellation { max-width: 320px; }
  .cn-chip { font-size: 12px; padding: 6px 11px 6px 9px; }
  .cn-chip svg { width: 14px; height: 14px; }
  .cn-chip.c1 { left: 0; }
  .cn-chip.c2 { right: 0; }
  .cn-chip.c3 { left: 0; }
}

/* ---- Démo interactive : rail au-dessus du stage ---- */
@media (max-width: 820px) {
  .demo { grid-template-columns: 1fr; gap: 18px; }
  .demo-stage { min-height: 380px; }
}
@media (max-width: 480px) {
  .demo-tab { padding: 16px; gap: 13px; }
  .demo-stage { min-height: 340px; }
  .demo-screen { padding: 16px; }
  .demo-win-body { padding: 16px; }
}

/* ---------------------------------------------------------------------------
   DÉMO — variante "stepper" : étapes horizontales + écran pleine largeur
   --------------------------------------------------------------------------- */
.demo.is-stepper { grid-template-columns: 1fr; gap: 26px; }
.demo.is-stepper .demo-rail { flex-direction: row; gap: 14px; align-items: stretch; }
.demo.is-stepper .demo-tab { flex: 1; min-width: 0; }
/* accent actif en haut (au lieu de la tranche de gauche) */
.demo.is-stepper .demo-tab.active::before {
  left: 14px; right: 14px; top: 0; bottom: auto; width: auto; height: 4px;
  border-radius: 0 0 4px 4px;
}
.demo.is-stepper .demo-tab .prog { border-radius: 0 0 var(--r-card) var(--r-card); }
/* écran produit : pleine largeur, fenêtre centrée & flottante sur le navy */
.demo.is-stepper .demo-stage { min-height: 440px; }
.demo.is-stepper .demo-screen { padding: 36px; justify-content: center; }
.demo.is-stepper .demo-win { max-width: 720px; width: 100%; height: auto; margin-inline: auto; }
/* repli mobile : on revient à une pile verticale */
@media (max-width: 820px) {
  .demo.is-stepper .demo-rail { flex-direction: column; }
  .demo.is-stepper .demo-tab.active::before {
    left: 0; top: 12px; bottom: 12px; width: 4px; height: auto; right: auto;
    border-radius: 0 4px 4px 0;
  }
  .demo.is-stepper .demo-stage { min-height: 400px; }
  .demo.is-stepper .demo-screen { padding: 18px; }
}

/* ---- Mock dashboard : sidebar masquée, KPIs & encart repliés ---- */
@media (max-width: 900px) {
  /* l'encart flottant repasse dans le flux */
  .dash-callout {
    position: static; width: auto; right: auto; top: auto;
    margin-top: 14px;
  }
}
@media (max-width: 720px) {
  .dash { grid-template-columns: 1fr; min-height: 0; }
  .dash-sb { display: none; }
  .dash-main { padding: 16px; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-kpi { padding: 11px 12px; }
  .dash-kpi .v { font-size: 19px; }
  /* table : on laisse défiler horizontalement plutôt que d'écraser */
  .dash-panel { overflow-x: auto; }
  .dash-tbl { min-width: 380px; }
}
