/* Fortunia IDE, interface moderne inspirée de JetBrains */
:root {
  color-scheme: dark;
  --bg:#1e1f22; --bg-editor:#1e1f22; --bg-sidebar:#2b2d30; --bg-panel:#2b2d30;
  --bg-input:#1e1f22; --bg-hover:#393b40; --bg-active:#43454a;
  --bg-tab:#2b2d30; --bg-tab-act:#1e1f22; --border:#393b40; --border-strong:#4e5157;
  --border-focus:#3574f0; --text:#bcbec4; --text-dim:#9da0a8; --text-muted:#6f737a;
  --text-bright:#dfe1e5; --accent:#3574f0; --accent-hover:#467ff2;
  --green:#4ec9b0; --yellow:#dcdcaa; --orange:#ce9178; --red:#f14c4c;
  --warn:#cf8e6d; --info:#6ab7ff; --statusbar-bg:#2b2d30;
  --font-ui:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-mono:"JetBrains Mono","Cascadia Code","SFMono-Regular",Consolas,monospace;
  --radius:6px; --transition:120ms ease; --shadow:0 10px 30px rgba(0,0,0,.38);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}
body{background:var(--bg);color:var(--text);font:13px/1.4 var(--font-ui);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit} button{cursor:pointer;border:0;background:none;color:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:1px solid var(--border-focus);outline-offset:-1px}
input,select,textarea{color:var(--text-bright);background:var(--bg-input);border:1px solid var(--border-strong);border-radius:2px;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--border-focus)} select{color-scheme:dark}
a{color:#4daafc;text-decoration:none} ul{list-style:none} ::selection{background:#264f78}
::-webkit-scrollbar{width:10px;height:10px} ::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(121,121,121,.4)} ::-webkit-scrollbar-thumb:hover{background:rgba(121,121,121,.7)}

