@charset "UTF-8";
/* Styles spécifiques pour écrans larges (desktop > 1024px) */

/* Effet de défilement pour le texte trop long */
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@media (min-width: 1025px) {
    /* Layout global */
    .container.mt-4 {
        max-width: 90%;
        margin-top: 90px !important;
    }
    
    /* Header et navigation */
    .app-header {
        padding: 1rem 2rem;
        height: 80px;
    }
    
    .nav-icons {
        max-width: 800px;
    }
    
    .nav-icon {
        padding: 8px 15px;
        font-size: 36px;
    }
    
    .nav-icon i {
        font-size: 38px;
        margin-bottom: 5px;
    }
    
    /* Grille d'émotions - 4 colonnes sur desktop */
    .emotions-container {
        background-color: #333;
        border-radius: 15px;
        padding: 30px;
        margin: 0 auto 30px;
        max-width: 1200px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }
    
    .emotions-title {
        font-size: 36px;
        margin-bottom: 30px;
    }
    
    .emotions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .emotion-item {
        padding: 10px;
        transition: transform 0.3s, filter 0.3s;
    }
    
    .emotion-item:hover {
        transform: scale(1.1);
    }
    
    .emotion-image {
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
        border-width: 0px;
    }
    
    .emotion-label {
        font-size: 20px;
    }
    
    /* Interface Selection2 */
    .selection2-container {
        max-width: 800px;
        margin: 0 auto 40px;
    }
    
    .selection2-header {
        display: flex;
        align-items: center;
        justify-content: center; /* Centre les éléments horizontalement */
        margin-bottom: 25px;
        width: 100%;
    }

    .emotion-circle {
        width: 100px;
        height: 100px;
        margin-right: 20px; /* Espace entre le cercle et le titre */
        margin-left: 0; 
    }

    .emotion-title {
        font-size: 32px;
        font-weight: bold;
        color: white;
        margin-left: 0; 
    }
    
    /* Correction de la grid pour tous les écrans desktop */
    .selection2-grid {
        display: grid;
        grid-template-columns: 1fr 1fr !important; /* Forcer 2 colonnes */
        grid-template-rows: repeat(3, 1fr) !important; /* 3 rangées */
        gap: 10px;
        width: 90%;
        max-width: 500px;
        aspect-ratio: 2/2.1;
        height: auto;
        max-height: 380px;
        margin: 0 auto;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
        border: 4px solid rgba(128, 128, 128, 0.8);
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        position: relative;
    }
    
    /* Style des cellules */
    .selection-cell {
        aspect-ratio: auto;
        height: auto;
        min-height: 80px;
        border-radius: 12px;
        border: 2px solid rgba(255, 255, 255, 0.25);
        position: relative;
        z-index: 10;
    }
    
    /* Style de la cellule active */
    .selection-cell.active {
        border: 5px solid #E03757;
        z-index: 11;
    }
    
    /* Style du texte dans les cellules */
    .cell-label {
        font-weight: bold;
        font-size: 22px; 
        margin-left: 15px; 
        text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
        text-transform: uppercase;
        color: white;
    }

    .cell-count {
        font-size: 26px; 
        font-weight: bold;
        margin-left: 15px;
        text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
        color: white;
    }
    
    /* Liste des morceaux */
    .sort-options-container {
        max-width: 1000px;
        margin: 0 auto 20px;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .btn-outline-label span {
        font-size: 16px;
    }
    
    .btn-sm.btn-outline-primary {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
        margin: 0 5px;
    }
    
    .btn-sm.btn-outline-primary:hover {
        transform: translateY(-2px);
    }
    
    #tracksList {
        max-width: 1000px;
        margin: 0 auto 60px;
    }
    
    .track-item-new {
        display: flex;
        align-items: flex-start;
        cursor: pointer;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 8px;
        transition: all 0.2s;
        background-color: var(--secondary-color);
        color: white;
        position: relative;
        width: 100%;
        min-height: 90px;
        overflow: hidden;
    }
    
    .track-item-new:hover {
        transform: translateX(10px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    /* Styles améliorés pour le morceau actif/en cours */
    .track-item-new.active {
        border-left: 4px solid var(--accent-color);
        background-color: #212529;
        z-index: 50;
        box-shadow: 0 0 8px rgba(224, 55, 87, 0.3);
    }

    /* Ajustement pour le conteneur d'information */
    .track-info-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex-grow: 1;
        min-width: 0;
        overflow: hidden;
        padding-right: 15px;
        min-height: 70px;
    }

    .track-number {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .track-heart {
        font-size: 28px;
    }
    
    .track-index-container {
        min-width: 60px;
        width: 60px;
        margin-right: 10px;
    }
    
    /* Styles pour les textes de piste */
    .track-composer {
        font-size: 18px;
        color: var(--primary-color) !important;
        font-weight: bold;
        margin-bottom: 6px;
    }
    
    .track-title {
        font-size: 16px;
        color: var(--accent-color) !important;
        font-weight: bold;
        margin-bottom: 6px;
    }
    
    .track-artist {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    /* Gestion des textes longs */
    .track-composer, .track-title, .track-artist {
        width: 100%;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.3;
    }
    
    /* Animations */
    @keyframes pulse-highlight {
        0% { transform: translateX(0); background-color: #3a3e42; }
        25% { transform: translateX(5px); background-color: rgba(224, 55, 87, 0.3); }
        50% { transform: translateX(0); background-color: #3a3e42; }
        75% { transform: translateX(5px); background-color: rgba(224, 55, 87, 0.3); }
        100% { transform: translateX(0); background-color: #3a3e42; }
    }

    .highlight-scroll {
        animation: pulse-highlight 2s ease-in-out;
    }
    
    /* Boutons d'info et de paroles */
    .track-info-btn {
        width: 44px;
        height: 44px;
        font-size: 40px;
        background-color: cadetblue;
        margin-right: -8px;
        position: relative;
        z-index: 200;
    }
    
    /* Style pour le bouton micro */
    .track-lyrics-btn {
        margin-right: -12px;
        margin-top: 10px; /* Espacement par rapport au bouton info */
        color: white;
        background-color: #9370DB; /* Couleur violette pour différencier du bouton info */
        border-radius: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        font-size: 26px;
        transition: background-color 0.2s, transform 0.2s;
    }

    .track-lyrics-btn:hover {
        background-color: var(--accent-color);
        transform: scale(1.1);
    }
    
    /* Modales */
    .info-modal-content, 
    .lyrics-modal-content {
        max-width: 800px;
        max-height: 90vh;
    }
    
    .info-modal-header,
    .lyrics-modal-header {
        padding: 20px 25px;
    }
    
    .info-modal-title,
    .lyrics-modal-title {
        font-size: 1.5rem;
    }
    
    .new-close-btn {
        width: 36px;
        height: 36px;
        font-size: 26px;
    }
    
    .info-modal-body {
        padding: 20px;
    }
    
    .modal-track-section {
        padding: 20px;
        margin-bottom: 30px;
        border-radius: 12px;
    }
    
    .modal-track-composer {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .modal-track-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .modal-info-line {
        margin-bottom: 20px;
    }
    
    .modal-info-label {
        width: 180px;
        font-size: 18px;
    }
    
    .modal-info-value {
        font-size: 18px;
    }
    
    .modal-info-photo {
        width: 80px;
        height: 80px;
        border: 3px solid var(--primary-color);
    }
    
    /* Ligne de bas de page avec année et pays */
    .modal-footer-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-year {
        font-style: italic;
        color: var(--light-bg);
    }

    .modal-country {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .modal-country-name {
        margin-right: 10px;
        font-weight: bold;
    }
    
    .info-modal-footer,
    .lyrics-modal-footer {
        padding: 20px 25px;
    }
    
    .modal-player-controls {
        gap: 20px;
    }
    
    /* Paroles */
    .lyrics-modal-body {
        padding: 20px 30px 30px;
        margin-top: 0px;
        font-size: 1.2rem;
        line-height: 1.8;
    }
    
    /* Lecteur audio fixé en bas */
    .player-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #212529;
        color: white;
        padding: 20px;
        z-index: 1000;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
        transition: transform 0.3s ease;
        height: auto;
    }
    
    /* Marquee pour le titre qui défile */
    .marquee.active-marquee .marquee-content {
        display: inline-block;
        padding-right: 50px;
        animation: marquee 15s linear infinite;
    }
    
    .marquee:hover .marquee-content {
        animation-play-state: paused;
    }
        
    /* Animation pour le texte du morceau en cours de lecture */
    .now-playing-container {
        font-size: 18px;
        margin-bottom: 10px;
        white-space: nowrap;
        overflow: hidden;
    }
    
    /* Style pour le conteneur des contrôles audio */
    .audio-control-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin-bottom: 15px;
        width: 100%;
    }
    
    /* Style des boutons ronds */
    .round-player-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #333;
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 20px;
        border: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Bouton de lecture encore plus grand */
    .round-player-btn.play-btn {
        width: 70px;
        height: 70px;
        background-color: #E03757;
        font-size: 30px;
    }
    
    /* Effet au survol */
    .round-player-btn:hover {
        transform: scale(1.1);
        background-color: #444;
    }
    
    .round-player-btn.play-btn:hover {
        background-color: #c92f4b;
    }
    
    /* Style pour les boutons désactivés */
    .round-player-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }
        
    /* Barre de progression */
    .player-progress-container {
        display: flex;
        align-items: center;
        width: 100%;
        margin-top: 5px;
        gap: 10px;
    }
    
    #current-time, #duration {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.7);
        min-width: 45px;
    }
    
    .progress-bar-container {
        flex-grow: 1;
        height: 6px;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
        cursor: pointer;
        position: relative;
    }
    
    #progress-bar {
        height: 100%;
        background-color: #0FB89F;
        border-radius: 3px;
        width: 0%;
        transition: width 0.1s linear;
    }
    
    /* Bouton pour remonter en haut */
    .scroll-to-top {
        width: 55px;
        height: 55px;
        font-size: 26px;
        left: 40px;
        top: 160px;
    }
    
    /* Position du bouton de défilement vers le morceau en cours */
    #scroll-to-current {
        position: fixed !important;
        bottom: 60px !important;
        right: 25px !important;
        background-color: #0FB89F;
        color: white;
        border-radius: 50%;
        width: 55px;
        height: 55px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        z-index: 1001 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        margin-left: 0;
        font-size: 26px;
    }
    
    #scroll-to-current:hover {
        background-color: #0ca38c;
        transform: scale(1.1);
    }
}

/* Styles pour les écrans très larges (>1400px) */
@media (min-width: 1400px) {
    .container.mt-4 {
        max-width: 80%;
    }
    
    .emotions-container, 
    .selection2-container,
    .sort-options-container,
    #tracksList {
        max-width: 1200px;
    }
    
    .emotions-grid {
        gap: 30px;
        max-width: 1200px;
    }
    
    .selection2-grid {
        max-width: 550px !important;
        width: 80% !important;
    }
}

