/* ============================================================
   Hub — VERSION MOBILE SIMPLIFIEE (v820, agent mobile-simple-1211, 12/11, demande SHINO)
   Maquettes validees : Claude outputs/mobile-1211-v2. Tout est dans #hms (prefixe hms- / h-) :
   rien ne s'applique sur ordinateur ni en mode « Comme sur ordinateur ».
   Theme : noir + orange (theme Hub), aucun violet.
   ============================================================ */
html.hms-on, html.hms-on body { overflow: hidden !important; height: 100%; overscroll-behavior: none; }
html.hms-on #pwa-bar, html.hms-on #hv-btn, html.hms-on #hp, html.hms-on .hf, html.hms-on .hub-cap-pop ~ .hub-demo-pill,
html.hms-on .mobile-topbar, html.hms-on .hub-demo-pill, html.hms-on #hub-toast, html.hms-on .hub-toast { display: none !important; }
html.hms-on .hub-cap-pop { z-index: 2147483600 !important; }

#hms { --bg: #09090a; --tx: #f5f5f6; --tx2: #a3a3ab; --tx3: #6c6c75; --or: #ff7a3d; --or2: #ffa06a; --ord: rgba(255,122,61,.14);
  --gr: #3ddc97; --grd: rgba(61,220,151,.12); --rd: #ff6b6b; --rdd: rgba(255,107,107,.13); --am: #ffc14d; --amd: rgba(255,193,77,.13);
  --ln: rgba(255,255,255,.08); --ln2: rgba(255,255,255,.13); --ease: cubic-bezier(.2,.8,.2,1);
  --st: env(safe-area-inset-top, 0px); --sbm: env(safe-area-inset-bottom, 0px);
  position: fixed; inset: 0; z-index: 2147482000; background: var(--bg); color: var(--tx); display: none; isolation: isolate; overflow: hidden;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; text-align: left; letter-spacing: normal; }
html.hms-on #hms { display: block; }
#hms *, #hms *::before, #hms *::after { box-sizing: border-box; }
#hms button { appearance: none; -webkit-appearance: none; background: none; border: 0; margin: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: inherit; line-height: inherit; box-shadow: none; min-width: 0; min-height: 0; width: auto; height: auto; letter-spacing: inherit; text-transform: none; }
#hms input, #hms textarea { appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: 0; margin: 0; padding: 0; color: inherit; font: inherit; width: 100%; min-width: 0; box-shadow: none; height: auto; border-radius: 0; }
#hms input::placeholder, #hms textarea::placeholder { color: var(--tx3); opacity: 1; font-weight: 400; }
#hms img { max-width: 100%; display: block; }
#hms h1, #hms h2, #hms h3, #hms p { margin: 0; padding: 0; font-weight: inherit; }
#hms .tn { font-variant-numeric: tabular-nums; }

/* fond */
#hms .hms-bgi { position: absolute; inset: 0 0 auto 0; height: 560px; background: url(../assets/mobile/bg.jpg) top right / cover no-repeat; opacity: .55; -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); z-index: -2; pointer-events: none; }
#hms .hms-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
#hms.hms-auth .hms-tb, #hms.hms-auth .hms-tbf { display: none; }
#hms.hms-auth .hms-bgi { height: 100%; opacity: .7; }

/* ecrans */
#hms .hms-v { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: calc(var(--st) + 12px) 16px calc(130px + var(--sbm)); overscroll-behavior: contain; }
#hms .hms-v.no-tb { padding-bottom: calc(40px + var(--sbm)); }
#hms .hms-layer { position: absolute; inset: 0; z-index: 30; background: var(--bg); overflow: hidden; animation: hmsIn .38s var(--ease) both; }
#hms .hms-layer.relais { background: #050506; }
#hms .hms-layer > .hms-v { padding-bottom: calc(40px + var(--sbm)); }

