/* ============================================
   PROFILE.CSS - Page de profil 3D Premium
   ============================================ */

/* Variables Premium */
:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-danger: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --glow-blue: 0 0 20px rgba(102, 126, 234, 0.3);
    --glow-purple: 0 0 20px rgba(118, 75, 162, 0.3);
    --glow-pink: 0 0 20px rgba(245, 87, 108, 0.3);
}

/* ============================================
   ANIMATIONS PREMIUM
   ============================================ */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.6); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.profile-container {
    padding: 2rem 0 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.dark-mode .glass-card {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================
   SECTIONS
   ============================================ */

.profile-section {
    background: var(--background-primary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.5), 
        transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-section:hover::before {
    opacity: 1;
}

.profile-section:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 40px rgba(102, 126, 234, 0.1);
}

body.dark-mode .profile-section:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(102, 126, 234, 0.2);
}

/* ============================================
   HEADER SECTION - Avatar & Infos
   ============================================ */

.profile-header-section {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.95) 0%, 
        rgba(118, 75, 162, 0.95) 100%) !important;
    color: white;
    border: none !important;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Orbes animés de fond */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: orb-float 10s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #4facfe 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #f093fb 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    animation-delay: 2s;
}

.profile-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.profile-avatar-container {
    position: relative;
    cursor: pointer;
}

/* Ring animé autour de l'avatar */
.avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe, #00f2fe, #4facfe);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    opacity: 0.6;
    z-index: -1;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.profile-avatar-container:hover .profile-avatar-large {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-avatar-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    font-size: 1.5rem;
    animation: icon-pulse 2s ease-in-out infinite;
}

