/* ============================================
   RESPONSIVE DESIGN - IMAGINARIUM
   Optimisé pour mobile, tablette et desktop
   ============================================ */

/* === BASE MOBILE (320px - 767px) === */
@media (max-width: 767px) {
  /* Body & Layout */
  body {
    font-size: 16px;
    overflow-x: hidden;
  }

  /* ===== HEADER MOBILE FIXE EN HAUT ===== */
  .portal-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1050 !important;
    background: rgba(10, 20, 45, 0.98) !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid rgba(127, 216, 255, 0.2) !important;
    overflow: hidden !important;
  }

  /* Empêcher tout débordement de texte dans le header */
  .portal-header * {
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  /* S'assurer que le contenu est toujours en dessous */
  main, .container, section, article {
    position: relative !important;
    z-index: 1 !important;
  }

  /* Background effects derrière tout */
  #background-glow, #particles-container, #mystic-veil {
    z-index: 0 !important;
  }

  .navbar {
    padding: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }

  /* Logo à gauche */
  .navbar-brand {
    padding: 0.5rem !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    max-width: calc(100% - 80px) !important;
  }
  
  /* Compense l'espace du header fixe sur mobile uniquement */
  body:not(.no-header-padding) {
    padding-top: 70px !important;
  }

  /* S'assurer que tous les éléments principaux ont le padding nécessaire */
  main.container,
  .container,
  main {
    margin-top: 20px !important;
  }

  /* Pour les pages avec header dédié (non portal-header) */
  header:not(.portal-header) {
    margin-top: 70px !important;
  }

  /* Images titres dans les pages - ajuster les marges négatives sur mobile */
  main.container > div:first-child img[alt*="Gestion"],
  main.container > div:first-child img[alt*="Fiche"],
  main > div:first-child img[alt*="titre"] {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    max-width: 85% !important;
  }

  .navbar-brand img.header-logo {
    width: 50px !important;
    height: auto !important;
    min-width: 45px !important;
    max-width: 50px !important;
  }

  .navbar-toggler {
    padding: 0.4rem 0.6rem !important;
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
    border: 2px solid rgba(127, 216, 255, 0.5) !important;
    border-radius: 8px !important;
    background: rgba(127, 216, 255, 0.1) !important;
  }

  .navbar-toggler-icon {
    width: 1.2em !important;
    height: 1.2em !important;
  }

  /* Masquer le menu desktop sur mobile */
  .navbar-collapse {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 60px) !important;
    background: rgba(10, 20, 45, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 1049 !important;
    padding: 2rem 1rem !important;
    overflow-y: auto !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
  }

  .navbar-collapse.show {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* S'assurer que le menu fermé ne bloque rien */
  .navbar-collapse:not(.show) {
    pointer-events: none !important;
  }

  /* Menu Navigation fullscreen */
  .hex-menu {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
  }

  .hex-menu .navbar-nav {
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    align-items: stretch;
    gap: 1rem;
  }

  .hex-btn {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hex-btn a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 1rem 1.5rem !important;
    background: rgba(127, 216, 255, 0.1) !important;
    border: 1px solid rgba(127, 216, 255, 0.3) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    gap: 1rem !important;
  }

  .hex-btn a:hover,
  .hex-btn a:active {
    background: rgba(127, 216, 255, 0.2) !important;
    border-color: rgba(127, 216, 255, 0.5) !important;
    transform: translateX(5px) !important;
  }

  .hex-btn img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
  }

  .hex-btn-label {
    display: block !important;
    position: static !important;
    transform: none !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #fffbe7 !important;
    text-align: left !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    white-space: normal !important;
    flex: 1 !important;
  }

  /* Bouton hamburger (toggler) */
  .navbar-toggler {
    border: 2px solid rgba(127, 216, 255, 0.5) !important;
    border-radius: 8px !important;
    padding: 0.5rem !important;
    margin-right: 0.5rem !important;
    background: rgba(127, 216, 255, 0.1) !important;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(127, 216, 255, 0.25) !important;
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28127, 216, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  /* Style pour la cloche de notification sur mobile */
  .hex-btn-notif i {
    font-size: 1.5em !important;
  }

  .hex-btn-notif {
    justify-content: center !important;
  }

  /* Notifications */
  .notif-panel {
    position: fixed;
    width: 90% !important;
    max-width: 320px;
    left: 50% !important;
    transform: translateX(-50%);
    top: 60px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
  }

  #notif-count {
    top: -6px;
    right: -6px;
    font-size: 0.75em;
    padding: 2px 6px;
  }

  /* Portal d'accueil - INDEX.PHP */
  #portal-center-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #portal-canvas {
    width: 200px !important;
    height: 200px !important;
  }

  #portal-halo {
    width: 220px !important;
    height: 220px !important;
  }

  /* Boutons du portail - GRILLE VISIBLE sur mobile */
  #portal-buttons {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100vw !important;
    height: 100vh !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(5, auto) !important;
    gap: 10px !important;
    padding: 20px !important;
    align-content: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 2100 !important;
  }

  .portal-btn {
    width: 100% !important;
    max-width: 140px !important;
    height: 90px !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    pointer-events: auto !important;
  }

  .portal-btn img {
    max-width: 70px !important;
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
  }

  /* Bouton toggle rotation - masqué sur mobile */
  #toggle-rotation-btn {
    display: none !important;
  }

  /* Logo central - plus grand et centré */
  #portal-center-container > div:last-child {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 15px !important;
  }

  .central-logo-shadow {
    width: 100px !important;
    max-width: 100px !important;
  }

  #central-logo-link {
    pointer-events: auto !important;
  }

  /* Panneaux latéraux */
  #scenario-panel-container,
  #character-parchment-list-container {
    width: 85vw !important;
    max-width: 300px;
    font-size: 0.9em;
  }

  #toggle-scenario-panel-btn,
  #toggle-parchment-list-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2em;
    top: 15% !important;
    z-index: 2500 !important;
  }

  #toggle-scenario-panel-btn {
    left: 10px !important;
  }

  #toggle-parchment-list-btn {
    right: 10px !important;
  }

  /* Message d'intro */
  #intro-message {
    padding: 20px 15px;
  }

  #intro-text {
    font-size: 1.1rem !important;
    line-height: 1.4;
    max-width: 95vw;
  }

  #intro-message img {
    width: 50% !important;
    max-width: 150px !important;
    margin-top: 15px;
  }
}

