/* ============================================================
   PlatVue — stylesheet
   Contract: class names referenced by js/landing-live.js and
   js/dashboard-live.js injected markup MUST keep their names
   (.sr-*, .pg-*, .vsrc-*, .ba-*, .progress-*, .video-frame,
   .video-compare, .vres-card, .result-actions, .fidele,
   .success-*, .empty-state, .hist-table, .price-*, .platform-row,
   .plat-opt, .po-*, .m-sub, .dash-head, .dh-sub, .modal, .modal-x,
   .btn*, .pv-toast*, .revisit-banner, .mirror-photo, .pv-hidden, .on)
   ============================================================ */

:root {
  /* palette */
  --bg: #F5F1E8;
  --surface: #FFFDF8;
  --surface-2: #EDE7D9;
  --ink: #22251F;
  --ink-soft: #5C6154;
  --line: #DCD5C3;
  --border: var(--line);
  --brand: #1C2B22;
  --brand-ink: #EFEAE0;
  --accent: #C96F3B;
  --accent-strong: #A64E22; /* texte/CTA : ≥4.5:1 sur les surfaces claires */
  --accent-bright: #E09A66; /* texte accent sur le vert profond : 6.3:1 */
  --accent-ink: #FFF6EE;
  --accent-soft: #F7E9DC;
  --positive: #3E6B4F;
  --danger: #B3402E;
  --hero-bg: #1C2B22;
  --hero-ink: #EFEAE0;
  --hero-soft: #A8B3A0;
  /* type */
  --font-display: 'Bebas Neue';
  --font-body: 'Source Sans 3';
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 17px;
  --text-lg: 21px;
  /* shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  /* z-scale : dropdown < sticky < modal < toast */
  --z-dropdown: 30;
  --z-sticky: 50;
  --z-modal: 100;
  --z-toast: 110;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body), sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}
h1, h2, h3, h4 { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.display {
  font-family: var(--font-display), sans-serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.02;
}

.pv-hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; border: 1px solid transparent;
  padding: 12px 22px; font-size: var(--text-base); font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(166,78,34,.35); }
