/* Centrage horizontal du paragraphe des droits d'auteur sans text-align */
.droit {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: max-content;
}
body {
  font-family: "Inter", sans-serif;
  background-color: #0f172a;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f1f5f9; /* contraste renforcé */
}

h1 {
  font-family: "Space Grotesk", sans-serif;
  justify-content: center;
  font-weight: 700;
  color: #f1f5f9;
  font-size: 3.5rem;
  margin-bottom: 30px;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #f1f5f9;
  margin: 15px 0;
  letter-spacing: 0.5px;
  font-size: 1.8rem;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

.liste-musiques {
  width: 40%; 
  max-width: 1000px; 
  background: #0d1118;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 6px 20px rgba(214, 211, 211, 0.2);
  margin-bottom: 30px;
}

.avis {
  font-family: "Manrope", serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: #d1d5db; /* contraste amélioré */
  margin-top: 15px;
}

.artiste {
  font-family: "Oswald", sans-serif;
  color: #d1d5db; /* contraste amélioré */
}

audio {
  display: none;
}

.play {
  font-size: 1.7rem;
  padding: 14px 16px; /* Mets ici la taille voulue */
  cursor: pointer;
  background-color: #8b5cf6;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s;
  grid-area: play;
  margin-top: 15px;
  margin-bottom: 0;
  align-self: center;
  margin-bottom: 15px;
}

.play:hover {
  background-color: #444444;
}

.music-container {
  display: grid;
  grid-template-areas:
    "info"
    "play"
    "links";
  grid-template-columns: 1fr;
  align-items: center; /* centre verticalement le contenu */
  justify-items: center; /* centre horizontalement le contenu */
}

.music-container-dynamic {
  display: grid;
  grid-template-areas:
    "info"
    "play"
    "links";
  grid-template-columns: 1fr;
  align-items: center; /* centre verticalement le contenu */
  justify-items: center; /* centre horizontalement le contenu */
  margin-bottom: 40px; /* espace entre les musiques */
}

.avis-container {
  margin-top: 0;
}

.music-info {
  grid-area: info;
}

.link-container {
  gap: 20px;
  display: flex;
  flex-direction: row;      /* S'assure que c'est horizontal */
  justify-content: center;  /* Centre horizontalement les liens */
  align-items: center;      /* Centre verticalement si besoin */
  width: 100%;              /* Prend toute la largeur du parent */
  grid-area: links;
  margin-top: 10px;
  margin-left: 0;
}

.link-image,
.link2-image,
.link3-image {
  width: 60px;
  height: auto;
}



/* Focus visible pour navigation clavier */
.play:focus-visible,
button:focus-visible,
.back-to-top:focus-visible {
  outline: 3px solid #3b82f6; /* bleu accessible */
  outline-offset: 3px;
  border-radius: 6px;
}

.link-image:focus-visible,
.link2-image:focus-visible,
.link3-image:focus-visible {
  outline: 3px solid #facc15; /* jaune contrasté */
  outline-offset: 4px;
  border-radius: 8px;
}

/* Titre de la musique */
.title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  color: #f0f0f0;
  text-align: center;
}

/* Opinion de la musique */
.opinion {
  font-size: 1.125rem;
  color: #d1d5db;
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 20px 50px;
}

/* Image de la musique */
.image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  border: 2px solid transparent;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  margin-top: 25px;
}

.image:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.image:focus-visible {
  border: 2px solid #f97316; /* orange vif */
  outline: none;
}

/* Bouton de lecture */
button {
  background: #333333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: linear-gradient(120deg, #ad10eb);
}

/* Bouton du Formulaire */
.scroll-to-form-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* Bouton retour haut de page */
.back-to-top {
  font-size: 1.4rem;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #8b5cf6;
  color: #000000;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  background: linear-gradient(120deg, #ac08df, #8d5ff7);
  transform: scale(1.2);
}

.back-to-top.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Preview formulaire */
.form-preview-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.add-music-form {
  font-family: "Inter", sans-serif;
  flex: 1;
  max-width: 45%;
  margin-right: 20px;
}

.dynamic-display {
  flex: 1;
  max-width: 45%;
  margin-left: 20px;
}

/* ============================= */
/* ⚡ FOOTER MODERNE ET ÉLÉGANT */
/* ============================= */
.footer-container {
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #0d1118 0%, #111827 100%);
  border-top: 2px solid #8b5cf6;
  color: #f1f5f9;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* Lueur douce violette en arrière-plan */
.footer-container::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  transform: translateX(-50%);
  z-index: 0;
}

/* Contenu principal */
.footer-container p {
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.footer-nav {
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

/* Liens et sections */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  max-width: 900px;
}

.footer-links li {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 15px;
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.footer-links li:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-3px);
}

/* Détails des menus déroulants */
details {
  background: transparent;
  color: #f1f5f9;
  border: none;
  padding: 0;
  text-align: left;
  width: 100%;
  max-width: 400px;
}

summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 1.1rem;
  color: #a78bfa;
  transition: color 0.3s ease;
}

summary:hover {
  color: #c4b5fd;
}

details[open] summary {
  border-bottom: 1px solid #8b5cf6;
  margin-bottom: 10px;
}

details p {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.5;
}

/* Bouton retour haut de page */
.back-to-top {
  font-size: 1.4rem;
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(120deg, #8b5cf6, #6d28d9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  transform: scale(1.15);
  background: linear-gradient(120deg, #a855f7, #9333ea);
}

