/* ======================= BASE GÉNÉRALE ======================= */
html, body {
  margin: 0;
  padding: 0;
  height:  100%;
  width:  100%;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto !important;/*permet le scroll de la page*/
  scroll-behavior: auto;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ======================= BOUTON DE SORTIE FIXE ======================= */
#boutonSortieFixe {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999999;
}

#boutonSortieFixe button {
  background-color: #cc0000;
  color: white;
  font-size: 16px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  transition: background-color 0.3s, transform 0.2s;
}

#boutonSortieFixe button:hover {
  background-color: #ff4444;
  transform: scale(1.05);
}
/* Accueil et conteneur principal */

#accueil {
    width: 100%;
    max-width: 1000px;
    display: block;
    margin-top: 50px;
}

#contener, #listemorceaux {
  width: 100vw;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

#listemorceaux a,
.morceau a {
  color: white !important;
}
#listemorceaux {
  touch-action: none;
  overflow-x: hidden; 
  transform-origin: center center;
}

#contener {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 10px;
  padding-top: 90px;
  width: 100%;                /* 100% de la largeur disponible */
  box-sizing: border-box;
}


#contener a {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 12px auto;
  padding: 16px 20px;
  font-size: 4vw;
  text-align: center;
  text-decoration: none;
  color: white;
  background: linear-gradient(45deg, #ff00cc, #3333ff, #00ffee);
  background-size: 400% 400%;
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  animation: discoGlow 4s ease infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}

#contener a:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.9);
}


/* Titres en cours */
#titreencours {
    font-size: 24px;
    font-weight: bold;
    color: #f8b400;
    margin-bottom: 15px;
}
/* Paroles et style des textes */
#lyricsDisplay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 3vw;
    padding: 0;
    line-height: 1.5;
    overflow: hidden;
    z-index: 9999;
    display: none;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    visibility: visible !important;  /* Empêche qu'il soit caché */
}


#lyricsTitle {
    position: fixed; /* Fixe le titre en haut */
    top: 80px; /* Abaisse le titre sous `#contener` */
    left: 50%;
    transform: translateX(-50%);
    background: black;
    color: yellow;
    font-size: 4vw;
    font-weight: bold;
    text-align: center;
    width: 100%;
    padding: 20px 0;
    z-index: 10010; /*  Passe au-dessus de `#contener` */
}



/* Zone scrollable pour les paroles */
#lyricsContent {
    width: 100%;
    height: calc(100% - 180px);
    padding-top: 180px !important; /* Augmenté pour bien voir le début */
    overflow-y: auto;
    padding: 20px;
    text-align: center;
    color: white !important;
    display: block !important;
    position: relative;
}



#lyricsContent p {
    font-size: 3vw;
    line-height: 1.8;
    text-align: center;
    margin: 15px 0;
    white-space: pre-line;
}


.theme-separator {
  font-weight: bold;
  font-size: 3.5vw;
  color: yellow;
  text-transform: uppercase;
  margin: 20px 0;
  text-align: center;
}

/*  Style du bouton de fermeture */
#lyricsDisplay button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px;
    font-size: 2vw;
    background: red;
    color: white;
    border: none;
    cursor: pointer;
}

/*  Personnalisation du scroll */
#lyricsContent::-webkit-scrollbar {
    width: 8px;
}

#lyricsContent::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 4px;
}

#lyricsContent::-webkit-scrollbar-track {
    background: black;
}

/* Style des morceaux */
.morceau {
    width: 95%;
    max-width: 700px;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    /* background: rgba(255, 255, 255, 0.1); */  /* ← commentaire bien fermé ici */
    color: white;
    border-radius: 5px;
    margin: 5px 0;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.morceau a {
    color: white !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}


.morceau:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Champs et boutons */
input[type="text"], input[type="button"] {
  padding: 12px;
  margin: 10px;
  border-radius: 5px;
  border: none;
  font-size: 18px;
}
input[type="text"] {
  width: 80%;
  max-width: 300px;
}
input[type="button"] {
  padding: 30px 60px;
  font-size: 36px;
  border-radius: 20px;
  background: #f8b400;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}
input[type="button"]:hover {
  background: #ffcc00;
  transform: scale(1.2);
}

/* Pop-ups */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 11000;
}
.popup-content {
  background: #222;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  color: #ffcc00;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
}
.popup-sortie {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.95);
  padding: 30px;
  border-radius: 20px;
  z-index: 100000;
  text-align: center;
  color: white;
  max-width: 90%;
}


