/* ==========================================================================
   🛠️ 1. CONFIGURATION, IMPORTS ET VARIABLES (Charte Graphique Focal)
   ========================================================================== */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

/* Déclarations des polices locales (RGPD Compliant) */
@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/ubuntu-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Ubuntu';
    font-style: italic;
    font-weight: 400;
    src: url('/fonts/ubuntu-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/ubuntu-bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Exo';
    font-style: normal;
    font-weight: 600;
    src: url('/fonts/exo-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Exo';
    font-style: normal;
    font-weight: 800;
    src: url('/fonts/exo-800.woff2') format('woff2');
}

:root {
    --almeris-dark: #2e0a37;
    /* Fond principal */
    --almeris-medium: #521262;
    /* Sidebar & Cartes */
    --almeris-light: #761a8d;
    /* Survol des boutons */
    --almeris-bright: #9a22b8;
    /* Accents primaires */

    --text-pure: #ffffff;
    --text-muted: #e6e6e6;
    --border-subtle: rgba(255, 255, 255, 0.1);

    /* Couleur générique pour les actions destructrices/erreurs */
    --color-danger: #e62117;

    --sidebar-width: 240px;
}

/* ==========================================================================
   🧱 2. SQUELETTE ET BASES GLOBALES (Layout en Flexbox pour Sidebar)
   ========================================================================== */
body {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--almeris-dark);
    color: var(--text-muted);
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
}

/* Zone de contenu principale décalée à droite de la Sidebar */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
    box-sizing: border-box;
    min-width: 0;
}

/* Remplacement de l'ancien .container par .content-wrapper pour l'alignement */
.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Exo', sans-serif;
    font-weight: 800;
    color: var(--text-pure);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 5px;
}

.hidden {
    display: none !important;
}

/* Scrollbars */
.viewer-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.viewer-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.viewer-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--almeris-bright);
    border-radius: 3px;
}

/* ==========================================================================
   🎛️ 3. COMPOSANTS INTERFACES LATÉRAUX (Sidebar Verticale)
   ========================================================================== */

/* Conteneur vertical de la Sidebar */
#navbar-placeholder {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--almeris-medium);
    border-right: 1px solid var(--border-subtle);
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px 15px;
    box-sizing: border-box;
    gap: 8px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

/* Scrollbars */
#navbar-placeholder::-webkit-scrollbar,
.viewer-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

#navbar-placeholder::-webkit-scrollbar-track,
.viewer-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#navbar-placeholder::-webkit-scrollbar-thumb,
.viewer-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--almeris-bright);
    border-radius: 3px;
}

/* Titre de l'application ancré en haut de la Sidebar */
.sidebar-brand {
    display: block;
    /* ⚡ Permet au lien de prendre toute la largeur */
    text-decoration: none;
    /* ⚡ Retire le soulignement du lien */
    font-family: 'Exo', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-pure);
    text-align: center;
    margin-top: 30px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--almeris-bright);
    padding-bottom: 24px;
}

/* Boutons verticaux de navigation */
.nav-link {
    font-family: 'Exo', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-pure);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Titres des catégories du menu (Tiroirs cliquables) */
.nav-category-header {
    font-family: 'Exo', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    padding: 8px 10px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    /* Empêche la sélection du texte au double-clic */
}

.nav-category-header:hover {
    color: var(--text-pure);
    background: rgba(255, 255, 255, 0.05);
}

.nav-category-header.open {
    color: var(--text-pure);
    margin-bottom: 4px;
}

.nav-category-header .chevron-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

/* Rotation de l'icône quand le tiroir est ouvert */
.nav-category-header.open .chevron-icon {
    transform: rotate(180deg);
}

/* Conteneur masqué des liens */
.nav-category-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Ouverture fluide */
.nav-category-content.open {
    max-height: 500px;
    /* Valeur suffisamment grande pour révéler tous les liens */
    transition: max-height 0.4s ease-in;
}

/* Bouton de déconnexion (Simplifié) */
#logout-btn {
    margin-top: 10px;
    border: 1px solid rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.02);
}

#logout-btn:hover {
    background: rgba(255, 77, 77, 0.1);
    border-color: #ff0055;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.15);
}

/* Éléments de structure restants inchangés */
.stats-bar {
    background: var(--almeris-medium);
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-pure);
    border-left: 5px solid var(--almeris-bright);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   🧩 COMPOSANTS PARTAGÉS RESTAURÉS (Recherche, Boutons, Badges)
   ========================================================================== */

/* Saisie de recherche générique */
.search-box {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--almeris-medium);
    border-radius: 8px;
    color: var(--text-pure);
    font-size: 1rem;
    font-family: 'Ubuntu', sans-serif;
    box-sizing: border-box;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.search-box:focus {
    outline: none;
    border-color: var(--almeris-bright);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(154, 34, 184, 0.3);
}

/* Bouton Toggle d'override matériel "ON AIR" */
.onair-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-muted);
    font-family: 'Exo', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onair-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.onair-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666666;
    transition: all 0.3s ease;
    display: inline-block;
}

