/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    color: #262626;
}

i {
    cursor: pointer;
}

/* Structure principale */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 244px;
    height: 100vh;
    position: fixed;
    border-right: 1px solid #dbdbdb;
    padding: 20px;
    background-color: white;
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    padding-left: 10px;
}

.sidebar-header i {
    margin-right: 10px;
    color: #262626;
    min-width: 24px;
    font-size: 24px;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    padding: 12px 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-nav li:hover {
    background-color: #f2f2f2;
}

.sidebar-nav li.active {
    font-weight: 600;
}

.sidebar-nav li i {
    width: 24px;
    margin-right: 12px;
    font-size: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav li.logout {
    margin-top: 40px;
    color: #ed4956;
}

.nav-text {
    transition: all 0.3s ease;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text {
    display: none;
}

/* Contenu principal */
.main-content {
    margin-left: 244px;
    flex-grow: 1;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 72px;
}

.content-section {
    display: none;
    max-width: 935px;
    margin: 0 auto;
}

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

/* Section Profil */
.profile-header {
    display: flex;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 30px;
    border: 1px solid #dbdbdb;
    flex-shrink: 0;
}

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

.profile-info {
    flex-grow: 1;
    min-width: 250px;
}

.profile-info h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
}

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

.profile-stats .stat {
    text-align: center;
}

.profile-stats .stat strong {
    font-weight: 600;
    display: block;
}

.profile-bio {
    font-size: 16px;
    line-height: 1.5;
}

/* Slider Publicitaire */
.ads-slider-container {
    position: relative;
    margin-bottom: 40px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

.ads-slider {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.ad-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.ad-slide img {
    width: 100%;
    height: 280px;
    display: block;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slider-nav:hover {
    opacity: 1;
}

.slider-nav.prev-ad {
    left: 10px;
}

.slider-nav.next-ad {
    right: 10px;
}

/* Onglets */
.profile-tabs {
    display: flex;
    justify-content: center;
    border-top: 1px solid #dbdbdb;
    margin-bottom: 20px;
}

.profile-tabs .tab {
    padding: 16px 0;
    margin: 0 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #8e8e8e;
    position: relative;
}

.profile-tabs .tab.active {
    color: #262626;
    font-weight: 600;
}

.profile-tabs .tab.active::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #262626;
}

.profile-tabs .tab i {
    margin-right: 6px;
}

.tab-content {
    display: none;
}

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

/* Grille de photos */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.grid-item img, .grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.grid-item:hover img, .grid-item:hover video {
    transform: scale(1.03);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-overlay span {
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.photo-overlay i {
    margin-right: 5px;
}

.grid-item:hover .photo-overlay {
    opacity: 1;
}

/* Slider vertical */
.vertical-slider-container {
    position: relative;
    height: calc(100vh - 60px);
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
}

.vertical-slider {
    height: 100%;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

.vertical-slider::-webkit-scrollbar {
    display: none;
}

.slide {
    height: 100%;
    scroll-snap-align: start;
    position: relative;
}

.slide img, .slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
}

.slide-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.slide-actions button {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Popup de recherche */
.search-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.search-popup-content {
    position: relative;
    margin: 4% auto;
    background-color: #ffa;
    border-radius: 12px;
    width: 800px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: popupFadeIn 0.3s;
}

.search-popup-content form {
    overflow: hidden;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
}

.search-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-popup {
    font-size: 24px;
    cursor: pointer;
    color: #262626;
    background: none;
    border: none;
}

.search-body {
    padding: 16px;
}

.search-input-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e8e;
}

#search-input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 16px;
}

.search-results {
    padding: 10px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.result-category {
    margin-bottom: 20px;
}

.result-category h4 {
    font-size: 14px;
    color: #8e8e8e;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.result-item img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-info strong {
    font-weight: 600;
    font-size: 14px;
}

.result-info span {
    font-size: 12px;
    color: #8e8e8e;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 72px;
    }
    
    .sidebar-header h1, .nav-text {
        display: none;
    }
    
    .main-content {
        margin-left: 72px;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-tabs .tab {
        margin: 0 20px;
        font-size: 14px;
    }
    
    .profile-tabs .tab span {
        display: none;
    }
    
    .profile-tabs .tab i {
        margin-right: 0;
        font-size: 18px;
    }
    
    .vertical-slider-container {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 60px;
        padding: 10px;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 10px;
    }
    
    .profile-info h2 {
        font-size: 22px;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
}

/**********************************************************************************************************************/
/* Styles pour les pages d'authentification */
.auth-page {
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
}

.auth-card {
    background-color: white;
    border: 1px solid #dbdbdb;
    border-radius: 1px;
    padding: 20px 40px;
    margin-bottom: 10px;
    text-align: center;
}

.auth-header {
    margin-bottom: 20px;
}

.auth-header i {
    color: #262626;
    margin-bottom: 10px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
}

.auth-subtitle {
    color: #8e8e8e;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

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

.form-group {
    position: relative;
    margin-bottom: 10px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    background-color: #fafafa;
    font-size: 14px;
}

.form-group .show-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #8e8e8e;
}

.auth-btn {
    width: 100%;
    padding: 8px;
    background-color: #0095f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 10px;
    cursor: pointer;
}

.auth-btn:hover {
    background-color: #0081e0;
}

.auth-separator {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #8e8e8e;
    font-size: 13px;
    font-weight: 600;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dbdbdb;
}

.auth-separator::before {
    margin-right: 10px;
}

.auth-separator::after {
    margin-left: 10px;
}

.facebook-login {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #385185;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
    text-decoration: none;
}

.facebook-login i {
    margin-right: 8px;
    font-size: 18px;
}

.forgot-password {
    color: #00376b;
    font-size: 12px;
    text-decoration: none;
    display: block;
    text-align: center;
}

.auth-terms {
    color: #8e8e8e;
    font-size: 12px;
    line-height: 1.4;
    margin: 15px 0;
    text-align: center;
}

.auth-terms a {
    color: #8e8e8e;
    font-weight: 600;
    text-decoration: none;
}

.auth-redirect {
    background-color: white;
    border: 1px solid #dbdbdb;
    border-radius: 1px;
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-redirect a {
    color: #0095f6;
    font-weight: 600;
    text-decoration: none;
}

.auth-apps {
    text-align: center;
    margin-top: 20px;
}

.auth-apps p {
    font-size: 14px;
    margin-bottom: 15px;
}

.app-stores {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.app-stores img {
    height: 40px;
}

/* Responsive */
@media (max-width: 450px) {
    .auth-card {
        padding: 20px;
        border: none;
        background-color: transparent;
    }
    
    .auth-redirect {
        border: none;
    }
}