/* Feuille de style commune des pages « modernes » (accueil, caisse...). Les 3 variables d'accent (--accent, --accent-rgb, --on-accent)
   sont posees par chaque page (couleur du theme de la boutique). */
:root{
  --bg:#f1f3f8; --surface:#ffffff; --surface-2:#f6f7fb; --ink:#11141a; --ink-2:#39404c; --muted:#697282; --line:#e4e7ee; --line-2:#eef0f5;
  --shadow-1:0 1px 2px rgba(16,24,40,.05), 0 1px 1px rgba(16,24,40,.03);
  --shadow-2:0 2px 4px rgba(16,24,40,.04), 0 14px 30px rgba(16,24,40,.09);
  --chip-bg:85%,93%; --chip-fg:65%,36%;
  --font:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
  color-scheme:light;
}
html[data-theme="dark"]{
  --bg:#0c0e11; --surface:#14171c; --surface-2:#191d23; --ink:#f3f5f9; --ink-2:#cdd3dd; --muted:#8b95a4; --line:#252a32; --line-2:#1d2229;
  --shadow-1:none; --shadow-2:0 16px 34px rgba(0,0,0,.5);
  --chip-bg:42%,20%; --chip-fg:92%,72%;
  color-scheme:dark;
}
*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0; font-family:var(--font); font-size:15px; line-height:1.45; color:var(--ink); background:var(--bg);
  background-image:radial-gradient(900px 420px at 92% -8%, rgba(var(--accent-rgb),.13), transparent 62%), radial-gradient(700px 380px at -6% 8%, rgba(var(--accent-rgb),.07), transparent 60%);
  background-repeat:no-repeat; min-height:100vh;
}
a{color:inherit; text-decoration:none;}
button{font-family:inherit;}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:10px;}
.hm-i{width:20px; height:20px; flex:none;}
.hm-wrap{max-width:1360px; margin:0 auto; padding:0 28px;}
.hm-top{position:sticky; top:0; z-index:40; backdrop-filter:saturate(1.4) blur(14px); -webkit-backdrop-filter:saturate(1.4) blur(14px);
  background:color-mix(in srgb, var(--bg) 78%, transparent); border-bottom:1px solid var(--line);}
.hm-top .hm-wrap{display:flex; align-items:center; gap:18px; height:70px;}
.hm-brand{display:flex; align-items:center; gap:12px; min-width:0; flex:none;}
.hm-logo{width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:linear-gradient(140deg,#1b1e23,#30353c); color:var(--accent); box-shadow:0 6px 14px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.06);}
.hm-logo .hm-i{width:22px; height:22px;}
.hm-brand b{display:block; font-size:17px; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:240px;}
.hm-brand div span{display:block; font-size:12px; color:var(--muted);}
.hm-search{flex:1; min-width:0; max-width:460px; margin:0 auto; display:flex; align-items:center; gap:10px; height:44px; padding:0 8px 0 14px; border-radius:14px; cursor:pointer;
  background:var(--surface); border:1px solid var(--line); color:var(--muted); font-size:14px; box-shadow:var(--shadow-1); transition:border-color .15s, box-shadow .15s;}
.hm-search:hover{border-color:rgba(var(--accent-rgb),.7); box-shadow:0 0 0 4px rgba(var(--accent-rgb),.14);}
.hm-search .hm-i{width:18px; height:18px;}
.hm-search span{flex:1; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
kbd{font-family:inherit; font-size:11px; font-weight:700; letter-spacing:.02em; padding:3px 7px; border-radius:7px; background:var(--surface-2); border:1px solid var(--line); color:var(--muted);}
.hm-actions{display:flex; align-items:center; gap:10px; margin-left:auto; flex:none;}
.hm-icobtn{width:44px; height:44px; border-radius:14px; display:grid; place-items:center; cursor:pointer; background:var(--surface); border:1px solid var(--line); color:var(--ink-2); box-shadow:var(--shadow-1); transition:transform .15s, border-color .15s, color .15s;}
.hm-icobtn:hover{transform:translateY(-1px); border-color:rgba(var(--accent-rgb),.7);}
#hmTheme .i-sun{display:none;} html[data-theme="dark"] #hmTheme .i-sun{display:block;} html[data-theme="dark"] #hmTheme .i-moon{display:none;}
.hm-out:hover{color:#e5484d; border-color:rgba(229,72,77,.6);}
.hm-user{display:flex; align-items:center; gap:10px; padding:5px 14px 5px 5px; height:44px; border-radius:14px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-1);}
.hm-avatar{width:34px; height:34px; border-radius:11px; display:grid; place-items:center; font-weight:800; font-size:15px; background:var(--accent); color:var(--on-accent);}
.hm-user b{display:block; font-size:13.5px; line-height:1.15;}
.hm-user small{display:block; font-size:11.5px; color:var(--muted); line-height:1.15;}
.hm-chip{width:44px; height:44px; border-radius:14px; display:grid; place-items:center; flex:none; background:hsl(var(--h),var(--chip-bg)); color:hsl(var(--h),var(--chip-fg));}
.hm-card{background:var(--surface); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow-1); padding:24px;}
.hm-card + .hm-card{margin-top:20px;}
.hm-h{display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 16px;}
.hm-h h2{margin:0; font-size:17px; letter-spacing:-.01em; font-weight:700;}
.hm-h a, .hm-h span.hm-note{font-size:13px; color:var(--muted); font-weight:600;}
.hm-h a:hover{color:var(--ink);}
.hm-foot{margin-top:34px; padding:22px 0 30px; border-top:1px solid var(--line);}
.hm-foot .hm-wrap{display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 24px; font-size:12.5px; color:var(--muted);}
.hm-foot .copyright-subfooter{padding:0 !important; text-align:right !important; font-size:12.5px !important; color:var(--muted) !important; width:100%;}
.hm-foot .hm-wrap > div.hm-foot-row{display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 24px; width:100%;}
.hm-rise{animation:hmRise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--d,0) * 70ms);}
@keyframes hmRise{from{opacity:0; transform:translateY(14px);}}

