/* Calendar View Styles */

.cbs-calendar-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.cbs-calendar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.cbs-calendar-header h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

/* Légende */
.cbs-legend {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.cbs-legend h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #2c3e50;
}

.cbs-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cbs-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cbs-dot {
    font-size: 20px;
    line-height: 1;
}

.cbs-dot-green {
    color: #27ae60;
}

.cbs-dot-yellow {
    color: #f1c40f;
}

.cbs-dot-orange {
    color: #e67e22;
}

.cbs-dot-red {
    color: #e74c3c;
}

.cbs-dot-blocked {
    color: #95a5a6;
}

/* Contrôles du calendrier */
.cbs-calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cbs-month-title {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.cbs-btn-nav {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.cbs-btn-nav:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Grille du calendrier */
.cbs-calendar-grid {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.cbs-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
}

.cbs-day-header {
    background: #34495e;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.cbs-calendar-day {
    background: white;
    min-height: 100px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.cbs-calendar-day:hover:not(.cbs-day-past):not(.cbs-day-empty) {
    background: #f0f6fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cbs-day-empty {
    background: #f8f9fa;
    cursor: default;
}

.cbs-day-past {
    background: #f8f9fa;
    opacity: 0.5;
    cursor: not-allowed;
}

.cbs-day-past:hover {
    transform: none;
    box-shadow: none;
}

.cbs-day-today {
    border: 3px solid #3498db;
}

.cbs-day-blocked {
    background: #fef5e7;
}

.cbs-day-number {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.cbs-availability-indicator {
    text-align: center;
    margin-top: 5px;
}

.cbs-loading-dot {
    color: #bdc3c7;
    animation: pulse 1.5s infinite;
}

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

/* Modal */
.cbs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cbs-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cbs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.cbs-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 22px;
}

.cbs-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: color 0.3s;
}

.cbs-modal-close:hover {
    color: #e74c3c;
}

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

.cbs-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cbs-alert-success {
    background: #d4edda;
    border-left: 4px solid #27ae60;
    color: #155724;
}

.cbs-alert-warning {
    background: #fff3cd;
    border-left: 4px solid #f1c40f;
    color: #856404;
}

.cbs-alert-error {
    background: #f8d7da;
    border-left: 4px solid #e74c3c;
    color: #721c24;
}

.cbs-alert-info {
    background: #d1ecf1;
    border-left: 4px solid #3498db;
    color: #0c5460;
}

.cbs-alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

/* Grille des fauteuils dans le modal */
.cbs-chairs-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.cbs-chair-card-modal {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.cbs-chair-card-modal:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.cbs-chair-card-modal h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

.cbs-chair-card-modal p {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0 0 15px 0;
}

.cbs-btn-select-chair {
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.cbs-btn-select-chair:hover {
    background: #2980b9;
}

/* Formulaire dans le modal */
.cbs-modal-body .cbs-form-group {
    margin-bottom: 20px;
}

.cbs-modal-body .cbs-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.cbs-modal-body .cbs-form-group input,
.cbs-modal-body .cbs-form-group select,
.cbs-modal-body .cbs-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.cbs-modal-body .cbs-form-group input:focus,
.cbs-modal-body .cbs-form-group select:focus,
.cbs-modal-body .cbs-form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.cbs-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px;
}

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

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

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

/* Message de succès */
.cbs-success-message {
    text-align: center;
    padding: 40px 20px;
}

.cbs-success-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    font-size: 48px;
    margin: 0 auto 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .cbs-calendar-wrapper {
        padding: 15px;
        margin: 20px 10px;
    }

    .cbs-legend-items {
        flex-direction: column;
        gap: 10px;
    }

    .cbs-calendar-controls {
        flex-direction: column;
        gap: 15px;
    }

    .cbs-calendar-day {
        min-height: 70px;
        padding: 5px;
    }

    .cbs-day-number {
        font-size: 14px;
    }

    .cbs-dot {
        font-size: 16px;
    }

    .cbs-chairs-grid-modal {
        grid-template-columns: 1fr;
    }

    .cbs-modal-actions {
        flex-direction: column;
    }

    .cbs-modal-body {
        padding: 20px;
    }
}