/* Optimisations pour les écrans 4K */
@media (min-width: 2560px) {
    html {
        font-size: 18px;
    }
    
    .container.mt-4 {
        max-width: 70%;
    }
    
    .emotions-container, 
    .selection2-container,
    .sort-options-container,
    #tracksList {
        max-width: 1800px;
    }
    
    .selection2-grid {
        max-width: 700px !important;
        width: 70% !important;
    }
}

/* Correction spécifique pour MacBook Air et écrans similaires */
@media (min-width: 1025px) and (max-width: 1440px) and (max-height: 900px) {
    .selection2-container {
        max-width: 700px;
    }
    
    .selection2-grid {
        width: 80% !important;
        max-width: 450px !important;
        aspect-ratio: 2/2.1 !important;
        max-height: 350px !important;
        padding: 5px !important;
        border-width: 3px !important;
    }
    
    .selection-cell {
        min-height: 65px !important;
    }
    
    .cell-label {
        font-size: 20px !important;
        margin-left: 12px !important;
    }
    
    .cell-count {
        font-size: 24px !important;
        margin-left: 12px !important;
    }
    
    .emotion-circle {
        width: 90px !important;
        height: 90px !important;
    }
    
    .emotion-title {
        font-size: 28px !important;
    }
}

/* Correction très spécifique pour MacBook Air (1280×800) */
@media (min-width: 1025px) and (max-width: 1280px) and (max-height: 800px) {
    .selection2-container {
        max-width: 600px !important;
    }
    
    .selection2-grid {
        width: 75% !important;
        max-width: 400px !important;
        aspect-ratio: 2/2.1 !important;
        max-height: 320px !important;
        padding: 4px !important;
        border-width: 3px !important;
        background-size: 100% 100% !important; /* Force l'image à s'adapter */
    }
    
    .selection-cell {
        min-height: 60px !important;
        border-width: 1px !important;
    }
    
    .selection-cell.active {
        border-width: 3px !important;
    }
    
    .cell-label {
        font-size: 18px !important;
        margin-left: 10px !important;
    }
    
    .cell-count {
        font-size: 22px !important;
        margin-left: 10px !important;
    }
    
    .emotion-circle {
        width: 80px !important;
        height: 80px !important;
    }
    
    .emotion-title {
        font-size: 26px !important;
    }
    
    .selection2-header {
        margin-bottom: 15px !important;
    }
}

