/* ======= GLOBAL ======= */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: linear-gradient(120deg, #f4f8fb 0%, #eaf1fb 100%);
    color: #333;
    /* color: red !important; */
    /* background: red !important; */
}


/* ======= MINI PLAYER ======= */
.mini-player {
    position: fixed;
    /* bottom: 20px; */
    top: 20px;
    right: 20px;
    width: 320px;
    height: 180px; /* 16:9 */
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background-color: #000;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

/* ======= SPINNER ======= */
/* #spinner {
    display: none;
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}
*/


/* Spinner centré plein écran */
#spinner-fullscreen {
  display: none; /* masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Style du spinner circulaire */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db; /* couleur du haut */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

input.error {
    color: red;
    font-style: italic;
}

/* Animation de rotation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




/* ======= BUTTON STYLE (FOR INPUTS) ======= */
input[type=button],
input[type=submit],
input[type=reset] {
    background-color: #5b616a;
    border: none;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    display: inline-block;
    text-align: center;
    border-radius: 8px;
}

/*********************************************/
/* ======= BUTTON STYLE (FOR INPUTS) ======= */
/*********************************************/

.searchButton {
    background-color: #3a7bd5;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.searchButton:hover {
    background-color: #356ac3;
    transform: translateY(-1px);
}

.searchButton:focus {
    outline: 2px solid #285a99; /* bleu foncé adapté */
    outline-offset: 2px;
    background-color: #285a99;
}

.sort-buttons {
    display: flex;
    gap: 10px;
    align-self: center;
}

.sort-button {
    background-color: #3a7bd5; /* Même couleur de fond */
    color: white; /* Même couleur de texte */
    border: none; /* Supprime les bordures */
    padding: 10px 18px; /* Même padding */
    border-radius: 8px; /* Même bordure arrondie */
    font-size: 14px; /* Même taille de police */
    cursor: pointer; /* Même curseur */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Même ombre */
    transition: background-color 0.3s ease, transform 0.1s ease; /* Même transition */
}

.sort-button:hover {
    background-color: #356ac3; /* Même couleur au survol */
    transform: translateY(-1px); /* Même effet de survol */
}

.sort-button:focus {
    outline: 2px solid #285a99; /* Même contour au focus */
    outline-offset: 2px;
    background-color: #285a99; /* Même couleur au focus */
}

.sort-button:active {
    transform: scale(0.97); /* Même effet au clic */
}

.sort-button.active-sort {
    background-color: #1e4e8c; /* Couleur spécifique pour l'état actif */
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 78, 140, 0.15); /* Ombre spécifique pour l'état actif */
    font-weight: bold; /* Texte en gras pour l'état actif */
}

.searchButton, .sort-button {
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.08);
}
.searchButton:active, .sort-button:active {
    transform: scale(0.97);
}



/* ******************************************************************************/
/* RESIZE WORDPRESS & HEADER */
/* ******************************************************************************/


/* Enlève les marges sur les côtés du conteneur principal */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 92%;
    margin-left: auto;
    margin-right: auto;
}

/* Réduit la hauteur du logo */
.elementor-element-99e77aa img {
    max-height: 35px !important;
    height: auto !important;
    width: auto !important;
    display: block;
}

