/* ===== RESET ===== */
html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

/* ===== VARIABLES ===== */
:root {
    --main: #CC564A;
    --light: #EF8B81;
    --white: #FFFFFF;
    --bg-dark: #120d16;
    --bg-mid: #1a1220;
}

/* ===== BACKGROUND GLOBAL ===== */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(239, 139, 129, 0.18), transparent 25%),
        radial-gradient(circle at 85% 15%, rgba(204, 86, 74, 0.16), transparent 22%),
        linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* ✅ Correction mobile */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

/* ===== HEADER BAR GLOW ===== */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #EF8B81, #CC564A, #EF8B81);
    z-index: 9999;
    box-shadow: 0 0 18px rgba(239, 139, 129, 0.35);
}

/* ===== PANEL FILTRES ===== */
.filter-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(22, 8, 10, 0.96), rgba(30, 10, 13, 0.94));
    border: 1px solid rgba(239, 139, 129, 0.25);
    border-radius: 18px;
    padding: 25px;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(239, 139, 129, 0.05);
    backdrop-filter: blur(10px);
}

.filter-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(239, 139, 129, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(204, 86, 74, 0.08), transparent 30%);
    pointer-events: none;
    border-radius: 18px;
}

.filter-panel-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.filter-panel-subtitle {
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 14px 0;
    position: relative;
    z-index: 1;
}

/* ===== GRID ===== */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    position: relative;
    z-index: 1;
}

.filter-grid-logs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-span-2 {
    grid-column: span 2;
}

/* ===== INPUT GROUP ===== */
.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 15px;
    color: #ff9a90;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-shadow: 0 0 8px rgba(239, 139, 129, 0.25);
}

/* ===== INPUTS ===== */
.filter-group input,
.filter-group select {
    height: 48px;
    padding: 0 15px;
    background: rgba(20, 10, 12, 0.9) !important;
    border: 1px solid rgba(239, 139, 129, 0.3) !important;
    border-radius: 999px !important;
    color: white !important;
    transition: 0.2s;
    box-sizing: border-box;
}

.filter-group input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: #EF8B81 !important;
    box-shadow: 0 0 0 3px rgba(239, 139, 129, 0.2);
    outline: none;
}

/* ===== ACTIONS ===== */
.filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 22px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

/* ===== BOUTONS ===== */
.filter-btn-primary,
.filter-btn-secondary {
    height: 48px;
    min-width: 140px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    margin: 0;
}

.filter-btn-primary {
    background: linear-gradient(135deg, #EF8B81, #CC564A) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(204, 86, 74, 0.3);
    cursor: pointer;
    transition: 0.2s;
}

.filter-btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.filter-btn-secondary {
    background: transparent !important;
    border: 1px solid rgba(239, 139, 129, 0.3) !important;
    color: white !important;
    cursor: pointer;
    transition: 0.2s;
}

.filter-btn-secondary:hover {
    background: rgba(239, 139, 129, 0.1);
}

.filter-meta {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 48px;
}

/* ===== TABLE ===== */
.table-panel {
    border: 1px solid rgba(239, 139, 129, 0.12);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(17, 7, 10, 0.96), rgba(15, 7, 9, 0.98));
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

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

.logs-table thead {
    background: rgba(30, 10, 12, 0.9);
}

.logs-table thead th {
    color: #EF8B81 !important;
    font-weight: 700;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid rgba(239, 139, 129, 0.12);
}

.logs-table td {
    padding: 12px;
    color: #ccc;
    vertical-align: top;
}

.logs-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logs-table tbody tr:hover {
    background: rgba(239, 139, 129, 0.05);
}

.log-id {
    color: #EF8B81;
    font-weight: 800;
    white-space: nowrap;
}

.player-cell {
    min-width: 240px;
}

.player-main {
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.3;
}

.player-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.5;
    word-break: break-word;
}

.message-cell {
    min-width: 420px;
}

.message-text {
    white-space: pre-wrap;
    line-height: 1.65;
    color: #f2f2f2;
    font-size: 14px;
    word-break: break-word;
}

/* ===== PAGINATION ===== */
.pagination-btn {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(239, 139, 129, 0.18);
    color: #fff;
    text-decoration: none;
}

.pagination-btn:hover {
    background: rgba(239, 139, 129, 0.08);
}

/* ===== SCROLL ===== */
::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #CC564A;
    border-radius: 10px;
}

/* ===== LOGS UI ===== */
.log-row:hover {
    background: rgba(239, 139, 129, 0.04);
}

.date-main {
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.date-sub {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
    margin-top: 3px;
    white-space: nowrap;
}

.log-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-sizing: border-box;
}

.log-badge-info {
    background: rgba(96, 165, 250, 0.14);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.24);
}

.log-badge-warn {
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.24);
}

.log-badge-error {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.24);
}

.log-badge-success {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.24);
}

.resource-badge {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(239, 139, 129, 0.10);
    border: 1px solid rgba(239, 139, 129, 0.22);
    color: #ffd4cf;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.details-btn {
    height: 36px;
    min-width: 82px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(239, 139, 129, 0.26);
    background: rgba(239, 139, 129, 0.08);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.details-btn:hover {
    background: rgba(239, 139, 129, 0.14);
    border-color: rgba(239, 139, 129, 0.40);
    transform: translateY(-1px);
}

/* ===== MODALE DETAILS LOG ===== */
.log-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 6, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
}

.log-modal-overlay.is-open {
    display: flex;
}

.log-modal {
    width: min(980px, 100%);
    max-height: 90vh;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(239, 139, 129, 0.20);
    background: linear-gradient(180deg, rgba(24, 10, 14, 0.98), rgba(18, 8, 11, 0.98));
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(239, 139, 129, 0.08);
}

