/* =========================================
   1. VARIABLES & RESET
   Ici, on définit les couleurs et polices globales.
   Si on veut changer le jaune partout, on le change juste ici.
   ========================================= */
:root {
    /* Palette */
    --bg-dark: #1A1A1A;       /* Gris foncé (fond principal) */
    --bg-darker: #111111;     /* Noir presque pur (sections alternées) */
    --text-light: #F2F2F2;    /* Blanc cassé (plus doux pour les yeux) */
    --text-gray: #A0A0A0;     /* Gris pour les textes secondaires */
    --accent-yellow: #FFC107; /* Couleur "Marque" (Boutons, liens, actions) */
    
    /* Typography */
    /* Fallback sur Rokkitt si Rockwell n'est pas dispo */
    --font-main: 'Inter', sans-serif;
    --font-rock: 'Rockwell', 'Rokkitt', serif; 
    
    /* Spacing & UI */
    --border-width: 2px;
    --container-width: 1200px;
    --header-height: 70px; /* Hauteur fixe du menu pour le scroll */
}

/* Reset CSS : On enlève les marges par défaut du navigateur */
* {
    box-sizing: border-box; /* Les bordures et padding sont inclus dans la largeur */
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar & Selection */
/* Personnalisation de la barre de défilement (Chrome/Safari/Edge) */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-yellow);
}

/* Couleur de surbrillance quand on sélectionne du texte */
::selection {
    background: var(--accent-yellow);
    color: var(--bg-dark);
}

html {
    scroll-behavior: smooth; /* Permet le défilement doux lors du clic sur les ancres */
    scroll-padding-top: var(--header-height); /* Décale l'arrivée du scroll pour ne pas être caché par le menu */
}

body {
    background-color: --bg-dark; /* Fallback */
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; } /* Images responsives par défaut */

/* =========================================
   1.1 PRELOADER & ANIMATIONS
   Écran de chargement qui disparaît via JS
   ========================================= */
#preloader {
    position: fixed; /* Couvre tout l'écran */
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-text {
    /* Style du texte de chargement */
    font-family: var(--font-rock);
    font-size: 3rem;
    color: var(--accent-yellow);
    letter-spacing: 5px;
    animation: pulse 1.5s infinite;
}

/* Animation de pulsation (battement de coeur) */
@keyframes pulse {
    0% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(0.95); }
}

/* Classe utilitaire pour l'apparition au scroll (Scroll Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   2. UTILITIES & COMPONENTS
   Classes réutilisables partout sur le site
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-padding {
    padding: 4rem 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.text-accent {
    color: var(--accent-yellow);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-rock);
    text-transform: uppercase; /* Force les titres en majuscules */
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-yellow);
    padding-left: 1rem;
}

/* Buttons : Style de base pour tous les boutons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-main);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: var(--border-width) solid var(--accent-yellow);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Par défaut : fond transparent, bordure jaune */
    background: transparent;
    color: var(--accent-yellow);
}

.btn-primary {
    /* Variante pleine : fond jaune, texte noir */
    background-color: var(--accent-yellow);
    color: var(--bg-dark);
}

.btn-primary:hover {
    /* Au survol : inverse les couleurs */
    background-color: transparent;
    color: var(--accent-yellow);
}

.btn-outline:hover {
    background-color: var(--accent-yellow);
    color: var(--bg-dark);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* =========================================
   3. HEADER & NAV (Mobile First)
   On commence par le style mobile, puis on adapte pour desktop plus bas
   ========================================= */
.site-header {
    background-color: transparent;
    height: var(--header-height);
    position: fixed; /* Reste collé en haut */
    top: 0;
    width: 100%;
    z-index: 1000; /* Au-dessus de tout le reste */
    border-bottom: 1px solid transparent;
    backdrop-filter: none;
    transition: all 0.4s ease; /* Transition douce pour le changement de couleur au scroll */
}

.site-header.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid #333;
    /* Effet de flou derrière le menu (style verre dépoli) */
    backdrop-filter: blur(5px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-rock);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* Header Actions */
/* Conteneur des icônes (User, Panier, Favoris) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.action-btn:hover {
    color: var(--accent-yellow);
}

/* Mise en évidence du bouton Profil */
/* Le bouton user est un cercle jaune pour attirer l'attention */
#user-btn {
    background-color: var(--accent-yellow);
    color: var(--bg-dark);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#user-btn:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
    transform: scale(1.1);
}

