* {
    box-sizing: border-box;
}


html {
    background: #0a0e13;
}


body {
    margin: 0;

    background:
        radial-gradient(
            circle at top,
            #182331 0,
            #0a0e13 420px
        );

    background-attachment: fixed;

    color: #ffffff;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}


a {
    color: inherit;
}


.container {
    width: 100%;
    max-width: 950px;

    margin: auto;

    padding: 18px;
    padding-bottom: 100px;
}


/* =========================
   HEADER
========================= */

.header,
.page-header {
    background: rgba(21, 28, 37, 0.94);

    border: 1px solid #222d3a;

    border-radius: 22px;

    padding: 22px;

    margin-bottom: 18px;
}


.header h1,
.page-header h1 {
    margin: 0;

    font-size: 27px;
}


.radar-online {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-top: 10px;

    color: #b9c4d0;
}


.pulse {
    width: 10px;
    height: 10px;

    background: #35dc79;

    border-radius: 50%;

    box-shadow:
        0 0 0 5px rgba(53, 220, 121, 0.1);
}


.verification {
    margin-top: 18px;

    color: #7f8b9a;

    font-size: 13px;
}


.verification strong {
    color: #ffffff;
}


.retour {
    display: inline-block;

    color: #84b8ff;

    text-decoration: none;

    margin-bottom: 15px;
}


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

.stats {
    display: grid;

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

    gap: 12px;

    margin-bottom: 20px;
}


.card {
    display: block;

    background: rgba(21, 28, 37, 0.94);

    border: 1px solid #222d3a;

    border-radius: 19px;

    padding: 20px 8px;

    text-align: center;

    text-decoration: none;

    transition:
        transform 0.15s,
        background 0.15s;
}


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

    background: #1c2632;
}


.icone {
    display: block;

    font-size: 27px;
}


.nombre {
    display: block;

    margin-top: 8px;

    font-size: 28px;

    font-weight: 750;
}


.label {
    display: block;

    margin-top: 5px;

    color: #8794a3;

    font-size: 13px;
}


/* =========================
   BLOCS
========================= */

.bloc,
.detail-card {
    background: rgba(21, 28, 37, 0.94);

    border: 1px solid #222d3a;

    border-radius: 21px;

    padding: 18px;

    margin-bottom: 20px;
}


.titre-section {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.titre-section h2 {
    margin-top: 0;

    font-size: 19px;
}


.lien-section {
    color: #84b8ff;

    text-decoration: none;

    font-size: 13px;
}


/* =========================
   LISTES
========================= */

.liste {
    display: flex;

    flex-direction: column;

    background: rgba(21, 28, 37, 0.94);

    border: 1px solid #222d3a;

    border-radius: 20px;

    padding: 4px 18px;
}


.ligne-classement,
.liste-card,
.proprietaire {
    display: flex;

    align-items: center;

    width: 100%;

    padding: 14px 0;

    border-bottom: 1px solid #26313e;

    text-decoration: none;
}


.ligne-classement:last-child,
.liste-card:last-child,
.proprietaire:last-child {
    border-bottom: none;
}


.position,
.rang {
    width: 48px;

    flex-shrink: 0;

    color: #f4c850;

    font-weight: 750;
}


.infos {
    flex: 1;

    min-width: 0;
}


.nom {
    font-weight: 700;
}


.details {
    margin-top: 4px;

    color: #8592a2;

    font-size: 13px;
}


.points {
    margin-left: 10px;

    white-space: nowrap;

    font-weight: 700;
}


/* =========================
   RECHERCHE
========================= */

.recherche {
    width: 100%;

    margin-bottom: 18px;

    padding: 15px;

    background: #151c25;

    border: 1px solid #293544;

    border-radius: 15px;

    outline: none;

    color: #ffffff;

    font-size: 16px;
}


.recherche:focus {
    border-color: #588cc4;
}


/* =========================
   ARTEFACTS
========================= */

.artefacts-grid {
    display: grid;

    grid-template-columns: 1fr;

    gap: 14px;
}


.artefact-card {
    display: block;

    overflow: hidden;

    background: #151c25;

    border: 1px solid #222d3a;

    border-radius: 19px;

    text-decoration: none;
}


.artefact-image-container {
    height: 210px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #0d1218;

    padding: 12px;
}


.artefact-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.image-absente {
    font-size: 55px;
}


.artefact-contenu {
    padding: 15px;
}


.artefact-nom {
    font-size: 17px;

    font-weight: 700;
}


.artefact-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 10px;

    color: #bbc5d0;

    font-size: 13px;

    text-transform: capitalize;
}


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

.detail-image-container {
    display: flex;

    justify-content: center;

    background: #0d1218;

    border-radius: 17px;

    padding: 15px;
}


.detail-image {
    max-width: 100%;

    max-height: 380px;

    object-fit: contain;
}


.detail-card h1 {
    margin-top: 20px;
}


.detail-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    color: #bdc6d1;

    text-transform: capitalize;
}


.detail-section {
    margin-top: 26px;
}


.detail-section h3 {
    margin-bottom: 8px;
}


.detail-section p {
    color: #c4ccd6;

    line-height: 1.55;
}


.quantite {
    margin-left: 12px;

    color: #f4c850;

    font-weight: 750;
}


.artefact-id {
    margin-top: 25px;

    color: #667484;

    font-size: 11px;

    word-break: break-all;
}


.vide {
    color: #8190a0;
}


/* =========================
   MINI ARTEFACTS JOUEUR
========================= */

.artefacts-mini-grid {
    display: grid;

    gap: 10px;
}


.mini-artefact {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px;

    background: #111820;

    border-radius: 13px;

    text-decoration: none;
}


.mini-artefact img {
    width: 60px;
    height: 60px;

    object-fit: contain;

    flex-shrink: 0;
}