/* Réduit les paddings de la section du header */
.elementor-element-2f54be75 {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    min-height: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

/* Force la section header à être compacte */
.elementor-location-header {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    min-height: 0px !important;
}

/* Réinitialise tous les conteneurs internes */
.elementor-location-header .elementor-container,
.elementor-location-header .elementor-row {
    min-height: 0px !important;
    height: auto !important;
    align-items: center !important;
}

/* Réduit les marges/paddings des widgets */
.elementor-location-header .elementor-widget {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Élimine les marges internes des colonnes */
.elementor-column {
    padding: 0 !important;
}

/* Aligne verticalement les éléments du menu */
.elementor-nav-menu {
    align-items: center !important;
    display: flex !important;
    height: 100% !important;
}

/* Ajuste les items du menu */
.elementor-nav-menu .elementor-item {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 1.2 !important;
}

/* Réduit les paddings autour du widget menu */
.elementor-widget-nav-menu {
    padding: 0 !important;
    margin: 0 !important;
}







/* ******************************************************************************/
/* RESIZE HEADER (RESPONSIVE) */
/* ******************************************************************************/


@media (max-width: 1024px) {
    /* Logo un peu plus petit sur tablette */
    .elementor-element-99e77aa img {
        max-height: 30px !important;
    }

    /* Paddings réduits sur la section du header */
    .elementor-element-2f54be75 {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    /* Espacement des items de menu réduits */
    .elementor-nav-menu .elementor-item {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

@media (max-width: 767px) {
    /* Logo encore plus petit sur mobile */
    .elementor-element-99e77aa img {
        max-height: 25px !important;
    }

    /* Paddings très compacts sur mobile */
    .elementor-element-2f54be75 {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    /* Réduction du padding des éléments de menu */
    .elementor-nav-menu .elementor-item {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    /* Menu burger : alignement vertical centré si nécessaire */
    .elementor-nav-menu {
        align-items: center !important;
    }
}









/* ******************************************************************************/
/* ======= DISPOSITION DES ÉLÉMENTS EN SECTIONS ======= */
/* ******************************************************************************/

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
      box-sizing: border-box;
}



.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch; /* <-- Ajoute ceci */
    /* Surtout PAS de overflow caché ici ! */
    background: #fff;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.06);
    border-radius: 12px;
    padding: 8px;
    min-width: 0;          /* <<< nécessaire en grid pour éviter les débordements */
    overflow-wrap: break-word;
      box-sizing: border-box;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    background: #fff;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.06);
    border-radius: 12px;
    padding: 8px;
    min-width: 0;
    overflow-wrap: break-word;
    box-sizing: border-box;

}


.search-bar {
    display: flex;
    flex-wrap: nowrap; /* Garde toujours sur la même ligne */
    gap: 8px; /* Espace réduit pour mobile */
    align-items: stretch; /* Aligne la hauteur des éléments */
}

/* Assure que la boîte de texte et les boutons restent sur la même ligne en desktop */
@media (min-width: 768px) {
    .search-bar {
        gap: 12px; /* Espacement plus généreux sur desktop */
    }
    
    .search-bar .boitetexte {
        flex: 1; /* La boîte de texte prend l'espace disponible */
        min-width: 200px; /* Largeur minimale pour éviter que ce soit trop petit */
    }
    
    .search-bar .searchButton {
        flex-shrink: 0; /* Les boutons gardent leur taille */
        white-space: nowrap; /* Empêche le texte des boutons de se couper */
    }
}

.filters {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 12px;
    max-height: 380px; /* Augmenté pour contenir .filters-content */
    /* overflow-y: auto; */
    /* overflow-x: hidden; */
    /* Position sticky supprimée car les filtres sont maintenant entre search et video */
    /* position: sticky; */
    /* top: 320px; */
    margin-top: 0; /* Géré par .filters-collapsible */
    /* z-index: 5; */
}

/* ======= VIDEO SECTION ======= */
.video-details {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 16px 0;
    font-weight: 400;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-style: normal;
    text-align: left;
    line-height: 1.4;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-details::before {
    /* emoji removed per request */
    content: none;
}

.result-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    width: 100%;
    top: 10px;
    margin: auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#hls-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

}




.video-js .vjs-volume-menu-button {
    display:none;
    background-color: red;
}

.video-js.vjs-fullscreen .vjs-volume-menu-button {
    display:block;
    background-color: red;
}

.vjs-volume-panel {
    display: none !important;
}

.video-js .vjs-remaining-time {
    display: none;
}

.video-js .vjs-current-time {
  display: block !important;
}

.video-js .vjs-duration {
  display: none;
}

.video-js .vjs-time-divider {
  display: none;
}






.video-player {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    aspect-ratio: 16 / 9;
    max-height: 335px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: box-shadow 0.3s ease, top 0.3s ease;
}

@media (max-width: 576px) {
    .video-player {
        position: sticky;
        top: 0;
        z-index: 100;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        background: #fdfdfd;
        width: 100%;
        left: 0;
        right: 0;
        margin: 0 auto;
        max-height: 56vw; /* 16:9 ratio */
        aspect-ratio: 16/9;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    #hls-player {
        width: 100% !important;
        height: auto !important;
        max-height: 56vw !important;
        aspect-ratio: 16/9;
        position: static !important;
    }
    .left-column {
        overflow: visible !important;
    }
}













/* ======= RESULTS SECTION ======= */

/* ======= RESULT ITEM ======= */

.result-card {
    width: 100%;
    padding: 8px 12px;
    background-color: #f3f6fb;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    margin-bottom: 2px;
}

.result-card:hover {
    background-color: #e6f0fa;
    box-shadow: 0 4px 16px rgba(0, 123, 213, 0.10);
    transform: translateY(-3px) scale(1.02);
}

.result-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f1f5f9;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.result-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3a7bd5, #f59e0b, #10b981);
    border-radius: 12px 12px 0 0;
}





.custom-video-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2d3d;
}

.custom-video-title {
    font-size: clamp(1.2rem, 2.5vw, 24px);
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    padding: 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    display: block;
    position: relative;
}

.custom-video-title::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, #3a7bd5 0%, #2b6cb0 100%);
    border-radius: 1px;
}


input[type="text"], input[type="search"] {
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 16px;
    box-shadow: 0 1px 4px rgba(58, 123, 213, 0.04);
    transition: border-color 0.2s;
}
input[type="text"]:focus, input[type="search"]:focus {
    border-color: #3a7bd5;
    outline: none;
}

/* *********************************************************************************************** */
/* *********************************************************************************************** */
/* *********************************************************************************************** */
/* ************************************************ RESPONSIVE *********************************** */
/* *********************************************************************************************** */
/* *********************************************************************************************** */
/* *********************************************************************************************** */


/* ======= RESPONSIVE MOBILE DE BASE (max-width: 576px) ======= */

@media (max-width: 576px) {

    body {
        font-size: 15px;
        /* padding: 0 10px; */
    }

    .custom-video-title {
        font-size: 1rem;
        font-weight: 600;
        color: #1f2d3d;
    }

    .content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .left-column .right-column {
        gap: 10px;
    }

    .search-bar {
        gap: 6px; /* Espacement réduit pour mobile */
    }
    
    .search-bar .boitetexte {
        flex: 1; /* La boîte de texte prend l'espace disponible */
        min-width: 0; /* Permet à l'input de se rétrécir si nécessaire */
        font-size: 14px; /* Taille de police légèrement réduite pour mobile */
    }
    
    .search-bar .searchButton {
        flex-shrink: 0; /* Les boutons gardent leur taille */
        white-space: nowrap; /* Empêche le texte des boutons de se couper */
        padding: 8px 12px; /* Padding réduit pour mobile */
        font-size: 14px; /* Taille de police cohérente */
    }

    .mini-player {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        top: 10px;
        right: 0;
        left: 0;
        margin: auto;
        border-radius: 0;
    }

    .video-section {
        border-radius: 8px;
        padding: 10px;
    }

    /*
    .video-player {
        border-radius: 8px;
        padding: 0;
        box-shadow: none;
        border: none;
    }
*/
    .filters {
        padding: 8px;
        font-size: 14px;
        max-height: 360px; /* Augmenté pour contenir .filters-content sur mobile */
        /* Position static conservée car plus de problème avec la nouvelle organisation */
        position: static;
        top: auto;
        margin-top: 0; /* Géré par .filters-collapsible */
    }

    .sort-buttons {
        flex-direction: row;
        gap: 0;
        width: 100%;
        justify-content: space-between;
    }

    .sort-button {
        flex: 1 1 auto;
        min-width: 90px;
        border-radius: 12;
        border-right: 1px solid #fff;
        white-space: nowrap;
        padding-left: 0;
        padding-right: 0;
    }

    .sort-button:last-child {
        border-right: none;
    }

    .result-card {
        padding: 10px;
    }

    .elementor-nav-menu {
        flex-direction: column !important;
    }

    .elementor-nav-menu .elementor-item {
        padding: 6px 0 !important;
    }
}

#error-message {
    color: #d32f2f;
    background: #fdeaea;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 15px;
    display: none;
}

/* SUPPRIMÉ - Remplacé par les nouveaux styles plus bas */

/* SUPPRIMÉ - Remplacé par les nouveaux styles plus bas */

/* SUPPRIMÉ - Gestion des couleurs maintenant dans .collections-btn */

/* Animation de succès pour les boutons */
.collections-btn.success-animation {
    animation: success-pulse 0.6s ease;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    }
    100% {
        transform: scale(1);
    }
}

