/**
 * Styles CSS pour les pages de profil ASSEMA
 * Respecte les codes couleur définis et utilise un minimum de dégradés
 */

/* ============================ VARIABLES CSS ============================ */
:root {
    --assema-primary: #2e5e4e;
    --assema-secondary: #88b04b;
    --assema-light: #f8f9fa;
    --assema-dark: #333;
    --assema-success: #28a745;
    --assema-warning: #ffc107;
    --assema-danger: #dc3545;
    --assema-info: #17a2b8;
    --assema-gray: #6c757d;
}

/* ============================ STYLES COMMUNS ============================ */

.profile-container,
.profile-edit-container,
.password-change-container {
    background: linear-gradient(135deg, var(--assema-light) 0%, #e9ecef 50%, #dee2e6 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.profile-header,
.profile-edit-header,
.password-change-header {
    background: linear-gradient(135deg, var(--assema-primary), var(--assema-secondary));
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(46, 94, 78, 0.3);
    text-align: center;
}

.profile-header::before,
.profile-edit-header::before,
.password-change-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="profile" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="2" fill="white" opacity="0.1"/><circle cx="5" cy="5" r="1" fill="white" opacity="0.05"/><circle cx="25" cy="25" r="1.5" fill="white" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23profile)"/></svg>');
    opacity: 0.3;
    animation: profileFloat 25s linear infinite;
}

@keyframes profileFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.profile-header-content {
    position: relative;
    z-index: 2;
}

.profile-title,
.profile-edit-title,
.password-change-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.profile-actions {
    position: relative;
    z-index: 2;
}

/* ============================ CARTES ============================ */

.profile-card,
.profile-edit-card,
.password-change-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-card:hover,
.profile-edit-card:hover,
.password-change-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.profile-card-header,
.profile-actions-header {
    background: linear-gradient(135deg, var(--assema-primary), var(--assema-secondary));
    color: white;
    padding: 1.5rem 2rem;
    border: none;
    position: relative;
}

.profile-actions-header {
    background: linear-gradient(135deg, var(--assema-gray), #495057);
}

.profile-card-header::after,
.profile-actions-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--assema-primary), var(--assema-secondary), var(--assema-primary));
}

.profile-actions-header::after {
    background: linear-gradient(90deg, var(--assema-gray), #495057, var(--assema-gray));
}

.profile-card-title,
.profile-actions-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.profile-actions-title {
    font-size: 1.2rem;
}

/* ============================ INFORMATIONS PROFIL ============================ */

.profile-info-row {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.profile-info-row:hover {
    background-color: rgba(46, 94, 78, 0.02);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-weight: 700;
    color: var(--assema-primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.profile-info-value {
    color: var(--assema-dark);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ============================ BADGES ============================ */

.profile-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-badge-primary {
    background: linear-gradient(135deg, var(--assema-primary), var(--assema-secondary));
    color: white;
}

.profile-badge-success {
    background: linear-gradient(135deg, var(--assema-success), #20c997);
    color: white;
}

.profile-badge-danger {
    background: linear-gradient(135deg, var(--assema-danger), #fd7e14);
    color: white;
}

.profile-badge-info {
    background: linear-gradient(135deg, var(--assema-info), #6f42c1);
    color: white;
}

/* ============================ BOUTONS ============================ */

.profile-btn,
.profile-edit-btn,
.password-change-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-edit-btn,
.password-change-btn {
    width: auto;
    padding: 1rem 2rem;
    margin-bottom: 0;
}

.profile-btn::before,
.profile-edit-btn::before,
.password-change-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.profile-btn:hover::before,
.profile-edit-btn:hover::before,
.password-change-btn:hover::before {
    left: 100%;
}

.profile-btn:hover,
.profile-edit-btn:hover,
.password-change-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.profile-btn-primary,
.btn-primary {
    background: linear-gradient(135deg, var(--assema-primary), var(--assema-secondary));
    color: white;
}

.profile-btn-warning,
.btn-warning {
    background: linear-gradient(135deg, var(--assema-warning), #fd7e14);
    color: white;
}

.profile-btn-info,
.btn-info {
    background: linear-gradient(135deg, var(--assema-info), #6f42c1);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--assema-gray), #495057);
    color: white;
}

.profile-btn i,
.profile-edit-btn i,
.password-change-btn i {
    margin-right: 0.5rem;
}

/* ============================ FORMULAIRES ============================ */

.profile-edit-form,
.password-change-form {
    padding: 2rem;
}

.form-label {
    font-weight: 700;
    color: var(--assema-primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.form-control {
    border: 2px solid rgba(46, 94, 78, 0.2);
    border-radius: 15px;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--assema-primary);
    box-shadow: 0 0 0 3px rgba(46, 94, 78, 0.1);
    background: white;
    transform: translateY(-2px);
}

.input-group .btn {
    border: 2px solid rgba(46, 94, 78, 0.2);
    border-left: none;
    background: rgba(46, 94, 78, 0.1);
    color: var(--assema-primary);
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background: var(--assema-primary);
    color: white;
    border-color: var(--assema-primary);
}

/* ============================ RESPONSIVE DESIGN ============================ */

@media (max-width: 768px) {
    .profile-container,
    .profile-edit-container,
    .password-change-container {
        padding: 1rem 0;
    }
    
    .profile-header,
    .profile-edit-header,
    .password-change-header {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .profile-title,
    .profile-edit-title,
    .password-change-title {
        font-size: 2rem;
    }
    
    .profile-actions {
        margin-top: 1rem;
    }
    
    .profile-info-row {
        padding: 1rem 1.5rem;
    }
    
    .profile-card-header,
    .profile-actions-header {
        padding: 1.2rem 1.5rem;
    }
    
    .profile-edit-form,
    .password-change-form {
        padding: 1.5rem;
    }
}

/* ============================ ANIMATIONS ============================ */

.profile-card,
.profile-actions-card,
.profile-edit-card,
.password-change-card {
    animation: slideInUp 0.6s ease-out;
}

.profile-actions-card {
    animation-delay: 0.2s;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================ AMÉLIORATIONS UX ============================ */

.profile-header:hover,
.profile-edit-header:hover,
.password-change-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(46, 94, 78, 0.4);
}

.profile-info-row {
    position: relative;
}

.profile-info-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--assema-primary), var(--assema-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-info-row:hover::before {
    opacity: 1;
}

/* ============================ ACCESSIBILITÉ ============================ */

.profile-btn:focus,
.profile-edit-btn:focus,
.password-change-btn:focus,
.form-control:focus {
    outline: 3px solid rgba(46, 94, 78, 0.3);
    outline-offset: 2px;
}

/* ============================ PRINT STYLES ============================ */

@media print {
    .profile-container,
    .profile-edit-container,
    .password-change-container {
        background: white;
        padding: 0;
    }
    
    .profile-header,
    .profile-edit-header,
    .password-change-header {
        background: var(--assema-primary);
        color: white;
        box-shadow: none;
    }
    
    .profile-card,
    .profile-edit-card,
    .password-change-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
