/* =========================
   RESET GLOBAL
========================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* =========================
   VARIABLES
========================= */
:root{
    --primary:#1DB954;
    --bg:#0f0f0f;
    --card:#181818;
    --text:#ffffff;
    --muted:#b8b8c2;
    --red:#ff0000;
}

/* =========================
   BASE
========================= */
body{
    font-family:Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
}

a{
    text-decoration:none;
    color:inherit;
}

/* =========================
   HEADER / NAV
========================= */
header{
    background:#121212;
    padding:15px 30px;
    border-bottom:2px solid var(--primary);
    position:sticky;
    top:0;
    z-index:1000;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

nav{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:20px;
    width:100%;
}

nav a{
    color:white;
    padding:10px 14px;
    border-radius:8px;
    transition:.3s;
    font-weight:600;
}

nav a:hover,
nav a.active{
    background:var(--primary);
    color:black;
    transform:translateY(-2px);
}

/* =========================
   MENU BURGER
========================= */
.menu-toggle{
    display:none;
    background:none;
    border:none;
    font-size:30px;
    color:white;
    cursor:pointer;
}

.nav-links{
    display:flex;
    gap:20px;
    align-items:center;
}

/* =========================
   DROPDOWN
========================= */
.dropdown{
    position:relative;
}

.dropdown-content{
    display:none;
    position:absolute;
    background:#1c1c1c;
    min-width:160px;
    top:100%;
    left:0;
    border-radius:8px;
    z-index:999;
}

.dropdown-content a{
    display:block;
    padding:10px;
}

.dropdown:hover .dropdown-content{
    display:block;
}

/* =========================
   HERO SECTION
========================= */
.hero{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:60px 20px;
    background:radial-gradient(circle at top,#1a1b2e,#0a0b10);
}

.hero-content{
    max-width:800px;
    display:flex;
    flex-direction:column;
    gap:15px;
}

.hero h1{
    font-size:3rem;
}

.hero p{
    color:var(--muted);
}

.slogan{
    font-style:italic;
}

/* =========================
   BUTTONS
========================= */
button{
    background:var(--primary);
    color:black;
    padding:10px 15px;
    border:none;
    border-radius:20px;
    cursor:pointer;
    transition:.3s;
}

button:hover{
    opacity:.9;
}

.btn-primary{
    background:var(--primary);
    color:white;
    padding:12px 25px;
    border-radius:30px;
    font-weight:bold;
}

.btn-secondary{
    border:1px solid #333;
    color:white;
    padding:12px 25px;
    border-radius:30px;
}

/* =========================
   SECTIONS
========================= */
.section{
    padding:60px 20px;
}

/* =========================
   CARDS / GRID
========================= */
.grid,
.albums-grid,
.playlists-grid,
.music-grid,
.top-artistes-grid{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:20px;
}

.card,
.album-card,
.playlist-card,
.music-card,
.artist-card{
    background:var(--card);
    padding:15px;
    border-radius:15px;
    width:220px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.3);
    display:flex;
    flex-direction:column;
}

.card img,
.album-card img,
.playlist-card img,
.artist-card img{
    width:100%;
    border-radius:10px;
}

/* =========================
   AUDIO
========================= */
audio{
    width:100%;
    margin-top:10px;
}

/* =========================
   PLAYER STICKY
========================= */
.player-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #0f0f0f;
    padding: 10px 0;
    border-top: 1px solid #222;

    display: flex;
    justify-content: center; /* 🔥 centre horizontalement */
    align-items: center;
}

.player-controls{
    display:flex;
    gap:20px;
}

.player-controls button{
    width:55px;
    height:55px;
    border-radius:50%;
    font-size:18px;
}

/* =========================
   ARTIST PAGE
========================= */
.artist-banner img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.profile-pic{
    width:140px;
    height:140px;
    border-radius:50%;
    border:4px solid var(--red);
    display:block;
    margin:-70px auto 10px;
    object-fit:cover;
}

/* =========================
   FORM
========================= */
form input,
form textarea,
select{
    width:100%;
    padding:12px;
    margin:10px 0;
    border:none;
    border-radius:8px;
    background:#1c1c1c;
    color:white;
}

/* =========================
   FOOTER
========================= */
footer{
    background:#121212;
    padding:40px 20px;
    border-top:2px solid var(--primary);
    text-align:center;
}

.footer-links{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:20px;
    margin-bottom:20px;
}

.footer-links a{
    padding:8px 12px;
    border-radius:6px;
}

.footer-links a:hover{
    background:var(--primary);
    color:black;
}

