/* ==========================================================================
   A.T.L.A.S. Hub V2 — CSS Principal (style V1 dark cyberpunk)
   Variables des skins dans skins/*.css
   ========================================================================== */

/* Variables par défaut (overridées par les skins) */
:root {
    --bg-base: #0b0c15;
    --bg-panel: #151720;
    --bg-hover: #1a1d29;
    --bg-header: #1f2330;
    --bg-footer: #090a11;

    --border-main: #2b3040;
    --border-light: #444444;

    --text-title: #ffffff;
    --text-main: #cccccc;
    --text-muted: #888888;

    --neon-blue: #00d0ff;
    --neon-gold: #ffd700;
    --neon-red: #ff5050;
    --neon-green: #50ff50;

    --shadow-glow: rgba(0, 208, 255, 0.3);
    --shadow-box: rgba(0, 0, 0, 0.3);

    --z-dropdown: 100;
    --z-sticky: 500;
    --z-overlay: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
    --z-lightbox: 4000;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg-base);
    color: var(--text-main);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--neon-blue); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--text-title); }
h1, h2, h3, h4 { color: var(--text-title); }

input:not([type="checkbox"]):not([type="radio"]),
select, textarea {
    background: var(--bg-base);
    color: var(--text-title);
    border: 1px solid var(--border-light);
    padding: 8px;
    border-radius: 3px;
    font-family: inherit;
    transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 5px var(--shadow-glow);
}

/* ==========================================================================
   NAVBAR (style V1 — barre horizontale avec boutons colorés)
   ========================================================================== */

.hub-navbar {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--bg-panel);
    border-bottom: 2px solid var(--border-main);
    box-shadow: 0 4px 10px var(--shadow-box);
}
.hub-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
}
.hub-nav-left,
.hub-nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.hub-nav-left { gap: 6px; }
.hub-nav-right { gap: 4px; }

.hub-nav-right > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hub-nav-right .hub-nav-icon,
.hub-nav-right .hub-msg-bell,
.hub-nav-right .hub-notif-bell {
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 1.1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hub-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border-light);
    background: none;
    transition: all 0.15s;
}
.hub-nav-icon:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.hub-nav-icon.hub-nav-btn-red { border-color: var(--neon-red); color: var(--neon-red); }
.hub-nav-icon.hub-nav-btn-red:hover { background: rgba(255,50,50,0.15); }

.hub-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85em;
    border-right: 1px solid var(--border-main);
    padding-right: 12px;
    margin-right: 4px;
    white-space: nowrap;
}
.hub-user-info strong {
    color: var(--text-title);
    font-size: 1.05em;
    display: block;
}
.hub-user-role {
    font-size: 0.75em;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hub-search {
    position: relative;
    margin-right: auto;
}
.hub-search input {
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    color: var(--text-title);
    padding: 6px 32px 6px 12px;
    border-radius: 20px;
    width: 160px;
    font-size: 0.85em;
    transition: all 0.3s;
}
.hub-search input:focus {
    border-color: var(--neon-blue);
    width: 220px;
    box-shadow: 0 0 10px var(--shadow-glow);
}
.hub-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85em;
    color: var(--text-muted);
    pointer-events: none;
}

.hub-nav-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.hub-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
    transition: all 0.15s;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Boutons de navigation — couleurs V1 */
.hub-nav-btn-default {
    background: rgba(0, 208, 255, 0.1);
    color: var(--neon-blue);
    border-color: transparent;
}
.hub-nav-btn-default:hover,
.hub-nav-btn-default.active {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 10px var(--shadow-glow);
    text-decoration: none;
}

.hub-nav-btn-green {
    background: rgba(80, 255, 80, 0.1);
    color: var(--neon-green);
    border-color: transparent;
}
.hub-nav-btn-green:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 10px rgba(80, 255, 80, 0.4);
    text-decoration: none;
}