/* =========================
   HISTORIQUE
========================= */

.historique {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.historique-ligne {
    padding: 14px;

    background: #151c25;

    border: 1px solid #222d3a;

    border-radius: 14px;

    color: #c2ccd7;

    font-size: 13px;

    line-height: 1.5;

    word-break: break-word;
}


/* =========================
   NAVIGATION MOBILE
========================= */

.bottom-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 1000;

    display: flex;

    background: rgba(12, 17, 23, 0.97);

    border-top: 1px solid #25303d;

    backdrop-filter: blur(15px);

    padding:
        8px
        5px
        calc(9px + env(safe-area-inset-bottom));
}


.nav-item {
    flex: 1;

    text-align: center;

    color: #758393;

    text-decoration: none;

    font-size: 20px;
}


.nav-item span {
    display: block;

    margin-top: 3px;

    font-size: 10px;
}


.nav-item.active {
    color: #ffffff;
}


/* =========================
   GRAND ECRAN
========================= */

@media (min-width: 700px) {

    .stats {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }


    .artefacts-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .artefacts-mini-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

/* =========================
   SESSION / DECONNEXION
========================= */

.top-session {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 14px;

    padding: 10px 14px;

    background: rgba(21, 28, 37, 0.94);

    border: 1px solid #222d3a;

    border-radius: 14px;

    color: #aeb8c4;

    font-size: 13px;
}

.top-session a {
    color: #84b8ff;

    text-decoration: none;

    font-weight: 600;
}


/* =========================
   LOGIN
========================= */

.login-container {
    min-height: calc(100vh - 40px);

    display: flex;

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

.login-card {
    width: 100%;
    max-width: 420px;

    background: rgba(21, 28, 37, 0.96);

    border: 1px solid #222d3a;

    border-radius: 24px;

    padding: 28px 22px;

    text-align: center;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-logo {
    font-size: 46px;

    margin-bottom: 12px;
}

.login-card h1 {
    margin: 0;

    font-size: 26px;
}

.login-card .details {
    margin-top: 8px;

    margin-bottom: 22px;
}

.login-form {
    display: flex;

    flex-direction: column;

    gap: 10px;

    text-align: left;
}

.login-form label {
    color: #aeb8c4;

    font-size: 13px;

    margin-top: 4px;
}

.login-form input {
    width: 100%;

    padding: 14px;

    background: #0f151c;

    border: 1px solid #293544;

    border-radius: 13px;

    color: #ffffff;

    font-size: 16px;

    outline: none;
}

.login-form input:focus {
    border-color: #588cc4;
}

.login-form button {
    margin-top: 10px;

    padding: 14px;

    background: #2b6ca8;

    border: none;

    border-radius: 13px;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;
}

.login-form button:hover {
    background: #347ab9;
}

.login-erreur {
    margin-bottom: 16px;

    padding: 12px;

    background: rgba(180, 50, 50, 0.15);

    border: 1px solid rgba(220, 80, 80, 0.35);

    border-radius: 12px;

    color: #ff9c9c;

    font-size: 13px;
}
/* =========================
   ADMIN UTILISATEURS
========================= */

.admin-add-button,
.admin-save-button {
    display: inline-block;
    width: 100%;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 0;
    border-radius: 14px;
    background: #2b6ca8;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.admin-user-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-form > label:not(.permission-row) {
    color: #aeb8c4;
    font-size: 13px;
}

.admin-user-form > input[type="text"],
.admin-user-form > input[type="password"] {
    width: 100%;
    padding: 14px;
    background: #0f151c;
    border: 1px solid #293544;
    border-radius: 13px;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

.permission-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #26313e;
}

.permission-row input {
    width: 20px;
    height: 20px;
}


/* Chef DMAJIN */
.chef-panel {
    margin: 28px 0 100px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(128,128,128,.07);
    border: 1px solid rgba(128,128,128,.16);
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 20px;
    align-items: center;
    overflow: hidden;
}
.chef-panel img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
}
.chef-badge {
    display: inline-block;
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: 8px;
}
.chef-text h2 { margin: 0 0 8px; }
.chef-text p { opacity: .72; margin: 0; line-height: 1.5; }
@media (max-width: 650px) {
    .chef-panel { grid-template-columns: 1fr; }
    .chef-panel img { max-height: 360px; }
}

/* V8 - filtres modernes */
.filter-panel {
    margin: 18px 0 14px;
    padding: 14px;
    border: 1px solid rgba(128,128,128,.16);
    border-radius: 18px;
    background: rgba(128,128,128,.06);
}
.filter-title {
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .65;
    margin: 0 0 10px 4px;
}
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-tab {
    border: 1px solid rgba(128,128,128,.22);
    background: rgba(128,128,128,.08);
    color: inherit;
    border-radius: 14px;
    padding: 9px 12px;
    min-height: 44px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.filter-tab:hover { transform: translateY(-1px); }
.filter-tab.actif {
    background: rgba(80,170,255,.16);
    border-color: rgba(80,170,255,.48);
}
.filter-tab span { font-size: 1.05rem; }
.filter-tab b { font-size: .92rem; }
.filter-tab em {
    font-style: normal;
    font-size: .76rem;
    opacity: .68;
    min-width: 1.4em;
    text-align: center;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(128,128,128,.13);
}

.comparateur-filter-panel { margin-top: 18px; }
.comparateur-filter-row { display:flex; gap:8px; flex-wrap:wrap; }
.comparateur-filter-row + .comparateur-filter-row { margin-top: 9px; }
.comparateur-filter-row .filter-tab { border-radius: 999px; }

@media (max-width: 600px) {
    .filter-tab { flex: 1 1 calc(50% - 8px); justify-content: center; }
}