.footer-text{
    color:var(--muted);
    font-size:14px;
}

/* =========================
   CARD ACTIONS
========================= */
.card-actions{
    display:flex;
    gap:10px;
    margin-top:10px;
}

.btn-play{
    background:white;
    color:black;
    font-size:12px;
}

.btn-download{
    background:#ff3b3b !important;
    color:white !important;
    flex:1;
}

.btn-support{
    background:#222 !important;
    color:white;
    flex:1;
}

/* =========================
   MODAL
========================= */
.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.7);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-content{
    background:#181818;
    padding:20px;
    border-radius:12px;
    width:320px;
    text-align:center;
}

/* =========================
   RESPONSIVE MOBILE
========================= */
@media(max-width:768px){

    .hero{
        padding:40px 20px;
    }

    .hero h1{
        font-size:26px;
    }

    .hero p{
        font-size:14px;
    }

    .menu-toggle{
        display:block;
        margin-left:auto;
    }

    nav{
        flex-direction:column;
        align-items:flex-end;
    }

    .nav-links{
        display:none;
        flex-direction:column;
        width:100%;
        text-align:center;
        padding-top:15px;
        gap:15px;
    }

    .nav-links.active{
        display:flex;
    }

    .grid{
        display:grid;
        grid-template-columns:repeat(2,1fr);
        gap:15px;
    }

    .albums-grid,
    .playlists-grid,
    .music-grid,
    .top-artistes-grid{
        flex-direction:column;
        align-items:center;
    }

    .player-controls button{
        width:45px;
        height:45px;
    }

    .card button,
.modal button,
.btn-primary,
.btn-secondary{
    width:100%;
    margin-top:5px;
}

}/* RESET */
body {
  margin: 0;
  padding: 0;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

/* IMAGE DE FOND ANIMÉE */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  animation: bgSlide 20s infinite ease-in-out;

  z-index: 0;
}

/* CONTENU AU-DESSUS */
.hero * {
  position: relative;
  z-index: 2;
}

/* ANIMATION ENTRE 2 IMAGES + ZOOM */
@keyframes bgSlide {
  0% {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                      url("images/imagearriereplan.jpg");
    transform: scale(1);
  }

  50% {
    background-image: linear-gradient(rgba(0,100,0,0.4), rgba(0,0,0,0.6)),
                      url("images/imagearriereplan1.jpg");
    transform: scale(1.1);
  }

  100% {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                      url("images/imagearriereplan.jpg");
    transform: scale(1);
  }
}
.navbar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.logo span {
    font-weight: bold;
    font-size: 18px;
    color: white;
}
/* HEADER */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #111;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* IMAGE LOGO */
.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* TEXTE LOGO */
.logo span {
    color: white;
    font-weight: bold;
    font-size: 18px;
}
/* =========================
   GRID SAFE (NE CASSE PAS LE DESIGN)
========================= */
.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* ton design desktop */
    gap: 15px;
}

/* TABLETTE */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PETIT MOBILE (iPhone 7 etc) */
@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   CARTES SAFE
========================= */
.card {
    width: 100%;
    box-sizing: border-box;
}

/* IMAGES */
.card img {
    width: 100%;
    height: auto;
}

/* HERO */
.hero-content {
    padding: 20px;
}

