:root{--primary:#364c62;--bg:#f4f7fb;--border:#e7ebf0}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#243447;font-family:Inter,Arial,sans-serif}.login-bg{min-height:100vh;display:grid;place-items:center;background:linear-gradient(145deg,#263849,#49677f);padding:20px}.login-card{width:min(440px,100%);background:#fff;border-radius:22px;padding:36px;box-shadow:0 24px 70px rgba(0,0,0,.22)}.login-card h1{font-size:1.7rem}.login-logo{display:block;width:210px;max-height:70px;margin:0 auto 25px}.app-shell{min-height:100vh}.sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;background:#263849;color:#fff;padding:24px 18px;display:flex;flex-direction:column;z-index:1000}.brand{display:block;padding:8px 12px 28px}.brand img{width:180px;filter:brightness(0) invert(1)}.sidebar nav{display:grid;gap:7px}.sidebar nav a,.sidebar-user a{color:#e7eef5;text-decoration:none;padding:12px 14px;border-radius:12px}.sidebar nav a:hover{background:rgba(255,255,255,.1)}.nav-title{font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;color:#9fb2c3;padding:20px 14px 4px}.sidebar-user{margin-top:auto;border-top:1px solid rgba(255,255,255,.12);padding-top:18px;display:grid}.sidebar-user small{color:#afbfcc;margin-bottom:8px}.sidebar-user a{padding-left:0}.main{margin-left:260px}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:900}.menu-toggle{display:none;border:0;background:none;font-size:1.4rem}.user-chip{background:#eef3f7;padding:9px 14px;border-radius:999px}.content{padding:34px}.hero{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:26px}.hero h1{font-size:2rem;margin:0}.hero p,.page-head p{color:#6b7785;margin:.4rem 0 0}.search{max-width:370px;border-radius:14px;padding:12px 16px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:28px}.stat,.tool-card,.table-card,.form-card,.empty{background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:0 8px 25px rgba(39,55,70,.05)}.stat{padding:22px}.stat b{display:block;font-size:1.55rem}.stat span{color:#75808c}.tool-card{padding:24px;height:100%;display:flex;flex-direction:column;transition:.2s}.tool-card:hover{transform:translateY(-4px);box-shadow:0 16px 35px rgba(39,55,70,.1)}.tool-head,.tool-footer,.page-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.tool-icon{width:54px;height:54px;border-radius:15px;color:#fff;display:grid;place-items:center;font-size:1.35rem}.tool-card h2{font-size:1.2rem;margin:22px 0 8px}.tool-card p{color:#6d7782;flex:1}.tool-footer{margin-top:20px}.page-head{margin-bottom:24px}.page-head h1{margin:0}.table-card,.form-card{padding:24px}.empty{padding:45px;text-align:center;color:#6d7782}.btn-primary{background:var(--primary);border-color:var(--primary)}code{color:#5f3dc4}@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}.main{margin-left:0}.menu-toggle{display:block}.content{padding:22px}.hero{align-items:flex-start;flex-direction:column}.search{max-width:none}.stats{grid-template-columns:1fr}.topbar{padding:0 20px}}

/* Éditeur de scripts — V2.1 */
.code-editor-card {
    overflow: hidden;
    border: 1px solid #d9e1e8;
    border-radius: 14px;
    background: #17212b;
    box-shadow: 0 8px 24px rgba(20, 35, 50, .08);
}
.code-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    color: #f8fafc;
    background: #223140;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-language {
    margin-left: 10px;
    color: #aebdca;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.code-editor-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #aebdca;
    font-size: .82rem;
}
.code-editor {
    width: 100%;
    min-height: 560px;
    resize: vertical;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 18px 20px;
    background: #17212b !important;
    color: #e9f0f5 !important;
    caret-color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
    tab-size: 2;
    white-space: pre;
}
.code-editor:focus {
    box-shadow: none !important;
}
.code-editor-help {
    padding: 9px 16px;
    background: #223140;
    color: #aebdca;
    font-size: .8rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.code-editor-fullscreen {
    position: fixed;
    inset: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 70px rgba(0,0,0,.35);
}
.code-editor-fullscreen .code-editor {
    flex: 1;
    min-height: 0;
    resize: none;
}
body.editor-open {
    overflow: hidden;
}
@media (max-width: 767.98px) {
    .code-editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .code-editor-actions {
        width: 100%;
        justify-content: space-between;
    }
    .code-editor {
        min-height: 440px;
    }
    .code-editor-fullscreen {
        inset: 0;
        border-radius: 0;
    }
}

/* V2.2 — catégories et lancement intégré */
.category-swatch{display:inline-block;width:20px;height:20px;border-radius:6px;vertical-align:middle;margin-right:8px;border:1px solid rgba(0,0,0,.12)}
.category-form{max-width:850px}.module-page{height:calc(100vh - 140px);display:flex;flex-direction:column;gap:14px}.module-toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;background:#fff;border:1px solid var(--border);border-radius:16px;padding:12px 14px;box-shadow:0 8px 25px rgba(39,55,70,.05)}.module-toolbar>div:last-child{justify-self:end}.module-title{text-align:center}.module-title span{display:block;color:#75808c;font-size:.78rem;margin-top:2px}.module-frame-wrap{flex:1;min-height:480px;background:#fff;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 8px 25px rgba(39,55,70,.05)}.module-frame{display:block;width:100%;height:100%;border:0;background:#fff}@media(max-width:767.98px){.module-page{height:calc(100vh - 120px)}.module-toolbar{grid-template-columns:1fr auto}.module-title{display:none}.module-frame-wrap{min-height:420px}}

/* V2.3 — champs et listes */
.form-control,.form-select,.input-group-text{
    min-height:46px;
    border:1px solid #d5dee7;
    border-radius:12px;
    background-color:#fff;
    color:#243447;
    box-shadow:0 1px 2px rgba(25,45,65,.03);
    transition:border-color .18s,box-shadow .18s,background-color .18s;
}
.form-control:focus,.form-select:focus{
    border-color:#6485a1;
    box-shadow:0 0 0 .22rem rgba(54,76,98,.13);
}
.form-select{
    padding-right:3rem;
    cursor:pointer;
    appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23364c62' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 1rem center;
    background-size:16px 12px;
}
.input-group>.form-control,.input-group>.form-select{border-radius:0}.input-group>:first-child{border-radius:12px 0 0 12px}.input-group>:last-child{border-radius:0 12px 12px 0}.input-group-text{background:#f2f5f8;color:#677786}
.icon-picker-trigger{width:100%;min-height:46px;border:1px solid #d5dee7;border-radius:12px;background:#fff;padding:7px 12px;display:flex;align-items:center;gap:12px;text-align:left;color:#586775}.icon-picker-trigger:hover{border-color:#6485a1;background:#f8fafc}.icon-picker-trigger span:first-child{width:34px;height:34px;border-radius:9px;background:#edf2f6;display:grid;place-items:center;font-size:1.25rem}.icon-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:10px}.icon-library-item{height:54px;border:1px solid #dce4eb;border-radius:13px;background:#fff;font-size:1.45rem;transition:.15s}.icon-library-item:hover{transform:translateY(-2px);border-color:#6485a1;background:#f1f5f8}.category-swatch{display:inline-block;width:18px;height:18px;border-radius:6px;margin-right:8px;vertical-align:middle}

/* Téléchargements publics */
.public-downloads{width:min(1120px,calc(100% - 32px));margin:0 auto;padding:42px 0 70px}.public-downloads-head{display:flex;align-items:center;gap:28px;margin-bottom:28px}.public-downloads-head img{width:210px;max-height:70px}.public-downloads-head h1{margin:0}.public-downloads-head p{margin:.35rem 0 0;color:#6d7782}.public-download-search{max-width:480px;margin-bottom:34px}.download-group{margin-top:34px}.download-group h2{font-size:1.35rem;margin-bottom:16px}.download-card{height:100%;background:#fff;border:1px solid var(--border);border-radius:17px;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 8px 25px rgba(39,55,70,.05)}.download-card p{margin:.45rem 0;color:#6d7782}.download-card small{color:#84909b}
@media(max-width:700px){.public-downloads-head{align-items:flex-start;flex-direction:column}.download-card{align-items:flex-start;flex-direction:column}.download-card .btn{width:100%}}
.icon-picker-dialog{width:min(720px,calc(100% - 32px));border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(16,30,45,.28)}.icon-picker-dialog::backdrop{background:rgba(17,31,45,.58);backdrop-filter:blur(2px)}.icon-picker-dialog-head{padding:20px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.icon-picker-dialog-head h2{font-size:1.25rem;margin:0}.icon-picker-dialog-head small{color:#74818d}.icon-picker-dialog-body{padding:22px}


/* V2.4 — profil et mots de passe */
.password-card{max-width:900px}.profile-list{display:grid;grid-template-columns:minmax(130px,.75fr) 1.5fr;gap:0;border-top:1px solid var(--border);margin:0}.profile-list dt,.profile-list dd{margin:0;padding:13px 0;border-bottom:1px solid var(--border)}.profile-list dt{color:#73808c;font-weight:600}.profile-list dd{color:#243447;overflow-wrap:anywhere}.form-check{display:flex;align-items:flex-start;gap:.65rem}.form-check-input{margin-top:.2rem;flex:0 0 auto}@media(max-width:520px){.profile-list{grid-template-columns:1fr}.profile-list dt{padding-bottom:3px;border-bottom:0}.profile-list dd{padding-top:0}}