.onair-btn.active {
    border-color: rgba(255, 0, 0, 0.4);
    background: rgba(255, 0, 0, 0.1);
    color: var(--text-pure);
}

.onair-btn.active .onair-indicator {
    background: #ff0055;
    box-shadow: 0 0 12px #ff0055;
    animation: pulseOnAir 1.5s infinite;
}

/* Couleurs des badges et icônes réseaux unifiés */
.platform-icon {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #ffffff !important;
}

.platform-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Tag de présence temporelle relative */
.last-seen-tag {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-left: 6px;
}

/* ==========================================================================
   🏠 4. MODULE : ACCUEIL HUB DE LA CONSOLE (/index.html)
   ========================================================================== */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.hub-card {
    background: var(--almeris-medium);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 25px;
    box-sizing: border-box;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--almeris-bright);
    box-shadow: 0 8px 25px rgba(154, 34, 184, 0.15);
}

.hub-card h2 {
    margin: 0 0 10px 0;
    color: var(--text-pure);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-card p {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.hub-btn {
    align-self: flex-start;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--almeris-light);
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-pure);
    transition: background 0.2s;
}

.hub-card:hover .hub-btn {
    background: var(--almeris-bright);
    border-color: var(--almeris-bright);
}

/* ==========================================================================
   🎬 9. STYLES EXCLUSIFS ET COMPACITÉ POUR LES DOCKS OBS STUDIO (?obs=true)
   ========================================================================== */

body.obs-mode {
    display: block;
    /* Désactive la Sidebar Flexbox pour maximiser l'espace OBS */
    padding: 10px !important;
    /* Marges ultra-réduites pour les petits docks */
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

/* On retire totalement les marges du body pour le Chat */
body.obs-mode.page-chat {
    padding: 0 !important;
}

/* ⚡ EFFACEMENT PHYSIQUE ET STRICT DE LA SIDEBAR SUR OBS */
body.obs-mode #navbar-placeholder,
body.obs-mode .nav-menu {
    display: none !important;
}

/* Redimensionnement fluide de la zone principale */
body.obs-mode .main-content {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100%;
    overflow: hidden !important;
}

body.obs-mode .content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Optimisation de la barre d'état sous OBS */
body.obs-mode .stats-bar {
    padding: 8px 12px;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

body.obs-mode .platform-icon {
    font-size: 0.9rem;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

body.obs-mode .platform-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* ==========================================================================
   🌀 10. ANIMATIONS ET KEYFRAMES SÉCURISÉES
   ========================================================================== */
@keyframes pulseOnAir {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

@keyframes highlightPop {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   🧭 NAVIGATION HAUTE (Partagée : Accueil public & Connexion)
   ========================================================================== */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    /* ⚡ Le padding top/bottom est géré par la hauteur fixe */
    height: 70px;
    /* ⚡ Improvise une hauteur stricte et inaltérable */
    background: rgba(46, 10, 55, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

.landing-brand {
    text-decoration: none;
    font-family: 'Exo', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-pure);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 !important;
    /* ⚡ Neutralise le margin-bottom des <h1> */
    line-height: 1;
    /* ⚡ Standardise la boîte de texte */
    display: flex;
    align-items: center;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    /* ⚡ Espace proprement le sélecteur de langue et le bouton */
}

/* Le style du bouton "Retour à l'accueil" */
.landing-nav-actions .hub-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--almeris-light);
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-pure);
    transition: background 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    /* ⚡ Empêche le texte de passer sur deux lignes */
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-nav-actions .hub-btn:hover {
    background: var(--almeris-bright);
    border-color: var(--almeris-bright);
}

@media (max-width: 768px) {
    .landing-nav {
        padding: 15px 20px;
    }
}

/* ==========================================================================
   🔐 11. MODULE : AUTHENTIFICATION (/login)
   ========================================================================== */
.login-body {
    display: flex;
    flex-direction: column;
    /* ⚡ Aligne le header et le contenu verticalement */
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: radial-gradient(circle at center, var(--almeris-medium) 0%, var(--almeris-dark) 100%);
}

.login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-card {
    background: rgba(46, 10, 55, 0.6);
    border: 1px solid var(--border-subtle);
    border-top: 4px solid var(--almeris-bright);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    animation: loginFadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card h2 {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.login-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Exo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-pure);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-pure);
    font-family: 'Ubuntu', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--almeris-bright);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 8px rgba(154, 34, 184, 0.4);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--almeris-bright);
    border: 1px solid var(--almeris-bright);
    border-radius: 6px;
    color: var(--text-pure);
    font-family: 'Exo', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #af2fd0;
    border-color: #af2fd0;
    box-shadow: 0 0 15px rgba(154, 34, 184, 0.5);
}

.submit-btn:disabled {
    background: #555 !important;
    border-color: #555 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.error-banner {
    background: rgba(230, 33, 23, 0.15);
    border: 1px solid rgba(230, 33, 23, 0.4);
    border-left: 4px solid var(--color-danger);
    padding: 10px 14px;
    border-radius: 4px;
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: none;
}

