/* EVO FA — base (reset, nav, boutons, layout, auth) — chargé sur toutes les pages */

* { margin: 0; padding: 0; box-sizing: border-box; }
button { font: inherit; color: inherit; }

:root {
    --accent: #ff6b00;
    --accent-bright: #ff8c1a;
    --black: #0a0a0a;
    --dark: #141414;
    --dark-gray: #1a1a1a;
    --card: #1a1a1a;
    --medium-gray: #2a2a2a;
    --line: #2a2a2a;
    --line-soft: #1f1f1f;
    --light-gray: #4a4a4a;
    --muted: #9a9a9a;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background: var(--black);
    color: #d0d0d0;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* ---- Nav ---------------------------------------------------------------- */
nav.top {
    position: fixed;
    inset: 0 0 auto 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-bottom: 2px solid var(--accent);
}
.nav-container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 2rem;
    flex-wrap: wrap;
}
.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: wrap;
}
.nav-links a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.09em;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-badge {
    background: var(--accent);
    color: #0a0a0a;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
}

.nav-hamb {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}
.nav-hamb span { width: 24px; height: 3px; background: var(--accent); border-radius: 2px; }

@media (max-width: 820px) {
    nav.top .nav-container { position: relative; flex-wrap: nowrap; }
    nav.top .nav-hamb { display: flex; }
    nav.top .nav-links.collapsible {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #0a0a0a;
        border-top: 2px solid var(--accent);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    nav.top .nav-links.collapsible.open { max-height: 80vh; overflow-y: auto; }
    nav.top .nav-links.collapsible > li { width: 100%; border-bottom: 1px solid var(--line); }
    nav.top .nav-links.collapsible > li > a { display: block; padding: 1rem 1.5rem; }
    nav.top .nav-links.collapsible .nav-auth { padding: 0.9rem 1.5rem; justify-content: flex-start; }
    nav.top .nav-links.collapsible .auth-user { flex-wrap: wrap; gap: 0.5rem; }
}

/* ---- Auth (nav + compte) --------------------------------------------------- */
.nav-auth { display: flex; align-items: center; }
.auth-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--accent); color: #0a0a0a; border: 0; border-radius: 6px;
    padding: 0.5rem 0.9rem; font: inherit; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.82rem;
    line-height: 1; cursor: pointer; text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.auth-btn:hover { background: var(--accent-bright); }
.auth-btn.ghost { background: transparent; color: #d0d0d0; border: 1px solid var(--light-gray); font-weight: 600; }
.auth-btn.ghost:hover { border-color: var(--accent); color: #fff; }
.auth-user { display: inline-flex; align-items: center; gap: 0.6rem; }
.auth-user-link {
    display: inline-flex; align-items: center; gap: 0.6rem;
    text-decoration: none; color: inherit; border-radius: 6px;
    padding: 0.2rem 0.35rem; transition: background 0.15s ease;
}
.auth-user-link:hover { background: rgba(255, 255, 255, 0.06); }
.auth-user-link:hover .auth-name { color: var(--accent); }
.auth-avatar { border-radius: 50%; display: block; }
.auth-name {
    font-weight: 600; font-size: 0.9rem; color: #fff;
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Shell commun -------------------------------------------------------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 110px 2rem 5rem; }
.wrap.narrow { max-width: 820px; }
.wrap.wide { max-width: 1300px; }

.page-head { margin-bottom: 2rem; }
.page-head h1 { color: #fff; font-size: 1.8rem; font-weight: 700; }
.page-head p { color: var(--muted); margin-top: 0.4rem; }

.breadcrumb { font-size: 0.82rem; color: #7a7a7a; margin-bottom: 1rem; }
.breadcrumb a { color: #9a9a9a; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span::before { content: "›"; margin: 0 0.5rem; color: #555; }

.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--accent); color: #0a0a0a; border: 0; border-radius: 6px;
    padding: 0.6rem 1.1rem; font-weight: 700; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer;
    text-decoration: none; line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--accent-bright); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: #d0d0d0; border: 1px solid var(--line); font-weight: 600; }
.btn.ghost:hover { background: transparent; border-color: var(--accent); color: #fff; }
.btn.sm { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
.btn.icon-btn { padding: 0.55rem 0.7rem; font-size: 1rem; }

.empty {
    text-align: center; color: #6a6a6a; padding: 3rem 1rem;
    border: 1px dashed var(--line); border-radius: 12px;
}
.needs-auth { text-align: center; padding: 3rem 1rem; }
.needs-auth p { color: var(--muted); margin-bottom: 1.25rem; }

/* ---- Page compte ------------------------------------------------------------ */
.account-card {
    display: flex; gap: 1.25rem; align-items: center;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 10px; padding: 1.25rem; margin: 1rem 0 1.5rem;
}
.account-avatar { border-radius: 50%; flex: 0 0 auto; }
.account-fields p { display: flex; flex-direction: column; margin: 0.45rem 0; }
.account-fields span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: #7a7a7a; }
.account-fields strong { color: #fff; font-size: 0.95rem; word-break: break-all; }
.account-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.75rem; }
.sync-note { font-size: 0.85rem; line-height: 1.45; padding: 0.6rem 0.8rem; border-radius: 6px; border: 1px solid var(--line); }
.sync-note.ok { color: #a7e6c6; border-color: rgba(61, 214, 140, 0.4); background: rgba(61, 214, 140, 0.08); }
.sync-note.ko { color: #ff9b9d; border-color: rgba(229, 72, 77, 0.45); background: rgba(229, 72, 77, 0.09); }

/* Rôle : pastilles colorées */
.account-fields .role-line { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.account-fields .role-pill {
    --c: #9a9a9a;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.16rem 0.5rem; border-radius: 999px;
    color: var(--c);
    border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
    background: color-mix(in srgb, var(--c) 14%, transparent);
}
.account-fields .role-pill-tier { --c: #cfcfcf; }

/* Mes tickets ouverts */
.account-tickets {
    display: flex; gap: 0.75rem; margin: 0 0 1.25rem;
    text-decoration: none;
}
.at-stat {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 0.15rem;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 10px; padding: 0.9rem 1rem;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: #8a8a8a;
    transition: border-color 0.15s;
}
.account-tickets:hover .at-stat { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.at-stat b { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: 0; }
.at-staff b { color: #ff9b6b; }
.at-me b { color: #ffd166; }

@media (max-width: 820px) {
    .wrap { padding: 92px 1.25rem 4rem; }
    .page-head h1 { font-size: 1.5rem; }
    .account-card { flex-direction: column; text-align: center; }
    .account-card .role-line { justify-content: center; }
    .account-tickets { flex-direction: column; }
}