/* === CHAT SYSTEM RESPONSIVE === */
@media (max-width: 767px) {
  /* Chat container: le chat prend tout l'écran par défaut */
  #chat-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    flex-direction: row;
    overflow: hidden;
  }

  /* ----- SIDEBAR GAUCHE (Personnages/Salons) ----- */
  #sidebar {
    position: fixed;
    top: 0;
    left: -85vw;
    width: 85vw;
    max-width: 350px;
    height: 100vh;
    padding: 1em;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
    background-color: rgba(10, 20, 45, 0.98);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    transition: left 0.3s ease-in-out;
    z-index: 1100 !important;
    pointer-events: auto !important;
  }

  #sidebar.slide-open {
    left: 0;
  }

  /* S'assurer que tous les éléments du sidebar sont interactifs */
  #sidebar.slide-open * {
    pointer-events: auto !important;
  }

  .sidebar-panel-header,
  .sidebar-subpanel-header {
    font-size: 1.05em;
    padding: 0.75em;
    min-height: 48px;
  }

  .sidebar-icon-img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
  }

  .sidebar-input,
  .sidebar-action-btn {
    width: 100%;
    font-size: 1em;
    min-height: 44px;
    margin-bottom: 0.5em;
  }

  /* Bouton de déconnexion plus visible */
  #logoutButton {
    min-height: 48px;
    font-size: 1.05em;
    font-weight: 600;
  }

  /* Liste des personnages */
  #characters .list-group-item,
  #roomList .list-group-item {
    padding: 0.75em;
    min-height: 56px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  #characters .list-group-item:active,
  #roomList .list-group-item:active {
    background: rgba(127, 216, 255, 0.2);
  }

  /* Images de personnages */
  .character-avatar,
  #selectedCharacterImage {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  #mini-music-player {
    width: 100%;
    height: 60px;
    margin-top: 0.5em;
  }

  /* ----- MAIN CHAT (Page principale plein écran) ----- */
  #main-chat {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    z-index: 1 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
  }

  #chat-header {
    font-size: 1em;
    padding: 0.75em 1em;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5em;
    background: rgba(10, 20, 45, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(127, 216, 255, 0.2);
    flex-shrink: 0;
    min-height: 56px;
  }

  #currentRoomName {
    font-size: 1.1em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }

  #currentScenarioName {
    font-size: 0.85em;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .export-room-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 0.9em;
    padding: 0.5em 0.75em;
    white-space: nowrap;
  }

  #chat-history-container {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1em !important;
    padding-bottom: 100px !important;
    max-height: none !important;
    height: auto !important;
    touch-action: manipulation !important;
    overscroll-behavior: contain !important;
  }

  #chat-box {
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 20px !important;
  }

  #chat-form {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0.5em !important;
    padding-bottom: calc(0.5em + env(safe-area-inset-bottom)) !important;
    background: rgba(10, 20, 45, 0.98) !important;
    border-top: 1px solid rgba(127, 216, 255, 0.2) !important;
    z-index: 101 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3) !important;
    pointer-events: auto !important;
  }

  #editor-toolbar-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    flex-wrap: nowrap;
  }

  .editor-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }

  .editor-btn img {
    width: 32px;
    height: 32px;
  }

  #character-selection-area {
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex: 1;
  }

  #characterSelect {
    flex: 1;
    font-size: 0.9em;
    min-height: 44px;
  }
  
  #selectedCharacterImage {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  /* ===== ZONE D'ÉCRITURE STYLE DISCORD MOBILE ===== */
  #message-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 8px !important;
    background: rgba(20, 35, 60, 0.95) !important;
    border-radius: 12px !important;
  }

  /* Avatar circulaire du personnage sélectionné (gauche) */
  .mobile-character-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 2px solid rgba(127, 216, 255, 0.5) !important;
    background: rgba(10, 20, 45, 0.8) !important;
    transition: all 0.2s ease !important;
  }

  .mobile-character-btn:active {
    transform: scale(0.95) !important;
    border-color: rgba(127, 216, 255, 0.8) !important;
  }

  .mobile-character-btn img,
  #mobileSelectedCharacterImage {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* Zone de texte centrale */
  #textarea-wrapper {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
  }

  textarea#message {
    width: 100% !important;
    min-height: 40px !important;
    max-height: 120px !important;
    height: 40px !important;
    resize: none !important;
    font-size: 0.95em !important;
    line-height: 1.4 !important;
    padding: 10px 12px !important;
    background: rgba(30, 50, 80, 0.8) !important;
    border: 1px solid rgba(127, 216, 255, 0.3) !important;
    border-radius: 20px !important;
    color: #fffbe7 !important;
    overflow-y: auto !important;
    transition: height 0.1s ease !important;
  }

  textarea#message::placeholder {
    color: rgba(255, 251, 231, 0.5) !important;
  }

  textarea#message:focus {
    outline: none !important;
    border-color: rgba(127, 216, 255, 0.6) !important;
    box-shadow: 0 0 8px rgba(127, 216, 255, 0.3) !important;
  }

  /* Boutons d'action à droite */
  #mobile-action-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .mobile-action-btn,
  #sendMessageBtn,
  #mobileDiceButton {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(127, 216, 255, 0.2) !important;
    border: 2px solid rgba(127, 216, 255, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
  }

  .mobile-action-btn:active,
  #sendMessageBtn:active,
  #mobileDiceButton:active {
    transform: scale(0.9) !important;
    background: rgba(127, 216, 255, 0.4) !important;
  }

  #sendMessageBtn {
    background: rgba(127, 216, 255, 0.8) !important;
    border-color: #7fd8ff !important;
  }

  #sendMessageBtn:active {
    background: rgba(127, 216, 255, 1) !important;
  }

  #sendMessageBtn i {
    font-size: 1.1em !important;
    color: #0a223a !important;
  }

  #mobileDiceButton img {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
  }

  /* Masquer les éléments desktop sur mobile */
  #editor-toolbar-controls,
  #character-selection-area,
  #diceButton,
  .editor-button-group {
    display: none !important;
  }

  /* Select mobile caché par défaut */
  #mobileCharacterSelect {
    display: none !important;
  }

  /* Style amélioré pour le select mobile */
  #mobileCharacterSelect[style*="display: block"] {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: rgba(10, 20, 45, 0.98) !important;
    color: #fffbe7 !important;
    border: 2px solid #7fd8ff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(127, 216, 255, 0.5) !important;
    padding: 0.8em !important;
    font-size: 1.1em !important;
    z-index: 9999 !important;
  }

  #mobileCharacterSelect option {
    padding: 1em 1.2em !important;
    margin: 2px 0 !important;
    background: rgba(20, 35, 60, 0.95) !important;
    color: #fffbe7 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1em !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }

  #mobileCharacterSelect option:hover {
    background: rgba(127, 216, 255, 0.25) !important;
  }

  #mobileCharacterSelect option:checked,
  #mobileCharacterSelect option:focus {
    background: rgba(127, 216, 255, 0.4) !important;
    font-weight: bold !important;
  }

  /* Réduire la taille du bouton de dé */
  #diceButton {
    min-width: 44px;
    min-height: 44px;
    max-width: 50px;
    padding: 6px;
    flex-shrink: 0;
  }

  #diceButton img {
    height: 32px !important;
    width: 32px !important;
  }
  
  /* Masquer le groupe de boutons vide */
  .editor-button-group:empty {
    display: none !important;
  }

  /* Maximiser l'espace pour l'historique du chat */
  #chat-history-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }
  
  #chat-box {
    padding-bottom: 1em;
  }

  /* ----- SIDEBAR DROITE (Utilisateurs connectés) ----- */
  #right-sidebar {
    position: fixed;
    top: 0;
    right: -85vw;
    width: 85vw;
    max-width: 300px;
    height: 100vh;
    padding: 1em;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: rgba(10, 20, 45, 0.98);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease-in-out;
    z-index: 1100 !important;
    pointer-events: auto !important;
  }

  #right-sidebar.slide-open {
    right: 0;
  }

  /* S'assurer que tous les éléments du sidebar sont interactifs */
  #right-sidebar.slide-open * {
    pointer-events: auto !important;
  }

  .authors-avatar-list {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.8em;
  }

  .author-avatar {
    width: 48px;
    height: 48px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
  }

  .authors-section-title-rotated {
    font-size: 1em;
    text-align: center;
    margin-bottom: 1em;
  }

  #selected-user-characters-panel {
    padding: 1em;
  }

  #back-to-user-lists-btn {
    font-size: 0.9em;
  }

  /* ----- Boutons de Toggle Sidebar ----- */
  .sidebar-toggle-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(127, 216, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(127, 216, 255, 0.4);
    color: #b2eaff;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
    pointer-events: auto;
  }

  .sidebar-toggle-btn:active {
    background: rgba(127, 216, 255, 0.3);
    transform: translateY(-50%) scale(0.95);
  }

  .sidebar-toggle-btn.active {
    background: rgba(127, 216, 255, 0.4);
    border-color: rgba(127, 216, 255, 0.6);
  }

  #toggle-left-sidebar {
    left: 0;
  }

  #toggle-right-sidebar {
    right: 0;
    border-radius: 8px 0 0 8px;
  }

  /* Animation pulse pour attirer l'attention au premier chargement */
  @keyframes pulse-button {
    0%, 100% {
      box-shadow: 0 0 0 0 rgba(127, 216, 255, 0.4);
    }
    50% {
      box-shadow: 0 0 0 8px rgba(127, 216, 255, 0);
    }
  }

  .sidebar-toggle-btn.first-hint {
    animation: pulse-button 2s ease-in-out 3;
  }

  /* Overlay pour fermer les sidebars en cliquant dessus */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 1050 !important;
    display: none;
    pointer-events: none;
  }

  .sidebar-overlay.active {
    display: block;
    pointer-events: auto;
    z-index: 1050 !important;
    background: rgba(0, 0, 0, 0.5);
  }
  
  /* Quand sidebar gauche ouvert, overlay ne couvre QUE la zone à droite du sidebar */
  .sidebar-overlay.left-open {
    left: 85vw !important;
    width: 15vw !important;
    background: rgba(0, 0, 0, 0.5) !important;
  }
  
  /* Quand sidebar droit ouvert, overlay ne couvre QUE la zone à gauche du sidebar */
  .sidebar-overlay.right-open {
    left: 0 !important;
    width: calc(100vw - 85vw) !important;
    background: rgba(0, 0, 0, 0.5) !important;
  }

  /* Masquer l'ancien bouton slide */
  #slide-right-button {
    display: none !important;
  }

  /* ----- Optimisation Modals Mobile ----- */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    padding: 1rem;
    min-height: 60px;
  }

  .modal-body {
    padding: 1rem;
    font-size: 1em;
  }

  .modal-footer {
    padding: 0.75rem;
  }

  .modal-footer .btn {
    min-height: 44px;
    font-size: 1em;
  }

  /* Emoji picker full-width sur mobile */
  .emoji-picker-popup {
    position: fixed !important;
    left: 5% !important;
    right: 5% !important;
    bottom: 10% !important;
    width: 90% !important;
    max-width: none !important;
    max-height: 60vh;
    overflow-y: auto;
  }

  .emoji-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }

  .emoji-option {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.5em;
  }

  /* Messages chat plus gros */
  .chat-message {
    margin-bottom: 1em;
  }

  .avatar {
    width: 48px !important;
    height: 48px !important;
  }

  .message-username {
    font-size: 1.05em;
  }

  .message-content {
    font-size: 1em;
    line-height: 1.5;
  }

  .message-timestamp {
    font-size: 0.85em;
  }

  /* Boutons réaction et édition plus gros */
  .edit-message-btn,
  .reply-message-btn,
  .add-reaction-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.2em;
  }

  .reaction-item {
    min-height: 36px;
    padding: 0.4em 0.6em;
    font-size: 1.1em;
  }
}

