/* shared/css/settings-panel.css */

/* ===== PANNEAU FLOTTANT PARAMETRES ===== */
.settings-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 199;
    display: none;
}
.settings-panel-overlay.active {
    display: block;
}

.settings-panel {
    position: fixed;
    bottom: 60px;
    left: 12px;
    width: 240px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: settingsPanelUp 0.18s ease;
}
.settings-panel.active {
    display: flex;
}

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

/* ===== ITEMS DU PANNEAU ===== */
.sp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.sp-item:hover {
    background: var(--bg-tertiary);
}
.sp-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}
.sp-item.sp-logout {
    color: #dc2626;
    border-top: 1px solid var(--border);
}
.sp-item.sp-logout svg {
    stroke: #dc2626;
}

/* ===== EXPAND INLINE (Theme / Langue) ===== */
.sp-expand {
    display: none;
    padding: 8px 16px 12px;
    gap: 8px;
    flex-wrap: wrap;
}
.sp-expand.active {
    display: flex;
}

/* Theme circles */
.sp-theme-opt {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-theme-opt:hover {
    border-color: var(--text-secondary);
    transform: scale(1.1);
}
.sp-theme-opt.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-primary);
}
.sp-theme-opt[data-theme="dark"] {
    background: #1a1a1a;
}
.sp-theme-opt[data-theme="light"] {
    background: #f5f5f5;
}

/* Langue options */
.sp-lang-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
}
.sp-lang-opt:hover {
    border-color: var(--text-secondary);
}
.sp-lang-opt.active {
    border-color: var(--text-primary);
    background: var(--btn-primary);
}
.sp-lang-opt img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ===== MODALE PROFIL ===== */
.sp-profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    animation: modalFadeIn 0.2s ease;
}
.sp-profile-overlay.active {
    display: flex;
}
.sp-profile-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.25s ease;
}
.sp-profile-box h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-align: center;
}
.sp-profile-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sp-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sp-field label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.sp-field input {
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.sp-field input:focus {
    border-color: var(--text-secondary);
}
.sp-profile-type {
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}
.sp-profile-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.sp-profile-save {
    flex: 1;
    padding: 9px;
    background: var(--btn-primary);
    border: none;
    border-radius: 8px;
    color: var(--btn-primary-text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.sp-profile-save:hover {
    background: var(--btn-primary-hover);
}
.sp-profile-cancel {
    padding: 9px 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.sp-profile-cancel:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .settings-panel {
        left: 8px;
        bottom: 56px;
        width: 220px;
    }
    .sp-profile-box {
        padding: 22px 18px;
        max-width: 95%;
    }
}

@media (min-width: 769px) {
    .settings-panel {
        left: calc(var(--sidebar-width) + 12px);
        bottom: 16px;
    }
}
