/* ===== PROFIL ANCIEN MEMBRE - OPTIMISÉ & RESPONSIVE ===== */
:root {
    --primary-gradient: linear-gradient(135deg, rgba(26,35,126,0.95) 0%, rgba(63,81,181,0.9) 100%);
    --primary-color: rgba(26,35,126,0.95);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
    --hover-shadow: 0 20px 60px rgba(26, 35, 126, 0.15);
}

body {
    background: #f8fafc;
}

/* Bannière Moderne comme Actualités */
.page-banner {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.9) 0%, rgba(183, 28, 28, 0.8) 100%),
                url('../media/slide2.png') center/cover;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.banner-content p {
    font-size: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.banner-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* Badges dans la bannière */
.profile-badge {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    transition: all 0.3s;
    font-size: 0.9rem;
}

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

.profile-badge i {
    font-size: 1em;
}

/* Photo Profil Circulaire */
.profile-avatar-wrapper {
    width: 200px;
    height: 200px;
    margin: -100px auto 40px;
    position: relative;
    z-index: 10;
}

.profile-avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid white;
    box-shadow: var(--card-shadow);
    background: white;
    position: relative;
    transition: transform 0.3s ease;
}

.profile-avatar-circle:hover {
    transform: scale(1.05);
}

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

.profile-avatar-initials {
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    font-weight: 800;
}

/* Actions */
.profile-action-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.profile-action-btn {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.profile-action-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(26, 35, 126, 0.3);
}

.profile-action-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 35, 126, 0.4);
}

.profile-action-btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.profile-action-btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Layout Principal */
.profile-main-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    padding: 60px 0;
    max-width: 1400px;
    margin: 0 auto;
}

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

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Cards Modernes */
.profile-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(26, 35, 126, 0.08);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.profile-card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    color: var(--primary-color);
    border-bottom: 2px solid rgba(26,35,126,0.1);
}

.profile-card-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-card-header h2 > span:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-card-header h2 i {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.profile-card-body {
    padding: 25px;
    background: white;
}

/* Bio */
.profile-bio-text {
    line-height: 1.8;
    color: #4a5568;
    font-size: 1.05rem;
    text-align: justify;
}

/* Info List - Responsive */
.profile-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-info-item {
    padding: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.profile-info-content {
    flex: 1;
    min-width: 0;
}

.profile-info-content h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-info-content p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Compétences - Responsive */
.profile-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-skill {
    padding: 10px 18px;
    background: linear-gradient(135deg, #f6f9ff 0%, #edf2ff 100%);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.profile-skill:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
}

/* Réalisations */
.profile-achievements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-achievement-item {
    padding: 16px 18px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

/* Galerie en Grille - Optimisée */
.profile-gallery-section {
    margin-top: 30px;
}

.gallery-count {
    background: var(--primary-gradient);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 25px;
}

.profile-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.profile-gallery-item:hover img {
    transform: scale(1.08);
}

.profile-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
    color: white;
    padding: 25px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.profile-gallery-item:hover .profile-gallery-overlay {
    transform: translateY(0);
}

.profile-gallery-overlay p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Lightbox Moderne */
.profile-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.96);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-lightbox.active {
    display: flex;
    opacity: 1;
}

.profile-lightbox-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
    width: 50px;
    height: 50px;
    line-height: 45px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.profile-lightbox-close:hover {
    color: #fff;
    background: rgba(255, 82, 82, 0.9);
    transform: rotate(90deg);
}

.profile-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 28px;
    cursor: pointer;
    padding: 20px 18px;
    transition: all 0.3s ease;
    z-index: 100001;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.profile-lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.profile-lightbox-prev {
    left: 30px;
}

.profile-lightbox-next {
    right: 30px;
}

.profile-lightbox-content {
    max-width: 90%;
    max-height: 85%;
    position: relative;
    text-align: center;
}

.profile-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.profile-lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 12px 20px;
    margin-top: 15px;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.profile-lightbox-counter {
    position: absolute;
    top: 25px;
    left: 40px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 100000;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 1200px) {
    .profile-main-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 40px 20px;
    }
    
    .profile-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .page-banner {
        padding: 80px 0 50px;
    }
    
    .banner-content h1 {
        font-size: 2.2rem;
    }
    
    .banner-content p {
        font-size: 1.1rem;
    }
    
    .banner-badges {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .profile-badge {
        width: 100%;
        justify-content: center;
    }
    
    .profile-avatar-wrapper {
        width: 160px;
        height: 160px;
        margin: -80px auto 30px;
    }
    
    .profile-avatar-initials {
        font-size: 3rem;
    }
    
    .profile-action-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .profile-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .profile-main-grid {
        padding: 30px 15px;
    }
    
    .profile-card-header,
    .profile-card-body {
        padding: 18px 20px;
    }
    
    .profile-card-header h2 {
        font-size: 1.2rem;
    }
    
    .profile-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 20px;
    }
    
    .profile-lightbox-close {
        top: 20px;
        right: 25px;
        font-size: 38px;
        width: 45px;
        height: 45px;
        line-height: 38px;
    }
    
    .profile-lightbox-nav {
        font-size: 24px;
        padding: 15px 12px;
        width: 50px;
        height: 50px;
    }
    
    .profile-lightbox-prev {
        left: 20px;
    }
    
    .profile-lightbox-next {
        right: 20px;
    }
    
    .profile-lightbox-counter {
        top: 20px;
        left: 25px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .profile-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }
    
    .profile-lightbox-close {
        top: 20px;
        right: 25px;
        font-size: 38px;
        width: 45px;
        height: 45px;
        line-height: 38px;
    }
    
    .profile-lightbox-nav {
        font-size: 24px;
        padding: 15px 12px;
        width: 50px;
        height: 50px;
    }
    
    .profile-lightbox-prev {
        left: 20px;
    }
    
    .profile-lightbox-next {
        right: 20px;
    }
    
    .profile-lightbox-counter {
        top: 20px;
        left: 25px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .profile-info-item {
        padding: 14px 0;
    }
    
    .profile-info-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .profile-info-content h4 {
        font-size: 0.8rem;
    }
    
    .profile-info-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-banner {
        padding: 60px 0 40px;
    }
    
    .banner-content h1 {
        font-size: 1.8rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
    
    .profile-avatar-wrapper {
        width: 140px;
        height: 140px;
        margin: -70px auto 25px;
    }
    
    .profile-avatar-initials {
        font-size: 2.5rem;
    }
    
    .profile-badge {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .profile-card-header h2 {
        font-size: 1.1rem;
    }
    
    .profile-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .profile-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 32px;
        width: 40px;
        height: 40px;
        line-height: 32px;
    }
    
    .profile-lightbox-nav {
        font-size: 20px;
        padding: 12px 10px;
        width: 45px;
        height: 45px;
    }
    
    .profile-lightbox-prev {
        left: 5px;
    }
    
    .profile-lightbox-next {
        right: 5px;
    }
    
    .profile-lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .profile-lightbox-content {
        max-width: 95%;
        max-height: 90%;
    }
    
    .profile-lightbox-content img {
        max-height: 70vh;
    }
    
    .profile-skill {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .profile-achievement-item {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}
