/* ============================================================
   BureauPartout — Style façon Windows 11
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #0078d4;
    --accent-hover: #106ebe;
    --taskbar-h: 52px;
    --win-radius: 10px;
    --glass: rgba(32, 32, 32, 0.82);
    --glass-light: rgba(255, 255, 255, 0.06);
    --text: #f0f0f0;
    --text-dim: #b8b8b8;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
    user-select: none;
    color: var(--text);
}

.hidden { display: none !important; }

/* ============ Fonds d'écran ============ */
.wallpaper-bleu, .desktop.wallpaper-bleu             { background: linear-gradient(135deg, #0f2027 0%, #203a43 40%, #2c5364 100%); }
.wallpaper-violet, .desktop.wallpaper-violet         { background: linear-gradient(135deg, #41295a 0%, #2F0743 100%); }
.wallpaper-foret, .desktop.wallpaper-foret           { background: linear-gradient(135deg, #134E5E 0%, #71B280 100%); }
.wallpaper-crepuscule, .desktop.wallpaper-crepuscule { background: linear-gradient(135deg, #0B486B 0%, #F56217 100%); }
.wallpaper-ocean, .desktop.wallpaper-ocean           { background: linear-gradient(135deg, #1A2980 0%, #26D0CE 100%); }
.wallpaper-sombre, .desktop.wallpaper-sombre         { background: linear-gradient(135deg, #232526 0%, #414345 100%); }

/* ============ Écran de connexion ============ */
.login-screen {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 40%, #2c5364 100%);
    z-index: 10000;
}

.login-box {
    text-align: center;
    animation: fadeUp .5s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
    width: 110px; height: 110px;
    margin: 0 auto 18px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 32px rgba(124,92,255,.45));
}

.login-title {
    margin-bottom: 26px;
}

.login-title img {
    height: 66px;
    object-fit: contain;
}

.login-box input {
    display: block;
    width: 280px;
    margin: 0 auto 12px;
    padding: 11px 16px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 6px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, background .2s;
}

.login-box input::placeholder { color: rgba(255,255,255,.55); }
.login-box input:focus { border-color: #fff; background: rgba(255,255,255,.18); }

.login-box button {
    width: 280px;
    padding: 11px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}

.login-box button:hover { background: var(--accent-hover); }

.login-error {
    margin-top: 12px;
    color: #ff9c9c;
    font-size: 13px;
    min-height: 18px;
}

.login-footer {
    position: absolute;
    bottom: 24px;
    color: rgba(255,255,255,.45);
    font-size: 12px;
    letter-spacing: 2px;
}

/* ============ Bureau ============ */
.desktop {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 40%, #2c5364 100%);
    transition: background .4s ease;
}

.desktop-icons {
    position: absolute;
    inset: 0;
    bottom: var(--taskbar-h);
}

.desktop-icon {
    position: absolute;
    width: 84px;
    padding: 10px 4px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
    touch-action: none;
}

.desktop-icon img {
    -webkit-user-drag: none;
    user-drag: none;
}

.desktop-icon.dragging {
    opacity: .75;
    z-index: 50;
    cursor: grabbing;
}

.selection-rect {
    position: fixed;
    border: 1px solid rgba(0, 120, 212, .8);
    background: rgba(0, 120, 212, .18);
    pointer-events: none;
    z-index: 40;
}

.desktop-icon:hover { background: rgba(255,255,255,.1); }
.desktop-icon.selected { background: rgba(0,120,212,.35); border-color: rgba(0,120,212,.6); }

.desktop-icon .icon-glyph {
    font-size: 36px;
    display: block;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.4));
}

.desktop-icon .icon-favicon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: rgba(255,255,255,.9);
    padding: 3px;
    object-fit: contain;
}

.desktop-icon .icon-label {
    font-size: 12px;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
    word-break: break-word;
}

/* ============ Fenêtres ============ */
.window {
    position: absolute;
    min-width: 320px;
    min-height: 200px;
    background: var(--glass);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--win-radius);
    box-shadow: 0 16px 50px rgba(0,0,0,.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: winOpen .18s ease;
}

@keyframes winOpen {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.window.maximized {
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: calc(100% - var(--taskbar-h)) !important;
    border-radius: 0;
}

.window.minimized { display: none; }

.window.inactive { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.window.inactive .window-titlebar { opacity: .65; }

.window-titlebar {
    height: 38px;
    display: flex;
    align-items: center;
    padding-left: 12px;
    background: rgba(255,255,255,.04);
    cursor: default;
    flex-shrink: 0;
}

.window-titlebar .win-title {
    flex: 1;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
}

.window-controls { display: flex; height: 100%; }

.window-controls button {
    width: 46px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.window-controls button:hover { background: rgba(255,255,255,.1); }
.window-controls button.win-close:hover { background: #e81123; }

.window-body {
    flex: 1;
    overflow: auto;
    position: relative;
}

.window-resize-handle {
    position: absolute;
    right: 0; bottom: 0;
    width: 16px; height: 16px;
    cursor: nwse-resize;
    z-index: 5;
}

/* ============ Barre des tâches ============ */
.taskbar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: var(--taskbar-h);
    background: var(--glass);
    backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 9000;
}

.taskbar-center {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 75vw;
    overflow-x: auto;
}

.taskbar-btn {
    height: 40px;
    min-width: 40px;
    padding: 0 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s;
}

.taskbar-btn:hover { background: rgba(255,255,255,.12); }

/* Logo BureauPartout */
.vb-logo {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.taskbar-windows { display: flex; gap: 4px; }

.task-item {
    height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 180px;
    position: relative;
}

.task-item:hover { background: rgba(255,255,255,.1); }
.task-item.active { background: rgba(255,255,255,.14); }

.task-item::after {
    content: "";
    position: absolute;
    bottom: 3px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 3px;
    border-radius: 2px;
    background: var(--accent);
}

.task-item .task-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taskbar-right { margin-left: auto; }

.taskbar-clock {
    text-align: right;
    font-size: 12px;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: default;
}

.taskbar-clock:hover { background: rgba(255,255,255,.08); }

/* ============ Menu Démarrer ============ */
.start-menu {
    position: absolute;
    bottom: calc(var(--taskbar-h) + 10px);
    left: 10px;
    width: 560px;
    max-width: calc(100vw - 24px);
    background: var(--glass);
    backdrop-filter: blur(35px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
    padding: 22px;
    z-index: 9500;
    animation: startOpen .18s ease;
}

@keyframes startOpen {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.start-search input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,.1);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.start-search input::placeholder { color: var(--text-dim); }

.start-section-title {
    margin: 20px 4px 10px;
    font-size: 13px;
    font-weight: 600;
}

.start-apps {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 46vh;
    overflow-y: auto;
}

.start-app {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.start-app:hover { background: rgba(255,255,255,.1); }
.start-app .icon-glyph { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.start-app .icon-glyph img { width: 22px; height: 22px; vertical-align: middle; }
.start-app .icon-label { font-size: 13px; }

.start-footer {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.start-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }

.start-user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c5cff, #2ec5a8);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.start-power {
    height: 38px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.start-power:hover { background: rgba(232,17,35,.8); }

/* ============ Menu contextuel ============ */
.context-menu {
    position: fixed;
    min-width: 200px;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    box-shadow: 0 10px 35px rgba(0,0,0,.5);
    padding: 5px;
    z-index: 9800;
    animation: winOpen .12s ease;
}

.context-menu .ctx-item {
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-menu .ctx-item:hover { background: rgba(255,255,255,.12); }
.context-menu .ctx-sep { height: 1px; margin: 5px 8px; background: rgba(255,255,255,.12); }

/* ============================================================
   Applications
   ============================================================ */

/* ---- Explorateur ---- */
.explorer { display: flex; flex-direction: column; height: 100%; }

.explorer-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-wrap: wrap;
}

.explorer-toolbar button {
    padding: 6px 11px;
    border: none;
    border-radius: 5px;
    background: rgba(255,255,255,.08);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.explorer-toolbar button:hover { background: rgba(255,255,255,.16); }

.explorer-breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(255,255,255,.05);
    border-radius: 5px;
    overflow-x: auto;
    white-space: nowrap;
}

.explorer-breadcrumb span { cursor: pointer; padding: 2px 4px; border-radius: 3px; }
.explorer-breadcrumb span:hover { background: rgba(255,255,255,.12); }
.explorer-breadcrumb .crumb-sep { color: var(--text-dim); cursor: default; }

.explorer-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 4px;
    align-content: start;
}

.explorer-item {
    padding: 12px 6px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
}

.explorer-item:hover { background: rgba(255,255,255,.08); }
.explorer-item.selected { background: rgba(0,120,212,.3); border-color: rgba(0,120,212,.55); }
.explorer-item .icon-glyph { font-size: 34px; display: block; margin-bottom: 6px; }
.explorer-item .icon-label { font-size: 12px; word-break: break-word; line-height: 1.25; }

.explorer-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    padding: 40px 0;
    font-size: 13px;
}

/* ---- Bloc-notes ---- */
.notepad { display: flex; flex-direction: column; height: 100%; }

.notepad-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.notepad-toolbar button {
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.notepad-toolbar button:hover { background: var(--accent-hover); }
.notepad-status { margin-left: auto; font-size: 12px; color: var(--text-dim); }

.notepad textarea {
    flex: 1;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    padding: 14px;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    user-select: text;
}

/* ---- Navigateur ---- */
.browser { display: flex; flex-direction: column; height: 100%; }

.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.browser-toolbar button {
    min-width: 32px;
    height: 32px;
    border: none;
    border-radius: 5px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.browser-toolbar button:hover { background: rgba(255,255,255,.16); }

.browser-address {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 13px;
    outline: none;
}

.browser-address:focus { border-color: var(--accent); }

.browser-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(255,180,0,.15);
    border-bottom: 1px solid rgba(255,180,0,.25);
    color: #ffd97a;
}

.browser-hint-close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
}

.browser-home {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.browser-home-inner { text-align: center; max-width: 520px; padding: 20px; }
.browser-home-inner h2 { font-weight: 300; font-size: 28px; margin-bottom: 24px; }

.browser-search { display: flex; gap: 8px; margin-bottom: 28px; }

.browser-search input {
    flex: 1;
    padding: 11px 18px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.browser-search input:focus { border-color: var(--accent); }

.browser-search button {
    padding: 0 20px;
    border: none;
    border-radius: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.browser-search button:hover { background: var(--accent-hover); }

.browser-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
}

.browser-links a {
    padding: 9px 15px;
    border-radius: 8px;
    background: rgba(255,255,255,.07);
    font-size: 13px;
    cursor: pointer;
}

.browser-links a:hover { background: rgba(255,255,255,.15); }

.browser-note { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

.browser-frame {
    flex: 1;
    border: none;
    background: #fff;
    width: 100%;
}

/* ---- Calculatrice ---- */
.calculator {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    gap: 10px;
}

.calc-display {
    background: rgba(0,0,0,.3);
    border-radius: 8px;
    padding: 16px;
    text-align: right;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.calc-expr { font-size: 13px; color: var(--text-dim); min-height: 17px; word-break: break-all; }
.calc-result { font-size: 32px; font-weight: 300; word-break: break-all; }

.calc-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.calc-grid button {
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,.08);
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
    transition: background .12s;
}

.calc-grid button:hover { background: rgba(255,255,255,.16); }
.calc-grid button.op { background: rgba(255,255,255,.14); }
.calc-grid button.eq { background: var(--accent); }
.calc-grid button.eq:hover { background: var(--accent-hover); }

/* ---- Paint ---- */
.paint { display: flex; flex-direction: column; height: 100%; }

.paint-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-wrap: wrap;
}

.paint-tools, .paint-actions { display: flex; gap: 3px; }

.paint-toolbar button {
    min-width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
}

.paint-toolbar button:hover { background: rgba(255,255,255,.15); }
.paint-toolbar button.active { background: rgba(0,120,212,.4); border-color: var(--accent); }

.paint-fill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    cursor: pointer;
}

.paint-toolbar input[type="range"] { width: 80px; accent-color: var(--accent); }

.paint-palette { display: flex; align-items: center; gap: 3px; }

.paint-swatch {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255,255,255,.25) !important;
}

.paint-palette input[type="color"] {
    width: 28px;
    height: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.paint-status { font-size: 12px; color: var(--text-dim); }

.paint-canvas-wrap {
    flex: 1;
    overflow: hidden;
    background: #ffffff;
}

.paint-canvas-wrap canvas { display: block; cursor: crosshair; }

/* ---- Paramètres ---- */
.settings { padding: 20px; display: flex; flex-direction: column; gap: 18px; }

.settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    padding-bottom: 0;
}

.settings-tab {
    padding: 9px 14px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-dim, #cfcfcf);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
}

.settings-tab:hover { background: rgba(255,255,255,.07); }
.settings-tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.settings-pane.hidden { display: none; }

.account-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    max-width: 360px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    padding: 7px 10px;
    background: rgba(255,255,255,.05);
    border-radius: 6px;
}

.account-row span { opacity: .7; }

.settings-form label { font-size: 12px; opacity: .7; }

.settings h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.wallpaper-tile {
    height: 70px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.wallpaper-tile.selected { border-color: #fff; }

.wallpaper-tile .wp-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.5);
    font-size: 11px;
    text-align: center;
    padding: 3px;
}

.wallpaper-tile-custom {
    border: 2px dashed rgba(255,255,255,.35);
}

.wallpaper-custom {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.1);
    opacity: .55;
    transition: opacity .2s;
}

.wallpaper-custom.active { opacity: 1; }

.wallpaper-custom h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.custom-preview {
    height: 56px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,.15);
}

.custom-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.custom-color {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    opacity: .8;
}

.custom-color input[type="color"] {
    width: 48px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

.custom-angle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    opacity: .8;
    flex: 1;
    min-width: 120px;
}

.custom-angle em {
    font-style: normal;
    opacity: .7;
}

.custom-angle input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.custom-apply {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.custom-apply:hover { background: var(--accent-hover); }

.settings-form { display: flex; flex-direction: column; gap: 10px; max-width: 300px; }

.settings-form input {
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 5px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 13px;
    outline: none;
}

.settings-form input:focus { border-color: var(--accent); }

.settings-form button {
    padding: 9px;
    border: none;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.settings-form button:hover { background: var(--accent-hover); }

/* ---- Sauvegardes ---- */
.backup-app { display: flex; flex-direction: column; height: 100%; }

.backup-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.backup-toolbar button {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,.1);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.backup-toolbar button:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.backup-toolbar button:disabled { opacity: .5; cursor: wait; }

.backup-msg { font-size: 12px; margin-left: auto; }

.backup-lists {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.backup-lists h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.backup-lists code { font-size: 12px; opacity: .75; }

.backup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,.05);
    margin-bottom: 4px;
    font-size: 13px;
}

.backup-name { font-family: Consolas, monospace; }
.backup-meta { font-size: 11px; opacity: .65; white-space: nowrap; }
.backup-empty { font-size: 12px; opacity: .55; padding: 6px 2px; }

.settings-msg { font-size: 12px; min-height: 16px; }
.settings-msg.ok { color: #6ccb5f; }
.settings-msg.err { color: #ff9c9c; }

/* ---- Utilisateurs (admin) ---- */
.users-app { display: flex; flex-direction: column; height: 100%; }

.users-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.users-toolbar button {
    padding: 7px 12px;
    border: none;
    border-radius: 5px;
    background: rgba(255,255,255,.08);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.users-toolbar button:hover { background: rgba(255,255,255,.16); }
.users-msg { font-size: 12px; margin-left: auto; }

.users-create {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
}

.users-create input, .users-create select {
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 5px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 13px;
    outline: none;
    flex: 1;
    min-width: 140px;
}

.users-create select option { background: #2b2b2b; }
.users-create input:focus { border-color: var(--accent); }

.users-create button {
    padding: 8px 18px;
    border: none;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.users-create button:hover { background: var(--accent-hover); }

.users-table-wrap { flex: 1; overflow: auto; }

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.users-table th {
    text-align: left;
    padding: 9px 12px;
    background: rgba(255,255,255,.05);
    font-weight: 600;
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
}

.users-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.users-table tr:hover td { background: rgba(255,255,255,.04); }
.users-table tr.user-disabled td { opacity: .5; }

.user-self { color: var(--text-dim); font-size: 11px; }
.user-files { text-align: center; }

.users-table select {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 4px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 12px;
}

.users-table select option { background: #2b2b2b; }
.users-table select:disabled { opacity: .45; cursor: not-allowed; }

.users-table button {
    padding: 5px 9px;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.users-table button:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.users-table button:disabled { opacity: .35; cursor: not-allowed; }
.user-actions { display: flex; gap: 4px; }

/* ---- À propos ---- */
.about {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    gap: 10px;
}

.about .about-logo { font-size: 56px; }
.about .about-logo img { width: 72px; height: 72px; object-fit: contain; }
.about h2 { font-weight: 600; font-size: 26px; }
.about .about-title img { height: 44px; object-fit: contain; }
.about p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

/* ---- Dialogue (prompt/confirm) ---- */
.dialog-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog {
    width: 360px;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 18px 55px rgba(0,0,0,.55);
    animation: winOpen .15s ease;
}

.dialog h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

.dialog-fields { display: flex; flex-direction: column; }

.dialog input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 5px;
    background: rgba(255,255,255,.08);
    color: var(--text);
    font-size: 13px;
    outline: none;
    margin-bottom: 16px;
}

.dialog input:focus { border-color: var(--accent); }

.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; }

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin-bottom: 14px;
}

.emoji-grid .emoji-choice {
    border: 1px solid transparent;
    border-radius: 6px;
    background: rgba(255,255,255,.06);
    font-size: 19px;
    padding: 5px 0;
    cursor: pointer;
}

.emoji-grid .emoji-choice:hover {
    background: rgba(0,120,212,.35);
    border-color: var(--accent);
}

.dialog-buttons button {
    padding: 8px 18px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
}

.dialog-buttons .btn-primary { background: var(--accent); color: #fff; }
.dialog-buttons .btn-primary:hover { background: var(--accent-hover); }
.dialog-buttons .btn-secondary { background: rgba(255,255,255,.1); color: var(--text); }
.dialog-buttons .btn-secondary:hover { background: rgba(255,255,255,.18); }

/* ---- Scrollbars ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); }
::-webkit-scrollbar-track { background: transparent; }