/* icones (masques Higgsfield) */
#hms .i { display: inline-block; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; vertical-align: middle; }
#hms .i-home { --m: url(../assets/mobile/i/home.png); } #hms .i-f_home { --m: url(../assets/mobile/i/f_home.png); }
#hms .i-box { --m: url(../assets/mobile/i/box.png); } #hms .i-f_box { --m: url(../assets/mobile/i/f_box.png); }
#hms .i-chat { --m: url(../assets/mobile/i/chat.png); } #hms .i-f_chat { --m: url(../assets/mobile/i/f_chat.png); }
#hms .i-bell { --m: url(../assets/mobile/i/bell.png); } #hms .i-f_bell { --m: url(../assets/mobile/i/f_bell.png); }
#hms .i-users { --m: url(../assets/mobile/i/users.png); } #hms .i-f_users { --m: url(../assets/mobile/i/f_users.png); }
#hms .i-gear { --m: url(../assets/mobile/i/gear.png); } #hms .i-f_gear { --m: url(../assets/mobile/i/f_gear.png); }
#hms .i-calendar { --m: url(../assets/mobile/i/calendar.png); } #hms .i-truck { --m: url(../assets/mobile/i/truck.png); }
#hms .i-reply { --m: url(../assets/mobile/i/reply.png); } #hms .i-block { --m: url(../assets/mobile/i/block.png); }
#hms .i-share { --m: url(../assets/mobile/i/share.png); } #hms .i-printer { --m: url(../assets/mobile/i/printer.png); }
#hms .i-sun { --m: url(../assets/mobile/i/sun.png); } #hms .i-search { --m: url(../assets/mobile/i/search.png); }
#hms .i-clock { --m: url(../assets/mobile/i/clock.png); } #hms .i-sparkles { --m: url(../assets/mobile/i/sparkles.png); }
#hms .i-lock { --m: url(../assets/mobile/i/lock.png); } #hms .i-mail { --m: url(../assets/mobile/i/mail.png); }
#hms .i-eye { --m: url(../assets/mobile/i/eye.png); } #hms .i-shield { --m: url(../assets/mobile/i/shield.png); }
#hms .i-doc { --m: url(../assets/mobile/i/doc.png); } #hms .i-trash { --m: url(../assets/mobile/i/trash.png); }
#hms .i-headset { --m: url(../assets/mobile/i/headset.png); } #hms .i-logout { --m: url(../assets/mobile/i/logout.png); }
#hms .i-devices { --m: url(../assets/mobile/i/devices.png); } #hms .i-bluetooth { --m: url(../assets/mobile/i/bluetooth.png); }
#hms .i-euro { --m: url(../assets/mobile/i/euro.png); } #hms .i-tag { --m: url(../assets/mobile/i/tag.png); }
#hms .i-star { --m: url(../assets/mobile/i/star.png); } #hms .i-check { --m: url(../assets/mobile/i/check.png); }
#hms .i-pin { --m: url(../assets/mobile/i/pin.png); } #hms .i-user { --m: url(../assets/mobile/i/user.png); }

/* en-tete */
#hms .h-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 16px; min-width: 0; }
#hms .h-hd > div { min-width: 0; }
#hms .h-hd h1 { font: 700 32px/1.05 -apple-system, "SF Pro Display", Inter, sans-serif; letter-spacing: -.035em; white-space: nowrap; }
#hms .h-hd .sub { color: var(--tx3); font-size: 13px; margin-bottom: 2px; }
#hms .h-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; max-width: 58vw; background: rgba(255,255,255,.06); border: 1px solid var(--ln); border-radius: 999px; padding: 0 12px 0 5px; font: 500 13px/1 inherit; font-family: inherit; color: #e4e4e7; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); white-space: nowrap; flex: none; }
#hms .h-pill span.t { overflow: hidden; text-overflow: ellipsis; }
#hms .h-pill.np { padding: 0 14px; }
#hms .h-pill .chev { width: 13px; height: 13px; color: var(--tx3); flex: none; }
#hms .h-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(145deg, #ff9a5c, #e8541a); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); flex: none; overflow: hidden; background-size: cover; background-position: center; }
#hms .h-glass { background: rgba(255,255,255,.06); border: 1px solid var(--ln); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
#hms .h-ib { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
#hms .h-ib svg { width: 22px; height: 22px; }

