/* ===============================
   PROFILE PAGE STYLES - CORRIGÉ
   =============================== */

/* Profile Section */
.profile-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

.profile-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* ===============================
   HEADER LAYOUT & STYLE FIX
   Force l'ordre : Logo -> Langue -> Retour
   =============================== */

/* 1. Conteneur Header : Alignement horizontal forcé */
.header-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Tout à gauche par défaut */
    gap: 0 !important; /* On gère les espaces manuellement */
}

/* 2. Logo : Toujours en premier (gauche) */
.logo {
    order: 1 !important;
    margin-right: 0 !important;
    flex-shrink: 0;
}

/* 3. Sélecteur de langue : En deuxième, collé au logo (+20px) */
.profile-lang-selector {
    order: 2 !important;
    margin-left: 20px !important;
    margin-right: auto !important; /* Pousse le bouton retour tout à droite */
    display: block !important;
}

/* 4. Bouton Retour : En dernier (droite) et Style "Glass" */
.btn-back {
    order: 3 !important;
    margin-left: 0 !important;
    
    /* Style Visuel "Pilule" */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px !important;
    height: auto !important; /* Empêche l'étirement */
    
    background: rgba(255, 255, 255, 0.15) !important; /* Fond transparent */
    border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Bordure fine */
    border-radius: 50px !important; /* Arrondi total */
    
    color: var(--white) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: none !important;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px);
}

.btn-back svg {
    width: 18px;
    height: 18px;
}

/* RESPONSIVE : Ajustements Mobile */
@media (max-width: 480px) {
    .profile-lang-selector {
        margin-left: 10px !important; /* Espace réduit sur mobile */
    }

    .btn-back {
        padding: 8px 12px !important; /* Bouton plus compact */
    }

    .btn-back span {
        display: none; /* Cache le texte "Retour", garde la flèche */
    }
}

/* ===============================
   PROFILE CARDS & FORM
   =============================== */

/* Profile Header Card */
.profile-header-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

/* Avatar Section */
.profile-avatar-section {
    flex-shrink: 0;
}

.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar svg {
    width: 60px;
    height: 60px;
    color: rgba(255, 255, 255, 0.8);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    border: 3px solid rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
}

.avatar-upload-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Profile Info */
.profile-info {
    flex: 1;
    color: white;
}

.profile-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.profile-info-item {
    flex: 1;
}

.profile-info-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-info-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.profile-username {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 6px;
}

/* Edit Button */
.btn-edit-profile {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit-profile:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-edit-profile svg {
    width: 16px;
    height: 16px;
}

/* Profile Form Card */
.profile-form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.profile-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.profile-form-header p {
    font-size: 15px;
    color: #666;
}

/* Form Fields */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 15px;
    background: rgba(102, 126, 234, 0.05);
    color: #333;
}

.form-group input:focus {
    outline: none;
    border-color: #667EEA;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Password Input */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 6px;
    display: flex;
    align-items: center;
}

.password-hint {
    font-size: 12px;
    color: #666;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-delete {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

.btn-delete svg {
    width: 18px;
    height: 18px;
}

.profile-back-link {
    text-align: center;
    margin-top: 20px;
}

.profile-back-link a {
    color: #667EEA;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Media Queries pour le contenu interne du profil */
@media (max-width: 767px) {
    .profile-header-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .profile-info-row {
        flex-direction: column;
        gap: 10px;
    }
    .btn-edit-profile {
        position: static;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}