.collections-btn.success-animation.uncheckAll {
    animation: warning-pulse 0.6s ease;
}

@keyframes warning-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
    }
    100% {
        transform: scale(1);
    }
}

/* Icônes dans les boutons */
.collections-btn i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.collections-btn:hover i {
    transform: scale(1.1);
}

/* SUPPRIMÉ - Conflit avec les nouveaux styles .collections-header */

@media (max-width: 480px) {
    .collections-header {
        gap: 8px; /* Espacement réduit sur très petits écrans */
    }
    
    .collections-title {
        font-size: 16px; /* Réduire la taille du titre */
    }
    
    .collections-btn {
        padding: 8px 10px; /* Padding encore plus compact */
        font-size: 13px;
        min-width: 100px; /* Largeur minimale ajustée */
        max-width: 140px; /* Largeur maximale ajustée */
    }
}

/* ======= AMÉLIORATIONS DES LABELS DE COLLECTIONS ======= */

.collection-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 32px;
}

.collection-label:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #eef5ff 100%);
    border-color: #c5d4ed;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.collection-label:has(input:checked) {
    background: linear-gradient(135deg, #e8f4fd 0%, #d6edff 100%);
    border-color: #3a7bd5;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.1);
}

.collection-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #3a7bd5;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.collection-label label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
    color: #2d3748;
    font-size: 13px;
    line-height: 1.2;
    user-select: none;
    margin: 0;
    padding: 0;
}