/* cartes */
#hms .h-card { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.068), rgba(255,255,255,.024)); border: 1px solid var(--ln); border-radius: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.38); }
#hms .h-lbl { font-weight: 500; font-size: 13px; color: var(--tx2); }
#hms .h-big { font: 700 44px/1 -apple-system, "SF Pro Display", Inter, sans-serif; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
#hms .h-big small { font-size: 24px; font-weight: 600; color: #d4d4d8; margin-left: 4px; }
#hms .h-mid { font: 700 30px/1 -apple-system, "SF Pro Display", Inter, sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
#hms .h-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-weight: 600; font-size: 12px; white-space: nowrap; max-width: 100%; overflow: hidden; }
#hms .h-chip .i { width: 13px; height: 13px; }
#hms .c-gr { background: var(--grd); color: var(--gr); } #hms .c-rd { background: var(--rdd); color: var(--rd); } #hms .c-am { background: var(--amd); color: var(--am); }
#hms .c-or { background: var(--ord); color: var(--or2); } #hms .c-gy { background: rgba(255,255,255,.07); color: var(--tx2); }
#hms .h-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
#hms .h-th { width: 52px; height: 52px; border-radius: 14px; background: #1a1a1d center / cover no-repeat; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
#hms .t1 { font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hms .t2 { font-size: 13px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hms .t3 { font-size: 12px; color: var(--tx3); }
#hms .h-pr { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
#hms .h-h2 { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 10px; font-weight: 600; font-size: 17px; letter-spacing: -.015em; }
#hms .h-h2 button { font-weight: 500; font-size: 13px; color: var(--or2); }
#hms .h-gh { font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tx3); margin: 22px 6px 9px; }
#hms .h-empty { padding: 28px 18px; text-align: center; color: var(--tx2); font-size: 14px; line-height: 1.5; }
#hms .h-empty b { display: block; color: var(--tx); font-size: 15.5px; margin-bottom: 4px; }
#hms .h-note { display: flex; gap: 10px; align-items: flex-start; color: var(--tx3); font-size: 12.5px; line-height: 1.5; padding: 6px 6px; }
#hms .h-note .i { width: 18px; height: 18px; color: var(--tx2); flex: none; margin-top: 1px; }

/* barre du bas */
#hms .hms-tbf { position: absolute; left: 0; right: 0; bottom: 0; height: calc(150px + var(--sbm)); background: linear-gradient(180deg, rgba(9,9,10,0), rgba(9,9,10,.92) 55%, #09090a); z-index: 19; pointer-events: none; }
#hms .hms-tb { position: absolute; left: 10px; right: 10px; bottom: calc(14px + var(--sbm)); height: 70px; border-radius: 28px; background: rgba(24,24,27,.82); -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%); border: 1px solid rgba(255,255,255,.09); box-shadow: 0 20px 44px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); display: flex; padding: 0 4px; z-index: 20; }
#hms .hms-tb button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #7b7b84; font-weight: 500; font-size: 10px; position: relative; text-align: center; }
#hms .hms-tb button .i { width: 25px; height: 25px; }
#hms .hms-tb button.on { color: var(--or); }
#hms .hms-tb button.on::before { content: ""; position: absolute; top: 9px; left: 50%; margin-left: -23px; width: 46px; height: 34px; border-radius: 14px; background: radial-gradient(closest-side, rgba(255,122,61,.28), transparent); animation: hmsGlow 3.2s ease-in-out infinite; }
#hms .hms-tb .hms-bd { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--or); color: #1c0b02; font-weight: 700; font-size: 10.5px; line-height: 18px; text-align: center; box-shadow: 0 0 0 2.5px #18181b; animation: hmsPop .5s var(--ease) both .3s; }