/* Optimisations ultra-mobile (≤576px) */
@media (max-width: 576px) {
  #sidebar {
    width: 90vw;
    left: -90vw;
  }

  #right-sidebar {
    width: 90vw;
    right: -90vw;
  }

  .sidebar-toggle-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3em;
  }

  /* Réduire padding chat pour plus d'espace */
  #chat-history-container {
    padding: 0.75em;
  }

  #chat-header {
    padding: 0.6em 0.75em;
  }

  #chat-form {
    padding: 0.6em 0.75em;
  }
}

/* === RESTAURER LAYOUT DESKTOP (≥768px) === */
@media (min-width: 768px) {
  /* ===== HEADER DESKTOP - POSITION NORMALE ===== */
  .portal-header {
    position: relative !important;
    height: auto !important;
  }

  body:not(.no-header-padding) {
    padding-top: 0 !important;
  }

  .navbar-collapse {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    height: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
  }

  .hex-menu .navbar-nav {
    flex-direction: row !important;
  }

  /* Masquer éléments mobiles */
  body .sidebar-toggle-btn,
  body #toggle-left-sidebar,
  body #toggle-right-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body .sidebar-overlay,
  body #sidebar-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Restaurer layout normal 3 colonnes - FORCE ABSOLUE */
  body #chat-container {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: visible !important;
    gap: 22px !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }

  /* Sidebar gauche - FORCE position normale */
  body #sidebar,
  body #sidebar.slide-open {
    position: static !important;
    top: 0 !important;
    left: 0 !important;
    width: 28vw !important;
    min-width: 240px !important;
    max-width: 600px !important;
    height: 100vh !important;
    flex: 0 0 28vw !important;
    transform: translateX(0) !important;
    transition: none !important;
    background: rgba(10, 20, 45, 0.92) !important;
    box-shadow: 0 2px 18px #7fd8ff22 !important;
    border: none !important;
    border-right: 2px solid #7fd8ff33 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    padding: 0 0.5em !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Main chat - FORCE centre avec flex */
  body #main-chat {
    position: static !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: 100vh !important;
    flex: 1 1 auto !important;
    min-width: 340px !important;
    max-width: none !important;
    transform: translateX(0) !important;
    transition: none !important;
    padding: 0 !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
  }

  /* Sidebar droite - FORCE position normale */
  body #right-sidebar,
  body #right-sidebar.slide-open {
    position: static !important;
    top: 0 !important;
    right: 0 !important;
    width: 160px !important;
    min-width: 140px !important;
    max-width: 220px !important;
    height: 100vh !important;
    flex: 0 0 160px !important;
    transform: translateX(0) !important;
    transition: none !important;
    background: rgba(10, 20, 45, 0.92) !important;
    box-shadow: 0 2px 18px #7fd8ff22 !important;
    border: none !important;
    border-left: 2px solid #7fd8ff33 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    padding: 12px 10px !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* ===== RESTAURER ZONE D'ÉCRITURE DESKTOP ===== */
  #message-input-wrapper {
    position: relative !important;
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  /* Masquer les éléments mobile sur desktop */
  .mobile-character-btn,
  #mobile-character-avatar,
  #mobile-action-buttons,
  #mobileDiceButton,
  #mobileCharacterSelect {
    display: none !important;
  }

  /* Réafficher les éléments desktop */
  #editor-toolbar-controls,
  #character-selection-area,
  #diceButton,
  .editor-button-group {
    display: flex !important;
  }

  #textarea-wrapper {
    display: block !important;
  }

  textarea#message {
    border-radius: 0 0 20px 20px !important;
    background-color: rgb(40 72 101) !important;
    border: 2px solid #7fd8ff !important;
    border-top-width: 0 !important;
    padding: 0.8em 60px 0.8em 1em !important;
  }

  #sendMessageBtn {
    position: absolute !important;
    right: 8px !important;
    bottom: 8px !important;
    width: 42px !important;
    height: 42px !important;
  }

  /* Restaurer styles header desktop */
  body #chat-header {
    position: relative !important;
    padding: 1em 1.5em !important;
    min-height: auto !important;
    background: transparent !important;
    border-bottom: none !important;
  }

  /* Restaurer padding chat desktop */
  body #chat-history-container {
    position: relative !important;
    padding: 1.5em !important;
    padding-bottom: 1.5em !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
  }

  body #chat-box {
    flex: 1 !important;
    overflow-y: auto !important;
  }

  body #chat-form {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    padding: 1em 1.5em !important;
    background: transparent !important;
    border-top: none !important;
    box-shadow: none !important;
    z-index: auto !important;
  }

  /* Réinitialiser les boutons et inputs */
  body .sidebar-panel-header,
  body .sidebar-subpanel-header {
    min-height: auto !important;
  }

  body .sidebar-input,
  body .sidebar-action-btn {
    min-height: auto !important;
  }

  body .editor-btn {
    min-width: auto !important;
    min-height: auto !important;
  }

  body .author-avatar {
    width: auto !important;
    height: auto !important;
  }
}

