/* Définition d'une largeur commune pour les sections */
.featured-video,
.search-bar,
.video-list {
    width: 50%;
    /* Tu peux ajuster ce pourcentage selon tes besoins */
    margin: 0 auto;
    /* Centre les sections */
}

/* Header */
.header_index {
    position: relative;
    width: 100%;
    height: 40vh;
    background-image: url('/static/images/bannerr.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.header_index::before {
    position: absolute;
    width: 100%;
    height: 100%;
    content: "";
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.header-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 50px;
}

.header-content h1 {
    color: #fff;
    font-weight: 900;
    font-size: 3em;
}

.header-content p {
    font-size: 18px;
    color: #fff;
    letter-spacing: 2px;
}

/* Section Vidéo Vedette */
.featured-video {
    padding: 20px 0;
    /* Ajoute un peu d'espace vertical */
}

.video-container {
    width: 100%;
    /* Adapté à la largeur définie par la section */
    height: 500px;
    position: relative;
    padding-top: 35%;
    /* Ajuster la hauteur de la vidéo */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Barre de recherche */
.search-bar {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

.search-bar input {
    width: 100%;
    /* Ajusté pour s'adapter à la largeur de la section */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
}

.search-bar button {
    padding: 10px;
    font-size: 16px;
    border: none;
    background-color: #333;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.search-bar button:hover {
    background-color: #555;
}

/* Liste de Vidéos */
.video-list {
    margin: 50px auto;
    text-align: start;
}

.video-list h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.videos-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.video-item {
    width: 300px;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-info {
    /* padding: 15px; */
    display: flex;
    flex-direction: column;
    align-items: start;
}

.video-info span {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.video-info p {
    color: #777;
    font-size: 11px;
}

/* Responsiveness */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2em;
    }

    .header-content p {
        font-size: 16px;
    }

    .featured-video,
    .search-bar,
    .video-list {
        width: 100%;
        /* Ajustement pour les écrans plus petits */
    }

    .video-container {
        padding-top: 45%;
    }

    .search-bar input {
        width: 100%;
    }

    .video-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5em;
    }

    .header-content p {
        font-size: 14px;
    }

    .featured-video,
    .search-bar,
    .video-list {
        width: 100%;
        /* Ajustement pour les très petits écrans */
        margin: 0;
    }

    .video-container {
        padding-top: 50%;
    }

    .search-bar input {
        width: 100%;
    }
}