/* ============================================
   STYLE.CSS - Simulation de Gestion de Communauté
   Antoine | 04 Juin 2026
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    color: #eaeaea;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* TYPOGRAPHY */
h1 {
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    color: #e94560;
    margin-bottom: 1rem;
}

h3 {
    color: #0f3460;
    margin-bottom: 0.5rem;
}

/* FORMS */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #0f3460;
    border-radius: 5px;
    background-color: #16213e;
    color: #fff;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #e94560;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #e94560;
    color: #fff;
}

.btn-primary:hover {
    background-color: #c73e54;
}

.btn-secondary {
    background-color: #0f3460;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #16213e;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

/* AUTH OVERLAY */
#auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-box {
    background-color: #16213e;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.auth-box h2 {
    margin-bottom: 1.5rem;
}

.auth-box input {
    width: 300px;
}

/* WAITING ROOM */
#welcome-section,
#waiting-room,
#role-assigned {
    background-color: #16213e;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.connected-count {
    font-size: 1.5rem;
    color: #e94560;
    font-weight: bold;
}

/* ROLE SELECTION */
.role-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.role-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    font-size: 1.1rem;
    background-color: #0f3460;
    color: #fff;
    border: 2px solid #e94560;
}

.role-btn:hover:not(:disabled) {
    background-color: #e94560;
}

.role-btn:disabled {
    background-color: #333;
    border-color: #555;
    color: #888;
    cursor: not-allowed;
}

/* BLINKING ANIMATION (Timeout rouge) */
.blinking {
    animation: blink-red 1s infinite;
}

@keyframes blink-red {
    0%, 100% {
        background-color: transparent;
        color: red;
    }
    50% {
        background-color: rgba(255, 0, 0, 0.2);
        color: #ffcccc;
    }
}

/* CHAT INTERFACE */
.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #16213e;
}

.chat-container header {
    background-color: #0f3460;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e94560;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #1a1a2e;
}

.message {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    background-color: #0f3460;
}

.message.spectator {
    border-left: 3px solid #4CAF50;
}

.message.moderator {
    border-left: 3px solid #2196F3;
}

.message strong {
    color: #e94560;
}

.message-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #0f3460;
}

.message-input input {
    flex: 1;
    margin-bottom: 0;
}

/* MISSION PANEL */
.mission-panel {
    background-color: #0f3460;
    padding: 1rem;
    border-top: 2px solid #e94560;
}

.mission-panel button {
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

/* PROJECTION PAGE */
.projection-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    padding: 1rem;
    height: calc(100vh - 80px);
}

.video-section {
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.projection-chat {
    background-color: #16213e;
    border-radius: 10px;
    padding: 1rem;
    overflow-y: auto;
}

/* PAUSE SCREEN OVERLAY */
#pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.pause-content {
    text-align: center;
    color: #fff;
}

.pause-content h1 {
    font-size: 3rem;
    color: #e94560;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-box {
    background-color: #16213e;
    padding: 1.5rem;
    border-radius: 10px;
}

.stat-number {
    font-size: 2.5rem;
    color: #e94560;
    font-weight: bold;
}

/* ADMIN DASHBOARD */
.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.admin-header {
    background-color: #0f3460;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-panel {
    background-color: #16213e;
    padding: 1rem;
    border-radius: 10px;
}

.control-panel h3 {
    color: #e94560;
    margin-bottom: 1rem;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 0.5rem;
}

.control-panel button {
    width: 100%;
    margin-bottom: 0.5rem;
}

.users-list {
    background-color: #16213e;
    padding: 1rem;
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #0f3460;
}

.user-item:last-child {
    border-bottom: none;
}

.user-role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.user-role-badge.spectator {
    background-color: #4CAF50;
    color: #fff;
}

.user-role-badge.moderator {
    background-color: #2196F3;
    color: #fff;
}

.user-role-badge.infiltrated {
    background-color: #9C27B0;
    color: #fff;
}

.mood-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.mood-positive {
    background-color: #4CAF50;
}

.mood-negative {
    background-color: #ff9800;
}

.mood-calme {
    background-color: #9e9e9e;
}

.mood-colerique {
    background-color: #dc3545;
    animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* CONFIG FORM */
.config-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.config-form label {
    display: block;
    margin-bottom: 0.25rem;
    color: #aaa;
}

.config-form input {
    width: 100%;
    margin-bottom: 0;
}

/* LOGS SECTION */
.logs-section {
    background-color: #16213e;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.logs-section pre {
    background-color: #0f3460;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

/* PHASE BADGE */
.phase-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    background-color: #0f3460;
    color: #fff;
}

.phase-badge.waiting {
    background-color: #9e9e9e;
}

.phase-badge.individual {
    background-color: #2196F3;
}

.phase-badge.groups {
    background-color: #9C27B0;
}

.phase-badge.freedom {
    background-color: #FF9800;
}

.phase-badge.paused {
    background-color: #dc3545;
}

/* RAGE MODE INDICATOR */
.rage-mode-active {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #dc3545;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    animation: pulse-red 1s infinite;
    z-index: 100;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .projection-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .role-buttons {
        flex-direction: column;
    }
    
    .auth-box input {
        width: 100%;
    }
}

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

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e94560;
}
