/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --gold: #d4a017;
    --dark: #1a1a1a;
    --glass: rgba(0, 0, 0, 0.7); /* Fond sombre transparent */
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --font-titles: 'Playfair Display', serif;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    /* Image de fond visible partout (voile à 0.4) */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('../images/hero-bg.jpeg') center/cover fixed; 
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; 
    padding: 20px; 
}

/* ==========================================================================
   2. HEADER & NAVIGATION (MODIFIÉ POUR LE BURGER)
   ========================================================================== */
header {
    background-color: var(--dark);
    padding: 0.8rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--gold);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- LOGO --- */
.logo a {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- LIENS DE NAVIGATION --- */
.nav-links {
    display: none; /* CACHÉ PAR DÉFAUT SUR MOBILE */
    list-style: none;
    gap: 30px;
    /* Style pour le menu mobile ouvert */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark);
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--gold);
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* --- EFFET PAGE ACTIVE ET SURVOL --- */
.nav-links a.active, 
.nav-links a:hover {
    color: var(--gold);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a.active::after { width: 100%; }
.nav-links a:hover::after { width: 100%; }

/* --- MENU BURGER LOGIQUE --- */
.menu-toggle {
    display: none; 
}

/* Affiche le menu quand la checkbox est cochée */
.menu-toggle:checked ~ .nav-links {
    display: flex;
}

.burger-label {
    display: flex; /* Visible par défaut sur mobile */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.burger-label span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--gold); 
    border-radius: 2px;
    transition: 0.3s;
}

/* ==========================================================================
   3. ÉLÉMENTS COMMUNS (Titres & Boutons)
   ========================================================================== */
.listing-header, .page-banner {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

h1 { 
    color: var(--gold); 
    text-transform: uppercase; 
    font-size: 2.5rem;
    letter-spacing: 1px;
    font-style: italic;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
}
h1, h2, h3, .logo a {
    font-family: var(--font-titles);
    font-weight: 700;
}

.actions { text-align: center; margin-top: 40px; }
.btn-retour {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--dark);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid var(--gold);
    transition: 0.3s;
}
.btn-retour:hover { background-color: var(--gold); color: var(--dark); }

/* ==========================================================================
   4. PAGE INDEX
   ========================================================================== */
.index-intro {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.intro-box {
    background: var(--glass); 
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    max-width: 750px; 
    text-align: center;
    border: 1px solid rgba(212, 160, 23, 0.3);
    box-shadow: var(--shadow);
}

.intro-box h2 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.intro-box p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #eee; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cta-container {
    margin-top: 30px;
}

.btn-cta {
    display: inline-block;
    background-color: var(--gold);
    color: var(--dark);
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
}

.btn-cta:hover {
    transform: scale(1.05);
    background-color: white;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   5. PAGE LISTING (Grille Pokedex)
   ========================================================================== */
.pokedex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.pokedex-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(212, 160, 23, 0.3);
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

.pokedex-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--gold); 
}

.card-image {
    position: relative;
    height: 250px;
    border-bottom: 2px solid var(--gold);
}

.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-price {
    position: absolute; bottom: 10px; right: 10px;
    background: var(--dark); color: var(--gold);
    padding: 5px 12px; border-radius: 20px;
    font-weight: bold; font-size: 0.9rem;
    border: 1px solid var(--gold);
}

.card-content { padding: 20px; text-align: center; }

.card-year { font-size: 0.85rem; color: #ccc; font-weight: bold; }

.card-content h2 { 
    font-size: 1.4rem; color: white; margin: 5px 0; 
    text-shadow: 1px 1px 5px #000;
}

.card-content h3 { 
    font-size: 1.1rem; color: var(--gold); margin-bottom: 10px; 
    text-shadow: 1px 1px 3px #000;
}

.card-tracks { font-size: 0.9rem; color: #ddd; font-style: italic; }

.card-metadata {
    font-size: 0.85rem;
    color: var(--gold);
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-metadata strong {
    color: white; /* Le genre ressort en blanc pour contraster avec l'or */
    background: rgba(212, 160, 23, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.card-tracks {
    font-size: 0.85rem;
    color: #bbb;
    font-style: italic;
}

/* ==========================================================================
   6. RECHERCHE
   ========================================================================== */

/* --- STYLE DU FORMULAIRE DE RECHERCHE --- */
.search-form {
    margin-top: 25px;
}

.input-group input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--gold);
    border-radius: 30px;
    color: white;
    font-size: 1rem;
    margin-bottom: 25px;
    outline: none;
}

.input-group input::placeholder { color: #aaa; }

.form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* --- STYLE DU TABLEAU --- */
.table-container {
    overflow-x: auto; /* Permet le scroll horizontal sur mobile */
    background: var(--glass);
    border-radius: 15px;
    border: 1px solid rgba(212, 160, 23, 0.3);
    margin: 20px auto;
    max-width: 1000px;
}

.jazz-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
    text-align: left;
}

.jazz-table th, .jazz-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.jazz-table th {
    background: rgba(212, 160, 23, 0.2);
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.jazz-table tr:hover {
    background: rgba(212, 160, 23, 0.05);
}

.jazz-table td strong { color: var(--gold); }

/* Ajustement mobile pour le tableau */
@media (max-width: 576px) {
    .jazz-table th, .jazz-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
    background-color: var(--dark); color: #999;
    padding: 30px 5%; text-align: center;
    border-top: 3px solid var(--gold); margin-top: 50px;
}
.footer-container { display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.footer-info strong { color: var(--gold); }

/* ==========================================================================
   7. PAGE CRÉDITS (Style spécifique)
   ========================================================================== */
.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.credit-card {
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(212, 160, 23, 0.2);
}

.credit-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--gold);
    margin-right: 20px;
}

.credit-info h3 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.credit-info p {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 10px;
}

.btn-source {
    font-size: 0.75rem;
    color: white;
    text-decoration: underline;
    opacity: 0.8;
    transition: 0.3s;
}

.btn-source:hover {
    color: var(--gold);
    opacity: 1;
}

/* Ajustement pour mobile spécifique aux crédits */
@media (max-width: 480px) {
    .credit-card {
        flex-direction: column;
        text-align: center;
    }
    .credit-thumb img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* ==========================================================================
   8. RESPONSIVE (BASCULE MOBILE/PC)
   ========================================================================== */
@media (min-width: 577px) {
    /* --- HEADER : On repasse en ligne --- */
    .burger-label { display: none; } /* Cache le burger sur PC */

    .nav-links {
        display: flex !important; /* Force l'affichage horizontal sur PC */
        position: static; 
        flex-direction: row; 
        padding: 0;
        width: auto;
        background: none;
        box-shadow: none;
        border: none;
    }

    .nav-links li {
        padding: 0;
    }

    /* --- INDEX --- */
    .main-nav { 
        flex-direction: row; 
        justify-content: center; 
        padding-top: 50px; 
        gap: 30px; 
    }

    .tile { 
        flex-direction: column; 
        text-align: center; 
        flex: 1; 
        max-width: 260px; 
        padding: 40px 20px; 
    }

    .tile-icon { margin: 0 0 20px 0; font-size: 3.5rem; }

    /* --- LISTING --- */
    .pokedex-grid { 
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    }

    /* --- FOOTER --- */
    .footer-container { 
        flex-direction: row; 
        justify-content: space-between; 
    }
}