/* === FORCE DESKTOP avec classe body === */
body.desktop-view #chat-container {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
}

body.desktop-view #sidebar,
body.desktop-view #sidebar.slide-open {
  position: static !important;
  left: 0 !important;
  transform: none !important;
  z-index: 2 !important;
}

body.desktop-view #right-sidebar,
body.desktop-view #right-sidebar.slide-open {
  position: static !important;
  right: 0 !important;
  transform: none !important;
  z-index: 2 !important;
}

body.desktop-view #main-chat {
  position: static !important;
  flex: 1 !important;
  z-index: 1 !important;
}

body.desktop-view .sidebar-toggle-btn,
body.desktop-view .sidebar-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* === FORCE MOBILE avec classe body === */
body.mobile-view #sidebar,
body.mobile-view #right-sidebar {
  z-index: 1100 !important;
  pointer-events: auto !important;
}

body.mobile-view .sidebar-overlay {
  z-index: 1050 !important;
}

body.mobile-view .sidebar-overlay.active {
  pointer-events: auto !important;
  z-index: 1050 !important;
}

body.mobile-view .sidebar-toggle-btn {
  z-index: 1002 !important;
  pointer-events: auto !important;
  display: flex !important;
}

/* === PAGE CONNEXION (CONNECT.PHP) === */
@media (max-width: 767px) {
  main.connect-page-container {
    padding: 2vh 0;
  }

  .connect-slider-outer {
    flex-direction: column !important;
    min-height: auto;
  }

  .connect-slider-wrapper {
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .connect-view {
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .form-section-half,
  .image-section-half {
    width: 100% !important;
    flex: 1 1 auto;
    padding: 20px 15px;
  }

  .image-section-half {
    min-height: 200px;
    max-height: 250px;
  }

  .panel-image {
    object-fit: cover;
    height: 100%;
  }

  .slide-toggle-btn {
    font-size: 0.95em;
    padding: 8px 16px;
  }

  .connect-form h2 {
    font-size: 1.5em;
  }

  .form-control {
    font-size: 1em;
  }
}

/* === NEWS FEED / PROFILE / POSTS === */
@media (max-width: 767px) {
  .news-feed-container,
  .profile-container {
    padding: 10px;
    width: 100%;
  }

  .post-card,
  .profile-card {
    margin-bottom: 15px;
    padding: 15px;
  }

  .post-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-author-avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }

  .post-content {
    font-size: 0.95em;
    line-height: 1.4;
  }

  .post-image {
    max-width: 100%;
    height: auto;
  }

  .post-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .post-action-btn {
    font-size: 0.9em;
    padding: 6px 12px;
  }

  /* Profile page */
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
  }

  .profile-stats {
    flex-direction: column;
    gap: 10px;
  }
}