/* segments / puces */
#hms .h-seg { display: flex; background: rgba(255,255,255,.05); border: 1px solid var(--ln); border-radius: 16px; padding: 4px; gap: 2px; }
#hms .h-seg button { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 12px; font-weight: 600; font-size: 13px; color: var(--tx2); white-space: nowrap; transition: background .25s, color .25s; }
#hms .h-seg button.on { background: linear-gradient(180deg, #2c2c30, #222225); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08); }
#hms .h-seg button em { font-style: normal; color: var(--or2); }
#hms .h-chips { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; margin: 0 -16px; padding: 2px 16px; white-space: nowrap; scrollbar-width: none; }
#hms .h-chips::-webkit-scrollbar { display: none; }
#hms .h-chips.fit { overflow: visible; flex-wrap: nowrap; }
#hms .h-chips.fit .h-fc { flex: 1; justify-content: center; padding: 0 8px; }
#hms .h-fc { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--ln); font-weight: 600; font-size: 13px; color: #d4d4d8; flex: none; white-space: nowrap; transition: background .2s, border-color .2s; }
#hms .h-fc.on { background: linear-gradient(180deg, rgba(255,122,61,.25), rgba(255,122,61,.12)); border-color: rgba(255,122,61,.55); color: #fff; box-shadow: 0 0 18px rgba(255,122,61,.18); }
#hms .h-fc.off { opacity: .5; }
#hms .h-fc .n { color: var(--tx3); font-weight: 600; }
#hms .h-fc.on .n { color: var(--or2); }
#hms .h-fc .i { width: 16px; height: 16px; }
#hms .h-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
#hms .h-vg { width: 18px; height: 18px; border-radius: 50%; background: #09b1ba; display: grid; place-items: center; font-weight: 800; font-size: 10px; color: #fff; flex: none; }

/* boutons */
#hms .h-btn { height: 54px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; color: #fff; width: 100%; text-align: center; padding: 0 14px; white-space: nowrap; overflow: hidden; }
#hms .h-btn.p { background: linear-gradient(180deg, #ff8f55, #ff6a24); color: #1d0b01; box-shadow: 0 10px 30px rgba(255,106,36,.35), inset 0 1px 0 rgba(255,255,255,.35); position: relative; }
#hms .h-btn.p::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); animation: hmsSheen 4.5s ease-in-out infinite 1.2s; pointer-events: none; }
#hms .h-btn.s { background: rgba(255,255,255,.07); border: 1px solid var(--ln2); }
#hms .h-btn.d { background: linear-gradient(180deg, #ff6b6b, #e04545); color: #fff; box-shadow: 0 10px 26px rgba(224,69,69,.3); }
#hms .h-btn[disabled] { opacity: .5; pointer-events: none; }
#hms .h-btn .i, #hms .h-btn svg { width: 20px; height: 20px; flex: none; }
#hms .h-btn span.t { overflow: hidden; text-overflow: ellipsis; }
#hms .h-sb { height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 13.5px; background: rgba(255,255,255,.06); border: 1px solid var(--ln); color: #e4e4e7; flex: 1; min-width: 0; white-space: nowrap; }
#hms .h-sb .i { width: 17px; height: 17px; color: var(--tx2); }
#hms .h-sb.p { background: linear-gradient(180deg, #ff8f55, #ff6a24); color: #1d0b01; border: 0; }
#hms .h-sb[disabled] { opacity: .45; }

/* champs */
#hms .h-fl { margin-bottom: 12px; }
#hms .h-fl > label { display: block; font-weight: 500; font-size: 13px; color: var(--tx2); margin: 0 0 7px 4px; }
#hms .h-inp { min-height: 54px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--ln); display: flex; align-items: center; gap: 11px; padding: 0 16px; font-weight: 500; font-size: 16px; color: #fff; transition: border-color .2s, box-shadow .2s; }
#hms .h-inp:focus-within { border-color: rgba(255,122,61,.6); box-shadow: 0 0 0 4px rgba(255,122,61,.12); }
#hms .h-inp .i { width: 19px; height: 19px; color: var(--tx3); }
#hms .h-inp input { height: 52px; font-size: 16px; }
#hms .h-inp textarea { min-height: 130px; padding: 14px 0; line-height: 1.5; resize: none; font-size: 16px; }
#hms .h-inp.ta { align-items: flex-start; }
#hms .h-inp.err { border-color: rgba(255,107,107,.6); box-shadow: 0 0 0 4px rgba(255,107,107,.12); }
#hms .h-inp .eye { color: var(--tx3); display: grid; place-items: center; width: 28px; height: 28px; }
#hms .h-msg { font-size: 13.5px; line-height: 1.5; padding: 12px 14px; border-radius: 14px; margin: 10px 0 0; }
#hms .h-msg.ko { background: var(--rdd); color: #ffc2c2; border: 1px solid rgba(255,107,107,.25); }
#hms .h-msg.ok { background: var(--grd); color: #c8f5df; border: 1px solid rgba(61,220,151,.25); }
#hms .h-link { color: var(--or2); font-weight: 500; font-size: 13.5px; }

