/* Styles pour les profils utilisateurs */

.profile-layout {
    max-width: 1200px;
    margin: 0 auto;
}

/* En-tête du profil */
.profile-header {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-cover {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.cover-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.edit-cover-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.edit-cover-btn:hover {
    background: rgba(0,0,0,0.9);
}

.profile-info {
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.profile-avatar-section {
    position: relative;
    margin-top: -60px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #1877f2;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.profile-details {
    flex: 1;
}

.profile-name {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #1c1e21;
}

.profile-bio {
    font-size: 16px;
    color: #65676b;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #65676b;
    font-size: 14px;
}

.meta-item a {
    color: #1877f2;
    text-decoration: none;
}

.meta-item a:hover {
    text-decoration: underline;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #1c1e21;
}

.stat-label {
    font-size: 14px;
    color: #65676b;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #1877f2;
    color: white;
}

.btn-primary:hover {
    background: #166fe5;
}

.btn-secondary {
    background: #e4e6ea;
    color: #1c1e21;
}

.btn-secondary:hover {
    background: #d8dadf;
}

.follow-btn.following {
    background: #42b883;
}

.follow-btn.following:hover {
    background: #369870;
}

/* Navigation du profil */
.profile-nav {
    background: #fff;
    border-radius: 8px;
    padding: 0 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-nav .nav-item {
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #65676b;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.profile-nav .nav-item:hover {
    color: #1877f2;
    background: #f0f2f5;
}

.profile-nav .nav-item.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

/* Contenu du profil */
.profile-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.profile-main {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Section À propos */
.about-section {
    margin-bottom: 30px;
}

.about-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1c1e21;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #dadde1;
}

.info-label {
    font-weight: 600;
    color: #1c1e21;
}

.info-value {
    color: #65676b;
}

/* Grille de photos */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Grille d'amis */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.friend-item:hover {
    background: #e9ecef;
}

.friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-name {
    font-weight: 600;
    color: #1c1e21;
    text-decoration: none;
}

.friend-name:hover {
    text-decoration: underline;
}

.friend-mutual {
    font-size: 12px;
    color: #65676b;
}

/* Sidebar du profil */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1c1e21;
}

.recent-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.recent-photo {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

.recent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mutual-friends {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mutual-friend {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mutual-friend .friend-avatar {
    width: 40px;
    height: 40px;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dadde1;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1c1e21;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #65676b;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1c1e21;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dadde1;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar-section {
        margin-top: -40px;
        align-self: center;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions {
        justify-content: center;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .profile-nav {
        overflow-x: auto;
    }
    
    .profile-nav .nav-item {
        white-space: nowrap;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .friends-grid {
        grid-template-columns: 1fr;
    }
}
