refactor: remplacer le panneau CSS par une modale centrée avec tabs

This commit is contained in:
2026-06-19 13:18:10 +02:00
parent 7bac69be6d
commit 2df558e10f
3 changed files with 177 additions and 89 deletions
+108 -59
View File
@@ -484,96 +484,145 @@ body {
border-color: rgba(255,255,255,0.35);
background: rgba(255,255,255,0.06);
}
.btn-customize-css__icon {
font-size: 15px;
opacity: 0.8;
}
.btn-customize-css__icon { font-size: 15px; opacity: 0.8; }
/* ── CSS editor panel ── */
.css-editor-panel {
/* ── CSS modal ── */
.css-modal-overlay {
position: fixed;
bottom: 120px;
left: 12px;
width: 240px;
background: #12132a;
border: 1px solid rgba(255,255,255,0.15);
border-radius: 10px;
z-index: 101;
inset: 0;
background: rgba(0,0,0,0.55);
z-index: 300;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(2px);
}
.css-modal {
width: 580px;
max-height: 82vh;
background: #fff;
border-radius: 12px;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
overflow: hidden;
box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}
.css-editor-panel__header {
.css-modal__header {
background: #1a1b2e;
padding: 14px 20px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 14px;
border-bottom: 1px solid rgba(255,255,255,0.08);
color: rgba(255,255,255,0.7);
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
flex-shrink: 0;
}
.css-editor-panel__close {
.css-modal__title {
color: #fff;
font-size: 14px;
font-weight: 600;
}
.css-modal__close {
background: transparent;
border: none;
color: rgba(255,255,255,0.4);
font-size: 13px;
color: rgba(255,255,255,0.45);
font-size: 14px;
cursor: pointer;
padding: 2px 4px;
padding: 3px 6px;
border-radius: 4px;
font-family: inherit;
transition: color 0.15s, background 0.15s;
line-height: 1;
}
.css-editor-panel__close:hover {
color: #fff;
background: rgba(255,255,255,0.08);
.css-modal__close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.css-modal__tabs {
display: flex;
border-bottom: 1px solid #e8e8ee;
background: #f6f6fa;
flex-shrink: 0;
}
.css-editor__textarea {
width: 100%;
height: 180px;
background: #0e0f24;
.css-modal__tab {
padding: 10px 18px;
background: transparent;
border: none;
color: rgba(255,255,255,0.8);
border-bottom: 2px solid transparent;
font-family: 'Poppins', sans-serif;
font-size: 13px;
font-weight: 500;
color: #888;
cursor: pointer;
transition: color 0.15s, border-color 0.15s;
white-space: nowrap;
}
.css-modal__tab:hover { color: #444; }
.css-modal__tab.active { color: #ff5577; border-bottom-color: #ff5577; font-weight: 600; }
.css-modal__body {
padding: 18px 20px 12px;
display: flex;
flex-direction: column;
gap: 10px;
flex: 1;
overflow: hidden;
min-height: 0;
}
.css-modal__description {
font-size: 12px;
color: #999;
margin: 0;
line-height: 1.5;
}
.css-modal__editor {
flex: 1;
min-height: 200px;
background: #1e1e2e;
border: none;
border-radius: 6px;
color: #cdd6f4;
font-family: 'Roboto Mono', monospace;
font-size: 11px;
line-height: 1.6;
padding: 12px;
font-size: 12px;
line-height: 1.65;
padding: 14px 16px;
resize: none;
outline: none;
}
.css-editor__textarea::placeholder {
color: rgba(255,255,255,0.2);
}
.css-editor-panel__footer {
.css-modal__editor::placeholder { color: rgba(255,255,255,0.18); }
.css-modal__footer {
padding: 12px 20px;
border-top: 1px solid #e8e8ee;
display: flex;
gap: 8px;
padding: 10px 12px;
border-top: 1px solid rgba(255,255,255,0.08);
align-items: center;
gap: 10px;
flex-shrink: 0;
background: #fafafa;
}
.css-editor-panel__btn {
.css-modal__config-name {
flex: 1;
padding: 6px 10px;
border: none;
border: 1px solid #ddd;
border-radius: 6px;
padding: 7px 12px;
font-family: 'Poppins', sans-serif;
font-size: 12px;
color: #444;
outline: none;
transition: border-color 0.15s;
background: #fff;
}
.css-modal__config-name:focus { border-color: #ff5577; }
.css-modal__config-name::placeholder { color: #bbb; }
.css-modal__footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.css-modal__btn {
padding: 7px 16px;
border-radius: 6px;
font-family: 'Poppins', sans-serif;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: background 0.15s;
border: none;
transition: background 0.15s, color 0.15s;
white-space: nowrap;
}
.css-editor-panel__btn--primary {
background: #ff5577;
color: #fff;
}
.css-editor-panel__btn--primary:hover { background: #ff3355; }
.css-editor-panel__btn--secondary {
background: rgba(255,255,255,0.08);
color: rgba(255,255,255,0.7);
}
.css-editor-panel__btn--secondary:hover { background: rgba(255,255,255,0.14); }
.css-modal__btn--primary { background: #ff5577; color: #fff; }
.css-modal__btn--primary:hover { background: #ff3355; }
.css-modal__btn--ghost { background: transparent; color: #777; border: 1px solid #ddd; }
.css-modal__btn--ghost:hover { background: #f0f0f4; color: #444; }
/* ── Back button ── */
.btn-back {