.btn-dark { background: var(--brand); color: var(--brand-ink); }
.btn-dark:hover { box-shadow: 0 6px 18px rgba(28,43,34,.3); }
.btn-ghost { background: transparent; color: inherit; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-sm { padding: 9px 14px; font-size: var(--text-sm); border-radius: var(--r-sm); min-height: 44px; }
.btn-lg { padding: 15px 26px; font-size: 16.5px; }
.btn[disabled], .btn.is-locked { opacity: .45; cursor: not-allowed; }
.btn.is-locked:hover { box-shadow: none; }
.btn-block-mobile { width: 100%; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-family: var(--font-display), sans-serif; font-size: 19px; line-height: 1;
}
.logo-name { font-family: var(--font-display), sans-serif; font-size: 24px; letter-spacing: .04em; }

/* ---------- hero ---------- */
.hero {
  background: var(--hero-bg); color: var(--hero-ink);
  padding: 56px 20px 64px; text-align: left;
  position: relative;
}
.hero-inner { max-width: 1080px; margin: 0 auto; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-visual img {
  width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block;
  border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.hero-kicker {
  font-size: var(--text-sm); font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); color: var(--hero-ink); }
.hero-sub { font-size: var(--text-md); color: var(--hero-soft); max-width: 480px; margin: 16px 0 0; }
.hero-sub strong { color: var(--hero-ink); font-weight: 600; }
.hero .searchbox { margin: 28px 0 0; }
.hero.has-mirror { text-align: left; }
.hero.has-mirror .hero-inner { max-width: 760px; }

/* ---------- search ---------- */
.searchbox { position: relative; max-width: 560px; margin: 0 auto; text-align: left; }
.searchbox .si-wrap {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 14px; padding: 6px 6px 6px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.searchbox input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: var(--text-md); color: var(--ink); padding: 12px 0; min-width: 0;
}
.searchbox input:focus-visible { outline: none; }
.searchbox .si-wrap:focus-within { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.searchbox input::placeholder { color: var(--ink-soft); }
.sb-go .sb-go-icon { display: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: var(--z-dropdown);
  background: var(--surface); color: var(--ink); border-radius: var(--r-md); overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
}
.sr-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 18px; border: 0; background: transparent; text-align: left; font-size: var(--text-base);
  border-bottom: 1px solid var(--surface-2);
}
.sr-item:hover, .sr-item.active { background: var(--accent-soft); }
.sr-item .sr-name { font-weight: 700; }
.sr-item .sr-addr { color: var(--ink-soft); font-size: var(--text-sm); }
.sr-item .sr-note { font-size: var(--text-sm); color: var(--accent-strong); font-weight: 700; white-space: nowrap; }
.sr-group-label {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-strong); padding: 2px 0;
}
.sr-intro { font-size: var(--text-sm); color: var(--ink-soft); }
.sr-item-card { display: flex; gap: 12px; align-items: flex-start; }
.sr-item-card .sr-main { display: grid; gap: 4px; min-width: 0; text-align: left; }
.sr-name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.sr-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.sr-pill { padding: 4px 8px; border-radius: 999px; background: var(--surface-2); font-size: var(--text-xs); color: var(--ink-soft); }
.sr-action { font-size: var(--text-xs); color: var(--ink-soft); }
.sr-note-link { font-size: var(--text-xs); color: var(--ink-soft); }

/* ---------- mirror ---------- */
.mirror { animation: mirrorIn .4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes mirrorIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.mirror-back { background: transparent; border: 0; color: var(--hero-soft); font-size: var(--text-sm); font-weight: 600; padding: 6px 0 14px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.mirror-back:hover { color: var(--hero-ink); }
.mirror-card { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 16px 18px; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.mc-head { display: flex; align-items: center; gap: 12px; }
.mc-thumb { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; background: linear-gradient(135deg,#8A8273,#5C594E); display: grid; place-items: center; color: #EFEAE0; }
.mc-name { font-weight: 700; font-size: 16px; }
.mc-meta { font-size: var(--text-sm); color: var(--ink-soft); }
.mc-badge { margin-left: auto; font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); white-space: nowrap; }
.mirror-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.mirror-photo {
  aspect-ratio: 4/3; border-radius: var(--r-md); position: relative; overflow: hidden;
  background: var(--surface-2) center/cover no-repeat;
}
.mirror-caption { position: absolute; left: 10px; right: 10px; bottom: 10px; color: #fff; font-size: var(--text-xs); text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.mirror-loading { grid-column: 1 / -1; color: var(--ink-soft); font-size: var(--text-sm); padding: 20px 0; text-align: center; }
.mirror-verdict { margin-top: 26px; }
.mirror-verdict h2 { font-size: clamp(28px, 6vw, 44px); color: var(--hero-ink); }
.mirror-verdict p { color: var(--hero-soft); font-size: 16px; max-width: 520px; margin: 12px 0 22px; }
.mirror-verdict p strong { color: var(--hero-ink); }
.mirror-trust { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.mirror-trust span { font-size: var(--text-sm); color: var(--hero-soft); display: inline-flex; align-items: center; gap: 7px; }

/* ---------- sections (landing) ---------- */
.section { padding: 72px 20px; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section h2.display { font-size: clamp(32px, 5vw, 48px); color: var(--brand); }
.section-sub { color: var(--ink-soft); font-size: var(--text-md); max-width: 600px; margin-top: 12px; }
.section.alt { background: var(--surface-2); }

/* fidelity card */
.fidelity-split { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; margin-top: 8px; }
.fidelity-demo .ba-stage { aspect-ratio: 4/3; cursor: ew-resize; border: 1px solid var(--line); border-radius: var(--r-lg); }
.fidelity-demo .ba-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fidelity-demo .ba-before { filter: brightness(.72) saturate(.55) contrast(.92); }
.ba-note { margin: 10px 2px 0; font-size: var(--text-sm); color: var(--ink-soft); }
.fidelity-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; display: grid; gap: 12px; align-content: start; margin-top: 24px;
}
.fid-item { display: flex; gap: 11px; align-items: baseline; font-size: var(--text-base); line-height: 1.5; }
.fid-item .fi-ok { color: var(--positive); font-weight: 700; }
.fid-item .fi-no { color: var(--danger); font-weight: 700; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 36px; margin-top: 40px; }
.step { border-top: 3px solid var(--accent-strong); padding: 18px 0 0; }
.step .st-num { font-family: var(--font-display), sans-serif; font-size: 46px; color: var(--accent); line-height: 1; }
.step h3 { font-size: var(--text-lg); color: var(--brand); margin: 10px 0 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: var(--text-base); }
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; }
.chip {
  font-size: var(--text-xs); font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap;
}

/* launch pricing band */
.launch-band {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 32px; margin-top: 36px; text-align: center;
  display: grid; gap: 8px; justify-items: center;
}
.launch-band .lb-big { font-family: var(--font-display), sans-serif; font-size: 44px; line-height: 1; color: var(--brand); }
.launch-band p { margin: 0 0 10px; color: var(--ink-soft); font-size: var(--text-base); max-width: 440px; }

/* ---------- tarifs (landing) : ancrage prix au-dessus du système .price-card partagé
   avec l'onglet Abonnement du dashboard (voir "plan cards" plus bas) ---------- */
.price-strike { font-size: var(--text-base); color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--accent); }
.price-founder { font-size: var(--text-xs); color: var(--accent-strong); font-weight: 600; margin: 2px 0 0; }
.price-desc { font-size: var(--text-sm); color: var(--accent-strong); font-weight: 600; min-height: 20px; }
.price-feats li.off { color: var(--ink-soft); opacity: .55; }
.price-feats li.off::before { content: '×'; }
.price-note { text-align: center; color: var(--ink-soft); font-size: var(--text-sm); margin-top: 22px; }

/* final CTA + footer */
.final { background: var(--hero-bg); color: var(--hero-ink); text-align: center; padding: 80px 20px; }
.final h2 { font-size: clamp(32px, 5vw, 56px); color: var(--hero-ink); margin-bottom: 30px; }
.footer {
  background: var(--hero-bg); color: var(--hero-soft); font-size: var(--text-sm);
  padding: 26px 32px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer a { color: inherit; }

/* ---------- before/after slider (injected by dashboard-live renderResult) ---------- */
.ba-stage { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); }
.ba-overlay { position: absolute; inset: 0; pointer-events: none; }
.ba-overlay img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-divider {
  position: absolute; top: 0; bottom: 0; width: 3px; background: var(--surface);
  box-shadow: 0 0 12px rgba(0,0,0,.45); cursor: ew-resize; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
}
.ba-divider::after {
  content: '⟷'; position: absolute; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); color: var(--brand); display: grid; place-items: center;
  font-size: 15px; box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.ba-tag {
  position: absolute; top: 10px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 99px; pointer-events: none; z-index: 3;
}
.ba-tag.avant { left: 10px; background: rgba(20,21,16,.72); color: #EFEAE0; }
.ba-tag.apres { right: 10px; background: var(--accent-strong); color: var(--accent-ink); }

/* ---------- modals ---------- */
.modal-veil {
  position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(18,22,17,.55);
  display: grid; place-items: center; padding: 24px;
  animation: veilIn .18s ease;
}
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); color: var(--ink); border-radius: 18px;
  max-width: 480px; width: 100%; padding: 32px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: modalIn .22s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh; overflow: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  font-size: 15px; color: var(--ink-soft); display: grid; place-items: center;
}
.modal-x:hover { border-color: var(--accent); color: var(--accent); }
.modal h3 { font-size: var(--text-lg); color: var(--brand); margin-bottom: 6px; }
.modal .m-sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 18px; }

.resto-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px;
}
.resto-thumb {
  width: 58px; height: 58px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #8A8273, #5C594E);
  display: grid; place-items: center; color: #EFEAE0;
}
.resto-card .r-name { font-weight: 700; font-size: 16.5px; color: var(--brand); }
.resto-card .r-addr { font-size: var(--text-sm); color: var(--ink-soft); }
.resto-card .r-meta { font-size: var(--text-sm); color: var(--accent-strong); font-weight: 700; }

.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 13px; font-size: var(--text-base); font-weight: 600; color: var(--ink); margin-bottom: 10px;
}
.oauth-btn:hover { border-color: var(--accent); }
.oauth-btn:disabled { opacity: .55; cursor: not-allowed; background: #F3F1EB; }
.oauth-btn:disabled:hover { border-color: var(--line); }
.legal { font-size: var(--text-xs); color: var(--ink-soft); text-align: center; margin-top: 14px; }

/* ---------- dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 63px); }
.dash-nav { background: var(--brand); color: var(--brand-ink); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.dnav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: 0; color: inherit; opacity: .75;
  padding: 12px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 600; text-align: left;
}
.dnav-item:hover { opacity: 1; background: rgba(255,255,255,.07); }
.dnav-item.on { opacity: 1; background: rgba(201,111,59,.25); color: #F3D9C4; }
.dnav-item:focus-visible { outline-color: var(--accent-ink); }
.dnav-sep { height: 1px; background: rgba(255,255,255,.12); margin: 12px 8px; }
.dnav-plan { margin-top: auto; font-size: var(--text-xs); padding: 12px 14px; background: rgba(255,255,255,.06); border-radius: 10px; overflow-wrap: anywhere; }
.dnav-plan b { color: #F3D9C4; }
.dash-main { padding: 30px 34px 70px; min-width: 0; max-width: 1140px; }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h2 { font-size: 30px; color: var(--brand); }
.dash-head .dh-sub { color: var(--ink-soft); font-size: 14.5px; margin: 4px 0 0; }
.mini-title { font-size: var(--text-md); font-weight: 700; color: var(--brand); margin: 0 0 12px; }
.quota-pill {
  font-size: var(--text-sm); font-weight: 700; padding: 7px 15px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap;
}
.quota-pill b { color: var(--accent-strong); }

.resto-banner {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 2px 2px 16px; margin-bottom: 26px;
}
.resto-banner .icon-accent { display: none; }
.resto-banner .rb-name { font-family: var(--font-display), sans-serif; font-size: 32px; color: var(--brand); letter-spacing: .03em; line-height: 1; }
.resto-banner .rb-addr { color: var(--ink-soft); font-size: var(--text-sm); }
.resto-banner > div { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.resto-banner .rb-rating { margin-left: auto; text-align: right; font-size: var(--text-sm); color: var(--ink-soft); }
.stars { color: var(--accent); letter-spacing: 2px; font-size: var(--text-base); }

/* ---------- photo grids & tiles ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pg-tile {
  aspect-ratio: 4/3; border-radius: var(--r-md); position: relative; overflow: hidden;
  border: 1px solid var(--line); display: block;
}
.pg-tile .pg-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px;
  background: linear-gradient(transparent, rgba(15,18,14,.78));
  color: #EFEAE0; font-size: var(--text-xs); font-weight: 600;
}
.pg-tile .pg-src {
  position: absolute; top: 8px; left: 8px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 99px; background: rgba(15,18,14,.6); color: #D8D2C2;
}
.vsrc-tile { cursor: pointer; border: 2px solid transparent; padding: 0; position: relative; }
.vsrc-tile:hover { border-color: var(--accent); }
.vsrc-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.vsrc-tile .vsrc-check {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; display: none; align-items: center; justify-content: center;
}
.vsrc-tile.on .vsrc-check { display: flex; }

/* upload zone */
.pg-upload { border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface); padding: 10px; display: flex; flex-direction: column; }
.pg-upload.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.pg-upload .pu-cta { font-size: var(--text-xs); font-weight: 700; color: var(--accent-strong); text-align: center; padding-top: 8px; min-height: 1em; }
.upload-input-hidden { position: absolute; inset: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.image-slot-shell { position: relative; display: grid; gap: 10px; }
.image-slot-shell .image-slot-click { cursor: pointer; border-radius: var(--r-sm); }
.image-slot-placeholder { display: grid; place-items: center; gap: 8px; min-height: 180px; padding: 20px; text-align: center; color: var(--ink-soft); font-size: var(--text-sm); }
.image-slot-placeholder strong { color: var(--brand); font-size: var(--text-base); }
.image-slot-placeholder .slot-plus { font-size: 34px; line-height: 1; opacity: .4; }
.image-slot-preview { display: none; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.upload-hint { margin: 8px 0 0; font-size: var(--text-sm); color: var(--positive); font-weight: 600; min-height: 1em; }

/* ---------- option cards (usage / style / platform — one visual family) ---------- */
.usage-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 20px; }
.usage-opt, .style-opt, .plat-opt {
  border: 2px solid var(--line); border-radius: 11px; background: var(--surface);
  text-align: left; color: var(--ink);
}
.usage-opt:hover, .style-opt:hover, .plat-opt:hover { border-color: var(--accent); }
.usage-opt.on, .style-opt.on, .plat-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.usage-opt { display: flex; align-items: center; gap: 9px; padding: 12px 14px; min-height: 48px; }
.usage-opt .uo-name { font-weight: 700; font-size: 14px; }
.usage-opt .uo-check, .plat-opt .po-check {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex-shrink: 0;
}
.usage-opt.on .uo-check, .plat-opt.on .po-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.style-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.style-opt { padding: 14px 18px; min-width: 150px; flex: 1; }
.style-opt .so-name { font-weight: 700; font-size: var(--text-base); color: var(--brand); }
.style-opt .so-sub { font-size: var(--text-xs); color: var(--ink-soft); }
.style-opt .so-swatch { height: 7px; border-radius: 99px; margin-top: 9px; }
.platform-row { display: grid; gap: 10px; margin: 18px 0 22px; }
.plat-opt { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 16px; }
.plat-opt .po-name { font-weight: 700; font-size: var(--text-base); }
.plat-opt .po-sub { font-size: var(--text-xs); color: var(--ink-soft); }
.icon-accent { color: var(--accent); display: flex; flex-shrink: 0; }

/* ---------- progress ---------- */
.progress-wrap { max-width: 560px; margin: 40px auto; text-align: center; }
.progress-bar { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 22px 0 14px; }
.progress-bar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
/* barre honnête pour les attentes de durée inconnue : pas de faux pourcentage */
.progress-bar.indet > div { width: 40%; animation: pvIndet 1.1s ease-in-out infinite alternate; }
@keyframes pvIndet { from { transform: translateX(-30%); } to { transform: translateX(180%); } }
.progress-step { color: var(--ink-soft); font-size: 14.5px; min-height: 22px; }

/* ---------- results ---------- */
.result-stage { position: relative; border-radius: 14px; overflow: hidden; max-width: 760px; }
.result-stage .ba-stage { aspect-ratio: 16/10; max-width: 760px; cursor: ew-resize; border: 1px solid var(--line); }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.fidele { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--ink-soft); border-radius: 10px; }
.fidele button {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 9px 16px; font-size: var(--text-sm); font-weight: 700; min-height: 44px;
}
.fidele button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.fidele.fidele-pulse { animation: pvFidelePulse 1.6s ease; }
@keyframes pvFidelePulse {
  0%, 100% { box-shadow: none; }
  20%, 60% { box-shadow: 0 0 0 4px rgba(201, 111, 59, .35); }
  40%, 80% { box-shadow: 0 0 0 2px rgba(201, 111, 59, .2); }
}

.video-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; max-width: 820px; }
/* lot de production : rangée vidéo pleine largeur, puis les 2 photos côte à côte.
   Jamais deux colonnes de hauteurs inégales (ça laissait un vide sous la vidéo). */
