* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.office-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    position: relative;
}

.office-title {
    text-align: center;
    color: #333;
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: 300;
}

.office-layout {
    position: relative;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 40px;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Table centrale */
.table {
    width: 300px;
    height: 200px;
    background: linear-gradient(135deg, #8B4513, #D2B48C);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
    border: 3px solid #654321;
}

.table::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 15px;
}

/* Positions des sièges */
.seat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.seat-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.8em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.seat-indicator.occupied {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse 2s infinite;
}

.seat-indicator.free {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.seat-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4), 0 0 0 10px rgba(231, 76, 60, 0.1); }
    100% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
}

.seat-name {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    min-width: 80px;
    text-align: center;
}

/* Positionnement des sièges autour de la table */
.seat-1 { /* Boris - en haut */
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-2 { /* Samuel - à droite */
    top: 50%;
    right: -80px;
    transform: translateY(-50%);
}

.seat-3 { /* Nicolas - en bas */
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-4 { /* Cédric - à gauche */
    top: 50%;
    left: -80px;
    transform: translateY(-50%);
}

.status-info {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.last-update {
    background: rgba(102, 126, 234, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 10px;
}

.connection-status {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
}

.connection-status.connected {
    background: #d4edda;
    color: #155724;
}

.connection-status.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

/* Modal pour les statistiques */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 900px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.8em;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.stats-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.stats-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #333;
}

.history-section {
    grid-column: span 2;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.history-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.history-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-occupied {
    background: #fee;
    color: #c53030;
}

.status-free {
    background: #f0fff4;
    color: #38a169;
}

.daily-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}

.daily-stats-table th,
.daily-stats-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.daily-stats-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .office-container {
        padding: 20px;
    }
    
    .office-title {
        font-size: 2em;
    }
    
    .table {
        width: 250px;
        height: 150px;
    }
    
    .seat-indicator {
        width: 50px;
        height: 50px;
        font-size: 0.7em;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .modal {
        width: 95%;
        padding: 20px;
    }
}