:root {
    --bg: #0b0f17;
    --bg-alt: #101622;
    --surface: #151d2c;
    --surface-hover: #1b2538;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e6edf7;
    --muted: #95a4bd;
    --gold: #f5b041;
    --gold-dark: #d48e1f;
    --cyan: #38bdf8;
    --green: #34d399;
    --red: #f87171;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(circle at top right, #182338 0%, var(--bg) 45%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--gold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background: rgba(255, 255, 255, 0.07);
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    font-size: 0.9em;
}

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    flex: 1;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(9, 13, 21, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 66px;
    flex-wrap: nowrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    font-size: 1.1rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    color: #0b0f17;
    background: linear-gradient(135deg, var(--gold), #ffd27d);
    box-shadow: 0 4px 14px rgba(245, 176, 65, 0.25);
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid rgba(245, 176, 65, 0.45);
    box-shadow: 0 4px 14px rgba(245, 176, 65, 0.25);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: nowrap;
}

.main-nav a {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    text-decoration: none;
    border-bottom-color: var(--gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.lang-dropdown {
    position: relative;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.72rem;
    font-size: 0.84rem;
    font-weight: 700;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.lang-toggle:hover,
.lang-dropdown.is-open .lang-toggle {
    border-color: var(--gold);
    background: var(--surface-hover);
}

.lang-caret {
    font-size: 0.72rem;
    transition: transform 0.18s ease;
}

.lang-dropdown.is-open .lang-caret {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 155px;
    background: #121a28;
    border: 1px solid rgba(245, 176, 65, 0.25);
    border-radius: 10px;
    padding: 0.35rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 50;
}

.lang-dropdown.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.48rem 0.7rem;
    border-radius: 7px;
    color: var(--text);
    font-size: 0.88rem;
    text-decoration: none;
}

.lang-item small {
    color: var(--muted);
    font-size: 0.75rem;
}

.lang-item:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.lang-item.active {
    background: rgba(245, 176, 65, 0.15);
    color: var(--gold);
    font-weight: 600;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.42rem 0.85rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0b0f17;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Badges & Tags */
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.45rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    margin-bottom: 0.65rem;
}

.tag-gold {
    background: rgba(245, 176, 65, 0.15);
    color: var(--gold);
}

.tag-cyan {
    background: rgba(56, 189, 248, 0.15);
    color: var(--cyan);
}

.role-badge,
.status-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: capitalize;
}

.role-admin {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}

.role-support {
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
}

.role-membre {
    background: rgba(52, 211, 153, 0.16);
    color: #6ee7b7;
}

.status-ouvert {
    background: rgba(245, 176, 65, 0.18);
    color: var(--gold);
}

.status-en_cours {
    background: rgba(56, 189, 248, 0.18);
    color: var(--cyan);
}

.status-resolu {
    background: rgba(52, 211, 153, 0.18);
    color: var(--green);
}

/* Hero & Sections — Style Paladium / Gaming Cinématique */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    min-height: 76vh;
    display: flex;
    align-items: center;
    background-color: #070a11;
    background-image:
        radial-gradient(circle at 20% 35%, rgba(245, 176, 65, 0.16), transparent 52%),
        linear-gradient(90deg, rgba(7, 10, 17, 0.92) 0%, rgba(7, 10, 17, 0.72) 55%, rgba(7, 10, 17, 0.85) 100%),
        linear-gradient(180deg, rgba(7, 10, 17, 0.35) 0%, rgba(11, 15, 23, 0.98) 100%),
        url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(245, 176, 65, 0.22);
    overflow: hidden;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.45rem);
    line-height: 1.12;
    margin-bottom: 1rem;
    text-shadow: 0 6px 28px rgba(0, 0, 0, 0.75);
}

.hero h1 span {
    background: linear-gradient(135deg, #ffd27d, #f5b041, #ff7b39);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    color: #c5d0e3;
    font-size: 1.08rem;
    max-width: 62ch;
}

.hero-cta {
    display: flex;
    gap: 0.9rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.hero-panel {
    display: grid;
    gap: 0.95rem;
}

.stat-card {
    background: rgba(15, 22, 34, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 176, 65, 0.22);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.15rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: 1.25rem;
}

.stat-sub {
    font-size: 0.9rem;
    color: var(--muted);
}

.section {
    padding: 3.5rem 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.page-banner {
    padding: 2.5rem 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.banner-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.8rem;
    gap: 1rem;
}

.cards-2,
.cards-3 {
    display: grid;
    gap: 1.35rem;
}

.cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.mini-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card h2,
.card h3 {
    margin-bottom: 0.65rem;
}

.card p {
    color: var(--muted);
}

.project-shardaria {
    border-top: 3px solid var(--gold);
}

.project-vartacraft {
    border-top: 3px solid var(--cyan);
}

.feature-list {
    margin: 1rem 0 1.25rem 1.15rem;
    color: var(--text);
}

.feature-list li {
    margin-bottom: 0.35rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-line {
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.showcase-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.muted {
    color: var(--muted);
}

/* Forms & Auth */
.auth-wrap {
    max-width: 480px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.form-stack label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.68rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #0d131e;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.select-inline {
    width: auto;
    padding: 0.35rem 0.6rem;
}

.demo-box {
    margin-top: 1.35rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--border);
    font-size: 0.86rem;
}

.demo-box ul {
    margin: 0.45rem 0 0 1.1rem;
}

.auth-switch {
    margin-top: 1.15rem;
    font-size: 0.92rem;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background: rgba(52, 211, 153, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

.alert-error {
    background: rgba(248, 113, 113, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

/* Dashboard, Tables & Tickets */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 1.5rem;
    align-items: start;
}

.admin-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-kpis {
    display: flex;
    gap: 1rem;
}

.kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    text-align: center;
}

.kpi strong {
    display: block;
    font-size: 1.25rem;
    color: var(--gold);
}

.kpi span {
    font-size: 0.8rem;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 0.8rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table th,
.table td {
    padding: 0.72rem 0.65rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.ticket-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reply-card p {
    color: var(--text);
    margin-top: 0.6rem;
}

.reply-staff {
    border-left: 3px solid var(--cyan);
}

.reply-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.news-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.news-admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

/* Footer */
.site-footer {
    background: #080b12;
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
}

.legal-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 860px;
}

.legal-stack p + p {
    margin-top: 0.75rem;
}

.form-stack .checkbox-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 400;
}

.form-stack .checkbox-row input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.footer-brand {
    margin-bottom: 0.65rem;
}

.footer-links {
    list-style: none;
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-size: 1.15rem;
    cursor: pointer;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cookie Banner & Modal */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9990;
    background: rgba(15, 22, 34, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 176, 65, 0.35);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    color: var(--text);
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
    display: none;
}

.cookie-banner-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-banner-text p {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9995;
    background: rgba(5, 8, 14, 0.78);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.cookie-modal-card {
    width: 100%;
    max-width: 520px;
    background: #131b29;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    color: var(--text);
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.cookie-opt {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
}

.cookie-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

@media (max-width: 1024px) {
    .nav-wrap {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0.75rem 0;
        border-top: 1px solid var(--border);
    }

    .main-nav.is-open {
        display: flex;
    }

    .hero-grid,
    .cards-2,
    .cards-3,
    .dashboard-grid,
    .ticket-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
