*{box-sizing:border-box;margin:0;padding:0}

/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

body{
  font-family:'Circular','Spotify',system-ui,-apple-system,sans-serif;
  background:#121212;
  min-height:100vh;
  color:#fff;
  padding:0;
  padding-bottom:110px; /* Espace pour le player seulement */
  overflow-x:hidden;
  display:flex;
  flex-direction:column;
}

.container{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
  flex:1; /* Prend tout l'espace disponible */
  display:flex;
  flex-direction:column;
}

header{
  padding:24px 32px;
  background:linear-gradient(180deg, rgba(138,43,226,0.3) 0%, #121212 100%);
  margin-bottom:24px;
}

.header-content{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.header-left{
  flex:1;
}

.menu-btn{
  background:rgba(255,255,255,0.1);
  border:none;
  color:#fff;
  font-size:1.5rem;
  width:40px;
  height:40px;
  border-radius:50%;
  cursor:pointer;
  transition:background 0.2s;
  display:flex;
  align-items:center;
  justify-content:center;
}

.menu-btn:hover{
  background:rgba(255,255,255,0.2);
}

.menu-dropdown{
  position:absolute;
  top:80px;
  right:32px;
  background:rgba(40,40,40,0.98);
  border-radius:8px;
  box-shadow:0 4px 20px rgba(0,0,0,0.5);
  min-width:200px;
  z-index:1000;
  display:none;
  overflow:hidden;
  backdrop-filter:blur(10px);
}

.menu-dropdown.show{
  display:block;
  animation:slideDown 0.2s ease;
}

@keyframes slideDown{
  from{
    opacity:0;
    transform:translateY(-10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.menu-item{
  display:block;
  padding:12px 20px;
  color:rgba(255,255,255,0.9);
  text-decoration:none;
  transition:background 0.2s;
  font-size:0.9rem;
}

.menu-item:hover{
  background:rgba(139,92,246,0.3);
  color:#fff;
}

h1{
  font-size:2rem;
  font-weight:700;
  letter-spacing:-0.5px;
  margin-bottom:8px;
}

.subtitle{
  opacity:0.7;
  font-size:0.875rem;
  font-weight:400;
}

.categories{
  display:flex;
  gap:8px;
  padding:0 32px 24px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

.category-btn{
  background:#282828;
  color:#fff;
  border:none;
  padding:8px 16px;
  border-radius:20px;
  font-size:0.875rem;
  cursor:pointer;
  transition:background 0.2s ease;
  font-weight:400;
  white-space:nowrap;
  flex-shrink:0;
}

.category-btn:hover{
  background:#3e3e3e;
}

.category-btn.active{
  background:#8b5cf6;
  color:#fff;
  font-weight:600;
}

/* Radio Stations Grid */
.radio-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
  gap:24px;
  padding:0 32px 32px;
}

.radio-card{
  --card-color:#1a1a1a;
  background: #242424;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.radio-card::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.radio-card:hover{
  background: #2a2a2a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.radio-card:hover::before{
  opacity: 1;
}

.radio-card.active{
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.radio-card.playing{
  background: #2a2a2a;
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.radio-icon{
  font-size: 3rem;
  margin-bottom: auto;
  filter: grayscale(0.3) brightness(0.9);
  transition: all 0.3s ease;
}

.radio-card:hover .radio-icon{
  filter: grayscale(0) brightness(1);
  transform: scale(1.05);
}

.radio-name{
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: none;
  line-height: 1.3;
}

.radio-play-btn{
  background: #8b5cf6;
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(8px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.radio-card:hover .radio-play-btn{
  opacity: 1;
  transform: translateY(0);
}

.radio-play-btn:hover{
  background: #a78bfa;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.6);
}

.radio-play-btn:active{
  transform:scale(0.95);
}

/* Player */
.player{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#181818;
  border-top:1px solid #282828;
  padding:16px 24px;
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
  display:grid;
  grid-template-columns:1fr 2fr 1fr;
  align-items:center;
  gap:24px;
  height:90px;
  z-index:100;
}

.player-expand-btn{
  display:none;
}

.player-info{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.now-playing{
  font-size:0.75rem;
  opacity:0.6;
  text-transform:uppercase;
  letter-spacing:0.5px;
  font-weight:600;
}

.current-station{
  font-size:0.875rem;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.player-center{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
}

.player-controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:16px;
}

.control-btn{
  background:transparent;
  color:#b3b3b3;
  border:none;
  cursor:pointer;
  transition:color 0.2s ease, transform 0.1s ease;
  padding:8px;
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
}

.control-btn svg{
  width:100%;
  height:100%;
  fill:currentColor;
}

.control-btn:hover{
  color:#fff;
  background:rgba(255,255,255,0.1);
}

.control-btn.play-pause{
  background:#fff;
  color:#000;
  width:36px;
  height:36px;
}

.control-btn.play-pause svg{
  width:20px;
  height:20px;
}

.control-btn.play-pause:hover{
  background:#fff;
  transform:scale(1.05);
}

.progress-bar{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
}

.time-display{
  font-size:0.75rem;
  opacity:0.7;
  min-width:40px;
  text-align:center;
}

.progress-slider{
  flex:1;
  -webkit-appearance:none;
  appearance:none;
  height:4px;
  background:#4d4d4d;
  border-radius:2px;
  outline:none;
  cursor:pointer;
}

.progress-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:12px;
  height:12px;
  background:#fff;
  border-radius:50%;
  cursor:pointer;
  opacity:0;
  transition:opacity 0.2s ease, transform 0.2s ease;
  margin-top:-4px;
}

.progress-slider:hover::-webkit-slider-thumb{
  opacity:1;
  transform:scale(1.2);
}

.progress-slider::-moz-range-thumb{
  width:12px;
  height:12px;
  background:#fff;
  border-radius:50%;
  border:none;
  cursor:pointer;
  opacity:0;
  transition:opacity 0.2s ease, transform 0.2s ease;
}

.progress-slider:hover::-moz-range-thumb{
  opacity:1;
  transform:scale(1.2);
}

.progress-slider::-webkit-slider-runnable-track{
  background:linear-gradient(to right, #fff 0%, #fff var(--progress, 0%), #4d4d4d var(--progress, 0%), #4d4d4d 100%);
  height:4px;
  border-radius:2px;
}

.progress-slider::-moz-range-track{
  background:#4d4d4d;
  height:4px;
  border-radius:2px;
}

.progress-slider::-moz-range-progress{
  background:#fff;
  height:4px;
  border-radius:2px;
}

.volume-control{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
}

.volume-icon{
  cursor:pointer;
  font-size:1.25rem;
  transition:opacity 0.2s ease;
}

.volume-icon:hover{
  opacity:0.7;
}

.volume-slider{
  -webkit-appearance:none;
  appearance:none;
  width:100px;
  height:4px;
  background:#4d4d4d;
  border-radius:2px;
  outline:none;
  cursor:pointer;
}

.volume-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:12px;
  height:12px;
  background:#fff;
  border-radius:50%;
  cursor:pointer;
  transition:transform 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover{
  transform:scale(1.1);
}

.volume-slider::-moz-range-thumb{
  width:12px;
  height:12px;
  background:#fff;
  border-radius:50%;
  border:none;
  cursor:pointer;
  transition:transform 0.1s ease;
}

.volume-slider::-moz-range-thumb:hover{
  transform:scale(1.1);
}

.status{
  text-align:center;
  padding:48px 32px;
  opacity:0.6;
  font-size:0.875rem;
  display:none;
}

/* Responsive */
@media (max-width:768px){
  .player{
    grid-template-columns:auto 1fr auto;
    grid-template-rows:auto auto;
    height:auto;
    padding:12px 16px;
    padding-bottom:calc(20px + env(safe-area-inset-bottom));
    gap:8px;
    transition:all 0.3s ease;
  }
  
  .player-expand-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    border:none;
    color:#b3b3b3;
    cursor:pointer;
    padding:4px;
    width:32px;
    height:32px;
    transition:transform 0.3s ease, color 0.2s ease;
    grid-row:1;
    grid-column:3;
  }
  
  .player-expand-btn:hover{
    color:#fff;
  }
  
  .player.expanded .player-expand-btn{
    transform:rotate(180deg);
  }
  
  .player-info{
    grid-row:1;
    grid-column:2;
    gap:2px;
  }
  
  .now-playing{
    font-size:0.65rem;
  }
  
  .current-station{
    font-size:0.8rem;
  }
  
  .player-center{
    grid-row:2;
    grid-column:1 / -1;
    max-height:0;
    overflow:hidden;
    opacity:0;
    transition:max-height 0.3s ease, opacity 0.3s ease;
    gap:4px;
  }
  
  .player.expanded .player-center{
    max-height:200px;
    opacity:1;
    margin-bottom:env(safe-area-inset-bottom, 0px);
  }
  
  .player-controls{
    gap:8px;
  }
  
  .control-btn{
    width:28px;
    height:28px;
    padding:6px;
  }
  
  .control-btn.play-pause{
    width:36px;
    height:36px;
  }
  
  /* Améliorer l'accessibilité de la barre de progression sur mobile */
  .progress-bar{
    padding:12px 0;
  }
  
  .progress-slider{
    height:6px;
    cursor:pointer;
    touch-action:none;
  }
  
  .progress-slider::-webkit-slider-thumb{
    width:16px;
    height:16px;
    opacity:1;
    margin-top:-5px;
  }
  
  .progress-slider::-moz-range-thumb{
    width:16px;
    height:16px;
    opacity:1;
  }
  
  .volume-control{
    display:none;
  }
  
  .radio-grid{
    grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
    gap:12px;
    padding:0 16px 16px;
  }
  
  .radio-card{
    padding:16px;
    border-radius: 6px;
  }
  
  .radio-icon{
    font-size: 2.5rem;
  }
  
  .radio-name{
    font-size: 0.95rem;
  }
  
  .radio-play-btn{
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
    opacity: 1;
    transform: translateY(0);
  }
  
  .categories{
    padding:0 16px 16px;
    gap:12px;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  
  .categories::-webkit-scrollbar{
    display:none;
  }
  
  header{
    padding:16px;
  }
  
  footer{
    font-size:0.7rem;
    padding:16px;
    position:relative;
    /* Le footer apparaît naturellement en bas du contenu sur mobile */
  }
  
  body{
    padding-bottom:140px; /* Espace pour le player + marge sur mobile */
  }
}

/* Footer */
footer{
  position:relative;
  background:rgba(18,18,18,0.95);
  padding:20px 32px;
  text-align:center;
  font-size:0.75rem;
  color:rgba(255,255,255,0.4);
  border-top:1px solid rgba(255,255,255,0.05);
  margin-top:auto; /* Pousse le footer tout en bas */
  min-height:60px;
}

footer a{
  color:rgba(255,255,255,0.5);
  text-decoration:none;
  margin:0 12px;
  transition:color 0.2s;
}

footer a:hover{
  color:rgba(255,255,255,0.8);
}

footer .separator{
  margin:0 4px;
  opacity:0.3;
}

/* Content pages */
#pageContainer{
  overflow-y:auto;
  max-height:calc(100vh - 200px); /* Viewport height moins header et player */
  padding-bottom:2rem;
}

.page-content{
  max-width:900px;
  margin:2rem auto;
  padding:2rem;
  background:rgba(255,255,255,0.05);
  border-radius:12px;
  animation:fadeIn 0.3s ease;
}

@keyframes fadeIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}

.page-content h1{
  color:#a855f7;
  margin-bottom:2rem;
  font-size:2rem;
}

.page-content h2{
  color:#8b5cf6;
  margin-top:2rem;
  margin-bottom:1rem;
  font-size:1.5rem;
}

.page-content p{
  line-height:1.8;
  margin-bottom:1rem;
  color:rgba(255,255,255,0.8);
}

.page-content ul{
  margin-left:1.5rem;
  line-height:1.8;
  color:rgba(255,255,255,0.8);
}

.back-link{
  display:inline-block;
  margin-bottom:2rem;
  color:#a855f7;
  text-decoration:none;
  transition:color 0.2s;
  cursor:pointer;
}

.back-link:hover{
  color:#8b5cf6;
}

/* Skeleton loaders */
.radio-card.skeleton{
  background:rgba(255,255,255,0.05);
  pointer-events:none;
  animation:skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse{
  0%, 100%{ opacity:1; }
  50%{ opacity:0.5; }
}

.skeleton-icon{
  width:60px;
  height:60px;
  border-radius:50%;
  background:linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size:200% 100%;
  animation:skeleton-shimmer 1.5s infinite;
}

.skeleton-text{
  width:80%;
  height:20px;
  margin:16px auto 0;
  border-radius:10px;
  background:linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size:200% 100%;
  animation:skeleton-shimmer 1.5s infinite;
}

.skeleton-button{
  width:40px;
  height:40px;
  margin:16px auto 0;
  border-radius:50%;
  background:linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size:200% 100%;
  animation:skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer{
  0%{ background-position:200% 0; }
  100%{ background-position:-200% 0; }
}
