/* assets/room-booking.css */

.room-booking-system {
    max-width: 1400px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contrôles de données */
.data-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Boutons */
.btn-secondary, .btn-primary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    width: 100%;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-secondary:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
    color: white;
    text-decoration: none;
}

/* Système d'onglets */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.tab.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.tab:hover:not(.active) {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.tab-content {
    display: none;
}

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

/* Dashboard */
.dashboard-view {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 30px;
}

.booking-form, .visualization-panel {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.booking-form h2, .visualization-panel h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.visualization-panel h2 {
    border-bottom-color: #e74c3c;
}

/* Formulaire */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Stats et cartes */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cartes de salles */
.room-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-bottom: 20px;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.room-card.occupied {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-color: #e74c3c;
}

.room-card.available {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border-color: #27ae60;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.room-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
}

.room-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #27ae60;
    color: white;
}

.status-occupied {
    background: #e74c3c;
    color: white;
}

.room-details {
    color: #7f8c8d;
    line-height: 1.6;
}

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

.current-booking {
    background: rgba(52, 152, 219, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid #3498db;
}

/* Timeline */
.timeline {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.timeline h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.timeline-items {
    max-height: 300px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.booking-info {
    flex: 1;
}

.booking-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.booking-details {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Alertes */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #27ae60;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #e74c3c;
}

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

/* Calendrier */
.calendar-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 30px;
}

.calendar-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-view {
        grid-template-columns: 1fr;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tabs {
        flex-direction: column;
    }

    .data-controls {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Intégration WordPress */
.room-booking-system .wp-core-ui .button,
.room-booking-system .wp-core-ui .button-primary {
    height: auto;
    line-height: normal;
}

.room-booking-system * {
    box-sizing: border-box;
}

.room-booking-system h1,
.room-booking-system h2,
.room-booking-system h3 {
    line-height: 1.2;
}