﻿/* ==========================================================================
   STYLES DES PARAMÈTRES DU COMPTE
   - Styles pour la page de paramètres utilisateur
   ========================================================================== */

/* ==========================================================================
   1. CONTENEURS GÉNÉRAUX
   ========================================================================== */
.settings-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

.settings-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

    .settings-header h1 {
        font-size: 2.2rem;
        font-weight: bold;
        color: #60a5fa;
        margin-bottom: 0.5rem;
        text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
    }

.back-link {
    display: inline-flex;
    align-items: center;
    color: #93c5fd;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

    .back-link:hover {
        color: #60a5fa;
        text-decoration: underline;
    }

    .back-link i {
        width: 16px;
        height: 16px;
        margin-right: 5px;
    }

/* ==========================================================================
   2. CARTE DE PARAMÈTRES
   ========================================================================== */
.settings-card {
    background: linear-gradient(180deg, #2d3748 0%, #1f2937 100%);
    border: none;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .settings-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(100, 100, 100, 0.3);
}

    .settings-section:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(100, 100, 100, 0.5);
    padding-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

/* ==========================================================================
   3. SECTION AVATAR
   ========================================================================== */
.avatar-section {
    text-align: center;
    margin-bottom: 30px;
}

    .avatar-section h3 {
        font-size: 1.1rem;
        color: #e2e8f0;
        margin-bottom: 15px;
    }

.settings-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.settings-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.4);
    overflow: hidden;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

    .settings-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.default-avatar {
    background-color: #334155;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-icon {
    width: 80px;
    height: 80px;
    color: #60a5fa;
}

.avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-upload-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: linear-gradient(180deg, #3182ce 0%, #2c5282 100%);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-upload-avatar:hover {
        background-color: #2c5282;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

.upload-icon {
    width: 16px;
    height: 16px;
}

.avatar-note {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 5px;
}

/* ==========================================================================
   4. FORMULAIRES
   ========================================================================== */
.settings-form {
    max-width: 600px;
    margin: 0 auto;
}

.basic-info-section {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        color: #e2e8f0;
        margin-bottom: 0.5rem;
    }

.required-field::after {
    content: '*';
    color: #ef4444;
    margin-left: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    color: #fff;
    transition: all 0.3s ease;
}

    .form-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
        outline: none;
        animation: pulseBorder 1.5s infinite;
    }

    .form-input.readonly {
        background-color: rgba(31, 41, 55, 0.8);
        color: #9ca3af;
        cursor: not-allowed;
    }

.form-note {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    display: block;
}

.form-actions {
    display: flex;
    justify-content: center; /* Modifié: centrer les boutons */
    margin-top: 1.5rem;
}

.btn-save {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px; /* Largeur minimale pour uniformité */
}

    .btn-save:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

/* ==========================================================================
   5. ACTIONS DANGEREUSES
   ========================================================================== */
.account-actions {
    display: flex;
    justify-content: center; /* Déjà centré */
    margin-top: 30px;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Centrer le contenu du bouton */
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px; /* Largeur minimale pour uniformité */
}

    .btn-danger:hover {
        background-color: rgba(239, 68, 68, 0.3);
        color: #fee2e2;
    }

.danger-icon {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   6. MESSAGES SYSTÈME
   ========================================================================== */
.success-message,
.error-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}

.success-message {
    background-color: rgba(16, 185, 129, 0.2);
    border-left: 4px solid #10B981;
    color: #A7F3D0;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.2);
    border-left: 4px solid #EF4444;
    color: #FCA5A5;
}

/* ==========================================================================
   7. EFFETS VISUELS
   ========================================================================== */
@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .settings-header {
        padding-top: 30px;
    }

    .back-link {
        position: static;
        transform: none;
        display: block;
        margin-bottom: 15px;
    }

    .form-actions {
        justify-content: center; /* Déjà centré */
    }

    .btn-save {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .settings-header h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .settings-card {
        padding: 1.5rem;
        border-radius: 1rem;
    }
}