/* === SCENARIOS & CHARACTERS === */
@media (max-width: 767px) {
  .scenario-grid,
  .character-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
    padding: 10px;
  }

  .scenario-card,
  .character-card {
    width: 100%;
    margin: 0;
  }

  .scenario-image,
  .character-image {
    height: 180px;
    object-fit: cover;
  }

  .scenario-title,
  .character-name {
    font-size: 1.2em;
  }

  .scenario-description {
    font-size: 0.9em;
    line-height: 1.4;
  }

  /* Character sheet */
  .character-sheet-container {
    padding: 15px 10px;
  }

  .character-sheet-image {
    max-width: 250px !important;
  }

  .character-sheet-details h2 {
    font-size: 1.4em !important;
  }

  .character-sheet-details p {
    font-size: 1em !important;
  }

  .character-description-content {
    font-size: 0.95em !important;
    padding: 12px !important;
  }

  .back-link {
    width: 100%;
    max-width: 280px;
    text-align: center;
    font-size: 0.95em !important;
  }

  .character-sheet-section {
    margin-bottom: 20px;
  }

  .stat-row {
    flex-direction: column;
    gap: 10px;
  }

  .stat-item {
    width: 100%;
  }
}

/* === ADMIN DASHBOARD === */
@media (max-width: 767px) {
  .admin-dashboard-container {
    padding: 15px;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  .admin-table {
    font-size: 0.85em;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 5px;
  }

  /* Masquer certaines colonnes non essentielles */
  .admin-table .hide-mobile {
    display: none;
  }
}

/* === FEEDBACK & FORMS === */
@media (max-width: 767px) {
  .feedback-container,
  .form-container {
    padding: 15px;
    width: 100%;
  }

  .feedback-form,
  .custom-form {
    padding: 20px 15px;
  }

  textarea.feedback-text {
    min-height: 120px;
    font-size: 1em;
  }

  .form-group label {
    font-size: 0.95em;
  }

  .btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 1em;
  }
}

