/**
 * CSS pour l'interface publique du plugin Mes Rendez-Vous V2
 * Wizard de prise de rendez-vous - Interface V1 conservée
 */

/* ===== CONTENEUR PRINCIPAL ===== */
.mrv-v2-booking-wizard {
    max-width: 1400px;
    width: 98%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

.mrv-v2-form-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mrv-v2-form-section h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

/* Service Selection */
.mrv-v2-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.mrv-v2-service-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    font-size: 13px;
}

.mrv-v2-service-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.mrv-v2-service-option.selected {
    border-color: #3498db;
    background: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Style pour les cartes de service sélectionnées */
.mrv-v2-service-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.mrv-v2-service-card:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.mrv-v2-service-card.selected {
    border-color: #3498db;
    background: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.mrv-v2-service-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 8px;
}

.mrv-v2-service-details {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Date Time Selection */
.mrv-v2-datetime-section {
    display: none;
}

.mrv-v2-datetime-section.active {
    display: block;
}

/* Étape 2: Layout vertical - datepicker au-dessus des créneaux */
.step-2 .mrv-v2-form-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.mrv-v2-calendar-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
}

.mrv-v2-slots-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    max-height: 450px;
    overflow-y: auto;
    font-size: 13px;
}

.mrv-v2-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mrv-v2-btn {
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #2c3e50;
}

.mrv-v2-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.mrv-v2-btn.selected {
    border-color: #3498db;
    background: #3498db;
    color: #fff;
}

.mrv-v2-btn:disabled {
    background: #f5f5f5;
    color: #bdc3c7;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

/* Form Fields */
.mrv-v2-form-group {
    margin-bottom: 16px;
}

/* Form Grid Layout */
.mrv-v2-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: start;
}

.mrv-v2-form-group.mrv-v2-form-small {
    grid-column: span 1;
    min-width: 120px;
}

.mrv-v2-form-group.mrv-v2-form-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .mrv-v2-form-grid {
        grid-template-columns: 1fr;
    }
    
    .mrv-v2-form-group.mrv-v2-form-small {
        grid-column: 1;
    }
}

.mrv-v2-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
}

.mrv-v2-form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.mrv-v2-form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.mrv-v2-form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Payment Section */
.mrv-v2-payment-section {
    border: 2px solid #f39c12;
    border-radius: 8px;
    background: #fef9e7;
    padding: 20px;
    margin: 20px 0;
}

.mrv-v2-payment-section h3 {
    color: #e67e22;
    margin: 0 0 16px 0;
}

.mrv-v2-gift-card-section {
    border: 1px solid #27ae60;
    border-radius: 6px;
    background: #eafaf1;
    padding: 16px;
    margin: 16px 0;
}

/* Buttons */
.mrv-v2-primary-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
    display: block;
}

.mrv-v2-primary-btn:hover {
    background: #2980b9;
}

.mrv-v2-primary-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.mrv-v2-secondary-btn {
    background: #95a5a6;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mrv-v2-secondary-btn:hover {
    background: #7f8c8d;
}

/* Loading States */
.mrv-v2-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mrv-v2-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: mrv-v2-spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mrv-v2-appointment-form {
        padding: 16px;
    }
    
    .mrv-v2-form-section {
        padding: 16px;
    }
    
    .mrv-v2-services-grid {
        grid-template-columns: 1fr;
    }
    
    .mrv-v2-buttons-group {
        gap: 6px;
    }
    
    .mrv-v2-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* Accessibility */
.mrv-v2-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Error States */
.mrv-v2-error {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 4px;
}

