/* VYBZZ : nouveau design de l'app. Chargé après style.css, ne change aucune logique. */

:root {
    --bg-dark: #0B0B0E;
    --bg-card: #121218;
    --bg-card-hover: #17171F;
    --text-primary: #F4F2FA;
    --text-secondary: #A9A6B8;
    --primary: #FF4DEE;
    --primary-hover: #FF00E5;
    --primary-neon: #FF4DEE;
    --primary-glow: rgba(255, 0, 229, 0.16);
    --secondary: #8A2BE2;
    --accent-glow: rgba(255, 0, 229, 0.35);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --v2-cyan: #00F0FF;
    --v2-ok: #3DF5A4;
    --v2-warn: #FFB547;
    --v2-danger: #FF5C7A;
    --v2-grad-btn: linear-gradient(110deg, #7B22D6, #C900B5);
    --v2-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { font-size: 15px; }
body { background: var(--bg-dark); }
:focus-visible { outline: 2px solid var(--v2-cyan); outline-offset: 2px; }
.neon-primary { color: var(--primary); text-shadow: none; }
.neon-text { color: var(--primary); text-shadow: none; }

/* ---------- Boutons ---------- */
.btn { font-family: var(--font-heading); }
.btn-primary {
    background: var(--v2-grad-btn);
    box-shadow: 0 8px 24px -10px rgba(255, 0, 229, 0.6);
}
.btn-primary:hover { box-shadow: 0 10px 28px -10px rgba(255, 0, 229, 0.85); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-glow); }
.nav-btn-create { background: var(--v2-grad-btn); color: #fff; box-shadow: none; font-family: var(--font-heading); }
.nav-btn-create:hover { background: var(--v2-grad-btn); color: #fff; box-shadow: 0 8px 24px -10px rgba(255, 0, 229, 0.8); }
#userLoginBtn { background: rgba(255, 255, 255, 0.06) !important; box-shadow: none !important; border: 1px solid rgba(255, 255, 255, 0.14) !important; }

/* ---------- Accueil compact : les événements sont visibles tout de suite ---------- */
.hero {
    min-height: 0;
    padding: 2.5rem 5% 1.5rem;
    text-align: left;
    background: radial-gradient(ellipse at 15% 0%, rgba(138, 43, 226, 0.25), transparent 65%);
}
.hero-content { max-width: 1200px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.08; margin: 0.6rem 0; }
.hero h1 .neon-primary {
    background: linear-gradient(100deg, #B26BFF 0%, #FF4DEE 55%, #5CF6FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { font-size: 1rem; margin: 0; max-width: 560px; }
.hero .badge { font-size: 0.75rem; }
.hero-overlay { display: none; }
.container { padding-top: 0.5rem; }

/* Bloc marketing retiré de l'app : la landing porte ce message. */
.features-section { display: none !important; }

.section-header { margin-bottom: 1rem; }
.section-header h2 { font-size: 1.45rem; }
.section-header h2::before { display: none; }
.view-all { color: var(--primary); font-weight: 700; }

/* ---------- Filtres ---------- */
.filter-bar {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.filter-search, .filter-group {
    background: #17171F;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    min-height: 46px;
}
.filter-search:focus-within, .filter-group:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.25);
}

/* ---------- Cartes événement ---------- */
.events-grid { gap: 1.25rem; }
.event-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s var(--v2-ease), border-color 0.25s;
    display: flex;
    flex-direction: column;
}
.event-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 0, 229, 0.4);
    box-shadow: 0 24px 50px -30px rgba(255, 0, 229, 0.6);
}
.card-image-wrapper { aspect-ratio: 16 / 10; height: auto; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.price-tag {
    top: 12px;
    right: 12px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(11, 11, 14, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-family: var(--font-heading);
    font-weight: 700;
    box-shadow: none;
}
.price-tag.is-soldout { background: var(--v2-danger); border-color: transparent; }
.card-image-wrapper.is-soldout img { filter: grayscale(80%) brightness(50%); }
.card-content { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.v2-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.event-badge {
    background: var(--primary-glow);
    color: #FF4DEE;
    border: 0;
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}
.event-badge.is-school { background: rgba(0, 240, 255, 0.12); color: var(--v2-cyan); }
.event-badge.is-age { background: rgba(255, 92, 122, 0.14); color: var(--v2-danger); }
.v2-going { margin-bottom: 0.4rem; font-size: 0.8rem; font-weight: 700; color: var(--v2-warn); }
.event-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.45rem; }
.event-date, .event-venue { font-size: 0.87rem; color: var(--text-secondary); margin-bottom: 0.15rem; }
.event-description { display: none; }
.v2-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto; padding-top: 0.9rem; }
.v2-card-actions .buy-btn { flex: 1; padding: 0.55rem 0.9rem; min-height: 42px; }
.v2-card-actions .buy-btn:disabled { background: #2a2a33; color: #8b8998; box-shadow: none; cursor: not-allowed; }
.like-btn {
    padding: 0.5rem 0.75rem;
    min-height: 42px;
    border-color: rgba(255, 255, 255, 0.14);
    font-size: 0.85rem;
    gap: 0.35rem;
}
.like-btn .like-label { display: none; }
.like-btn.liked { color: var(--primary); border-color: var(--primary); }

/* ---------- Fenêtres ---------- */
.modal { background: rgba(5, 5, 8, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
}
.modal-header { border-bottom-color: rgba(255, 255, 255, 0.08); }
.close-modal {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.modal-hero-overlay { background: linear-gradient(to top, #121218 5%, transparent 80%); }
.checkout-close { position: absolute; top: 14px; right: 14px; z-index: 5; background: rgba(11, 11, 14, 0.75); }

/* ---------- Choix du billet et paiement ---------- */
.event-meta p { color: var(--text-secondary); }
.event-meta i { color: var(--primary); }
.tier-card {
    background: #17171F;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: border-color 0.15s, background 0.15s;
}
.tier-card:hover { border-color: rgba(255, 255, 255, 0.28); }
.tier-card.selected {
    border-color: var(--primary);
    background: linear-gradient(110deg, rgba(138, 43, 226, 0.2), rgba(255, 0, 229, 0.1));
    box-shadow: inset 0 0 0 1px rgba(255, 0, 229, 0.35);
}
.tier-price { color: #fff; font-family: var(--font-heading); }
.price-breakdown { background: #17171F; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; }
.btn-pay { border-radius: 999px; min-height: 50px; font-family: var(--font-heading); font-weight: 700; }
.btn-pay.apple-pay:not(:disabled) { background: var(--v2-grad-btn); color: #fff; border: 0; }
.card-pay { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- Mes billets ---------- */
.v2-ticket {
    position: relative;
    background: #17171F;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1.1rem;
}
.v2-ticket.is-inactive { border-color: rgba(255, 255, 255, 0.05); }
.v2-ticket.is-inactive .v2-ticket-head { opacity: 0.55; }
.v2-ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.v2-ticket-info { min-width: 0; }
.v2-ticket h4 { margin: 0.45rem 0 0.4rem; font-size: 1.15rem; }
.v2-ticket-meta { margin: 0 0 0.15rem; font-size: 0.86rem; color: var(--text-secondary); }
.v2-ticket-id { margin-top: 0.4rem; font-family: ui-monospace, monospace; font-size: 0.72rem; color: #6E6B7D; overflow-wrap: anywhere; }
.v2-ticket-price { text-align: right; flex: none; }
.v2-ticket-price b { display: block; font-family: var(--font-heading); font-size: 1.2rem; color: #fff; }
.v2-ticket-price small { font-size: 0.68rem; color: var(--text-secondary); }
.v2-status { display: inline-block; margin-left: 0.35rem; padding: 0.18rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.v2-status.is-used { background: rgba(255, 92, 122, 0.14); color: var(--v2-danger); }
.v2-status.is-resale { background: rgba(255, 181, 71, 0.14); color: var(--v2-warn); }
.v2-status.is-expired { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.v2-ticket-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.9rem; }
.v2-ticket-actions .btn { width: 100%; padding: 0.5rem 0.75rem; gap: 0.4rem; text-decoration: none; }
.v2-ticket-actions .is-wide { grid-column: 1 / -1; }
.v2-ticket-actions .btn:disabled { color: #6E6B7D; border-color: rgba(255, 255, 255, 0.08); cursor: not-allowed; }
.v2-ticket-actions .is-danger { color: var(--v2-danger); border-color: rgba(255, 92, 122, 0.4); }
.v2-ticket-actions .is-wallet { background: #000; color: #fff; border-color: #333; }
.v2-ticket-note { display: flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.5rem; font-size: 0.78rem; color: var(--text-secondary); text-align: center; }
.v2-ticket-note.is-warn { color: var(--v2-warn); }

/* ---------- Ordinateur : menu latéral, comme la maquette ---------- */
@media (min-width: 1101px) {
    body { padding-left: 248px; }
    .navbar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 248px;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.5rem;
        padding: 1.1rem 0.85rem;
        background: #0D0D12;
        border-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        overflow-y: auto;
    }
    .navbar .logo { margin: 0 0.4rem 0.75rem !important; }
    .navbar .logo img { height: 48px !important; max-width: 100% !important; transform: none !important; }
    .nav-links { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0.2rem; }
    .nav-links a {
        justify-content: flex-start;
        gap: 0.7rem;
        width: 100%;
        min-height: 42px;
        padding: 0.55rem 0.75rem;
        border-radius: 12px;
        background: transparent;
        font-size: 0.93rem;
    }
    .nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); border-color: transparent; box-shadow: none; }
    .nav-links a.active {
        color: #fff;
        background: linear-gradient(110deg, rgba(138, 43, 226, 0.22), rgba(255, 0, 229, 0.1));
        border-color: rgba(255, 0, 229, 0.25);
        box-shadow: none;
    }
    .nav-btn-create { width: 100%; min-height: 42px; margin-top: 0.5rem; font-size: 0.9rem; }
    .nav-dropdown-content { position: static; width: 100%; box-shadow: none; background: transparent; border: 0; padding-left: 0.5rem; }
    .user-actions {
        margin-top: auto;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        flex-direction: column;
        align-items: stretch;
    }
    .user-actions .btn { width: 100%; min-height: 40px; }
    .user-actions .lang-switcher { align-self: flex-start; }
    #welcomeText { margin-right: 0 !important; font-size: 0.85rem; overflow-wrap: anywhere; }
    .mobile-menu-btn { display: none !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    html { font-size: 15px; }
    body { padding-bottom: 92px; }
    .mobile-top-header {
        padding: 0.9rem 16px 0.6rem;
        background: rgba(11, 11, 14, 0.9);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .mobile-top-header h1 { font-size: 1.6rem; font-weight: 700; }
    .mobile-profile-btn { width: 42px; height: 42px; font-size: 1.05rem; background: var(--v2-grad-btn); box-shadow: none; }
    .hero { padding: 0.5rem 16px 1rem; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 0.92rem; }
    .container { padding-left: 16px; padding-right: 16px; }
    .filter-bar { flex-wrap: wrap; }
    .filter-search { flex: 1 1 100%; }
    .filter-group { flex: 1 1 calc(50% - 0.3rem); min-width: 0; }
    #clearFiltersBtn { flex: 1 1 100%; min-height: 42px; }
    .events-grid { grid-template-columns: 1fr; }

    .mobile-bottom-nav {
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(64px + env(safe-area-inset-bottom));
        padding: 0 4px env(safe-area-inset-bottom);
        border-radius: 0;
        background: rgba(13, 13, 18, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: none;
    }
    .bottom-nav-item { color: #8b8998; font-size: 1.15rem; padding: 6px 2px; min-height: 48px; }
    .bottom-nav-item span { font-size: 0.68rem; font-weight: 700; }
    .bottom-nav-item.active { color: var(--primary); }

    /* Les fenêtres deviennent des panneaux plein écran. */
    .modal { align-items: flex-end; padding: 0; }
    .modal-content, .large-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 94dvh;
        border-radius: 24px 24px 0 0;
    }
    .payment-methods {
        position: sticky;
        bottom: 0;
        padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
        background: var(--bg-card);
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-card, .tier-card { transition: none; }
    .event-card:hover { transform: none; }
}

/* ---------- Champs de filtre : un seul cadre, texte lisible ---------- */
.filter-search input, .filter-group input[type="text"], .filter-group select {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding-left: 0.25rem;
    min-width: 0;
    width: 100%;
    text-overflow: ellipsis;
    outline: none;
}
.footer-links { flex-wrap: wrap; }

@media (max-width: 768px) {
    /* Les événements doivent apparaître sans défiler. */
    .hero .badge, .hero p { display: none; }
    .hero { padding: 0.25rem 16px 0.5rem; }
    .hero h1 { font-size: 1.35rem; margin: 0; }
    .section-header { flex-direction: row; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
    .section-header h2 { font-size: 1.1rem; }
    .view-all { flex: none; font-size: 0.85rem; }
    .filter-bar { margin-bottom: 1rem; gap: 0.45rem; }
    .filter-search, .filter-group { min-height: 42px; padding-top: 0; padding-bottom: 0; }
    .filter-group { padding-left: 0.6rem; padding-right: 0.4rem; }
    .filter-group input[type="text"] { font-size: 0.85rem; }
    #clearFiltersBtn { display: none; }
    .filter-bar:has(input:not(:placeholder-shown)) #clearFiltersBtn { display: inline-flex; }
    .footer-content { flex-direction: column; }
    .footer-links { gap: 0.6rem 1rem; }
}

/* Icônes des liens dont le texte est remplacé par les traductions. */
#navDiscover::before, #navWallet::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
#navDiscover::before { content: "\f015"; }
#navWallet::before { content: "\f145"; }

/* ---------- Tableau de bord BDE et admin ---------- */
.v2-muted { color: var(--text-secondary); }
.v2-mono { font-family: ui-monospace, monospace; font-size: 0.72rem; color: #6E6B7D; overflow-wrap: anywhere; }
#dashboardView { padding-top: 1.5rem; }
.v2-admin-view.container { max-width: none; padding: 1.5rem 0 0; }
.v2-dash-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.v2-dash-head h2 { font-size: 1.7rem; line-height: 1.15; }
.v2-dash-head p { color: var(--text-secondary); margin-top: 0.25rem; }
.v2-dash-head .btn { gap: 0.5rem; }
.v2-role {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    vertical-align: middle;
}
.v2-admin-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dashboard-tabs {
    display: flex;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 1.25rem;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #17171F;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}
.dashboard-tabs::-webkit-scrollbar { display: none; }
.dashboard-tab-btn {
    flex: none;
    min-height: 38px;
    padding: 0.45rem 1rem;
    background: none;
    border: 0;
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.dashboard-tab-btn:hover { color: #fff; }
.dashboard-tab-btn.active { background: var(--v2-grad-btn); color: #fff; }

.v2-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.v2-kpi { padding: 1.05rem 1.1rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; min-width: 0; }
.v2-kpi-label { display: flex; align-items: center; gap: 0.45rem; color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }
.v2-kpi-label i { color: #B26BFF; font-size: 0.85rem; }
.v2-kpi b { display: block; margin-top: 0.35rem; font-family: var(--font-heading); font-size: 1.85rem; font-weight: 700; line-height: 1.15; color: #fff; font-variant-numeric: tabular-nums; }
.v2-kpi.is-highlight { background: linear-gradient(140deg, rgba(138, 43, 226, 0.26), rgba(255, 0, 229, 0.1)); border-color: rgba(255, 0, 229, 0.3); }
.v2-kpi.is-highlight .v2-kpi-label i { color: var(--primary); }

.v2-panel { margin-bottom: 1.25rem; padding: 1.2rem; overflow-x: auto; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; }
.v2-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.v2-panel-head h3 { font-size: 1.15rem; }
.v2-panel-head p { font-size: 0.85rem; margin-top: 0.1rem; }
.v2-toolbar { display: flex; align-items: center; gap: 0.5rem; flex: 1; max-width: 420px; min-width: 200px; }
.v2-filters { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.v2-filters .v2-control { flex: 1; min-width: 0; }
input.v2-control, select.v2-control {
    width: auto;
    min-height: 42px;
    padding: 0.5rem 0.9rem;
    background: #17171F;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 0.93rem;
}
.v2-toolbar input.v2-control { flex: 1; min-width: 0; }
input.v2-control:focus, select.v2-control:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.25); }
.v2-admin-view .neon-input { background: #17171F; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; }

.v2-btn-sm { min-height: 34px; padding: 0.3rem 0.7rem; font-size: 0.8rem; gap: 0.35rem; }
.btn.is-danger { color: var(--v2-danger); border-color: rgba(255, 92, 122, 0.4); }
.btn.is-danger:hover { background: rgba(255, 92, 122, 0.12); border-color: var(--v2-danger); }
.v2-pill { display: inline-block; padding: 0.18rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 800; white-space: nowrap; }
.v2-pill.is-ok { background: rgba(61, 245, 164, 0.13); color: var(--v2-ok); }
.v2-pill.is-warn { background: rgba(255, 181, 71, 0.14); color: var(--v2-warn); }
.v2-pill.is-danger { background: rgba(255, 92, 122, 0.14); color: var(--v2-danger); }
.v2-pill.is-info { background: rgba(0, 240, 255, 0.12); color: var(--v2-cyan); }
.v2-pill.is-accent { background: var(--primary-glow); color: var(--primary); }

.v2-table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; font-size: 0.93rem; }
.v2-table th { padding: 0.55rem 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-secondary); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.v2-table th.is-sortable { cursor: pointer; }
.v2-table th.is-sortable:hover { color: #fff; }
.v2-table th .fa-sort { margin-left: 0.25rem; font-size: 0.7rem; opacity: 0.6; }
.v2-table td { padding: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); vertical-align: middle; }
.v2-table tbody tr:last-child td { border-bottom: 0; }
.v2-table td b { display: block; font-weight: 700; color: #fff; }
.v2-table td small { display: block; font-size: 0.78rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.v2-table td small.v2-mono { font-size: 0.7rem; color: #6E6B7D; }
.v2-table td.v2-empty { padding: 2rem; text-align: center; color: var(--text-secondary); }
.v2-event-cell { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.v2-event-cell img { flex: none; width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: #17171F; }
.v2-progress { min-width: 96px; font-variant-numeric: tabular-nums; font-size: 0.85rem; font-weight: 700; }
.v2-progress i { display: block; height: 5px; margin-top: 0.3rem; border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--value), rgba(255, 255, 255, 0.1) var(--value)); }
.v2-rating { font-weight: 700; white-space: nowrap; }
.v2-rating i { color: var(--primary); }
.v2-row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.v2-status-cell { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.v2-group-row { cursor: pointer; background: rgba(255, 255, 255, 0.025); }
.v2-group-row td { font-family: var(--font-heading); font-weight: 700; color: #fff; }
.v2-group-row i { width: 16px; margin-right: 0.35rem; color: var(--primary); font-size: 0.8rem; }
.v2-group-row small { display: inline !important; margin-left: 0.4rem; font-family: var(--font-body); font-weight: 500; }
.v2-table tr.is-collapsed { display: none !important; }

/* Histogramme : une seule série, aujourd'hui en rose. */
.v2-chart { display: flex; align-items: flex-end; gap: 2px; height: 170px; padding-top: 1.4rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.v2-chart.is-empty { align-items: center; justify-content: center; height: 120px; padding-top: 0; border-bottom: 0; text-align: center; }
.v2-bar-slot { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.v2-bar { display: block; width: 100%; max-width: 44px; margin: 0 auto; border-radius: 4px 4px 0 0; background: #A855F7; transition: background 0.15s; }
.v2-bar-slot.is-today .v2-bar { background: #FF4DEE; }
.v2-bar-slot:hover .v2-bar { background: #C084FC; }
.v2-bar-slot.is-today:hover .v2-bar { background: #FF7DF3; }
.v2-bar-value { position: absolute; left: 0; right: 0; top: -1.3rem; text-align: center; font-size: 0.78rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.v2-bar-slot.is-peak { padding-top: 0; }
.v2-bar-tip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    background: #24242E;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
}
.v2-bar-slot:first-child .v2-bar-tip { left: 0; transform: none; }
.v2-bar-slot:last-child .v2-bar-tip { left: auto; right: 0; transform: none; }
.v2-bar-slot:hover .v2-bar-tip { opacity: 1; }
.v2-bar-slot:hover .v2-bar-value { opacity: 0; }
.v2-chart-axis { display: flex; justify-content: space-between; margin-top: 0.4rem; color: var(--text-secondary); font-size: 0.78rem; }
.v2-panel:has(.v2-chart) { overflow: visible; }

/* Menu latéral : la section Gestion reste ouverte. */
.v2-nav-group { cursor: default; }
@media (min-width: 1101px) {
    .nav-links a[style*="inline-block"] { display: flex !important; }
    .nav-dropdown { display: block; width: 100%; }
    .nav-dropdown[style*="inline-block"] { display: block !important; }
    .nav-dropdown-content { display: block; min-width: 0; padding-left: 0.35rem; overflow: visible; }
    .nav-dropdown-content a { display: flex; border-bottom: 0; font-size: 0.88rem; }
    .v2-nav-group, .v2-nav-group:hover { color: var(--text-secondary) !important; background: transparent !important; font-size: 0.8rem !important; min-height: 30px !important; margin-top: 0.5rem; }
    .v2-admin-links { display: none !important; }
}

/* Mobile : chaque ligne devient une carte. */
@media (max-width: 768px) {
    #dashboardView { padding-top: 0.25rem; }
    .v2-dash-head { align-items: stretch; flex-direction: column; }
    .v2-dash-head h2 { font-size: 1.4rem; }
    .v2-dash-head .btn { width: 100%; min-height: 46px; }
    .dashboard-tabs { width: 100%; }
    .dashboard-tab-btn { flex: 1; padding: 0.45rem 0.6rem; font-size: 0.88rem; }
    .v2-kpis { grid-template-columns: 1fr 1fr; }
    .v2-kpi { padding: 0.85rem; }
    .v2-kpi-label { font-size: 0.78rem; }
    .v2-kpi b { font-size: 1.4rem; }
    .v2-panel { padding: 0.95rem; overflow-x: visible; }
    .v2-toolbar { max-width: none; flex: 1 1 100%; }
    .v2-filters { flex-direction: column; }
    .v2-admin-view .form-row { flex-wrap: wrap; }
    .v2-admin-view .form-row .form-group { flex: 1 1 100% !important; width: 100%; }
    .v2-chart { height: 130px; }

    .v2-table, .v2-table tbody, .v2-table tr, .v2-table td { display: block; width: 100%; min-width: 0; }
    .v2-table thead { display: none; }
    .v2-table tbody tr { margin-bottom: 0.6rem; padding: 0.8rem; background: #17171F; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; }
    .v2-table td { padding: 0.3rem 0; border: 0; }
    .v2-table td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: right; }
    .v2-table td[data-label]::before { content: attr(data-label); flex: none; color: var(--text-secondary); font-size: 0.8rem; font-weight: 600; text-align: left; }
    .v2-table td.v2-cell-main { padding-bottom: 0.5rem; }
    .v2-table td.v2-cell-actions { padding-top: 0.6rem; }
    .v2-table td.v2-empty { padding: 1.25rem 0; }
    .v2-table tbody tr:has(.v2-empty) { background: transparent; border: 0; }
    .v2-table tr.v2-group-row { margin: 0.9rem 0 0.5rem; padding: 0; background: transparent; border: 0; }
    .v2-table tbody tr.v2-group-row:first-child { margin-top: 0; }
    .v2-row-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .v2-row-actions .btn { width: 100%; min-height: 40px; }
    .v2-table .v2-status-cell { justify-content: flex-end; }
    .v2-cell-actions .v2-status-cell { justify-content: space-between; }
    .v2-progress { width: 130px; flex: none; text-align: left; }
}

@media print {
    body { padding: 0 !important; background: #fff !important; color: #000 !important; }
    .navbar, .mobile-top-header, .mobile-bottom-nav, footer, .dashboard-tabs, .v2-dash-head .btn, .v2-admin-links, .v2-toolbar, .v2-cell-actions, .v2-status-cell .btn { display: none !important; }
    .v2-panel { background: none; border: 0; padding: 0; overflow: visible; }
    .v2-table, .v2-table td, .v2-table th, .v2-table td b, .v2-table td small { color: #000 !important; }
}

/* Fenêtres BDE et admin : marges intérieures et fermeture à droite. */
#staffModal .modal-content { position: relative; padding: 1.5rem; }
#staffModal .close-modal { position: absolute; top: 1rem; right: 1rem; }
#staffModal h3 { padding-right: 2.5rem; }
#reviewsModal .modal-body, #scanModal .modal-body, #adminOrganizerEventsModal .modal-body { padding: 1.25rem; }
#adminOrganizerEventsModal .table-responsive { overflow-x: auto; }
@media (max-width: 768px) {
    #addStaffForm { flex-wrap: wrap; }
    #addStaffForm input { flex: 1 1 100% !important; }
    #addStaffForm .btn { width: 100%; }
}

/* ---------- Compte BDE : uniquement la gestion ---------- */
html.is-bde .hero,
html.is-bde .filter-bar,
html.is-bde .events-section,
html.is-bde #navDiscover,
html.is-bde #navCommunity,
html.is-bde #navWallet,
html.is-bde #bnavDiscover,
html.is-bde #bnavCommunity,
html.is-bde #bnavWallet { display: none !important; }
html.is-bde #navDashboard, html.is-bde #navScanTicket, html.is-bde #organizerBtn { order: -1; }
html.is-bde .only-admin, html:not(.is-bde) .only-bde { display: none !important; }

.v2-pill.is-muted { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.v2-row-link { cursor: pointer; transition: background 0.15s; }
.v2-row-link:hover { background: rgba(255, 255, 255, 0.03); }
.v2-kpi b small { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
.v2-kpi .v2-progress { min-width: 0; margin-top: 0.35rem; }

.v2-next-event { display: flex; align-items: center; gap: 1rem; cursor: pointer; transition: border-color 0.2s; overflow: hidden; }
.v2-next-event:hover { border-color: rgba(255, 0, 229, 0.4); }
.v2-next-event img { flex: none; width: 76px; height: 76px; border-radius: 14px; object-fit: cover; background: #17171F; }
.v2-next-info { flex: 1; min-width: 0; }
.v2-next-info h3 { font-size: 1.25rem; overflow-wrap: anywhere; }
.v2-next-info p { font-size: 0.88rem; }
.v2-next-stats { display: flex; align-items: center; gap: 1rem; flex: none; }
.v2-next-stats .v2-progress { width: 140px; }
.v2-next-arrow { color: var(--text-secondary); font-size: 0.85rem; }
.v2-next-empty { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.v2-next-empty .btn { gap: 0.45rem; text-decoration: none; }

.v2-back { margin-bottom: 1rem; }
.v2-event-hero { display: flex; gap: 1.25rem; margin-bottom: 1.25rem; padding: 1.2rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; }
.v2-event-hero img { flex: none; width: 230px; height: 170px; border-radius: 16px; object-fit: cover; background: #17171F; }
.v2-event-hero-info { flex: 1; min-width: 0; }
.v2-event-hero h3 { margin: 0.45rem 0; font-size: 1.6rem; line-height: 1.15; overflow-wrap: anywhere; }
.v2-event-hero p { font-size: 0.9rem; }
.v2-event-hero p i { width: 18px; color: var(--primary); }
.v2-event-hero .v2-row-actions { margin-top: 0.8rem; }
.v2-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; }
.v2-table-compact { min-width: 480px; }
.v2-panel-head h3 small { margin-left: 0.25rem; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; }

@media (max-width: 1100px) {
    .v2-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .v2-next-stats .v2-progress { width: 110px; }
}
@media (max-width: 768px) {
    .v2-next-event { flex-wrap: wrap; }
    .v2-next-event img { width: 60px; height: 60px; }
    .v2-next-info { flex: 1 1 calc(100% - 76px); }
    .v2-next-stats { flex: 1 1 100%; justify-content: space-between; }
    .v2-next-stats .v2-progress { flex: 1; width: auto; }
    .v2-next-empty .btn { width: 100%; }
    .v2-event-hero { flex-direction: column; padding: 0.95rem; }
    .v2-event-hero img { width: 100%; height: 170px; }
    .v2-table-compact { min-width: 0; }
    .v2-kpi b small { font-size: 0.85rem; }
    .v2-table td.v2-cell-main .v2-event-cell small { text-align: left; }
}

@media (min-width: 769px) {
    #dashboardTab-detail .v2-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

html.is-bde #bnavDashboard { order: -3; }
html.is-bde #bnavScan { order: -2; }
html.is-bde #bnavCreate { order: -1; }

/* ---------- Retour arrière et onglets toujours accessibles ---------- */
.v2-nav-back { display: none; }
.v2-header-title { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.v2-nav-back-icon { width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 1rem; cursor: pointer; }
.v2-nav-back-page { width: fit-content; margin: 1rem 0 -0.5rem; }
html.has-nav-back .v2-nav-back-icon { display: inline-flex; }
@media (min-width: 769px) {
    html.has-nav-back .v2-nav-back-page { display: inline-flex; }
    html.in-event-detail .v2-nav-back-page { display: none; }
}
#customAlertModal, #customConfirmModal { z-index: 10010; }

/* Ordinateur : le menu latéral reste cliquable pendant qu'une fenêtre est ouverte. */
@media (min-width: 1101px) {
    .modal { left: 248px; width: calc(100% - 248px); }
    #customAlertModal, #customConfirmModal { left: 0; width: 100%; }
}
/* Mobile : la fenêtre s'arrête au-dessus de la barre d'onglets. */
@media (max-width: 768px) {
    .mobile-bottom-nav { z-index: 10001; }
    .modal { height: calc(100% - 64px - env(safe-area-inset-bottom)); }
    .modal .modal-content, .modal .large-modal { max-height: calc(100% - 1rem); }
    #customAlertModal, #customConfirmModal { height: 100%; }
}
