/* Modal de configuration de voyage */
.voyage-config-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

/* Quand la modal est visible, utiliser Flexbox pour centrer */
.voyage-config-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.voyage-config-modal .modal-content {
    background-color: #fff;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
    position: relative;
}

.voyage-config-modal .modal-header {
    background: linear-gradient(135deg, #ffbc50 0%, #ffb747 100%);
    color: white;
    padding: 24px 30px;
    border-radius: 16px 16px 0 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voyage-config-modal .modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.voyage-config-modal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voyage-config-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.voyage-config-modal .modal-body {
    padding: 30px;
}

.voyage-config-modal .config-step {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.voyage-config-modal .config-step:last-of-type {
    border-bottom: none;
}

.voyage-config-modal .config-step h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.voyage-config-modal .config-step h3:before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #ffbc50 0%, #ffb747 100%);
    border-radius: 2px;
    margin-right: 12px;
}

/* Sélecteurs */
.voyage-config-modal select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.voyage-config-modal select:focus {
    outline: none;
    border-color: #ffbc50;
    box-shadow: 0 0 0 3px rgba(255, 188, 80, 0.1);
}

/* Configuration des voyageurs */
.travelers-config {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.traveler-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.traveler-type label {
    font-weight: 500;
    color: #495057;
    font-size: 16px;
}

.counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #ffbc50;
    background: white;
    color: #ffbc50;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.counter-btn:hover {
    background: #ffbc50;
    color: white;
    transform: scale(1.1);
}

.counter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.counter-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-width: 30px;
    text-align: center;
}

/* Récapitulatif */
.config-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.config-summary h3 {
    color: #495057;
    margin-bottom: 16px;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-line.total {
    border-top: 2px solid #ffbc50;
    padding-top: 16px;
    margin-top: 8px;
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.summary-line span:first-child {
    color: #6c757d;
    font-weight: 500;
}

.summary-line span:last-child {
    font-weight: 600;
    color: #333;
}

.summary-line.total span:last-child {
    color: #ffbc50;
    font-size: 20px;
}

/* Footer de la modale */
.voyage-config-modal .modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.voyage-config-modal .btn-secondary,
.voyage-config-modal .btn-primary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    flex: 1;
}

.voyage-config-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

.voyage-config-modal .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.voyage-config-modal .btn-primary {
    background: linear-gradient(135deg, #ffbc50 0%, #ffb747 100%);
    color: white;
}

.voyage-config-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 188, 80, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .voyage-config-modal .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .voyage-config-modal .modal-header,
    .voyage-config-modal .modal-body,
    .voyage-config-modal .modal-footer {
        padding: 20px;
    }

    .voyage-config-modal .modal-header h2 {
        font-size: 20px;
    }

    .travelers-config {
        gap: 15px;
    }

    .traveler-type {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .voyage-config-modal .modal-footer {
        flex-direction: column;
    }

    .summary-line {
        font-size: 14px;
    }

    .summary-line.total {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .voyage-config-modal .modal-content {
        width: 98%;
        margin: 2% auto;
    }

    .voyage-config-modal .modal-header,
    .voyage-config-modal .modal-body,
    .voyage-config-modal .modal-footer {
        padding: 15px;
    }
}
