@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
    display: block;
    background-color: #f0f2f5;
    font-family: 'Poppins', sans-serif;
}

#booking-widget-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 20px;
}

/* Styles pour la modale de connexion */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
}

.modal-content p {
    margin-bottom: 20px;
    color: #666;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-actions .button-primary,
.modal-actions .button-secondary {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.modal-actions .button-primary {
    background-color: #007bff;
    color: white;
    border: none;
}

.modal-actions .button-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.modal-actions .button-primary:hover {
    background-color: #0056b3;
}

.modal-actions .button-secondary:hover {
    background-color: #5a6268;
}

/* --- Onglets de type de service --- */
.service-type-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1.5rem;
}
.service-type-tabs .tab-link {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    position: relative;
    top: 1px;
}
.service-type-tabs .tab-link.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

h2, h3 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
}

#price-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

#price-container p {
    margin: 0 0 0.5rem 0;
    color: #666;
}

#price-display {
    font-size: 2rem;
    font-weight: 600;
    color: #007bff;
}

.estimation-results {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}
.estimation-results span {
    font-size: 1.1rem;
}
.estimation-results b {
    color: #333;
}
.estimation-results .total-price b {
    font-size: 1.5rem;
    color: #007bff;
}

.form-actions {
    text-align: right;
    margin-top: 2rem;
}

.button-primary {
    background-color: #007bff;
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.button-primary:disabled {
    background-color: #a0cfff;
    cursor: not-allowed;
}

.button-primary:hover:not(:disabled) {
    background-color: #0056b3;
}

/* --- Styles pour l'étape 2 --- */
.vehicle-list-header {
    display: none; /* Header n'est plus nécessaire avec le nouveau design */
}

/* Redesigned Counter */
.counter {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f8f9fa;
    padding: 0.2rem 0.5rem;
}

.counter-btn {
    background: none;
    border: none;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s;
}

.counter-btn:hover:not(:disabled) {
    background: #e9ecef;
}

.counter-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.counter-value {
    padding: 0 0.8rem;
    font-weight: 600;
    min-width: 15px;
    text-align: center;
    font-size: 1rem;
}

.vehicle-select {
    display: flex;
    align-items: center;
    justify-content: center;
}

#user-info-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

#user-info-container h3 {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.payment-option {
    position: relative;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-option label {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%; /* Pour que les cartes aient la même hauteur */
}

.payment-option input[type="radio"]:checked + label {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.payment-option-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.payment-option-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

#step-2 .form-actions {
    margin-top: 2.5rem;
}

.error {
    color: #dc3545;
    text-align: center;
    margin-top: 1rem;
    min-height: 20px;
}

/* --- Styles pour l'étape minimisée --- */
.step-minimized {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.step-minimized .form-row {
    margin-bottom: 0.5rem;
}

.step-minimized .form-group {
    margin-bottom: 0.3rem;
}

.step-minimized input,
.step-minimized select {
    padding: 0.4rem;
    font-size: 0.9rem;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    pointer-events: none; /* Empêche l'édition */
}

.step-minimized label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.2rem;
}

.step-minimized .estimation-results {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #e9ecef;
    font-size: 0.9rem;
}

.step-minimized .form-actions {
    margin-top: 1rem;
}

/* --- Bouton secondaire --- */
.button-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-right: 0.5rem;
}

.button-secondary:hover {
    background-color: #545b62;
}

/* Styles de base pour les véhicules - plus de structure mobile séparée */

.vehicle-counters {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.vehicle-counter-group {
    text-align: center;
}

.vehicle-counter-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.vehicle-image {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.vehicle-details {
    flex: 1;
}

.vehicle-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.vehicle-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
}

/* Styles pour les véhicules sur desktop */
.vehicle-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.vehicle-item.selected {
    border-color: #007bff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

.vehicle-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.vehicle-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.vehicle-capacity-display {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.capacity-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.counter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.vehicle-price-selection {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vehicle-price {
    font-size: 1.6rem;
    font-weight: 600;
    color: #007bff;
    text-align: right;
}

/* Custom Radio Button */
.vehicle-select input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  margin: 0;
  font: inherit;
  color: #adb5bd;
  width: 1.5em;
  height: 1.5em;
  border: 0.15em solid currentColor;
  border-radius: 50%;
  transform: translateY(-0.075em);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.vehicle-select input[type="radio"]::before {
  content: "";
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em #007bff;
}

.vehicle-select input[type="radio"]:checked {
    border-color: #007bff;
}

.vehicle-select input[type="radio"]:checked::before {
  transform: scale(1);
}

.vehicle-options {
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 0.75rem;
}

.vehicle-options .option {
    margin-bottom: 0.4rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    #booking-widget-container {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .form-group {
        width: 100%;
        margin-bottom: 1rem;
    }

    .address-group {
        margin-bottom: 1rem;
    }

    .estimation-results {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .estimation-results span {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .estimation-results .total-price {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #dee2e6;
    }

    .form-actions {
        margin-top: 1rem;
    }

    .button-primary {
        width: 100%;
    }

    .service-type-tabs {
        margin: -1rem -1rem 1rem -1rem;
        padding: 0 1rem;
    }

    .service-type-tabs .tab-link {
        flex: 1;
        padding: 0.75rem;
        font-size: 0.9rem;
        text-align: center;
    }

    /* Ajustements pour l'étape 2 */
    #vehicle-selection-container,
    #user-info-container {
        margin-top: 1.5rem;
    }

    .payment-options {
        flex-direction: column;
        gap: 0.5rem;
    }

    .payment-option {
        width: 100%;
    }
}

/* Responsive pour mobiles */
@media (max-width: 610px) {
    #booking-widget-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .service-type-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .service-type-tabs .tab-link {
        padding: 0.8rem;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .estimation-results {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* --- Sélection des véhicules en mode mobile --- */
    .vehicle-item {
        padding: 1rem;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .vehicle-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Styles pour la page de confirmation --- */

#booking-widget-container.confirmation-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #f0f2f5;
    padding: 1rem;
    z-index: 1000;
    /* Réinitialiser les styles du widget original */
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

.booking-confirmation-card {
    width: 100%;
    max-width: 550px;
    background-color: #ffffff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 2.5rem;
}

.booking-confirmation-card .success-icon {
    font-size: 4rem;
    color: #28a745; /* Vert succès */
}

.booking-confirmation-card h3 {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.booking-confirmation-card .lead {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.booking-confirmation-card .booking-reference {
    background-color: #e9ecef;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.2rem;
    display: inline-block;
    margin: 1rem 0;
    border: 1px solid #dee2e6;
}

.booking-confirmation-card .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
    transition: background-color 0.3s;
}

.booking-confirmation-card .btn-secondary:hover {
    background-color: #5a6268;
}

.user-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.user-info-header span {
    font-weight: 500;
    color: #333;
}

.logout-btn {
    padding: 8px 16px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
}

 