.avatar-overlay span {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-header-info {
    flex: 1;
}

.profile-username {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-email {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0 0 1rem 0;
}

.profile-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.badge-plan {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-plan:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.badge-verified {
    background: rgba(16, 185, 129, 0.25);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-verified:hover {
    background: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

/* ============================================
   SECTION HEADER
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        transparent 100%);
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

body.dark-mode .section-header h3 {
    color: var(--text-primary, #f8fafc);
}

.section-icon-glow {
    color: var(--primary-color, #667eea);
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.4));
    animation: icon-pulse 3s ease-in-out infinite;
}

.section-icon-danger {
    color: #ef4444;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
    animation: icon-pulse 3s ease-in-out infinite;
}

.profile-icon-pulse {
    animation: icon-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(102, 126, 234, 0.5));
}

/* ============================================
   FORMS
   ============================================ */

.profile-form {
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

body.dark-mode .form-group label {
    color: var(--text-primary, #f8fafc);
}

.form-group label i {
    font-size: 0.875rem;
    color: var(--primary-color, #667eea);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.05);
    color: var(--text-primary, #1e293b);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

body.dark-mode .form-input {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #f8fafc);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 0 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

body.dark-mode .form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 0 20px rgba(102, 126, 234, 0.3);
}

.form-input:disabled {
    background: var(--background-tertiary, #f8fafc);
    color: var(--text-tertiary, #94a3b8);
    cursor: not-allowed;
    opacity: 0.7;
}

body.dark-mode .form-input:disabled {
    background: rgba(255, 255, 255, 0.03);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

body.dark-mode .form-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   BUTTONS PREMIUM
   ============================================ */

.btn-back-dashboard {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-back-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.btn-back-dashboard:hover::before {
    left: 100%;
}

.btn-back-dashboard:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-back-dashboard:active {
    transform: translateY(-1px);
}

.btn-edit,
.btn-secondary,
.btn-save,
.btn-cancel,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.btn-edit {
    background: transparent;
    color: var(--primary-color, #667eea);
    border-color: var(--primary-color, #667eea);
}

.btn-edit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-edit:hover::before {
    opacity: 1;
}

.btn-edit:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-edit span,
.btn-edit i {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary, #1e293b);
    border-color: transparent;
}

body.dark-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #f8fafc);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

body.dark-mode .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary, #64748b);
    border-color: var(--border-color, #e2e8f0);
}

body.dark-mode .btn-cancel {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #94a3b8);
}

.btn-cancel:hover {
    background: rgba(100, 116, 139, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: transparent;
    color: #ef4444;
    border-color: #ef4444;
}

.btn-danger::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-danger:hover::before {
    opacity: 1;
}

.btn-danger:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-danger span,
.btn-danger i {
    position: relative;
    z-index: 1;
}

/* ============================================
   SECURITY SECTION
   ============================================ */

.security-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .security-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.security-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color, #667eea);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

body.dark-mode .security-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.security-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.security-item-info > i {
    font-size: 1.5rem;
    color: var(--primary-color, #667eea);
    width: 40px;
    text-align: center;
}

.security-icon-pulse {
    animation: icon-pulse 3s ease-in-out infinite;
}

.security-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.25rem 0;
}

body.dark-mode .security-item-info h4 {
    color: var(--text-primary, #f8fafc);
}

.security-item-info p {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

body.dark-mode .security-item-info p {
    color: var(--text-secondary, #94a3b8);
}

/* ============================================
   STATS GRID
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

body.dark-mode .stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color, #667eea);
    box-shadow: 
        0 12px 30px rgba(102, 126, 234, 0.15),
        0 0 30px rgba(102, 126, 234, 0.1);
}

body.dark-mode .stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(102, 126, 234, 0.2);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.stat-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .stat-content h4 {
    color: var(--text-secondary, #94a3b8);
}

.stat-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0;
}

body.dark-mode .stat-content p {
    color: var(--text-primary, #f8fafc);
}

/* ============================================
   DANGER ZONE
   ============================================ */

.danger-section {
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.03) !important;
}

body.dark-mode .danger-section {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.danger-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(239, 68, 68, 0.08);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
}

body.dark-mode .danger-item {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-item:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateX(4px);
}

.danger-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ef4444;
    margin: 0 0 0.25rem 0;
}

.danger-item-info p {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

body.dark-mode .danger-item-info p {
    color: var(--text-secondary, #94a3b8);
}

/* ============================================
   MODAL GLASSMORPHISM
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.glass-modal {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.dark-mode .glass-modal {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-content {
    background: var(--background-primary, #ffffff);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .modal-content {
    background: var(--background-secondary, #1e293b);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

body.dark-mode .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

body.dark-mode .modal-header h3 {
    color: var(--text-primary, #f8fafc);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary, #94a3b8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #667eea);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

body.dark-mode .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   TOAST NOTIFICATIONS PREMIUM
   ============================================ */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 4px solid var(--primary-color, #667eea);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    max-width: 420px;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .toast {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(102, 126, 234, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    animation: icon-pulse 2s ease-in-out infinite;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 0.25rem;
}

body.dark-mode .toast-title {
    color: var(--text-primary, #f8fafc);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.5;
}

body.dark-mode .toast-message {
    color: var(--text-secondary, #94a3b8);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary, #94a3b8);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.toast-close:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #667eea);
    transform: rotate(90deg);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .profile-container {
        padding: 1rem 0 2rem;
    }
    
    .profile-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 20px;
    }
    
    .profile-avatar-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-username {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .security-item,
    .danger-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-edit,
    .btn-secondary,
    .btn-save,
    .btn-cancel,
    .btn-danger,
    .btn-back-dashboard {
        width: 100%;
        justify-content: center;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
    
    .header-right {
        margin-top: 1rem;
    }
}

/* ============================================
   PRINT
   ============================================ */

@media print {
    .sidebar,
    .top-header,
    .btn-edit,
    .btn-secondary,
    .btn-danger,
    .danger-section {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .profile-section {
        break-inside: avoid;
    }
}

/* ============================================
   CORRECTION HEADER - Bouton à droite (FORCE)
   ============================================ */

.top-header .header-content-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 2rem !important;
}

.top-header .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.top-header .header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important; /* Force à droite */
}

/* Mobile */
@media (max-width: 768px) {
    .top-header .header-content-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .top-header .header-right {
        width: 100% !important;
        margin-left: 0 !important;
    }
}