/* S'assurer que les modales sont affichées correctement sur tous les écrans */
.info-modal, .lyrics-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000 !important;
    display: none;
}

.info-modal.visible, .lyrics-modal.visible {
    display: flex !important;
}

.info-modal-content, .lyrics-modal-content {
    position: relative;
    z-index: 3100 !important;
    margin: auto;
    overflow-y: auto;
    max-height: 85vh;
}

.info-modal-header, .lyrics-modal-header {
    position: sticky;
    top: 0;
    z-index: 3200 !important;
}

.info-modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 3200 !important;
}

body.modal-open {
    overflow: hidden;
}

/* Correction pour le centrage des options de tri */
.sort-options-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    padding: 15px !important;
}

.sort-options-container .btn-group {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    margin: 0 auto !important;
    width: auto !important;
    max-width: 90% !important;
}

.btn-outline-label {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    color: white !important;
}

.btn-sm.btn-outline-primary {
    margin: 0 5px !important;
}

.card-body {
    text-align: left !important;
    padding-bottom: 80px !important;
}

#tracksList {
    margin-bottom: 40px !important;
}

/* Masquer l'en-tête des résultats sur tablettes et ordinateurs */
@media (min-width: 768px) {
    .results-header {
        display: none !important;
    }
}

/* Classes d'aides pour la marge de défilement */
.scroll-margin-top {
    scroll-margin-top: 100px;
}

