/* ===== WATCH PARTY (SOIRÉE ENTRE AMIS) ===== */

.party-widget {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%); /* ✅ Centré verticalement */
    width: 450px;
    max-height: 85vh; /* ✅ Hauteur maximale augmentée */
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(26, 26, 26, 0.98));
    backdrop-filter: blur(20px);
    border: 3px solid var(--gold);
    border-radius: 25px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(212, 175, 55, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.party-widget.active {
    opacity: 1;
}

.party-widget.active {
    left: 30px;
}

.party-widget.minimized {
    display: none;
}

.party-widget.minimized .party-body {
    display: none;
}

.party-widget.minimized .party-header {
    flex-direction: column;
    justify-content: center;
    padding: 15px;
}

.party-widget.minimized .party-title-section {
    display: none;
}

.party-widget.minimized .party-icon {
    font-size: 32px;
    margin: 0;
}

/* Header */
.party-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    padding: 20px;
    border-radius: 18px 18px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.party-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.party-title-section {
    flex: 1;
}

.party-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.party-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: white;
    line-height: 1.3;
}

.party-close {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.party-close:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

/* Body */
.party-body {
    padding: 20px;
}

/* Code section */
.party-code-section {
    background: rgba(255, 107, 107, 0.1);
    border: 2px dashed #ff6b6b;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.party-code-label {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 600;
}

.party-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.party-code {
    font-size: 28px;
    font-weight: 900;
    color: #ff6b6b;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
}

.party-code-copy {
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.party-code-copy:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

/* Participants */
.party-participants-section {
    margin-bottom: 20px;
}

.party-participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

.party-invite-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.party-invite-btn:hover {
    background: #ff6b6b;
    color: white;
}

.party-participants-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.party-participants-list::-webkit-scrollbar {
    width: 6px;
}

.party-participants-list::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 3px;
}

.party-participant {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.party-participant.current-user {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

.party-participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.party-participant-info {
    flex: 1;
}

.party-participant-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.party-host-badge,
.party-you-badge {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.party-you-badge {
    background: var(--gold);
    color: var(--primary-black);
}

.party-no-participants {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
    font-size: 14px;
}

/* Actions */
.party-actions {
    display: flex;
    gap: 10px;
}

.party-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.party-btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.party-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.party-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    color: var(--text-white);
}

.party-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ff6b6b;
}

.party-btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #ef4444;
}

.party-btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* Modal */
.party-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.party-modal-overlay.active {
    opacity: 1;
}

.party-modal {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(26, 26, 26, 0.95));
    border: 2px solid #ff6b6b;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.party-modal-overlay.active .party-modal {
    transform: scale(1);
}

.party-modal-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    padding: 25px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.party-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: white;
}

.party-modal-header button {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.party-modal-header button:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: rotate(90deg);
}

.party-modal-body {
    padding: 30px;
}

.party-form-group {
    margin-bottom: 20px;
}

.party-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
}

.party-form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 14px;
}

.party-form-group input:focus {
    outline: none;
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .party-widget {
        bottom: 160px;
        left: -100%;
        width: calc(100vw - 40px);
    }

    .party-widget.active {
        left: 20px;
    }

    .party-widget.minimized {
        width: 70px;
        height: 70px;
        left: 20px;
    }

    .party-modal {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .party-widget {
        position: fixed;
        top: auto;
        bottom: 80px; /* ✅ Au-dessus de la bottom nav */
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-height: 70vh;
        transform: none;
    }
}

@media (max-width: 480px) {
    .party-widget {
        bottom: 140px;
        width: calc(100vw - 20px);
    }

    .party-code {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .party-actions {
        flex-direction: column;
    }
}

/* ===== ONGLETS CHAT ===== */
.party-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 5px;
}

.party-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.party-tab.active {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.party-chat-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
}

.party-chat-badge:not(:empty) {
    display: block;
}

/* ===== CHAT DE SOIRÉE ===== */
.party-tab-content {
    display: none;
}

.party-tab-content.active {
    display: block;
}

.party-chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.party-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.party-chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlideIn 0.3s ease;
}

.party-chat-message.own {
    flex-direction: row-reverse;
}

.party-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.party-chat-content {
    flex: 1;
    max-width: 70%;
}

.party-chat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.party-chat-name {
    font-size: 12px;
    font-weight: 700;
    color: #ff6b6b;
}

.party-chat-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.party-chat-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    word-wrap: break-word;
}

.party-chat-message.own .party-chat-text {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
}

.party-chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid rgba(255, 107, 107, 0.2);
}

.party-chat-input input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 13px;
}

.party-chat-input button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.party-chat-input button:hover {
    transform: scale(1.1);
}

/* ===== RÉACTIONS FLOTTANTES ===== */
.party-reactions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.party-reaction-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.party-reaction-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.2);
}

@keyframes floatUp {
    0% {
        bottom: 0;
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        bottom: 200px;
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

.reaction-user-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* ===== HISTORIQUE ===== */
.party-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.party-history-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.party-history-item:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

.party-history-icon {
    font-size: 36px;
}

.party-history-info {
    flex: 1;
}

.party-history-name {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.party-history-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== STATISTIQUES ===== */
.party-stats-section {
    background: rgba(255, 107, 107, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.party-stats-section h4,
.party-stats-section h5 {
    margin: 0 0 10px 0;
    color: #ff6b6b;
    font-size: 14px;
}

.party-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 107, 107, 0.1);
}

.party-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.party-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #ff6b6b;
}

.party-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.party-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.leaderboard-rank {
    font-size: 20px;
}

.leaderboard-name {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.leaderboard-time {
    font-size: 12px;
    font-weight: 700;
    color: #ff6b6b;
}

/* ===== DATE PLANIFIÉE ===== */

.party-scheduled-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.party-info-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.party-info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.party-info-content {
    flex: 1;
}

.party-info-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 700;
}

.party-info-value {
    font-size: 14px;
    color: var(--gold);
    font-weight: 700;
}

/* Style pour le datetime-local input */
.party-form-group input[type="datetime-local"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.party-form-group input[type="datetime-local"]:focus {
    outline: none;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.party-form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Actions header */
.party-header-actions {
    display: flex;
    gap: 8px;
}

.party-minimize,
.party-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    color: var(--gold);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.party-minimize:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    transform: scale(1.1);
}

.party-close-btn {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.party-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

@media (max-width: 768px) {
    .party-minimize,
    .party-close-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .party-header-actions {
        gap: 6px;
    }
}

.party-widget::-webkit-scrollbar {
    width: 8px;
}

.party-widget::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.party-widget::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--dark-gold));
    border-radius: 10px;
}

.party-widget::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}



