/* ==========================================
   SYSTÈME DE RENDEZ-VOUS - 6 ÉTAPES
   Polyclinique St Philippe
   ========================================== */

/* Container principal */
.rdv-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Barre de progression */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    z-index: -1;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 3px;
    background: #0A9C38;
    transition: width 0.4s ease;
    z-index: -1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    z-index: 1;
}

.progress-step.active .step-circle {
    border-color: #0A9C38;
    color: #0A9C38;
    transform: scale(1.1);
}

.progress-step.completed .step-circle {
    background: #0A9C38;
    border-color: #0A9C38;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #0A9C38;
    font-weight: 600;
}

/* Sections d'étapes */
.step-content {
    display: none;
    animation: fadeInStep 0.4s ease;
}

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

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 32px;
}

.step-header h2 {
    color: #2C3E50;
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.step-header p {
    color: #6c757d;
    font-size: 1rem;
}

/* Étape 1: Services */
.service-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.service-option:hover {
    border-color: #0A9C38;
    box-shadow: 0 4px 12px rgba(10, 156, 56, 0.15);
    transform: translateY(-4px);
}

.service-option.selected {
    border-color: #0A9C38;
    background: rgba(10, 156, 56, 0.05);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(227, 0, 27, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #E3001B;
}

.service-option.selected .service-icon {
    background: rgba(10, 156, 56, 0.1);
    color: #0A9C38;
}

.service-option h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: #2C3E50;
}

.service-option p {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* Étape 2: Médecins */
.doctor-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.doctor-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.doctor-card:hover {
    border-color: #0A9C38;
    box-shadow: 0 4px 12px rgba(10, 156, 56, 0.15);
    transform: translateY(-4px);
}

.doctor-card.selected {
    border-color: #0A9C38;
    background: rgba(10, 156, 56, 0.02);
}

.doctor-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.doctor-info {
    padding: 20px;
    text-align: center;
}

.doctor-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 4px;
}

.doctor-specialty {
    color: #E3001B;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.doctor-languages {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Étape 3: Calendrier */
.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.calendar-header h3 {
    font-size: 1.25rem;
    color: #2C3E50;
    margin: 0;
}

.calendar-nav {
    display: flex;
    gap: 12px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav button:hover:not(:disabled) {
    background: #0A9C38;
    color: white;
    border-color: #0A9C38;
}

.calendar-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    padding: 8px;
}

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

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2C3E50;
    transition: all 0.2s;
    background: white;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    border-color: #0A9C38;
    background: rgba(10, 156, 56, 0.05);
}

.calendar-day.selected {
    background: #0A9C38;
    color: white;
    border-color: #0A9C38;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.other-month {
    color: #adb5bd;
    opacity: 0.5;
}

.calendar-day.today {
    border-color: #E3001B;
    font-weight: 600;
}

/* Étape 4: Créneaux horaires */
.time-slots-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.time-period {
    margin-bottom: 32px;
}

.time-period:last-child {
    margin-bottom: 0;
}

.time-period h3 {
    font-size: 1.125rem;
    color: #2C3E50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-period h3 i {
    color: #E3001B;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    background: white;
}

.time-slot:hover:not(.disabled) {
    border-color: #0A9C38;
    background: rgba(10, 156, 56, 0.05);
}

.time-slot.selected {
    background: #0A9C38;
    color: white;
    border-color: #0A9C38;
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Étape 5: Formulaire patient */
.patient-form {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    color: #2C3E50;
}

.form-label.required::after {
    content: ' *';
    color: #E3001B;
}

.form-control {
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0A9C38;
    box-shadow: 0 0 0 3px rgba(10, 156, 56, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Étape 6: Confirmation */
.confirmation-container {
    text-align: center;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(10, 156, 56, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #0A9C38;
}

.confirmation-container h2 {
    color: #0A9C38;
    margin-bottom: 16px;
}

.confirmation-summary {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width: 600px;
    margin: 0 auto 32px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: #6c757d;
}

.summary-value {
    color: #2C3E50;
    text-align: right;
}

/* Boutons de navigation */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: 16px;
}

.btn-prev,
.btn-next {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-prev {
    background: white;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.btn-prev:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-next {
    background: #0A9C38;
    color: white;
    flex: 1;
}

.btn-next:hover:not(:disabled) {
    background: #088530;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 156, 56, 0.3);
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-home {
    background: #E3001B;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-home:hover {
    background: #c50017;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 0, 27, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .rdv-container {
        padding: 24px 16px;
    }
    
    .progress-bar {
        margin-bottom: 32px;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .service-selection,
    .doctor-selection {
        grid-template-columns: 1fr;
    }
    
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .btn-prev,
    .btn-next,
    .btn-home {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar-days {
        gap: 4px;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