.log-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px 22px;
    border-bottom: 1px solid rgba(239, 139, 129, 0.12);
}

.log-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.log-modal-subtitle {
    margin: 6px 0 0 0;
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
}

.log-modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(239, 139, 129, 0.18);
    border-radius: 999px;
    background: rgba(239, 139, 129, 0.08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.log-modal-close:hover {
    background: rgba(239, 139, 129, 0.16);
    transform: scale(1.03);
}

.log-modal-body {
    padding: 20px 22px 22px 22px;
    overflow-y: auto;
    max-height: calc(90vh - 90px);
}

.log-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.log-modal-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.log-modal-item-full {
    grid-column: 1 / -1;
}

.log-modal-label {
    font-size: 12px;
    font-weight: 700;
    color: #EF8B81;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.log-modal-value {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    line-height: 1.55;
}

.log-break {
    word-break: break-word;
}

.log-modal-pre {
    margin: 0;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(239, 139, 129, 0.12);
    color: #ffffff;
    font-size: 24px;
    line-height: 1.7;
    font-weight: 700;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    max-height: 420px;
}

/* ===== HEADER ===== */
img[src="/assets/logo.png"] {
    max-width: 100%;
}

header img[src="/assets/logo.png"] {
    height: 26px !important;
    width: auto !important;
    max-height: 26px !important;
    display: block !important;
    object-fit: contain !important;
}

body img[src="/assets/logo.png"]:not(header img) {
    display: none !important;
}

.hero,
.hero-logo,
.top-logo,
.splash-logo,
.banner-logo,
.logo-hero {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

main,
.container,
section:first-of-type {
    margin-top: 0 !important;
}

.header-btn {
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
}

.header-btn-primary {
    background: linear-gradient(135deg, #EF8B81, #CC564A);
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(204, 86, 74, 0.25);
    border: none;
}

.header-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.header-btn-secondary {
    background: transparent;
    color: #fff !important;
    border: 1px solid rgba(239, 139, 129, 0.30);
}

.header-btn-secondary:hover {
    background: rgba(239, 139, 129, 0.08);
}

/* ===== LOGIN CLEAN ===== */
.login-page {
    position: relative;
    overflow: hidden;
}

.login-page > * {
    position: relative;
    z-index: 1;
}

/* masque le titre Connexion */
.login-page h1 {
    display: none !important;
}

.login-page .w-full.max-w-md {
    position: relative;
    z-index: 3;
}

.login-page .filter-panel {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 35px;
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, rgba(22, 8, 10, 0.75), rgba(30, 10, 13, 0.72));
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 110px rgba(239, 139, 129, 0.26);
}

/* ===== LOGO DE FOND DERRIÈRE LA BOX LOGIN ===== */
.login-page .filter-panel::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1500px;
    height: 1500px;
    transform: translate(-50%, -50%) translateX(+24px);
    background: url('/assets/logo-bg.png') center center no-repeat;
    background-size: contain;
    opacity: 0.52;
    z-index: -1;
    pointer-events: none;
    filter:
        saturate(1.55)
        contrast(1.12)
        brightness(1.18)
        drop-shadow(0 0 120px rgba(239, 139, 129, 0.55));
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-page .filter-group input {
    height: 56px;
    border-radius: 999px !important;
    font-size: 16px;
}

.login-btn {
    width: 100%;
    height: 56px;
    border-radius: 999px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border: none;
}

.filter-btn-primary.login-btn {
    background: linear-gradient(135deg, #EF8B81 0%, #CC564A 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 10px 24px rgba(204, 86, 74, 0.28);
}

.filter-btn-primary.login-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.filter-btn-secondary.login-btn {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(88, 101, 242, 0.28);
}

.filter-btn-secondary.login-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.discord-icon {
    width: 22px;
    height: 22px;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===== SELECT CATEGORIE ===== */
.filter-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, #EF8B81 50%),
        linear-gradient(135deg, #EF8B81 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 3px),
        calc(100% - 16px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.filter-group select option {
    background: #1a1220;
    color: #FFFFFF;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .filter-grid,
    .filter-grid-logs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-span-2 {
        grid-column: span 2;
    }

    .message-cell {
        min-width: 320px;
    }

    .resource-badge {
        max-width: 170px;
    }
}

@media (max-width: 700px) {
    .filter-grid,
    .filter-grid-logs,
    .log-modal-grid {
        grid-template-columns: 1fr;
    }

    .filter-span-2 {
        grid-column: span 1;
    }

    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-meta {
        margin-left: 0;
        text-align: center;
        line-height: 1.4;
    }

    .logs-table thead th,
    .logs-table td {
        padding: 10px 8px;
    }

    .message-cell,
    .player-cell {
        min-width: unset;
    }

    .details-btn {
        min-width: 70px;
        height: 34px;
        padding: 0 12px;
    }

    .log-modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 18px;
    }

    .log-modal-header,
    .log-modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .log-modal-title {
        font-size: 18px;
    }

    .login-page .filter-panel::before {
        width: 980px;
        height: 980px;
        transform: translate(-50%, -50%);
        opacity: 0.40;
    }
} 
/* ===== BACKGROUND GLOBAL MOBILE ===== */
@media (max-width: 768px) {
    body {
        background:
            radial-gradient(circle at 15% 20%, rgba(239, 139, 129, 0.18), transparent 40%),
            radial-gradient(circle at 85% 15%, rgba(204, 86, 74, 0.16), transparent 35%),
            linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
        background-attachment: scroll; /* fixed peut causer des bugs sur mobile */
        background-size: cover;
    }
}