/* Variables globales */
:root {
    --primary-bg: #404040;
    --secondary-bg: #404040;
    --header-bg: #1a1a1a;
    --text-color: #fff;
    --accent-color: #4a90e2;
    --grid-bg: #454647;
    --card-bg: #1a1a1a ;
    --hover-color: #5a5a5a;
}

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

body {
    font-family: Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Principal */
.primary-header {
    background-color: var(--header-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    background-image: url('/images/logo.png');
    background-repeat: no-repeat;
    background-size: contain; /* Ajouté pour s'assurer que l'image s'adapte */
    width: 150px;
 height: 60px;
    margin-bottom:  -15px;
        margin-top:  -5px;
}

.logo a {
text-indent: -9999px;
      font-size: 30px;
    font-weight: bold;
    display: block;
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
    width: 200px;
}

.search-container input {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border-radius: 20px;
    border: none;
    background-color: var(--secondary-bg);
    color: var(--text-color);
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* Boutons et Notifications */
.upload-btn, .notifications {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}


/* Profil Utilisateur */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--secondary-bg);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 250px;
    display: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.user-profile:hover .profile-dropdown {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 8px 15px;
}
.user-info {
    padding: 10px 15px;
    border-bottom: 1px solid #fff;
    margin-bottom: 5px;
}

.user-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

.profile-dropdown a:hover {
    background-color: var(--hover-color);
}


/* Navigation des catégories */
.category-nav {
    background-color: var(--secondary-bg);
    padding: 10px 15px; /* Réduit le padding horizontal */
    display: flex;
    flex-wrap: wrap; /* Permet le retour à la ligne */
    justify-content: center;
    gap: 10px; /* Réduit l'espace entre les éléments */
    border-bottom: 1px solid #333;
}

.category-nav a {
    color: var(--text-color);
    padding: 6px 12px; /* Réduit le padding des liens */
    border-radius: 15px; /* Réduit légèrement le border-radius */
    transition: background-color 0.3s;
    font-size: 0.9rem; /* Réduit la taille du texte */
    white-space: nowrap; /* Empêche le texte de se couper */
}

/* Media query pour les écrans mobiles */
@media screen and (max-width: 768px) {
    .category-nav {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .category-nav a {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

.category-nav a:hover,
.category-nav a.active {
    background-color: var(--accent-color);
}

/* Contenu Principal */
.main-content {
    padding: 20px;
    background-color: var(--grid-bg);
    min-height: calc(80vh - 140px);
}


/* Media query pour les écrans mobiles */
@media screen and (max-width: 768px) {
    .main-content {
        padding: 12px; /* Réduit le padding sur mobile */
        min-height: calc(80vh - 100px); /* Ajuste la hauteur minimale */
    }
}

/* Pour les très petits écrans */
@media screen and (max-width: 480px) {
    .main-content {
        padding: 0px; /* Réduit encore plus le padding */
		 margin-left: -10px; 
        min-height: calc(80vh - 80px);
    }
}

/* Grille de vidéos */
.thumbnail-img {
       width: 100%;
         height: 100%;
     }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 10px;
    padding: 20px;
}

.video-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    aspect-ratio: 19/10;
    transition: transform 0.3s ease;
}


.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
       margin-top: -5px;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
   background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 50%,rgba(0,0,0,1) 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}



.video-card:hover .video-info {
    opacity: 1;
    transform: translateY(0);
}






/* buy*/


.buy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.buy-button:hover {
    background: -webkit-linear-gradient(90deg, #4fc3f7,#00bfa5);/* Chrome 10-25, Safari 5.1-6 */   
    background: linear-gradient(90deg, #4fc3f7,#00bfa5);/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */                                             
    transform: translateY(-2px);
}





/* Footer */
.footer {
    background-color: var(--header-bg);
    color: var(--text-color);
    text-align: center;
    padding: 15px;
    margin-top: auto;
}




/* Styles pour le modal de connexion */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
}

.modal-content {
    background-color: var(--secondary-bg);
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.login-form input {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: var(--primary-bg);
    color: var(--text-color);
}

.login-form button {
    padding: 10px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.login-form button:hover {
    background-color: #357abd;
}

.register-link {
    margin-top: 15px;
    text-align: center;
    color: var(--text-color);
}

.register-link a {
    color: var(--accent-color);
}



.error-message {
    background-color: #ff4444;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.login-btn {
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.login-btn:hover {
    background-color: #357abd;
}

/* Styles pour lregister */
        .register-container {
            max-width: 500px;
            margin: 50px auto;
            padding: 20px;
            background: var(--secondary-bg);
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 5px;
            color: var(--text-color);
        }
        
        .form-group input {
            width: 100%;
            padding: 10px;
            border: 1px solid #444;
            border-radius: 4px;
        }
        
        .error-message {
            color: #ff4444;
            margin-bottom: 15px;
            padding: 10px;
            background: rgba(255,68,68,0.1);
            border-radius: 4px;
        }
        
        .success-message {
            color: #00C851;
            margin-bottom: 15px;
            padding: 10px;
            background: rgba(0,200,81,0.1);
            border-radius: 4px;
        }
        
        .register-button {
            width: 100%;
            padding: 12px;
            background: var(--accent-color);
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        
        .register-button:hover {
            background: #357abd;
        }
        
        .login-link {
            text-align: center;
            margin-top: 15px;
        }
		
.stats-right {
      font-size:  18px;
    text-align: left;
     margin-top: -20px;
    margin-bottom: 2%;
    margin-left: 10%;
    display: flex;
    align-items: center;
    gap: 20px;
 
}

.video-back {
background: #fff;
    padding: 5px;
margin-bottom: 10%;
      box-shadow: 6px 6px 25px rgba(0, 0, 0, 0.9);
       border-radius: 8px;
    border: solid  1px #000;
}

.video-title {
	white-space: pre-line;
    font-size: 16px;
       margin-top: 10px;
    margin-bottom: 15px;
    text-align: center;
    color: black;
}