/* listes */
#hms .h-lst { padding: 4px 16px; }
#hms .h-li { display: flex; align-items: center; gap: 13px; min-height: 56px; padding: 8px 0; width: 100%; text-align: left; }
#hms .h-li + .h-li { border-top: 1px solid var(--ln); }
#hms .h-tile { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #2c2c31, #19191c); border: 1px solid rgba(255,255,255,.09); display: grid; place-items: center; color: var(--or2); flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
#hms .h-tile .i { width: 18px; height: 18px; }
#hms .h-tile.red { color: var(--rd); background: linear-gradient(145deg, #3a1d1d, #211212); }
#hms .h-li .tx { flex: 1; min-width: 0; }
#hms .h-chev { width: 15px; height: 15px; color: #55555c; flex: none; }
#hms .h-tg { width: 51px; height: 31px; border-radius: 16px; background: #39393e; position: relative; flex: none; transition: background .3s; }
#hms .h-tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: left .3s var(--ease); }
#hms .h-tg.on { background: linear-gradient(180deg, #ff8f55, #ff6a24); }
#hms .h-tg.on::after { left: 22px; }

/* panneau du bas */
#hms .h-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 60; animation: hmsFade .3s both; }
#hms .h-sheet { position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--sbm)); max-height: 82%; overflow-y: auto; border-radius: 34px; background: linear-gradient(180deg, rgba(38,38,42,.98), rgba(24,24,27,.99)); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 -20px 60px rgba(0,0,0,.6); z-index: 61; padding: 10px 18px 26px; animation: hmsSheet .45s var(--ease) both; }
#hms .h-sheet.out { animation: hmsSheetOut .25s ease-in both; }
#hms .h-grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: 0 auto 14px; }
#hms .h-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: 15px; font-weight: 500; font-size: 15.5px; color: #d4d4d8; width: 100%; border: 1px solid transparent; }
#hms .h-opt.on { background: var(--ord); border-color: rgba(255,122,61,.35); font-weight: 600; color: #fff; }
#hms .h-opt.on .i { color: var(--or); }

/* divers */
#hms .h-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--gr); flex: none; display: inline-block; }
#hms .h-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--gr); animation: hmsPing 1.8s ease-out infinite; }
#hms .h-ud { width: 9px; height: 9px; border-radius: 50%; background: var(--or); box-shadow: 0 0 10px rgba(255,122,61,.7); flex: none; display: inline-block; }
#hms .h-bav { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); background-size: cover; background-position: center; }
#hms .h-n3d { width: 46px; height: 46px; border-radius: 13px; background: #1a1a1d center / 118% no-repeat; flex: none; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
#hms .h-skel { border-radius: 24px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04)); background-size: 200% 100%; animation: hmsShim 1.4s linear infinite; }
#hms .hms-toast { position: absolute; left: 50%; bottom: calc(100px + var(--sbm)); transform: translateX(-50%) translateY(20px); max-width: calc(100% - 40px); background: rgba(30,30,33,.96); border: 1px solid var(--ln2); color: #f4f4f5; border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.4; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); box-shadow: 0 14px 34px rgba(0,0,0,.5); text-align: center; }
#hms .hms-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#hms .hms-toast.ko { border-color: rgba(255,107,107,.45); }

/* accueil */
#hms .h-ca { padding: 20px 0 6px; overflow: hidden; background: radial-gradient(120% 90% at 100% 0%, rgba(255,122,61,.2), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); }
#hms .h-ca svg { display: block; overflow: visible; }
#hms .h-ca .xl { display: flex; justify-content: space-between; padding: 2px 20px 10px; font-size: 11px; color: var(--tx3); }
#hms .h-2c { display: flex; gap: 12px; margin-top: 12px; }
#hms .h-2c > .h-card { flex: 1; min-width: 0; padding: 16px 16px 14px; }