/* ───────── pages internes : navigation, onglets, boutons, champs, fenêtres ───────── */
.hm-wrap.wide{max-width:1500px;}
.hm-nav{display:flex; align-items:center; gap:2px; margin-left:6px; min-width:0; overflow-x:auto; scrollbar-width:none;}
.hm-nav::-webkit-scrollbar{display:none;}
.hm-nav a{padding:9px 13px; border-radius:11px; font-size:14px; font-weight:600; color:var(--ink-2); white-space:nowrap; transition:background .15s, color .15s;}
.hm-nav a:hover{background:var(--surface); color:var(--ink);}
.hm-nav a.on{background:var(--ink); color:var(--bg); box-shadow:inset 0 -3px 0 var(--accent);}
.hm-tabs{display:flex; align-items:center; gap:4px; padding:4px; border-radius:14px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-1); flex:none;}
.hm-tabs a{width:36px; height:36px; display:grid; place-items:center; border-radius:10px; font-weight:800; color:var(--muted); transition:background .15s, color .15s;}
.hm-tabs a:hover:not(.on){background:var(--surface-2); color:var(--ink);}
.hm-tabs a.on{background:var(--accent); color:var(--on-accent);}
.hm-tabs a .hm-i{width:17px; height:17px;}
.hm-tabs .sep{width:1px; height:20px; background:var(--line); margin:0 2px;}

