/* ===== LECTEUR YOUTUBE DISCRET ===== */
.youtube-player-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.3);
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.9;
}

.youtube-player-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
  opacity: 1;
}

.youtube-player-btn:active {
  transform: scale(0.95);
}

.youtube-player-btn svg {
  width: 28px;
  height: 28px;
}

/* Popup modal */
.youtube-player-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.youtube-player-popup.active {
  opacity: 1;
  visibility: visible;
}

.youtube-player-content {
  background: linear-gradient(135deg, #1e1e2f, #2b2b3d);
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.youtube-player-popup.active .youtube-player-content {
  transform: scale(1);
}

.youtube-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.youtube-player-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}

.youtube-player-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
}

.youtube-player-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.youtube-player-body {
  padding: 24px;
}

#youtube-player-container {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  min-height: 315px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#youtube-player-container iframe {
  width: 100%;
  height: 315px;
  border: none;
  border-radius: 12px;
}

.youtube-player-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.youtube-url-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.youtube-url-input:focus {
  outline: none;
  border-color: #ff0000;
  background: rgba(255, 255, 255, 0.08);
}

.youtube-url-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.youtube-load-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.youtube-load-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.youtube-load-btn:active {
  transform: translateY(0);
}

.youtube-player-playlist {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.youtube-player-playlist h4 {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.youtube-playlist-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.youtube-playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.youtube-playlist-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.youtube-playlist-item img {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
}

.youtube-playlist-item span {
  flex: 1;
  color: #fff;
  font-size: 0.9rem;
  font-family: monospace;
}

.youtube-playlist-play {
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.2s;
}

.youtube-playlist-play:hover {
  transform: scale(1.1);
}

.youtube-playlist-empty {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Messages */
.youtube-message {
  position: fixed;
  bottom: 150px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.youtube-message.show {
  opacity: 1;
  transform: translateY(0);
}

.youtube-message-success {
  background: linear-gradient(135deg, #00b894, #00a085);
}

.youtube-message-error {
  background: linear-gradient(135deg, #ff7675, #e74c3c);
}

.youtube-message-info {
  background: linear-gradient(135deg, #6c5ce7, #5f4bd9);
}

/* Responsive */
@media (max-width: 768px) {
  .youtube-player-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .youtube-player-btn svg {
    width: 24px;
    height: 24px;
  }

  .youtube-player-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 16px;
  }

  .youtube-player-header {
    padding: 16px 20px;
  }

  .youtube-player-header h3 {
    font-size: 1.2rem;
  }

  .youtube-player-body {
    padding: 20px;
  }

  #youtube-player-container {
    min-height: 200px;
  }

  #youtube-player-container iframe {
    height: 200px;
  }

  .youtube-player-controls {
    flex-direction: column;
  }

  .youtube-playlist-item {
    padding: 10px;
  }

  .youtube-playlist-item img {
    width: 60px;
    height: 45px;
  }
}
