/* ============================================================
   TEST APP 1 — feuille de styles commune
   ============================================================ */
:root{
  --blue:#2412f0;
  --blue-deep:#1a08c9;
  --ink:#0f1830;
  --muted:#8a93a8;
  --line:#e6eaf2;
  --bg:#eceff6;
  --radius:22px;
  --shadow:0 10px 30px rgba(16,24,52,.08);
  --header-h:62px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
  min-height:100vh;
  display:flex;
  justify-content:center;
}
.phone{
  width:100%;
  max-width:460px;
  background:var(--bg);
  min-height:100vh;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* ---------- HEADER / LOGO / MENU ---------- */
.topbar{
  position:relative;
  z-index:30;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  height:var(--header-h);
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{
  display:flex;
  align-items:center;
  gap:11px;
  text-decoration:none;
  color:inherit;
  min-width:0;
}
.brand-logo{
  width:36px;height:36px;
  border-radius:11px;
  background:linear-gradient(150deg,#3a27ff,#1b09cf);
  color:#fff;
  display:grid;place-items:center;
  flex:0 0 auto;
  box-shadow:0 6px 14px rgba(36,18,240,.28);
}
.brand-logo svg{width:20px;height:20px}
.brand-name{
  font-size:16.5px;
  font-weight:800;
  letter-spacing:.3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.hamburger{
  width:42px;height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#f7f8fc;
  display:grid;
  place-content:center;
  gap:4px;
  cursor:pointer;
  padding:0;
  transition:.15s ease;
  flex:0 0 auto;
}
.hamburger:hover{background:#eef0f8}
.hamburger:focus-visible,.btn-primary:focus-visible,.sheet-cancel:focus-visible,
.back-btn:focus-visible,.icon-btn:focus-visible,.action:focus-visible .circle,
.tab:focus-visible,.brand:focus-visible{outline:2px solid #5b4bff;outline-offset:3px}
.hamburger:active{transform:scale(.96)}
.hamburger span{
  display:block;
  width:19px;height:2px;
  border-radius:2px;
  background:#2a3350;
  transition:.2s ease;
}
.hamburger.open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.hamburger.open span:nth-child(2){opacity:0}
.hamburger.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

.menu-panel{
  position:absolute;
  top:calc(100% + 6px);
  right:12px;
  width:214px;
  background:#fff;
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow:0 18px 40px rgba(15,24,48,.16);
  padding:7px;
  opacity:0;
  transform:translateY(-8px) scale(.98);
  pointer-events:none;
  transition:.18s ease;
  z-index:40;
}
.menu-panel.open{opacity:1;transform:none;pointer-events:auto}
.menu-panel a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border-radius:11px;
  color:#26304a;
  text-decoration:none;
  font-size:14px;
  font-weight:600;
}
.menu-panel a:hover{background:#f3f5fb;color:var(--blue)}
.menu-panel a svg{width:17px;height:17px;color:#8b95ab}
.menu-panel a:hover svg{color:var(--blue)}
.menu-panel .sep{height:1px;background:var(--line);margin:5px 8px}
.menu-panel .menu-login{color:var(--blue)}
.menu-panel .menu-login svg{color:var(--blue)}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  background:linear-gradient(160deg,#2c1bf5 0%,#2412f0 45%,#1b09cf 100%);
  padding:16px 18px 22px;
  overflow:hidden;
}
.hero::before,.hero::after{
  content:"";
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,.055);
  pointer-events:none;
}
.hero::before{width:230px;height:230px;top:-40px;right:-70px}
.hero::after{width:150px;height:150px;bottom:-30px;left:45%;background:rgba(255,255,255,.04)}

.hero-top{
  position:relative;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
}
.icon-btn{
  width:46px;height:46px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.12);
  color:#fff;
  display:grid;place-items:center;
  cursor:pointer;
  position:relative;
  transition:.15s ease;
  backdrop-filter:blur(4px);
  text-decoration:none;
}
.icon-btn:hover{background:rgba(255,255,255,.2)}
.icon-btn:active{transform:scale(.95)}
.icon-btn svg{width:21px;height:21px}
.hero-actions{display:flex;align-items:center;gap:12px}
.dot{
  position:absolute;
  top:8px;right:9px;
  width:9px;height:9px;
  border-radius:50%;
  background:#ff3b46;
  border:2px solid #2b19f2;
}

/* ---------- SOLDE ---------- */
.balance{
  position:relative;
  z-index:2;
  margin:12px auto 0;
  width:max-content;
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 17px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.28);
  color:#fff;
  box-shadow:0 6px 18px rgba(8,0,80,.18);
  backdrop-filter:blur(6px);
}
.balance svg{width:16px;height:16px;opacity:.95}
.balance-label{
  font-size:10px;
  letter-spacing:1.2px;
  text-transform:uppercase;
  opacity:.8;
  font-weight:600;
}
.balance-value{
  font-size:16px;
  font-weight:800;
  letter-spacing:.2px;
  font-variant-numeric:tabular-nums;
}
.balance-value small{font-size:11px;font-weight:700;opacity:.9;margin-left:3px}

/* ---------- BOUTONS AJOUTER / ENVOYER (réduits) ---------- */
.actions{
  position:relative;
  z-index:2;
  display:flex;
  justify-content:center;
  gap:20px;
  margin-top:16px;
}
.action{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  background:none;
  border:0;
  padding:0;
  cursor:pointer;
  color:#fff;
  font-family:inherit;
  text-decoration:none;
}
.action .circle{
  width:74px;height:74px;
  border-radius:50%;
  background:#fff;
  color:var(--blue);
  display:grid;place-items:center;
  box-shadow:0 10px 22px rgba(6,0,70,.26),0 0 0 8px rgba(255,255,255,.06);
  transition:transform .16s ease,box-shadow .16s ease;
}
.action .circle svg{width:27px;height:27px}
.action:hover .circle{transform:translateY(-3px);box-shadow:0 14px 28px rgba(6,0,70,.32),0 0 0 8px rgba(255,255,255,.1)}
.action:active .circle{transform:scale(.95)}
.action .label{font-size:15px;font-weight:700;letter-spacing:.2px}

/* ---------- CARTES / CONTENU ---------- */
main{
  flex:1;
  padding:18px 14px 26px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.card{
  background:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.row-collegues{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  cursor:pointer;
  border:0;
  background:#fff;
  width:100%;
  text-align:left;
  font-family:inherit;
  border-radius:var(--radius);
  text-decoration:none;
  color:inherit;
  transition:.15s ease;
}
.row-collegues:hover{box-shadow:0 14px 34px rgba(16,24,52,.12)}
.badge-people{
  width:44px;height:44px;
  border-radius:14px;
  background:#edf0ff;
  color:var(--blue);
  display:grid;place-items:center;
  flex:0 0 auto;
}
.badge-people svg{width:23px;height:23px}
.row-collegues .txt{flex:1;min-width:0}
.row-collegues .t1{display:block;font-size:16px;font-weight:700;letter-spacing:-.2px}
.row-collegues .t2{display:block;font-size:13px;color:var(--muted);margin-top:3px}
.chev{color:#b9c1d2;flex:0 0 auto}
.chev svg{width:20px;height:20px}

.files-card{padding:18px 13px 22px;flex:1;display:flex;flex-direction:column}
.files-head{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.files-title{
  font-size:16px;
  font-weight:800;
  letter-spacing:-.35px;
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}
.count-pill{
  min-width:22px;height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#e7ecff;
  color:var(--blue);
  font-size:12.5px;
  font-weight:800;
  display:grid;place-items:center;
}
.tabs{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:1px;
  background:#f2f4fa;
  border-radius:11px;
  padding:3px 2px;
  flex:0 0 auto;
}
.tab{
  border:0;
  background:transparent;
  font-family:inherit;
  font-size:11.5px;
  font-weight:600;
  color:#6b7488;
  padding:6px 7px;
  border-radius:9px;
  cursor:pointer;
  white-space:nowrap;
  transition:.15s ease;
}
.tab.active{background:#fff;color:var(--ink);box-shadow:0 2px 6px rgba(16,24,52,.1)}
.btn-filter{
  width:30px;height:30px;
  border-radius:10px;
  border:0;
  background:transparent;
  color:var(--blue);
  display:grid;place-items:center;
  cursor:pointer;
  flex:0 0 auto;
}
.btn-filter:hover{background:#eef1ff}
.btn-filter svg{width:18px;height:18px}
.sep{height:1px;background:var(--line);margin:14px -13px 0}

.file-list{list-style:none;margin:0;padding:0;display:none}
.file-list.show{display:block}
.file{
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 2px;
  border-bottom:1px solid var(--line);
  animation:pop .22s ease;
}
.file:last-child{border-bottom:0}
@keyframes pop{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.file-ic{
  width:38px;height:38px;
  border-radius:11px;
  background:#eef1ff;
  color:var(--blue);
  display:grid;place-items:center;
  flex:0 0 auto;
}
.file-ic svg{width:19px;height:19px}
.file .meta{flex:1;min-width:0}
.file .name{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file .sub{font-size:12px;color:var(--muted);margin-top:2px}
.tag{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  padding:4px 8px;
  border-radius:7px;
  flex:0 0 auto;
}
.tag.sent{background:#e6f7ee;color:#0d8a4d}
.tag.recu{background:#eef1ff;color:var(--blue)}

.empty{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:38px 14px 46px;
  gap:6px;
  color:var(--muted);
}
.empty svg{width:58px;height:58px;color:#c3cde0;margin-bottom:14px}
.empty .e1{font-size:15px;font-weight:600;color:#9aa4b8}
.empty .e2{font-size:12.5px;color:#aab2c4;line-height:1.5}

/* ---------- POPUP DU BAS ---------- */
.sheet-overlay{
  position:fixed;
  inset:0;
  background:rgba(10,18,40,.5);
  backdrop-filter:blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
  z-index:60;
}
.sheet-overlay.open{opacity:1;pointer-events:auto}

.sheet{
  position:fixed;
  left:50%;
  bottom:0;
  width:100%;
  max-width:460px;
  transform:translate(-50%,105%);
  background:#fff;
  border-radius:26px 26px 0 0;
  padding:10px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow:0 -12px 40px rgba(10,18,40,.24);
  transition:transform .28s cubic-bezier(.32,.72,0,1);
  z-index:61;
  box-sizing:border-box;
}
.sheet.open{transform:translate(-50%,0)}
.grabber{
  width:42px;height:4px;
  border-radius:99px;
  background:#dfe3ee;
  margin:2px auto 16px;
}
.sheet h3{
  margin:0;
  font-size:18px;
  font-weight:800;
  letter-spacing:-.3px;
  text-align:center;
}
.sheet-sub{
  margin:5px 0 18px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
}
.sheet-options{display:flex;flex-direction:column;gap:11px}

.sheet-opt{
  display:flex;
  align-items:center;
  gap:13px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fafbff;
  text-decoration:none;
  color:inherit;
  transition:.15s ease;
}
.sheet-opt:hover{border-color:#cfd7ff;background:#f5f7ff;transform:translateY(-1px)}
.sheet-opt:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-color:#cfd7ff}
.sheet-opt:active{transform:scale(.99)}
.opt-num{
  width:22px;height:22px;
  border-radius:50%;
  background:#e7ecff;
  color:var(--blue);
  font-size:11.5px;
  font-weight:800;
  display:grid;place-items:center;
  flex:0 0 auto;
}
.opt-ic{
  width:42px;height:42px;
  border-radius:13px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--blue);
  display:grid;place-items:center;
  flex:0 0 auto;
}
.opt-ic svg{width:21px;height:21px}
.opt-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.opt-txt b{font-size:14.5px;font-weight:700;letter-spacing:-.1px}
.opt-txt small{font-size:12px;color:var(--muted);line-height:1.35}
.sheet-cancel{
  margin-top:14px;
  width:100%;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:#4a5470;
  font-family:inherit;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:.15s ease;
}
.sheet-cancel:hover{background:#f5f7fc}
.sheet-cancel:active{transform:scale(.99)}

body.no-scroll{overflow:hidden}

/* ---------- TOAST ---------- */
.toast{
  position:fixed;
  left:50%;
  bottom:26px;
  transform:translate(-50%,20px);
  background:#0f1830;
  color:#fff;
  font-size:13px;
  font-weight:600;
  padding:12px 18px;
  border-radius:12px;
  box-shadow:0 14px 30px rgba(10,18,40,.3);
  opacity:0;
  pointer-events:none;
  transition:.22s ease;
  z-index:80;
  max-width:88vw;
  text-align:center;
}
.toast.show{opacity:1;transform:translate(-50%,0)}
.hidden-input{display:none}

/* ---------- PAGES SECONDAIRES ---------- */
.page-head{
  padding:16px 16px 0;
  display:flex;
  align-items:center;
  gap:12px;
}
.back-btn{
  width:38px;height:38px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:#2a3350;
  display:grid;place-items:center;
  text-decoration:none;
  flex:0 0 auto;
  box-shadow:0 2px 8px rgba(16,24,52,.06);
}
.back-btn svg{width:19px;height:19px}
.page-title{
  font-size:20px;
  font-weight:800;
  letter-spacing:-.4px;
  margin:0;
}
.page-body{
  flex:1;
  padding:14px 14px 28px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.lead{
  margin:0;
  font-size:13.5px;
  color:#66708a;
  line-height:1.55;
  padding:0 4px;
}
.lead b{color:var(--ink)}

/* lignes de liste génériques */
.rows{list-style:none;margin:0;padding:0;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.rows li + li{border-top:1px solid var(--line)}
.row{
  display:flex;
  align-items:center;
  gap:13px;
  padding:14px 16px;
  text-decoration:none;
  color:inherit;
  background:#fff;
  width:100%;
  border:0;
  font-family:inherit;
  text-align:left;
  cursor:pointer;
  transition:.15s ease;
}
.row:hover{background:#fafbff}
.avatar{
  width:42px;height:42px;
  border-radius:50%;
  background:linear-gradient(150deg,#eef1ff,#dfe5ff);
  color:var(--blue);
  font-size:14px;
  font-weight:800;
  display:grid;place-items:center;
  flex:0 0 auto;
}
.row .meta{flex:1;min-width:0}
.row .meta b{display:block;font-size:14.5px;font-weight:700}
.row .meta small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.chip{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.3px;
  text-transform:uppercase;
  padding:4px 8px;
  border-radius:7px;
  background:#e6f7ee;
  color:#0d8a4d;
  flex:0 0 auto;
}
.chip.off{background:#f1f2f6;color:#8a93a8}

/* QR */
.qr-wrap{
  background:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px 20px 26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.qr-frame{
  padding:14px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 6px 18px rgba(16,24,52,.07);
}
.qr-frame img{display:block;width:212px;height:212px}
.qr-code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:19px;
  font-weight:700;
  letter-spacing:4px;
  color:var(--ink);
}
.qr-hint{font-size:12.5px;color:var(--muted);text-align:center;line-height:1.5;max-width:260px}

/* champs / boutons formulaire */
.field{display:flex;flex-direction:column;gap:7px}
.field label{font-size:12.5px;font-weight:700;color:#4a5470;letter-spacing:.2px}
.field input{
  width:100%;
  padding:14px;
  border-radius:13px;
  border:1px solid var(--line);
  background:#fff;
  font-family:inherit;
  font-size:14.5px;
  color:var(--ink);
  outline:none;
  transition:.15s ease;
}
.field input:focus{border-color:#b9c3ff;box-shadow:0 0 0 4px #eef1ff}
.btn-primary{
  width:100%;
  padding:15px;
  border-radius:14px;
  border:0;
  background:linear-gradient(150deg,#3a27ff,#1b09cf);
  color:#fff;
  font-family:inherit;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(36,18,240,.28);
  transition:.15s ease;
}
.btn-primary:hover{filter:brightness(1.06)}
.btn-primary:active{transform:scale(.99)}
.alert{
  padding:12px 14px;
  border-radius:12px;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
}
.alert.err{background:#fdecec;color:#b0212a;border:1px solid #f7cfd1}
.alert.ok{background:#e9f9f0;color:#0d7a45;border:1px solid #c9efdb}
.hint-box{
  background:#f7f8fc;
  border:1px dashed #d6dcec;
  border-radius:13px;
  padding:12px 14px;
  font-size:12px;
  color:#6b7488;
  line-height:1.5;
}
.hint-box code{background:#fff;border:1px solid var(--line);border-radius:6px;padding:1px 6px;font-size:11.5px;color:#26304a}

/* textes de contenu */
.doc{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:20px 18px;display:flex;flex-direction:column;gap:12px}
.doc h3{margin:0;font-size:15.5px;font-weight:800;letter-spacing:-.2px}
.doc p{margin:0;font-size:13.5px;line-height:1.65;color:#5b6580}
.quote{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;display:flex;flex-direction:column;gap:12px}
.quote p{margin:0;font-size:13.8px;line-height:1.6;color:#39425c;font-style:italic}
.quote .who{display:flex;align-items:center;gap:10px}
.quote .who b{font-size:13.5px;font-weight:800;display:block}
.quote .who small{font-size:11.5px;color:var(--muted)}
.stars{color:#f5a623;font-size:13px;letter-spacing:2px}

@media (max-width:360px){
  .action .circle{width:68px;height:68px}
  .action .circle svg{width:24px;height:24px}
  .tab{padding:6px 6px;font-size:11px}
  .brand-name{font-size:15px}
}

/* ---------- ESPACE COMPTE ---------- */
.solde-carte{
  background:linear-gradient(160deg,#2c1bf5,#1b09cf);
  border-radius:22px;
  padding:20px;
  color:#fff;
  box-shadow:0 14px 30px rgba(6,0,70,.22);
}
.solde-carte .lab{font-size:10.5px;letter-spacing:1.3px;text-transform:uppercase;opacity:.82;font-weight:700}
.solde-carte .val{font-size:30px;font-weight:800;letter-spacing:-.8px;margin-top:8px;font-variant-numeric:tabular-nums}
.solde-carte .val small{font-size:13px;font-weight:700;margin-left:3px}
.solde-carte .pied{margin-top:14px;font-size:12px;opacity:.85;display:flex;align-items:center;justify-content:space-between;gap:10px}
.solde-carte .pied a{color:#fff;text-decoration:none;font-weight:700;font-size:12px;border-bottom:1px solid rgba(255,255,255,.45);padding-bottom:1px}
.tuiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tuile{background:#fff;border-radius:16px;box-shadow:var(--shadow);padding:15px}
.tuile .n{font-size:24px;font-weight:800;letter-spacing:-.8px;font-variant-numeric:tabular-nums}
.tuile .l{font-size:12px;color:var(--muted);margin-top:3px;font-weight:600}
.raccourcis{display:flex;gap:10px}
.raccourcis a{
  flex:1;display:flex;align-items:center;justify-content:center;gap:8px;
  padding:13px;border-radius:14px;background:#fff;border:1px solid var(--line);
  text-decoration:none;color:var(--ink);font-size:13.5px;font-weight:700;
  box-shadow:0 4px 12px rgba(16,24,52,.05);
}
.raccourcis a svg{width:17px;height:17px;color:var(--blue)}
.lien-discret{display:block;text-align:center;font-size:13px;font-weight:600;color:#6b7488;text-decoration:none;padding:8px}

/* ============================================================
   RESPONSIVE — mobile : cadre téléphone / tablette et PC : plein écran
   ============================================================ */

/* ---- Tablette (≥ 768 px) ---- */
@media (min-width: 768px) {
  body { display: block; }

  /* le cadre téléphone disparaît : l'app occupe toute la largeur */
  .phone { max-width: none; width: 100%; min-height: 100vh; }

  .topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    height: 72px;
    padding: 0 28px;
  }
  .brand-name { font-size: 18px; }
  .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
  .brand-logo svg { width: 22px; height: 22px; }
  .hamburger { width: 46px; height: 46px; }
  .menu-panel { right: calc((100% - 1120px) / 2 + 28px); width: 260px; }
  .menu-panel a { font-size: 14.5px; padding: 12px 14px; }

  .hero { padding: 26px 28px 34px; }
  .hero-top { max-width: 1120px; margin: 0 auto; }
  .hero-actions { gap: 14px; }
  .icon-btn { width: 50px; height: 50px; }
  .icon-btn svg { width: 23px; height: 23px; }

  .balance {
    margin-top: 18px;
    padding: 10px 22px;
  }
  .balance-value { font-size: 18px; }

  .actions { gap: 40px; margin-top: 24px; }
  .action .circle {
    width: 96px; height: 96px;
    box-shadow: 0 14px 30px rgba(6,0,70,.28), 0 0 0 10px rgba(255,255,255,.06);
  }
  .action .circle svg { width: 34px; height: 34px; }
  .action .label { font-size: 17px; }

  main, main.page-body {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 28px 40px;
  }

  /* les pages secondaires gardent une colonne lisible */
  main.page-body { max-width: 780px; }
  .page-title { font-size: 24px; }

  /* le popup du bas devient une fenêtre centrée */
  .sheet {
    top: 50%;
    bottom: auto;
    max-width: 470px;
    border-radius: 20px;
    padding: 22px 22px 20px;
    transform: translate(-50%, -46%) scale(.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 26px 60px rgba(10,18,40,.3);
  }
  .sheet.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .grabber { display: none; }
  .sheet h3 { font-size: 19px; }
  .toast { bottom: 34px; }
}

/* ---- Ordinateur (≥ 1024 px) : deux colonnes ---- */
@media (min-width: 1024px) {
  /* l'app remplit la hauteur de la fenêtre */
  .phone { display: flex; flex-direction: column; }
  main:not(.page-body) {
    flex: 1;
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
  }
  /* colonne de gauche : les deux cartes empilées */
  .col-gauche {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }
  .col-gauche > .card { flex: 0 0 auto; }
  /* les pages secondaires restent une colonne lisible */
  main.page-body {
    display: flex;
    flex-direction: column;
    max-width: 780px;
    flex: 0 0 auto;
  }
  .files-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .files-card .empty { flex: 1; display: grid; place-items: center; padding: 30px 18px; }
  .hero { padding: 22px 34px 28px; }
  .actions { width: 100%; margin: 16px auto 0; justify-content: center; }
  .balance { margin-left: auto; margin-right: auto; }
  .action .circle { width: 94px; height: 94px; }
  .action .circle svg { width: 33px; height: 33px; }
  .actions { gap: 52px; margin-top: 18px; }
  .balance { margin-top: 14px; }
}

/* ---- Grand écran (≥ 1500 px) : l'app occupe réellement l'écran ---- */
@media (min-width: 1500px) {
  .topbar-inner, .hero-top, main, .actions, .balance {
    max-width: min(1440px, 94vw);
  }
  .hero-top, main { margin-left: auto; margin-right: auto; }

  main:not(.page-body) {
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 24px;
  }
  main.page-body { max-width: 880px; }

  .topbar-inner { height: 78px; padding: 0 40px; }
  .brand-name { font-size: 19px; }
  .hero { padding: 28px 40px 34px; }
  .hero-intro h1 { font-size: 34px; }
  .hero-intro p { font-size: 15.5px; max-width: 560px; }
  .balance { padding: 11px 24px; margin-left: auto; margin-right: auto; }
  .balance-value { font-size: 19px; }
  .actions { gap: 60px; margin: 16px auto 0; }
  .action .circle { width: 104px; height: 104px; }
  .action .circle svg { width: 36px; height: 36px; }
  .action .label { font-size: 18px; }
  .files-card .empty { padding: 56px 18px 64px; }
  .card { padding: 20px 20px 22px; }
  .menu-panel { right: max(30px, calc((100% - 1440px) / 2 + 40px)); }
}

/* ---- Très grand écran (≥ 1900 px) : on élargit encore ---- */
@media (min-width: 1900px) {
  .topbar-inner, .hero-top, main, .actions, .balance {
    max-width: min(1640px, 92vw);
  }
  main:not(.page-body) { grid-template-columns: 430px minmax(0, 1fr); }
  .actions, .balance { margin-left: auto; margin-right: auto; }
  .hero-intro h1 { font-size: 38px; }
  .hero-intro p { font-size: 16.5px; max-width: 620px; }
  .menu-panel { right: max(34px, calc((100% - 1640px) / 2 + 44px)); }
}

/* Écrans tactiles larges : on garde les cibles confortables */
@media (hover: none) and (min-width: 768px) {
  .action .circle { box-shadow: 0 10px 24px rgba(6,0,70,.24); }
}

/* ---------- éléments réservés au grand écran ---------- */
.hero-intro { display: none; }
.etapes { display: none; }

@media (min-width: 1024px) {
  .hero-intro {
    display: block;
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 14px auto 2px;
    text-align: center;
  }
  .hero-intro h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -.7px;
    font-weight: 800;
    color: #fff;
  }
  .hero-intro p {
    margin: 10px auto 0;
    max-width: 520px;
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .78);
  }

  .etapes {
    display: block;
    grid-column: 1;
    grid-row: 2;
    padding: 18px 18px 20px;
  }
  .etapes h2 {
    margin: 0 0 14px;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
  }
  .etapes ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .etapes li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
  }
  .etapes .num {
    width: 24px; height: 24px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #eef1ff;
    color: var(--blue);
    font-size: 11.5px;
    font-weight: 800;
    display: grid;
    place-items: center;
  }
  .etapes b {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
  }
  .etapes small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
  }
}
