:root{--navy:#0b1f2a;--navy2:#123444;--gold:#cba64b;--ink:#17232b;--muted:#667781;--line:#dce5e8;--surface:#fff;--soft:#f3f7f7;--danger:#a93232;--radius:18px;--shadow:0 24px 70px rgba(6,30,40,.14)}
*{box-sizing:border-box}
html{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--soft)}
body{margin:0}
button,input{font:inherit}
.auth-page{min-height:100vh;min-height:100dvh;padding:20px;background:linear-gradient(145deg,#e9f0ef,#f8f4e9)}
.auth-shell{min-height:calc(100vh - 40px);min-height:calc(100dvh - 40px);max-width:1440px;margin:auto;background:var(--surface);border-radius:26px;box-shadow:var(--shadow);display:grid;grid-template-columns:minmax(420px,1.05fr) minmax(430px,.95fr);overflow:hidden}
.auth-visual{position:relative;min-height:700px;padding:52px;color:#fff;background:linear-gradient(155deg,#071820 5%,#0f3441 58%,#185162);display:flex;flex-direction:column;justify-content:space-between;isolation:isolate}
.auth-visual:before,.auth-visual:after{content:"";position:absolute;border:1px solid rgba(203,166,75,.22);border-radius:50%;z-index:-1}
.auth-visual:before{width:520px;height:520px;right:-160px;top:80px}
.auth-visual:after{width:310px;height:310px;right:-50px;top:185px}
.auth-visual__overlay{position:absolute;inset:auto -100px -180px auto;width:540px;height:540px;background:radial-gradient(circle,rgba(203,166,75,.2),transparent 65%);z-index:-1}
.auth-brand{display:flex;align-items:center;justify-content:space-between}
.auth-brand img{object-fit:contain;width:148px;height:148px}
.version-badge,.auth-stats span{border:1px solid rgba(255,255,255,.19);background:rgba(255,255,255,.06);backdrop-filter:blur(8px);border-radius:999px;padding:10px 14px;font-size:.76rem;letter-spacing:.05em}
.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-weight:750;font-size:.72rem;color:var(--gold);margin:0 0 16px}
.auth-copy{max-width:590px}
.auth-copy h1{font-family:Georgia,serif;font-weight:500;font-size:clamp(3rem,5vw,5.6rem);line-height:.98;letter-spacing:-.045em;margin:0 0 28px}
.auth-copy>p:last-child{max-width:520px;color:#cbd9dc;font-size:1.08rem;line-height:1.7}
.auth-stats{display:flex;gap:10px;flex-wrap:wrap}
.auth-panel{display:flex;flex-direction:column;justify-content:space-between;padding:60px clamp(38px,6vw,100px) 34px}
.auth-form-wrap{width:min(100%,480px);margin:auto}
.mobile-brand{display:none}
.auth-panel h2{font-family:Georgia,serif;font-size:clamp(2rem,3vw,3rem);font-weight:500;letter-spacing:-.025em;margin:0 0 12px}
.form-intro{color:var(--muted);margin:0 0 38px;line-height:1.6}
.auth-panel label{display:block;font-size:.86rem;font-weight:700;margin:0 0 9px}
.label-row{margin-top:22px}
.field{height:58px;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;background:#fff;transition:.2s}
.field:focus-within{border-color:var(--gold);box-shadow:0 0 0 4px rgba(203,166,75,.13)}
.field-icon{width:48px;text-align:center;color:#84949b;font-weight:700}
.lock-icon{font-size:.9rem;line-height:1}
.lock-icon:before{content:none}
.field input{min-width:0;flex:1;height:100%;border:0;outline:0;background:transparent;padding:0 12px 0 0;color:var(--ink)}
.field input::placeholder{color:#a0adb2}
.password-toggle{border:0;background:transparent;color:var(--navy2);font-size:.75rem;font-weight:750;padding:12px;cursor:pointer}
.primary-button{height:58px;width:100%;border:0;border-radius:14px;background:var(--navy);color:#fff;font-weight:750;margin-top:30px;padding:0 22px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;box-shadow:0 12px 26px rgba(11,31,42,.2);transition:.2s}
.primary-button:hover{background:#103443;transform:translateY(-1px)}
.primary-button:disabled{opacity:.68;cursor:wait}
.primary-button.loading span:first-child{font-size:0}
.primary-button.loading span:first-child:after{content:"Connexion…";font-size:.94rem}
.button-arrow{font-size:1.3rem}
.alert{padding:13px 15px;border-radius:12px;background:#fff0ef;color:var(--danger);border:1px solid #f0caca;margin-bottom:18px;font-size:.88rem}
.support-note{text-align:center;color:var(--muted);font-size:.82rem;margin-top:24px}
.support-note a{color:var(--navy2);font-weight:800;text-decoration:none;border-bottom:1px solid rgba(18,52,68,.3)}
.support-note a:hover{color:#9b7420;border-color:currentColor}
.login-company-details{text-align:center;color:#8a989e;font-size:.68rem;line-height:1.6;margin:10px auto 0;max-width:420px}
.auth-panel footer{text-align:center;color:#93a0a5;font-size:.74rem;margin-top:40px}
.app-page{min-height:100vh;background:var(--soft)}
.sidebar{position:fixed;inset:0 auto 0 0;width:260px;background:var(--navy);color:#fff;padding:24px 18px;z-index:10}
.sidebar-brand{height:72px;display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;padding:0 10px 20px;border-bottom:1px solid rgba(255,255,255,.1)}
.sidebar-brand img{object-fit:contain}
.sidebar-brand strong{color:var(--gold)}
.sidebar nav{display:grid;gap:5px;margin-top:28px}
.nav-link{color:#d8e3e6;text-decoration:none;padding:13px 14px;border-radius:11px;display:flex;justify-content:space-between}
.nav-link.active{background:rgba(203,166,75,.15);color:#fff}
.nav-link.disabled{opacity:.55}
.nav-link small{font-size:.65rem}
.app-main{margin-left:260px;min-height:100vh;display:flex;flex-direction:column}
.app-main>.module-container,.app-main>.dashboard-content,.app-main>.workspace-content{flex:1}
.app-footer{min-height:64px;border-top:1px solid var(--line);color:#8a989e;background:#fff;padding:0 clamp(22px,4vw,64px);display:flex;align-items:center;justify-content:space-between;font-size:.68rem}
.app-footer-credit{display:inline-flex;align-items:center;gap:7px;color:var(--navy);font-weight:800;text-decoration:none;transition:color .18s ease,transform .18s ease}.app-footer-credit:hover{color:var(--gold);transform:translateY(-1px)}.app-footer-credit i{font-size:.62rem}@media(max-width:620px){.app-footer{align-items:flex-start;flex-direction:column;justify-content:center;gap:7px}}
.topbar{height:78px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;padding:0 34px;position:sticky;top:0}
.menu-button{display:none}
.topbar-user{display:flex;gap:18px;align-items:center;margin-left:16px;font-size:.86rem;font-weight:700}
.topbar-user form{margin:0}
.text-button{border:0;background:none;color:#9b3b35;cursor:pointer}
.content{padding:55px clamp(24px,5vw,76px)}
.content h1{font-family:Georgia,serif;font-size:clamp(2.4rem,5vw,4.2rem);font-weight:500;margin:0 0 12px}
.lead{font-size:1.05rem;color:var(--muted);max-width:720px;line-height:1.7}
.status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:46px}
.status-card{background:#fff;padding:28px;border:1px solid var(--line);border-radius:var(--radius)}
.status-card>span{color:var(--gold);font-weight:800;font-size:.75rem}
.status-card h2{font-family:Georgia,serif;font-size:1.45rem;font-weight:500}
.status-card p{color:var(--muted);line-height:1.6;min-height:76px}
.status-card strong{font-size:.72rem;text-transform:uppercase;letter-spacing:.1em}
.status-card.ready{border-color:#d8c78e}
.status-card.ready strong{color:#56805a}
.invoice-totals-limited,.client-totals-limited{grid-template-columns:minmax(0,280px)!important}
.list-flash.flash-enhanced{--flash-accent:#32734b;--flash-bg:#f0faf3;--flash-border:#c9e7d2;--flash-duration:6000ms;position:relative;display:grid;grid-template-columns:38px minmax(0,1fr) 34px;align-items:center;gap:11px;min-height:58px;margin:0 0 18px;padding:10px 11px 10px 12px;overflow:hidden;border:1px solid var(--flash-border);border-radius:14px;background:linear-gradient(115deg,#fff,var(--flash-bg));color:var(--flash-accent);font-size:.82rem;font-weight:750;box-shadow:0 10px 28px rgba(14,58,38,.09);opacity:0;transform:translateY(-10px) scale(.985);animation:flash-enter .34s cubic-bezier(.22,.9,.32,1) forwards}
.list-flash.flash-enhanced.error{--flash-accent:#a13c35;--flash-bg:#fff3f1;--flash-border:#f0cec9;box-shadow:0 10px 28px rgba(137,43,35,.09)}
.list-flash.flash-enhanced.is-leaving{pointer-events:none;animation:flash-leave .26s ease forwards}
.flash-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:var(--flash-accent);color:#fff;box-shadow:0 6px 14px rgba(11,31,42,.14)}
.flash-message{min-width:0;line-height:1.45}
.flash-close{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:var(--flash-accent);cursor:pointer;transition:background .18s ease,transform .18s ease}
.flash-close:hover,.flash-close:focus-visible{background:rgba(11,31,42,.07);transform:rotate(6deg);outline:0}
.flash-progress{position:absolute;left:0;bottom:0;width:100%;height:3px;background:var(--flash-accent);transform-origin:left center;animation:flash-countdown var(--flash-duration) linear forwards}
.list-flash.flash-enhanced.is-paused .flash-progress{animation-play-state:paused}
@keyframes flash-enter{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes flash-leave{to{opacity:0;transform:translateY(-8px) scale(.985)}}
@keyframes flash-countdown{to{transform:scaleX(0)}}
@media(prefers-reduced-motion:reduce){.list-flash.flash-enhanced,.list-flash.flash-enhanced.is-leaving{animation-duration:.01ms}.flash-progress{animation:none}}
@media(max-width:900px){.auth-page{padding:0}
.auth-shell{min-height:100dvh;border-radius:0;grid-template-columns:1fr}
.auth-visual{display:none}
.auth-panel{padding:34px 24px 24px}
.mobile-brand{display:block;text-align:center;margin-bottom:30px}
.mobile-brand img{object-fit:contain}
.auth-form-wrap{margin:auto}
.sidebar{transform:translateX(-100%);transition:.2s}
.sidebar-open .sidebar{transform:none;box-shadow:20px 0 60px rgba(0,0,0,.25)}
.app-main{margin-left:0}
.menu-button{display:block;border:0;background:var(--soft);border-radius:9px;padding:8px 11px;font-size:1.15rem}
.topbar{justify-content:space-between;padding:0 18px}
.status-grid{grid-template-columns:1fr}
}
@media(max-width:520px){.auth-panel{padding-inline:20px}
.auth-panel h2{font-size:2rem}
.form-intro{margin-bottom:28px}
.topbar-user>span{display:none}
.content{padding-top:36px}
.invoice-totals-limited,.client-totals-limited{grid-template-columns:1fr!important}
}
