/* Console Reservation System - Styles */

.cr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cr-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
}

.cr-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.cr-login-required p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

/* Grille des consoles */
.cr-consoles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Carte console */
.cr-console-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.cr-console-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Image console */
.cr-console-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cr-console-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cr-no-image {
    font-size: 64px;
    opacity: 0.7;
}

/* Infos console */
.cr-console-info {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cr-console-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    color: #333;
}

.cr-description {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Section réservations */
.cr-reservations {
    padding: 15px 20px;
    background: #f8f9fa;
    flex-grow: 1;
}

.cr-available {
    margin: 0;
    color: #28a745;
    font-weight: 600;
    font-size: 1.1em;
}

.cr-current-reservations h4 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cr-current-reservations ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cr-current-reservations li {
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.cr-current-reservations li:last-child {
    margin-bottom: 0;
}

.cr-my-reservation {
    border-left: 3px solid #007bff;
}

.cr-dates {
    font-weight: 600;
    color: #333;
}

.cr-user {
    color: #666;
    flex-grow: 1;
}

/* Formulaire de réservation */
.cr-booking-form {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cr-form-fields {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cr-form-group {
    margin-bottom: 12px;
}

.cr-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #555;
    font-weight: 500;
}

.cr-form-group input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
}

.cr-form-group input[type="date"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.cr-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Boutons */
.cr-btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.cr-btn-reserve {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.cr-btn-reserve:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.cr-btn-confirm {
    flex: 1;
    background: #28a745;
    color: #fff;
}

.cr-btn-confirm:hover {
    background: #218838;
}

.cr-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.cr-btn-secondary:hover {
    background: #dee2e6;
}

.cr-btn-cancel {
    padding: 6px 12px;
    font-size: 0.8em;
    background: #dc3545;
    color: #fff;
}

.cr-btn-cancel:hover {
    background: #c82333;
}

/* Message de feedback */
.cr-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.cr-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cr-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Loading state */
.cr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .cr-consoles-grid {
        grid-template-columns: 1fr;
    }
    
    .cr-title {
        font-size: 1.5em;
    }
    
    .cr-message {
        left: 20px;
        right: 20px;
    }
}

/* Empty state */
.cr-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1em;
}
