* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, #1b2034 0, transparent 32%),
        #0d0f14;
    color: #f2f3f5;
    min-height: 100vh;
}

a {
    color: inherit;
}

.barre-navigation {
    min-height: 74px;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 20, 28, 0.94);
    border-bottom: 1px solid #292d38;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

nav a {
    text-decoration: none;
    color: #aeb3c0;
    font-size: 14px;
    transition: 0.2s;
}

nav a:hover {
    color: white;
}

.bouton-ajouter {
    background: #7259f3;
    padding: 10px 15px;
    border-radius: 8px;
    color: white !important;
    font-weight: bold;
}

main {
    width: 90%;
    max-width: 1500px;
    margin: 42px auto 80px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.sous-titre {
    color: #9096a5;
    margin-bottom: 7px;
}

.compteur {
    color: #686e7c;
    font-size: 13px;
}

.titre-page {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.bouton-principal {
    display: inline-block;
    background: #7259f3;
    color: white;
    border: 0;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.bouton-principal:hover {
    background: #806af5;
}

.bouton-secondaire {
    display: inline-block;
    padding: 11px 16px;
    background: #242833;
    color: #ddd;
    border-radius: 8px;
    text-decoration: none;
}

.bouton-danger {
    padding: 12px 18px;
    background: transparent;
    border: 1px solid #6e343b;
    border-radius: 8px;
    color: #ee7d87;
    cursor: pointer;
}

.filtres {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: #151821;
    padding: 15px;
    border: 1px solid #252a35;
    border-radius: 11px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    background: #171a22;
    border: 1px solid #323743;
    border-radius: 7px;
    color: white;
    font: inherit;
}

.filtres input {
    flex: 1;
    min-width: 250px;
}

.filtres select {
    width: auto;
    min-width: 160px;
}

.filtres button {
    padding: 10px 18px;
    border: 0;
    border-radius: 7px;
    background: #7259f3;
    color: white;
    cursor: pointer;
}


/* =========================================================
   CARTES
   ========================================================= */

.grille-animes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
}

.carte-anime {
    background: #151821;
    border: 1px solid #252936;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.carte-anime:hover {
    transform: translateY(-5px);
    border-color: #484e61;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.28);
}

.carte-anime:hover .affiche-anime {
    transform: scale(1.035);
}

.tier {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
}

.tier-S {
    background: #e6a93d;
    color: #15100a;
}

.tier-A {
    background: #9b6df1;
    color: white;
}

.tier-B {
    background: #4d8fea;
    color: white;
}

.tier-C {
    background: #55ad7c;
    color: white;
}

.tier-D {
    background: #c57c48;
    color: white;
}

.tier-E {
    background: #ad515f;
    color: white;
}

.contenu-carte {
    padding: 15px;
}

.contenu-carte h2 {
    font-size: 16px;
    margin-bottom: 11px;
    line-height: 1.3;
}

.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tags span,
.badges-detail span {
    display: inline-block;
    background: #252935;
    color: #aeb3bf;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 11px;
}

.recommande-carte {
    margin: 12px 0 0;
    font-size: 12px;
    color: #78d39a;
}


/* =========================================================
   DETAIL
   ========================================================= */

.detail-anime {
    max-width: 1200px;
    margin: auto;
}

.detail-entete {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 40px;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 15px;
    padding: 28px;
}

.detail-affiche img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.type-oeuvre {
    color: #7259f3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.detail-titre-ligne {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.detail-titre-ligne h1 {
    font-size: 42px;
}

.grande-tier {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    font-size: 34px;
    flex-shrink: 0;
}

.badges-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badges-detail span {
    padding: 7px 10px;
    font-size: 12px;
}

.grosse-note {
    margin-top: 34px;
}

.grosse-note span {
    font-size: 68px;
    line-height: 1;
    font-weight: 900;
}

.grosse-note small {
    color: #747b8c;
    font-size: 20px;
}

.badge-recommande {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 12px;
    border-radius: 7px;
    background: rgba(71, 168, 117, 0.13);
    color: #76d39b;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.detail-actions form {
    margin: 0;
}

.section-detail {
    margin-top: 25px;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 13px;
    padding: 25px;
}

.grille-notes-detail {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 13px;
}

.note-detail {
    padding: 18px;
    border-radius: 10px;
    background: #1d202a;
}

.note-detail span {
    display: block;
    font-size: 12px;
    color: #858b99;
    margin-bottom: 13px;
}

.note-detail strong {
    font-size: 27px;
}

.note-detail small {
    color: #707685;
}

.grille-detail-bas {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.texte-commentaire {
    color: #bbc0ca;
    line-height: 1.7;
    white-space: pre-line;
}

.personnage-favori {
    font-size: 22px;
    font-weight: bold;
}


/* =========================================================
   TIER LIST
   ========================================================= */

.tier-list {
    display: grid;
    gap: 13px;
}

.ligne-tier-list {
    display: grid;
    grid-template-columns: 105px 1fr;
    min-height: 185px;
    background: #151821;
    border: 1px solid #272b36;
    border-radius: 12px;
    overflow: hidden;
}

.lettre-tier {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    font-weight: 900;
}

.contenu-tier-list {
    padding: 15px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 13px;
}

.mini-anime-tier:hover {
    transform: translateY(-3px);
}

.mini-anime-tier img,
.mini-placeholder {
    width: 105px;
    height: 145px;
    object-fit: cover;
    border-radius: 7px;
    background: #242936;
}

.mini-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
}

.mini-info span {
    color: #858b98;
    font-size: 10px;
}

.tier-vide {
    color: #696f7c;
}


/* =========================================================
   FORMULAIRES
   ========================================================= */

.formulaire-page {
    max-width: 850px;
    margin: auto;
}

.formulaire {
    display: grid;
    gap: 20px;
}

.bloc-formulaire {
    padding: 25px;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 13px;
}

.bloc-formulaire label {
    display: block;
    margin-top: 18px;
    color: #c7cad1;
}

.bloc-formulaire input,
.bloc-formulaire select,
.bloc-formulaire textarea {
    margin-top: 8px;
}

.deux-colonnes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.notes-formulaire {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.aide {
    color: #767c89;
    font-size: 13px;
}

.checkbox {
    display: flex !important;
    gap: 10px;
    align-items: center;
}

.checkbox input {
    width: auto;
    margin: 0;
}

.actions-formulaire {
    display: flex;
    gap: 12px;
}


/* =========================================================
   STATISTIQUES
   ========================================================= */

.statistiques-principales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 17px;
    margin: 30px 0;
}

.stat-card {
    background: #151821;
    padding: 23px;
    border-radius: 12px;
    border: 1px solid #272b37;
}

.stat-card span {
    display: block;
    color: #888e9c;
    margin-bottom: 10px;
}

.stat-card strong {
    font-size: 29px;
}

.stats-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bloc-stat {
    padding: 25px;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 12px;
}

.ligne-stat {
    min-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #292d38;
}


/* =========================================================
   VIDE
   ========================================================= */

.etat-vide {
    padding: 80px 30px;
    text-align: center;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 13px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {

    .barre-navigation {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 5%;
        gap: 18px;
    }

    nav {
        flex-wrap: wrap;
    }

    .detail-entete {
        grid-template-columns: 220px 1fr;
    }

    .detail-affiche {
        height: 330px;
    }

    .grille-notes-detail {
        grid-template-columns: repeat(3, 1fr);
    }

    .grille-detail-bas {
        grid-template-columns: 1fr;
    }

    .stats-grille {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    main {
        width: 94%;
        margin-top: 25px;
    }

    h1 {
        font-size: 29px;
    }

    .titre-page {
        flex-direction: column;
        align-items: flex-start;
    }

    .grille-animes {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .affiche-wrapper {
        height: 245px;
    }

    .detail-entete {
        grid-template-columns: 1fr;
    }

    .detail-affiche {
        width: 220px;
        height: 320px;
    }

    .detail-titre-ligne h1 {
        font-size: 31px;
    }

    .grille-notes-detail {
        grid-template-columns: 1fr 1fr;
    }

    .deux-colonnes,
    .notes-formulaire {
        grid-template-columns: 1fr;
    }

    .ligne-tier-list {
        grid-template-columns: 60px 1fr;
    }

    .lettre-tier {
        font-size: 36px;
    }

}

/* =========================================================
   CARTES SANS AFFICHES
   ========================================================= */

.grille-animes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.carte-sans-image {
    padding: 20px;
    min-height: 180px;
}

.carte-entete {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.carte-entete h2 {
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 12px;
}

.tier-carte {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    font-size: 22px;
    flex-shrink: 0;
}

.note-carte {
    margin-top: 25px;
    font-size: 34px;
    font-weight: 900;
}

.note-carte small {
    font-size: 13px;
    color: #777d89;
}


/* =========================================================
   FICHE SANS AFFICHE
   ========================================================= */

.detail-entete-sans-image {
    display: block;
}

.detail-entete-sans-image .detail-infos {
    width: 100%;
}


/* =========================================================
   TIER LIST TEXTE
   ========================================================= */

.contenu-tier-list {
    padding: 16px;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.anime-tier-texte {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 170px;
    max-width: 250px;

    padding: 11px 13px;

    background: #20242e;

    border: 1px solid #303541;
    border-radius: 8px;

    text-decoration: none;

    transition: 0.2s;
}

.anime-tier-texte:hover {
    background: #292e3a;
    transform: translateY(-2px);
}

.anime-tier-texte strong {
    font-size: 13px;
}

.anime-tier-texte span {
    font-size: 11px;
    color: #898f9d;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.dashboard-kpi {
    padding: 22px;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 12px;
}

.dashboard-kpi span {
    display: block;
    margin-bottom: 12px;
    color: #8c92a0;
    font-size: 13px;
}

.dashboard-kpi strong {
    font-size: 31px;
}

.dashboard-kpi small {
    font-size: 14px;
    color: #777d8a;
}


.dashboard-deux-colonnes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}


.dashboard-bloc {
    padding: 24px;
    background: #151821;
    border: 1px solid #272b37;
    border-radius: 13px;
}

.dashboard-bloc-large {
    margin-bottom: 20px;
}

.dashboard-bloc h2 {
    font-size: 19px;
    margin-bottom: 22px;
}


.dashboard-titre-bloc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-titre-bloc h2 {
    margin: 0;
}

.dashboard-titre-bloc a {
    color: #8d7cf5;
    text-decoration: none;
    font-size: 12px;
}


/* =========================================================
   TOP
   ========================================================= */

.dashboard-top {
    display: grid;
}

.dashboard-top-ligne {
    min-height: 57px;

    display: grid;
    grid-template-columns: 35px 1fr 35px 55px;

    gap: 10px;
    align-items: center;

    text-decoration: none;

    border-bottom: 1px solid #252a34;

    transition: 0.2s;
}

.dashboard-top-ligne:hover {
    padding-left: 5px;
    background: #191d26;
}

.dashboard-position {
    color: #696f7c;
    font-weight: bold;
}

.dashboard-top-nom {
    min-width: 0;
}

.dashboard-top-nom strong {
    display: block;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 13px;
}

.dashboard-top-nom small {
    display: block;

    margin-top: 3px;

    color: #737986;
    font-size: 10px;
}

.dashboard-top-note {
    text-align: right;
}

.dashboard-mini-tier {
    width: 30px;
    height: 30px;

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

    border-radius: 6px;

    font-size: 13px;
    font-weight: 900;
}


/* =========================================================
   CRITÈRES
   ========================================================= */

.criteres-dashboard {
    display: grid;
    gap: 20px;
}

.critere-dashboard {
    display: grid;
    gap: 8px;
}

.critere-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.critere-entete span {
    color: #a8adb8;
    font-size: 13px;
}

.critere-entete strong {
    font-size: 13px;
}

.barre-fond {
    height: 7px;

    background: #282d38;

    border-radius: 100px;

    overflow: hidden;
}

.barre-valeur {
    height: 100%;

    background: #7259f3;

    border-radius: 100px;
}


/* =========================================================
   TIERS
   ========================================================= */

.dashboard-tiers {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.dashboard-tier {
    padding: 15px;

    background: #1b1f28;

    border: 1px solid #292e3a;
    border-radius: 10px;

    text-align: center;
    text-decoration: none;

    transition: 0.2s;
}

.dashboard-tier:hover {
    transform: translateY(-3px);

    border-color: #474d5e;
}

.dashboard-tier-lettre {
    width: 48px;
    height: 48px;

    margin: 0 auto 12px;

    border-radius: 9px;

    font-size: 22px;
}

.dashboard-tier strong {
    display: block;

    font-size: 24px;
}

.dashboard-tier span {
    display: block;

    margin-top: 3px;

    color: #7e8492;
    font-size: 11px;
}


/* =========================================================
   GENRES
   ========================================================= */

.genres-dashboard {
    display: grid;
    gap: 16px;
}

.genre-dashboard {
    display: grid;
    gap: 7px;
}

.genre-dashboard-entete {
    display: flex;
    justify-content: space-between;
}

.genre-dashboard-entete span {
    color: #a8adb8;
    font-size: 13px;
}

.genre-dashboard-entete strong {
    font-size: 12px;
}


/* =========================================================
   S TIER
   ========================================================= */

.dashboard-s-tier {
    display: grid;
    gap: 9px;
}

.dashboard-s-ligne {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 11px;

    background: #1b1f28;

    border: 1px solid #292e39;
    border-radius: 9px;

    text-decoration: none;

    transition: 0.2s;
}

.dashboard-s-ligne:hover {
    background: #222630;
}

.dashboard-s-ligne strong {
    display: block;

    font-size: 13px;
}

.dashboard-s-ligne span {
    display: block;

    margin-top: 3px;

    color: #838996;
    font-size: 11px;
}


/* =========================================================
   RESPONSIVE DASHBOARD
   ========================================================= */

@media (max-width: 1100px) {

    .dashboard-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-tiers {
        grid-template-columns: repeat(3, 1fr);
    }

}


@media (max-width: 800px) {

    .dashboard-deux-colonnes {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .dashboard-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-tiers {
        grid-template-columns: 1fr 1fr;
    }

}

/* =========================================================
   SÉLECTION DES GENRES
   ========================================================= */

.champ-genres {
    margin-top: 18px;
}

.titre-champ {
    display: block;
    margin-bottom: 12px;
    color: #c7cad1;
}

.grille-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.genre-checkbox {
    position: relative;
    margin: 0 !important;
    cursor: pointer;
}

.genre-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.genre-checkbox span {
    display: block;

    padding: 9px 13px;

    background: #1c2029;

    border: 1px solid #323743;
    border-radius: 8px;

    color: #aeb3bf;

    font-size: 13px;

    transition: 0.15s;
}

.genre-checkbox:hover span {
    border-color: #5a6070;
    color: white;
}

.genre-checkbox input:checked + span {
    background: #7259f3;
    border-color: #7259f3;
    color: white;
}

/* =========================================================
   NOTATION
   ========================================================= */

.bloc-notes {
    margin-top: 28px;
}

.bloc-notes h2 {
    margin-bottom: 20px;
}

.ligne-note {
    display: grid;
    grid-template-columns: 130px 1fr 40px 35px;
    align-items: center;
    gap: 12px;

    margin-bottom: 18px;
}

.ligne-note label {
    font-weight: 600;
}

.ligne-note input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.valeur-note {
    font-size: 18px;
    font-weight: bold;
    text-align: right;
}

.sur-dix {
    color: #8c919d;
    font-size: 14px;
}

/* =========================================================
   PROFIL DES NOTES
   ========================================================= */

.profil-notes {
    margin-top: 35px;
}

.profil-notes h2 {
    margin-bottom: 22px;
}

.critere-note {
    margin-bottom: 18px;
}

.critere-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 7px;
}

.critere-entete span {
    color: #c6cad3;
}

.critere-entete strong {
    font-size: 15px;
}

.barre-note {
    height: 9px;

    background: #252a34;

    border-radius: 20px;

    overflow: hidden;
}

.barre-note-remplie {
    height: 100%;

    background: #7259f3;

    border-radius: 20px;
}

/* =========================================================
   NOTATION
   ========================================================= */

.bloc-notes {
    margin-top: 25px;
}

.bloc-notes h2 {
    margin-bottom: 15px;
}

.grille-notation {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.grille-notation label {
    display: flex;
    flex-direction: column;
    gap: 7px;

    font-size: 14px;
    color: #c6cad3;
}

.grille-notation input {
    width: 100%;
    box-sizing: border-box;

    padding: 11px;

    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 800px) {

    .grille-notation {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* =========================================================
   NOTATION
   ========================================================= */

.bloc-notes {
    margin-top: 25px;
}

.bloc-notes h2 {
    margin-bottom: 15px;
}

.grille-notation {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.grille-notation label {
    display: flex;
    flex-direction: column;
    gap: 7px;

    font-size: 14px;
    color: #c6cad3;
}

.grille-notation input {
    width: 100%;
    box-sizing: border-box;

    padding: 11px;

    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 800px) {

    .grille-notation {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* =========================================================
   FORMULAIRE ANIME
   ========================================================= */

.page-formulaire {
    max-width: 1050px;
    margin: 0 auto;
}

.entete-page {
    margin-bottom: 30px;
}

.entete-page h1 {
    margin-bottom: 8px;
}

.entete-page p {
    color: #9298a5;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section-formulaire {
    margin-bottom: 35px;
    padding: 25px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 12px;
}

.section-formulaire h2 {
    margin-top: 0;
    margin-bottom: 18px;
}


/* =========================================================
   CHAMPS CLASSIQUES
   ========================================================= */

.grille-formulaire {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.grille-formulaire label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.champ-large {
    grid-column: 1 / -1;
}

.formulaire-anime input[type="text"],
.formulaire-anime input[type="number"],
.formulaire-anime select,
.formulaire-anime textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 12px 14px;

    background: #20242d;

    border: 1px solid #343a46;
    border-radius: 8px;

    color: white;

    font-size: 16px;
}

.formulaire-anime textarea {
    resize: vertical;
}


/* =========================================================
   GENRES
   ========================================================= */

.grille-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genre-checkbox {
    position: relative;
    cursor: pointer;
}

.genre-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.genre-checkbox span {
    display: block;

    padding: 9px 14px;

    background: #20242d;

    border: 1px solid #343a46;
    border-radius: 8px;

    color: #b8bdc7;

    transition: 0.15s;
}

.genre-checkbox:hover span {
    border-color: #666d7b;
    color: white;
}

.genre-checkbox input:checked + span {
    background: #7259f3;
    border-color: #7259f3;
    color: white;
}


/* =========================================================
   NOTATION
   ========================================================= */

.grille-notation {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(130px, 1fr));

    gap: 18px;

    margin-top: 20px;
}

.grille-notation > label {
    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 0;

    font-weight: 600;
}

.champ-note {
    display: flex;
    align-items: center;
    gap: 7px;
}

.champ-note input {
    min-width: 0;
    width: 100% !important;

    padding: 13px 10px !important;

    text-align: center;

    font-size: 18px !important;
    font-weight: 700;
}

.champ-note > span {
    flex-shrink: 0;

    color: #9298a5;

    font-size: 14px;
}

.aide {
    margin-top: -8px;

    color: #858b98;
    font-size: 13px;
}


/* =========================================================
   MOYENNE
   ========================================================= */

.moyenne-actuelle {
    display: flex;
    align-items: center;
    gap: 15px;

    margin-top: 25px;
    padding: 15px 18px;

    background: #20242d;

    border-radius: 8px;
}

.moyenne-actuelle strong {
    font-size: 22px;
}

.rang-formulaire {
    padding: 5px 10px;

    background: #2d3240;

    border-radius: 6px;

    font-weight: 700;
}


/* =========================================================
   RECOMMANDATION
   ========================================================= */

.champ-recommande {
    display: flex !important;
    flex-direction: row !important;

    align-items: center;

    gap: 10px !important;

    margin-top: 30px;

    cursor: pointer;
}

.champ-recommande input {
    width: auto;
}


/* =========================================================
   BOUTONS
   ========================================================= */

.actions-formulaire {
    display: flex;
    gap: 12px;

    margin-top: 20px;
    margin-bottom: 40px;
}

.bouton-principal,
.bouton-secondaire {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    border-radius: 8px;

    text-decoration: none;

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

    cursor: pointer;
}

.bouton-principal {
    border: none;

    background: #7259f3;
    color: white;
}

.bouton-secondaire {
    background: #252a34;

    border: 1px solid #343a46;

    color: white;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .grille-notation {
        grid-template-columns:
            repeat(2, minmax(150px, 1fr));
    }

}

@media (max-width: 650px) {

    .grille-formulaire {
        grid-template-columns: 1fr;
    }

    .champ-large {
        grid-column: auto;
    }

    .grille-notation {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   PAGE DETAIL ANIME
   ========================================================= */

.page-detail-anime {
    max-width: 1050px;
    margin: 0 auto;
}


/* =========================================================
   ENTETE
   ========================================================= */

.detail-entete {
    margin-bottom: 30px;
}

.retour-liste {
    display: inline-block;

    margin-bottom: 15px;

    color: #9298a5;
    text-decoration: none;

    font-size: 14px;
}

.retour-liste:hover {
    color: white;
}

.detail-titre {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 30px;
}

.detail-titre h1 {
    margin: 0 0 12px 0;

    font-size: 38px;
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-info {
    padding: 6px 10px;

    background: #20242d;

    border: 1px solid #343a46;
    border-radius: 7px;

    color: #b9bec8;

    font-size: 13px;
}


/* =========================================================
   SCORE PRINCIPAL
   ========================================================= */

.detail-score {
    display: flex;
    align-items: center;

    gap: 15px;

    flex-shrink: 0;
}

.detail-rang {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    border-radius: 12px;

    background: #7259f3;

    color: white;

    font-size: 30px;
    font-weight: 800;
}

.detail-moyenne {
    display: flex;

    align-items: baseline;

    gap: 4px;
}

.detail-moyenne strong {
    font-size: 38px;
}

.detail-moyenne span {
    color: #9298a5;

    font-size: 16px;
}


/* =========================================================
   GENRES
   ========================================================= */

.detail-genres {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;

    margin-top: 20px;
}

.badge-genre {
    padding: 7px 11px;

    background: #20242d;

    border: 1px solid #343a46;
    border-radius: 7px;

    color: #c6cad3;

    font-size: 13px;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.detail-section {
    margin-bottom: 28px;

    padding: 25px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 12px;
}

.detail-section h2 {
    margin-top: 0;
    margin-bottom: 22px;
}


/* =========================================================
   NOTES
   ========================================================= */

.detail-grille-notes {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(120px, 1fr));

    gap: 15px;
}

.detail-note {
    padding: 18px 12px;

    background: #20242d;

    border: 1px solid #303641;
    border-radius: 10px;

    text-align: center;
}

.detail-note-nom {
    display: block;

    margin-bottom: 10px;

    color: #9298a5;

    font-size: 13px;
}

.detail-note strong {
    font-size: 27px;
}

.detail-note small {
    margin-left: 2px;

    color: #7f8591;

    font-size: 13px;
}


/* =========================================================
   MON AVIS
   ========================================================= */

.detail-infos {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.detail-info {
    padding: 18px;

    background: #20242d;

    border-radius: 9px;
}

.detail-label {
    display: block;

    margin-bottom: 8px;

    color: #8e949f;

    font-size: 13px;
}

.detail-info strong {
    font-size: 16px;
}


/* =========================================================
   COMMENTAIRE
   ========================================================= */

.detail-commentaire {
    margin-top: 18px;

    padding: 20px;

    background: #20242d;

    border-radius: 9px;
}

.detail-commentaire p {
    margin: 0;

    color: #d5d8de;

    line-height: 1.65;

    white-space: pre-line;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.detail-actions {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 25px;
    margin-bottom: 40px;
}

.detail-actions form {
    margin: 0;
}

.bouton-supprimer {
    min-height: 44px;

    padding: 0 18px;

    background: transparent;

    border: 1px solid #a84242;
    border-radius: 8px;

    color: #dc7373;

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

    cursor: pointer;
}

.bouton-supprimer:hover {
    background: #3a2024;

    color: white;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

    .detail-titre {
        flex-direction: column;
    }

    .detail-grille-notes {
        grid-template-columns:
            repeat(2, minmax(120px, 1fr));
    }

}


@media (max-width: 600px) {

    .detail-titre h1 {
        font-size: 30px;
    }

    .detail-grille-notes {
        grid-template-columns: 1fr;
    }

    .detail-infos {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   ONGLET ACTIF
   ========================================================= */

.barre-navigation nav a.nav-actif {
    background: #7259f3;
    color: white;

    border-radius: 7px;

    padding: 8px 12px;
}

/* =========================================================
   AUTHENTIFICATION
   ========================================================= */

.page-auth {
    max-width: 470px;

    margin: 50px auto;
}

.carte-auth {
    padding: 30px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 12px;
}

.carte-auth h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.auth-description {
    margin-bottom: 25px;

    color: #9298a5;
}

.formulaire-auth {
    display: flex;
    flex-direction: column;

    gap: 18px;
}

.formulaire-auth label {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.formulaire-auth input {
    width: 100%;
    box-sizing: border-box;

    padding: 12px 14px;

    background: #20242d;

    border: 1px solid #343a46;
    border-radius: 8px;

    color: white;

    font-size: 16px;
}

.formulaire-auth .bouton-principal {
    margin-top: 5px;
}

.message-erreur {
    margin-bottom: 20px;
    padding: 12px 15px;

    background: #3a2024;

    border: 1px solid #7f3c43;
    border-radius: 8px;

    color: #f0a2a8;
}

.auth-lien {
    margin-top: 22px;
    margin-bottom: 0;

    text-align: center;

    color: #9298a5;
}

.auth-lien a {
    color: white;
}

/* =========================================================
   COMPTE UTILISATEUR
   ========================================================= */

.menu-compte {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-left: 10px;
    padding-left: 15px;

    border-left: 1px solid #343a46;
}

.pseudo-connecte {
    color: #c9cdd6;
    font-size: 14px;
    font-weight: 600;
}

.bouton-deconnexion {
    padding: 8px 12px;

    background: #252a34;

    border: 1px solid #343a46;
    border-radius: 7px;

    color: #c9cdd6 !important;

    font-size: 13px;

    text-decoration: none;
}

.bouton-deconnexion:hover {
    background: #343a46;
    color: white !important;
}

/* =========================================================
   UTILISATEURS
   ========================================================= */

.page-utilisateurs,
.page-profil-public {
    max-width: 1100px;
    margin: 0 auto;
}


.grille-utilisateurs {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(280px, 1fr)
        );

    gap: 16px;
}


.carte-utilisateur {
    display: flex;
    align-items: center;

    gap: 18px;

    padding: 20px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 12px;

    color: white;
    text-decoration: none;

    transition: 0.15s;
}


.carte-utilisateur:hover {
    transform: translateY(-2px);

    border-color: #4b5260;
}


.avatar-utilisateur,
.profil-avatar-grand {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: #7259f3;

    color: white;

    font-weight: 800;
}


.avatar-utilisateur {
    width: 55px;
    height: 55px;

    border-radius: 12px;

    font-size: 24px;
}


.profil-avatar-grand {
    width: 85px;
    height: 85px;

    border-radius: 16px;

    font-size: 38px;
}


.infos-utilisateur h2 {
    display: inline-block;

    margin: 0 8px 8px 0;

    font-size: 19px;
}


.badge-moi {
    display: inline-block;

    padding: 3px 7px;

    background: #7259f3;

    border-radius: 5px;

    font-size: 11px;
    font-weight: 700;
}


.stats-utilisateur {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    color: #9298a5;

    font-size: 13px;
}


.stats-utilisateur strong {
    color: white;
}


/* =========================================================
   PROFIL PUBLIC
   ========================================================= */

.profil-public-entete {
    display: flex;

    align-items: center;

    gap: 22px;

    margin: 20px 0 25px;
}


.profil-public-entete h1 {
    margin: 3px 0 7px;

    font-size: 34px;
}


.profil-public-entete p {
    margin: 0;

    color: #9298a5;
}


.profil-indication {
    color: #9298a5;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.navigation-profil {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 28px;

    padding: 8px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 10px;
}


.navigation-profil a {
    padding: 9px 12px;

    border-radius: 7px;

    color: #aeb3bd;

    text-decoration: none;

    font-size: 14px;
}


.navigation-profil a:hover,
.navigation-profil a.profil-nav-actif {
    background: #7259f3;

    color: white;
}


.grille-profil-stats {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(120px, 1fr));

    gap: 14px;

    margin-bottom: 28px;
}


.profil-stat {
    padding: 20px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 10px;

    text-align: center;
}


.profil-stat strong {
    display: block;

    margin-bottom: 5px;

    font-size: 27px;
}


.profil-stat span {
    color: #9298a5;

    font-size: 13px;
}


.profil-section {
    padding: 24px;

    background: #171a21;

    border: 1px solid #292e38;
    border-radius: 12px;
}


.profil-section h2 {
    margin-top: 0;
}


.profil-top-animes {
    display: flex;
    flex-direction: column;

    gap: 9px;
}


.profil-top-anime {
    display: flex;

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

    gap: 15px;

    padding: 13px 15px;

    background: #20242d;

    border-radius: 8px;
}


.position-top {
    display: inline-block;

    width: 32px;

    color: #7f8591;

    font-size: 12px;
}


.profil-top-note {
    display: flex;

    align-items: baseline;

    gap: 5px;
}


.profil-top-note > span {
    padding: 3px 7px;

    background: #303542;

    border-radius: 5px;

    font-weight: 700;
}


.profil-top-note strong {
    font-size: 18px;
}


.profil-top-note small,
.texte-vide {
    color: #9298a5;
}


@media (max-width: 850px) {

    .grille-profil-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .profil-public-entete {
        align-items: flex-start;
    }

    .profil-avatar-grand {
        width: 65px;
        height: 65px;

        font-size: 28px;
    }

    .grille-profil-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .navigation-profil {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .navigation-profil a {
        flex-shrink: 0;
    }

}

/* =========================================================
   CONSULTATION D'UN PROFIL PUBLIC
   ========================================================= */

.bandeau-profil-public {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    max-width: 1100px;
    margin: 0 auto 22px;
    padding: 12px 15px;
    background: #20242d;
    border: 1px solid #343a46;
    border-radius: 9px;
}

.bandeau-profil-public a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.bandeau-profil-public a:hover {
    text-decoration: underline;
}

.bandeau-profil-public span {
    color: #9298a5;
    font-size: 13px;
}

@media (max-width: 650px) {
    .bandeau-profil-public {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   CATALOGUE COMMUN + FORMULAIRE MOBILE
   ========================================================= */
.page-catalogue,
.page-avis,
.page-nouvelle-fiche {
    max-width: 1050px;
    margin: 0 auto;
}

.recherche-catalogue {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #151821;
    border: 1px solid #292e38;
    border-radius: 12px;
}

.recherche-catalogue input {
    min-width: 0;
    font-size: 16px;
}

.liste-catalogue {
    display: grid;
    gap: 12px;
}

.carte-catalogue {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    background: #171a21;
    border: 1px solid #292e38;
    border-radius: 12px;
}

.carte-catalogue-infos {
    min-width: 0;
}

.carte-catalogue h2,
.fiche-catalogue-resume h2 {
    margin: 5px 0 8px;
    font-size: 20px;
}

.carte-catalogue p {
    margin: 0;
    color: #9298a5;
    font-size: 13px;
}

.catalogue-type {
    color: #8d7cf5;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.catalogue-deja {
    flex-shrink: 0;
    color: #78d39a;
    font-size: 13px;
    font-weight: 700;
}

.fiche-catalogue-resume {
    margin-bottom: 22px;
    padding: 20px;
    background: #20242d;
    border: 1px solid #343a46;
    border-radius: 12px;
}

@media (max-width: 650px) {
    .page-formulaire,
    .page-catalogue,
    .page-avis,
    .page-nouvelle-fiche {
        width: 100%;
        max-width: none;
    }

    .catalogue-entete {
        gap: 14px;
        margin-bottom: 20px;
    }

    .catalogue-entete .bouton-secondaire {
        width: 100%;
    }

    .recherche-catalogue {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .recherche-catalogue .bouton-principal {
        width: 100%;
        min-height: 48px;
    }

    .carte-catalogue {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .carte-catalogue .bouton-principal,
    .catalogue-deja {
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .section-formulaire {
        padding: 17px;
        margin-bottom: 18px;
    }

    .grille-formulaire,
    .grille-notation {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px;
    }

    .champ-note {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .champ-note input,
    .formulaire-anime input,
    .formulaire-anime select,
    .formulaire-anime textarea {
        max-width: 100%;
        font-size: 16px !important;
    }

    .actions-formulaire {
        flex-direction: column;
    }

    .actions-formulaire .bouton-principal,
    .actions-formulaire .bouton-secondaire {
        width: 100%;
        min-height: 48px;
    }
}
