/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
text-decoration: none;
}

body {

background: linear-gradient(140deg,#f4f4f4, 85%, #6a1b9a);
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: white;
    display: flex;
    min-height: 100vh;
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
background: url(bgAll.webp) fixed;
background-size: cover;
}

/* Sidebar */
.sidebar {
   width: 250px;
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border-right: 2px solid rgb(255, 255, 255, 0.3);
    backdrop-filter: blur(35px);
    background: transparent;
}

.sidebar-header h2 {
    font-size: 24px;
    margin-bottom: 30px;
}

.sidebar-nav ul {
    list-style: none;
    margin-top: 40px;
}

.sidebar-nav ul li {
    margin: 15px 0;
}

.sidebar-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px;
    display: block;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-nav ul li a:hover {
    background-color: #8e24aa;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    width: 100%;
    padding: 20px;
}

.header {

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(35px);
    background: transparent;
}

.header-logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
}
.header-search {
    display: flex;
    justify-content: space-between;  /* Aligne les éléments à gauche et à droite */
    align-items: center;  /* Centrage vertical */
    width: 100%;
}

.header-search input {
    padding: 12px;
    width: 100%;  /* Permet à l'input de prendre toute la largeur disponible */
        border-radius: 25px;
    background: transparent;
    border: 2px solid rgb(255, 255, 255, 0.2);
    outline: none;
    font-size: 16px;
    transition: all 0.3s ease;
    color: white;
}

.header-search input:focus {
    border-color: #6a1b9a;
    box-shadow: 0 0 10px rgba(106, 27, 154, 0.3);
}

.header-search button {
    background-color: #6a1b9a;
    border: none;
    padding: 12px;
    border-radius: 50%;
    color: white;
    margin-left: 10px;
    cursor: pointer;
}

.header-right .user-icon a {
    font-size: 24px;
    color: #6a1b9a;
    margin-left: 20px;
    text-decoration: none;
}

.header-right .user-icon a:hover {
    color: #D6955B;
}


/* Footer */
footer {
    background-color: #6a1b9a;
    color: white;
    text-align: center;
    padding: 15px;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Mobile Navbar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border-top: 2px solid rgb(255, 255, 255, 0.3);
    backdrop-filter: blur(35px);
    background: transparent;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
}

.mobile-nav ul li {
    width: 50px;
    height: 50px;
}

.mobile-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.hamburger {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #6a1b9a;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 200;
}

.hamburger i {
    color: white;
    font-size: 24px;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
    .header-right .user-icon {
        display: none; /* Cache l'icône du login sur mobile */
    }
    .main-content {
        margin-left: 0px;
        width: 100%;
        padding: 20px;
    }
 /* Sidebar - Réduit et cache sur mobile */
    .sidebar {
        width: 70px;
        padding: 10px;
        position: fixed;
        z-index: 10;
    }

    .sidebar-header h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .sidebar-nav ul li a {
        font-size: 16px;
        padding: 8px;
    }

    /* Masque le texte dans la sidebar */
    .sidebar-nav ul li a i {
        font-size: 20px;
    }

    /* Header sur mobile */
    .header {
        padding: 10px;
        flex-direction: column;
        justify-content: flex-start;
    }

    .header-logo h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .header-right {
        justify-content: space-between;
        width: 100%;
        margin-top: 10px;
    }

    /* Barre de recherche */
    .header-search {
        width: 80%;  /* Réduit la largeur de la barre de recherche sur mobile */
    }

    .header-search input {
        width: calc(100% - 50px);  /* Laisser de l'espace pour le bouton */
    }

    .header-search button {
        margin-left: 10px;
    }

    .header-right .user-icon a {
        font-size: 30px;
    }

    .video-grid {
        grid-template-columns: 1fr; /* 1 seule colonne sur mobile */
        gap: 15px;
    }

    /* Modification de la hauteur des miniatures sur mobile */
    .video-thumbnail {
        height: 150px;  /* Miniature moins haute sur mobile */
    }
    .video-card {
        border-radius: 8px;
    }

   /* Mobile Navbar */
    .mobile-nav {
        display: block;
        z-index: 1;
    }

    /* Masquer la navbar classique */
    .sidebar {
        display: none;
    }

    /* Hamburger Menu */
    .hamburger {
        display: block;
    }

    footer {
        padding: 10px;
    }

    iframe{
        width: 100%;
    }
}

.logout-btn {
    background-color: #6a1b9a;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #8e24aa;
}

.logout-btn i {
    font-size: 20px;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 550px));
    gap: 20px;
    padding: 20px;
}

/* Vidéo Card */
.video-card {
    
    overflow: hidden;
   background: transparent;
    backdrop-filter: hue-rotate(-1deg) blur(35px);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgb(0 0 0 / 43%);
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px); /* Effet au survol */
}

/* Miniature vidéo */
.video-thumbnail {
    width: 100%;
    height: 200px;  /* Hauteur fixe de la miniature */
    object-fit: cover;  /* Couvre toute la zone sans déformer l'image */
    border-bottom: 1px solid #ddd;
}

/* Info de la vidéo */
.video-info {
    padding: 10px;
}

.video-info h3 {
    font-size: 16px;
    margin: 0;
    font-weight: bold;
}

.video-info p {
    font-size: 14px;
    color: #bdbbbb;
    margin-top: 5px;
}


/* Bouton de suppression */
.delete-btn-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.delete-btn {
    background-color: rgba(0, 0, 0, 0.7); /* Fond semi-transparent */
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
}

.delete-btn i {
    font-size: 14px;
}

.delete-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1); /* Agrandissement au survol */
}
.video-container {
    position: relative;
    width: 100%;  /* L'iframe occupe toute la largeur du conteneur */
    padding-top: 56.25%;  /* Ratio 16:9 (hauteur/largeur = 9/16) */
    background-color: #000; /* Facultatif : pour un fond noir autour de la vidéo */
    overflow: hidden;
}

/* L'iframe */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}




/* Style pour le bouton "Afficher plus" */
.load-more {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    background-color: #6a1b9a;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #8e24aa;
}
