:root {
    --bg-color: #0d0d0d;
    --text-color: #f2f2f2;
    --accent-color: #7b838c; /* metallic gray/silver accent */
    --card-bg: #1a1a1a;
    --nav-bg: rgba(13, 13, 13, 0.9);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%; /* Padding réduit */
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    max-height: 55px; /* Logo réduit pour ne pas prendre trop de place */
    transition: max-height 0.3s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 5px;
    margin-bottom: 20px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* About Section */
.dark-section {
    background-color: var(--bg-color);
}

.lighter-section {
    background-color: #111;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 50px;
    text-align: center;
    font-weight: 900;
    letter-spacing: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 20px;
}

.about-image-placeholder {
    height: 400px;
    background-color: var(--card-bg);
    border-radius: 10px;
    background: url('assets/about.jpg') center/cover;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.card-img {
    height: 250px;
    background-color: #222;
    background-size: cover;
    background-position: center;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.card-info p {
    color: #888;
    margin-bottom: 15px;
}

.listen-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
}

.listen-link:hover {
    color: #fff;
}

/* Contact */
.contact-text {
    text-align: center;
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 40px;
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    display: block;
    width: max-content;
    margin: 0 auto 50px auto;
}

.secondary-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-icon {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icon:hover {
    color: var(--accent-color);
}

footer {
    text-align: center;
    padding: 30px;
    background-color: #050505;
    font-size: 0.9rem;
    color: #666;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s, transform 1s;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Formulaire de Contact */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 14px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: left;
}

.form-group label {
    margin-bottom: 0;
    color: #888;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding-left: 2px;
}

/* Input wrapper avec icône */
.contact-form .input-wrap {
    position: relative;
}

.contact-form .input-icon {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 16px;
    font-size: 15px;
    color: #3a3a3a;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px 12px 40px;
    background-color: #161616;
    border: 1px solid #272727;
    border-radius: 10px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-group textarea {
    padding: 12px 14px;
    resize: vertical;
    min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #3d3d3d;
    font-style: italic;
}

.form-group select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #484848;
    background-color: #1b1b1b;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}

.form-group:focus-within label {
    color: #bbb;
}

.contact-form .form-group:focus-within .input-icon {
    color: #666;
}

.submit-btn {
    border: none;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: left;
}

.alert.success {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.alert.error {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* Events Section */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.event-item {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 20px 30px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.event-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 30px;
    border-right: 2px solid #333;
    min-width: 100px;
}

.event-date .day {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #888;
}

.event-details {
    flex: 1;
    padding: 0 30px;
    text-align: left;
}

.event-details h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.event-location {
    color: #aaa;
    font-size: 1rem;
}

.event-action {
    margin-left: auto;
}

/* Merch Section */
.merch-info {
    text-align: center;
}

.merch-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color) !important;
    margin: 10px 0 !important;
}

.merch-stock {
    font-size: 0.9rem;
    color: #2ecc71;
    margin-bottom: 15px !important;
    text-transform: uppercase;
    font-weight: 700;
}

.merch-stock.out-of-stock {
    color: #e74c3c;
}

.merch-btn {
    width: 100%;
    padding: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }
    .nav-links.active {
        left: 0;
        padding-bottom: 30px;
    }
    .nav-links li {
        margin: 20px 0;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 3.5rem;
    }
}

/* Dashboard Layout */
.dashboard-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 120px auto 60px auto; /* Margin-top de 120px pour ne pas être caché par la navbar */
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dashboard-section {
    margin-bottom: 50px;
}

.dashboard-section-title {
    font-size: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid #222;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.messages-list, .cart-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-item, .cart-item {
    background: var(--card-bg);
    border: 1px solid #222;
    padding: 20px;
    border-radius: 10px;
}


/* ============================================================
   NAVIGATION ACTIVE AU SCROLL
   La classe .active est ajoutée par script.js via IntersectionObserver.
   On utilise un soulignement animé plutôt qu'un simple changement
   de couleur pour rester cohérent avec l'esthétique minimaliste.
   ============================================================ */
.nav-links a {
    position: relative; /* nécessaire pour le pseudo-élément ::after */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-color);
    /* Transition sur la largeur pour un effet de soulignement qui glisse */
    transition: width 0.3s ease;
}

/* Soulignement au hover */
.nav-links a:hover::after {
    width: 100%;
}

/* Soulignement permanent sur la section active (ajouté par JS) */
.nav-links a.active {
    color: #fff;
}

.nav-links a.active::after {
    width: 100%;
    /* Couleur accent pour distinguer actif du simple hover */
    background-color: var(--accent-color);
}

/* ============================================================
   NAVBAR — RÉDUCTION AU SCROLL
   La classe .scrolled est ajoutée par script.js quand
   window.scrollY > 50px.
   ============================================================ */
.navbar.scrolled {
    /* Fond plus opaque pour meilleure lisibilité sur les sections claires */
    background: rgba(13, 13, 13, 0.97);
    padding-top: 6px;
    padding-bottom: 6px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Le logo se réduit légèrement quand la navbar est compressée */
.navbar.scrolled .logo {
    max-height: 40px;
}

/* ============================================================
   BADGE PANIER
   Petit cercle rouge positionné en haut à droite du lien
   "Mon espace" dans la navbar. Le HTML est généré côté PHP
   dans index.php uniquement si cart_count > 0.
   ============================================================ */
.nav-btn {
    position: relative; /* ancre le badge en position absolue */
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    /* Légère animation d'apparition pour attirer l'attention */
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes badgePop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ============================================================
   RESPONSIVE — FORMULAIRE DE CONTACT MOBILE
   La .form-row (deux champs côte à côte) passait en layout
   desktop même sur mobile, rendant les champs trop étroits.
   On force le passage en colonne sous 600px.
   ============================================================ */
@media (max-width: 600px) {
    /* Les paires de champs passent en colonne sur mobile */
    .form-row {
        flex-direction: column;
        gap: 0; /* le gap est déjà géré par contact-form (gap: 20px) */
    }

    /* Le formulaire de contact prend toute la largeur sur mobile */
    .contact-form-container {
        padding: 24px 16px;
    }

    /* Section title plus petite sur mobile */
    .section-title {
        font-size: 2rem;
    }

    /* Les événements : réorganisation pour mobile */
    .event-item {
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px;
    }

    .event-date {
        border-right: none;
        border-bottom: 1px solid #333;
        padding-right: 0;
        padding-bottom: 12px;
        width: 100%;
        flex-direction: row;
        gap: 8px;
        align-items: baseline;
    }

    .event-date .day {
        font-size: 2rem;
    }

    .event-details {
        padding: 0;
    }

    .event-action {
        width: 100%;
        margin-left: 0;
    }

    .event-action .cta-button {
        width: 100%;
        text-align: center;
    }
}
