@charset "UTF-8";
/* Styles spécifiques pour tablettes (768px à 1024px) */
/* Effet de défilement pour le texte trop long */
		@keyframes marquee {
		0% { transform: translateX(100%); }
		100% { transform: translateX(-100%); }
	}

/* Ajustements pour la grille d'émotions - 3 colonnes sur tablette */
@media (min-width: 768px) and (max-width: 1024px) {
    .emotions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .emotion-item {
        padding: 8px;
    }
    
    .emotion-label {
        font-size: 18px;
    }
    
    .emotion-image {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    }
    
    /* Ajustements pour le header */
    .app-header {
        padding: 0.8rem 1.5rem;
    }
    
    .nav-icons {
        max-width: 600px;
    }
    
    .nav-icon i {
        font-size: 34px;
    }
    
    /* Ajustements pour Selection2 */
    .selection2-container {
        max-width: 600px;
    }
    
    .selection2-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 350px;
    }
	
	.selection2-header {
		display: flex;
		align-items: center;
		justify-content: center; /* Centre les éléments horizontalement */
		margin-bottom: 20px;
		width: 100%;
	}
    
    .emotion-circle {
        width: 108px;
        height: 108px;
		margin-right: 15px;
    	margin-left: 0;
    }
	
    
    .emotion-title {
        font-size: 28px;
		font-weight: bold;
		color: white;
		margin-left: 0;
    }
    
    .cell-label {
        font-size: 16px;
    }
    
    .cell-count {
        font-size: 20px;
    }
    
	@media (min-width: 768px) and (max-width: 1024px) {
    /* Conteneur principal */
    .selection2-container {
        max-width: 500px; /* Limiter la largeur pour être similaire aux mobiles */
        margin: 0 auto 30px;
    }
    
    /* Style de la grille - Forcer deux colonnes comme en mobile */
    .selection2-grid {
        display: grid;
        grid-template-columns: 1fr 1fr !important; /* Forcer 2 colonnes */
        grid-template-rows: repeat(3, 1fr) !important; /* 3 rangées */
        gap: 8px; /* Espacement entre les cellules */
        width: 100%;
        aspect-ratio: 2/2.5;
        max-height: 350px;
        margin: 0 auto; /* Centrer la grille */
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        background-position: center;
        background-size: cover;
        position: relative;
    }
    
    /* Pour s'assurer que la grille reste bien proportionnée */
    /* Style des cellules */
    .selection-cell {
        aspect-ratio: auto;
        height: auto;
        min-height: 80px; /* Hauteur minimale plus grande pour desktop */
        border-radius: 12px;
        border: 2px solid rgba(255, 255, 255, 0.25);
    }
    
    /* Style de la cellule active */
    .selection-cell.active {
        border: 6px solid #E03757;
    }
    
    /* Style du texte dans les cellules */
    .cell-label {
        font-weight: bold;
        font-size: 20px; 
        margin-left: 20px; 
        text-transform: uppercase;
		text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
        color: white;
    }

    .cell-count {
        font-size: 24px; 
        font-weight: bold;
		margin-left: 20px;
		text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
        color: white;
    }
}
	@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .selection2-grid {
        /* Même en paysage, on reste sur 2 colonnes */
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: repeat(3, 1fr) !important;
        max-height: 300px;
        aspect-ratio: 2/2.5;
    }
}