.collection-label:has(input:checked) label {
    color: #2b6cb0;
    font-weight: 600;
}

/* ======= ANIMATIONS ET MICRO-INTERACTIONS SUPPLÉMENTAIRES ======= */

/* Animation d'apparition progressive pour les résultats */
.result-item {
    opacity: 1; /* Visible par défaut */
    transform: translateY(0);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid #e8f0fe;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.06);
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(58, 123, 213, 0.12);
    border-color: #c5d4ed;
}

/* Animation optionnelle d'apparition */
.result-item.fade-in-animation {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.result-item.fade-in-animation:nth-child(1) { animation-delay: 0.1s; }
.result-item.fade-in-animation:nth-child(2) { animation-delay: 0.2s; }
.result-item.fade-in-animation:nth-child(3) { animation-delay: 0.3s; }
.result-item.fade-in-animation:nth-child(4) { animation-delay: 0.4s; }
.result-item.fade-in-animation:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration des cartes de résultats */
.result-card {
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
    color: #374151;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    transform: translateX(4px);
    background: #fffbeb;
    border-left-color: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    border-color: #fbbf24;
}

.result-card:active {
    transform: translateX(2px);
    background: #fef3c7;
}

.result-card::before {
    /* emoji removed per request */
    content: none;
}

/* Animation de pulse pour les icônes importantes */
@keyframes pulse-gentle {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.animated-pulse {
    animation: pulse-gentle 2s ease-in-out infinite;
}

/* États de focus améliorés pour l'accessibilité */
button:focus-visible,
input:focus-visible,
.result-card:focus-visible {
    outline: 3px solid rgba(58, 123, 213, 0.4);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgba(58, 123, 213, 0.2);
}

/* Animation de chargement pour le champ de recherche */
.boitetexte.searching {
    background: linear-gradient(90deg, #f8f9ff 0%, #eef5ff 50%, #f8f9ff 100%);
    background-size: 200% 100%;
    animation: searching-glow 1.5s ease-in-out infinite;
}

@keyframes searching-glow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Améliorations des boutons de recherche */
.search-button-with-badge {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-button-with-badge:hover .search-button-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-button-with-badge:active .search-button-badge {
    transform: scale(0.95);
}

/* ======= BADGES DE RECHERCHE AMÉLIORES ======= */
.search-button-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    color: #3a7bd5;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e0e0e0;
}

.search-button-badge.semantic {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 2px 8px rgba(78, 205, 196, 0.4), 0 0 20px rgba(78, 205, 196, 0.2);
    }
}

.search-button-badge.exact {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    border: none;
}

/* Boutons de recherche avec position relative pour les badges */
.search-button-with-badge {
    position: relative;
}

/* ======= INTERFACE POUR UTILISATEURS NON CONNECTÉS ======= */

/* Section de connexion requise */
.login-required-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 2px solid #e8f0fe;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin: 0px 0px;
    box-shadow: 0 8px 32px rgba(58, 123, 213, 0.08);
    position: relative;
    overflow: hidden;
}

.login-required-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3a7bd5, #4f8de8, #6b9df0);
    background-size: 200% 100%;
    animation: gradient-flow 3s ease-in-out infinite;
}

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.login-description {
    color: #5a6c7d;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 24px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.login-button {
    background: linear-gradient(135deg, #3a7bd5 0%, #4f8de8 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(58, 123, 213, 0.2);
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(58, 123, 213, 0.3);
    background: linear-gradient(135deg, #356ac3 0%, #4680e0 100%);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.2);
}

.login-button:focus {
    outline: 3px solid rgba(58, 123, 213, 0.3);
    outline-offset: 2px;
}

.login-help {
    color: #7a8794;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.signup-link {
    color: #3a7bd5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: #2866c0;
    text-decoration: underline;
}

/* Message d'accueil dans la zone de résultats */
.no-results-message {
    background: linear-gradient(135deg, #f8f9ff 0%, #eef5ff 100%);
    border: 2px dashed #c5d4ed;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    color: #5a6c7d;
    /* margin: 20px 0; */
}

.no-results-icon {
    margin-bottom: 20px;
}

.no-results-message h3 {
    color: #4a5568;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.no-results-message p {
    color: #718096;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* États désactivés pour les éléments de recherche */
.boitetexte:disabled {
    background: linear-gradient(135deg, #f1f3f7 0%, #e8ecf2 100%);
    color: #a0aec0;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.searchButton:disabled {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #718096;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.searchButton:disabled:hover {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    transform: none;
    box-shadow: none;
}

/* Tooltip pour les éléments désactivés */
.disabled-tooltip {
    position: relative;
    cursor: help;
}

.disabled-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    margin-bottom: 8px;
}

.disabled-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #2d3748;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    margin-bottom: 4px;
}

.disabled-tooltip:hover::after,
.disabled-tooltip:hover::before {
    opacity: 1;
}

/* Masquage intelligent des éléments */
.hidden-for-non-logged {
    display: none !important;
}

.filters-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.3);
    position: relative;
    overflow: hidden;
}

.filters-toggle-btn:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #00a8cc 100%);
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.4);
    transform: translateY(-1px);
}

