/* Style moderne et responsive pour l'application de réservation */

:root {
    --primary: #b50838;
    --primary-dark: #8a0629;
    --secondary: #2f1700;
    --accent: #d4094f;
    --success: #4ade80;
    --danger: #ef4444;
    --warning: #fbbf24;
    --light: #f8f9fa;
    --dark: #1e293b;
    --text: #334155;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #b50838 0%, #b30837 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/motif_pc.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    body::before {
        background-image: url('img/motif_mobile.png');
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out forwards;
}

/* En-tête */
.header {
    text-align: center;
    padding: 40px 20px;
    color: white;
    animation: fadeInUp 0.6s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Carte principale */
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 30px auto;
    max-width: 800px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.card-header p {
    color: var(--text);
    font-size: 1.1rem;
}

/* Formulaire */
.form-group {
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease-out;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: var(--danger);
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Sélection de trajet */
.route-options {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.route-card {
    background: var(--light);
    border: 3px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.route-card.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.route-card .icon {
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-card .icon svg {
    transition: transform 0.3s ease;
}

.route-card:hover .icon svg {
    transform: translateY(-5px);
}

.route-card h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.route-card p {
    color: var(--text);
    margin-bottom: 5px;
}

.route-card .price {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
    white-space: nowrap;
}

.route-card .checkmark {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.route-card.selected .checkmark {
    display: flex;
}

/* Sélection de nombre de voitures */
.car-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    animation: fadeInUp 0.8s ease-out;
}

.car-selector button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.car-selector button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.car-selector button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.car-selector .count {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: center;
}

.car-info {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.car-info .icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.car-info p {
    color: var(--text);
    font-size: 1.1rem;
}

/* Récapitulatif */
.summary-box {
    background: var(--light);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    animation: fadeInUp 0.8s ease-out;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

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

.summary-item .label {
    font-weight: 600;
    color: var(--dark);
}

.summary-item .value {
    color: var(--text);
    text-align: right;
}

.total-price {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin: 25px 0;
    animation: fadeInUp 1s ease-out;
}

.total-price h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.total-price .price {
    font-size: 3rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--light);
    transform: translateY(-3px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 5px 15px rgba(74, 222, 128, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.5);
}

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

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Progress bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 50px;
    position: relative;
    user-select: none;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.progress-bar .progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.5s ease;
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-step:hover {
    transform: scale(1.05);
}

.progress-step.clickable {
    cursor: pointer;
}

.progress-step.locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.progress-step .circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-step:hover .circle {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.progress-step.active .circle {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: var(--primary);
    transform: scale(1.2);
}

.progress-step.completed .circle {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.progress-step .label {
    font-size: 0.85rem;
    color: var(--text);
    text-align: center;
}

/* Alertes */
.alert {
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

.alert-success {
    background: rgba(74, 222, 128, 0.1);
    border: 2px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: #fdebd4;
    border: 2px solid #fdebd4;
    color: #212121;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 25px;
        margin: 20px 10px;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .progress-step .label {
        font-size: 0.7rem;
    }
    
    .progress-step .circle {
        width: 35px;
        height: 35px;
    }
    
    .car-selector .count {
        font-size: 2.5rem;
        min-width: 60px;
    }
    
    .total-price .price {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 30px 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .route-card {
        padding: 20px;
    }
    
    .route-card h3 {
        font-size: 1.1rem;
    }
    
    .route-card .price {
        font-size: 1.3rem;
    }
}

/* Animations pour les icônes */
.icon-bounce {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Transitions de page */
.page-transition {
    animation: pageTransition 0.3s ease-out;
}

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

.container {
    animation: pageTransition 0.3s ease-out;
}

/* Style pour la page de succès */
.success-icon {
    font-size: 5rem;
    color: var(--success);
    text-align: center;
    margin: 30px 0;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Style pour les tags */
.tag {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 5px;
}

.tag-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.tag-success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
}

