/* SAIM Studio — V9. Mobile-first, responsive, sans ressources externes. */
:root{--ink:#172e27;--muted:#617269;--white:#fffdf8;--cream:#f7f2e8;--green:#0c5944;--gold:#b58a41;--line:#e6dfd0;--pale:#e1eadc;--studio-shadow:0 10px 32px #263e2910,0 2px 6px #263e2908;--studio-serif:Georgia,'Times New Roman',serif}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:15px;line-height:1.55;background:var(--cream);-webkit-tap-highlight-color:transparent}button,input,textarea,select{font-family:inherit}button{touch-action:manipulation}button:focus-visible{outline:2px solid #ba914d;outline-offset:3px}input,select,textarea{font-size:16px!important;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:14px;min-height:48px}input[type=checkbox]{min-height:0}button:disabled{opacity:.6;cursor:not-allowed}.panel,.budget-chart,.grocery-group,.profile-list button,.recipe-row,.weekly{border-radius:20px!important;background:var(--white);border:1px solid var(--line);box-shadow:var(--studio-shadow)!important}.panel{padding:18px!important;gap:14px}.panel h2,.panel h3{letter-spacing:-.4px}.top{min-height:54px;margin-bottom:16px!important;position:relative}.top h1{font-size:23px!important;letter-spacing:-.8px!important}.top .back{border:1px solid var(--line)!important;background:var(--white)!important;width:44px;height:44px;display:grid;place-items:center;font-size:30px;line-height:1;box-shadow:0 2px 8px #18372a08}.btn{min-height:47px;border-radius:15px!important;letter-spacing:.05px}.section .btn:not(.secondary):not(.danger),.p-submit{background:linear-gradient(135deg,#177052,#073f33)!important;box-shadow:0 7px 17px #124e382b,inset 0 1px 0 #b1d0ad40!important}.btn.secondary{background:var(--pale);color:var(--green)}.section{gap:14px}.tabs{border-radius:15px!important;padding:4px;background:var(--pale);gap:4px}.tabs button{border-radius:12px!important;min-height:40px}.tabs button.active{box-shadow:0 3px 8px #13392822}.month-nav{background:var(--white);border:1px solid var(--line);border-radius:15px!important;min-height:46px}.month-nav button{min-width:44px;min-height:44px}.footnote{display:none!important}.mobilebrand{display:none!important}.shell{max-width:1280px}.main{max-width:1000px;padding-top:24px}.side{background:linear-gradient(170deg,#08352d,#0a493a 65%,#0b382e)}.side .nav button.active{background:#ffffff1a;color:#fff4d8}.side .nav button{min-height:48px}.side .nav button span svg{stroke-width:1.6}
/* Login: illustration architecturale vectorielle et carte de connexion sans sélection de rôle. */
.auth-layout{background:#f8f2e7!important}.auth-art{background:linear-gradient(0deg,#082d28e6,transparent 58%),url('studio-dawn.svg') center/cover!important;opacity:1}.auth-visual:after{border-radius:240px 240px 20px 20px!important}.studio-auth{max-width:480px!important;padding:22px 32px 22px!important;overflow:hidden;background:transparent!important;color:#16372c}.studio-auth:after{display:none!important}.studio-auth .login-hero{height:184px;min-height:184px;align-items:flex-start;justify-content:center;flex-direction:column;padding:15px 0 0}.studio-auth .login-hero:before{inset:-22px -32px -10px -32px!important;background:linear-gradient(90deg,#f8f2e7 1%,#f8f2e7d9 28%,#f8f2e71f 76%),linear-gradient(0deg,#f8f2e7,transparent 30%),url('studio-dawn.svg') 64% center/cover!important;opacity:1;mask-image:none}.studio-auth .p-brand{width:160px!important;gap:2px!important;padding:0!important}.studio-auth .p-brand svg{width:63px;height:58px}.studio-auth .p-brand>span{font-size:30px!important}.studio-login-caption{font-size:8px;font-weight:650;letter-spacing:1.6px;color:#98733b;white-space:nowrap;margin-top:8px}.studio-auth .auth-heading{margin:0 0 16px}.studio-auth .auth-heading h1{font:400 36px/1.1 var(--studio-serif);color:#16352b;letter-spacing:-1.1px}.studio-auth .auth-heading p{font-size:14px;color:#596b61}.studio-auth .auth-field{gap:5px;margin-bottom:11px}.studio-auth .auth-field>span.studio-field-label{position:static!important;width:auto!important;height:auto!important;clip-path:none!important;overflow:visible;font-size:11px;font-weight:650;color:#38554a}.studio-auth .field-wrap{background:#fffdf8;border:1px solid #ded5c4;border-radius:15px;box-shadow:0 4px 12px #58472b06;min-height:50px}.studio-auth .field-wrap input{min-height:46px;background:transparent;border:0;box-shadow:none;padding:8px 8px!important}.studio-auth .forgot-link{font-size:12px;margin:2px 0 13px}.studio-auth .p-submit{min-height:50px;border-radius:15px!important}.studio-auth .p-switch{margin:12px 0 9px}.studio-auth .legacy-entry{margin:10px 0;padding:12px;border-radius:17px;background:#f1e8d6;box-shadow:none}.studio-auth .legacy-entry small{font-size:11px}.studio-auth .p-demo-note{font-size:10px;padding:7px 10px;margin:7px 0;opacity:.85}.studio-auth .auth-footer{font-size:10px;padding-top:10px;margin-top:10px}.studio-auth .gate-message:empty{display:none}
/* Home: a single focal card, consistent modules and direct actions. */
.studio-home{display:flex;flex-direction:column;gap:14px}.studio-hero{position:relative;min-height:235px;isolation:isolate;border-radius:26px;padding:21px 22px 72px;color:#fff9eb;overflow:hidden;background:linear-gradient(90deg,#07372de8 0%,#07372d90 58%,#07372d18),url('studio-night.svg') center 53%/cover}.studio-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#082f28b3,transparent 52%);z-index:-1;pointer-events:none}.studio-overline{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.studio-overline>span{font:400 26px/1 var(--studio-serif);letter-spacing:.2px}.studio-overline i{color:#eac67e}.studio-round{width:42px;height:42px;display:grid;place-items:center;background:#fef9eb16;border:1px solid #ead4a74d;color:#fff6e2;border-radius:50%;backdrop-filter:blur(8px)}.studio-round svg{width:20px;height:20px}.studio-date{color:#e2c58d;font-size:11px;text-transform:capitalize;letter-spacing:.2px;font-weight:650;margin-bottom:4px}.studio-hero h1{font:400 clamp(25px,6.6vw,36px)/1.12 var(--studio-serif);letter-spacing:-.5px;margin:0 0 6px;max-width:95%}.studio-hero>p:last-child{font-size:12px;color:#f0ecdd;max-width:250px}.studio-budget{position:relative;z-index:2;margin:-72px 14px 0!important;display:block!important;background:var(--white)!important;border:1px solid #e8dfcb;border-radius:22px!important;padding:16px 18px 13px!important;box-shadow:0 13px 30px #132f281a,inset 0 1px 0 #ffffffc0!important;color:var(--ink)!important}.studio-budget-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.studio-label{font-size:10px;letter-spacing:1px;font-weight:750;color:#788071}.studio-budget .big{display:block;font-size:clamp(28px,7vw,40px)!important;font-weight:700;letter-spacing:-1.6px;margin:3px 0!important;white-space:nowrap}.studio-budget small{color:var(--muted);font-size:12px}.studio-budget .ring{flex:0 0 76px;height:76px;width:76px!important;aspect-ratio:1}.studio-budget .ring strong{font-size:16px;font-weight:700}.studio-budget .bar{margin:12px 0 10px;background:#e6e9dd;height:7px}.studio-budget .bar span{background:linear-gradient(90deg,#0b533c,#40a27a);animation:studioGrow .8s cubic-bezier(.15,.8,.25,1) both;transform-origin:left center}.studio-budget-foot{display:flex;align-items:center;justify-content:space-between;gap:6px;border-top:1px solid var(--line);padding-top:10px;font-size:11px;color:var(--muted)}.studio-budget-foot b{color:var(--green);font-size:13px;margin-left:4px}.studio-budget-foot button,.studio-section-head button{display:inline-flex;align-items:center;gap:2px;border:0;background:transparent;color:var(--green);font-size:11px;font-weight:650;padding:6px 0;min-height:36px}.studio-budget-foot svg,.studio-section-head svg{width:15px;height:15px}.studio-section-head{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:5px 0 -7px}.studio-section-head h2{font-size:18px;font-weight:700;letter-spacing:-.55px}.studio-widget-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.studio-widget{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;min-width:0;min-height:83px;padding:9px 3px;border:1px solid var(--line);border-radius:17px;background:var(--white);color:var(--ink);box-shadow:0 3px 10px #433b2410}.studio-widget-icon{display:grid;place-items:center;width:37px;height:37px;background:#f1e9d8;border-radius:13px;color:#9c742c}.studio-widget-icon svg{width:22px;height:22px;stroke-width:1.65}.studio-widget strong{font-size:10.5px;line-height:1.2;text-align:center;overflow-wrap:anywhere;letter-spacing:-.05px}.studio-widget.tile-fridge .studio-widget-icon,.studio-widget.tile-savings .studio-widget-icon{background:#dcebdd;color:#0c694a}.studio-widget.tile-ramadan .studio-widget-icon,.studio-widget.tile-zakat .studio-widget-icon{background:#f5e1dc;color:#a84949}.studio-meal{display:flex;align-items:center;gap:12px;text-align:left;background:var(--white);border:1px solid var(--line);border-radius:20px;padding:8px 12px 8px 8px;min-height:88px;color:var(--ink);box-shadow:var(--studio-shadow)}.studio-meal-photo{width:87px;height:72px;flex-shrink:0;overflow:hidden;border-radius:13px;background:#dfc8a4}.studio-meal .food{width:100%;height:100%;object-fit:cover}.studio-meal>span{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}.studio-meal small{font-size:9px;font-weight:700;letter-spacing:.7px;color:#9b773c}.studio-meal strong{font-size:14px;line-height:1.25}.studio-meal em{font-size:11px;font-style:normal;color:var(--muted)}.studio-meal>svg{width:18px;height:18px;color:var(--green)}.studio-essentials{display:grid;grid-template-columns:1fr 1fr;gap:10px}.studio-essentials button{position:relative;isolation:isolate;overflow:hidden;min-height:128px;border-radius:20px;padding:13px 12px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:3px;border:1px solid #d5be8c55;box-shadow:var(--studio-shadow)}.studio-faith{background:linear-gradient(90deg,#06392dd9,#0d4b3770),url('studio-night.svg') 72% 45%/cover;color:#fff5da}.studio-amana{background:linear-gradient(135deg,#f8eed8,#e6d6b7);color:#204438}.studio-tiny{font-size:8px;letter-spacing:.9px;font-weight:750}.studio-moon{font:34px/1 Georgia;color:#e5c27a;animation:studioGlow 3s ease-in-out infinite alternate}.studio-amana>svg{width:29px;height:29px;color:#a17a3b;margin:4px 0}.studio-essentials strong{font-size:15px}.studio-essentials small{font-size:10px;opacity:.9}.studio-secondary{display:grid;gap:7px}.studio-secondary button{display:flex;gap:9px;align-items:center;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:14px;min-height:49px;padding:10px 13px;text-align:left;font-size:13px;font-weight:600}.studio-secondary button svg{width:19px;height:19px;color:var(--green)}.studio-secondary button svg:last-child{margin-left:auto;width:16px}.studio-budget-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.studio-budget-actions button{background:var(--white);border:1px solid var(--line);border-radius:15px;color:var(--green);padding:10px;display:grid;place-items:center;gap:3px;font-size:11px;min-height:66px}.studio-budget-actions svg{height:22px;width:22px}.studio-home .story-link{align-self:center;opacity:.8}
/* Detailed screens */
.budget-chart{padding:18px 12px!important;gap:12px!important}.donut{box-shadow:0 6px 15px #1a442510;animation:studioZoom .55s both}.weekly{padding:16px!important}.v7-bill-list{padding:3px 13px!important}.v7-bill{padding:12px 0}.v7-bill summary strong{font-size:14px}.v7-bill summary small{font-size:11px}.v7-stock-group{border-radius:20px!important;padding:13px!important}.v7-stock-grid article{border-radius:15px!important;min-height:114px}.v7-stock-grid .v7-remove{min-height:36px}.v7-fridge-banner,.meal-banner,.legacy-hero,.v7-ramadan-card{border-radius:22px!important;overflow:hidden}.v7-ramadan-card,.legacy-hero{background-image:linear-gradient(90deg,#07392ee6,#07392e70),url('studio-night.svg')!important;background-size:cover!important;background-position:center!important}.v7-recipes{gap:12px}.v7-recipes .recipe-row{border-radius:19px!important}.v7-recipes .recipe-row summary .food,.v7-recipes .recipe-row:first-child .food{height:126px!important}.v7-recipes .recipe-row[open] .food{height:190px!important}.studio-recipe-name{font-size:13px!important;min-height:55px!important}.recipe-row summary>span:last-child{color:var(--green)}.profile-list button{min-height:58px!important}.legacy-case{background:var(--white);border-radius:18px!important}.admin-hero{background-image:linear-gradient(90deg,#07392ef0,#07392e80),url('studio-night.svg')!important;background-size:cover!important;border-radius:24px!important}.glass-launch:after{background:linear-gradient(180deg,#06362f,transparent 40%,#062d2855),url('studio-night.svg') center 65%/cover!important;height:52%!important}.glass-launch .glass-tile{filter:drop-shadow(0 6px 24px #d5c27e38)}.glass-launch .glass-pane-1,.glass-launch .glass-pane-2{box-shadow:inset 0 0 35px #d3ffe52a,0 0 32px #e4c57f1e!important}.glass-launch .launch-word{letter-spacing:-1px}.glass-launch .launch-skip{z-index:30!important}
/* Motion: page entry, staggered cards, navigation, physical press feedback. */
@keyframes studioReveal{from{opacity:0;transform:translateY(12px) scale(.99)}to{opacity:1;transform:none}}@keyframes studioGrow{from{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes studioZoom{from{opacity:.3;transform:scale(.91)}to{opacity:1;transform:scale(1)}}@keyframes studioGlow{from{filter:drop-shadow(0 0 2px #e8c06a30)}to{filter:drop-shadow(0 0 12px #e8c06ab0)}}@keyframes studioNav{from{transform:translateY(3px) scale(.9);opacity:.7}to{transform:none;opacity:1}}.studio-enter{animation:studioReveal .32s cubic-bezier(.2,.8,.2,1) both!important}.studio-enter .studio-budget{animation:studioReveal .45s .08s both}.studio-enter .studio-widget{animation:studioReveal .35s both}.studio-enter .studio-widget:nth-child(4n+2){animation-delay:.045s}.studio-enter .studio-widget:nth-child(4n+3){animation-delay:.09s}.studio-enter .studio-widget:nth-child(4n){animation-delay:.135s}.studio-enter .studio-meal,.studio-enter .studio-essentials{animation:studioReveal .45s .13s both}.studio-widget,.studio-meal,.studio-essentials button,.studio-secondary button,.studio-budget-actions button{transition:transform .18s,filter .18s,box-shadow .18s}.studio-widget:active,.studio-meal:active,.studio-essentials button:active,.studio-secondary button:active,.studio-budget-actions button:active{transform:scale(.965);filter:brightness(.97)}
@media(max-width:760px){.main{padding:12px 14px calc(104px + env(safe-area-inset-bottom))!important}.shell{max-width:100%}.side{position:fixed;bottom:0;left:0;right:0;z-index:100;padding:6px 12px calc(8px + env(safe-area-inset-bottom))!important;background:var(--white)!important;border-top:1px solid var(--line);box-shadow:0 -6px 24px #0e342812}.nav{max-width:480px;margin:auto;display:flex!important;gap:3px;justify-content:space-between}.nav button{min-height:56px!important;flex:1;border-radius:15px!important;padding:4px 1px!important;background:transparent!important;color:var(--muted)!important;font-size:10px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px}.nav button span{width:46px;height:31px;display:grid;place-items:center;padding:0!important;border-radius:12px!important}.nav button svg{width:22px;height:22px}.nav button.active{color:var(--green)!important;font-weight:700}.nav button.active span{color:var(--green)!important;background:var(--pale)!important;animation:studioNav .3s ease both}.studio-auth{padding:18px 24px 20px!important;min-height:100svh}.studio-auth .login-hero{min-height:162px;height:162px}.studio-auth .login-hero:before{inset:-18px -24px -8px -24px!important}.studio-hero{margin:-12px -14px 0;border-radius:0 0 28px 28px;min-height:216px;padding:17px 20px 70px}.studio-budget{margin:-68px 0 0!important}.studio-home{gap:12px}.studio-overline{margin-bottom:13px}.studio-hero h1{font-size:28px}.studio-budget .big{font-size:32px!important}.studio-widget-grid{gap:7px}.studio-section-head h2{font-size:17px}.top{margin-top:0}.toast{bottom:calc(86px + env(safe-area-inset-bottom))!important}.auth-visual{display:none!important}}
@media(min-width:761px){.studio-home{max-width:840px;margin:auto}.studio-hero{min-height:265px;padding:25px 32px 84px}.studio-budget{margin:-82px 22px 0!important;padding:20px 24px!important}.studio-widget-grid{gap:12px}.studio-widget{min-height:100px}.studio-widget strong{font-size:13px}.studio-essentials button{min-height:160px;padding:18px}.studio-auth .login-hero{height:200px;min-height:200px}.studio-section-head h2{font-size:22px}}
@media(max-width:350px){.studio-widget-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.studio-auth{padding-left:17px!important;padding-right:17px!important}.studio-hero h1{font-size:24px}.studio-budget .big{font-size:26px!important}.studio-budget .ring{flex-basis:65px;height:65px;width:65px!important}.studio-budget-foot{flex-wrap:wrap}}
html[data-theme=dark]{--cream:#0b241e;--white:#15372e;--ink:#f6efdf;--muted:#c0cec1;--line:#335344;--green:#a4d6b0;--gold:#e4bf79;--pale:#264c3b;--studio-shadow:0 10px 24px #001c1740}html[data-theme=dark] .studio-budget{border-color:var(--line);box-shadow:var(--studio-shadow)!important}html[data-theme=dark] .studio-label{color:#d8c29a}html[data-theme=dark] .studio-budget .bar{background:#30483b}html[data-theme=dark] .studio-budget .bar span{background:linear-gradient(90deg,#b38a42,#edcc89)}html[data-theme=dark] .studio-widget-icon{background:#36513e;color:#edc681}html[data-theme=dark] .studio-widget.tile-zakat .studio-widget-icon,html[data-theme=dark] .studio-widget.tile-ramadan .studio-widget-icon{background:#523d36;color:#f6b6a5}html[data-theme=dark] .studio-widget.tile-fridge .studio-widget-icon,html[data-theme=dark] .studio-widget.tile-savings .studio-widget-icon{background:#245040;color:#b1d9b2}html[data-theme=dark] .studio-amana{background:linear-gradient(145deg,#2c4939,#213a2f);color:#f4dfbb}html[data-theme=dark] .studio-amana>svg{color:#e6bc76}html[data-theme=dark] .studio-meal small{color:#e0c18c}html[data-theme=dark] .studio-budget .ring:before{background:var(--white)}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.saim-launch{display:none!important}}
/* Alignement des champs et lisibilité des formulaires. */
.studio-auth .field-wrap input{padding:10px 12px 10px 44px!important;font-weight:450!important;line-height:1.4}.studio-auth .p-password input{padding-right:84px!important}.studio-auth .field-wrap>svg{left:15px!important;z-index:2;width:18px;height:18px}.studio-auth .auth-field{margin-bottom:5px!important}.studio-auth #gate-form{gap:9px!important}.studio-auth .forgot-link{min-height:34px!important;margin:0 0 6px!important}.studio-auth .p-password button{font-size:11px!important}.studio-auth .auth-heading h1{font-size:34px}.studio-budget-foot button,.studio-section-head button{min-height:40px}.studio-budget .big{overflow-wrap:anywhere;white-space:normal}.studio-widget strong{font-size:11px}.studio-auth .login-hero:before{background:linear-gradient(90deg,#f8f2e7 0%,#f8f2e7b0 25%,#f8f2e700 78%),linear-gradient(0deg,#f8f2e7,transparent 30%),url('studio-dawn.svg') 64% center/cover!important}
.studio-ribbon{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;filter:drop-shadow(0 0 11px #b5edc94d)}.studio-ribbon-fill{animation:studioVeil 1.65s .15s both;transform-origin:center}.studio-ribbon-edge{stroke-dasharray:1;stroke-dashoffset:1;animation:studioTrace 1.9s .15s cubic-bezier(.16,.76,.25,1) both}.studio-ribbon-edge.second{animation-delay:.45s;opacity:.65}.glass-launch .launch-content{z-index:3}.glass-launch .launch-word{animation:studioReveal .75s 1.25s both}.glass-launch .launch-logo{filter:drop-shadow(0 6px 18px #d5c27e45)}@keyframes studioTrace{to{stroke-dashoffset:0}}@keyframes studioVeil{from{opacity:0;transform:translateX(-20%) scale(.94)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.studio-ribbon *{animation:none!important;stroke-dashoffset:0}}
.glass-launch .glass-pane-3{border-radius:50%!important;opacity:.23;box-shadow:none!important;background:radial-gradient(ellipse,#adf2d520,transparent 70%)!important}.glass-launch:after{mask-image:linear-gradient(to bottom,transparent,#000 22%);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 22%)}.glass-launch .glass-pane{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
