* {
    box-sizing: border-box;
}

/* ── FIX FOOTER TOUJOURS EN BAS ── */
html, body {
    height: 100%;
}

:root {
    --clr-neon: #000000;
}
body.dark {
    --clr-neon: #ffffff;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 52px;
}

footer {
    margin-top: auto;
}

/* HEADER */
header {
    text-align: center;
    padding: 20px 15px 30px;
    font-size: 18px;
    letter-spacing: 3px;
    font-weight: 600;
}

/* MAIN */
main {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* SEARCH */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: 0.2s;
    width: 100%;
}

input:focus {
    outline: none;
    border-color: black;
}

button {
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    opacity: 0.85;
}

/* FILTERS */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    background: #f2f2f2;
    color: #111;
    transition: 0.25s ease;
}

.filter-btn.active {
    background: black;
    color: white;
    transform: scale(1.00);
}

/* RESULTS */
#results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    padding: 16px;
    border-radius: 14px;
    background: #f7f7f7;
    transform: translateY(10px);
    opacity: 0;
    animation: fadeUp 0.35s ease forwards;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn {
    background: black;
    color: white;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
}

/* ANIMATION */
@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* OVERLAY */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.overlay-content {
    background: white;
    width: 100%;
    max-width: 900px;
    height: 85vh;
    border-radius: 20px;
    padding: 30px;
    overflow-y: auto;
    position: relative;
}

#closeOverlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: black;
    color: rgb(0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    padding: 0;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: black;
    color: rgb(221, 221, 221);
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    opacity: 0;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
}

.hidden {
    display: none;
}