/* colis */
#hms .h-ccard { padding: 14px; margin-bottom: 12px; }
#hms .h-ccard .acts { display: flex; gap: 8px; margin-top: 12px; }
#hms .h-ccard .acts .more { flex: none; width: 46px; letter-spacing: 2px; color: var(--tx2); }

/* relais */
#hms .hr-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--st) + 6px) 16px 10px; }
#hms .hr-prog { display: flex; gap: 4px; margin-top: 6px; justify-content: center; }
#hms .hr-prog span { width: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); transition: width .3s, background .3s; }
#hms .hr-prog span.d { background: var(--or); }
#hms .hr-prog span.c { width: 22px; background: var(--or); }
#hms .hr-wake { display: flex; justify-content: center; align-items: center; gap: 7px; font-weight: 500; font-size: 12px; color: #ffcfae; margin-bottom: 10px; min-height: 18px; }
#hms .hr-wake .i { width: 15px; height: 15px; color: var(--or2); animation: hmsSpin 14s linear infinite; }
#hms .hr-stage { position: absolute; left: 0; right: 0; top: calc(var(--st) + 100px); bottom: calc(110px + var(--sbm)); overflow-y: auto; padding: 0 16px; touch-action: pan-y; }
#hms .hr-card { background: #fff; border-radius: 28px; padding: 16px 16px 14px; color: #0a0a0a; box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.6); transition: transform .28s var(--ease), opacity .28s; }
#hms .hr-card .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
#hms .hr-card .hd span.k { font-weight: 500; font-size: 12.5px; color: #6b6b72; white-space: nowrap; }
#hms .hr-card .lb { margin: 12px auto 4px; min-height: 260px; display: grid; place-items: center; }
#hms .hr-card .lb img { width: 100%; height: auto; max-height: 56vh; object-fit: contain; image-rendering: -webkit-optimize-contrast; }
#hms .hr-card .lbw { color: #55555c; text-align: center; font-size: 14px; line-height: 1.5; padding: 20px 8px; }
#hms .hr-card .lbw b { display: block; color: #0a0a0a; font-size: 15px; margin-bottom: 4px; }
#hms .hr-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #e4e4e7; border-top-color: #ff6a24; animation: hmsSpin .9s linear infinite; margin: 0 auto 10px; }
#hms .hr-bot { position: absolute; left: 16px; right: 16px; bottom: calc(24px + var(--sbm)); display: flex; align-items: center; gap: 10px; z-index: 5; }
#hms .hr-bot .h-ib { width: 56px; height: 56px; border-radius: 20px; }
#hms .hr-bot .h-btn { flex: 1; height: 56px; border-radius: 20px; }
#hms .hr-card.sl { transform: translateX(-24px); opacity: 0; }
#hms .hr-card.sr { transform: translateX(24px); opacity: 0; }

