/* ============================================================
   QTouch — QWIFI multi-screen editor (phone = preview + editor)
   Inside the phone every size uses --p = 1/390 of the screen width,
   so the iPhone keeps its exact proportions at any size.
   ============================================================ */
.cr-stage.qw-stage{padding:14px 18px 18px;align-items:stretch;position:sticky;top:10px}
/* the phone column stays in view while the right panel scrolls */
.cr-body:has(.qw-stage){align-items:stretch}

/* screen tabs — always visible above the phone */
.qw-top{position:sticky;top:0;z-index:25;display:flex;justify-content:center}
.qw-tabbar{display:inline-flex;align-items:center;background:#fff;border:1px solid #E2E8F0;border-radius:14px;padding:4px;box-shadow:0 10px 26px -16px rgba(15,23,42,.4);max-width:100%;min-width:0}
.qw-tabs{display:flex;align-items:center;gap:3px;overflow-x:auto;scrollbar-width:none;min-width:0}
.qw-tabs::-webkit-scrollbar{display:none}
.qw-tab{display:inline-flex;align-items:center;gap:7px;border:0;background:none;border-radius:10px;padding:8px 14px;font:inherit;font-size:12.5px;font-weight:800;color:#475569;cursor:pointer;white-space:nowrap;transition:background .14s,color .14s}
.qw-tab:hover{background:#F8FAFC;color:#0F172A}
.qw-tab i{width:7px;height:7px;border-radius:50%;background:#CBD5E1;flex-shrink:0}
.qw-tab.ok i{background:#22C55E}
.qw-tab.warn i{background:#F59E0B}
.qw-tab.off{color:#94A3B8;text-decoration:line-through;text-decoration-thickness:1.5px}
.qw-tab.off i{background:transparent;box-shadow:inset 0 0 0 1.5px #CBD5E1}
.qw-tab.on{background:#F97316;color:#fff;box-shadow:0 6px 16px -8px rgba(249,115,22,.8)}
.qw-tab.on i{box-shadow:0 0 0 2px rgba(255,255,255,.95)}
.qw-tab.on.off{text-decoration:none;background:#94A3B8;box-shadow:none}
.qw-tlic{display:inline-grid;place-items:center;font-style:normal;opacity:.85}
.qw-more{position:relative;margin-left:2px;padding-left:4px;border-left:1px solid #E2E8F0;flex-shrink:0}
.qw-morebtn{width:32px;height:32px;border:0;background:none;border-radius:9px;color:#64748B;display:grid;place-items:center;cursor:pointer}
.qw-morebtn:hover,.qw-morebtn.on{background:#F1F5F9;color:#0F172A}
.qw-menu{top:calc(100% + 8px);min-width:230px}

/* current screen label */
.qw-cur{display:flex;align-items:center;gap:10px;margin:14px 2px 8px}
.qw-cur b{display:block;font-size:14px;font-weight:900;color:#0F172A;letter-spacing:-.2px}
.qw-cur span{display:block;font-size:11.5px;color:#64748B;font-weight:600;margin-top:1px}
.qw-cur .cr-seg{margin-left:auto}
.qw-cur .cr-seg button{display:inline-flex}

/* the iPhone */
.qw-phwrap{display:flex;justify-content:center;padding:4px 0 6px}
/* same phone as before: thin 6 px bezel, 44 px corners, notch on top */
.qw-phone{position:relative;width:clamp(250px,calc((100vh - 250px) * .462),300px);aspect-ratio:390/844;background:#101216;border-radius:44px;padding:6px;box-sizing:border-box;box-shadow:0 24px 50px -22px rgba(15,23,42,.5),inset 0 0 0 1.5px #1F2937;flex-shrink:0}
.qw-screen{--p:calc(100cqw / 390);position:relative;width:100%;height:100%;border-radius:38px;overflow:hidden;background:#fff;container-type:inline-size;display:flex;flex-direction:column;isolation:isolate;font-family:inherit;line-height:1.3;color:#0F172A;user-select:none;-webkit-user-select:none}
.qw-phone.qw-scr{background:transparent;padding:0;box-shadow:0 20px 46px -22px rgba(15,23,42,.5);border-radius:7% / 3.2%}
.qw-phone.qw-scr::before,.qw-phone.qw-scr::after{display:none}
.qw-phone.qw-scr .qw-screen{border-radius:7% / 3.2%;box-shadow:0 0 0 1px #E2E8F0}
.qw-island{position:absolute;top:0;left:50%;transform:translateX(-50%);width:34%;height:calc(34 * var(--p));background:#0A0B0D;border-radius:0 0 calc(22 * var(--p)) calc(22 * var(--p));z-index:30;pointer-events:none}
.qw-status{height:calc(52 * var(--p));display:flex;align-items:flex-end;justify-content:space-between;padding:0 calc(30 * var(--p)) calc(9 * var(--p)) calc(38 * var(--p));font-size:calc(16 * var(--p));font-weight:700;letter-spacing:-.01em;flex-shrink:0;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text",inherit;background:#fff;position:relative;z-index:5}
.qw-sicons{display:flex;align-items:center;gap:calc(5 * var(--p))}
.qw-sicons svg{height:calc(11 * var(--p));width:auto;fill:currentColor}
.qw-browser{height:calc(38 * var(--p));margin:0 calc(12 * var(--p)) calc(6 * var(--p));padding:0 calc(12 * var(--p));background:#F1F5F9;border-radius:calc(12 * var(--p));display:flex;align-items:center;justify-content:center;gap:calc(6 * var(--p));font-size:calc(13 * var(--p));font-weight:600;color:#0F172A;flex-shrink:0;position:relative;z-index:5}
.qw-browser svg{width:calc(11 * var(--p));height:calc(11 * var(--p));color:#64748B}
.qw-mailbar{height:calc(40 * var(--p));padding:0 calc(16 * var(--p));display:flex;align-items:center;justify-content:space-between;font-size:calc(15 * var(--p));font-weight:600;color:#2563EB;flex-shrink:0;border-bottom:1px solid #F1F5F9;background:#fff;position:relative;z-index:5}
.qw-mailbar span{display:inline-flex;align-items:center;gap:calc(4 * var(--p))}
.qw-mailbar svg{width:calc(15 * var(--p));height:calc(15 * var(--p))}
.qw-mb-i{gap:calc(14 * var(--p))!important;color:#2563EB}
.qw-body{position:relative;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;touch-action:pan-y;background:#fff;overscroll-behavior:contain}
.qw-body::-webkit-scrollbar{display:none}
.qw-body.in-l{animation:qwInL .24s ease-out}
.qw-body.in-r{animation:qwInR .24s ease-out}
@keyframes qwInL{from{opacity:0;transform:translateX(9%)}to{opacity:1;transform:none}}
@keyframes qwInR{from{opacity:0;transform:translateX(-9%)}to{opacity:1;transform:none}}
.qw-home{position:absolute;bottom:calc(8 * var(--p));left:50%;transform:translateX(-50%);width:calc(134 * var(--p));height:calc(5 * var(--p));border-radius:99px;background:rgba(15,23,42,.85);z-index:30;pointer-events:none}
.qw-offmask{position:absolute;inset:0;z-index:20;background:rgba(248,250,252,.86);backdrop-filter:grayscale(1) blur(1px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(6 * var(--p));text-align:center;padding:calc(30 * var(--p))}
.qw-offmask b{font-size:calc(17 * var(--p));font-weight:900}
.qw-offmask span{font-size:calc(13 * var(--p));color:#64748B}
.qw-offmask .cr-btn{margin-top:calc(8 * var(--p))}

/* selection: subtle, premium */
#qwScreen [data-qs]{cursor:pointer;transition:outline-color .12s}
#qwScreen [data-qs]:hover{outline:1px dashed rgba(249,115,22,.6);outline-offset:3px}
#qwScreen .qw-sel,#qwScreen .qw-sel:hover{outline:1.5px solid #F97316;outline-offset:3px}
#qwScreen .qw-hero.qw-sel,#qwScreen .qw-band.qw-sel,#qwScreen .qw-mhead.qw-sel,#qwScreen .qw-hero:hover,#qwScreen .qw-band:hover,#qwScreen .qw-mhead:hover{outline-offset:-3px}

/* shared blocks */
.qw-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.qw-grad{position:absolute;left:0;right:0;bottom:0;height:60%;background:linear-gradient(180deg,transparent,rgba(0,0,0,.62));pointer-events:none}
.qw-logo{position:absolute;top:calc(14 * var(--p));right:calc(14 * var(--p));z-index:3;background:#fff;border-radius:99px;padding:calc(7 * var(--p)) calc(13 * var(--p));font-size:calc(13 * var(--p));font-weight:900;letter-spacing:-.01em;color:#0F172A;box-shadow:0 calc(4 * var(--p)) calc(12 * var(--p)) rgba(15,23,42,.18);max-width:55%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qw-logo img{height:calc(20 * var(--p));display:block;max-width:100%;object-fit:contain}
.qw-logo.center{left:50%;right:auto;top:calc(56 * var(--p));transform:translateX(-50%)}
.qw-logo.static{position:static;display:inline-block}
.qw-logo.mail{position:static;background:transparent;box-shadow:none;color:#fff;font-size:calc(17 * var(--p));padding:0}
.qw-logo.mail.dark{color:#0F172A}
.qw-lang{position:absolute;top:calc(14 * var(--p));left:calc(14 * var(--p));z-index:3;background:#fff;color:#0F172A;border-radius:99px;padding:calc(7 * var(--p)) calc(11 * var(--p));font-size:calc(12 * var(--p));font-weight:800;display:flex;align-items:center;gap:calc(4 * var(--p));box-shadow:0 calc(4 * var(--p)) calc(12 * var(--p)) rgba(15,23,42,.18)}
.qw-lang svg{width:calc(12 * var(--p));height:calc(12 * var(--p))}
.qw-promo{position:absolute;left:calc(16 * var(--p));bottom:calc(46 * var(--p));z-index:3;background:#F97316;color:#fff;font-weight:800;font-size:calc(13 * var(--p));padding:calc(8 * var(--p)) calc(13 * var(--p));border-radius:calc(12 * var(--p));max-width:72%;box-shadow:0 calc(6 * var(--p)) calc(16 * var(--p)) rgba(0,0,0,.25)}
.qw-licb{position:absolute;left:calc(16 * var(--p));bottom:calc(44 * var(--p));z-index:3;display:inline-flex;align-items:center;gap:calc(5 * var(--p));background:rgba(15,23,42,.86);color:#fff;border-radius:99px;padding:calc(5 * var(--p)) calc(10 * var(--p));font-size:calc(10.5 * var(--p));font-weight:800;max-width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qw-licb svg{width:calc(11 * var(--p));height:calc(11 * var(--p))}
.qw-hero .qw-promo + .qw-licb,.qw-hero .qw-licb:has(+ .qw-promo){bottom:calc(88 * var(--p))}
.qw-licb.card{position:static;background:rgba(255,255,255,.16);margin-bottom:calc(10 * var(--p))}
.qw-licb.mail{position:static;background:#F1F5F9;color:#0F172A;margin-bottom:calc(12 * var(--p))}
.qw-title{font-size:calc(25 * var(--p));font-weight:900;letter-spacing:-.025em;text-align:center;line-height:1.15;color:#0F172A}
.qw-sub{font-size:calc(15 * var(--p));color:#64748B;text-align:center;font-weight:500;line-height:1.4;margin-top:calc(4 * var(--p))}
.qw-ctaw{margin-top:calc(16 * var(--p));border-radius:99px}
.qw-cta{border-radius:99px;padding:calc(16 * var(--p));text-align:center;color:#fff;font-weight:800;font-size:calc(16 * var(--p));letter-spacing:-.01em;box-shadow:0 calc(10 * var(--p)) calc(20 * var(--p)) calc(-10 * var(--p)) rgba(15,23,42,.45)}
.qw-cta.sq{border-radius:calc(12 * var(--p))}
.qw-dest{display:flex;align-items:center;justify-content:center;gap:calc(4 * var(--p));font-size:calc(11.5 * var(--p));color:#94A3B8;font-weight:600;margin-top:calc(7 * var(--p))}
.qw-dest svg{width:calc(10 * var(--p));height:calc(10 * var(--p))}
.qw-terms{margin-top:calc(14 * var(--p));font-size:calc(11.5 * var(--p));color:#94A3B8;text-align:center;line-height:1.45}

/* Accueil */
.qw-hero{position:relative;height:calc(410 * var(--p));overflow:hidden}
.qw-sheet{position:relative;z-index:2;margin-top:calc(-30 * var(--p));background:#fff;border-radius:calc(30 * var(--p)) calc(30 * var(--p)) 0 0;padding:calc(28 * var(--p)) calc(24 * var(--p)) calc(48 * var(--p));display:flex;flex-direction:column}

/* Connexion */
.qw-band{position:relative;height:calc(190 * var(--p));overflow:hidden}
.qw-band .qw-licb{bottom:calc(44 * var(--p))}
.qw-sheet2{margin-top:calc(-26 * var(--p))}
.qw-msg{margin-top:calc(14 * var(--p));background:#F8FAFC;border-radius:calc(14 * var(--p));padding:calc(12 * var(--p)) calc(14 * var(--p));font-size:calc(13.5 * var(--p));color:#475569;text-align:center;font-weight:600;line-height:1.4}
.qw-fields{margin-top:calc(12 * var(--p));display:flex;flex-direction:column;gap:calc(8 * var(--p))}
.qw-input{display:flex;align-items:center;gap:calc(9 * var(--p));border:1.5px solid #E2E8F0;border-radius:calc(13 * var(--p));padding:calc(13 * var(--p)) calc(14 * var(--p));font-size:calc(14 * var(--p));color:#64748B;font-weight:600;background:#fff}
.qw-input svg{width:calc(14 * var(--p));height:calc(14 * var(--p));color:#94A3B8;flex-shrink:0}
.qw-input.dim{justify-content:center;color:#94A3B8;border-style:dashed}

/* Connecté */
.qw-ctop{display:flex;justify-content:center;padding:calc(14 * var(--p)) calc(20 * var(--p)) 0;min-height:calc(20 * var(--p))}
.qw-success{text-align:center;padding:calc(16 * var(--p)) calc(24 * var(--p)) calc(4 * var(--p))}
.qw-check{width:calc(54 * var(--p));height:calc(54 * var(--p));border-radius:50%;background:#DCFCE7;color:#16A34A;display:inline-grid;place-items:center;margin-bottom:calc(12 * var(--p))}
.qw-check svg{width:calc(26 * var(--p));height:calc(26 * var(--p))}
.qw-card{position:relative;margin:calc(18 * var(--p)) calc(20 * var(--p)) 0;border-radius:calc(22 * var(--p));background:var(--c,#0F172A);color:#fff;padding:calc(20 * var(--p)) calc(20 * var(--p)) calc(18 * var(--p));overflow:hidden;box-shadow:0 calc(16 * var(--p)) calc(30 * var(--p)) calc(-16 * var(--p)) rgba(15,23,42,.6)}
.qw-card::after{content:"";position:absolute;right:calc(-40 * var(--p));top:calc(-40 * var(--p));width:calc(140 * var(--p));height:calc(140 * var(--p));border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.qw-card-brand{display:block;font-size:calc(13 * var(--p));font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.qw-card-eye{display:block;font-size:calc(11 * var(--p));font-weight:700;opacity:.7;margin-top:calc(2 * var(--p))}
.qw-card-offer{font-size:calc(27 * var(--p));font-weight:900;letter-spacing:-.03em;line-height:1.1;margin-top:calc(12 * var(--p))}
.qw-card p{margin:calc(6 * var(--p)) 0 0;font-size:calc(13 * var(--p));opacity:.8;line-height:1.4}
.qw-code{margin-top:calc(14 * var(--p));border:1.5px dashed rgba(255,255,255,.55);border-radius:calc(12 * var(--p));padding:calc(10 * var(--p));text-align:center;font-weight:900;letter-spacing:.16em;font-size:calc(19 * var(--p))}
.qw-card-valid{display:block;margin-top:calc(10 * var(--p));font-size:calc(11 * var(--p));opacity:.65;font-weight:600}
.qw-pad{padding:0 calc(20 * var(--p)) calc(48 * var(--p));display:flex;flex-direction:column}
.qw-qrslot{margin:calc(16 * var(--p)) auto 0;width:calc(120 * var(--p));text-align:center;background:#fff;border:1px solid #E2E8F0;border-radius:calc(14 * var(--p));padding:calc(10 * var(--p))}
.qw-qrslot img{width:100%;display:block}
.qw-qrslot span{display:block;font-size:calc(10.5 * var(--p));font-weight:800;margin-top:calc(5 * var(--p));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Email — looks like an email */
.qw-mail{padding:calc(12 * var(--p)) calc(16 * var(--p)) calc(48 * var(--p));background:#fff}
.qw-from{display:flex;align-items:center;gap:calc(10 * var(--p))}
.qw-av{width:calc(38 * var(--p));height:calc(38 * var(--p));border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:900;font-size:calc(16 * var(--p));flex-shrink:0}
.qw-from b{display:block;font-size:calc(15 * var(--p));font-weight:800}
.qw-from small{display:block;font-size:calc(12 * var(--p));color:#94A3B8;font-weight:500}
.qw-subj{margin-top:calc(14 * var(--p));font-size:calc(21 * var(--p));font-weight:800;letter-spacing:-.02em;line-height:1.2}
.qw-mcard{margin-top:calc(14 * var(--p));border:1px solid #E2E8F0;border-radius:calc(18 * var(--p));overflow:hidden;background:#fff}
.qw-mhead{padding:calc(20 * var(--p)) calc(18 * var(--p));display:flex;justify-content:center;align-items:center;min-height:calc(24 * var(--p))}
.qw-mhead.plain{background:#fff;border-bottom:1px solid #F1F5F9}
.qw-min{padding:calc(20 * var(--p)) calc(18 * var(--p)) calc(22 * var(--p));display:flex;flex-direction:column}
.qw-mhero{font-size:calc(22 * var(--p));font-weight:900;letter-spacing:-.025em;line-height:1.15}
.qw-greet{margin-top:calc(12 * var(--p));font-size:calc(14.5 * var(--p));font-weight:700}
.qw-mbody{margin-top:calc(6 * var(--p));font-size:calc(14 * var(--p));color:#475569;line-height:1.55}
.qw-mcode{margin-top:calc(16 * var(--p));background:#F8FAFC;border:1.5px dashed #CBD5E1;border-radius:calc(14 * var(--p));padding:calc(12 * var(--p));text-align:center}
.qw-mcode small{display:block;font-size:calc(10.5 * var(--p));font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#64748B}
.qw-mcode b{display:block;font-size:calc(22 * var(--p));font-weight:900;letter-spacing:.14em;margin-top:calc(4 * var(--p))}
.qw-mfoot{margin-top:calc(16 * var(--p));font-size:calc(12.5 * var(--p));color:#94A3B8;text-align:center}

/* free elements added on a screen */
.qw-layer{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}
.qw-el{position:absolute;pointer-events:auto;cursor:move;touch-action:none;user-select:none;border-radius:2px}
.qw-el:hover{outline:1px dashed rgba(249,115,22,.7);outline-offset:3px}
.qw-el.qw-sel{outline:1.5px solid #F97316;outline-offset:3px}
.qw-el .cr-txt{display:inline-block;white-space:pre;line-height:1.15}
.qw-eltx{width:max-content;max-width:92%}
.qw-eltx .cr-txt{white-space:pre-wrap;overflow-wrap:anywhere}
.qw-guides{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .15s}
.qw-body.editing .qw-guides{opacity:1}
.qw-guides i{position:absolute}
.qw-g-l,.qw-g-r{top:0;bottom:0;width:0;border-left:1px dashed rgba(249,115,22,.5)}
.qw-g-l{left:calc(16 * var(--p))}
.qw-g-r{right:calc(16 * var(--p))}
.qw-g-b{left:0;right:0;bottom:0;height:calc(34 * var(--p));background:repeating-linear-gradient(135deg,rgba(249,115,22,.14) 0 5px,transparent 5px 10px);border-top:1px dashed rgba(249,115,22,.6)}
.qw-g-cx{top:0;bottom:0;left:50%;width:1px;background:#EC4899;opacity:0}
.qw-g-cx.on{opacity:.9}

.qw-foot{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:11.5px;color:#94A3B8;font-weight:600}
.qw-foot span{margin-left:6px}
.qw-dot{width:6px;height:6px;border-radius:99px;background:#CBD5E1;transition:width .2s}
.qw-dot.on{background:#F97316;width:18px}
.qw-dot.off{background:transparent;box-shadow:inset 0 0 0 1.5px #CBD5E1}

/* right panel */
.qw-ph{display:flex;align-items:flex-start;gap:10px;margin-bottom:6px}
.qw-ph > div{flex:1;min-width:0}
.qw-eye{display:block;font-size:10.5px;font-weight:800;letter-spacing:1.3px;text-transform:uppercase;color:#EA580C}
.qw-ph h4{margin:2px 0 0;font-size:15px;font-weight:900;letter-spacing:-.2px;color:#0F172A}
.qw-ph p{margin:3px 0 0;font-size:12px;color:#64748B;font-weight:500}
.qw-stat{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:800;padding:4px 9px;border-radius:99px;white-space:nowrap;flex-shrink:0}
.qw-stat.ok{background:#DCFCE7;color:#15803D}
.qw-stat.warn{background:#FEF3C7;color:#92400E}
.qw-stat.off{background:#F1F5F9;color:#64748B}
.qw-lays .cr-lay{padding:8px}
.qw-hid{font-style:normal;font-size:10px;font-weight:800;color:#94A3B8;background:#F1F5F9;border-radius:99px;padding:2px 7px}
.qw-licrow{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:12px;color:#475569;background:#F8FAFC;border-radius:10px;padding:8px 10px}
.qw-licrow > span{flex:1;min-width:0}
.qw-licrow b{color:#0F172A}
.qw-copy{flex-basis:100%;background:#F8FAFC;border:1px solid #E2E8F0;border-radius:12px;padding:4px 12px 12px;margin-top:4px}
.qw-copy .cr-check{margin-top:6px}
.qw-copy .cr-btn{margin-top:10px}
.cr-check.dis{opacity:.55}
.cr-check em{font-style:normal;color:#94A3B8;font-size:11px}
.cr-ghost.on{border-color:#F97316;color:#C2410C;background:#FFF7ED}
.qw-scope{display:flex;margin:10px 0 8px;width:100%}
.qw-scope button{flex:1;justify-content:center}
.qw-licnow{display:flex;flex-direction:column;gap:6px;background:#F8FAFC;border-radius:12px;padding:10px 12px;font-size:12px;color:#475569}
.qw-licnow > div{display:flex;align-items:center;gap:7px}
.qw-licnow > div > span{flex:1}
.qw-licnow b{color:#0F172A}
.qw-licnow em{font-style:normal;color:#B45309}

@media (max-width:720px){
  .cr-stage.qw-stage{padding:10px 8px 14px}
  .qw-tab{padding:7px 10px;font-size:12px}
  .qw-cur .cr-seg button{padding:5px 8px}
  .qw-phone{width:min(84vw,330px)}
}
