/* ========================================
   STYLES GÉNÉRAUX
   ======================================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f1117;
  color: white;
}

/* ========================================
   NAVBAR ET NAVIGATION
   ======================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1c1f26;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.menu-toggle {
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

/* Onglets */
.nav-tabs {
  display: flex;
  gap: 10px;
}

.tab {
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 4px;
  background-color: #2c2f36;
  transition: all 0.3s ease;
}

.tab:hover {
  background-color: #3a3f48;
}

.tab.active {
  background-color: #00f0ff;
  color: #0f1117;
  font-weight: bold;
}

/* ========================================
   PANNEAU DE NOTIFICATIONS
   ======================================== */
.notif-toggle {
  position: relative;
}

.notif-panel {
  position: absolute;
  top: 40px;
  right: 0;
  background: #1f232d;
  padding: 12px;
  border-radius: 8px;
  width: 230px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.notif-panel.hidden {
  display: none;
}

.notif-panel label {
  cursor: pointer;
  transition: color 0.2s;
}

.notif-panel label:hover {
  color: #00f0ff;
}

/* ========================================
   CONTENU PRINCIPAL
   ======================================== */
.main-content {
  text-align: center;
  margin-top: 50px;
  padding: 0 20px;
}

.logo {
  width: 200px;
  margin-bottom: 20px;
  animation: fadeIn 1s;
}

.countdown {
  font-size: 2rem;
  margin: 20px 0;
  color: #00f0ff;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* ========================================
   PLANNING
   ======================================== */
.planning {
  margin-top: 30px;
}

.planning h3 {
  color: #00f0ff;
  margin-bottom: 15px;
}

.days {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.days div {
  background: #1f232d;
  padding: 10px 20px;
  border-radius: 8px;
  transition: transform 0.3s;
}

.days div:hover {
  transform: translateY(-5px);
}

.days .active {
  background: #00f0ff;
  color: #0f1117;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100%;
  background: #1f232d;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sidebar-header h3 {
  color: #00f0ff;
  margin: 0;
}

.close-sidebar {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-sidebar:hover {
  color: #ff6b6b;
}

.sidebar a {
  color: white;
  text-decoration: none;
  background: #2a2f3a;
  padding: 10px;
  border-radius: 5px;
  display: block;
  transition: all 0.3s;
}

.sidebar a:hover {
  background: #00f0ff;
  color: #0f1117;
  transform: translateX(5px);
}

.sidebar .version {
  margin-top: auto;
  font-size: 0.8rem;
  text-align: center;
  color: #666;
}

/* ========================================
   PAGES
   ======================================== */
.page {
  display: none;
  animation: fadeIn 0.5s;
}

.page.active {
  display: block;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 10px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .countdown {
    font-size: 1.5rem;
  }

  .days {
    gap: 10px;
  }

  .days div {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .sidebar {
    width: 200px;
  }
}

/* ========================================
   LECTEUR SPOTIFY PERSONNALISÉ
   ======================================== */
.spotify-player-container {
  margin-top: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.spotify-album-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Ratio 1:1 pour carré */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.spotify-album-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotify-track-info {
  margin-top: 20px;
  text-align: center;
}

.spotify-track-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.spotify-track-artist {
  font-size: 1.1rem;
  color: #b3b3b3;
  margin-bottom: 20px;
}

.spotify-control-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(29,185,84,0.4);
  z-index: 10;
}

.spotify-control-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 24px rgba(29,185,84,0.6);
}

.spotify-control-btn svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* Responsive pour le lecteur */
@media (max-width: 768px) {
  .spotify-player-container {
    max-width: 320px;
  }

  .spotify-track-title {
    font-size: 1.2rem;
  }

  .spotify-track-artist {
    font-size: 1rem;
  }
}

/* ========================================
   CARROUSEL YOUTUBE
   ======================================== */
.youtube-carousel-container {
  margin-top: 20px;
  padding: 0 10px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.youtube-carousel-title {
  display: none;
}

.youtube-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 5px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}

/* Masquer la scrollbar sur Chrome/Safari */
.youtube-carousel::-webkit-scrollbar {
  height: 6px;
}

.youtube-carousel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.youtube-carousel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  transition: background 0.3s;
}

.youtube-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

.youtube-carousel-item {
  flex: 0 0 auto;
  width: 140px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: #1c1f26;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.youtube-carousel-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(255,0,0,0.3);
}

.youtube-carousel-item.active {
  border: 3px solid #ff0000;
  box-shadow: 0 6px 16px rgba(255,0,0,0.5);
}

.youtube-carousel-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  overflow: hidden;
  background: #000;
}

.youtube-carousel-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.youtube-carousel-item:hover .youtube-carousel-thumbnail img {
  transform: scale(1.05);
}

.youtube-carousel-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: bold;
}

.youtube-carousel-info {
  padding: 6px;
  text-align: center;
}

.youtube-carousel-title-video {
  display: none;
}

.youtube-carousel-date {
  font-size: 0.7rem;
  color: #888;
}

.youtube-carousel-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255,0,0,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.youtube-carousel-item:hover .youtube-carousel-play-icon {
  opacity: 1;
}

.youtube-carousel-play-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
  margin-left: 3px;
}

/* Responsive carrousel */
@media (max-width: 768px) {
  .youtube-carousel-item {
    width: 120px;
  }

  .youtube-carousel-date {
    font-size: 0.65rem;
  }
}