.hub-nav-btn-gold {
    background: rgba(255, 215, 0, 0.1);
    color: var(--neon-gold);
    border-color: transparent;
}
.hub-nav-btn-gold:hover {
    background: var(--neon-gold);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    text-decoration: none;
}

.hub-nav-btn-red {
    background: rgba(255, 80, 80, 0.1);
    color: var(--neon-red);
    border-color: transparent;
}
.hub-nav-btn-red:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 80, 80, 0.4);
    text-decoration: none;
}

.hub-nav-btn-admin {
    background: rgba(255, 140, 0, 0.15);
    color: #ff8c00;
    border-color: transparent;
}
.hub-nav-btn-admin:hover {
    background: #ff8c00;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
    text-decoration: none;
}

.hub-nav-btn-super {
    background: rgba(200, 80, 200, 0.15);
    color: #d060d0;
    border-color: transparent;
}
.hub-nav-btn-super:hover {
    background: #d060d0;
    color: #000;
    box-shadow: 0 0 10px rgba(200, 80, 200, 0.4);
    text-decoration: none;
}

.hub-nav-separator {
    color: var(--border-light);
    font-weight: 300;
    padding: 0 4px;
    user-select: none;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.hub-main {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.hub-footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.85em;
    background: var(--bg-footer);
    border-top: 1px solid var(--border-main);
}
.hub-footer-version {
    background: var(--bg-panel);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    font-family: monospace;
    border: 1px solid transparent;
    transition: 0.3s;
}
.hub-footer-version:hover {
    color: var(--neon-blue);
    border-color: var(--neon-blue);
    background: rgba(0, 208, 255, 0.1);
}

/* ==========================================================================
   TITLE (style V1 — grand titre Orbitron avec glow)
   ========================================================================== */

.hub-title-wrapper {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.hub-title-main {
    font-family: 'Orbitron', sans-serif;
    font-size: 4.5em;
    font-weight: 700;
    color: var(--text-title);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 0 0 20px var(--shadow-glow), 0 0 40px rgba(0, 208, 255, 0.15);
    margin: 0;
    padding: 15px 40px;
    border-top: 1px solid var(--shadow-glow);
    border-bottom: 1px solid var(--shadow-glow);
    display: inline-block;
    position: relative;
    background: radial-gradient(circle, rgba(0, 208, 255, 0.05) 0%, transparent 70%);
}

.hub-title-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1em;
    color: var(--neon-blue);
    margin-top: 12px;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.hub-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}
.hub-card h1 {
    margin: 0 0 16px;
    font-size: 1.3em;
    color: var(--text-title);
    border-bottom: 2px solid var(--neon-blue);
    padding-bottom: 10px;
}
.hub-card h2 {
    margin: 16px 0 8px;
    font-size: 1.1em;
    color: var(--neon-blue);
}

/* Cartes à bordure colorée en haut (style V1) */
.hub-card-cyan { border-top: 3px solid var(--neon-blue); }
.hub-card-gold { border-top: 3px solid var(--neon-gold); }
.hub-card-green { border-top: 3px solid var(--neon-green); }
.hub-card-red { border-top: 3px solid var(--neon-red); }

/* ==========================================================================
   GRIDS & TILES
   ========================================================================== */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.hub-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hub-tile {
    display: block;
    padding: 20px;
    background: var(--bg-hover);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    color: var(--text-title);
    transition: all 0.2s;
}
.hub-tile:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--shadow-glow);
    transform: translateY(-2px);
    color: var(--neon-blue);
    text-decoration: none;
}
.hub-tile-form { margin: 0; }
.hub-tile-form .hub-tile {
    background: var(--bg-hover);
    border: 1px solid var(--border-main);
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-title);
}

/* ==========================================================================
   STATS
   ========================================================================== */