/* Avis */
#avis {
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  color: #ffcc00;
  text-shadow: 3px 3px 8px rgba(255, 200, 0, 0.8);
  margin-top: 30px;
}
#avis a {
  color: #ffea00;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s, transform 0.3s;
}
#avis a:hover {
  color: #ffffff;
  transform: scale(1.1);
}
#alert {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  font-size: 24px;
  font-weight: bold;
  padding: 20px;
  border-radius: 12px;
  z-index: 99999;
  text-align: center;
  color: white !important;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: all 0.3s ease-in-out;
  animation: fadeInOut 3s ease-in-out;
}
#alert.alert-success {
  background-color: #28a745 !important;
  color: white !important;
}
#alert.alert-error {
  background-color: #dc3545 !important;
  color: white !important;
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -60%); }
  20% { opacity: 1; transform: translate(-50%, -50%); }
  80% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}
#alert a {
  color: yellow;
  text-decoration: none;
  font-weight: bold;
  padding-left: 10px;
}
#alert a:hover {
  color: white;
  text-decoration: underline;
}

#listemorceaux a,
.morceau a {
  color: white !important;
}
#listemorceaux {
  touch-action: none;
  overflow-x: auto;
  transform-origin: center center;
}
@media (pointer: coarse) {
  body {
    touch-action: manipulation;
  }
}
.message-anim {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80vh;
  padding: 20px;
  font-size: 1.4em;
  color: #ccc;
  animation: pulse 2s infinite;
  text-align: center;
  flex-direction: column;
}
@keyframes pulse {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.6; transform: scale(1); }
}


#navigateur {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 80px;
}







/* ========== STYLES POUR LES PAROLES ========== */



/* Style spécial pour les sections "THEME" et séparateurs */
#lyricsContent p.theme-separator {
    font-weight: bold;
    font-size: 3.5vw;
    color: yellow;
    text-transform: uppercase;
    margin-top: 30px;
    display: block;
}

.theme-separator {
    font-weight: bold;
    font-size: 3vw;
    color: yellow;
    text-transform: uppercase;
    text-align: center;
    margin: 20px 0;
    display: block;
}


#accroche {
    font-size: 42px; /* Même taille que #pseudo */
    font-weight: bold;
    text-align: center;
    color: #ffcc00; /* Jaune doré pour bien ressortir */
    text-shadow: 3px 3px 8px rgba(255, 200, 0, 0.8); /* Effet lumineux */
    margin-bottom: 20px; /* Espace entre la phrase et le logo */
    text-transform: uppercase; /* Style impactant */
}
#contact {
    font-size: 36px; /* Texte bien visible */
    font-weight: bold;
    text-align: center;
    color: #ffcc00; /* Jaune doré pour attirer l'œil */
    text-shadow: 3px 3px 8px rgba(255, 200, 0, 0.8); /* Effet lumineux */
    margin-bottom: 20px; /* Espacement avec le logo */
    user-select: none; /* Empêche la sélection accidentelle */
    pointer-events: none; /* Désactive tout clic */
}


#logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px; /* Espace entre le logo et la phrase */
}

#logo img {
    max-width: 80%; /* S’adapte à l’écran sans être trop grand */
    height: auto;
    max-height: 600px; /* Ajuste la hauteur si besoin */
}




/* Agrandir le texte d'accroche */
#pseudo {
    font-size: 42px; /* Police encore plus grande */
    font-weight: bold;
    text-transform: uppercase; /* Tout en majuscules pour plus d'impact */
    margin-top: 30px; /* ou 40px, 50px selon ton goût */
    margin-bottom: 20px;
    color: #ffcc00; /* Couleur jaune pour bien ressortir */
    text-shadow: 3px 3px 8px rgba(255, 200, 0, 0.8); /* Effet lumineux */
}


/* Champ de texte */
#inputPseudo {
    width: 80%;
    padding: 10px;
    font-size: 18px;
    border-radius: 5px;
    border: none;
    margin: 10px 0;
    text-align: center;
}

/* Bouton */
.popup-content button {
    background: #f8b400;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.popup-content button:hover {
    background: #ffcc00;
    transform: scale(1.1);
}

.couleur-n { color: white; }
.couleur-b { color: blue; }
.couleur-r { color: red; }
.couleur-v { color: green; }
.couleur-o { color: orange; }



/* ======================= TITRES / LIENS DISCO ======================= */
@keyframes discoGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


#searchWrapper {
    position: fixed; /* Fixe le moteur de recherche en haut */
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 100%;
    max-width: 1000px; /* 1000px est suffisant, pas besoin de 1000vw */
    background-color: rgba(0, 0, 0, 0.85);
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #444;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#searchBar {
    position: relative; /* Utilise position relative, car #searchWrapper est déjà fixe */
    z-index: 100000; /* S'assurer qu'il est bien devant les autres éléments */
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 10px;
    width: 100%;
    max-width: 1000px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#editmot {
    width: 80%;
    max-width: 600px;
    padding: 12px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    outline: none;
    text-align: center;
    background: #222;
    color: white;
    margin-top: 10px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