.hm-b{display:inline-flex; align-items:center; justify-content:center; gap:9px; height:46px; padding:0 20px; border-radius:14px; border:1px solid transparent; font-weight:700; font-size:15px; cursor:pointer; transition:transform .15s, box-shadow .15s, background .15s, opacity .15s; white-space:nowrap;}
.hm-b:hover:not([disabled]){transform:translateY(-1px);}
.hm-b .hm-i{width:18px; height:18px;}
.hm-b.lg{height:64px; font-size:20px; border-radius:18px; width:100%;}
.hm-b.lg .hm-i{width:22px; height:22px;}
.hm-b.accent{background:var(--accent); color:var(--on-accent); box-shadow:0 10px 24px rgba(var(--accent-rgb),.32);}
.hm-b.dark{background:var(--ink); color:var(--bg);}
.hm-b.soft{background:var(--surface-2); color:var(--ink-2); border-color:var(--line);}
.hm-b.soft:hover:not([disabled]){border-color:var(--ink-2);}
.hm-b.danger{background:rgba(229,72,77,.1); color:#d93a3f; border-color:rgba(229,72,77,.28);}
.hm-b.danger:hover:not([disabled]){background:#e5484d; color:#fff;}
.hm-b[disabled]{opacity:.42; cursor:not-allowed; box-shadow:none;}

.hm-field{display:block; margin:0 0 16px;}
.hm-lbl{display:flex; align-items:center; gap:8px; margin:0 0 7px; font-size:12.5px; font-weight:700; letter-spacing:.02em; color:var(--muted);}
.hm-lbl .hm-i{width:15px; height:15px;}
.hm-in{width:100%; height:46px; padding:0 14px; border-radius:13px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font:inherit; font-size:15px; outline:0; transition:border-color .15s, box-shadow .15s;}
.hm-in:focus{border-color:var(--accent); box-shadow:0 0 0 4px rgba(var(--accent-rgb),.18);}
.hm-in::placeholder{color:var(--muted); opacity:.8;}
.hm-in.err{border-color:#e5484d; box-shadow:0 0 0 4px rgba(229,72,77,.15);}
.hm-seg{display:grid; grid-template-columns:repeat(3,1fr); gap:8px;}
.hm-seg label{position:relative; cursor:pointer; display:block;}
.hm-seg input{position:absolute; inset:0; opacity:0; cursor:pointer; margin:0;}
.hm-seg span{display:flex; flex-direction:column; align-items:center; gap:7px; padding:13px 6px 11px; border-radius:14px; border:1.5px solid var(--line); background:var(--surface); font-size:13px; font-weight:700; color:var(--ink-2); transition:border-color .15s, background .15s, box-shadow .15s; text-align:center; line-height:1.15;}
.hm-seg .hm-i{width:22px; height:22px; color:var(--muted);}
.hm-seg input:checked + span{border-color:var(--accent); background:rgba(var(--accent-rgb),.12); color:var(--ink); box-shadow:0 0 0 3px rgba(var(--accent-rgb),.16);}
.hm-seg input:checked + span .hm-i{color:var(--ink);}
.hm-seg input:focus-visible + span{outline:2px solid var(--accent); outline-offset:2px;}

.hm-toast{position:fixed; top:86px; left:50%; transform:translateX(-50%); z-index:200; display:flex; align-items:center; gap:12px; max-width:calc(100vw - 28px); padding:14px 22px 14px 18px; border-radius:16px; font-weight:700; font-size:15.5px; color:#fff; box-shadow:0 18px 44px rgba(0,0,0,.3); animation:hmToast .35s cubic-bezier(.2,.9,.3,1.25) both;}
.hm-toast .hm-i{width:22px; height:22px;}
.hm-toast.err{background:#dc3b3f;} .hm-toast.ok{background:#1f9d5c;} .hm-toast.info{background:#2f6fdc;}
@keyframes hmToast{from{opacity:0; transform:translate(-50%,-14px) scale(.96);}}
.hm-modal-ov{position:fixed; inset:0; z-index:150; display:none; align-items:center; justify-content:center; padding:20px; background:rgba(8,10,14,.52); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);}
.hm-modal-ov.on{display:flex; animation:hmFade .14s ease both;}
.hm-modal{width:100%; max-width:430px; border-radius:26px; padding:26px; background:var(--surface); border:1px solid var(--line); box-shadow:0 30px 80px rgba(0,0,0,.4); animation:hmPop .2s cubic-bezier(.2,.9,.3,1.1) both;}
.hm-modal h3{display:flex; align-items:center; gap:12px; margin:0 0 6px; font-size:20px; letter-spacing:-.01em;}
.hm-modal h3 .hm-chip{width:40px; height:40px; border-radius:13px;}
.hm-modal p.sub{margin:0 0 18px; color:var(--muted); font-size:13.5px;}
.hm-modal .acts{display:flex; gap:10px; margin-top:6px;}
.hm-modal .acts .hm-b{flex:1;}
.hm-busy{position:fixed; inset:0; z-index:300; display:grid; place-items:center; background:rgba(10,12,15,.5); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px);}
.hm-busy div{display:flex; align-items:center; gap:16px; padding:26px 34px; border-radius:22px; background:var(--surface); box-shadow:0 30px 70px rgba(0,0,0,.4); font-weight:700; font-size:17px;}
.hm-spin{width:28px; height:28px; border-radius:50%; border:3.5px solid var(--line); border-top-color:var(--accent); animation:hmSpin .8s linear infinite;}
@keyframes hmSpin{to{transform:rotate(360deg);}}
@keyframes hmFade{from{opacity:0;}} @keyframes hmPop{from{opacity:0; transform:translateY(-10px) scale(.98);}}

@media (max-width:1100px){
  .hm-top.inner .hm-wrap{flex-wrap:wrap; height:auto; padding-top:10px; padding-bottom:8px; row-gap:6px;}
  .hm-top.inner .hm-nav{order:5; flex:1 0 100%; margin:0; padding-bottom:2px;}
}
@media (max-width:900px){ .hm-brand div span, .hm-user div{display:none;} .hm-user{padding:5px;} }
@media (max-width:620px){ .hm-wrap{padding:0 14px;} .hm-brand b{max-width:120px;} .hm-toast{top:118px;}
  .hm-top.inner .hm-brand div{display:none;} .hm-top.inner .hm-actions{gap:8px;} .hm-tabs .sep, .hm-tabs a[href*="config_"]{display:none;} .hm-tabs a{width:34px; height:34px;} .hm-top.inner .hm-icobtn{width:40px; height:40px;} }
@media (prefers-reduced-motion:reduce){ *,*::before,*::after{animation:none !important; transition:none !important;} }