.hub-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.hub-stat {
    padding: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-top: 3px solid var(--neon-blue);
    border-radius: 4px;
    text-align: center;
}
.hub-stat-value {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--neon-blue);
    font-family: 'Orbitron', sans-serif;
}
.hub-stat-label {
    font-size: 0.9em;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.hub-table { width: 100%; border-collapse: collapse; }
.hub-table th, .hub-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-main);
    font-size: 0.9em;
}
.hub-table th {
    background: var(--bg-header);
    color: var(--neon-blue);
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hub-table tr:hover { background: var(--bg-hover); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.hub-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--neon-blue);
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}
.hub-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 10px var(--shadow-glow);
    text-decoration: none;
    color: #000;
}
.hub-btn-sm { padding: 4px 10px; font-size: 0.8em; }
.hub-btn-danger {
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
}
.hub-btn-danger:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 10px var(--neon-red);
}

/* ==========================================================================
   MODULES
   ========================================================================== */

.hub-module-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    margin-bottom: 8px;
}
.hub-module-card.is-locked {
    background: var(--bg-hover);
    border-color: var(--neon-red);
    opacity: 0.6;
}
.hub-module-card.is-active {
    border-left: 3px solid var(--neon-green);
}
.hub-module-card-icon { font-size: 2em; }
.hub-module-card-body { flex: 1; }
.hub-module-card-actions { display: flex; gap: 8px; }
.hub-module-card h3 { margin: 0 0 4px; font-size: 1.05em; color: var(--text-title); }
.hub-module-card p { margin: 0; color: var(--text-muted); font-size: 0.85em; }

/* Pricing tags */
.hub-pricing-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 1px;
}
.hub-pricing-free { background: rgba(80, 255, 80, 0.2); color: var(--neon-green); border: 1px solid var(--neon-green); }
.hub-pricing-paid { background: rgba(255, 215, 0, 0.2); color: var(--neon-gold); border: 1px solid var(--neon-gold); }
.hub-pricing-freemium { background: rgba(0, 208, 255, 0.2); color: var(--neon-blue); border: 1px solid var(--neon-blue); }
.hub-pricing-trial { background: rgba(0, 112, 211, 0.2); color: var(--neon-blue); border: 1px solid var(--neon-blue); }

/* ==========================================================================
   BADGES
   ========================================================================== */

.hub-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 1px;
}
.hub-badge-super { background: var(--neon-gold); color: #000; }
.hub-badge-admin { background: var(--neon-red); color: #fff; }
.hub-badge-active { background: var(--neon-green); color: #000; }
.hub-badge-pending { background: var(--neon-gold); color: #000; }
.hub-badge-suspended, .hub-badge-banned { background: var(--neon-red); color: #fff; }

/* ==========================================================================
   MISC
   ========================================================================== */

.hub-muted { color: var(--text-muted); }
.hub-warn { color: var(--neon-gold); font-weight: 600; }
.hub-card-locked {
    text-align: center;
    padding: 60px 24px;
    border: 2px dashed var(--neon-red);
}
.hub-card-locked h1 { color: var(--neon-red); border-bottom-color: var(--neon-red); }

/* ==========================================================================
   MEGA MENU ADMINISTRATION
   ========================================================================== */

.hub-mega { position: relative; }
.hub-mega-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: rgba(200, 80, 200, 0.12);
    color: #d060d0;
    user-select: none;
}
.hub-mega-trigger:hover,
.hub-mega.is-open .hub-mega-trigger {
    background: rgba(200, 80, 200, 0.3);
    color: #e080e0;
    box-shadow: 0 0 10px rgba(200, 80, 200, 0.3);
}
.hub-mega-trigger-arrow {
    font-size: 0.7em;
    transition: transform 0.2s;
}
.hub-mega.is-open .hub-mega-trigger-arrow { transform: rotate(180deg); }
.hub-mega-trigger-primary {
    background: rgba(0, 208, 255, 0.1);
    color: var(--neon-blue);
}
.hub-mega-trigger-primary:hover,
.hub-mega.is-open .hub-mega-trigger-primary {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 10px var(--shadow-glow);
}

.hub-mega-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 520px;
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-top: 2px solid #d060d0;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(200, 80, 200, 0.15);
    z-index: var(--z-modal);
    padding: 20px;
    animation: megaFadeIn 0.15s ease-out;
}
.hub-mega.is-open .hub-mega-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@keyframes megaFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hub-mega-column {}
.hub-mega-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-main);
}
.hub-mega-title-icon { font-size: 1.2em; }
.hub-mega-title-org { color: #ff8c00; }
.hub-mega-title-super { color: #d060d0; }

.hub-mega-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.15s;
}
.hub-mega-link:hover {
    background: rgba(200, 80, 200, 0.1);
    color: var(--text-title);
    text-decoration: none;
}
.hub-mega-link-icon { color: var(--neon-blue); font-size: 1.1em; min-width: 20px; text-align: center; }
.hub-mega-title-org + .hub-mega-link:hover { background: rgba(255, 140, 0, 0.1); }
.hub-mega-title-org ~ .hub-mega-link .hub-mega-link-icon { color: #ff8c00; }

.hub-mega-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: var(--z-overlay);
}

@media (max-width: 768px) {
    .hub-nav-inner { flex-direction: column; gap: 8px; padding: 8px 0; }
    .hub-nav-left, .hub-nav-right { width: 100%; justify-content: center; }
    .hub-user-info { border-right: none; padding-right: 0; margin-right: 0; border-bottom: 1px solid var(--border-main); padding-bottom: 6px; width: 100%; justify-content: center; }
    .hub-search { width: 100%; }
    .hub-search input { width: 100%; }
    .hub-mega-panel { min-width: 280px; grid-template-columns: 1fr; }
}

/* ==========================================================================
   MODALS / DIALOGS
   ========================================================================== */

.hub-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-overlay);
    align-items: center;
    justify-content: center;
}
.hub-modal-overlay.is-open { display: flex; }