/* MOBILE TEXT */
@media (max-width: 768px) {

    .hero h1 {
        font-size: 20px;
    }

    .hero p {
        font-size: 14px;
    }

    .player-controls button {
        font-size: 14px;
    }

    .logo span {
        font-size: 14px;
    }
}
/* =========================
   GRID 5 SAFE RESPONSIVE
========================= */
.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* GRAND ORDINATEUR OK (5 colonnes) */
@media (min-width: 1200px) {
    .grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ORDINATEUR PETIT */
@media (max-width: 1199px) {
    .grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* TABLETTE */
@media (max-width: 1024px) {
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* GRAND MOBILE */
@media (max-width: 768px) {
    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PETIT MOBILE */
@media (max-width: 480px) {
    .grid-5 {
        grid-template-columns: repeat(1, 1fr);
    }
}
/* =========================
   GRID 5 SAFE (TRIVOX FINAL)
========================= */
.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
}

/* PC petit */
@media (max-width: 1200px) {
    .grid-5 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* TABLETTE */
@media (max-width: 1024px) {
    .grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* iPHONE */
@media (max-width: 480px) {
    .grid-5 {
        grid-template-columns: 1fr;
    }
}

/* =========================
   CARD SAFE FIX
========================= */
.card {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* IMPORTANT iPHONE FIX IMAGE */
.card img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================
   GLOBAL FIX MOBILE SAFETY
========================= */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
.card {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
.card {
    width: 100%;
}
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

/* MOBILE */
@media (max-width: 768px) {

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #111;
        padding: 15px;
    }

    nav.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}
.card-actions{
    display:flex;
    gap:10px;
    margin-top:10px;
}

.card-actions button{
    flex:1;
    padding:8px;
    border:none;
    border-radius:20px;
    cursor:pointer;
    font-size:12px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #181818;
    padding: 20px;
    border-radius: 10px;
    text-align: center;

    width: 90%;
    max-width: 350px;

    animation: pop 0.25s ease;
}

@keyframes pop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #menuContainer {
        background: #000;
        position: relative;
        top: auto;
    }

    .menu {
        display: block;
    }
}
.main-content {
    background-image: url("images/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    padding: 40px 20px;
    min-height: 100vh;

    /* option pro */
    position: relative;
}

/* 🔥 overlay sombre pour lisibilité */
.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(0,0,0,0.6);
    z-index: 0;
}

/* 🔥 faire passer le contenu au-dessus */
.main-content > * {
    position: relative;
    z-index: 1;
}
.search-bar-wrapper {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #0f0f0f;
    padding: 10px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #222;
}

#searchInput {
    width: 60%;
    padding: 10px;
    border-radius: 25px;
    border: none;
    outline: none;
}
/* =========================
   FIX MENU MOBILE FINAL (SANS CASSER TON CODE)
========================= */

/* On garde ton nav desktop intact */
nav {
    display: flex;
}

/* MOBILE */
@media (max-width: 768px) {

    /* 🔥 Fix header structure */
    header {
        align-items: flex-start;
    }

    /* 🔥 Bouton burger visible */
    .menu-toggle,
    .hamburger {
        display: block;
        margin-left: auto;
        z-index: 10001;
    }

    /* 🔥 MENU CACHÉ PAR DÉFAUT */
    nav {
        display: none !important;
        flex-direction: column;
        width: 100%;
        background: #111;
        position: absolute;
        top: 70px;
        left: 0;
        padding: 15px 0;
        z-index: 10000;
    }

    /* 🔥 MENU OUVERT */
    nav.active {
        display: flex !important;
    }

    /* 🔥 liens bien visibles */
    nav a {
        width: 100%;
        text-align: center;
        padding: 15px;
        border-bottom: 1px solid #222;
    }

    /* 🔥 fix dropdown mobile */
    .dropdown-content {
        position: relative;
        background: #222;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }
}
/* =========================
   FIX FINAL GRID MOBILE
========================= */
@media (max-width: 768px) {

    .grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    #musicGrid,
    #albumsGrid,
    #blogGrid,
    #playlistGrid,
    #artistsContainer {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

/* =========================
   MOBILE MENU FIX
========================= */
nav {
    display: flex;
}

@media (max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
        background: #111;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 15px;
        z-index: 9999;
    }

    nav.active {
        display: flex !important;
    }

    .hamburger {
        display: block;
        font-size: 28px;
        cursor: pointer;
        color: white;
    }
}
@media (max-width: 768px) {

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #111;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 15px;
        z-index: 9999;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        font-size: 28px;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
    }
}
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
.nav-links {
  display: flex;
  gap: 20px;
}

/* MOBILE */
@media (max-width: 768px) {

  .nav-links {
    display: none;
    flex-direction: column;
    background: #111;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 20px;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    font-size: 24px;
    cursor: pointer;
  }
}
/* =========================
   FIX MENU FINAL (PRIORITAIRE)
========================= */

/* Desktop OK */
nav {
    display: flex !important;
}

/* Mobile */
@media (max-width: 768px) {

    /* 🔥 On cache UNIQUEMENT les liens */
    .nav-links {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: #111;
        width: 220px;
        padding: 20px;
        z-index: 10000;
    }

    /* 🔥 Quand actif → visible */
    .nav-links.active {
        display: flex !important;
    }

    /* 🔥 Burger visible */
    .menu-toggle {
        display: block !important;
        font-size: 26px;
        cursor: pointer;
        z-index: 10001;
    }

    /* 🔥 IMPORTANT : ne plus cacher nav */
    nav {
        display: flex !important;
        position: relative;
    }
}
/* =========================
   FIX MODAL (IMPORTANT)
========================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* FORCE affichage JS */
.modal.show {
    display: flex !important;
}

.modal-content {
    background: #181818;
    padding: 20px;
    border-radius: 10px;
    width: 320px;
    text-align: center;
}