.bundle-grid { display: grid; gap: 20px; max-width: 820px; }
.bundle-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bundle-video .bv-flex { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.bundle-video .bv-media { flex: 1 1 240px; min-width: 220px; }
.bundle-video .bv-side { flex: 1 1 260px; display: grid; gap: 12px; align-content: start; }
.bundle-video .video-frame { width: clamp(180px, 50vw, 230px); }
/* la porte de validation vit DANS la carte vidéo : contenu, pas panneau imbriqué */
.bundle-video .gate-panel {
  border: 0; background: none; padding: 0; margin: 0; max-width: none;
  flex-direction: column; align-items: stretch; gap: 12px;
}
.bundle-video .gate-panel .fidele { justify-content: space-between; width: 100%; }
.bundle-video .gate-panel .btn-primary { margin-left: 0; width: 100%; }
.bv-side .bv-hint { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; }
.vres-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--surface); position: relative; transition: opacity .2s ease; }
.vres-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.vres-head strong { font-size: var(--text-md); color: var(--brand); }
.vres-head strong .vres-provider { display: block; font-size: var(--text-xs); color: var(--ink-soft); font-weight: 400; }
.vres-card .video-frame { margin: 0 auto; }
.vres-head .m-sub.is-ok { color: var(--positive); font-weight: 700; }
.vres-head .m-sub.is-err { color: var(--danger); font-weight: 700; }
.vres-cta-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.vres-badge {
  display: none; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-strong); color: var(--accent-ink); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.vres-card.is-chosen { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.vres-card.is-chosen .vres-badge { display: inline-flex; }
.vres-card.is-dimmed { opacity: .55; }
.vres-card.is-dimmed:hover { opacity: 1; }
/* étape de validation : un vrai panneau, pas une ligne perdue */
.gate-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 20px; margin-top: 20px; max-width: 820px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.gate-panel .fidele { margin-left: 0; font-size: var(--text-base); font-weight: 700; color: var(--brand); }
.gate-panel .btn-primary { margin-left: auto; }
/* guide de publication : le panneau principal après validation */
.publish-helper {
  margin-top: 20px; max-width: 820px;
  border: 2px solid var(--accent); border-radius: var(--r-lg); background: var(--surface);
  padding: 20px; display: grid; gap: 14px;
}
.publish-helper h3 { margin: 0; color: var(--brand); font-size: var(--text-md); }
.publish-helper ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-soft); font-size: 14px; }
.helper-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.video-frame {
  width: 250px; max-width: 100%; aspect-ratio: 9/16; border-radius: 22px; overflow: hidden; position: relative;
  background: #15170F; border: 5px solid var(--brand); box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
.video-frame img, .video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

.success-box { text-align: center; padding: 30px 10px 10px; }
.success-ring {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center;
  animation: popIn .4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- vitrine ---------- */
.vit-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; max-width: 640px; }
.vit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.vit-card .v-num { font-family: var(--font-display), sans-serif; font-size: 34px; color: var(--accent); line-height: 1; }
.vit-card .v-label { font-size: var(--text-sm); color: var(--ink-soft); margin-top: 6px; line-height: 1.45; }
.vit-suggest {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  background: var(--brand); color: var(--brand-ink); border-radius: 14px; padding: 20px 24px; margin-top: 24px;
}
.vit-suggest h3 { color: inherit; font-size: 19px; margin: 0; }
.vit-suggest .btn { margin-left: auto; }

/* ---------- tables & empty states ---------- */
.hist-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: 14px; }
.hist-table th { text-align: left; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; font-weight: 600; }
.hist-table td { padding: 10px 16px; border-top: 1px solid var(--line); }
.hist-table tbody tr:hover td { background: var(--surface-2); }
.table-scroll { overflow-x: auto; }
.empty-state { text-align: center; color: var(--ink-soft); padding: 44px 20px; border: 2px dashed var(--line); border-radius: 14px; }
.empty-state .es-icon { color: var(--line); display: flex; justify-content: center; margin-bottom: 12px; }