.hub-modal {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-top: 2px solid var(--neon-blue);
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--shadow-glow);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalFadeIn 0.15s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hub-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-main);
}
.hub-modal-header h2 { margin: 0; font-size: 1.1em; color: var(--text-title); }
.hub-modal-close {
    background: none; border: none; color: var(--text-muted); font-size: 1.3em;
    cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: 0.2s;
}
.hub-modal-close:hover { color: var(--neon-red); background: rgba(255,80,80,0.1); }

.hub-modal-body { padding: 20px; }
.hub-modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 20px; border-top: 1px solid var(--border-main);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.hub-form { margin-bottom: 20px; }
.hub-form-group { margin-bottom: 14px; }
.hub-form-label {
    display: block; margin-bottom: 4px; font-size: 0.85em;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.hub-form-input,
.hub-form-select,
.hub-form-textarea {
    width: 100%; padding: 8px 12px; background: var(--bg-base);
    color: var(--text-title); border: 1px solid var(--border-light);
    border-radius: 4px; font-family: inherit; font-size: 0.9em; transition: border-color 0.2s;
}
.hub-form-input:focus, .hub-form-select:focus, .hub-form-textarea:focus {
    outline: none; border-color: var(--neon-blue); box-shadow: 0 0 5px var(--shadow-glow);
}
.hub-form-textarea { min-height: 80px; resize: vertical; }
.hub-form-hint { font-size: 0.8em; color: var(--text-muted); margin-top: 3px; }
.hub-form-actions { display: flex; gap: 8px; margin-top: 16px; }
.hub-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.hub-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; margin-top: 20px; flex-wrap: wrap;
}
.hub-pagination-info { font-size: 0.85em; color: var(--text-muted); margin-right: 12px; }
.hub-pagination-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 4px 8px;
    background: var(--bg-hover); color: var(--text-main);
    border: 1px solid var(--border-main); border-radius: 4px;
    font-size: 0.8em; text-decoration: none; transition: 0.2s; cursor: pointer;
}
.hub-pagination-btn:hover {
    background: var(--neon-blue); color: #000; border-color: var(--neon-blue); text-decoration: none;
}
.hub-pagination-btn.active {
    background: var(--neon-blue); color: #000; border-color: var(--neon-blue); font-weight: 700;
}
.hub-pagination-btn.disabled {
    opacity: 0.4; pointer-events: none;
}

