/* ==========================================================================
   PAGE PROFIL - CSS
   ========================================================================== */

/* Header spécifique au profil */
.profile-app-header {
    background: #5B58EB;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.profile-app-header .header-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.profile-app-header .back-btn {
    background: transparent;
    font-size: 22px;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Conteneur principal */
.profile-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #EEFBFF;
    padding-bottom: 30px;
}

/* --------------------------------------------------------------------------
   Bannière Hero (Dégradé Violet avec Avatar et Infos utilisateur)
   -------------------------------------------------------------------------- */
.profile-hero-banner {
    background: linear-gradient(135deg, #5B58EB 0%, #BB63FF 100%);
    padding: 30px 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #ffffff;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    box-shadow: 0 4px 15px rgba(91, 88, 235, 0.25);
}

/* Zone Avatar & Bouton d'édition */
.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
}

#profile-user-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #a3c4ed;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background-color: #a3c4ed;
}

/* Bouton pour changer l'image de profil */
.edit-avatar-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #a3c4ed;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
}

.edit-avatar-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Loader pendant l'upload d'image */
.avatar-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Nom et Email */
.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    min-height: 28px;
    word-break: break-word;
}

.profile-email-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    opacity: 0.9;
}

.email-icon {
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Sections & Cartes d'action (My game, More, etc.)
   -------------------------------------------------------------------------- */
.profile-content-body {
    padding: 20px 16px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: #5B58EB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

/* Éléments sous forme de cartes cliquables */
.profile-card-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 88, 235, 0.12);
}

.profile-card-item:active {
    transform: translateY(0);
}

.card-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #2D3748;
}

.card-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-icon {
    font-size: 14px;
    color: #A0AEC0;
    font-weight: bold;
}

/* Style de suppression de compte (Alerte rouge) */
.danger-item {
    border: 1px solid rgba(229, 62, 62, 0.15);
}

.danger-item:hover {
    background-color: #FFF5F5;
}

.text-danger {
    color: #E53E3E !important;
}

/* --------------------------------------------------------------------------
   Modal de Confirmation de Suppression
   -------------------------------------------------------------------------- */
.modal-content.dialog-content {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: left;
}

.modal-content.dialog-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
}

.modal-content.dialog-content hr {
    border: none;
    border-top: 1px solid #E2E8F0;
    margin-bottom: 15px;
}

.modal-content.dialog-content p {
    color: #4A5568;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-danger {
    background-color: #E53E3E;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-danger:hover {
    background-color: #C53030;
}

.btn-dialog-close {
    background-color: #EDF2F7;
    color: #4A5568;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.btn-dialog-close:hover {
    background-color: #E2E8F0;
}