/* 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%;

}

/* 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;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-top: 20px;
}

.video-card {

    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(-10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    width: 100%;
    height: auto;
    border-bottom: 4px solid #6a1b9a;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #6a1b9a;
}

.video-info p {
    font-size: 14px;
    color: #777;
}

/* 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;
z-index: 3;

    color: white;
    flex-direction: column;
    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: 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: 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;
    }

    /* Vidéos */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .video-card {
        border-radius: 8px;
    }

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

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

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

    footer {
        padding: 10px;
    }
}

.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;
}

/* Bannière de la chaîne */
.channel-banner {
    position: relative;
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
}

.channel-info {
    display: flex;
    align-items: center;
}

.profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    margin-right: 20px;
}

.channel-details h2 {
    margin: 0;
    font-size: 22px;
}

.channel-details p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #f0f0f0;
}

/* Grid des vidéos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.video-card {
    overflow: hidden;
    position: relative;
    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: scale(1.05);
}

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

.video-info {
    padding: 10px;
}

.video-info h3 {
    margin: 0;
    font-size: 16px;
    color: white;
}

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

.live-actions {
    margin: 20px 0;
    text-align: right;
}

.live-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6a1b9a;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

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

.live-btn i {
    margin-right: 5px;
}

.add-video {
    margin: 20px 0;
    text-align: right;
}

.add-video-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6a1b9a;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

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

.add-video-btn i {
    margin-right: 5px;
}
/* Style pour le bouton Personnaliser ma chaîne */
.customize-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6a1b9a; /* Couleur de fond (peut être modifiée selon ton design) */
    color: #fff; /* Couleur du texte */
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px; /* Bordure arrondie */
    margin-top: 15px;
    transition: background-color 0.3s, transform 0.2s; /* Transition pour l'effet de hover */
}

.customize-btn:hover {
    background-color: #8e24aa; /* Couleur de fond au survol */
    transform: scale(1.05); /* Légère augmentation de la taille du bouton au survol */
}

.customize-btn i {
    margin-right: 8px; /* Espacement entre l'icône et le texte */
}

/* Style du conteneur du bouton */
.customize-channel {
    text-align: center;
    margin-top: 20px;
}




.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 1;
}

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

.delete-btn:hover {
    background-color: rgba(255, 0, 0, 0.8); /* Rouge à l'état survolé */
}






.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 1; /* Au-dessus du contenu */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0); /* Couleur de fond */
    background-color: rgba(0, 0, 0, 0.4); /* Fond transparent */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.btn {
    margin-top: 1%;
    background-color: #8e24aa; /* Vert */
    color: white;
    padding: 10px 15px;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.btn:hover {
    background-color: #9b45b3;
}

.modal-content h2 {
    text-align: center;
    gap: 10px;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 100px;
}

.playlist-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: grayscale(1);
}

.playlist-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.playlist-info {
    padding: 10px;
    background-color: #fff;
    text-align: center;
}

.playlist-info h3 {
    font-size: 1rem;
    font-weight: bold;
    margin-top: -50px;
pointer-events: none;
}




.ajout-playlist {
    position: absolute;
    top: 10px;
    right: 50px;
    background-color: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 1;
}

.ajout-playlist i {
    font-size: 16px;
}

.ajout-playlist:hover {
    background-color: rgba(195, 0, 255, 0.8); /* Rouge à l'état survolé */
}






.close-modal:hover,
.close-modal:focus {
    color: #000; /* Change la couleur en noir au survol ou au focus */
    text-decoration: none;
}


/* Formulaire dans la modal */
.modal-content form {
    display: flex;
    flex-direction: column;
}

/* Sélecteur de playlist */
.modal-content select {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Bouton d'ajout */
.add-btn {
    background-color: #8e24aa;/* Couleur de ton thème */
    color: #fff; /* Texte blanc */
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.add-btn:hover {
    background-color: #9b54af; /* Couleur légèrement différente au survol */
}

/* Responsiveness */
@media (max-width: 600px) {
    .modal-content {
        width: 90%; /* Largeur réduite pour les petits écrans */
        max-width: 90% !important;
    }
}

.playlist-thumbnail :hover {

        transform: translateY(-50px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  
    cursor: pointer;
}
/* Style pour chaque vidéo */
.playlist-video-item {
     display: flex;
    align-items: center;
    gap: 15px; /* Espacement entre la miniature et le texte */
    background-color: #2a2a3f; /* Gris foncé */
    border-radius: 8px;
    padding: 10px;

}

/* Miniature des vidéos */
.playlist-video-thumbnail {
    width: 50%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.playlist-video-thumbnail:hover {
    transform: scale(1.05);
}

/* Titre des vidéos */
.playlist-video-item p {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
}

.playlist-video-item {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacement entre la miniature et le texte */
    background-color: #2a2a3f; /* Gris foncé */
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

}



/* Miniature de la vidéo */
.playlist-video-thumbnail {
    
    object-fit: cover;
    border-radius: 6px; /* Coins arrondis */
    flex-shrink: 0;
}

/* Titre de la vidéo */
.playlist-video-item h4 {
    margin: 0;
    font-size: 1em;
    color: #ffffff; /* Blanc pour le texte */
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3; /* Change 2 pour le nombre de lignes voulu */
    max-height: 4em;
    line-height: 2em;
}

/* Lien autour de l'élément vidéo */
.playlist-video-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}




/* Styles pour la modal */
.playlist-modal {
    display: none; /* Masquée par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Fond noir semi-transparent */
    backdrop-filter: blur(6px); /* Effet de flou */
}

.modal-content {
    position: relative;
    background: #1e1e2f; /* Fond noir profond */
    color: #ffffff; /* Texte blanc */
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    max-width: 40%;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease;
}

/* Animation pour l'ouverture de la modal */
@keyframes slideDown {
    from {
        transform: translateY(-30%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Bouton de fermeture */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #bb86fc; /* Violet lumineux */
}

/* Titre */
.modal-content h3 {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-size: 1.8em;
}

/* Conteneur des vidéos */
#playlist-videos-container {
    display: flex;
    flex-direction: column;
    gap: 15px;

    overflow-y: auto;
    padding-right: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Style des vidéos (placeholder) */
#playlist-videos-container div {
    background-color: #2a2a3f; /* Gris foncé */
    color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding-right: 70px;
}

#playlist-videos-container div:hover {

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Scroll personnalisé */
#playlist-videos-container::-webkit-scrollbar {
    width: 8px;
}

#playlist-videos-container::-webkit-scrollbar-thumb {
    background-color: #bb86fc; /* Violet lumineux */
    border-radius: 10px;
}

#playlist-videos-container::-webkit-scrollbar-thumb:hover {
    background-color: #d1a1fc; /* Violet encore plus clair */
}

#playlist-videos-container::-webkit-scrollbar-track {
    background: #1e1e2f; /* Fond noir profond */
}
.create-playlist-form{
    margin-top: 20px;
}
.description-label{
    margin-top: 20px;
}
.description-textarea{
    height: 100px;

}
.trash{
    position: absolute;
    margin-top: -75px;
    right: 50px;
    color: #f0f0f0;
}
@media (max-width: 600px) {
    .trash{
        position: absolute;
        margin-top: -55px;
        right: 50px;
        color: #f0f0f0;
    }
}