/* Paramètres généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1e293b;
}

/* Titres */
h1 {
    padding: 25px;
    text-align: center;
    color: #2563eb;
    margin-bottom: 30px;
    font-size: 28px;
}

body {
    /* garde ton background existant */
    background-attachment: fixed;
    min-height: 100vh;
}

/* Formulaire */
form {
    background: white;
    padding: 40px;
    width: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Paragraphes */
form p {
    margin-bottom: 20px;
}

/* Labels */
label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Champs de saisie */
input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
}

input[type="text"]:focus {
    border-color: #2563eb;
}

/* Bouton */
input[type="submit"] {
    width: 100%;
    padding: 13px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

input[type="submit"]:hover {
    background: #1d4ed8;
    transform: scale(1.03);
}

/* Résultats */
body > p {
    background: white;
    padding: 30px;
    border-radius: 12px;
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 78px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 6%;

    background: #ffffff;
    border-bottom: 1px solid #e5eaf1;
    box-shadow: 0 4px 18px rgba(15, 40, 70, 0.06);

    z-index: 1000;
}

/* BOUTONS */
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;
    color: #172554;

    font-size: 15px;
    font-weight: 600;

    padding: 12px 20px;
    border-radius: 10px;

    transition: 0.25s ease;
}

/* ICÔNES */
.nav-link span {
    font-size: 21px;
    color: #1e3a8a;
}

/* SURVOL */
.nav-link:hover {
    background: #172554;
    color: white;
    transform: translateY(-2px);
}

.nav-link:hover span {
    color: #93c5fd;
}

/* ESPACE SOUS LA BARRE */
body {
    padding-top: 100px;
}

/* VERSION MOBILE */
@media (max-width: 600px) {
    .navbar {
        padding: 0 12px;
    }

    .nav-link {
        padding: 10px;
        font-size: 13px;
    }
}

/* TITRES DES FILTRES */

.page-categories h3 {
    color: #ffffff;
    font-size: 16px;
    margin: 25px 0 12px;
}

/* BARRES DE NAVIGATION */

.categories-nav,
.classes-nav,
.genre-nav {
    display: flex;
    align-items: center;
    gap: 10px;

    background: white;
    padding: 10px;

    border-radius: 12px;

    box-shadow: 0 4px 15px rgba(15,40,70,0.06);

    flex-wrap: wrap;
}

/* BOUTONS */

.cat-btn,
.genre-btn,
.classe-btn {
    border: none;
    background: #f1f5f9;

    color: #172554;

    padding: 12px 20px;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.25s ease;
}

/* SURVOL */

.cat-btn:hover,
.genre-btn:hover,
.classe-btn:hover {
    background: #dbeafe;
}

/* BOUTON ACTIF */

.cat-btn.active,
.genre-btn.active,
.classe-btn.active {
    background: #172554;
    color: white;
}

/* TABLEAU */

.tableau {
    margin-top: 30px;
    background: white;

    padding: 25px;
    border-radius: 15px;

    box-shadow: 0 4px 20px rgba(15,40,70,0.06);
}

.tableau h2 {
    color: #172554;
    margin-bottom: 20px;
}

.tableau table {
    width: 100%;
    border-collapse: collapse;
}

.tableau th {
    background: #172554;
    color: white;
    padding: 15px;
    text-align: left;
}

.tableau td {
    padding: 15px;
    border-bottom: 1px solid #e5eaf1;
    color: #334155;
}

.tableau tr:hover td {
    background: #f4f7fb;
}

#aucun-resultat {
    display: none;
    color: #64748b;
    padding: 20px 0;
}

/* MOBILE */

@media (max-width: 600px) {
    .cat-btn,
    .genre-btn,
    .classe-btn {
        padding: 10px;
        font-size: 12px;
    }

    .tableau {
        overflow-x: auto;
    }
}

/* BOUTONS SUR TOUTE LA LARGEUR */

.categories-nav,
.genre-nav,
.classes-nav {
    display: flex;
    width: 100%;
    gap: 8px;
}

/* Chaque bouton prend une part égale */
.categories-nav button,
.genre-nav button,
.classes-nav button {
    flex: 1;
    min-width: 0;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
}

/* Adaptation mobile */
@media (max-width: 600px) {
    .categories-nav,
    .genre-nav,
    .classes-nav {
        gap: 5px;
    }

    .categories-nav button,
    .genre-nav button,
    .classes-nav button {
        padding: 10px 5px;
        font-size: 11px;
    }
}


/* MOBILE */

@media (max-width: 600px) {
    .page-categories {
        margin: 25px auto;
        padding: 12px;
    }

    .categories-nav {
        gap: 5px;
    }

    .cat-btn {
        padding: 10px;
        font-size: 12px;
    }

    .tableau {
        overflow-x: auto;
    }
}

.img-fit {
    position: fixed;
    top: 78px;
    left: 0;
    width: 100%;
    height: calc(100vh - 78px);
    object-fit: cover;
    display: block;
}

.description{
    color: #FFFFFF;
}