/* Petit badge rouge/jaune pour le nombre d'articles */
.badge-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--accent-yellow);
    color: var(--bg-dark);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Burger Menu */
/* Le bouton avec les 3 barres, visible uniquement sur mobile */
.burger-menu {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-light);
    transition: all 0.3s ease-in-out;
}

/* Navigation Overlay Mobile */
/* Le menu plein écran qui glisse depuis la droite */
.main-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Caché par défaut */
    width: 100%;
    height: 100vh; /* Prend toute la hauteur */
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
}

.main-nav.active {
    right: 0;
}

.main-nav ul {
    text-align: center;
}

.main-nav li {
    margin: 2rem 0;
}

.nav-link {
    font-family: var(--font-rock);
    font-size: 2rem;
    color: var(--text-light);
    transition: color 0.3s;
}

.nav-link.active-section {
    /* Style du lien quand on est sur la section correspondante */
    color: var(--accent-yellow);
    border-bottom: 2px solid var(--accent-yellow);
}

.nav-link:hover {
    color: var(--accent-yellow);
}

/* Animation Burger en croix (transforme les barres en X) */
.burger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.burger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.burger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =========================================
   4. HERO SECTION
   La grande section d'accueil avec la vidéo
   ========================================= */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    background-color: var(--bg-dark); /* Fallback couleur */
}

.hero-video {
    /* La vidéo prend tout l'espace en arrière-plan */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6; /* Légère transparence pour fondre avec le noir */
}

/* Calque sombre par-dessus la vidéo pour que le texte reste lisible */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 193, 7, 0.1) 0%, rgba(26, 26, 26, 0.9) 80%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* =========================================
   5. BAND MEMBERS (New)
   Grille pour afficher les membres du groupe
   ========================================= */
.band-bio {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.band-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

.member-card h3 {
    margin-top: 1rem;
    font-size: 1.5rem;
}

.member-photo {
    /* Photo ronde avec bordure jaune */
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-yellow);
    transition: transform 0.3s ease;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-card:hover .member-photo {
    /* Zoom léger au survol */
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

/* =========================================
   6. CONCERTS
   Liste des dates de tournée
   ========================================= */
.concert-item {
    display: flex;
    flex-direction: column;
    background: #222;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #333;
    transition: transform 0.3s;
}

.concert-item:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-5px);
}

.concert-date {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--accent-yellow);
    font-family: var(--font-rock);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.concert-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.concert-info p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* =========================================
   7. BOUTIQUE (Grid)
   Système de grille pour les produits
   ========================================= */
.shop-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid #444;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--font-main);
}

.filter-btn.active, .filter-btn:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonne sur mobile par défaut */
    gap: 2rem;
}

.product-card {
    background: #222;
    border: 1px solid #333;
    transition: 0.3s;
}

.product-card:hover {
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%; /* Remplit le conteneur */
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    /* Zoom sur l'image produit au survol de la carte */
    transform: scale(1.1);
}

.btn-fav-toggle {
    /* Bouton coeur sur l'image produit */
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(26, 26, 26, 0.7);
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.btn-fav-toggle:hover, .btn-fav-toggle.active {
    color: #ff4d4d; /* Rouge coeur */
    background: rgba(255, 255, 255, 0.9);
}

.badge {
    /* Étiquette "Goodies" ou "Occasion" */
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--text-light);
}

.badge-accent {
    background: var(--accent-yellow);
    color: var(--bg-dark);
    border: none;
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.1rem;
    color: var(--accent-yellow);
    font-weight: bold;
    margin-bottom: 1rem;
}

/* =========================================
   8. FOOTER
   Pied de page
   ========================================= */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid #333;
    color: var(--text-gray);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-newsletter h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a:hover {
    color: var(--accent-yellow);
}