/* chat */
#hms .hmc-row { display: flex; gap: 13px; padding: 13px 0; width: 100%; text-align: left; }
#hms .hmc-row + .hmc-row { border-top: 1px solid var(--ln); }
#hms .hmc-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--st) + 6px) 16px 12px; border-bottom: 1px solid var(--ln); background: rgba(9,9,10,.86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); position: relative; z-index: 3; }
#hms .hmc-msgs { position: absolute; left: 0; right: 0; top: calc(var(--st) + 63px); bottom: calc(76px + var(--sbm)); overflow-y: auto; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
#hms .hmc-msgs > * { flex-shrink: 0; }
#hms .hmc-b { max-width: 80%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.42; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
#hms .hmc-b.in { align-self: flex-start; background: rgba(255,255,255,.08); border-bottom-left-radius: 6px; }
#hms .hmc-b.out { align-self: flex-end; background: linear-gradient(180deg, #ff8f55, #ff6a24); color: #1d0b01; border-bottom-right-radius: 6px; font-weight: 500; }
#hms .hmc-b.sys { align-self: center; background: none; color: var(--tx3); font-size: 12.5px; text-align: center; padding: 4px 10px; max-width: 92%; }
#hms .hmc-b .st { display: block; font-size: 11px; opacity: .7; margin-top: 3px; font-weight: 500; }
#hms .hmc-day { align-self: center; color: var(--tx3); font-size: 12px; margin: 6px 0 2px; }
#hms .hmc-ai { margin-top: 8px; border-radius: 22px; padding: 1.2px; background: linear-gradient(110deg, rgba(255,122,61,.75), rgba(255,122,61,.12) 40%, rgba(255,160,106,.7) 70%, rgba(255,122,61,.12)); background-size: 200% 100%; animation: hmsShim 3.5s linear infinite; }
#hms .hmc-ai > div { border-radius: 21px; background: linear-gradient(180deg, #221710, #17120e); padding: 14px; }
#hms .hmc-ai .h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; color: var(--or2); }
#hms .hmc-ai .h .i { width: 17px; height: 17px; }
#hms .hmc-ai .b { font-size: 15px; line-height: 1.5; margin: 9px 0 4px; color: #f4f4f5; white-space: pre-wrap; word-break: break-word; }
#hms .hmc-ai .a { display: flex; gap: 8px; margin-top: 12px; }
#hms .hmc-ask { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; border: 1px dashed rgba(255,122,61,.45); color: var(--or2); font-weight: 600; font-size: 13.5px; margin-top: 6px; }
#hms .hmc-ask .i { width: 17px; height: 17px; }
#hms .hmc-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(14px + var(--sbm)); background: linear-gradient(transparent, rgba(9,9,10,.96) 30%); display: flex; align-items: flex-end; gap: 10px; z-index: 4; }
#hms .hmc-in .h-inp { flex: 1; min-height: 46px; border-radius: 23px; padding: 0 16px; }
#hms .hmc-in textarea { min-height: 44px; max-height: 120px; padding: 11px 0; font-size: 16px; line-height: 1.4; resize: none; }
#hms .hmc-send { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ff8f55, #ff6a24); color: #1d0b01; flex: none; }
#hms .hmc-send svg { width: 20px; height: 20px; }
#hms .hmc-send[disabled] { opacity: .45; }

/* connexion */
/* v824 : logo 3D entier sur iPhone (avant : image de fond + ombre « filter » animee, coupee en haut et en bas par Safari iOS).
   Image reelle avec marge interieure, ombre remplacee par un halo sans filter, taille reduite sur les petits ecrans. */
