/* ============================================================
   Ekara — Démo interactive Freemium
   Recréation fidèle de l'interface + moteur de visite guidée
   Version autonome (HTML/CSS/JS vanilla) — hébergeable WordPress
   ============================================================ */

:root{
  --navy:        #1d2b3a;
  --navy-bar:    #1e2c3c;
  --navy-2:      #25374a;
  --navy-active: #41566b;
  --navy-hover:  #2b3e52;
  --content-bg:  #eef1f4;
  --card:        #ffffff;
  --border:      #e6e9ed;
  --border-soft: #eef0f3;
  --th-bg:       #edeff2;
  --th-text:     #6b7785;
  --text:        #2f3b49;
  --text-strong: #233140;
  --text-muted:  #7c8794;
  --link:        #3a7bc8;
  --primary:     #2f6fb2;
  --primary-d:   #2a649f;
  --teal:        #12a0a0;
  --red:         #e8473b;
  --amber:       #f0a020;

  /* tour accent (brand blue, slightly brighter for the ring) */
  --accent:      #2f6fb2;
  --accent-ring: #3b8ee0;
  --accent-soft: #eaf2fb;

  --shadow-card: 0 1px 3px rgba(20,32,46,.06), 0 1px 2px rgba(20,32,46,.04);
  --shadow-pop:  0 18px 48px -12px rgba(20,32,46,.30), 0 4px 14px rgba(20,32,46,.10);
  --shadow-tip:  0 22px 60px -14px rgba(15,28,44,.45), 0 6px 18px rgba(15,28,44,.18);

  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{
  font-family:var(--font);
  color:var(--text);
  background:var(--navy);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow:hidden;
}

/* The whole mock app is a fixed-size stage scaled to fit the viewport */
#stage{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:#0e1620;
}
#app-frame{
  width:1440px; height:900px;
  position:relative;
  background:var(--content-bg);
  overflow:hidden;
  transform-origin:center center;
  box-shadow:0 30px 90px -30px rgba(0,0,0,.7);
}

