/* Variables définies dans themes.css */

/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === FOND KIKOOTCHAT === */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-image: url('/images/fond2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* ========================================
   ⭐ NOUVEAU HEADER KIKOOT (SCREENSHOTS) ⭐
   ======================================== */
.chat-header-kikoot {
    height: 65px;
    background: rgba(15, 18, 35, 0.4);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: relative;
    z-index: 10000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-left-kikoot {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-center-kikoot {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-right-kikoot {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo-kikoot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-kikoot {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.logo-text-kikoot {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.online-indicator-kikoot {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(76, 175, 80, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.pulse-dot-kikoot {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse-kikoot 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.6);
}

@keyframes pulse-kikoot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.header-right-kikoot {
    display: flex;
    gap: 12px;
}

/* Boutons Micro et Caméra comme screenshots */
.control-btn-kikoot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    pointer-events: auto;
}

.control-btn-kikoot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 30, 99, 0.5);
    transform: translateY(-1px);
}

.control-btn-kikoot.active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.icon-kikoot {
    font-size: 18px;
}

.label-kikoot {
    font-weight: 600;
}

/* Username et rôle badges */
.username-badge-kikoot {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.role-badge-kikoot {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Boutons header (Profil, Admin, Quitter) */
.btn-header-kikoot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-header-kikoot:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-header-kikoot.btn-profile:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-header-kikoot.btn-admin {
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-header-kikoot.btn-admin:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-header-kikoot.btn-logout {
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-header-kikoot.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* === CONTAINER PRINCIPAL === */
.container {
    display: grid;
    grid-template-columns: 1fr 280px;
    height: calc(100vh - 65px);
    overflow: hidden;
}

/* === SIDEBAR === */
.sidebar {
    background: rgba(15, 18, 35, 0.25);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.sidebar-left {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-right {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.count-badge {
    background: rgba(233, 30, 99, 0.2);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.online-badge-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot-small {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse-kikoot 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.rooms-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.room-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.room-item.active {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2) 0%, rgba(156, 39, 176, 0.2) 100%);
    border-color: rgba(233, 30, 99, 0.3);
}

.radio-player {
    margin: 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(10,5,20,0.95), rgba(20,10,35,0.95));
    border: 1px solid var(--border);
    box-shadow: 0 4px 25px var(--glow);
    overflow: hidden;
    padding: 12px;
}
.radio-pochette-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.radio-pochette {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px var(--glow);
    position: relative;
    border: 3px solid rgba(255,255,255,0.1);
}
.radio-pochette.spinning {
    animation: pochetteSpin 4s linear infinite;
}
.radio-pochette::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid rgba(255,255,255,0.2);
}
.radio-pochette-inner {
    font-size: 22px;
    z-index: 1;
}
@keyframes pochetteSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.radio-info {
    flex: 1;
    overflow: hidden;
}
.radio-title-scroll {
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 6px;
}
.radio-title-scroll span {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 8px var(--glow);
    animation: none;
}
.radio-title-scroll span.scrolling {
    animation: textScroll 8s linear infinite;
}
@keyframes textScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.radio-station-name {
    font-size: 12px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 8px rgba(236,72,153,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}
.radio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 6px;
}
.radio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    padding: 0 14px 6px;
}
.radio-visualizer .bar {
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    height: 3px;
    transition: height 0.1s;
}
.radio-visualizer.playing .bar:nth-child(1) { animation: rbar 0.8s ease-in-out infinite; }
.radio-visualizer.playing .bar:nth-child(2) { animation: rbar 0.6s ease-in-out infinite 0.1s; }
.radio-visualizer.playing .bar:nth-child(3) { animation: rbar 1.0s ease-in-out infinite 0.2s; }
.radio-visualizer.playing .bar:nth-child(4) { animation: rbar 0.7s ease-in-out infinite 0.05s; }
.radio-visualizer.playing .bar:nth-child(5) { animation: rbar 0.9s ease-in-out infinite 0.15s; }
.radio-visualizer.playing .bar:nth-child(6) { animation: rbar 0.5s ease-in-out infinite 0.3s; }
.radio-visualizer.playing .bar:nth-child(7) { animation: rbar 1.1s ease-in-out infinite 0.1s; }
.radio-visualizer.playing .bar:nth-child(8) { animation: rbar 0.75s ease-in-out infinite 0.25s; }
@keyframes rbar {
    0%, 100% { height: 3px; }
    50% { height: 16px; }
}
.radio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
}
.radio-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(236,72,153,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.radio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(236,72,153,0.7);
}
.volume-slider {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    outline: none;
    accent-color: var(--primary);
}
.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    box-shadow: 0 0 6px rgba(236,72,153,0.5);
}
.radio-select {
    width: calc(100% - 28px);
    margin: 0 14px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(236,72,153,0.3);
    border-radius: 8px;
    color: white;
    font-size: 11px;
    padding: 5px 8px;
    cursor: pointer;
    outline: none;
}
.radio-select option { background: var(--bg-dark); }


.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.user-item {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    position: relative;
}

.user-avatar::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #4caf50;
    border: 2px solid rgba(15, 18, 35, 1);
    border-radius: 50%;
    position: absolute;
    bottom: -2px;
    right: -2px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.user-status {
    font-size: 11px;
    color: rgba(76, 175, 80, 0.9);
}

/* === ZONE PRINCIPALE - CHAT === */
.main-content {
    display: flex;
    flex-direction: column;
    background: rgba(10, 14, 39, 0.4);
    overflow: hidden;
    position: relative;
}

.chat-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
    scroll-behavior: smooth;
    padding: 0;
}

.message {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary-dark);
    border-radius: 10px;
    max-width: 70%;
    animation: slideIn 0.3s ease;
    transition: all 0.3s ease;
    align-self: flex-start;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.message.system {
    align-self: center;
    background: rgba(255, 255, 255, 0.03);
    font-style: italic;
    text-align: center;
    border-left: none;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

.message .username {
    color: var(--secondary);
    font-weight: bold;
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 8px;
}

.message-text {
    padding-left: 42px;
    color: #ffffff;
}

/* Barre de saisie fixe en bas */
.message-input-zone {
    height: 70px !important;
    overflow: hidden !important;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(15, 18, 35, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

#message-input {
    flex: 1;
    padding: 14px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

#message-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#message-input:focus {
    outline: none;
    border-color: rgba(233, 30, 99, 0.5);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 30, 99, 0.5);
    transform: scale(1.05);
}

.btn-send {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5);
}

/* ========================================
   ⭐ WEBCAMS FLOTTANTES ⭐
   ======================================== */
#floating-webcams-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9000;
}

.floating-webcam {
    position: fixed;
    width: 200px;
    background: rgba(15, 18, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(233, 30, 99, 0.3);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: floatIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    cursor: move;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.floating-webcam:hover {
    border-color: rgba(233, 30, 99, 0.5);
    box-shadow: 0 16px 56px rgba(233, 30, 99, 0.3),
                0 0 0 1px rgba(233, 30, 99, 0.2);
}

.floating-webcam.minimized {
    width: auto;
}

.webcam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: move;
}

.webcam-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.webcam-status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse-kikoot 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.webcam-controls {
    display: flex;
    gap: 6px;
}

.webcam-btn {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    pointer-events: auto;
}

.webcam-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.webcam-btn.close:hover {
    background: rgba(244, 67, 54, 0.8);
}

.webcam-video-container {
    width: 200px;
    height: 200px;
    background: #000;
    position: relative;
}

.webcam-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webcam-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.webcam-placeholder svg {
    width: 32px;
    height: 32px;
}

.webcam-placeholder span {
    font-size: 13px;
    font-weight: 500;
}

/* === NOTIFICATIONS === */
#notifications {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    pointer-events: none;
}

.notification {
    padding: 15px 20px;
    background: rgba(15, 18, 35, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease;
    border: 1.5px solid rgba(233, 30, 99, 0.4);
    pointer-events: auto;
}

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success { border-left: 4px solid #10b981; }
.notification.error { border-left: 4px solid #ef4444; }
.notification.info { border-left: 4px solid var(--primary-dark); }

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(233, 30, 99, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 30, 99, 0.5);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 220px 1fr 220px;
    }

    .chat-header-kikoot {
        flex-wrap: wrap;
        height: auto;
        gap: 12px;
        padding: 12px 16px;
    }

    .header-center-kikoot {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .control-btn-kikoot .label-kikoot,
    .btn-header-kikoot .label-kikoot {
        display: none;
    }

    .username-badge-kikoot {
        display: none;
    }

    .chat-header-kikoot {
        padding: 10px;
    }
}

/* ========================================
   INDICATEURS WEBCAM/MICRO - LISTE USERS
   ======================================== */

.user-status-indicators {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.user-status-icon {
    font-size: 14px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.user-status-icon.active {
    opacity: 1;
    animation: pulse-icon 2s infinite;
}

.user-status-icon.cam-active {
    color: #10b981;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
}

.user-status-icon.mic-active {
    color: #3b82f6;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.5));
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   SÉLECTEUR DE SMILEYS
   ======================================== */

.emoji-picker {
    position: absolute;
    bottom: 60px;
    left: 120px;
    background: linear-gradient(135deg, #1e293b 0%, var(--bg-main) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 12px;
    max-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.emoji-picker.active {
    display: block;
    animation: slideUp 0.2s ease;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-item {
    font-size: 24px;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
}

.emoji-item:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   BOUTON YOUTUBE
   ======================================== */

.youtube-input-container {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: linear-gradient(135deg, #1e293b 0%, var(--bg-main) 100%);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

.youtube-input-container.active {
    display: block;
    animation: slideUp 0.2s ease;
}

.youtube-input-container input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 14px;
    margin-bottom: 10px;
}

.youtube-input-container button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.youtube-input-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}


/* ========================================
   INDICATEURS WEBCAM/MICRO - LISTE USERS
   ======================================== */

.user-status-indicators {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
    align-items: center;
}

.user-status-icon {
    font-size: 15px;
    opacity: 0.25;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.user-status-icon.active {
    opacity: 1;
    filter: grayscale(0%);
    animation: pulse-icon 2s infinite ease-in-out;
}

.user-status-icon.cam-active {
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.8));
}

.user-status-icon.mic-active {
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.8));
}

@keyframes pulse-icon {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.15); 
        opacity: 0.9;
    }
}

/* ========================================
   ✨ MENU ET POP-UP (MAGIC SCRIPT) ✨
   ======================================== */
.custom-menu {
    position: fixed;
    z-index: 10000;
    background: rgba(15, 18, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--primary);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.menu-opt {
    padding: 10px 15px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-opt:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: white;
    transform: translateX(5px);
}

.profile-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.profile-modal-content {
    background: rgba(15, 18, 35, 0.95);
    border: 2px solid var(--primary);
    width: 400px;
    padding: 25px;
    border-radius: 20px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 50px rgba(233, 30, 99, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px; right: 15px;
    cursor: pointer;
    font-size: 20px;
    color: #94a3b8;
}

/* SYSTÈME DE CADEAUX */
.gift-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.gift-modal-content {
    background: #0b141a;
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
}

.gift-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gift-modal-header h3 {
    color: var(--primary);
    margin: 0;
}

.close-gift-modal {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gift-item {
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.gift-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.gift-icon {
    font-size: 40px;
    margin-bottom: 5px;
}

.gift-name {
    color: white;
    font-size: 12px;
    margin-bottom: 5px;
}

.gift-price {
    color: #fbbf24;
    font-size: 11px;
    font-weight: bold;
}

.gift-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    animation: giftFly 3s ease-out;
}

@keyframes giftFly {
    0% {
        opacity: 0;
        transform: translate(-50%, 100%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(0.8);
    }
}

.gift-fly {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.5);
}

.gift-icon-big {
    font-size: 80px;
    margin-bottom: 10px;
}

.gift-text {
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.gift-message {
    background: linear-gradient(90deg, var(--primary), var(--accent)) !important;
    border-left: 4px solid #fbbf24 !important;
    padding: 15px !important;
}

.gift-message .gift-icon {
    font-size: 24px;
    margin-right: 10px;
}

/* DEVICE SELECTOR MODAL */
.device-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.device-selector-content {
    background: #1a1a2e;
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
}

.device-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.device-selector-header h3 {
    color: white;
    margin: 0;
}

.close-device-selector {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.device-selector-body {
    margin-bottom: 20px;
}

.device-selector-body label {
    display: block;
    color: var(--primary);
    font-weight: bold;
    margin: 10px 0 5px;
}

.device-selector-body select {
    width: 100%;
    padding: 10px;
    background: #0f1419;
    border: 1px solid #374151;
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.device-selector-footer {
    display: flex;
    gap: 10px;
}

.device-selector-footer button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.btn-choose {
    background: #22c55e;
    color: white;
}

.btn-close {
    background: #ef4444;
    color: white;
}

/* ========================================
   MOBILE NAV FIX COMPLET
   ======================================== */
@media (max-width: 768px) {
    .container {
        display: flex !important;
        flex-direction: column !important;
        height: calc(100vh - 120px) !important;
        overflow: hidden !important;
    }
    .sidebar {
        display: none !important;
    }
    .sidebar.mobile-show {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        height: 110px !important;
        overflow-x: auto !important;
        padding: 5px !important;
    }
    .rooms-list, .users-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        overflow-x: auto !important;
    }
    .main-content {
        flex: 1 !important;
        width: 100% !important;
    }
    .messages-container {
        height: calc(100vh - 280px) !important;
    }
    .radio-player { display: none !important; }
    .message-input-zone {
    height: 70px !important;
    overflow: hidden !important;
        position: fixed !important;
        bottom: 55px !important;
        left: 0 !important;
        width: 100% !important;
        padding: 5px !important;
        background: rgba(15,15,25,0.98) !important;
        z-index: 999 !important;
    }
    .message-input-zone input {
        font-size: 16px !important;
        width: 100% !important;
    }
    .kikoot-toolbar {
        position: fixed !important;
        bottom: 95px !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(15,15,25,0.98) !important;
        z-index: 998 !important;
        padding: 3px 5px !important;
    }
    .mobile-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(15,15,25,0.98) !important;
        border-top: 2px solid rgba(236,72,153,0.5) !important;
        z-index: 9999 !important;
        height: 55px !important;
    }
    .mobile-nav-btn {
        flex: 1 !important;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 22px !important;
        cursor: pointer !important;
    }
    .mobile-nav-btn.active {
        color: var(--primary) !important;
        border-top: 3px solid var(--primary) !important;
    }
}
.mobile-nav { display: none; }

@media (max-width: 768px) {
    .kikoot-toolbar {
        display: flex !important;
        position: fixed !important;
        bottom: 55px !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 998 !important;
        padding: 4px 5px !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        background: rgba(15,15,25,0.98) !important;
        border-top: 1px solid rgba(236,72,153,0.3) !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .header-center-kikoot {
        position: fixed !important;
        bottom: 60px !important;
        right: 10px !important;
        z-index: 9998 !important;
        display: flex !important;
        gap: 5px !important;
    }
    .control-btn-kikoot {
        padding: 8px !important;
        font-size: 12px !important;
        border-radius: 50% !important;
        width: 45px !important;
        height: 45px !important;
    }
}

/* Ajustement spécial pour l'application */
@media all and (display-mode: standalone) {
    body {
        height: 100vh;
        overscroll-behavior: none;
    }
    
    /* On remonte la barre de saisie pour ne pas qu'elle soit cachée */
    .message-input-container, .footer-controls {
        padding-bottom: env(safe-area-inset-bottom, 20px) !important;
        margin-bottom: 5px !important;
    }

    /* On s'assure que le contenu ne passe pas sous la barre */
    #messages-container {
        padding-bottom: 80px;
    }
}

/* Correction spéciale Application et Clavier */
@media all and (display-mode: standalone) {
    :root {
        --safe-bottom: env(safe-area-inset-bottom, 20px);
    }
    
    body {
        height: 100vh;
        overflow: hidden; /* Évite les rebonds bizarres */
    }

    /* On cible la barre de message (souvent .message-input-container ou .chat-input-area) */
    .message-input-container, footer, [class*="input-container"] {
        bottom: var(--safe-bottom) !important;
        position: sticky;
        z-index: 1000;
    }
}

/* ========================================
   TOOLBAR DESKTOP FIX
   ======================================== */
@media (min-width: 769px) {
    .kikoot-toolbar {
        position: fixed !important;
        bottom: 50px !important;
        left: 280px !important;
        right: 280px !important;
        width: auto !important;
        background: linear-gradient(135deg, rgba(30,41,59,0.98), rgba(15,23,42,0.98)) !important;
        border: 2px solid rgba(236,72,153,0.3) !important;
        z-index: 500 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 10px !important;
        border-radius: 8px 8px 0 0 !important;
    }
    .message-input-zone {
    height: 70px !important;
    overflow: hidden !important;
        position: fixed !important;
        bottom: 5px !important;
        left: 280px !important;
        right: 280px !important;
        width: auto !important;
        z-index: 500 !important;
        background: rgba(15,23,42,0.98) !important;
        padding: 5px !important;
        border-radius: 0 0 8px 8px !important;
    }
    .messages-container {
        padding-bottom: 150px !important;
    }
}

/* ========================================
   ✨ AVATAR GLOW CLIGNOTANT - LISTE USERS
   ======================================== */
@keyframes glow-admin {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(239,68,68,0.6), 0 0 12px 4px rgba(239,68,68,0.3); }
    50% { box-shadow: 0 0 14px 5px rgba(239,68,68,1), 0 0 28px 10px rgba(239,68,68,0.6); }
}
@keyframes glow-modo {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(34,197,94,0.6), 0 0 12px 4px rgba(34,197,94,0.3); }
    50% { box-shadow: 0 0 14px 5px rgba(34,197,94,1), 0 0 28px 10px rgba(34,197,94,0.6); }
}
@keyframes glow-vip {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(251,146,60,0.6), 0 0 12px 4px rgba(251,146,60,0.3); }
    50% { box-shadow: 0 0 14px 5px rgba(251,146,60,1), 0 0 28px 10px rgba(251,146,60,0.6); }
}
.avatar-glow-admin {
    animation: glow-admin 1.5s ease-in-out infinite !important;
    border-color: #ef4444 !important;
}
.avatar-glow-modo {
    animation: glow-modo 1.5s ease-in-out infinite !important;
    border-color: #22c55e !important;
}
.avatar-glow-vip {
    animation: glow-vip 1.5s ease-in-out infinite !important;
    border-color: #fb923c !important;
}

@keyframes glow-user {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(139,92,246,0.6), 0 0 12px 4px rgba(139,92,246,0.3); }
    50% { box-shadow: 0 0 14px 5px rgba(139,92,246,1), 0 0 28px 10px rgba(139,92,246,0.6); }
}
.avatar-glow-user {
    animation: glow-user 1.5s ease-in-out infinite !important;
    border-color: #8b5cf6 !important;
}

/* ═══════════════════════════════════════
   BOUTIQUE - CADRES AVATAR ACHETABLES
   ═══════════════════════════════════════ */
@keyframes glow-frame-gold {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(255,215,0,0.7), 0 0 12px 4px rgba(255,215,0,0.4); }
    50% { box-shadow: 0 0 16px 6px rgba(255,215,0,1), 0 0 32px 12px rgba(255,215,0,0.7); }
}
.avatar-frame-gold {
    animation: glow-frame-gold 1.5s ease-in-out infinite !important;
    border-color: #ffd700 !important;
}

@keyframes glow-frame-ice {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(56,189,248,0.7), 0 0 12px 4px rgba(56,189,248,0.4); }
    50% { box-shadow: 0 0 16px 6px rgba(56,189,248,1), 0 0 32px 12px rgba(56,189,248,0.7); }
}
.avatar-frame-ice {
    animation: glow-frame-ice 1.5s ease-in-out infinite !important;
    border-color: #38bdf8 !important;
}

@keyframes glow-frame-fire {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(249,115,22,0.7), 0 0 12px 4px rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 16px 6px rgba(249,115,22,1), 0 0 32px 12px rgba(220,38,38,0.7); }
}
.avatar-frame-fire {
    animation: glow-frame-fire 1.5s ease-in-out infinite !important;
    border-color: #f97316 !important;
}

@keyframes glow-frame-rainbow {
    0% { box-shadow: 0 0 12px 4px rgba(239,68,68,0.8); border-color: #ef4444 !important; }
    20% { box-shadow: 0 0 12px 4px rgba(249,115,22,0.8); border-color: #f97316 !important; }
    40% { box-shadow: 0 0 12px 4px rgba(234,179,8,0.8); border-color: #eab308 !important; }
    60% { box-shadow: 0 0 12px 4px rgba(34,197,94,0.8); border-color: #22c55e !important; }
    80% { box-shadow: 0 0 12px 4px rgba(59,130,246,0.8); border-color: #3b82f6 !important; }
    100% { box-shadow: 0 0 12px 4px rgba(239,68,68,0.8); border-color: #ef4444 !important; }
}
.avatar-frame-rainbow {
    animation: glow-frame-rainbow 3s linear infinite !important;
}

@keyframes glow-frame-galaxy {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(168,85,247,0.7), 0 0 12px 4px rgba(236,72,153,0.4); }
    50% { box-shadow: 0 0 16px 6px rgba(168,85,247,1), 0 0 32px 12px rgba(236,72,153,0.7); }
}
.avatar-frame-galaxy {
    animation: glow-frame-galaxy 2s ease-in-out infinite !important;
    border-color: #a855f7 !important;
}

/* Cadre Légendaire (multicolore cyclique) */
@keyframes glow-frame-legendary {
    0% { box-shadow: 0 0 14px 5px rgba(251,191,36,0.9); border-color: #fbbf24 !important; }
    25% { box-shadow: 0 0 14px 5px rgba(239,68,68,0.9); border-color: #ef4444 !important; }
    50% { box-shadow: 0 0 14px 5px rgba(168,85,247,0.9); border-color: #a855f7 !important; }
    75% { box-shadow: 0 0 14px 5px rgba(34,197,94,0.9); border-color: #22c55e !important; }
    100% { box-shadow: 0 0 14px 5px rgba(251,191,36,0.9); border-color: #fbbf24 !important; }
}
@keyframes scaleFrame { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.avatar-frame-legendary {
    animation: glow-frame-legendary 2.5s linear infinite, scaleFrame 1s ease-in-out infinite !important;
}

/* Cadre Océan */
@keyframes glow-frame-ocean {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(6,182,212,0.7), 0 0 12px 4px rgba(8,145,178,0.4); }
    50% { box-shadow: 0 0 16px 6px rgba(6,182,212,1), 0 0 32px 12px rgba(8,145,178,0.7); }
}
.avatar-frame-ocean {
    animation: glow-frame-ocean 1.8s ease-in-out infinite !important;
    border-color: #06b6d4 !important;
}

/* Cadre Nature */
@keyframes glow-frame-nature {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(16,185,129,0.7), 0 0 12px 4px rgba(5,150,105,0.4); }
    50% { box-shadow: 0 0 16px 6px rgba(16,185,129,1), 0 0 32px 12px rgba(5,150,105,0.7); }
}
.avatar-frame-nature {
    animation: glow-frame-nature 1.8s ease-in-out infinite !important;
    border-color: #10b981 !important;
}

/* Cadre Empereur (noir/or impérial) */
@keyframes glow-frame-emperor {
    0%, 100% { box-shadow: 0 0 8px 3px rgba(0,0,0,0.9), 0 0 16px 6px rgba(251,191,36,0.6); }
    50% { box-shadow: 0 0 18px 7px rgba(0,0,0,1), 0 0 36px 14px rgba(251,191,36,0.9); }
}
.avatar-frame-emperor {
    animation: glow-frame-emperor 2.2s ease-in-out infinite !important;
    border-color: #fbbf24 !important;
}


/* === FIX TOOLBAR POSITION === */
.kikoot-toolbar {
    position: absolute !important;
    bottom: 60px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 99 !important;
    margin: 0 !important;
}

/* === FIX INPUT ZONE WIDTH === */
.message-input-zone {
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* === FIX CHAT-ZONE POSITION === */
.main-content {
    position: relative !important;
}

/* === FIX INPUT DEPASSE SIDEBAR === */
.message-input-zone {
    width: calc(100vw - 280px) !important;
    max-width: calc(100vw - 280px) !important;
    box-sizing: border-box !important;
}



/* === RADIO POSITION SIDEBAR === */
.sidebar-right .radio-player {
    margin-top: 30px !important;
}

/* ===================================
   FIX AFFICHAGE APRÈS REFRESH
   =================================== */
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    min-height: 100vh !important;
}

.container {
    display: grid !important;
    grid-template-columns: 1fr 280px !important;
    height: calc(100vh - 65px) !important;
    overflow: hidden !important;
}

.main-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.chat-zone {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#messages, .messages-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.message-input-zone {
    flex-shrink: 0 !important;
}
/* ========================================================
   MOTEUR D'EFFETS SPÉCIAUX POUR LES CADEAUX KIKOOTCHAT
   ======================================================== */

/* Effet secousse sur la webcam (Cadeaux Bombe, Marteau) */
.fx-shake {
    animation: kktShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Filtre de Glace (Cadeau Iceberg) appliqué sur la vidéo */
.fx-ice {
    filter: blur(1px) hue-rotate(180deg) saturate(1.8) !important;
    background: rgba(0, 180, 216, 0.2) !important;
    mix-blend-mode: color-dodge;
    pointer-events: none;
}

/* Filtre Flash Disco / Club */
.fx-disco {
    animation: kktDisco 0.4s infinite alternate;
    pointer-events: none;
}

/* Les animations de mouvements */
@keyframes kktShake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(3px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

@keyframes kktDisco {
    0% { background: rgba(255, 0, 128, 0.3); filter: hue-rotate(0deg); }
    100% { background: rgba(0, 255, 255, 0.3); filter: hue-rotate(360deg); }
}
/* --- EFFET FISSURE (Pour le Marteau, le Caca ou le Carton Rouge agressif) --- */
.fx-fissure {
    position: relative;
    animation: kktShake 0.4s ease-in-out;
}
.fx-fissure::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://i.ibb.co/X3X7f9K/broken-glass.png'); /* Une image de vitre brisée transparente */
    background-size: cover;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 10;
    opacity: 0.9;
}

/* --- EFFET MATRIX / PIRATAGE (Pour le Robot Cyber ou l'Alien Pixel) --- */
.fx-matrix {
    filter: matrix(1, 2, -1, 1, 0, 0) sepia(1) hue-rotate(60deg) saturate(8) brightness(0.8) !important;
    animation: kktMatrixGlitch 0.3s infinite alternate;
}

/* --- EFFET ENFER / FLAMMES (Pour la Flamme Violette ou la Supernova) --- */
.fx-fire {
    filter: sepia(1) hue-rotate(330deg) saturate(5) contrast(1.2) !important;
    box-shadow: inset 0 0 30px #ef4444, 0 0 20px #f59e0b !important;
}

/* --- L'animation glitch pour l'effet Matrix --- */
@keyframes kktMatrixGlitch {
    0% { filter: sepia(1) hue-rotate(60deg) saturate(8) contrast(1); }
    100% { filter: sepia(1) hue-rotate(80deg) saturate(10) contrast(1.4) cubic-bezier(0.1, 0.9, 0.2, 1); }
}
/* ==========================================
   ADAPTATION MOBILE (Écrans < 768px)
   ========================================== */
@media screen and (max-width: 768px) {
  
  /* 1. Passer la disposition globale en colonne */
  .chat-container, 
  .main-layout, 
  .content-wrapper {
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 2. Redimensionner la grille / zone des webcams */
  .webcams-container, 
  .cam-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 8px !important;
    padding: 5px !important;
  }

  /* 3. Ajuster la zone d'écriture et la barre d'envoi */
  .chat-input-area, 
  .message-form {
    flex-direction: row;
    padding: 8px !important;
    position: sticky;
    bottom: 0;
    background: #fff; /* ou la couleur de ton thème */
    z-index: 10;
  }

  .chat-input-area input, 
  .chat-input-area textarea {
    font-size: 16px !important; /* Évite le zoom automatique sur iOS */
  }

  /* 4. Adapter la liste des utilisateurs / sidebar */
  .user-list, 
  .sidebar {
    width: 100% !important;
    max-height: 150px;
    overflow-y: auto;
  }

  /* 5. Réduire la taille des boutons / toolbar pour mobile */
  .toolbar, 
  .action-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }
  
  .btn, 
  .toolbar-btn {
    padding: 6px 10px !important;
    font-size: 0.85rem !important;
  }
}
/* Fix scrollbar Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 30, 99, 0.3) rgba(0, 0, 0, 0.2);
}
.sidebar, .sidebar-right, #friends-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 30, 99, 0.3) transparent;
}

/* ═══════════════════════════════════════
   SYSTÈME DE NOTIFICATIONS - CLOCHE
   ═══════════════════════════════════════ */
#kt-notif-btn {
    position: relative;
}
#kt-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 0 8px rgba(239,68,68,0.7);
}
#kt-notif-badge.show { display: flex; }

#kt-notif-panel {
    position: fixed;
    bottom: auto;
    right: auto;
    width: 320px;
    max-height: 420px;
    background: linear-gradient(160deg, #14111c, #0a0810);
    border: 1px solid rgba(236,72,153,0.35);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    z-index: 99998;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#kt-notif-panel.show { display: flex; }
#kt-notif-panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#kt-notif-panel-header h4 {
    margin: 0;
    color: #ec4899;
    font-size: 14px;
}
#kt-notif-clear-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
}
#kt-notif-clear-btn:hover { color: #ec4899; }
#kt-notif-list {
    overflow-y: auto;
    flex: 1;
}
.kt-notif-item {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.kt-notif-item .kt-notif-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.kt-notif-item .kt-notif-text {
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.4;
}
.kt-notif-item .kt-notif-time {
    font-size: 10px;
    color: #64748b;
    margin-top: 3px;
}
.kt-notif-empty {
    padding: 30px 18px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

/* Popup toast automatique */
#kt-notif-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kt-notif-toast {
    background: linear-gradient(135deg, #1a0a2e, #0d0618);
    border: 1px solid rgba(236,72,153,0.5);
    border-radius: 14px;
    padding: 14px 18px;
    min-width: 260px;
    max-width: 320px;
    box-shadow: 0 10px 34px rgba(0,0,0,0.7);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: ktToastSlideIn 0.35s ease;
}
.kt-notif-toast.fade-out {
    animation: ktToastSlideOut 0.3s ease forwards;
}
.kt-notif-toast .kt-toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.kt-notif-toast .kt-toast-text {
    font-size: 13px;
    color: white;
    line-height: 1.4;
    font-weight: 600;
}
@keyframes ktToastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes ktToastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}


.kikoot-card { display: flex; align-items: center; justify-content: space-between; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; }
.kikoot-card:hover { background: rgba(30, 41, 59, 0.85); border-color: rgba(236, 72, 153, 0.3); }
.kikoot-card-left { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.avatar-box { width: 40px; height: 40px; position: relative; }
.avatar-box img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 0 10px rgba(168, 85, 247, 0.35); }
.user-info { display: flex; flex-direction: column; gap: 2px; }
.username-row { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: #f8fafc; }
.u-badge { font-size: 8px; font-weight: 800; padding: 1px 5px; border-radius: 5px; align-self: flex-start; }
.badge-user { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-admin { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.kikoot-card-right { display: flex; align-items: center; gap: 6px; }
.btn-card-cam, .btn-card-gift { background: #fff; border: none; border-radius: 8px; padding: 5px 8px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 3px; }
.cam-count { background: #ef4444; color: #fff; font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 6px; }


/* Ajustements pour Crédits, Shop & Cam */
.u-subrow { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.badge-vip { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.4); }
.u-credits { font-size: 10px; font-weight: bold; color: #fbbf24; }
.btn-card-shop { background: #fff; border: none; border-radius: 8px; padding: 5px 8px; cursor: pointer; font-size: 13px; transition: transform 0.1s ease; }
.btn-card-shop:hover { transform: scale(1.08); }
.btn-card-cam.active { background: #22c55e; color: #fff; animation: pulseCam 2s infinite; }
@keyframes pulseCam { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }


/* Style fidèle Client3 */
.kikoot-card { display: flex; align-items: center; justify-content: space-between; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 6px 10px; margin-bottom: 6px; cursor: pointer; }
.kikoot-card-left { display: flex; align-items: center; gap: 8px; }
.user-type-icon { font-size: 14px; opacity: 0.6; display: flex; align-items: center; }
.avatar-box { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(168, 85, 247, 0.4); box-shadow: 0 0 8px rgba(168, 85, 247, 0.3); }
.avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.user-info { display: flex; flex-direction: column; gap: 2px; }
.username-row { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; color: #fff; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.status-dot.offline { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.u-badge { font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 4px; align-self: flex-start; text-transform: uppercase; }
.badge-user { background: rgba(255, 255, 255, 0.15); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.2); }
.badge-admin { background: rgba(168, 85, 247, 0.3); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.5); }
.badge-vip { background: rgba(234, 179, 8, 0.3); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.5); }
.kikoot-card-right { display: flex; align-items: center; gap: 6px; }
.btn-card-cam { background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 4px 8px; color: #fff; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.btn-card-cam .cam-count { background: #ef4444; color: #fff; font-size: 9px; font-weight: bold; padding: 1px 5px; border-radius: 6px; }
.btn-card-gift { background: #ffffff; border: none; border-radius: 8px; padding: 5px 8px; cursor: pointer; font-size: 14px; }


/* Correctif alignement & débordement des cards */
.kikoot-card { 
    box-sizing: border-box !important; 
    width: 100% !important; 
    padding: 6px 8px !important; 
    overflow: hidden !important; 
}
.kikoot-card-right { 
    display: flex !important; 
    align-items: center !important; 
    gap: 4px !important; 
    flex-shrink: 0 !important; 
}
.btn-card-gift, .btn-card-cam { 
    flex-shrink: 0 !important; 
    padding: 4px 6px !important; 
    font-size: 12px !important; 
}


/* Ajustement ultra-compact Client3 */
.kikoot-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 3px 6px !important;
    margin-bottom: 4px !important;
    height: 42px !important;
    box-sizing: border-box !important;
}
.kikoot-card-left { display: flex !important; align-items: center !important; gap: 6px !important; }
.user-type-icon { font-size: 11px !important; opacity: 0.5 !important; }
.avatar-box { width: 32px !important; height: 32px !important; border-radius: 8px !important; overflow: hidden !important; }
.avatar-box img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.user-info { display: flex !important; flex-direction: column !important; justify-content: center !important; gap: 1px !important; }
.username-row { display: flex !important; align-items: center !important; gap: 4px !important; font-size: 12px !important; font-weight: 700 !important; color: #fff !important; line-height: 1 !important; }
.status-dot { width: 7px !important; height: 7px !important; border-radius: 50% !important; }
.status-dot.online { background: #22c55e !important; box-shadow: 0 0 4px #22c55e !important; }
.status-dot.offline { background: #ef4444 !important; box-shadow: 0 0 4px #ef4444 !important; }
.u-sub-line { display: flex !important; align-items: center !important; gap: 4px !important; }
.u-badge { font-size: 8px !important; font-weight: 800 !important; padding: 0px 4px !important; border-radius: 3px !important; line-height: 1.2 !important; }
.badge-user { background: rgba(255, 255, 255, 0.15) !important; color: #cbd5e1 !important; }
.badge-admin { background: rgba(168, 85, 247, 0.3) !important; color: #c084fc !important; }
.badge-vip { background: rgba(234, 179, 8, 0.3) !important; color: #facc15 !important; }
.u-coins-count { font-size: 9px !important; color: #fbbf24 !important; font-weight: bold !important; }
.kikoot-card-right { display: flex !important; align-items: center !important; gap: 3px !important; }
.btn-card-cam { background: rgba(15, 23, 42, 0.9) !important; border: 1px solid rgba(255,255,255,0.15) !important; border-radius: 6px !important; padding: 2px 5px !important; color: #fff !important; font-size: 11px !important; }
.btn-card-cam .cam-count { background: #ef4444 !important; color: #fff !important; font-size: 8px !important; padding: 1px 3px !important; border-radius: 4px !important; }
.btn-card-gift { background: #ffffff !important; border: none !important; border-radius: 6px !important; padding: 3px 5px !important; font-size: 11px !important; cursor: pointer !important; }


/* Reproduction exacte Client3 */
.kikoot-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(20, 20, 30, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}
.kikoot-card:hover {
    background: rgba(30, 30, 45, 0.8) !important;
}
.kikoot-card-left { display: flex !important; align-items: center !important; gap: 8px !important; }
.user-type-icon {
    width: 28px !important;
    height: 28px !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    color: #a78bfa !important;
}
.avatar-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3) !important;
}
.avatar-box img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.user-info { display: flex !important; flex-direction: column !important; gap: 2px !important; }
.username-row { display: flex !important; align-items: center !important; gap: 6px !important; }
.u-name { font-weight: 700 !important; font-size: 13px !important; color: #ffffff !important; }
.status-dot { width: 8px !important; height: 8px !important; border-radius: 50% !important; display: inline-block !important; }
.status-dot.online { background: #22c55e !important; box-shadow: 0 0 6px #22c55e !important; }
.status-dot.offline { background: #ef4444 !important; box-shadow: 0 0 6px #ef4444 !important; }
.u-badge {
    font-size: 8px !important;
    font-weight: 800 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    align-self: flex-start !important;
    text-transform: uppercase !important;
}
.badge-user { background: rgba(255, 255, 255, 0.15) !important; color: #e2e8f0 !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; }
.badge-admin { background: rgba(168, 85, 247, 0.3) !important; color: #c084fc !important; border: 1px solid rgba(168, 85, 247, 0.4) !important; }
.badge-modo { background: rgba(99, 102, 241, 0.3) !important; color: #818cf8 !important; border: 1px solid rgba(99, 102, 241, 0.4) !important; }
.badge-vip { background: rgba(234, 179, 8, 0.3) !important; color: #facc15 !important; border: 1px solid rgba(234, 179, 8, 0.4) !important; }
.kikoot-card-right { display: flex !important; align-items: center !important; gap: 6px !important; }
.btn-card-cam { background: rgba(15, 23, 42, 0.8) !important; border: 1px solid rgba(255,255,255,0.15) !important; border-radius: 8px !important; padding: 4px 7px !important; color: #fff !important; cursor: pointer !important; font-size: 11px !important; }
.btn-card-gift { background: #ffffff !important; border: none !important; border-radius: 8px !important; padding: 5px 8px !important; cursor: pointer !important; font-size: 13px !important; }


/* Grande carte de profil utilisateur en haut */
.my-profile-header {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
    border-radius: 16px !important;
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important;
}
.my-profile-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
}
.my-coins-badge {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid #eab308 !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    color: #facc15 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
}

/* Rétablissement des fonctions de clic */
.kikoot-card { user-select: none !important; -webkit-user-select: none !important; }


/* Style grande Card Profil Haut Client3 */
#my-client3-top-card {
    margin: 8px 8px 12px 8px !important;
}
.client3-header-card {
    background: rgba(20, 20, 32, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
}
.c3-top-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.c3-coins-pill {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid #eab308 !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.c3-coins-val {
    color: #facc15 !important;
    font-weight: 800 !important;
    font-size: 14px !important;
}
.c3-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.c3-btn-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 6px 8px !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 13px !important;
}
.c3-user-bar {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.c3-avatar-wrap {
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
}
.c3-avatar-wrap img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #a855f7 !important;
}
.c3-sub-badge {
    position: absolute !important;
    bottom: -2px !important;
    right: -2px !important;
    background: #eab308 !important;
    border-radius: 50% !important;
    padding: 2px !important;
    font-size: 10px !important;
}
.c3-user-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}
.c3-uname {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 16px !important;
}
.c3-role-tag {
    background: #7c3aed !important;
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    align-self: flex-start !important;
}


/* Correction définitive affichage salons */
.rooms-list-sidebar, #salons-list, .salons-list {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}