#hms .ha-logo { position: relative; width: 190px; height: 190px; margin: 6px auto 4px; padding: 12px; overflow: visible; }
#hms .ha-logo::before { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 24%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,106,36,.34), rgba(255,106,36,0)); pointer-events: none; }
#hms .ha-logo img { position: relative; width: 100%; height: 100%; max-width: none; object-fit: contain; animation: hmsFloat 6s ease-in-out infinite; will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
@media (max-height: 700px), (max-width: 360px) { #hms .ha-logo { width: 156px; height: 156px; padding: 10px; margin-top: 2px; } }
#hms .ha-ic { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; margin: 0 auto; background: radial-gradient(circle at 50% 0%, rgba(255,122,61,.4), rgba(255,122,61,.06) 70%); border: 1px solid rgba(255,122,61,.35); box-shadow: 0 0 50px rgba(255,122,61,.25); color: #ffb58a; }
#hms .ha-ic .i { width: 44px; height: 44px; }
#hms .ha-meter { display: flex; gap: 5px; margin: 10px 4px 0; }
#hms .ha-meter span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); transition: background .3s; }
#hms .ha-meter span.on { background: linear-gradient(90deg, #ff8f55, #ff6a24); }
#hms .ha-ck { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #55555c; display: grid; place-items: center; flex: none; color: #1d0b01; transition: background .2s; }
#hms .ha-ck.on { background: linear-gradient(180deg, #ff8f55, #ff6a24); border-color: transparent; }
#hms .ha-ck .i { width: 15px; height: 15px; opacity: 0; }
#hms .ha-ck.on .i { opacity: 1; }
#hms .ha-foot { text-align: center; font-size: 12px; color: var(--tx3); margin-top: 26px; }
#hms .ha-foot button { color: var(--tx2); font-size: 12px; }

/* legal */
#hms .hl-sec { margin-bottom: 12px; padding: 16px; scroll-margin-top: 12px; }
#hms .hl-sec h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 600; font-size: 15.5px; }
#hms .hl-sec .tx { font-size: 14px; line-height: 1.6; color: #c4c4cc; overflow-wrap: anywhere; }
#hms .hl-sec .tx p + p, #hms .hl-sec .tx ul { margin-top: 8px; }
#hms .hl-sec .tx ul { padding-left: 18px; margin: 8px 0 0; }
#hms .hl-sec .tx li { margin: 4px 0; }
#hms .hl-sec .tx b, #hms .hl-sec .tx strong { color: #fff; font-weight: 600; }

/* comptes */
#hms .hk-tot { padding: 18px 20px; overflow: hidden; background: radial-gradient(120% 90% at 100% 0%, rgba(255,122,61,.22), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); margin-bottom: 14px; }
#hms .hk-acc { padding: 16px; margin-bottom: 12px; }
#hms .hk-2 { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
#hms .hk-2 > div { flex: 1; min-width: 0; }
#hms .hk-2 > div.r { text-align: right; }
#hms .hk-2 .v { font-weight: 700; font-size: 20px; letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#hms .hk-bars { display: flex; gap: 5px; align-items: flex-end; height: 26px; margin-top: 12px; }
#hms .hk-bars .lb { flex: 1; align-self: center; font-size: 11.5px; color: var(--tx3); }
#hms .hk-bars span { flex: none; width: 7px; border-radius: 3px; background: rgba(255,255,255,.12); transform-origin: bottom; animation: hmsRise .7s var(--ease) both; min-height: 3px; }
#hms .hk-bars span.l { background: linear-gradient(180deg, #ffa06a, #ff6a24); }

/* reglages */
#hms .hg-ap { display: flex; gap: 10px; }
#hms .hg-ap > button { flex: 1; min-width: 0; padding: 12px; }
#hms .hg-ap > button.on { border-color: rgba(255,122,61,.6); box-shadow: 0 0 0 3px rgba(255,122,61,.13), 0 14px 34px rgba(0,0,0,.38); }
#hms .hg-ap .pv { height: 74px; border-radius: 12px; background: #0d0d0f; border: 1px solid var(--ln); display: flex; }
#hms .hg-ap .ft { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; font-weight: 600; font-size: 13px; text-align: left; }
#hms .hg-ap .rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #44444a; flex: none; }
#hms .hg-ap .on .rd { background: var(--or); border: 0; box-shadow: inset 0 0 0 5px #3a1a08; }

/* animations */
#hms .hms-an > * { animation: hmsUp .6s var(--ease) both; animation-delay: calc(var(--d, 0) * 60ms + 60ms); }
@keyframes hmsUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hmsIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes hmsFade { from { opacity: 0; } }
@keyframes hmsSheet { from { transform: translateY(105%); } }
@keyframes hmsSheetOut { to { transform: translateY(105%); } }
@keyframes hmsPop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes hmsPing { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
@keyframes hmsGlow { 50% { opacity: .55; transform: scale(1.12); } }
@keyframes hmsSheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes hmsDraw { from { stroke-dashoffset: var(--len, 900); } to { stroke-dashoffset: 0; } }
@keyframes hmsRise { from { opacity: 0; transform: scaleY(.2); } }
@keyframes hmsFloat { 50% { transform: translateY(-10px); } }
@keyframes hmsSpin { to { transform: rotate(360deg); } }
@keyframes hmsShim { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  #hms *, #hms *::before, #hms *::after { animation: none !important; transition: none !important; }
}
html.hms-shot #hms *, html.hms-shot #hms *::before, html.hms-shot #hms *::after { animation: none !important; transition: none !important; }

/* retour a la vue simplifiee depuis « Comme sur ordinateur » */
.hms-back-simple { display: none; }
@media (max-width: 768px) {
  html.hms-ordi .hms-back-simple { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(255,122,61,.14); border: 1px solid rgba(255,122,61,.4); color: #ffa06a; font: 600 12.5px/1 -apple-system, Inter, sans-serif; }
}
