/* COMŸ : palette argent et anthracite. Les couleurs d’erreur et d’alerte restent distinctes. */
:root{--bg:#f2f3f5;--paper:#fff;--ink:#24272d;--muted:#626975;--green:#333841;--green2:#59616e;--sage:#e5e7eb;--terracotta:#59616e;--line:#dce0e5;--shadow:0 14px 40px rgba(20,24,32,.07)}
.sidebar{background:#17191d!important;color:#f8f9fa}.sidebar .brand{border-bottom:1px solid #333841;margin-bottom:14px}.sidebar .nav a{color:#e1e4e9}.sidebar .nav a:hover,.sidebar .nav a.active{background:#343943;color:#fff}.sidebar .nav a.active{box-shadow:inset 3px 0 #c8cdd5}.sidebar .nav a>span:first-child{color:#dce1e9!important;background:rgba(255,255,255,.08)!important}.sidebar-bottom,.brand small,.env-pill{color:#bbc2cd!important}
.topbar{background:rgba(242,243,245,.94)!important;border-bottom-color:#dce0e5}.avatar{background:#e1e5eb;color:#333841}.menu-btn{color:#303640}.footer{color:#626975}
.input,.select,textarea{border-color:#cdd2da}.input:focus,.select:focus,textarea:focus{border-color:#737e90;box-shadow:0 0 0 3px rgba(70,85,110,.13)}.field label{color:#59616e}.btn.primary,.pwa-install-btn,.login-box .pwa-install-btn{background:#333841!important;color:#fff!important}.btn.primary:hover,.pwa-install-btn:hover{background:#17191d!important}.btn.secondary,.badge:not(.vat20){background:#e5e7eb;color:#333841}.btn:focus-visible,a:focus-visible{outline:3px solid #7993bc;outline-offset:3px}
.table th{background:#eceef1;color:#565e6a}.table tr:hover td{background:#f7f8fa}.summary{background:#f1f3f6;border-color:#dce0e5}.kpi,.dashboard-month-item{background:#eceef1!important}.dashboard-month-item strong{color:#303640}.dashboard-month-head span,.dashboard-month-item small,.dashboard-month-note{color:#626975}.dashboard-month-item.is-alert strong{color:#9a4b20}
.login-visual{background:linear-gradient(145deg,#111316,#343a45)!important;padding-top:32px;color:#f9fafb}.login-visual p{color:#d4d9e1}.login-visual h1{font-size:clamp(38px,4vw,58px)}.comy-login-brand{padding:0;margin:0 0 20px}.comy-login-brand img{display:block;width:min(440px,100%);height:210px;object-fit:cover;object-position:center}.login-panel{background:#f2f3f5}.comy-mobile-brand{display:none}.comy-mobile-brand img{width:100%;height:145px;object-fit:cover;object-position:center}
@media(max-width:760px){.comy-mobile-brand{display:block;margin:0 0 22px;border-radius:16px;background:#17191d;overflow:hidden}.login-panel{padding:24px;min-height:100vh}.login-box{padding-top:12px;padding-bottom:22px}}
@media print{.sidebar,.comy-mobile-brand{display:none!important}body{background:white;color:black}}

/* Menu défilant tactile, y compris avec barre d’adresse et petits écrans. */
@media screen and (max-width:900px){
 .sidebar{top:0!important;bottom:auto!important;height:100vh!important;height:100dvh!important;max-height:100vh!important;max-height:100dvh!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:thin;padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important}
 .sidebar>.brand,.sidebar>.nav,.sidebar>.sidebar-bottom{flex-shrink:0!important}
 .sidebar .nav{flex:0 0 auto!important}
 .sidebar-bottom{position:static!important;margin-top:18px!important;padding-bottom:12px!important}
}

/* Logo intégral : aucune découpe cover, format de bannière dédié. */
.comy-login-brand img{height:auto!important;max-height:235px;object-fit:contain!important}
.comy-mobile-brand{padding:10px 12px}
.comy-mobile-brand img{display:block;width:100%;height:auto!important;object-fit:contain!important}
.sidebar .brand-image img{height:auto!important;object-fit:contain!important}
@media(max-width:760px){.login-panel{align-items:start;justify-items:center;padding:30px 24px;min-height:100vh;min-height:100dvh}.login-box{padding-top:0}.comy-mobile-brand{margin-bottom:24px}}

/* COMŸ v5 — navigation et surfaces */
.sidebar{background:linear-gradient(170deg,#1c2027,#12151a)!important;padding-left:16px;padding-right:16px}
.sidebar .brand-image{padding-bottom:20px!important;margin-bottom:10px;border-color:rgba(255,255,255,.08)}
.comy-nav-caption{padding:12px 13px 7px;color:#9099a8;font-size:9px;font-weight:800;letter-spacing:.16em;line-height:1.4}.comy-nav-caption-admin{margin-top:12px;border-top:1px solid rgba(255,255,255,.08);padding-top:20px}
.sidebar .nav{gap:4px}.sidebar .nav a{position:relative;min-height:50px;padding:9px 11px;gap:11px;border:1px solid transparent;border-radius:13px;color:#cfd5df;font-size:13px;line-height:1.45;letter-spacing:.005em;transition:background .16s,border-color .16s,color .16s}
.sidebar .nav a:hover{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.07);color:white}
.sidebar .nav a.active{background:linear-gradient(110deg,rgba(255,255,255,.115),rgba(255,255,255,.035));border-color:rgba(255,255,255,.12);box-shadow:inset 3px 0 var(--nav-fg,#b8c6ff),0 6px 16px rgba(0,0,0,.1);color:white}
.sidebar .nav a[data-module]>.comy-nav-icon{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 33px!important;width:33px!important;height:33px!important;border-radius:10px!important;color:var(--nav-fg)!important;background:color-mix(in srgb,var(--nav-accent) 23%,#1b2028)!important;border:1px solid color-mix(in srgb,var(--nav-accent) 35%,transparent);box-shadow:inset 0 1px rgba(255,255,255,.04)}
.comy-nav-icon svg{display:block;width:19px;height:19px}.sidebar .nav a.active .comy-nav-icon{box-shadow:0 3px 12px color-mix(in srgb,var(--nav-accent) 20%,transparent)}
.sidebar-bottom{border-top:1px solid rgba(255,255,255,.08);padding-top:18px!important}.sidebar-bottom>a{font-size:12px;padding:10px 12px;border:1px solid rgba(255,255,255,.1);border-radius:10px;text-align:center}.sidebar-bottom>a:hover{background:rgba(255,255,255,.07)}
.main{background:radial-gradient(ellipse at top right,rgba(101,124,224,.045),transparent 55%),#f3f5f8}.topbar{background:rgba(249,250,252,.93)!important;height:100px;border-bottom:1px solid #e4e8ef;gap:15px}.topbar h1{font-family:inherit;font-size:24px;letter-spacing:-.045em;font-weight:760;line-height:1.2}.topbar p{font-size:11px;letter-spacing:.02em;color:#727c8c}.comy-heading{min-width:0}.comy-page-icon{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border-radius:14px;color:var(--comy-accent);background:color-mix(in srgb,var(--comy-accent) 10%,white);border:1px solid color-mix(in srgb,var(--comy-accent) 17%,white);box-shadow:0 5px 12px rgba(40,52,80,.04)}.comy-page-icon svg{width:23px;height:23px}.avatar{border:3px solid white;box-shadow:0 2px 9px #1b233010;color:#536073;font-size:13px;background:#e7ebf2}
.content{padding-top:26px}.card,.stat,.recipe-card{border:1px solid #e4e8ef;box-shadow:0 6px 24px rgba(31,43,67,.045);border-radius:19px}.card h2,.card h3,.section-title h2{font-family:inherit;letter-spacing:-.025em;font-weight:740}.card h2{font-size:19px}.stat{background:linear-gradient(145deg,white,#fafbfe);padding:23px}.stat .label{font-size:11px;letter-spacing:.04em}.stat .value{font-family:inherit;letter-spacing:-.04em;font-weight:750;font-size:30px}.stat .hint{color:#65728a}
.toolbar{gap:12px}.toolbar>.search,.toolbar>form{border-radius:14px}.input,.select,textarea{border-radius:10px;border-color:#dbe0e8;box-shadow:0 1px 2px rgba(25,40,70,.025)}.input:focus,.select:focus,textarea:focus{border-color:#8e9cbb;box-shadow:0 0 0 3px #7189bd18}.btn{border-radius:10px;font-size:13px;letter-spacing:.005em;min-height:40px}.btn.primary{background:linear-gradient(135deg,#3e4654,#262d38)!important;box-shadow:0 4px 10px #202c4214}.btn.secondary{background:#e9edf4;color:#46536a}.btn.ghost{border-color:#dce2ec}.btn.small{min-height:32px}
.table-wrap{border-radius:17px;border-color:#e2e7ef;box-shadow:0 5px 22px rgba(30,45,70,.035)}.table th{background:#eef1f6;color:#667288;letter-spacing:.065em;font-size:10px;padding:15px}.table td{padding:15px;border-top-color:#edf0f5;font-size:13px}.table tbody tr:hover td{background:#f6f8fc}.badge{letter-spacing:.01em}.badge.muted{background:#eef1f6;color:#65728a}.product-name{font-weight:720}.quick-links a{border-color:#e3e8f0;border-radius:13px;box-shadow:0 2px 7px #1d304207}.quick-links a:hover{border-color:#bbc7db;background:#fafbfe}
.dashboard-month-summary{border:1px solid #e2e7f0!important;background:linear-gradient(120deg,#fff,#f9faff)}.dashboard-month-item{background:#f0f3f9!important;border:1px solid #e9edf5}.dashboard-month-item strong{font-family:inherit;font-weight:760;letter-spacing:-.025em}.dashboard-month-item small{font-size:10px;letter-spacing:.015em}.note{border-color:#e3e8f0;box-shadow:0 3px 10px #1b304205}
@media(max-width:760px){.topbar{height:auto;min-height:86px;padding:16px;gap:10px}.topbar h1{font-size:20px;letter-spacing:-.03em}.topbar p{font-size:10px}.comy-page-icon{flex-basis:35px;width:35px;height:35px;border-radius:11px}.comy-page-icon svg{width:19px;height:19px}.menu-btn{padding:5px;flex:0 0 27px;font-size:22px}.avatar{width:34px;height:34px;flex:0 0 34px}.content{padding:20px 16px 36px}.sidebar .nav a{min-height:49px;font-size:13px}.stat{padding:18px}.table td{font-size:12px}.comy-heading{flex:1}}
@media(prefers-reduced-motion:reduce){.sidebar .nav a{transition:none}}
@media print{.comy-page-icon{display:none}.main{background:white}.card,.stat{box-shadow:none}}