/* === MESSAGES PRIVÉS === */
@media (max-width: 767px) {
  .private-messages-container {
    flex-direction: column;
  }

  .conversations-list {
    width: 100%;
    max-height: 300px;
    border-right: none;
    border-bottom: 2px solid var(--imaginarium-border);
  }

  .conversation-item {
    padding: 12px;
  }

  .message-view {
    width: 100%;
    padding: 15px;
  }

  .message-bubble {
    max-width: 85%;
    padding: 10px;
    font-size: 0.95em;
  }

  .message-input-area {
    flex-direction: column;
    gap: 10px;
  }

  .message-input {
    width: 100%;
  }
}

/* === WARDROBE / INVENTORY === */
@media (max-width: 767px) {
  .wardrobe-container {
    padding: 15px;
  }

  .wardrobe-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .wardrobe-item {
    padding: 10px;
  }

  .wardrobe-item-image {
    height: 120px;
  }

  .wardrobe-item-name {
    font-size: 0.9em;
  }
}

/* === TABLETTE (768px - 1024px) === */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Portal buttons - position intermédiaire */
  .portal-btn {
    width: 100px !important;
    height: 100px !important;
  }

  .portal-btn img {
    max-width: 75px !important;
    max-height: 75px !important;
  }

  #portal-canvas {
    width: 300px !important;
    height: 300px !important;
  }

  /* Grid layouts */
  .scenario-grid,
  .character-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Chat container */
  #chat-container {
    flex-direction: row;
  }

  #sidebar {
    width: 200px;
  }

  #right-sidebar {
    width: 200px;
  }

  /* News feed */
  .news-feed-container {
    max-width: 700px;
    margin: 0 auto;
  }
}