/* ===================== TOP BAR ===================== */
.topbar{
  height:58px; background:var(--navy-bar);
  display:flex; align-items:center; gap:0;
  padding:0 22px 0 16px;
  color:#fff; position:relative; z-index:5;
}
.tb-burger{
  width:30px;height:30px;display:flex;align-items:center;justify-content:center;
  color:#cfd6de; cursor:pointer; border-radius:6px; margin-right:8px;
}
.tb-burger:hover{ background:rgba(255,255,255,.07); }
.tb-logo{ display:flex; align-items:center; gap:11px; }
.tb-logo img{ height:34px; width:auto; display:block; }
.tb-title{ font-size:21px; font-weight:700; letter-spacing:.2px; }
.tb-sep{ color:#5d6e7f; margin:0 13px; font-weight:300; font-size:20px; }
.tb-crumb{ display:flex; align-items:center; gap:11px; font-size:15.5px; color:#cdd5de; }
.tb-crumb .cr-arrow{ color:#5d6e7f; display:flex; }
.tb-crumb .cr-here{ color:#fff; }
.tb-right{ margin-left:auto; display:flex; align-items:center; gap:6px; }
.tb-ic{
  width:38px;height:38px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  color:#c4ccd5; cursor:pointer; position:relative;
}
.tb-ic:hover{ background:rgba(255,255,255,.08); color:#fff; }
.tb-ic .dot{ position:absolute; top:7px; right:8px; width:7px;height:7px;border-radius:50%;
  background:var(--red); border:1.5px solid var(--navy-bar); }
.tb-ic.circle{ border:1.6px solid #98a4b1; border-radius:50%; width:30px;height:30px; }
.tb-ic.circle:hover{ background:rgba(255,255,255,.08); }

/* ===================== LAYOUT ===================== */
.body-row{ display:flex; height:calc(900px - 58px); }

/* ===================== SIDEBAR ===================== */
.sidebar{
  width:252px; flex:0 0 252px; background:var(--navy);
  display:flex; flex-direction:column; color:#c7cfd8;
  border-right:1px solid #14202c;
}
.ws-select{
  margin:16px 14px 10px; height:58px; border-radius:9px;
  background:var(--navy-2); border:1px solid #324559;
  display:flex; align-items:center; gap:11px; padding:0 12px; cursor:pointer;
}
.ws-avatar{
  width:34px;height:34px;border-radius:50%;background:#33495f;color:#dfe6ee;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;
  flex:0 0 34px;
}
.ws-meta{ line-height:1.15; }
.ws-meta b{ color:#fff; font-size:15px; font-weight:700; display:block; }
.ws-meta span{ font-size:12.5px; color:#9aa7b4; }
.ws-chev{ margin-left:auto; color:#8b9aa8; display:flex; }

.nav{ flex:1; overflow-y:auto; padding:6px 0 0; }
.nav::-webkit-scrollbar{ width:7px; }
.nav::-webkit-scrollbar-thumb{ background:#33455a; border-radius:4px; }

.nav-sec{ padding:11px 18px 7px; display:flex; align-items:center; gap:11px;
  color:#aeb9c4; cursor:pointer; }
.nav-sec .ns-ic{ color:#7f8d9b; display:flex; }
.nav-sec .ns-label{ font-size:15px; font-weight:700; letter-spacing:.2px; }
.nav-sec .ns-chev{ margin-left:auto; color:#7f8d9b; display:flex; }

.nav-item{
  padding:8.5px 18px 8.5px 49px; font-size:14px; color:#aeb9c4; cursor:pointer;
  position:relative;
}
.nav-item:hover{ background:var(--navy-hover); color:#e7ecf1; }
.nav-item.active{ background:var(--navy-active); color:#fff; font-weight:600; }

/* nav item being pointed at during the tour: subtle invitation to click */
.nav-item.tour-clickable{ color:#eaf2fb; }
.nav-item.tour-clickable::after{
  content:''; position:absolute; right:16px; top:50%; transform:translateY(-50%);
  width:7px; height:7px; border-radius:50%; background:var(--accent-ring);
  box-shadow:0 0 0 0 rgba(59,142,224,.5); animation:navPulse 1.8s infinite;
}
@keyframes navPulse{
  0%{ box-shadow:0 0 0 0 rgba(59,142,224,.55); }
  70%{ box-shadow:0 0 0 9px rgba(59,142,224,0); }
  100%{ box-shadow:0 0 0 0 rgba(59,142,224,0); }
}

.side-foot{ padding:14px 18px; font-size:11.5px; color:#5f6f7e; }

/* ===================== CONTENT ===================== */
.content{ flex:1; min-width:0; background:var(--content-bg);
  padding:22px; overflow:hidden; position:relative; }
.screen{ display:none; height:100%; flex-direction:column; }
.screen.show{ display:flex; }

.filterbar{
  height:46px; background:var(--card); border:1px solid var(--border);
  border-radius:8px; display:flex; align-items:center; gap:10px; padding:0 14px;
  color:var(--text-muted); margin-bottom:16px; box-shadow:var(--shadow-card);
}
.filterbar .fb-ph{ font-size:14px; }
.filterbar .fb-chev{ margin-left:auto; color:#9aa6b2; display:flex; }

.panel{
  background:var(--card); border:1px solid var(--border); border-radius:10px;
  box-shadow:var(--shadow-card); overflow:hidden;
  flex:1; min-height:0;
  display:flex; flex-direction:column;
}
.panel-head{
  display:flex; align-items:center; gap:26px; padding:22px 26px 18px;
}
.panel-title{ font-size:22px; font-weight:700; color:var(--text-strong); }
.head-stat{ display:flex; align-items:center; gap:9px; font-size:15px; color:#46535f; }
.head-stat b{ color:var(--text-strong); }
.head-actions{ margin-left:auto; display:flex; align-items:center; gap:12px; }

.btn{
  display:inline-flex; align-items:center; gap:9px; height:42px; padding:0 19px;
  border-radius:8px; font-size:14.5px; font-weight:600; cursor:pointer; border:none;
  font-family:inherit;
}
.btn-primary{ background:var(--primary); color:#fff; box-shadow:0 2px 6px rgba(47,111,178,.28); }
.btn-primary:hover{ background:var(--primary-d); }
.btn-ghost{ background:#f2f4f7; color:#9aa6b2; }

/* table */
.tbl{ width:100%; border-collapse:collapse; }
.tbl thead th{
  background:var(--th-bg); color:var(--th-text); font-size:12px; font-weight:700;
  letter-spacing:.6px; text-transform:uppercase; text-align:left;
  padding:13px 16px; border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  white-space:nowrap;
}
.tbl thead th .sort{ color:#9aa6b2; margin-left:6px; }
.tbl tbody td{
  padding:15px 16px; font-size:14.5px; color:var(--text); border-bottom:1px solid var(--border-soft);
  white-space:nowrap; vertical-align:middle;
}
.tbl tbody tr:hover{ background:#f7f9fb; }
.cell-link{ color:var(--link); cursor:pointer; }
.cell-link:hover{ text-decoration:underline; }
.cell-muted{ color:#8893a0; font-variant-numeric:tabular-nums; }
.col-check{ width:30px; }
.col-end{ width:46px; text-align:center; color:#9aa6b2; }
.chk{ width:17px;height:17px;border:1.6px solid #b8c2cc; border-radius:3px; display:inline-block; }
.dots{ cursor:pointer; color:#8893a0; padding:4px; border-radius:6px; display:inline-flex; }
.dots:hover{ background:#eef1f4; color:#52606d; }

/* status pills (play / stop) */
.status{ display:inline-flex; align-items:center; justify-content:center; width:24px;height:24px;border-radius:50%; }
.status.play{ color:var(--teal); }
.status.stop{ color:var(--red); }

.tech-ic{ width:24px;height:24px;border-radius:50%; display:inline-flex; align-items:center; justify-content:center; }

.ratio{ font-weight:600; }
.ratio.full{ color:var(--teal); }
.ratio.zero{ color:#8893a0; }
.scope-tag{ font-weight:600; color:#52606d; letter-spacing:.3px; }

.legend{
  margin-top:auto; display:flex; align-items:center; justify-content:center; gap:46px;
  padding:18px; font-size:14.5px; color:#46535f; border-top:1px solid var(--border-soft);
}
.legend .lg{ display:flex; align-items:center; gap:9px; }

/* ===================== TOUR ENGINE ===================== */
#tour-root{ position:absolute; inset:0; z-index:50; pointer-events:none; }
#tour-root .hidden{ display:none !important; }

/* progress bar at very top of app */
.tour-progress{
  position:absolute; top:0; left:0; right:0; height:3px; background:transparent; z-index:60;
  pointer-events:none;
}
.tour-progress .bar{ height:100%; background:var(--accent); width:0;
  transition:width .5s cubic-bezier(.4,0,.2,1); box-shadow:0 0 8px rgba(47,111,178,.6); }

/* the dimmer + spotlight (single element with composite shadow) */
.spotlight{
  position:absolute; border-radius:10px; pointer-events:none;
  box-shadow:0 0 0 9999px rgba(16,27,40,.62), 0 0 0 3px var(--accent-ring),
             0 0 0 7px rgba(59,142,224,.22);
  transition:left .42s cubic-bezier(.4,0,.2,1), top .42s cubic-bezier(.4,0,.2,1),
             width .42s cubic-bezier(.4,0,.2,1), height .42s cubic-bezier(.4,0,.2,1);
  z-index:51;
}
.spotlight-hit{ position:absolute; z-index:55; cursor:pointer; border-radius:10px;
  transition:left .42s cubic-bezier(.4,0,.2,1), top .42s cubic-bezier(.4,0,.2,1),
             width .42s cubic-bezier(.4,0,.2,1), height .42s cubic-bezier(.4,0,.2,1); }

/* full dim for modal steps */
.tour-dim{ position:absolute; inset:0; background:rgba(16,27,40,.66);
  backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); z-index:51; pointer-events:auto; }

/* tooltip card */
.tip{
  position:absolute; z-index:60; width:368px; background:#fff; border-radius:14px;
  box-shadow:var(--shadow-tip); pointer-events:auto;
  overflow:hidden;
  transition:left .42s cubic-bezier(.4,0,.2,1), top .42s cubic-bezier(.4,0,.2,1);
}
.tip.pop{ animation:tipPop .34s cubic-bezier(.2,.8,.3,1); }
@keyframes tipPop{ from{ transform:translateY(9px) scale(.985); } to{ transform:none; } }
.tip-accent{ height:4px; background:linear-gradient(90deg,var(--accent),#5aa2e6); }
.tip-body{ padding:21px 22px 8px; }
.tip-eyebrow{ display:flex; align-items:center; gap:10px; margin-bottom:11px; }
.tip-badge{
  font-size:11.5px; font-weight:700; letter-spacing:.6px; text-transform:uppercase;
  color:var(--accent); background:var(--accent-soft); padding:4px 10px; border-radius:20px;
}
.tip-screen{ font-size:12px; color:var(--text-muted); font-weight:600; letter-spacing:.3px; }
.tip h3{ margin:0 0 9px; font-size:19px; font-weight:700; color:var(--text-strong);
  line-height:1.25; }
.tip p{ margin:0; font-size:14.5px; line-height:1.55; color:#54616e; }
.tip .value{
  margin-top:14px; display:flex; gap:10px; align-items:flex-start;
  background:#f6f9fc; border:1px solid #e7eef6; border-radius:10px; padding:11px 13px;
}
.tip .value .vi{ color:var(--teal); flex:0 0 auto; margin-top:1px; display:flex; }
.tip .value .vt{ font-size:13px; line-height:1.45; color:#46535f; }
.tip .value .vt b{ color:var(--text-strong); }

.tip-foot{
  display:flex; align-items:center; gap:12px; padding:14px 20px 18px;
}
.dots-prog{ display:flex; gap:6px; }
.dots-prog i{ width:7px;height:7px;border-radius:50%; background:#d9e0e7; transition:all .3s; }
.dots-prog i.on{ background:var(--accent); width:20px; border-radius:4px; }
.tip-nav{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.tbtn{
  display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 16px; border:none;
  border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; font-family:inherit;
  background:var(--primary); color:#fff;
}
.tbtn:hover{ background:var(--primary-d); }
.tbtn.prev{ background:#eef1f4; color:#52606d; padding:0 13px; }
.tbtn.prev:hover{ background:#e3e8ed; }

/* skip button (fixed) */
.tour-skip{
  position:absolute; top:13px; right:20px; z-index:62; pointer-events:auto;
  font-size:13px; color:rgba(255,255,255,.82); background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.22); padding:7px 14px; border-radius:20px; cursor:pointer;
  font-family:inherit; font-weight:600; backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
}
.tour-skip:hover{ background:rgba(255,255,255,.2); color:#fff; }

/* ===================== INTRO / OUTRO MODALS ===================== */
.modal{
  position:absolute; z-index:60; left:50%; top:50%; transform:translate(-50%,-50%);
  width:560px; background:#fff; border-radius:18px; box-shadow:var(--shadow-tip);
  pointer-events:auto; overflow:hidden;
  animation:modalPop .4s cubic-bezier(.2,.8,.3,1);
}
@keyframes modalPop{ from{ transform:translate(-50%,-44%) scale(.965); } to{ transform:translate(-50%,-50%) scale(1); } }
.modal-top{ background:var(--navy); padding:34px 40px 30px; color:#fff; position:relative; overflow:hidden; }
.modal-top .glow{ position:absolute; width:300px;height:300px;border-radius:50%;
  background:radial-gradient(circle, rgba(59,142,224,.45), transparent 70%); top:-150px; right:-80px; }
.modal-top img{ height:54px; margin-bottom:16px; position:relative; }
.modal-eyebrow{ font-size:12.5px; letter-spacing:1.4px; text-transform:uppercase;
  color:#8fb6e6; font-weight:700; margin-bottom:10px; position:relative; }
.modal-top h2{ margin:0; font-size:28px; font-weight:700; line-height:1.18; position:relative; max-width:420px; }
.modal-body{ padding:26px 40px 18px; }
.modal-body p{ margin:0 0 18px; font-size:16px; line-height:1.6; color:#54616e; }
.modal-feats{ display:flex; flex-direction:column; gap:13px; margin:4px 0 6px; }
.modal-feat{ display:flex; gap:13px; align-items:flex-start; }
.modal-feat .mf-ic{ width:34px;height:34px;border-radius:9px; background:var(--accent-soft);
  color:var(--accent); display:flex; align-items:center; justify-content:center; flex:0 0 34px; }
.modal-feat .mf-t{ font-size:14.5px; line-height:1.45; color:#46535f; }
.modal-feat .mf-t b{ color:var(--text-strong); font-weight:700; }
.modal-foot{ padding:14px 40px 32px; display:flex; align-items:center; gap:16px; }
.modal-meta{ font-size:13px; color:#8893a0; }
.btn-cta{
  display:inline-flex; align-items:center; gap:10px; height:50px; padding:0 26px;
  border-radius:10px; font-size:16px; font-weight:700; cursor:pointer; border:none;
  background:var(--primary); color:#fff; font-family:inherit; box-shadow:0 6px 18px rgba(47,111,178,.32);
  transition:background .15s, transform .15s;
}
.btn-cta:hover{ background:var(--primary-d); transform:translateY(-1px); }
.btn-cta.lg{ height:54px; }
.modal-skip{ margin-left:auto; font-size:13.5px; color:#8893a0; cursor:pointer;
  background:none; border:none; font-family:inherit; font-weight:600; }
.modal-skip:hover{ color:#52606d; }

/* outro stats row */
.outro-stats{ display:flex; gap:10px; margin:6px 0 20px; }
.outro-stat{ flex:1; background:#f6f9fc; border:1px solid #e7eef6; border-radius:12px; padding:15px 14px; text-align:center; }
.outro-stat b{ display:block; font-size:23px; color:var(--text-strong); font-weight:800; }
.outro-stat span{ font-size:12px; color:#7c8794; }

/* ===================== LAUNCHER ===================== */
.launcher-wrap{
  position:absolute; top:52px; right:18px; z-index:40;
  width:336px; background:#fff; border-radius:12px; box-shadow:var(--shadow-pop);
  padding:14px;
}
.launcher-wrap.hidden{ display:none; }
.launcher-wrap:before{
  content:''; position:absolute; top:-8px; right:25px; width:16px;height:16px;
  background:#fff; transform:rotate(45deg); box-shadow:-3px -3px 8px rgba(20,32,46,.05);
}
.launcher-grid{ display:grid; grid-template-columns:1fr 1fr; gap:6px; position:relative; }
.mod{
  display:flex; flex-direction:column; align-items:center; gap:10px; padding:22px 10px;
  border-radius:10px; cursor:pointer; color:#5b6b7b;
}
.mod:hover{ background:#f3f6f9; }
.mod.active{ background:#e9f1fb; }
.mod.active .mod-ic, .mod.active .mod-label{ color:var(--primary); }
.mod-ic{ color:#7d8c9b; display:flex; }
.mod.green .mod-ic{ color:#3a9e5b; }
.mod-label{ font-size:14px; font-weight:600; letter-spacing:.2px; }

.icon{ display:inline-flex; }

/* click-catch to block stray app interaction during a tour step */
.tour-catch{ position:absolute; inset:0; z-index:50; pointer-events:auto; }

/* toast */
.toast{
  position:absolute; bottom:24px; left:50%; transform:translateX(-50%); z-index:70;
  background:var(--navy); color:#fff; padding:13px 20px; border-radius:10px; font-size:14.5px;
  box-shadow:var(--shadow-pop); display:flex; gap:11px; align-items:center; pointer-events:none;
  animation:toastIn .3s ease;
}
@keyframes toastIn{ from{ transform:translate(-50%,10px); } to{ transform:translateX(-50%); } }
.toast .ts-ic{ color:#6fd1a0; display:flex; }

/* tweak: hide the value box */
.hide-value .tip .value{ display:none; }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .spotlight,.spotlight-hit,.tip,.tour-progress .bar{ transition:none; }
  .tip.pop,.modal,.toast{ animation:none; }
  .nav-item.tour-clickable::after{ animation:none; }
}

/* ===================== TWEAKS PANEL (vanilla, dev-only) =====================
   Hidden by default. Only appears when an embedding host activates edit mode
   (postMessage __activate_edit_mode). Invisible in a normal WordPress iframe. */
.tweak-panel{
  position:fixed; right:16px; bottom:16px; z-index:2147483646; width:264px;
  display:none; flex-direction:column;
  background:rgba(250,249,247,.86); color:#29261b;
  -webkit-backdrop-filter:blur(24px) saturate(160%); backdrop-filter:blur(24px) saturate(160%);
  border:.5px solid rgba(255,255,255,.6); border-radius:14px;
  box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 12px 40px rgba(0,0,0,.18);
  font:12px/1.4 ui-sans-serif,system-ui,-apple-system,sans-serif;
}
.tweak-panel.show{ display:flex; }
.tweak-hd{ display:flex; align-items:center; justify-content:space-between;
  padding:11px 9px 11px 14px; }
.tweak-hd b{ font-size:12.5px; font-weight:600; }
.tweak-x{ border:0; background:transparent; color:rgba(41,38,27,.55); width:22px;height:22px;
  border-radius:6px; cursor:pointer; font-size:13px; }
.tweak-x:hover{ background:rgba(0,0,0,.06); color:#29261b; }
.tweak-body{ padding:2px 14px 15px; display:flex; flex-direction:column; gap:11px; }
.tweak-sect{ font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:rgba(41,38,27,.45); }
.tweak-lbl{ font-weight:500; color:rgba(41,38,27,.72); margin-bottom:5px; }
.tweak-seg{ position:relative; display:flex; padding:2px; border-radius:8px; background:rgba(0,0,0,.06); }
.tweak-seg button{ flex:1; border:0; background:transparent; color:inherit; font:inherit; font-weight:500;
  min-height:24px; border-radius:6px; cursor:pointer; }
.tweak-seg button.on{ background:rgba(255,255,255,.92); box-shadow:0 1px 2px rgba(0,0,0,.12); }
.tweak-chips{ display:flex; gap:6px; }
.tweak-chip{ flex:1; height:38px; border:0; border-radius:6px; cursor:pointer;
  box-shadow:0 0 0 .5px rgba(0,0,0,.12); }
.tweak-chip.on{ box-shadow:0 0 0 2px rgba(0,0,0,.8); }
.tweak-row-h{ display:flex; align-items:center; justify-content:space-between; }
.tweak-toggle{ position:relative; width:32px;height:18px; border:0; border-radius:999px;
  background:rgba(0,0,0,.15); cursor:pointer; padding:0; transition:background .15s; }
.tweak-toggle.on{ background:#34c759; }
.tweak-toggle i{ position:absolute; top:2px; left:2px; width:14px;height:14px; border-radius:50%;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:transform .15s; }
.tweak-toggle.on i{ transform:translateX(14px); }
