#videoInfo {
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5em 2em;
  background-color: var(--infos-box-color);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  color: var(--video-info-text-color);
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
  user-select: text;
  word-wrap: break-word;
}

#videoInfo.visible {
  opacity: 1;
  max-height: 1500px; 
}

#videoInfo h3 {
  font-size: 1.8rem;
  margin-bottom: 0.6em;
  color: var(--video-info-heading-color);
  font-weight: 700;
  word-break: break-word;
}

#videoInfo img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1em;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#videoInfo ul {
  list-style: none;
  padding-left: 0;
}

#videoInfo ul li {
  margin-bottom: 0.5em;
  font-weight: 500;
  color: var(--video-info-list-color);
}

#videoInfo ul li strong {
  color: var(--video-info-list-strong-color);
}

#videoInfo ul li a {
  color: var(--video-info-link-color);
  text-decoration: none;
}

#videoInfo ul li a:hover,
#videoInfo ul li a:focus {
  text-decoration: underline;
}

/* --- Playlist Mode --- */
#videoInfo.playlist-mode {
  max-width: 900px; 
}

/* Style du bloc "Playlist détectée" */
#videoInfo.playlist-mode > p {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Layout liste des vidéos */
#playlistVideos {
  margin-top: 1em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* Un item de playlist */
#playlistVideos > div {
  background: var(--playlist-background-color);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-align: center;
  transition: transform 0.2s ease;
}

#playlistVideos > div p {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#videoInfo.playlist-mode {
  max-width: 95%;
}

#playlistVideos > div:hover {
  transform: scale(1.05);
}

#playlistVideos img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}

.copy-btn {
  all: unset;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;          
  align-items: center;
  justify-content: center;
  padding: 4px;
  vertical-align: middle;
  transition: transform 0.1s ease, color 0.1s ease, opacity 0.15s ease;
  font-size: 1em;
}

#playlistVideos > div p a{
  text-decoration: none;
  color: var(--video-info-link-color);
}

#playlistVideos > div p a:hover{
  text-decoration: underline;
}


/* Responsive */
@media (max-width: 480px) {
  #videoInfo {
    padding: 1em;
    font-size: 0.9rem;
  }

  #videoInfo h3 {
    font-size: 1.4rem;
  }
}