/* 4. Ajustements généraux indépendamment de la taille d'écran */
.selection2-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 0;
    pointer-events: none;
}
	
    /* Ajustements pour les pistes */
    .track-item-new {
		display: flex;
		align-items: flex-start;
		cursor: pointer;
		padding: 12px 10px;
		border-radius: 6px;
		margin-bottom: 6px;
		transition: all 0.2s;
		background-color: var(--secondary-color);
		color: white;
		position: relative;
		width: 100%;
		/* Hauteur minimale pour assurer une hauteur suffisante */
		min-height: 80px;
		padding: 15px;
		/* Gérer le débordement du texte des titres longs */
		overflow: hidden;
	}
    
    /* Styles améliorés pour le morceau actif/en cours */
	.track-item-new.active {
		border-left: 4px solid var(--accent-color);
		background-color: #212529;
		/* Augmentation du z-index pour assurer la visibilité */
		z-index: 50;
		/* Ajout d'un highlight subtil */
		box-shadow: 0 0 8px rgba(224, 55, 87, 0.3);
	}

	/* Ajustement pour le conteneur d'information afin que le texte ne déborde pas */
	.track-info-container {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		flex-grow: 1;
		min-width: 0;
		overflow: hidden;
		padding-right: 10px;
		/* Assurer un espacement minimal */
		min-height: 60px;
	}
    
    .track-number {
        font-size: 14px;
    }
    
    .track-heart {
        font-size: 24px;
    }
    
    .track-composer {
        font-size: 16px;
    }
    
    .track-title {
        font-size: 15px;
    }
    
    .track-artist {
        font-size: 14px;
    }
	
	/* Amélioration des styles pour le titre et compositeur pour gérer les longs textes */
	.track-composer, .track-title, .track-artist {
		width: 100%;
		white-space: normal; /* Permettre le retour à la ligne pour les titres longs */
		overflow: hidden;
		text-overflow: ellipsis;
		/* Limiter le nombre de lignes à 2 par élément */
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		line-height: 1.3;
	}

	/* Amélioration de la fonction de défilement vers le morceau actif */
	@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;
	}
    
    .track-info-btn {
        width: 44px;
        height: 44px;
        font-size: 40px;
    }
	
	/* 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);
    }
    
    /* Ajustements pour les modales */
    .info-modal-content, 
    .lyrics-modal-content {
        max-width: 700px;
    }
    
    .modal-info-photo {
        width: 70px;
        height: 70px;
    }
	/* 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;
    }
    
    /* Ajustements pour le lecteur */
    .player-container {
        padding: 20px;
    }
    
    .audio-control-container {
        gap: 20px;
    }
    
    .round-player-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .round-player-btn.play-btn {
        width: 65px;
        height: 65px;
        font-size: 28px;
    }
    
    /* Bouton pour remonter en haut */
    .scroll-to-top {
        width: 50px;
        height: 50px;
        left: 30px;
        top: 160px;
    }
    
    /* Bouton pour aller à la piste en cours */
    #scroll-to-current {
        width: 50px;
        height: 50px;
        bottom: 50px !important;
        right: 30px !important;
        font-size: 26px;
    }
}

/* Uniformisation du lecteur audio pour tablette */

@media (min-width: 768px) and (max-width: 1024px) {
    /* Lecteur audio fixé en bas */
    .player-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #212529;
        color: white;
        padding: 15px;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
        transition: transform 0.3s ease;
        height: auto; /* Supprimer la hauteur fixe pour s'adapter au contenu */
    }
	/* 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: 15px; /* Conserver un espacement cohérent */
        margin-bottom: 10px;
        width: 100%;
    }
    
    /* Style des boutons ronds */
    .round-player-btn {
        width: 45px; /* Taille intermédiaire pour tablette */
        height: 45px;
        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: 18px;
        border: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Bouton de lecture légèrement plus grand */
    .round-player-btn.play-btn {
        width: 60px;
        height: 60px;
        background-color: #E03757;
        font-size: 24px;
    }
    
    /* 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: 8px;
    }
    
    #current-time, #duration {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
        min-width: 35px;
    }
    
    .progress-bar-container {
        flex-grow: 1;
        height: 5px;
        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;
    }
    
    /* Position du bouton de défilement vers le morceau en cours */
    #scroll-to-current {
        position: fixed !important;
        bottom: 50px !important;
        right: 16px !important;
        background-color: #0FB89F;
        color: white;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        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: 24px;
    }
    
    #scroll-to-current:hover {
        background-color: #0ca38c;
        transform: scale(1.1);
    }
}

/* Améliorations pour les options de tri */
@media (min-width: 768px) {
    .sort-options-container {
        width: 90%;
        margin: 0 auto 1rem auto;
    }
    
    .sort-options-container .btn-group {
        margin-bottom: 0.5rem;
    }
    
    .btn-sm.btn-outline-primary {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Ajustements pour le mode clair/sombre sur iPad */
@media (min-width: 768px) and (max-width: 1024px) and (prefers-color-scheme: dark) {
    body {
        background-color: #2c3135;
    }
    
    .app-header {
        background-color: #212529;
    }
}

/* Ajustements pour la gestion des écrans en orientation paysage */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .emotions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .selection2-grid {
        max-height: 300px;
        aspect-ratio: 3/1.5;
    }
    
    /* Ajustements pour le player en position paysage */
    .player-container {
        padding: 15px 30px;
    }
}

/* Correction des problèmes d'affichage des modales */
.info-modal, .lyrics-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2500 !important; /* Augmentation importante du z-index */
    display: none;
}

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

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

/* S'assurer que les modales sont au-dessus de tout le reste */
#selection2-container, .selection2-grid, .sort-options-container {
    z-index: 100;
    position: relative;
}

/* Correction pour le positionnement absolu et empêcher les chevauchements */
body.modal-open {
    overflow: hidden;
}

/* Amélioration des styles des éléments à l'intérieur des modales */
.info-modal-header, .lyrics-modal-header {
    position: sticky;
    top: 0;
    z-index: 2700 !important;
}

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