.success-banner {
    background: rgba(0, 202, 157, 0.15);
    border: 1px solid rgba(0, 202, 157, 0.4);
    border-left: 4px solid #00ffcc;
    padding: 10px 14px;
    border-radius: 4px;
    color: #00ffcc;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: none;
}

.toggle-mode-container {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.toggle-mode-link {
    color: var(--almeris-bright);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-mode-link:hover {
    color: #ff0055;
    text-decoration: underline;
}

/* ⚡ Classes propres pour la case à cocher (remplace le style inline) */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}

.login-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--almeris-bright);
    cursor: pointer;
}

.checkbox-label {
    margin: 0 !important;
    text-transform: none !important;
    font-weight: 400 !important;
    cursor: pointer;
    letter-spacing: 0 !important;
}

@keyframes loginFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   🔔 12. TOAST NOTIFICATIONS GLOBALES (AppCore)
   ========================================================================== */
.focal-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--almeris-medium);
    color: var(--text-pure);
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-subtle);
}

.focal-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.focal-toast.toast-error {
    border-left: 5px solid #ff4d4d;
}

.focal-toast.toast-error i {
    color: #ff4d4d;
    font-size: 1.2rem;
}

.focal-toast.toast-success {
    border-left: 5px solid #00ffcc;
}

.focal-toast.toast-success i {
    color: #00ffcc;
    font-size: 1.2rem;
}

/* ==========================================================================
   🌐 18. ACTIONS FIXES ET SÉLECTEUR DE LANGUE (i18n)
   ========================================================================== */
.sidebar-bottom-actions {
    margin-top: auto;
    /* ⚡ Pousse tout ce bloc tout en bas de la barre latérale */
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
}

.lang-selector-container {
    padding-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-subtle);
}

.lang-select {
    background: var(--almeris-dark);
    color: var(--text-pure);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 6px 10px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.lang-select:focus {
    border-color: var(--almeris-bright);
}

/* ==========================================================================
   📱 20. RESPONSIVE DESIGN (Mobiles & Tablettes)
   ========================================================================== */

/* Bouton Hamburger (Masqué par défaut sur Desktop) */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-pure);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 10px 0 0;
}

/* Overlay sombre derrière le menu mobile */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {

    /* 1. Affichage du bouton Hamburger */
    .mobile-menu-btn {
        display: block !important;
    }

    /* 2. Transformation de la Sidebar en menu coulissant (Off-Canvas) */
    #navbar-placeholder {
        position: fixed;
        left: -280px;
        /* Masqué hors de l'écran */
        top: 0;
        bottom: 0;
        z-index: 9999;
        transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
        box-shadow: none;
        width: 260px;
    }

    #navbar-placeholder.mobile-open {
        left: 0;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
    }

    /* 3. Réduction des marges pour maximiser l'espace de contenu */
    .main-content {
        padding: 15px !important;
    }

    .stats-bar {
        padding: 12px;
        font-size: 0.95rem;
        flex-wrap: wrap;
        /* Le bouton OnAir passe à la ligne si besoin */
        gap: 10px;
    }

    .content-wrapper {
        padding-bottom: 30px;
    }

    /* 4. Comportement des Grilles et Formulaires */
    .hub-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hub-card,
    .platform-manage-card,
    .player-form-card,
    .login-card {
        padding: 15px;
    }

    /* 6. Ajustements Statistiques */
    .chart-container {
        height: 300px !important;
        padding: 10px;
    }
}

/* Cartes verrouillées */
.locked-card {
    opacity: 0.65;
    filter: grayscale(85%);
    position: relative;
    cursor: pointer !important;
    /* Force le pointeur cliquable */
    transition: all 0.3s ease;
}

.locked-card:hover {
    filter: grayscale(50%);
    opacity: 0.9;
    border-color: #ffcc00;
}

.lock-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: #ffcc00;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.locked-card .card-action {
    background: rgba(255, 204, 0, 0.15) !important;
    color: #ffcc00 !important;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

/* Modale d'Upgrade */
.upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.upgrade-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.upgrade-modal {
    background: var(--almeris-dark);
    border: 1px solid var(--almeris-bright);
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    text-align: center;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(154, 34, 184, 0.3);
}

.upgrade-modal-overlay.active .upgrade-modal {
    transform: translateY(0);
}

/* Limiter la largeur des colonnes textuelles très longues dans les tableaux */
.analytics-table {
    table-layout: fixed;
    /* Force le tableau à respecter la largeur du conteneur */
    width: 100%;
}

.analytics-table td,
.analytics-table th {
    overflow: hidden;
    text-overflow: ellipsis;
    /* Ajoute les points de suspension "..." */
    white-space: nowrap;
    /* Empêche le texte de passer à la ligne */
}

/* On laisse les colonnes d'actions et de stats respirer */
.analytics-table td:last-child,
.analytics-table th:last-child,
.analytics-table td:nth-last-child(2),
.analytics-table th:nth-last-child(2) {
    width: 120px;
    /* Force une largeur fixe pour les icônes d'actions/stats */
    white-space: normal;
}