.lock-banner {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-md);
  padding: 14px 18px; margin-bottom: 20px; font-size: 14px;
}
.revisit-banner {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: var(--brand);
}
.revisit-banner .rb-text { flex: 1; min-width: 200px; }
.revisit-banner .btn { margin-left: auto; }

/* ---------- plan cards (Abonnement tab, injected) ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 26px; display: flex; flex-direction: column; gap: 6px; position: relative;
}
.price-card.featured { border: 2px solid var(--accent); box-shadow: 0 14px 44px rgba(201,111,59,.18); }
.price-pop {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent-strong); color: var(--accent-ink); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 14px; border-radius: 99px; white-space: nowrap;
}
.price-name { font-family: var(--font-display), sans-serif; font-size: 23px; color: var(--brand); letter-spacing: .05em; }
.price-amount { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 4px; }
.price-amount .p-eur { font-family: var(--font-display), sans-serif; font-size: 48px; line-height: 1; color: var(--brand); }
.price-amount .p-per { font-size: var(--text-sm); color: var(--ink-soft); }
.price-feats { list-style: none; margin: 12px 0 20px; padding: 0; font-size: 14px; display: grid; gap: 8px; }
.price-feats li { display: flex; gap: 9px; align-items: baseline; }
.price-feats li::before { content: '✓'; color: var(--positive); font-weight: 700; flex-shrink: 0; }
.price-card .btn { margin-top: auto; }

/* ---------- toasts ---------- */
#pv-toast-root {
  position: fixed; top: 88px; right: 18px; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.pv-toast {
  background: var(--brand); color: var(--brand-ink);
  border-radius: var(--r-md); padding: 14px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 10px;
  animation: pvToastIn .22s ease;
}
.pv-toast.pv-toast-success { background: var(--accent-strong); color: var(--accent-ink); }
.pv-toast-msg { margin: 0; font-size: 14px; line-height: 1.45; }
.pv-toast-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.pv-toast-close {
  background: transparent; border: none; color: inherit; opacity: .7;
  font-size: 14px; min-width: 44px; min-height: 44px; padding: 0; line-height: 1;
  display: grid; place-items: center;
}
.pv-toast-close:hover { opacity: 1; }
@keyframes pvToastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- dashboard layout helpers ---------- */
.video-source-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
/* Sélecteur de source : les tuiles caméra/galerie et les photos Google injectées
   partagent LA même grille (display:contents laisse les tuiles injectées y participer). */