/* Login */
#login-screen{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px;overflow:auto;background:radial-gradient(circle at 50% 36%,rgba(0,120,212,.13),transparent 34%),linear-gradient(145deg,#111,#181818 55%,#151515)}
.login-card{position:relative;width:min(380px,100%);padding:38px 40px 34px;text-align:left;background:rgba(31,31,31,.94);border:1px solid #353535;border-radius:8px;box-shadow:0 24px 70px rgba(0,0,0,.48)}
.login-card::before{content:"";position:absolute;inset:0 0 auto;height:2px;border-radius:8px 8px 0 0;background:linear-gradient(90deg,#0078d4,#4daafc 55%,transparent)}
.login-card .logo{color:var(--text-bright);font-size:24px;font-weight:600;letter-spacing:-.4px}
.login-card .subtitle{margin:4px 0 28px;color:var(--text-dim);font-size:12px}
.login-card input{width:100%;height:34px;margin-bottom:12px;padding:0 10px}.login-card input::placeholder{color:#8b8b8b}
.login-card .btn-login{width:100%;height:34px;margin-top:3px;border-radius:2px;color:#fff;background:var(--accent);font-weight:600;transition:background var(--transition)}
.login-card .btn-login:hover{background:var(--accent-hover)} .login-error{min-height:18px;margin-top:11px;color:var(--red);font-size:12px}

/* Workbench */
#app{display:none;height:100vh;min-width:0;flex-direction:column;overflow:hidden} #app.visible{display:flex}
#titlebar{height:35px;flex:0 0 35px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 9px 0 13px;user-select:none;background:var(--bg);border-bottom:1px solid var(--border)}
#titlebar>div:first-child{min-width:0} #titlebar .logo{color:var(--text);font-size:12px;font-weight:600;white-space:nowrap}
.titlebar-brand{display:flex;align-items:center;gap:8px;min-width:120px}.brand-mark{width:19px;height:19px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#1683d8,#0067b8);border-radius:4px;font-size:11px;font-weight:700;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.command-center{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,36vw);height:24px;display:flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;color:var(--text-dim);background:#202020;border:1px solid #3a3a3a;border-radius:6px;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.command-center:hover{color:var(--text);background:#242424;border-color:#484848}.command-center svg{width:13px;height:13px;flex:0 0 auto}
#titlebar .project-name{min-width:0;overflow:hidden;color:var(--text-dim);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
#titlebar .project-name:not(:empty)::before{content:"/";margin-right:10px;color:var(--text-muted)}
.titlebar-actions{display:flex;align-items:center;gap:3px!important;white-space:nowrap} #main{display:flex;flex:1;min-height:0;overflow:hidden}
.theme-switcher{height:28px;display:flex;align-items:center;gap:2px;margin-right:5px;padding:2px;background:#23252a;border:1px solid #303238;border-radius:8px}.theme-switcher a{height:22px;display:flex;align-items:center;padding:0 7px;color:var(--text-muted);border-radius:5px;font-size:9px;font-weight:600;letter-spacing:.04em}.theme-switcher a:hover{color:var(--text-bright);background:var(--bg-hover)}html[data-theme="1"] .theme-switcher a[data-theme-link="1"],html[data-theme="2"] .theme-switcher a[data-theme-link="2"]{color:#fff;background:var(--accent)}
#activity-bar{width:48px;flex:0 0 48px;display:flex;flex-direction:column;align-items:center;gap:2px;padding-top:3px;z-index:10;background:var(--bg);border-right:1px solid var(--border)}
.activity-btn{position:relative;width:47px;height:47px;display:grid;place-items:center;color:#858585;transition:color var(--transition),background var(--transition)}
.activity-btn:hover{color:#d7d7d7;background:rgba(255,255,255,.025)} .activity-btn.active{color:#f0f0f0}
.activity-btn.active::before{content:"";position:absolute;inset:9px auto 9px 0;width:2px;background:var(--accent)} .activity-btn svg{width:23px;height:23px}
.activity-spacer{flex:1}.activity-secondary{width:47px;height:43px;display:grid;place-items:center;color:#858585}.activity-secondary:hover{color:#d7d7d7}.activity-secondary svg{width:22px;height:22px}

/* Sidebar and explorer */
#sidebar{width:255px;min-width:180px;flex:0 0 255px;display:flex;flex-direction:column;overflow:hidden;background:var(--bg-sidebar);border-right:1px solid var(--border)}
#sidebar-header{height:35px;flex:0 0 35px;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 16px}
#sidebar-title{color:#bbb;font-size:11px;font-weight:500;letter-spacing:.05em}.sidebar-actions{display:flex;align-items:center;gap:2px}
.icon-btn{width:24px;height:24px;display:grid;place-items:center;border-radius:var(--radius);color:var(--text-dim);transition:color var(--transition),background var(--transition)}
.icon-btn:hover{color:var(--text-bright);background:var(--bg-hover)}.icon-btn:active{background:var(--bg-active)}.icon-btn svg{width:14px;height:14px}
#project-selector{flex:0 0 auto;padding:4px 10px 9px;border-bottom:1px solid var(--border)}
#project-selector select{width:100%;height:28px;padding:0 28px 0 8px;color:var(--text);font-size:12px}
#file-explorer{flex:1;overflow:auto;padding:6px 0 12px}
.tree-item{position:relative;min-height:23px;display:flex;align-items:center;gap:4px;padding:1px 8px 1px 0;cursor:pointer;user-select:none;white-space:nowrap;transition:background var(--transition)}
.tree-item:hover{background:var(--bg-hover)}.tree-item.selected{color:#fff;background:#37373d}
.tree-item .item-icon{width:16px;height:16px;flex:0 0 16px;display:grid;place-items:center}.tree-item .item-name{flex:1;min-width:0;overflow:hidden;font-size:13px;text-overflow:ellipsis}
.tree-item .item-actions{display:none;align-items:center;gap:1px}.tree-item:hover .item-actions,.tree-item.selected .item-actions{display:flex}
.tree-item .item-actions button{width:20px;height:20px;display:grid;place-items:center;border-radius:3px;color:var(--text-dim)}
.tree-item .item-actions button:hover{color:#fff;background:#4a4a4a}.tree-dir>.item-name{font-weight:500}.tree-indent{display:flex;flex-direction:column}
.tree-group-header{padding:9px 12px 4px;color:#bbb;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;user-select:none}
.binding-badge{flex-shrink:0;margin-left:3px;padding:0 5px;border-radius:6px;font-size:9px;font-weight:600}
.tree-item.unsaved .item-name::after{content:"●";margin-left:5px;color:var(--text-dim);font-size:8px;vertical-align:1px}

/* Editor and tabs */
#editor-area{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg-editor)}
#tab-bar{height:35px;flex:0 0 35px;display:flex;overflow-x:auto;overflow-y:hidden;background:var(--bg-tab);border-bottom:1px solid var(--border)} #tab-bar::-webkit-scrollbar{height:3px}
.tab{position:relative;height:35px;min-width:115px;max-width:200px;flex:0 0 auto;display:flex;align-items:center;gap:7px;padding:0 9px 0 12px;cursor:pointer;user-select:none;color:var(--text-dim);background:var(--bg-tab);border-right:1px solid var(--border);transition:color var(--transition),background var(--transition)}
.tab:hover{color:var(--text);background:#1d1d1d}.tab.active{color:#fff;background:var(--bg-tab-act)}.tab.active::before{content:"";position:absolute;inset:0 0 auto;height:1px;background:var(--accent)}
.tab .tab-name{flex:1;min-width:0;overflow:hidden;font-size:12.5px;text-overflow:ellipsis;white-space:nowrap}.tab .tab-modified{display:none;width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#e2e2e2}
.tab.modified .tab-modified{display:block}.tab.modified .tab-close{display:none}.tab:hover .tab-modified,.tab.modified.active .tab-modified{display:none}
.tab:hover .tab-close,.tab.active .tab-close,.tab.modified.active .tab-close{display:grid!important}.tab .tab-close{display:none;width:20px;height:20px;flex:0 0 20px;place-items:center;border-radius:4px;color:var(--text-dim)}
.tab .tab-close:hover{color:#fff;background:var(--bg-hover)}
#breadcrumbs{height:26px;flex:0 0 26px;display:flex;align-items:center;gap:5px;padding:0 12px;overflow:hidden;color:var(--text-dim);background:var(--bg-editor);font-size:12px}.breadcrumb-sep{color:#5f5f5f}
#welcome-screen{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:var(--text-dim);background:radial-gradient(circle at center,rgba(255,255,255,.018),transparent 34%)}
#welcome-screen h2{color:#dedede;font-size:24px;font-weight:400;letter-spacing:-.4px}#welcome-screen p{font-size:13px}#welcome-screen kbd{color:var(--text);background:#242424;border:1px solid #3c3c3c;border-radius:3px;box-shadow:inset 0 -1px #323232;padding:2px 6px;font:11px var(--font-ui)}
.welcome-mark{width:58px;height:58px;display:grid;place-items:center;margin-bottom:5px;color:#fff;background:linear-gradient(145deg,#1683d8,#0067b8);border-radius:13px;font-size:29px;font-weight:650;box-shadow:0 12px 35px rgba(0,120,212,.18),inset 0 0 0 1px rgba(255,255,255,.12)}
.welcome-shortcuts{width:300px;margin-top:18px;padding-top:15px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:10px;color:var(--text-dim);font-size:12px}.welcome-shortcuts>div{display:flex;align-items:center;justify-content:space-between;gap:20px}.welcome-shortcuts>div>span:last-child{display:flex;gap:3px}
#monaco-container{flex:1;min-height:0;overflow:hidden;display:none}#monaco-container.visible{display:block}

/* Validation problems */
#panel-resize{height:3px;flex:0 0 3px;cursor:ns-resize;background:transparent}#panel-resize:hover,#panel-resize:active{background:var(--accent)}
#bottom-panel{height:220px;flex:0 0 auto;display:flex;flex-direction:column;overflow:hidden;background:var(--bg-panel);border-top:1px solid var(--border);transition:height 160ms ease}#bottom-panel.collapsed{height:35px}
#panel-tabs{height:34px;flex:0 0 34px;display:flex;align-items:center;background:var(--bg-panel);border-bottom:1px solid var(--border)}
.panel-tab{position:relative;height:100%;display:flex;align-items:center;gap:6px;padding:0 14px;color:var(--text-dim);cursor:pointer;font-size:11px;user-select:none}
.panel-tab:hover,.panel-tab.active{color:var(--text-bright)}.panel-tab.active::after{content:"";position:absolute;inset:auto 14px 4px;height:1px;background:var(--accent)}
#panel-actions{margin-left:auto;padding-right:7px;display:flex;align-items:center;gap:2px}
#problems-list{flex:1;overflow:auto;padding:4px 0;font:12px/1.45 var(--font-mono)}.problem-item{display:flex;align-items:flex-start;gap:8px;padding:5px 13px;cursor:pointer}.problem-item:hover{background:var(--bg-hover)}
.problem-icon{flex-shrink:0;margin-top:1px}.problem-icon.error{color:var(--red)}.problem-icon.warning{color:var(--warn)}.problem-icon.info{color:var(--info)}.problem-loc{color:var(--text-dim);font-size:11px;white-space:nowrap}

/* Status */
#status-bar{height:23px;flex:0 0 23px;display:flex;align-items:center;gap:2px;padding:0 7px;color:#d7d7d7;background:var(--statusbar-bg);border-top:1px solid var(--border);font-size:11px;user-select:none}
.status-item{height:20px;display:flex;align-items:center;gap:4px;padding:0 6px;cursor:default;border-radius:3px}.status-item:hover{background:rgba(255,255,255,.08)}.status-item.clickable{cursor:pointer}#save-status{margin-left:auto}.save-indicator{padding:0 6px;color:var(--green);font-size:11px}.save-indicator.saving{color:var(--warn)}.save-indicator.error{color:var(--red)}

/* Buttons, overlays, menus */
#reload-btn{height:25px;display:flex;align-items:center;gap:6px;padding:0 9px;color:#fff;background:#0e639c;border:1px solid transparent;border-radius:4px;font-size:11px;transition:background var(--transition)}
#reload-btn:hover{background:#1177bb}#reload-btn:active{background:#0d5b8f}#reload-btn.loading{color:#aaa;background:#333;pointer-events:none}
#notifications{position:fixed;top:43px;right:12px;z-index:9998;display:flex;flex-direction:column;gap:7px;pointer-events:none}
.toast{width:min(360px,calc(100vw - 24px));padding:11px 12px;display:flex;align-items:flex-start;gap:10px;pointer-events:auto;color:var(--text);background:#252526;border:1px solid #454545;border-radius:5px;box-shadow:var(--shadow);animation:slideIn 160ms ease-out}
.toast.info{border-left:2px solid var(--info)}.toast.success{border-left:2px solid var(--green)}.toast.warning{border-left:2px solid var(--warn)}.toast.error{border-left:2px solid var(--red)}
.toast.info .toast-icon{color:var(--info)}.toast.success .toast-icon{color:var(--green)}.toast.warning .toast-icon{color:var(--warn)}.toast.error .toast-icon{color:var(--red)}
.toast-icon{flex-shrink:0;margin-top:1px}.toast-body{flex:1;min-width:0}.toast-title{margin-bottom:2px;color:var(--text-bright);font-weight:600}.toast-msg{color:var(--text-dim);font-size:12px;line-height:1.45}.toast-close{width:20px;height:20px;flex-shrink:0;display:grid;place-items:center;border-radius:3px;color:var(--text-dim)}.toast-close:hover{color:#fff;background:var(--bg-hover)}
@keyframes slideIn{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:translateX(0)}}
.context-menu{position:fixed;z-index:9000;min-width:180px;padding:5px;color:var(--text);background:#202020;border:1px solid #454545;border-radius:5px;box-shadow:var(--shadow);font-size:12px}
.context-item{min-height:27px;padding:5px 9px;display:flex;align-items:center;gap:8px;cursor:pointer;border-radius:3px}.context-item:hover{color:#fff;background:#04395e}.context-item.danger{color:#ff8a8a}.context-separator{height:1px;margin:4px 5px;background:var(--border-strong)}
.modal-overlay{position:fixed;inset:0;z-index:9000;display:flex;align-items:flex-start;justify-content:center;padding-top:16vh;background:rgba(0,0,0,.48)}
.modal{width:min(460px,calc(100vw - 32px));min-width:320px;padding:22px;background:#252526;border:1px solid #454545;border-radius:6px;box-shadow:0 16px 60px rgba(0,0,0,.55)}
.modal h3{margin-bottom:17px;color:var(--text-bright);font-size:14px;font-weight:600}.modal input{width:100%;height:31px;margin-bottom:12px;padding:0 9px}.modal-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.btn{min-height:30px;padding:5px 14px;border-radius:2px;font-size:12px}.btn-primary{color:#fff;background:var(--accent)}.btn-primary:hover{background:var(--accent-hover)}.btn-secondary{color:var(--text);background:#313131;border:1px solid #464646}.btn-secondary:hover{background:#3b3b3b}.btn-danger{color:#fff;background:#c42b1c}.btn-danger:hover{background:#d43b2c}

/* Administration */
#admin-panel{flex:1;min-height:0;display:none;flex-direction:column;overflow-y:auto;padding:10px;background:var(--bg-sidebar)}
.admin-summary{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:10px}.admin-summary>div{min-width:0;padding:11px 8px;background:#202020;border:1px solid var(--border);border-radius:5px}.admin-summary strong{display:block;color:#fff;font-size:20px;font-weight:500}.admin-summary span{display:block;margin-top:2px;color:var(--text-muted);font-size:9px;text-transform:uppercase;letter-spacing:.04em}
.admin-section{padding:12px 10px;margin-bottom:9px;background:#1d1d1d;border:1px solid var(--border);border-radius:5px}.admin-section-title{margin-bottom:7px;color:#bbb;font-size:10px;font-weight:600;letter-spacing:.08em}.admin-section>p{margin-bottom:11px;color:var(--text-muted);font-size:11px;line-height:1.45}
.admin-section label{display:block;margin:8px 0 4px;color:var(--text-dim);font-size:11px}.admin-section label>input,.admin-section label>select{display:block;width:100%;height:29px;margin-top:4px;padding:0 8px;font-size:11px}.admin-inline{display:flex;margin-top:4px}.admin-inline input{min-width:0;flex:1;height:29px;padding:0 8px;border-radius:2px 0 0 2px;font-size:10px}.admin-inline button{width:30px;background:#303030;border:1px solid var(--border-strong);border-left:0;border-radius:0 2px 2px 0}.admin-inline button:hover{background:#3a3a3a}
.admin-primary{width:100%;height:30px;margin-top:11px;color:#fff;background:#0e639c;border-radius:2px;font-size:11px}.admin-primary:hover{background:#1177bb}.admin-primary:disabled{opacity:.6;cursor:wait}.admin-result{display:flex;margin-top:8px}.admin-result input{min-width:0;flex:1;height:29px;padding:0 7px;border-radius:2px 0 0 2px;color:#9cdcfe;font:9px var(--font-mono)}.admin-result button{padding:0 8px;color:#fff;background:#3a3a3a;border-radius:0 2px 2px 0;font-size:10px}.admin-generator-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}.admin-generator-row button{height:29px;background:#303030;border:1px solid #414141;border-radius:3px;font-size:11px}.admin-generator-row button:hover{background:#3a3a3a}.admin-generated{margin-top:8px;padding:7px;overflow:hidden;color:#9cdcfe;background:#111;border:1px solid var(--border);border-radius:3px;font:10px var(--font-mono);text-overflow:ellipsis;white-space:nowrap;cursor:text;user-select:all}.admin-danger-zone{margin-top:auto}.admin-danger-zone button{width:100%;min-height:29px;padding:4px 7px;color:#ff9b94;border:1px solid #713b38;border-radius:3px;font-size:10px}.admin-danger-zone button:hover{color:#fff;background:#7c2924}

@media(max-width:760px){#sidebar{width:215px;flex-basis:215px}.command-center{display:none}#titlebar #user-display{display:none}#status-bar .status-item:nth-of-type(n+3){display:none}.login-card{padding:32px 28px 28px}}
@media(max-width:520px){#activity-bar{width:42px;flex-basis:42px}.activity-btn{width:41px;height:44px}#sidebar{width:180px;flex-basis:180px}#reload-btn{padding:0 7px}#reload-btn svg{display:none}.tab{min-width:100px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* IntelliJ IDEA New UI details */
#titlebar{height:40px;flex-basis:40px;padding:0 10px;background:#2b2d30;border-color:#393b40}
.brand-mark{background:linear-gradient(135deg,#ff318c 0%,#ff8a00 48%,#6b57ff 100%);border-radius:5px;box-shadow:none}
.command-center{height:28px;background:#1e1f22;border-color:#4e5157;border-radius:7px;box-shadow:none}
.command-center:hover{background:#24262a;border-color:#5a5d63}
#reload-btn{height:28px;background:#3574f0;border-radius:6px;font-weight:500}#reload-btn:hover{background:#467ff2}
#activity-bar{width:44px;flex-basis:44px;padding:5px 4px;background:#2b2d30;border-color:#393b40;gap:3px}
.activity-btn,.activity-secondary{width:36px;height:36px;border-radius:7px}.activity-btn svg{width:20px;height:20px}.activity-btn:hover,.activity-secondary:hover{background:#393b40}
.activity-btn.active{color:#dfe1e5;background:#43454a}.activity-btn.active::before{display:none}
#sidebar{width:260px;flex-basis:260px;border-color:#393b40}#sidebar-header{height:40px;flex-basis:40px;padding-left:13px}
#sidebar-title{font-size:12px;font-weight:600;letter-spacing:0;text-transform:none}.icon-btn{border-radius:6px}
#project-selector{padding:3px 9px 9px}#project-selector select{height:30px;border-radius:6px}
.tree-item{min-height:25px;margin:0 5px;padding-right:6px;border-radius:5px}.tree-item.selected{background:#2e436e}.tree-group-header{padding-left:13px;text-transform:none;letter-spacing:0;font-size:11px}
#tab-bar{height:40px;flex-basis:40px;padding:4px 5px 0;gap:2px;background:#2b2d30;border-color:#393b40}
.tab{height:35px;min-width:120px;padding:0 9px 0 11px;border:0;border-radius:6px 6px 0 0;background:transparent}.tab:hover{background:#34363a}.tab.active{background:#1e1f22}.tab.active::before{inset:auto 8px 0;height:2px;border-radius:2px;background:#3574f0}
#breadcrumbs{height:28px;flex-basis:28px;padding-left:14px;border-bottom:1px solid #292b2f}
#panel-resize{height:2px;flex-basis:2px}#bottom-panel{border-color:#393b40}#panel-tabs{height:37px;flex-basis:37px;padding-left:4px;border-color:#393b40}
.panel-tab{margin:4px 2px;padding:0 10px;border-radius:5px}.panel-tab:hover{background:#393b40}.panel-tab.active::after{inset:auto 9px 0;height:2px;border-radius:2px}
#status-bar{height:26px;flex-basis:26px;padding:0 8px;border-color:#393b40}.status-item{height:22px;border-radius:5px}
.login-card,.modal{background:#2b2d30;border-color:#4e5157;border-radius:10px}.login-card::before{background:linear-gradient(90deg,#ff318c,#ff8a00,#6b57ff)}
.login-card input,.modal input{border-radius:6px}.login-card .btn-login,.btn,.admin-primary{border-radius:6px;background:#3574f0}.login-card .btn-login:hover,.btn-primary:hover,.admin-primary:hover{background:#467ff2}
.toast,.context-menu{background:#2b2d30;border-color:#4e5157;border-radius:8px}.context-item{border-radius:5px}.context-item:hover{background:#2e436e}
.admin-summary>div,.admin-section{background:#25262a;border-color:#393b40;border-radius:8px}.admin-inline input,.admin-result input{background:#1e1f22}.admin-generator-row button{background:#393b40;border-color:#4e5157;border-radius:6px}
.welcome-mark{background:linear-gradient(135deg,#ff318c 0%,#ff8a00 48%,#6b57ff 100%);border-radius:14px;box-shadow:0 12px 35px rgba(107,87,255,.16)}

/* JetBrains Islands UI */
body{background:#17181c}
#app{padding:0 6px 6px;background:#17181c;gap:6px}
#titlebar{height:46px;flex-basis:46px;margin:0 -6px;padding:0 14px;background:#17181c;border:0}
.titlebar-brand{min-width:150px}.brand-mark{width:24px;height:24px;border-radius:7px;font-size:12px}
.command-center{height:32px;width:min(520px,40vw);background:#23252a;border:1px solid #303238;border-radius:9px}
.command-center:hover{background:#292b31;border-color:#43464e}
#main{gap:6px;overflow:visible}
#activity-bar{width:44px;flex-basis:44px;padding:6px 4px;background:#23252a;border:1px solid #303238;border-radius:10px}
.activity-btn,.activity-secondary{width:34px;height:34px;border-radius:8px}.activity-btn.active{background:#3d4d67;color:#e6efff}.activity-btn:hover,.activity-secondary:hover{background:#34373e}
#sidebar{width:270px;flex-basis:270px;background:#23252a;border:1px solid #303238;border-radius:10px}
#sidebar-header{height:43px;flex-basis:43px;padding:0 10px 0 14px}#project-selector{margin:0 8px;padding:0 0 9px;border:0}#project-selector select{background:#2b2d33;border-color:#3d4048}
#file-explorer{padding:3px 4px 10px}.tree-item{margin:1px 3px;border-radius:7px}.tree-item:hover{background:#30333a}.tree-item.selected{background:#3d4d67}
#editor-area{background:#1e1f22;border:1px solid #303238;border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.15)}
#tab-bar{height:43px;flex-basis:43px;padding:5px 6px;background:#23252a;border:0;gap:3px}.tab{height:33px;border-radius:7px;background:transparent}.tab:hover{background:#30333a}.tab.active{background:#383b42}.tab.active::before{display:none}
#breadcrumbs{height:30px;flex-basis:30px;background:#1e1f22;border-bottom:1px solid #292b30}
#bottom-panel{margin:5px;border:1px solid #303238;border-radius:9px;background:#23252a}#panel-tabs{background:#23252a;border-radius:9px 9px 0 0}
#problems-list{background:#1e1f22;border-radius:0 0 8px 8px}#panel-resize{height:1px;flex-basis:1px}
#status-bar{height:24px;flex-basis:24px;margin:0 2px;background:transparent;border:0}
#admin-panel{background:#23252a}.admin-summary>div,.admin-section{background:#2b2d33;border-color:#393c43}
.modal-overlay{backdrop-filter:blur(5px)}.modal,.toast,.context-menu{background:#2b2d33;border-color:#484b53;box-shadow:0 16px 45px rgba(0,0,0,.48)}
.login-card{background:rgba(35,37,42,.96);border-color:#43464e}.login-card::before{display:none}
.login-card .logo::before{content:"";display:block;width:42px;height:42px;margin-bottom:18px;border-radius:12px;background:linear-gradient(135deg,#ff318c,#ff8a00 48%,#6b57ff);box-shadow:0 10px 30px rgba(107,87,255,.22)}
@media(max-width:760px){#app{padding-left:4px;padding-right:4px}#main{gap:4px}#sidebar{width:220px;flex-basis:220px}}

/* Theme 2: Fortunia Aurora */
html[data-theme="2"]{
  --bg:#090b16;--bg-editor:#0d1020;--bg-sidebar:rgba(18,21,42,.88);--bg-panel:rgba(15,18,36,.94);
  --bg-input:#11152a;--bg-hover:#242947;--bg-active:#30375d;--bg-tab:rgba(18,21,42,.9);--bg-tab-act:#171b32;
  --border:#292e50;--border-strong:#3c4470;--border-focus:#8b7cff;--text:#c9ccec;--text-dim:#9298bd;
  --text-muted:#666d96;--text-bright:#f3f4ff;--accent:#7967ff;--accent-hover:#917fff;
  --green:#45e6b0;--yellow:#ffd166;--orange:#ff9b71;--red:#ff667d;--warn:#ffbe55;--info:#62d9ff;
  --statusbar-bg:rgba(15,18,36,.92);--shadow:0 16px 50px rgba(0,0,0,.5);
}
html[data-theme="2"] body{background:#090b16;background-image:radial-gradient(circle at 12% 15%,rgba(121,103,255,.18),transparent 26%),radial-gradient(circle at 88% 82%,rgba(38,199,218,.11),transparent 30%)}
html[data-theme="2"] #app{background:transparent}
html[data-theme="2"] #titlebar{background:rgba(9,11,22,.78);backdrop-filter:blur(18px)}
html[data-theme="2"] .brand-mark{background:linear-gradient(145deg,#7a67ff,#30d7e7);box-shadow:0 0 24px rgba(121,103,255,.35)}
html[data-theme="2"] .command-center{background:rgba(18,21,42,.72);border-color:#32385d;box-shadow:inset 0 1px rgba(255,255,255,.035)}
html[data-theme="2"] .command-center:hover{background:#181d38;border-color:#535b91}
html[data-theme="2"] #activity-bar,html[data-theme="2"] #sidebar,html[data-theme="2"] #editor-area{background:rgba(16,19,38,.86);border-color:#292e50;box-shadow:0 12px 45px rgba(0,0,0,.24);backdrop-filter:blur(18px)}
html[data-theme="2"] .activity-btn.active{color:#fff;background:linear-gradient(145deg,#6655e8,#4654c8);box-shadow:0 5px 16px rgba(92,78,220,.3)}
html[data-theme="2"] .activity-btn:hover,html[data-theme="2"] .activity-secondary:hover{background:#232947}
html[data-theme="2"] #project-selector select{background:#11152a;border-color:#32385d}
html[data-theme="2"] .tree-item:hover{background:#202542}html[data-theme="2"] .tree-item.selected{background:linear-gradient(90deg,#39336d,#29375f);color:#fff}
html[data-theme="2"] #tab-bar{background:rgba(17,20,39,.92)}html[data-theme="2"] .tab:hover{background:#202541}html[data-theme="2"] .tab.active{background:linear-gradient(180deg,#272b4c,#1a1e37);box-shadow:inset 0 1px rgba(255,255,255,.04)}
html[data-theme="2"] #breadcrumbs{background:#0d1020;border-color:#202541}
html[data-theme="2"] #bottom-panel{background:#11152a;border-color:#292e50;box-shadow:0 8px 28px rgba(0,0,0,.3)}html[data-theme="2"] #panel-tabs{background:#151930}html[data-theme="2"] #problems-list{background:#0b0e1c}
html[data-theme="2"] #reload-btn,html[data-theme="2"] .admin-primary,html[data-theme="2"] .btn-primary{background:linear-gradient(135deg,#745fff,#526de8);box-shadow:0 4px 14px rgba(105,87,240,.25)}
html[data-theme="2"] #reload-btn:hover,html[data-theme="2"] .admin-primary:hover{filter:brightness(1.13)}
html[data-theme="2"] .admin-summary>div,html[data-theme="2"] .admin-section{background:rgba(23,27,51,.86);border-color:#292e50}
html[data-theme="2"] .welcome-mark{background:linear-gradient(145deg,#7a67ff,#30d7e7);box-shadow:0 14px 45px rgba(89,94,235,.3)}
html[data-theme="2"] .login-card,html[data-theme="2"] .modal,html[data-theme="2"] .toast,html[data-theme="2"] .context-menu{background:rgba(20,24,46,.94);border-color:#39416c;backdrop-filter:blur(20px)}
html[data-theme="2"] .theme-switcher{background:#11152a;border-color:#292e50}
@media(max-width:620px){.theme-switcher{display:none}}

/* Theme 2: interface classique, dense et attachée */
html[data-theme="2"]{
  --bg:#2b2b2b;--bg-editor:#2b2b2b;--bg-sidebar:#313335;--bg-panel:#2b2b2b;
  --bg-input:#3c3f41;--bg-hover:#3a3d3f;--bg-active:#4b6eaf;--bg-tab:#3c3f41;--bg-tab-act:#2b2b2b;
  --border:#515151;--border-strong:#666;--border-focus:#589df6;--text:#bbb;--text-dim:#999;
  --text-muted:#777;--text-bright:#ddd;--accent:#4b6eaf;--accent-hover:#5b7ebf;
  --green:#6a8759;--yellow:#bbb529;--orange:#cc7832;--red:#ff6b68;--warn:#cc7832;--info:#6897bb;
  --statusbar-bg:#3c3f41;--radius:2px;--shadow:0 4px 12px rgba(0,0,0,.5);
}
html[data-theme="2"] body{background:#2b2b2b;background-image:none}
html[data-theme="2"] #app{padding:0;gap:0;background:#2b2b2b}
html[data-theme="2"] #titlebar{height:34px;flex-basis:34px;margin:0;padding:0 8px;background:#3c3f41;border-bottom:1px solid #515151;backdrop-filter:none}
html[data-theme="2"] .brand-mark{width:20px;height:20px;background:#4b6eaf;border-radius:2px;box-shadow:none}
html[data-theme="2"] .command-center{height:24px;background:#313335;border:1px solid #555;border-radius:2px;box-shadow:inset 0 1px rgba(255,255,255,.04)}
html[data-theme="2"] #main{gap:0;overflow:hidden}
html[data-theme="2"] #activity-bar{width:42px;flex-basis:42px;padding:3px 2px;background:#3c3f41;border:0;border-right:1px solid #515151;border-radius:0;box-shadow:none;backdrop-filter:none}
html[data-theme="2"] .activity-btn,html[data-theme="2"] .activity-secondary{width:37px;height:38px;border-radius:2px}
html[data-theme="2"] .activity-btn.active{color:#fff;background:#4b6eaf;box-shadow:none}
html[data-theme="2"] .activity-btn:hover,html[data-theme="2"] .activity-secondary:hover{background:#4a4d50}
html[data-theme="2"] #sidebar{width:245px;flex-basis:245px;background:#313335;border:0;border-right:1px solid #515151;border-radius:0;box-shadow:none;backdrop-filter:none}
html[data-theme="2"] #sidebar-header{height:34px;flex-basis:34px;padding:0 8px}html[data-theme="2"] #project-selector{margin:0;padding:4px 7px 7px;border-bottom:1px solid #515151}
html[data-theme="2"] #project-selector select{height:26px;background:#3c3f41;border-color:#666;border-radius:2px}
html[data-theme="2"] #file-explorer{padding:3px 0}html[data-theme="2"] .tree-item{min-height:22px;margin:0;padding-top:0;padding-bottom:0;border-radius:0}
html[data-theme="2"] .tree-item:hover{background:#3a3d3f}html[data-theme="2"] .tree-item.selected{background:#4b6eaf;color:#fff}
html[data-theme="2"] #editor-area{background:#2b2b2b;border:0;border-radius:0;box-shadow:none;backdrop-filter:none}
html[data-theme="2"] #tab-bar{height:35px;flex-basis:35px;padding:0;gap:0;background:#3c3f41;border-bottom:1px solid #515151}
html[data-theme="2"] .tab{height:34px;border-right:1px solid #515151;border-radius:0;background:#3c3f41}
html[data-theme="2"] .tab:hover{background:#454749}html[data-theme="2"] .tab.active{background:#2b2b2b;box-shadow:none}
html[data-theme="2"] .tab.active::before{display:block;inset:0 0 auto;height:2px;border-radius:0;background:#6897bb}
html[data-theme="2"] #breadcrumbs{height:24px;flex-basis:24px;background:#2b2b2b;border-color:#454545}
html[data-theme="2"] #bottom-panel{margin:0;background:#2b2b2b;border:0;border-top:1px solid #515151;border-radius:0;box-shadow:none}
html[data-theme="2"] #panel-tabs{height:32px;flex-basis:32px;background:#3c3f41;border-radius:0}html[data-theme="2"] .panel-tab{margin:0;border-radius:0}
html[data-theme="2"] #problems-list{background:#2b2b2b;border-radius:0}
html[data-theme="2"] #status-bar{height:22px;flex-basis:22px;margin:0;padding:0 6px;background:#3c3f41;border-top:1px solid #515151}
html[data-theme="2"] #reload-btn,html[data-theme="2"] .admin-primary,html[data-theme="2"] .btn-primary{background:#4b6eaf;border-radius:2px;box-shadow:none}
html[data-theme="2"] .admin-summary>div,html[data-theme="2"] .admin-section{background:#3c3f41;border-color:#515151;border-radius:2px}
html[data-theme="2"] .welcome-mark{background:#4b6eaf;border-radius:3px;box-shadow:none}
html[data-theme="2"] .login-card,html[data-theme="2"] .modal,html[data-theme="2"] .toast,html[data-theme="2"] .context-menu{background:#3c3f41;border-color:#666;border-radius:2px;backdrop-filter:none;box-shadow:0 5px 18px rgba(0,0,0,.55)}
html[data-theme="2"] .theme-switcher{height:25px;padding:1px;background:#313335;border-color:#555;border-radius:2px}html[data-theme="2"] .theme-switcher a{height:21px;border-radius:1px}

/* =========================================================
   Fortunia IDE — visual cleanup
   Ne modifie PAS la structure/layout
   ========================================================= */

/* Moins d'effets artificiels */
body,
html[data-theme="2"] body {
  background-image: none;
}

/* Pas de glassmorphism */
#titlebar,
#activity-bar,
#sidebar,
#editor-area,
.modal,
.toast,
.context-menu,
.login-card {
  backdrop-filter: none !important;
}

/* Réduction des grosses ombres */
#activity-bar,
#sidebar,
#editor-area {
  box-shadow: none !important;
}

.modal,
.toast,
.context-menu,
.login-card {
  box-shadow: 0 8px 24px rgba(0,0,0,.30);
}

/* Coins moins exagérés */
#activity-bar,
#sidebar,
#editor-area {
  border-radius: 6px;
}

.tree-item {
  border-radius: 4px;
}

.tab {
  border-radius: 4px 4px 0 0;
}

.activity-btn,
.activity-secondary {
  border-radius: 5px;
}

.modal,
.toast,
.context-menu {
  border-radius: 6px;
}

/* Logo plus sobre */
.brand-mark {
  background: #3574f0 !important;
  box-shadow: none !important;
}

.welcome-mark {
  background: #3574f0 !important;
  box-shadow: none !important;
}

/* Pas de gros gradient sur les boutons */
#reload-btn,
.admin-primary,
.btn-primary {
  background: #3574f0 !important;
  background-image: none !important;
  box-shadow: none !important;
}

#reload-btn:hover,
.admin-primary:hover,
.btn-primary:hover {
  background: #467ff2 !important;
  filter: none !important;
}

/* Activity bar : sélection simple */
.activity-btn.active {
  background: #393b40 !important;
  box-shadow: none !important;
}

/* Arbre : sélection simple */
.tree-item.selected {
  background: #2e436e !important;
  background-image: none !important;
}

/* Onglets : enlever l'aspect "carte flottante" */
.tab.active {
  background: #1e1f22 !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Command center moins "SaaS" */
.command-center {
  background: #1e1f22;
  border-color: #4e5157;
  box-shadow: none;
}

.command-center:hover {
  background: #252629;
  border-color: #5a5d63;
}

/* Champs plus classiques */
input,
select,
textarea {
  border-radius: 3px;
}

/* Theme switcher */
.theme-switcher {
  border-radius: 4px;
}

.theme-switcher a {
  border-radius: 3px;
}

/* Admin : moins de cartes */
.admin-summary > div,
.admin-section {
  border-radius: 4px;
  box-shadow: none;
}

/* Login */
.login-card::before {
  display: none;
}

.login-card .logo::before {
  display: none;
}

/* Theme 2 : supprimer les effets Aurora sans modifier sa structure */
html[data-theme="2"] .brand-mark,
html[data-theme="2"] .welcome-mark {
  background: #4b6eaf !important;
}

html[data-theme="2"] .activity-btn.active,
html[data-theme="2"] .tree-item.selected,
html[data-theme="2"] .tab.active,
html[data-theme="2"] #reload-btn,
html[data-theme="2"] .admin-primary,
html[data-theme="2"] .btn-primary {
  background-image: none !important;
  box-shadow: none !important;
}