/* Animation de mise en évidence pour les boutons */
@keyframes pulse-button {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.track-item-new:hover .track-info-btn,
.track-item-new:hover .track-lyrics-btn {
    animation: pulse-button 1s ease-in-out;
}

/* Correction pour l'affichage du cercle d'émotion */
@media (min-width: 1025px) {
    /* Style général du cercle d'émotion pour tous les écrans desktop */
    .emotion-circle {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        margin-right: 15px;
        border: 0px solid #0FB89F;
        /* Modification critique pour l'affichage de l'image */
        background-position: center center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        /* S'assurer que l'arrière-plan est bien visible */
        position: relative;
        z-index: 5;
    }
}

/* Correction spécifique pour MacBook Air et écrans similaires */
@media (min-width: 1025px) and (max-width: 1440px) and (max-height: 900px) {
    .emotion-circle {
        width: 90px !important;
        height: 90px !important;
        /* Renforcer les propriétés d'arrière-plan */
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* Correction très spécifique pour MacBook Air (1280×800) */
@media (min-width: 1025px) and (max-width: 1280px) and (max-height: 800px) {
    .emotion-circle {
        width: 80px !important;
        height: 80px !important;
        /* Renforcer les propriétés d'arrière-plan */
        background-position: center center !important;
        background-size: cover !important;
    }
}