/* S'assurer que le backdrop est suffisamment sombre et couvre tout l'écran */
.info-modal::before, .lyrics-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2400 !important;
}
/* Ajoutez ces corrections à vos fichiers CSS pour s'assurer que les boutons d'info sont bien visibles et fonctionnels */

/* Améliorer la visibilité et l'interactivité des boutons info */
.track-info-btn {
    position: relative;
    z-index: 200 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* S'assurer que l'icône est au-dessus et cliquable */
.track-info-btn i {
    position: relative;
    z-index: 201 !important;
    pointer-events: none;
}

/* Améliorer le feedback visuel au survol */
.track-info-btn:hover, .track-info-btn:active {
    transform: scale(1.1);
    background-color: cadetblue;
    opacity: 1;
}

/* Rendre les modales encore plus prioritaires */
.info-modal, .lyrics-modal {
    z-index: 3000 !important;
}

.info-modal-content, .lyrics-modal-content {
    z-index: 3100 !important;
}

/* Assurer que les contrôles de piste restent clickables */
.track-controls {
    position: relative;
    z-index: 202 !important;
    pointer-events: auto !important;
}

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

/* Amélioration de la fonction scrollToCurrentTrack */
/* Ajouter ces styles pour créer un effet de "marge de sécurité" */
.scroll-margin-top {
    scroll-margin-top: 100px; /* Espace supplémentaire en haut pour la visibilité */
}

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

/* Conteneur des options de tri - style uniforme sur tous les appareils */
.sort-options-container {
    margin-bottom: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    background-color: #212529 !important;
    width: calc(100% - 10px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Boutons de tri avec un style plus visible */
.sort-options-container .btn-group {
    margin-bottom: 0.5rem !important;
    width: 100% !important;
}

.btn-sm.btn-outline-primary span {
    font-weight: bold !important;
}

/* Corps de carte pour affichage des résultats */
.card-body {
    padding: 0.75rem 1rem !important;
    background-color: #212529 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 1rem !important;
}

/* Assurer que les résultats ne sont pas masqués accidentellement */
#tracksList {
    width: 100% !important;
}

/* Mise en forme ajustée pour les tablettes */
@media (min-width: 768px) and (max-width: 1024px) {
    .sort-options-container,
    .card-body {
        width: 95% !important;
        max-width: 800px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .btn-sm.btn-outline-primary {
        font-size: 0.9rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* Mise en forme ajustée pour les ordinateurs */
@media (min-width: 1025px) {
    .sort-options-container,
    .card-body {
        width: 90% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 12px !important;
    }
    
    .sort-options-container {
        border-radius: 12px 12px 0 0 !important;
    }
    
    .card-body {
        border-radius: 0 0 12px 12px !important;
    }
    
    .btn-sm.btn-outline-primary {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
    }
}

/* Masquer l'en-tête des résultats sur tablettes et ordinateurs */
@media (min-width: 768px) {
    .results-header {
        display: none !important;
    }
}
/* Ajout pour centrer le container de tri et ajuster les couleurs des résultats */

/* Centrage du container de tri */
.sort-options-container {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* S'assurer que le groupe de boutons est bien centré à l'intérieur */
.sort-options-container .btn-group {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

/* Étiquette du tri également centrée */
.btn-outline-label {
    text-align: center !important;
    width: 100% !important;
}

/* Couleurs des éléments dans la liste des résultats */
.track-composer {
    color: var(--primary-color, #0FB89F) !important;
    font-weight: bold !important;
}

.track-title {
    color: var(--accent-color, #E03757) !important;
    font-weight: bold !important;
}

/* S'assurer que les styles sont appliqués partout y compris dans les médias queries */
@media (min-width: 768px) {
    .track-composer {
        color: var(--primary-color, #0FB89F) !important;
    }
    
    .track-title {
        color: var(--accent-color, #E03757) !important;
    }
}

@media (min-width: 1025px) {
    .track-composer {
        color: var(--primary-color, #0FB89F) !important;
    }
    
    .track-title {
        color: var(--accent-color, #E03757) !important;
    }
    
    /* Amélioration du centrage sur grands écrans */
    .sort-options-container .btn-group {
        max-width: 80% !important;
    }
}
/* Ajouter un espace supplémentaire entre la dernière piste et le player */
@media (min-width: 768px) and (max-width: 1024px) {
    .card-body {
        padding-bottom: 80px !important; /* Ajoute un espace en bas du conteneur des pistes */
    }
    
    /* Alternative : ajouter une marge au bas du tracksList */
    #tracksList {
        margin-bottom: 60px !important;
    }
}