.filters-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(58, 123, 213, 0.3);
}

.filters-toggle-btn.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: linear-gradient(135deg, #2c5aa0 0%, #00a8cc 100%);
    margin-bottom: 0; /* Connexion visuelle avec le contenu */
}

.filters-toggle-icon {
    font-size: 18px;
    margin-right: 8px;
}

.filters-toggle-text {
    flex: 1;
    text-align: left;
    margin-left: 4px;
}

.filters-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.filters-chevron {
    font-size: 14px;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.filters-toggle-btn.expanded .filters-chevron {
    transform: rotate(180deg);
}

.filters-content {
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 10px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 280px; /* Réduit pour rester dans le conteneur .filters */
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideDown 0.3s ease-out;
    /* margin-bottom: 20px; /* Espacement avec le video-player */
}

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

/* ======= MOBILE ADAPTATIONS POUR FILTRES ======= */
@media (max-width: 768px) {
    /*.filters-collapsible {
        margin-top: 12px;
        margin-bottom: 16px;
    }
    */
    .filters-toggle-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .filters-toggle-icon {
        font-size: 16px;
        margin-right: 6px;
    }
    
    .filters-toggle-text {
        margin-left: 2px;
    }
    
    .filters-badge {
        padding: 2px 6px;
        font-size: 11px;
        margin-left: 6px;
    }
    
    .filters-content {
        padding: 12px;
        max-height: 200px; /* Encore réduit pour éviter tout débordement sur mobile */
        margin-bottom: 16px;
    }
    
    /* Badge toujours affiché avec le texte "Modules" visible */
    @media (max-width: 480px) {
        .filters-toggle-btn {
            justify-content: space-between; /* Garder l'espacement entre les éléments */
        }
        
        .filters-badge {
            margin-left: 4px;
        }
    }
}

/* ======= STYLES POUR LES BOUTONS DE COLLECTION ======= */
.collections-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.collections-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1; /* Les boutons prennent la même largeur */
    justify-content: center;
    text-align: center;
    min-width: 0; /* Important pour permettre la compression */
    white-space: nowrap; /* Évite le retour à la ligne du texte */
}

