:root{
  --red:#ED1C24; --navy:#0B2A7A; --ink:#14161C; --grey:#6B7280; --line:#E6E8EC; --soft:#F5F6F8; --bg:#FFFFFF;
  --pink:#C8175D; --green:#1E9E5A; --black:#0B0B0D;
  --radius:14px;
}
*{box-sizing:border-box}
html,body{margin:0;background:#F2F3F5;color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
button,input{font:inherit;color:inherit}
a{color:inherit;cursor:pointer}
img{display:block;max-width:100%}

/* ---------- porte d'entrée ---------- */
.gate{position:fixed;inset:0;z-index:50;background:#fff;display:flex;align-items:center;justify-content:center;padding:24px}
.gate-card{width:100%;max-width:380px;text-align:center}
.gate-logos{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:28px}
.gate-avia{height:34px}.gate-soshop{height:40px}.gate-by{font-style:italic;color:var(--grey)}
.gate h1{font-size:22px;line-height:1.25;margin:0 0 8px;font-weight:700}
.gate p{color:var(--grey);margin:0 0 22px;font-size:15px}
.gate input{width:100%;height:50px;border:1px solid var(--line);border-radius:12px;padding:0 16px;font-size:17px;outline:none;background:#fff}
.gate input:focus{border-color:var(--ink)}
.gate button{width:100%;height:50px;border:0;border-radius:12px;background:var(--ink);color:#fff;font-weight:600;font-size:16px;margin-top:12px;cursor:pointer}
.gate-err{color:var(--red);font-size:14px;margin-top:12px}
[hidden]{display:none !important}

/* ---------- scène / appareil ---------- */
.stage{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:28px;padding:28px 16px;position:relative}
.device{width:390px;height:844px;border-radius:54px;background:#0B0B0D;padding:11px;position:relative;flex:none}
.screen{position:relative;width:100%;height:100%;border-radius:44px;overflow:hidden;background:var(--bg)}
.island{position:absolute;top:22px;left:50%;transform:translateX(-50%);width:120px;height:34px;border-radius:20px;background:#000;z-index:5}
.statusbar{position:absolute;top:0;left:0;right:0;height:54px;display:flex;align-items:flex-end;justify-content:space-between;padding:0 26px 6px;font-size:15px;font-weight:600;z-index:4;pointer-events:none}
.status-right{display:flex;align-items:center;gap:6px}
.status-right i{display:inline-block;background:currentColor}
.sig{width:16px;height:10px;clip-path:polygon(0 70%,25% 70%,25% 100%,0 100%,30% 100%,30% 50%,50% 50%,50% 100%,55% 100%,55% 30%,75% 30%,75% 100%,80% 100%,80% 0,100% 0,100% 100%,0 100%)}
.wifi{display:none}
.batt{width:25px;height:12px;border:1.5px solid currentColor;border-radius:4px;background:transparent;position:relative}
.batt::after{content:"";position:absolute;left:2px;top:2px;bottom:2px;width:17px;background:currentColor;border-radius:2px}
.homebar{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);width:134px;height:5px;border-radius:3px;background:#000;opacity:.9;z-index:4}
.pay-s ~ .homebar{background:#fff}

/* écrans */
.s{position:absolute;inset:0;display:none;flex-direction:column;padding-top:54px;background:var(--bg)}
.s.active{display:flex}
.hdr{display:flex;align-items:center;justify-content:space-between;padding:10px 22px 6px;min-height:52px}
.avia-logo{height:26px}
.by{display:flex;align-items:center;gap:6px;font-size:12px;font-style:italic;color:var(--grey)}
.by img{height:24px}
.hdr.nav{padding:6px 14px}
.hdr-title{font-weight:600;font-size:16px}
.back{width:40px;height:40px;border:0;background:none;font-size:30px;line-height:1;cursor:pointer;color:var(--ink);text-align:left;padding:0 0 4px}
.back.ios{color:#0A84FF;font-size:30px;width:40px;display:inline-block;padding-left:4px}
.body{flex:1;overflow:auto;padding:6px 22px 16px}
.ftr{padding:10px 22px 34px}
h1{font-size:28px;line-height:1.15;letter-spacing:-.02em;margin:18px 0 10px;font-weight:800}
h2{font-size:24px;line-height:1.2;letter-spacing:-.02em;margin:14px 0 8px;font-weight:700}
.lead{font-size:15.5px;line-height:1.45;color:#3A3F47;margin:0 0 14px}
.fine{font-size:12.5px;color:var(--grey);margin:10px 0 0;line-height:1.4}
.center{text-align:center}
.center-col{display:flex;flex-direction:column;align-items:center;text-align:center;justify-content:center}
.points{list-style:none;padding:0;margin:4px 0 0}
.points li{padding:11px 0;border-top:1px solid var(--line);font-size:15px;color:#3A3F47}
.points li b{color:var(--ink);font-weight:600}
.card-img{width:100%;border-radius:12px}
.card-hero{margin:6px 0 4px}

.btn{width:100%;height:54px;border:0;border-radius:var(--radius);font-weight:600;font-size:16.5px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px}
.btn.primary{background:var(--red);color:#fff}
.btn.ghost{background:var(--soft);color:var(--ink)}
.btn.ghost.light{background:rgba(255,255,255,.14);color:#fff}
.btn.applepay{background:var(--black);color:#fff;margin:14px 0 4px;letter-spacing:-.01em}
.btn.wallet{background:var(--black);color:#fff}
.wallet-glyph{width:22px;height:16px;border-radius:4px;background:linear-gradient(180deg,#F26D21 0 25%,#2EA7E0 25% 50%,#79C043 50% 75%,#F7D23C 75%);position:relative}
.wallet-glyph::after{content:"";position:absolute;left:0;right:0;bottom:0;height:6px;background:#1C1C1E;border-radius:0 0 4px 4px}

/* choix montant */
.choices{display:flex;flex-direction:column;gap:10px;margin:6px 0 16px}
.choice{display:flex;align-items:center;justify-content:space-between;border:1.5px solid var(--line);border-radius:var(--radius);padding:16px 16px;cursor:pointer}
.choice input{display:none}
.choice-main{display:flex;flex-direction:column;gap:2px}
.choice-amt{font-weight:700;font-size:18px}
.choice-pay{font-size:14px;color:var(--grey)}
.radio{width:22px;height:22px;border-radius:50%;border:1.5px solid #C9CDD3}
.choice:has(input:checked){border-color:var(--ink)}
.choice:has(input:checked) .radio{border:7px solid var(--red)}
.info{background:var(--soft);border-radius:var(--radius);padding:6px 16px;margin:0 0 10px}
.info .row{display:flex;justify-content:space-between;padding:11px 0;font-size:15px;border-top:1px solid #E9EBEF}
.info .row:first-child{border-top:0}
.info .row.total{font-weight:700;font-size:16px}
.green{color:var(--green)}

/* formulaire */
.form{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.form label{display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:var(--grey);font-weight:500}
.form input,.form .select{width:100%;min-width:0;height:48px;border:1px solid var(--line);border-radius:12px;padding:0 14px;font-size:16px;color:var(--ink);background:#fff;display:flex;align-items:center;outline:none;font-weight:400}
.form .select{position:relative}
.form .select::after{content:"";position:absolute;right:14px;top:50%;width:8px;height:8px;border-right:1.5px solid var(--grey);border-bottom:1.5px solid var(--grey);transform:translateY(-70%) rotate(45deg)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid2>label{min-width:0}
.check{flex-direction:row !important;align-items:flex-start !important;gap:10px !important;font-size:13.5px !important;color:#3A3F47 !important;margin-top:4px;line-height:1.4}
.box{width:22px;height:22px;border-radius:7px;border:1.5px solid #C9CDD3;flex:none;position:relative}
.box.on{background:var(--ink);border-color:var(--ink)}
.box.on::after{content:"";position:absolute;left:7px;top:3px;width:5px;height:10px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg)}

/* OTP */
.otp{display:flex;gap:8px;margin:26px 0 14px}
.otp span{flex:1;height:58px;border:1.5px solid var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:600}
.otp span.cur{border-color:var(--ink)}
.or{display:flex;align-items:center;gap:12px;color:var(--grey);font-size:13px;margin:14px 0 8px}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}

/* confirmation */
.bigcheck{width:84px;height:84px;border-radius:50%;background:var(--green);position:relative;margin:30px 0 18px}
.bigcheck::after{content:"";position:absolute;left:30px;top:20px;width:20px;height:36px;border-right:4px solid #fff;border-bottom:4px solid #fff;transform:rotate(45deg)}
.bigcheck.light{background:#fff}
.bigcheck.light::after{border-color:var(--green)}

/* Messages */
.msgs{background:#fff}
.msgs-hdr{background:#F6F6F6;border-bottom:1px solid #E3E3E6;padding:4px 10px 8px;align-items:flex-end}
.msgs-contact{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px}
.avatar{width:42px;height:42px;border-radius:50%;background:linear-gradient(180deg,#A5ACB8,#858D9A);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:600}
.msgs-date{text-align:center;color:#8E8E93;font-size:11px;margin:12px 0 10px}
.bubble{background:#E9E9EB;color:#000;border-radius:18px;padding:10px 14px;font-size:16px;line-height:1.35;max-width:84%;position:relative}
.bubble a{color:#0A84FF;text-decoration:underline;word-break:break-all}
.msgs-meta{color:#8E8E93;font-size:11px;margin:6px 0 0 6px}
.msgs-input{padding:8px 16px 36px}
.msgs-input span{display:flex;align-items:center;height:36px;border:1px solid #D1D1D6;border-radius:18px;padding:0 14px;color:#8E8E93;font-size:15px}

/* Wallet */
.wallet-s{background:#F2F2F7}
.wallet-hdr{background:transparent}
.dots{color:#0A84FF;font-weight:700;letter-spacing:1px}
.toast{background:#1C1C1E;color:#fff;font-size:13.5px;font-weight:500;border-radius:20px;padding:9px 16px;align-self:center;width:max-content;margin:4px auto 16px}
.card-wallet{border-radius:14px}
.wallet-info{background:#fff;border-radius:14px;padding:4px 16px;margin:18px 0 12px}
.wallet-info .row{display:flex;justify-content:space-between;padding:12px 0;font-size:15px;border-top:1px solid #EBEBF0}
.wallet-info .row:first-child{border-top:0}
.wallet-info .row span{color:#3A3F47}

/* Paiement en station */
.pay-s{background:#0B0B0D;color:#fff}
.pay-body{justify-content:center;gap:4px}
.card-pay{width:62%;border-radius:10px;margin-bottom:10px}
.waves{position:relative;width:44px;height:44px;margin:2px 0 10px}
.waves i{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-45deg);border:3px solid transparent;border-top-color:#fff;border-radius:50%}
.waves i:nth-child(1){width:14px;height:14px}.waves i:nth-child(2){width:28px;height:28px}.waves i:nth-child(3){width:42px;height:42px}
.light{color:#fff}
.lead.light{color:rgba(255,255,255,.78)}
.fine.light{color:rgba(255,255,255,.55)}
.pay-amt{font-size:46px;font-weight:800;letter-spacing:-.03em;margin:2px 0 6px}
.pay-s .bigcheck{margin:6px 0 10px;width:70px;height:70px}
.pay-s .bigcheck::after{left:25px;top:16px;width:16px;height:30px}

/* démo : flèches et légende */
.demo-arrow{width:52px;height:52px;border-radius:50%;border:1px solid #D9DCE1;background:#fff;color:var(--ink);font-size:30px;line-height:1;cursor:pointer;flex:none}
.demo-arrow:hover{background:var(--ink);color:#fff;border-color:var(--ink)}
.caption{position:absolute;left:0;right:0;bottom:12px;text-align:center;font-size:12.5px;color:var(--grey);letter-spacing:.02em}

/* mobile : plein écran */
@media (max-width:640px){
  html,body{background:#fff}
  .stage{padding:0;gap:0;min-height:100dvh;align-items:stretch}
  .device{width:100%;height:100dvh;border-radius:0;padding:0;background:#fff}
  .screen{border-radius:0}
  .island{display:none}
  .statusbar{display:none}
  .s{padding-top:env(safe-area-inset-top,12px)}
  .homebar{display:none}
  .demo-arrow{display:none}
  .caption{display:none}
  .ftr{padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))}
  .msgs-input{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
}