.mrv-v2-error.blocked-patient {
    color: #c0392b;
    font-weight: 600;
    background: #ffebee;
    padding: 8px;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

.mrv-v2-form-input.error {
    border-color: #e74c3c;
}

/* Success States */
.mrv-v2-success {
    color: #27ae60;
    font-size: 0.9em;
    margin-top: 4px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens - maintain full width */
@media (max-width: 1400px) {
    .mrv-v2-booking-wizard {
        width: 98%;
    }
}

/* Tablettes */
@media (max-width: 1200px) {
    .mrv-v2-booking-wizard {
        max-width: 95%;
        padding: 15px;
    }
    
    .step-2 .mrv-v2-form-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mrv-v2-services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .mrv-v2-booking-wizard {
        margin: 10px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .step-2 .mrv-v2-form-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mrv-v2-services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mrv-v2-calendar-container,
    .mrv-v2-slots-container {
        padding: 15px;
    }
}

.mrv-v2-notification {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.mrv-v2-notification.success {
    background: #d5f4e6;
    border: 1px solid #27ae60;
    color: #1e8449;
}

.mrv-v2-notification.error {
    background: #fadbd8;
    border: 1px solid #e74c3c;
    color: #c0392b;
}

.mrv-v2-notification.warning {
    background: #fef9e7;
    border: 1px solid #f39c12;
    color: #b7950b;
}

/* ===== CALENDRIER ===== */
.mrv-v2-calendar-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
}

.mrv-v2-calendar-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

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

.mrv-v2-cal-nav {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.mrv-v2-cal-nav:hover {
    background: #2980b9;
}

#mrv-v2-cal-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.mrv-v2-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.mrv-v2-calendar-day-header {
    background: #3498db;
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
}

.mrv-v2-calendar-day {
    background: white;
    border: 1px solid #f0f0f0;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mrv-v2-calendar-day:hover:not(.disabled) {
    background: #e3f2fd;
    border-color: #3498db;
}

.mrv-v2-calendar-day.disabled {
    background: #f8f9fa;
    color: #bdc3c7;
    cursor: not-allowed;
}

.mrv-v2-calendar-day.today {
    background: #fff0f5!important;
    border-color: #e91e63!important;
    font-weight: 600;
}

.mrv-v2-calendar-day.selected {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.mrv-v2-calendar-day.has-slots {
    background: #d5f4e6;
    border-color: #27ae60;
}

.mrv-v2-calendar-day.has-slots:hover {
    background: #a9dfbf;
}

.mrv-v2-calendar-day.other-month {
    color: #bdc3c7;
    background: #f8f9fa;
}

/* ===== CRÉNEAUX HORAIRES ===== */
.mrv-v2-slots-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.mrv-v2-times-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.mrv-v2-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.mrv-v2-time-slot {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.mrv-v2-time-slot:hover {
    background: #e3f2fd;
    border-color: #3498db;
}

.mrv-v2-time-slot.selected {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.mrv-v2-no-selection {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 20px;
}

.mrv-v2-loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.mrv-v2-error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: #fadbd8;
    border-radius: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .mrv-v2-booking-wizard {
        width: 98%;
    }
    
    .step-2 .mrv-v2-form-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mrv-v2-calendar-day {
        padding: 8px 4px;
        font-size: 12px;
        min-height: 35px;
    }
    
    .mrv-v2-time-slots {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
}

/* ===== SECTION NEWSLETTER ===== */
.mrv-v2-newsletter-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 1px solid #d4e6ff;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
}

.mrv-v2-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
    gap: 12px;
}

.mrv-v2-checkbox-label input[type="checkbox"] {
    display: none;
}

.mrv-v2-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.mrv-v2-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mrv-v2-checkbox-label input[type="checkbox"]:checked + .mrv-v2-checkbox-custom {
    background: #3498db;
    border-color: #3498db;
}

.mrv-v2-checkbox-label input[type="checkbox"]:checked + .mrv-v2-checkbox-custom::after {
    opacity: 1;
}

.mrv-v2-newsletter-text {
    font-size: 14px;
    line-height: 1.4;
    color: #2c3e50;
    font-weight: 500;
}

.mrv-v2-newsletter-info {
    margin-top: 8px;
    padding-left: 32px;
}

.mrv-v2-newsletter-info small {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.3;
    display: block;
}

/* Hover effects */
.mrv-v2-checkbox-label:hover .mrv-v2-checkbox-custom {
    border-color: #2980b9;
    transform: scale(1.05);
}

.mrv-v2-checkbox-label:hover .mrv-v2-newsletter-text {
    color: #2980b9;
}

@media (max-width: 480px) {
    .mrv-v2-booking-wizard {
        max-width: 95%;
        padding: 15px;
    }
    
    .mrv-v2-calendar-day {
        padding: 6px 3px;
        font-size: 11px;
        min-height: 30px;
    }

    .mrv-v2-newsletter-section {
        padding: 12px;
    }

    .mrv-v2-checkbox-label {
        gap: 10px;
    }

    .mrv-v2-newsletter-info {
        padding-left: 30px;
    }
}

/* ===== SECTION CARTE CADEAU ===== */
.mrv-v2-giftcard-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.mrv-v2-giftcard-section h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.mrv-v2-giftcard-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.mrv-v2-giftcard-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mrv-v2-giftcard-form {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
}

.mrv-v2-giftcard-form .mrv-v2-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.mrv-v2-giftcard-form .mrv-v2-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.mrv-v2-giftcard-form .mrv-v2-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.mrv-v2-giftcard-form .mrv-v2-form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.mrv-v2-giftcard-status {
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.mrv-v2-giftcard-status .giftcard-valid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mrv-v2-giftcard-status .giftcard-invalid {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mrv-v2-giftcard-status .status-icon {
    margin-right: 8px;
}

#confirm-giftcard-booking {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

#confirm-giftcard-booking:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

#confirm-giftcard-booking:disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Responsive pour les cartes cadeaux */
@media (max-width: 768px) {
    .mrv-v2-giftcard-form .mrv-v2-form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mrv-v2-giftcard-section {
        padding: 15px;
    }
}

/* ===== QUESTIONNAIRE MTC - CHECKBOXES MULTIPLES ===== */
.mrv-question {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

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

.mrv-question .required {
    color: #e74c3c;
    font-weight: bold;
}

.mrv-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.mrv-checkbox-group.error,
.mrv-radio-group.error {
    border: 2px solid #d9534f !important;
    background: #fff5f5;
}

.mrv-checkbox-item {
    display: flex;
    align-items: center;
}

.mrv-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    margin: 0;
    font-weight: normal;
    transition: background 0.2s ease;
    border-radius: 4px;
    width: 100%;
}

.mrv-checkbox-item label:hover {
    background: #f0f0f0;
}

.mrv-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    cursor: pointer;
    accent-color: #3498db;
}

/* Radio buttons - même style que les checkboxes */
.mrv-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.mrv-radio-item {
    display: flex;
    align-items: center;
}

.mrv-radio-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    margin: 0;
    font-weight: normal;
    transition: background 0.2s ease;
    border-radius: 4px;
    width: 100%;
}

.mrv-radio-item label:hover {
    background: #f0f0f0;
}

.mrv-radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    cursor: pointer;
    accent-color: #3498db;
}

.mrv-section {
    margin-bottom: 30px;
}

.mrv-section-title {
    background:  #e6762c;
    color: #050200!important;
    padding: 12px 20px;
    margin: 20px 0 15px 0;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(230, 118, 44, 0.3);
}

.mrv-question textarea,
.mrv-question input[type="text"],
.mrv-question input[type="date"],
.mrv-question input[type="number"],
.mrv-question select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.mrv-question .error {
    border-color: #d9534f !important;
}

/* Responsive pour le questionnaire */
@media (max-width: 768px) {
    .mrv-checkbox-item label,
    .mrv-radio-item label {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .mrv-question {
        padding: 12px;
    }
}
