/**
 * Styles CSS pour le calendrier RDV Visio
 */

/* Container principal */
#rdv-calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filtres */
.rdv-calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rdv-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.rdv-filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.rdv-filter-group select,
.rdv-filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Boutons */
.rdv-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.rdv-btn-primary {
    background: #007cba;
    color: white;
}

.rdv-btn-primary:hover {
    background: #005a87;
}

.rdv-book-slot-disabled,
.rdv-book-slot-disabled:hover {
    background: #c0c4c8;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.9;
}

.rdv-btn-secondary {
    background: #6c757d;
    color: white;
}

.rdv-btn-secondary:hover {
    background: #545b62;
}

.rdv-btn-danger {
    background: #dc3545;
    color: white;
}

.rdv-btn-danger:hover {
    background: #c82333;
}

/* Loading */
.rdv-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

/* Grille des créneaux */
.rdv-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rdv-slot-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rdv-slot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.rdv-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.rdv-slot-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.rdv-slot-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.rdv-status-open {
    background: #d4edda;
    color: #155724;
}

.rdv-status-held {
    background: #fff3cd;
    color: #856404;
}

.rdv-status-closed {
    background: #f8d7da;
    color: #721c24;
}

.rdv-slot-details p {
    margin: 8px 0;
    color: #666;
}

.rdv-slot-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.rdv-slot-unavailable {
    color: #999;
    font-style: italic;
    margin-left: 10px;
}

/* Modal */
.rdv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rdv-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.rdv-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.rdv-modal-close:hover {
    color: #333;
}

.rdv-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Messages */
.rdv-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 600;
}

.rdv-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rdv-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mes rendez-vous */
#rdv-my-appointments {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.rdv-appointments-list {
    margin-top: 20px;
}

.rdv-appointment-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rdv-appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.rdv-appointment-header h4 {
    margin: 0;
    color: #333;
}

.rdv-appointment-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.rdv-status-pending {
    background: #fff3cd;
    color: #856404;
}

.rdv-status-awaiting_payment {
    background: #cce5ff;
    color: #004085;
}

.rdv-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.rdv-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.rdv-status-refunded {
    background: #e2e3e5;
    color: #383d41;
}

.rdv-status-done {
    background: #d1ecf1;
    color: #0c5460;
}

.rdv-appointment-details p {
    margin: 8px 0;
    color: #666;
}

.rdv-join-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.rdv-join-link:hover {
    text-decoration: underline;
}

.rdv-appointment-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .rdv-calendar-filters {
        flex-direction: column;
    }
    
    .rdv-filter-group {
        min-width: 100%;
    }
    
    .rdv-slots-grid {
        grid-template-columns: 1fr;
    }
    
    .rdv-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .rdv-modal-actions {
        flex-direction: column;
    }
    
    .rdv-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Animations */
.rdv-slot-item {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* États de chargement */
.rdv-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