/* ==========================================================================
   TOASTS / NOTIFICATIONS
   ========================================================================== */

.hub-toast-container {
    position: fixed; top: 16px; right: 16px; z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.hub-toast {
    padding: 12px 20px; border-radius: 4px; font-size: 0.9em; font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); pointer-events: auto; cursor: pointer;
    animation: toastSlideIn 0.3s ease-out;
    max-width: 400px;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.hub-toast-success { background: rgba(80,255,80,0.15); color: var(--neon-green); border: 1px solid var(--neon-green); }
.hub-toast-error { background: rgba(255,80,80,0.15); color: var(--neon-red); border: 1px solid var(--neon-red); }
.hub-toast-info { background: rgba(0,208,255,0.15); color: var(--neon-blue); border: 1px solid var(--neon-blue); }
.hub-toast-warning { background: rgba(255,215,0,0.15); color: var(--neon-gold); border: 1px solid var(--neon-gold); }

/* ==========================================================================
   FILTER BAR
   ========================================================================== */

.hub-filter-bar {
    display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.hub-filter-bar .hub-btn { font-size: 0.75em; padding: 4px 10px; }
.hub-filter-bar .hub-btn.active { background: var(--neon-blue); color: #000; }
.hub-filter-bar select {
    background: var(--bg-base); color: var(--text-title); border: 1px solid var(--border-light);
    padding: 4px 8px; border-radius: 4px; font-size: 0.85em;
}

/* ==========================================================================
   BADGES SUPPLÉMENTAIRES
   ========================================================================== */

.hub-badge-disavowed { background: rgba(255,140,0,0.2); color: #ff8c00; }
.hub-badge-resolved { background: rgba(80,255,80,0.2); color: var(--neon-green); }
.hub-badge-open { background: rgba(0,208,255,0.2); color: var(--neon-blue); }
.hub-badge-closed { background: var(--text-muted); color: var(--bg-base); }

/* ==========================================================================
   BOUTON SIGNALEMENT + MODALE TICKET
   ========================================================================== */

#reportBtn {
    position: fixed; bottom: 30px; left: 30px; z-index: var(--z-sticky);
    background-color: rgba(255, 80, 80, 0.1); border: 1px solid var(--neon-red);
    color: var(--neon-red); cursor: pointer; padding: 10px 15px; border-radius: 4px;
    font-size: 18px; box-shadow: 0 0 15px rgba(255, 80, 80, 0.2); transition: all 0.3s ease;
}
#reportBtn:hover {
    background-color: var(--neon-red); color: #fff;
    box-shadow: 0 0 25px rgba(255, 80, 80, 0.6); transform: translateY(-3px);
}

#scrollTopBtn {
    position: fixed; bottom: 30px; right: 30px; z-index: var(--z-sticky);
    background-color: rgba(0, 208, 255, 0.1); border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan); cursor: pointer; padding: 10px 14px; border-radius: 4px;
    font-size: 18px; box-shadow: 0 0 15px rgba(0, 208, 255, 0.15); transition: all 0.3s ease;
    opacity: 0; pointer-events: none; transform: translateY(10px);
}
#scrollTopBtn.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#scrollTopBtn:hover {
    background-color: var(--neon-cyan); color: #000;
    box-shadow: 0 0 25px rgba(0, 208, 255, 0.5); transform: translateY(-3px);
}

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: var(--z-overlay); justify-content: center; align-items: center;
}
.modal-overlay.open { display: flex; }
.modal-content {
    background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 8px;
    padding: 24px; width: 90%; max-width: 500px; max-height: 80vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.close-modal {
    background: none; border: none; color: var(--text-muted); font-size: 24px;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.close-modal:hover { color: var(--text); }

/* ==========================================================================
   MESSAGING ENVELOPE BUTTON
   ========================================================================== */
.hub-msg-area { display: inline-block; margin-right: 4px; }
.hub-msg-bell {
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--border-light); color: var(--text);
    font-size: 1.3em; cursor: pointer; padding: 6px 10px; border-radius: 6px;
    position: relative; font-family: inherit;
}
.hub-msg-bell:hover { border-color: var(--neon-green); color: var(--neon-green); }
.hub-msg-bell.has-unread {
    animation: bellShake 2s ease-in-out infinite;
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.hub-msg-badge {
    position: absolute; top: -4px; right: -4px; background: var(--neon-red); color: #fff;
    font-size: 0.55em; font-weight: bold; border-radius: 50%; padding: 2px 5px;
    min-width: 16px; text-align: center; line-height: 1.2;
    animation: badgePulse 2s ease-in-out infinite;
}
.hub-msg-badge-inline {
    background: var(--neon-gold); color: #000; font-size: 0.7em; font-weight: 700;
    border-radius: 10px; padding: 1px 7px; line-height: 1.4; white-space: nowrap;
}

/* ==========================================================================
   NOTIFICATION BELL & PANEL
   ========================================================================== */
.hub-notif-area { position: relative; display: inline-block; }
.hub-notif-bell {
    background: none; border: 1px solid var(--border-light); color: var(--text);
    font-size: 1.3em; cursor: pointer; padding: 6px 10px; border-radius: 6px; position: relative;
}
.hub-notif-bell:hover { border-color: var(--neon-blue); color: var(--neon-blue); }
.hub-notif-bell.has-unread {
    animation: bellShake 2s ease-in-out infinite;
    border-color: var(--neon-gold);
    color: var(--neon-gold);
}
@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    5% { transform: rotate(14deg); }
    10% { transform: rotate(-14deg); }
    15% { transform: rotate(10deg); }
    20% { transform: rotate(-8deg); }
    25% { transform: rotate(4deg); }
    30% { transform: rotate(0deg); }
}
.hub-notif-badge {
    position: absolute; top: -4px; right: -4px; background: var(--neon-red); color: #fff;
    font-size: 0.55em; font-weight: bold; border-radius: 50%; padding: 2px 5px;
    min-width: 16px; text-align: center; line-height: 1.2;
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
.hub-notif-panel {
    display: none; position: absolute; top: 100%; right: 0; width: 340px; max-height: 420px;
    background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5); z-index: var(--z-modal); overflow: hidden;
}
.hub-notif-panel.open { display: flex; flex-direction: column; }
.hub-notif-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-bottom: 1px solid var(--border-light); font-weight: bold; color: var(--text);
}
.hub-notif-mark-all {
    background: none; border: none; color: var(--neon-green); cursor: pointer; font-size: 0.85em; padding: 2px 6px;
}
.hub-notif-mark-all:hover { text-decoration: underline; }
.hub-notif-panel-body {
    flex: 1; overflow-y: auto; padding: 0; max-height: 320px;
}
.hub-notif-item {
    padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9em;
}
.hub-notif-item a { color: var(--text); text-decoration: none; display: block; }
.hub-notif-item a:hover { color: var(--neon-blue); }
.hub-notif-item.hub-notif-unread { border-left: 3px solid var(--neon-cyan); background: rgba(0,255,255,0.03); }
.hub-notif-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.9em; }
.hub-notif-loading { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.85em; }
.hub-notif-panel-footer {
    padding: 8px 14px; border-top: 1px solid var(--border-light); display: flex; gap: 16px;
}
.hub-notif-panel-footer a { color: var(--text-muted); font-size: 0.85em; text-decoration: none; }
.hub-notif-panel-footer a:hover { color: var(--neon-blue); }

