/* Styles spécifiques à la page Réglages */

.main-content {
    padding: 2rem;
    padding-bottom: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.settings-panel {
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.setting-label {
    font-family: 'URW Form', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: block;
    width: 60px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: background-color 0.3s ease;
}

.toggle-checkmark {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.toggle-knob {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 1;
}

/* Toggle ON state */
.toggle-input:checked + .toggle-slider {
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-input:checked + .toggle-slider .toggle-checkmark {
    opacity: 1;
}

.toggle-input:checked + .toggle-slider .toggle-knob {
    transform: translateX(28px);
    background: linear-gradient(135deg, #FF6B35 0%, #8B5CF6 100%);
}

/* Mode Orange : toggle à droite = orange */
body.mode-orange .toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
}

body.mode-orange .toggle-input:checked + .toggle-slider .toggle-knob {
    background: #fff;
}

/* Mode Violet : toggle à gauche = violet (par défaut) */
body.mode-violet .toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
}

body.mode-violet .toggle-input:checked + .toggle-slider .toggle-knob {
    background: #fff;
}

/* Responsive adjustments */
/* Responsive adjustments - Tablet */
@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .settings-panel {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .settings-grid {
        gap: 1.5rem;
    }

    .setting-label {
        font-size: 1.125rem;
    }
}

/* Responsive adjustments - Mobile */
@media (max-width: 480px) {
    .settings-panel {
        padding: 1.5rem 1rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .toggle-slider {
        width: 56px;
        height: 30px;
    }

    .toggle-knob {
        width: 22px;
        height: 22px;
    }

    .toggle-input:checked + .toggle-slider .toggle-knob {
        transform: translateX(26px);
    }
}

/* Section titre */
.settings-section-title {
    font-family: 'Brevia', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2rem 0;
}

/* Section Profil */
.profile-settings-section {
    margin-top: 0;
}

.profile-settings-form {
    margin-top: 1.5rem;
}

.profile-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.profile-setting-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.profile-setting-item-full {
    grid-column: 1 / -1;
}

.profile-setting-label {
    font-family: 'URW Form', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #fff;
    text-align: left;
    width: 100%;
}

/* Aperçu photo de profil */
.profile-photo-preview-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    justify-content: space-between;
}

.profile-photo-preview {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Aperçu bannière */
.profile-banner-preview-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    justify-content: space-between;
}

.profile-banner-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.profile-banner-placeholder {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'URW Form', sans-serif;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Bouton de fichier */
.profile-file-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 90px;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
}

.profile-file-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Mode Orange pour profile-file-btn */
body.mode-orange .profile-file-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body.mode-orange .profile-file-btn:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #E6821A 100%) !important;
}

.profile-file-input {
    display: none;
}

/* Input description */
.profile-description-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

.profile-description-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.profile-description-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

/* Bouton enregistrer */
.profile-save-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 90px;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-save-btn:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
}

/* Mode Orange pour profile-save-btn */
body.mode-orange .profile-save-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
}

body.mode-orange .profile-save-btn:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #E6821A 100%) !important;
}

/* Messages de succès/erreur */
.settings-success-message,
.settings-error-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-family: 'URW Form', sans-serif;
    font-size: 0.875rem;
}

.settings-success-message {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.settings-error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Section Compte */
.account-settings-section {
    margin-top: 0;
    margin-bottom: 2rem;
}

.logout-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 90px;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
}

/* Mode Orange pour logout-btn */
body.mode-orange .logout-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
}

body.mode-orange .logout-btn:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #E6821A 100%) !important;
}

/* Responsive pour la section profil */
@media (max-width: 768px) {
    .profile-settings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-photo-preview {
        width: 100px;
        height: 100px;
    }

    .profile-banner-preview {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
        gap: 1.5rem;
    }

    .settings-section-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .profile-settings-section,
    .account-settings-section {
        margin-top: 0;
    }
}
