/**
 * Styles pour le modal de test de plateforme - Style Calendly Moderne
 */

/* Modal compact */
.calendly-modern {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Hauteur fixe pour le modal */
.calendly-modern .modal-dialog {
    min-height: 600px;
    max-height: 80vh;
}

.calendly-modern .modal-body {
    min-height: 520px;
    max-height: 520px;
    overflow: hidden;
}

/* Conteneur de hauteur fixe pour les étapes */
.step-container {
    height: 520px;
    overflow-y: auto;
    padding: 24px;
}

.calendly-two-column {
    height: 520px;
}

.calendar-column,
.slots-column {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.slots-content {
    overflow-y: auto;
    max-height: 380px;
}

.enfants-list {
    max-height: 320px;
    overflow-y: auto;
}

.confirmation-container {
    height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-container {
    height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.calendly-modern .modal-header {
    background: linear-gradient(135deg, #0093dd 0%, #0077b3 100%);
    border-bottom: none;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(0, 147, 221, 0.15);
    position: relative;
}

.calendly-modern .modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendly-modern .modal-title::before {
    content: "🎓";
    font-size: 1.5rem;
}

.calendly-modern .modal-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 56ch;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 10px;
    line-height: 1.35;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.calendly-modern .modal-subtitle::before {
    content: "✨";
    font-size: 1rem;
    line-height: 1;
    opacity: 0.95;
}

.calendly-modern .btn-close {
    opacity: 0.9;
    filter: brightness(0) invert(1);
    background-size: 1.2em;
}

.calendly-modern .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Layout 2 colonnes */
.calendly-two-column {
    display: flex;
    min-height: 480px;
}

/* Colonne calendrier (gauche) */
.calendar-column {
    flex: 0 0 320px;
    padding: 24px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
}

/* Header du calendrier */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header .nav-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.calendar-header .nav-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.calendar-header .nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.current-month {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

/* Grille du calendrier */
.calendar-grid {
    background: transparent;
    padding: 0;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    padding: 4px 0;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background: white;
    border: 1px solid transparent;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.past {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.calendar-day.available {
    background: white;
    border-color: #e5e7eb;
}

.calendar-day.available:hover {
    border-color: #0093dd;
    background-color: #eff6ff;
}

.calendar-day.selected {
    background-color: #0093dd !important;
    border-color: #0093dd !important;
    box-shadow: 0 4px 12px rgba(0, 147, 221, 0.4) !important;
    transform: scale(1.05) !important;
}

.calendar-day.selected .day-number {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.calendar-day.selected .availability-dot {
    background-color: #ffffff !important;
}

.calendar-day.today {
    border-color: #0093dd;
    background-color: #dbeafe;
}

.day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.availability-dot {
    width: 4px;
    height: 4px;
    background-color: #0093dd;
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
}

.availability-dot {
    display: none;
}

/* Colonne créneaux (droite) */
.slots-column {
    flex: 1;
    padding: 24px;
    background: white;
    display: flex;
    flex-direction: column;
}

/* Placeholder */
.slots-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
}

.slots-placeholder i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.slots-placeholder p {
    font-size: 0.95rem;
    margin: 0;
}

/* Liste des créneaux */
.time-slots-list {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.slots-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.slots-header h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    text-transform: capitalize;
}

.slots-content {
    flex: 1;
    overflow-y: hidden;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

/* Créneau compact */
.time-slot-compact {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.time-slot-compact:hover {
    border-color: #0093dd;
    background-color: #eff6ff;
    transform: none;
}

 .test-confirm-modal .modal-header {
     display: flex;
     align-items: center;
 }
 
 .test-confirm-modal .modal-title {
     flex: 1;
     width: 100%;
     margin: 0;
     font-size: 1.05rem;
     font-weight: 700;
     color: #111827;
     text-shadow: none;
     display: block;
     white-space: normal;
     overflow: visible;
 }

 .test-confirm-modal .modal-title::before {
     content: none;
 }

.slot-time {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.slot-places {
    font-size: 0.8rem;
    color: #059669;
    font-weight: 500;
}

.no-slots {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Étapes (enfants, confirmation) */
.step-container {
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.step-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.back-btn {
    background: none;
    border: none;
    color: #0093dd;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.back-btn:hover {
    background-color: #eff6ff;
}

/* Résumé de réservation */
.booking-summary {
    background: linear-gradient(135deg, rgba(0, 147, 221, 0.1), rgba(0, 147, 221, 0.05));
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-item i {
    font-size: 1.5rem;
    color: #0093dd;
    width: 30px;
    text-align: center;
}

.summary-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 3px;
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Liste des enfants - Style Calendly */
.enfants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.enfant-card-calendly {
    display: flex;
    align-items: center;
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.enfant-card-calendly:hover {
    border-color: #0093dd;
    background-color: rgba(0, 147, 221, 0.05);
    transform: translateX(5px);
}

.enfant-card-calendly.active {
    border-color: #0093dd;
    background-color: rgba(0, 147, 221, 0.1);
    box-shadow: 0 4px 12px rgba(0, 147, 221, 0.2);
}

.enfant-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0093dd, #0077b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.enfant-info {
    flex: 1;
}

.enfant-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    font-size: 1rem;
}

.enfant-class {
    font-size: 0.85rem;
    color: #666;
}

.enfant-check {
    color: #0093dd;
    font-size: 1.5rem;
    visibility: hidden;
}

.enfant-card-calendly.active .enfant-check {
    visibility: visible;
}

/* Confirmation */
.confirmation-container {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease;
}

.confirmation-icon i {
    font-size: 2.5rem;
    color: white;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.confirmation-container h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.confirmation-container p {
    color: #666;
    margin-bottom: 25px;
}

.confirmation-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    display: inline-block;
    text-align: left;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    color: #0093dd;
    width: 20px;
    text-align: center;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
}

.loading-container p {
    color: #666;
    font-size: 1rem;
}

/* Footer du modal */
.calendly-modern .modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 16px 24px;
    background: #f9fafb;
}

.calendly-modern .modal-footer .btn-link {
    text-decoration: none;
    font-size: 0.85rem;
    color: #6b7280;
}

.calendly-modern .modal-footer .btn-link:hover {
    color: #111827;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .calendly-modern .modal-dialog {
        min-height: auto;
        max-height: 95vh;
        margin: 0.5rem;
    }

    .calendly-modern .modal-body {
        min-height: auto;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Réduction de l'en-tête sur mobile */
    .calendly-modern .modal-header {
        padding: 12px 16px;
    }

    .calendly-two-column {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .calendar-column {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 12px;
        overflow: visible;
    }

    .calendar-header {
        margin-bottom: 12px;
    }

    .calendar-header .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .current-month {
        font-size: 0.85rem;
    }

    .calendar-weekdays {
        margin-bottom: 6px;
    }

    .weekday {
        font-size: 0.7rem;
        padding: 3px 0;
    }

    .calendar-days {
        gap: 2px;
    }

    .calendar-day {
        min-height: 32px;
    }

    .slots-column {
        min-height: 300px;
        padding: 14px;
        overflow: visible;
    }

    .time-slots-list {
        height: auto;
        min-height: 220px;
    }

    .slots-content {
        overflow-y: auto;
        max-height: 38vh;
        -webkit-overflow-scrolling: touch;
    }

    .modal-title {
        font-size: 1rem;
    }

    .calendly-modern .modal-title::before {
        font-size: 1.2rem;
    }

    .calendly-modern .modal-subtitle {
        max-width: 100%;
        border-radius: 14px;
        padding: 8px 10px;
        font-size: 0.8rem;
        margin-top: 8px;
    }

    .calendly-modern .modal-subtitle::before {
        font-size: 0.9rem;
    }

    .calendar-days {
        gap: 3px;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .time-slot-compact {
        padding: 12px 14px;
    }

    .slot-time {
        font-size: 0.9rem;
    }
}