/* Styles spécifiques pour "Tout cocher" */
#checkAllCollections {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.2);
}

#checkAllCollections:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* Styles spécifiques pour "Tout décocher" */
#uncheckAllCollections {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.2);
}

#uncheckAllCollections:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.collections-btn:active {
    transform: translateY(1px);
}

.collections-btn i {
    font-size: 12px;
}

/* Animation de succès pour les boutons */
.collections-btn.success-animation {
    background: #10b981;
    border-color: #10b981;
    color: white;
    transform: scale(1.05);
}

.collections-btn.success-animation.uncheckAll {
    background: #f59e0b;
    border-color: #f59e0b;
}

/* Mobile : s'assurer que les boutons restent sur la même ligne */
@media (max-width: 768px) {
    .collections-header {
        flex-wrap: nowrap; /* Force les boutons à rester sur la même ligne */
        gap: 6px;
    }
    
    .collections-btn {
        font-size: 13px;
        padding: 6px 10px;
        min-width: 0; /* Permet aux boutons de se rétrécir si nécessaire */
    }
}

@media (max-width: 480px) {
    .collections-header {
        gap: 4px;
    }
    
    .collections-btn {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .collections-btn i {
        font-size: 11px;
    }
}

/* ======= STYLES POUR CONNEXION GOOGLE SOCIAL LOGIN ======= */

/* Container pour les options de connexion sociale */
.social-login-container {
    /* margin-bottom: 20px; */
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-login-item {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Bouton Google custom avec icône SVG */
.google-login-btn {
    background: #ffffff;
    border: 2px solid #dadce0;
    border-radius: 12px;
    color: #3c4043;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
    height: 48px;
    min-width: 220px;
    padding: 0 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.google-login-btn:hover {
    background: #f8f9fa;
    border-color: #c1c7cd;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.google-login-btn:active {
    background: #f1f3f4;
    border-color: #5f6368;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.google-login-btn:focus {
    outline: 3px solid rgba(66, 133, 244, 0.3);
    outline-offset: 2px;
}

/* Icône Google SVG */
.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Animation de chargement pour le bouton Google */
.google-login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.google-login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style alternatif avec dégradé Google (option) */
.google-login-btn.gradient-style {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 25%, #fbbc05 50%, #ea4335 75%);
    color: white;
    border: none;
}

.google-login-btn.gradient-style:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2d8f47 25%, #f9ab00 50%, #d73527 75%);
}

/* Divider entre les options de connexion */
.login-divider {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
}

.divider-text {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 0 16px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Bouton de connexion classique (secondaire) */
.login-button.secondary {
    background: linear-gradient(135deg, #64748b 0%, #7e8fa3 100%);
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.15);
}

.login-button.secondary:hover {
    background: linear-gradient(135deg, #525e73 0%, #6b7d94 100%);
    box-shadow: 0 6px 24px rgba(100, 116, 139, 0.25);
}

/* Amélioration responsive pour mobile */
@media (max-width: 768px) {
    .google-login-btn {
        min-width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .login-actions {
        padding: 0 10px;
    }
    
    .login-button {
        width: 100%;
        max-width: 280px;
    }
}

/* Animation pour les éléments de connexion */
.login-required-section .login-actions > * {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.login-required-section .social-login-container {
    animation-delay: 0.1s;
}

.login-required-section .login-divider {
    animation-delay: 0.2s;
}

.login-required-section .login-button.secondary {
    animation-delay: 0.3s;
}

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

/* Amélioration de l'accessibilité */
.google-login-btn:focus-visible {
    outline: 3px solid rgba(66, 133, 244, 0.5);
    outline-offset: 2px;
}

/* Style pour le texte du bouton */
.google-login-btn span {
    font-weight: 500;
    letter-spacing: 0.25px;
}

/* ======= CHAPITRES VIDÉO ======= */
.video-chapters {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: sticky;
    top: 360px; /* Positionné sous le video-player sticky */
    z-index: 8;
    max-height: calc(100vh - 380px);
}

.chapters-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
}

.chapters-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapters-title i {
    color: #3a7bd5;
    font-size: 14px;
}

.chapters-count {
    background: #3a7bd5;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.chapters-list {
    max-height: calc(100vh - 460px);
    overflow-y: auto;
    padding: 8px 0;
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 8px;
    margin: 4px 8px;
}

.chapter-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-left-color: #3a7bd5;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.1);
}

.chapter-item.active {
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    border-left-color: #3a7bd5;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.15);
}

.chapter-time {
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.chapter-item.active .chapter-time {
    background: #3a7bd5;
    color: white;
}

.chapter-title {
    flex: 1;
    color: #374151;
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
}

.chapter-item.active .chapter-title {
    color: #1e3a8a;
}

.chapter-order {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: right;
    flex-shrink: 0;
}

.chapter-item.active .chapter-order {
    color: #3a7bd5;
}

/* Animation d'apparition */
.video-chapters.show {
    animation: slideInDown 0.3s ease-out;
}

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

/* Responsive mobile */
@media (max-width: 576px) {
    .video-chapters {
        margin-top: 10px;
        border-radius: 8px;
        position: sticky;
        top: calc(56vw + 10px);
        z-index: 90;
        max-height: calc(100vh - 56vw - 30px);
    }
    
    .chapters-header {
        padding: 10px 12px;
    }
    
    .chapters-title {
        font-size: 14px;
    }
    
    .chapter-item {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .chapter-time {
        font-size: 10px;
        min-width: 45px;
    }
    
    .chapter-title {
        font-size: 13px;
    }
    
    .chapters-list {
        max-height: calc(100vh - 56vw - 80px);
    }
}