/* === DESKTOP LARGE (1025px+) === */
@media (min-width: 1025px) {
  /* Optimisations pour grand écran */
  .scenario-grid,
  .character-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .news-feed-container {
    max-width: 900px;
    margin: 0 auto;
  }

  .chat-container {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* === UTILITIES RESPONSIVE === */
@media (max-width: 767px) {
  /* Text utilities */
  .mobile-hide {
    display: none !important;
  }

  .mobile-show {
    display: block !important;
  }

  .mobile-text-center {
    text-align: center !important;
  }

  /* Spacing utilities */
  .mobile-mb-1 {
    margin-bottom: 0.5rem !important;
  }

  .mobile-mb-2 {
    margin-bottom: 1rem !important;
  }

  .mobile-p-1 {
    padding: 0.5rem !important;
  }

  .mobile-p-2 {
    padding: 1rem !important;
  }

  /* Container utilities */
  .mobile-full-width {
    width: 100% !important;
  }

  .mobile-stack {
    flex-direction: column !important;
  }

  /* Header responsive optimizations */
  .portal-header {
    padding: 0.5rem 0 !important;
  }

  .navbar-brand .header-logo {
    width: 60px !important;
    height: auto !important;
  }

  .navbar-toggler {
    padding: 0.5rem;
    font-size: 1.2rem;
  }

  .navbar-collapse {
    background: rgba(10, 20, 45, 0.98) !important;
    border: 1px solid #7fd8ff88;
    border-radius: 12px;
    margin-top: 10px;
    padding: 20px 15px;
    box-shadow: 0 4px 20px rgba(127, 216, 255, 0.2);
  }

  .hex-menu {
    width: 100%;
  }

  .hex-btn {
    margin: 8px 0 !important;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hex-btn img {
    max-width: 100px;
    height: auto;
  }

  /* Notification bell responsive */
  #notif-bell-container {
    position: relative;
    margin: 10px auto;
  }

  #notif-count {
    font-size: 0.75em;
  }
}

/* ============================================
   SCENARIO_LIST.PHP RESPONSIVE
   ============================================ */

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  /* Fix scroll issues on mobile */
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
    position: relative !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Ensure background elements don't block scrolling */
  #background-glow,
  #particles-container,
  #mystic-veil {
    position: fixed !important;
    height: 100vh !important;
    pointer-events: none !important;
  }

  /* Ensure container is scrollable */
  .container-fluid {
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
    min-height: 100vh !important;
  }

  /* Hide sidebars on mobile - they should be hidden by Bootstrap's d-none d-lg-block */
  #mes-univers-panel,
  #mes-aventures-panel {
    display: none !important;
  }

  /* Main content takes full width */
  .col-xl-7.col-lg-6.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Page title and buttons */
  .d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    gap: 1rem;
  }

  .d-flex.justify-content-between.align-items-center h1 {
    font-size: 1.8rem;
    text-align: center;
    width: 100%;
  }

  .d-flex.justify-content-between.align-items-center div {
    width: 100%;
    text-align: center;
  }

  .btn-success {
    width: 100%;
    max-width: 300px;
  }

  /* Search bar responsive */
  #scenario-search-form .form-row {
    margin: 0 !important;
  }

  #scenario-search-form .form-row .col-sm-5,
  #scenario-search-form .form-row .col-sm-3,
  #scenario-search-form .form-row .col-sm-2,
  #scenario-search-form .form-row .col-sm-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Advanced search fields */
  #advanced-search-fields .form-row .col-sm-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Invitation cards responsive */
  .invitations-container .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .invitation-card {
    margin-bottom: 1rem;
  }

  .invitation-card-header {
    flex-direction: column;
    text-align: center;
  }

  .invitation-scenario-img {
    margin: 0 auto 0.75rem;
  }

  /* Scenario cards - stack vertically */
  .row .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .scenario-card {
    margin-bottom: 1.5rem;
  }

  .scenario-card .card-title {
    font-size: 1.5em !important;
  }

  .scenario-card-image {
    max-height: 200px;
    object-fit: cover;
  }

  /* Card body padding */
  .scenario-card .card-body {
    padding: 1rem;
  }

  /* Tag badges wrap better */
  .tag-badge {
    font-size: 0.8em;
    margin: 2px;
  }

  /* Forms in cards */
  .scenario-card .form-control {
    font-size: 0.9rem;
  }

  .scenario-card .btn {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  /* Members list */
  .scenario-card .list-group-item {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  /* Connected users badge */
  .connected-users-badge {
    font-size: 0.75em !important;
    padding: 1px 6px !important;
  }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  /* Adjust sidebar widths */
  #mes-univers-panel {
    flex: 0 0 25%;
    max-width: 25%;
  }

  .col-xl-7.col-lg-6.col-md-12 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  #mes-aventures-panel {
    flex: 0 0 25%;
    max-width: 25%;
  }

  /* Scenario cards - 2 columns */
  .row .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Invitation cards - 1 column */
  .invitations-container .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Adjust font sizes */
  .scenario-card .card-title {
    font-size: 1.8em;
  }

  .sidebar-main-title {
    font-size: 1.3rem;
  }
}