.source-grid #video-source-grid { display: contents; }
.source-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); border: 2px dashed var(--line); cursor: pointer;
  color: var(--ink-soft); font-weight: 600; font-size: var(--text-sm); text-align: center;
  padding: 12px; font-family: inherit;
}
.source-tile:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.source-tile .st-ico { color: var(--accent-strong); display: flex; }
.source-tile .st-body { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.source-tile.on { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); padding: 0; }
.source-tile .image-slot-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.source-tile.st-muted { cursor: default; border-style: solid; border-color: transparent; background: var(--surface-2); }
.source-grid.is-dragover .source-tile { border-color: var(--accent); background: var(--accent-soft); }
.gen-bar {
  margin-top: 28px; display: grid; gap: 8px; max-width: 680px;
  border-top: 1px solid var(--line); padding-top: 20px;
}
.gen-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.gen-row .dish-input { flex: 1; min-width: 220px; }
.gen-bar .dish-input {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; background: var(--surface);
}
.photos-split { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; align-items: start; }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual img { aspect-ratio: 16/10; }
  .video-source-split, .video-compare, .photos-split, .fidelity-split { grid-template-columns: 1fr; }
  .bundle-photos { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .dash-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; gap: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dnav-item { white-space: nowrap; padding: 10px 12px; font-size: var(--text-sm); }
  .dnav-plan, .dnav-sep { display: none; }
  .dash-main { padding: 22px 16px 56px; }
  .dash-head h2 { font-size: 25px; }
  .resto-banner .rb-rating { margin-left: 0; text-align: left; width: 100%; }
}