/* ==========================================================================
   MESSAGING STYLES
   ========================================================================== */
.hub-msg-row { cursor: pointer; }
.hub-msg-row.hub-msg-unread { border-left: 3px solid var(--neon-cyan); background: rgba(0,255,255,0.03); }
.hub-msg-row td { padding: 10px 12px; vertical-align: middle; }
.hub-msg-body {
    background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 6px;
    padding: 20px; white-space: pre-wrap; line-height: 1.6; min-height: 120px;
}
.hub-msg-meta { display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.hub-msg-meta-item { font-size: 0.9em; color: var(--text-muted); }
.hub-msg-meta-item strong { color: var(--text); }

/* ==========================================================================
   MESSAGING TABLE REFINEMENTS
   ========================================================================== */
.hub-table tbody tr { transition: background 0.15s ease; }
.hub-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.hub-table tbody td { border-bottom: 1px solid rgba(255,255,255,0.04); }

/* ==========================================================================
   ADMIN / MODULES — vue par organisation (switch, verrou maintenance)
   ========================================================================== */
.hub-org-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.hub-org-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 18px;
    border: 1px solid var(--border-main); background: var(--bg-panel); color: var(--text-main);
    font-size: 0.85em; text-decoration: none; transition: 0.15s;
}
.hub-org-pill:hover { border-color: var(--neon-blue); color: var(--text-title); }
.hub-org-pill.is-active { background: var(--neon-blue); color: #000; border-color: var(--neon-blue); font-weight: 600; }
.hub-org-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.hub-org-pill.is-active .hub-org-dot { background: #000; }

.hub-module-row-list { border: 1px solid var(--border-main); border-radius: 8px; overflow: hidden; }
.hub-module-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.hub-module-row:last-child { border-bottom: none; }
.hub-module-row.is-locked { background: rgba(255,80,80,0.04); }
.hub-module-info strong { color: var(--text-title); font-size: 0.95em; display: block; }
.hub-module-info small { display: block; color: var(--text-muted); font-size: 0.8em; margin-top: 2px; }
.hub-module-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hub-config-link {
    color: #a855f7; font-size: 0.78em; font-weight: 600; text-decoration: none;
    background: rgba(168,85,247,0.15); padding: 3px 9px; border-radius: 4px; white-space: nowrap;
}
.hub-config-link:hover { background: rgba(168,85,247,0.25); }

.hub-maintenance-banner {
    display: flex; align-items: center; gap: 8px; background: rgba(255,80,80,0.1);
    border: 1px solid rgba(255,80,80,0.35); color: #ff9a9a; font-size: 0.78em;
    padding: 7px 12px; border-radius: 6px; margin-bottom: 10px;
}

.hub-maint-btn {
    width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-main);
    background: var(--bg-hover); display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85em; cursor: pointer; flex-shrink: 0; padding: 0;
}
.hub-maint-btn.is-locked { background: rgba(255,80,80,0.18); border-color: var(--neon-red); }
.hub-maint-btn-sm { width: 24px; height: 24px; font-size: 0.75em; }

.hub-switch {
    position: relative; display: inline-flex; align-items: center; width: 40px; height: 22px;
    border-radius: 22px; background: rgba(255,255,255,0.08); border: 1px solid var(--border-main);
    cursor: pointer; flex-shrink: 0; padding: 0; transition: background 0.15s;
}
.hub-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--text-muted); transition: transform 0.15s, background 0.15s;
}
.hub-switch.is-on { background: rgba(80,255,80,0.18); border-color: var(--neon-green); }
.hub-switch.is-on::after { transform: translateX(18px); background: var(--neon-green); }
.hub-switch-sm { width: 34px; height: 19px; }
.hub-switch-sm::after { width: 13px; height: 13px; }
.hub-switch-sm.is-on::after { transform: translateX(15px); }

.hub-submodule-list { padding: 10px 16px 14px 40px; display: flex; flex-direction: column; gap: 8px; }
.hub-submodule-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.85em; }
.hub-submodule-name { color: var(--text-main); display: flex; align-items: center; gap: 6px; }

.hub-version-badge {
    display: inline-block; font-size: 0.7em; font-weight: 600; color: var(--text-muted);
    cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px;
    margin-left: 4px; vertical-align: middle;
}
.hub-version-badge:hover { color: var(--neon-cyan); }