/* Large tablets and small desktops (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  /* Sidebars slightly narrower */
  #mes-univers-panel,
  #mes-aventures-panel {
    font-size: 0.9rem;
  }

  /* Scenario cards - 3 columns but smaller */
  .row .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .scenario-card .card-title {
    font-size: 1.9em;
  }
}

/* Extra large screens (1200px+) - keep default layout */
@media (min-width: 1200px) {
  /* Main content area */
  .col-xl-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }

  /* Sidebars optimal width */
  .col-xl-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }

  .col-xl-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
  /* Further reduce font sizes */
  body {
    font-size: 14px;
  }

  .d-flex.justify-content-between.align-items-center h1 {
    font-size: 1.5rem;
  }

  .scenario-card .card-title {
    font-size: 1.3em !important;
  }

  .scenario-card .card-body {
    padding: 0.75rem;
  }

  /* Smaller buttons */
  .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  /* Search inputs */
  .form-control {
    font-size: 0.85rem;
  }

  /* Compact invitation cards */
  .invitation-card {
    font-size: 0.9rem;
  }

  .invitation-scenario-img {
    width: 60px;
    height: 60px;
  }

  .invitation-sender-avatar {
    width: 24px;
    height: 24px;
  }
}

/* Sidebar panels scrolling improvements */
@media (min-width: 992px) {
  #mes-univers-panel,
  #mes-aventures-panel {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2rem;
  }

  #mes-univers-panel::-webkit-scrollbar,
  #mes-aventures-panel::-webkit-scrollbar,
  #mes-aventures-panel-scroll::-webkit-scrollbar {
    width: 8px;
  }

  #mes-univers-panel::-webkit-scrollbar-track,
  #mes-aventures-panel::-webkit-scrollbar-track,
  #mes-aventures-panel-scroll::-webkit-scrollbar-track {
    background: rgba(30, 60, 110, 0.3);
    border-radius: 10px;
  }

  #mes-univers-panel::-webkit-scrollbar-thumb,
  #mes-aventures-panel::-webkit-scrollbar-thumb,
  #mes-aventures-panel-scroll::-webkit-scrollbar-thumb {
    background: rgba(127, 216, 255, 0.5);
    border-radius: 10px;
  }

  #mes-univers-panel::-webkit-scrollbar-thumb:hover,
  #mes-aventures-panel::-webkit-scrollbar-thumb:hover,
  #mes-aventures-panel-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(127, 216, 255, 0.7);
  }
}