@media (max-width: 640px) {
  .topbar { padding: 11px 16px; }
  /* barre d'onglets 3-up : icône au-dessus du libellé, tout visible, zéro scroll */
  .dash-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 8px; overflow: visible; }
  .dnav-item {
    flex-direction: column; justify-content: center; gap: 4px;
    padding: 8px 4px; font-size: var(--text-xs); font-weight: 600;
    white-space: normal; text-align: center; line-height: 1.2; min-height: 56px;
  }
  .dnav-item svg { width: 20px; height: 20px; }
  /* le nom du restaurant est le contexte, le titre d'onglet est l'action */
  .resto-banner { padding-bottom: 12px; margin-bottom: 20px; }
  .resto-banner .rb-name { font-size: 20px; letter-spacing: .05em; }
  .dash-head h2 { font-size: 26px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gen-row { flex-direction: column; }
  .gate-panel { align-items: stretch; flex-direction: column; }
  .gate-panel .fidele { justify-content: space-between; }
  .gate-panel .btn-primary { margin-left: 0; width: 100%; }
  .helper-actions .btn { width: 100%; }
  .vit-card { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; }
  .vit-card .v-num { font-size: 26px; }
  .vit-card .v-label { margin-top: 0; }
  .vit-suggest .btn { margin-left: 0; width: 100%; }
  .topbar-actions { gap: 8px; }
  .logo-name { font-size: 21px; }
  .section { padding: 52px 16px; }
  .section h2.display { font-size: clamp(28px, 8vw, 38px); }
  .hero { padding: 48px 16px 56px; }
  .final { padding: 60px 16px; }
  /* search: collapse button to icon so the input keeps the width */
  .sb-go { padding: 12px 14px; }
  .sb-go .sb-go-full { display: none; }
  .sb-go .sb-go-icon { display: flex; }
  .searchbox input { font-size: 16px; }
  .mirror-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .upload-actions { flex-direction: column; }
  .upload-actions .btn { width: 100%; }
  .usage-row { grid-template-columns: 1fr; }
  .fidele { margin-left: 0; }
  #pv-toast-root { left: 12px; right: 12px; max-width: none; top: 78px; }
}

/* ---------- reduced motion : engagement PRODUCT.md ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto !important; }
  .fidele.fidele-pulse { box-shadow: 0 0 0 2px var(--accent); }
  .progress-bar.indet > div { width: 100%; opacity: .5; transform: none; }
}