/* =========================================
   9. CONTACT FORM
   Style du formulaire
   ========================================= */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #222;
    padding: 2rem;
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-main);
    color: var(--text-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-dark);
    border: 1px solid #444;
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    /* Bordure jaune quand on clique dans le champ */
    outline: none;
    border-color: var(--accent-yellow);
}

/* =========================================
   10. BACK TO TOP BUTTON
   Flèche qui apparaît pour remonter en haut
   ========================================= */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-yellow);
    color: var(--bg-dark);
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--text-light);
    transform: translateY(-3px);
}

/* =========================================
   11. MODALS & SIDEBARS
   Fenêtres modales (Login) et Barres latérales (Panier)
   ========================================= */
/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none; /* Hidden by default */
    /* Centrage du contenu */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-darker);
    padding: 2rem;
    border: 1px solid var(--accent-yellow);
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
}

.close-modal, .close-sidebar {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

.modal-footer-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-yellow);
}

/* Sidebar Cart */
.sidebar {
    /* Panneau latéral qui glisse depuis la droite */
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--bg-darker);
    border-left: 1px solid #333;
    z-index: 2000;
    /* Caché hors de l'écran à droite */
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.sidebar.active {
    /* On le ramène à sa place (0) */
    transform: translateX(0);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin: 1rem 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 1rem 0;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.remove-item-btn, .remove-fav-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    margin-left: 10px;
}

/* =========================================
   12. TOAST NOTIFICATIONS
   Petites alertes temporaires en bas de l'écran
   ========================================= */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Permet de cliquer à travers le conteneur vide */
}

.toast {
    background: var(--bg-darker);
    color: var(--text-light);
    padding: 1rem 2rem;
    border: 1px solid var(--accent-yellow);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    opacity: 0;
    /* Animation d'entrée puis de sortie après 3s */
    transform: translateY(20px);
    animation: toastIn 0.3s forwards, toastOut 0.3s forwards 3s;
    min-width: 300px;
    text-align: center;
    font-weight: 600;
    pointer-events: auto;
}

.toast.success { border-color: #4CAF50; color: #4CAF50; }
.toast.error { border-color: #f44336; color: #f44336; }

@keyframes toastIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-20px); }
}

/* =========================================
   13. MEDIA QUERIES (Desktop)
   Adaptations pour les écrans plus larges (Tablettes et PC)
   ========================================= */
@media (min-width: 768px) {
    /* Header */
    .burger-menu {
        display: none; /* On cache le burger sur PC */
    }

    .main-nav {
        /* On réinitialise le style mobile pour afficher le menu horizontalement */
        position: static;
        height: auto;
        width: auto;
        background: none;
        display: block;
        margin-left: auto; /* Pousse la nav et les actions vers la droite */
        margin-right: 2rem; /* Espace entre la nav et les icônes */
    }

    .main-nav ul {
        display: flex;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1rem;
        font-family: var(--font-main);
        font-weight: 600;
        text-transform: uppercase;
    }

    /* Hero */
    .hero-title {
        font-size: 5rem;
    }

    /* Band */
    .band-grid {
        /* 3 colonnes pour les membres */
        grid-template-columns: repeat(3, 1fr);
    }

    /* Concerts */
    .concert-item {
        /* Alignement horizontal date + infos */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
    
    .concert-date {
        margin-bottom: 0;
        width: 100px;
        flex-direction: column;
        align-items: center;
        border-right: 1px solid #444;
        margin-right: 2rem;
    }

    .concert-info {
        flex-grow: 1;
    }
    
    .concert-info p {
        margin-bottom: 0;
    }

    /* Shop */
    .shop-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes tablette */
    }

    /* Footer */
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .footer-newsletter form {
        display: flex;
        gap: 0.5rem;
    }
}

@media (min-width: 1024px) {
    .shop-grid {
        /* 4 produits par ligne sur grand écran */
        grid-template-columns: repeat(4, 1fr);
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   14. DASHBOARD STYLES
   Styles spécifiques à la page "Mon Espace"
   ========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.dash-card {
    background: var(--bg-darker);
    border: 1px solid #333;
    padding: 2rem;
    border-radius: 4px;
}

.dash-card h3 {
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    color: var(--accent-yellow);
}

.dash-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #333;
    position: relative; /* Pour le badge absolu si besoin */
}