/* ======================
   NAVBAR (Centered Floating Pill Style)
====================== */
nav.topbar {
    position: fixed !important;
    top: 1.5rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important;
    max-width: 1200px !important;
    height: 68px !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 99px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 1.2rem !important;
    gap: 1rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

body {
    padding-top: 100px !important;
}

.logo-container {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.nav-logo-text {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    letter-spacing: 1px !important;
    color: #0f172a !important;
    text-decoration: none !important;
}

.nav-pill-menu {
    display: flex !important;
    align-items: center !important;
    background: #f1f5f9 !important;
    padding: 3px 5px !important;
    border-radius: 99px !important;
    gap: 0.1rem !important;
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

.nav-pill-link {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-decoration: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 99px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
}

.nav-pill-link:hover {
    color: var(--clr-neon) !important;
}

.nav-pill-link.active {
    background: #ffffff !important;
    color: var(--clr-neon) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.nav-pill-link svg {
    width: 15px !important;
    height: 15px !important;
}

.nav-right {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    gap: 8px !important;
}

.btn-login {
    display: inline-flex;
    align-items: center !important;
    gap: 6px !important;
    padding: 0.45rem 1rem !important;
    background: #0f172a !important;
    border: none !important;
    color: #fff !important;
    font-family: 'Outfit', Arial, sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border-radius: 99px !important;
    transition: opacity 0.2s, background 0.2s !important;
    white-space: nowrap !important;
}
.btn-login svg { width: 13px !important; height: 13px !important; flex-shrink: 0 !important; }
.btn-login:hover { opacity: 0.82 !important; }
body.dark .btn-login { background: #fff !important; color: #0f172a !important; }

.nav-user {
    display: none;
    align-items: center !important;
    gap: 9px !important;
    cursor: pointer !important;
    position: relative !important;
}
.nav-avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--clr-neon) !important;
    background: #f2f2f2 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.nav-avatar img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.nav-avatar-initials {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--clr-neon) !important;
}
.nav-username {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

body.dark nav.topbar {
    background: rgba(26, 26, 36, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
body.dark .nav-logo-text {
    color: #f1f5f9 !important;
}
body.dark .nav-pill-menu {
    background: #1e1e2a !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
}
body.dark .nav-pill-link.active {
    background: #252533 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
body.dark .nav-username {
    color: #f1f5f9 !important;
}
body.dark .nav-user-dropdown {
    background: #1a1a24 !important;
    border-color: #252533 !important;
}
body.dark .dropdown-header {
    border-bottom-color: #252533 !important;
}
body.dark .dropdown-header .d-username {
    color: #f1f5f9 !important;
}
body.dark .dropdown-item {
    color: #cbd5e1 !important;
}
body.dark .dropdown-item:hover {
    background: #252533 !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    border: 1px solid #e2e8f0 !important;
    background: transparent !important;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
body.dark .theme-toggle-btn {
    border-color: #2e2e3e !important;
    color: #94a3b8;
}
.theme-toggle-btn:hover {
    background: rgba(0,0,0,0.04) !important;
    transform: scale(1.05);
}
body.dark .theme-toggle-btn:hover {
    background: rgba(255,255,255,0.06) !important;
}

/* Hamburger Button */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    color: #0f172a;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.dark .mobile-menu-btn {
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9;
}
.mobile-menu-btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 820px) {
    nav.topbar {
        width: 95% !important;
    }
    .nav-pill-menu {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Mobile Dropdown Drawer */
.mobile-nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
body.dark .mobile-nav-dropdown {
    background: rgba(26, 26, 36, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}
.mobile-dropdown-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 0.5rem;
}
body.dark .mobile-dropdown-header {
    border-bottom-color: rgba(255,255,255,0.08);
}
.mobile-menu-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mobile-dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
}
.mobile-dropdown-link svg {
    width: 16px;
    height: 16px;
}
.mobile-dropdown-link:hover,
.mobile-dropdown-link.active {
    background: #f1f5f9;
    color: #0f172a;
}
body.dark .mobile-dropdown-link:hover,
body.dark .mobile-dropdown-link.active {
    background: #252533;
    color: #f1f5f9;
}
.mobile-dropdown-link.active svg {
    color: #df6bd9;
}

/* ======================
   USER DROPDOWN MENU
====================== */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    min-width: 200px;
    padding: 8px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-user-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-header {
    padding: 10px 12px 12px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 6px;
}
.dropdown-header .d-username {
    font-weight: 700;
    font-size: 14px;
    color: #111;
}
.dropdown-header .d-role {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    padding: 10px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: #111 !important;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background 0.15s !important;
    letter-spacing: 0.03em;
}
.dropdown-item:hover {
    background: #f5f5f5 !important;
    opacity: 1 !important;
}
.dropdown-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.6;
}
.dropdown-item.danger {
    color: #cc0000 !important;
}
.dropdown-item.danger svg { opacity: 0.7; }
.dropdown-item.danger:hover {
    background: #fff0f0 !important;
}
.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 6px 0;
}

/* ======================
   AUTH OVERLAY
====================== */
#authOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#authOverlay > div {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    user-select: none;
}

#authOverlay input,
#authOverlay textarea {
    user-select: text;
}

.btn-close-x {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    opacity: 0.3;
    transition: opacity 0.2s !important;
}
.btn-close-x:hover { opacity: 1 !important; }

.auth-tab-btn {
    flex: 1 !important;
    padding: 9px !important;
    border: none !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s !important;
    transform: none !important;
    width: auto !important;
    font-family: Arial, sans-serif;
}
.auth-tab-btn.is-active   { background: #111 !important; color: #fff !important; }
.auth-tab-btn.is-inactive { background: transparent !important; color: #888 !important; }

.auth-input {
    width: 100% !important;
    padding: 11px 13px !important;
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    outline: none !important;
    box-sizing: border-box !important;
    flex: unset !important;
    transition: border-color 0.2s !important;
    user-select: text;
}
.auth-input:focus { border-color: #111 !important; }

.auth-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
    user-select: none;
}

.auth-submit-btn {
    width: 100% !important;
    padding: 13px !important;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
    transform: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: Arial, sans-serif;
}
.auth-submit-btn:hover    { opacity: 0.85 !important; }
.auth-submit-btn:disabled { opacity: 0.5 !important; cursor: not-allowed !important; }

.auth-error {
    display: none;
    padding: 10px 14px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #cc0000;
    font-size: 13px;
}

#passStrength {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
#passStrength span {
    flex: 1;
    height: 3px;
    background: #eee;
    border-radius: 2px;
    transition: background 0.3s;
}

/* Alias anciens (compatibilité) */
.auth-overlay-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000; display: none;
    justify-content: center; align-items: center; padding: 20px;
}
.auth-box {
    background: white; border-radius: 16px; padding: 32px;
    width: 100%; max-width: 400px; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.auth-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; background: none;
    border: 1px solid #ddd; border-radius: 8px;
    cursor: pointer; font-size: 16px; padding: 0;
    display: flex; align-items: center; justify-content: center; color: #111;
}
.auth-tabs { display: flex; background: #f2f2f2; border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.auth-tab  { flex: 1; padding: 9px; background: transparent; border: none; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; color: #888; transition: 0.2s; }
.auth-tab.active { background: black; color: white; transform: none; }
.auth-form  { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input { width: 100%; flex: unset; }
.form-error { display: none; padding: 10px 14px; background: #fff0f0; border: 1px solid #ffcccc; border-radius: 8px; color: #cc0000; font-size: 13px; }
.pass-strength { display: flex; gap: 4px; margin-top: 2px; }
.pass-strength span { flex: 1; height: 3px; background: #eee; border-radius: 2px; transition: background 0.3s; }

.btn-logout {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #111;
    transition: 0.2s;
}
.btn-logout:hover { border-color: #111; }

/* ======================
   PROFILE PAGE
====================== */
.profile-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.profile-section {
    background: #f7f7f7;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.profile-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #999;
    margin-bottom: 18px;
}

.avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #111;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #111;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-secondary {
    padding: 9px 16px !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: #111 !important;
    cursor: pointer;
    transition: border-color 0.2s !important;
}
.btn-secondary:hover {
    border-color: #111 !important;
    opacity: 1 !important;
}

.btn-primary {
    padding: 11px 20px !important;
    background: black !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: white !important;
    cursor: pointer;
    transition: opacity 0.2s !important;
}
.btn-primary:hover { opacity: 0.8 !important; }

.btn-danger {
    padding: 11px 20px !important;
    background: #cc0000 !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: white !important;
    cursor: pointer;
    transition: opacity 0.2s !important;
}
.btn-danger:hover { opacity: 0.8 !important; }

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.profile-field:last-child { margin-bottom: 0; }
.profile-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
}
.profile-field input {
    width: 100%;
    flex: unset;
    background: white;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #efefef;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; font-weight: 600; color: #111; }
.toggle-desc  { font-size: 11px; color: #999; margin-top: 2px; }

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute;
    inset: 0;
    background: #ddd;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track { background: #111; }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

.tfa-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.tfa-status.off { background: #fff0f0; color: #cc0000; }
.tfa-status.on  { background: #f0fff4; color: #008833; }
.tfa-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tfa-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.discord-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 18px !important;
    background: #5865F2 !important;
    border: none !important;
    border-radius: 10px !important;
    color: white !important;
    font-size: 13px !important;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s !important;
    text-decoration: none;
}
.discord-btn:hover { opacity: 0.85 !important; }
.discord-btn svg { width: 18px; height: 18px; }

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 20000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-bg.open { display: flex; }
.modal-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 0 !important;
    cursor: pointer;
    font-size: 16px !important;
    color: #111 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111;
}
.modal-sub {
    font-size: 13px;
    color: #666;
    margin-bottom: 22px;
    line-height: 1.5;
}

.code-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}
.code-digit {
    width: 44px !important;
    height: 52px !important;
    text-align: center;
    font-size: 22px !important;
    font-weight: 700;
    border-radius: 10px !important;
    border: 1.5px solid #ddd !important;
    flex: unset !important;
    padding: 0 !important;
    transition: border-color 0.2s;
}
.code-digit:focus { border-color: #111 !important; }

.profile-success {
    display: none;
    padding: 10px 14px;
    background: #f0fff4;
    border: 1px solid #b3efc7;
    border-radius: 8px;
    color: #008833;
    font-size: 13px;
    margin-bottom: 14px;
}
.profile-error {
    display: none;
    padding: 10px 14px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #cc0000;
    font-size: 13px;
    margin-bottom: 14px;
}

/* ======================
   FOOTER
====================== */
footer {
    border-top: 1px solid #222;
    background: #1b1b1b;
    padding: 30px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #5a5a5a;
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    font-size: 12px;
    color: #5a5a5a;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #aaa;
}

.footer-copy {
    font-size: 11px;
    color: #5a5a5a;
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 768px) {
    main {
        padding: 15px;
    }

    .search-box {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .overlay-content {
        height: 90vh;
        padding: 20px;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stat-item { flex: 0 0 100%; }
}

@media (max-width: 820px) {
    .nav-pill-menu {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Bouton Thème */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    color: #0f172a;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.dark .theme-toggle-btn {
    border-color: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

/* Bouton Hamburger */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--clr-border, rgba(0, 0, 0, 0.06));
    background: transparent;
    color: var(--clr-slate, #0f172a);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-btn svg {
    width: 18px;
    height: 18px;
}

/* Tiroir / Dropdown Mobile */
.mobile-nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

body.dark .mobile-nav-dropdown {
    background: rgba(26, 26, 36, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

.mobile-dropdown-header {
    border-bottom: 1px solid var(--clr-light-gray, rgba(0,0,0,0.06));
    padding-bottom: 0.5rem;
}

.mobile-menu-title {
    font-family: var(--ff-heading, 'Outfit');
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--clr-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clr-muted, #64748b);
    transition: all 0.2s;
}

.mobile-dropdown-link svg {
    width: 16px;
    height: 16px;
    color: var(--clr-muted, #64748b);
}

.mobile-dropdown-link:hover,
.mobile-dropdown-link.active {
    background: #f1f5f9;
    color: var(--clr-slate, #0f172a);
}

body.dark .mobile-dropdown-link:hover,
body.dark .mobile-dropdown-link.active {
    background: #252533;
    color: #f1f5f9;
}

.mobile-dropdown-link.active svg {
    color: var(--brand, #df6bd9);
}