/* ==================================================
   RESET GLOBAL
================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ==================================================
   MASQUER TOUS LES MESSAGES ELEMENTOR FORM
================================================== */
.elementor-message,
.elementor-form .elementor-message,
.elementor-form .elementor-message-success,
.elementor-form .elementor-message-error,
.elementor-form .elementor-message-danger,
.elementor-form .elementor-message-info {
    display: none !important;
}


/* Messages d'erreurs pour les champs formulaire */
.ma-field.is-error input,
.ma-field.is-error select {
    border-color: #e53935 !important;
}
.ma-error-msg {
    font-size: 12px;
    color: #e53935;
    margin-top: 4px;
}
/* *** */

.ma-loading,
.ma-error {
    display: flex;
    justify-content: center;   /* centrage horizontal */
    align-items: center;
    text-align: center;        /* texte centré DANS le <p> */
    width: 100%;
    padding: 20px 10px;
    font-size: 15px;
    color: white;
}
.ma-error {
    color: #c0392b;
    font-weight: 600;
}

form.ma-ellipsis-labels .elementor-field-label {
    white-space: nowrap;       /* pas de retour à la ligne */
    overflow: hidden;          /* cache le dépassement */
    text-overflow: ellipsis;   /* ajoute ... */
    display: inline-block !important;
    max-width: 100%;
}


/* ==================================================
   CONTAINER PRINCIPAL
================================================== */
#ma-booking-results {
    width: 100%;
    margin: 20px auto;
    padding: 14px;
    overflow-y: auto;
    overflow-x: hidden;
/*     background: #f7f7f7; */
    border-radius: 14px;
/*     border: 1px solid #e0e0e0; */
}

/* Scrollbar */
#ma-booking-results::-webkit-scrollbar {
    width: 8px;
}
#ma-booking-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

/* ==================================================
   LISTE DES VÉHICULES
================================================== */
#ma-booking-results-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ==================================================
   CARTE VÉHICULE (BASE COMMUNE)
================================================== */
.ma-vehicle-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin: 7px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    min-height: 280px;
}

/* ==================================================
   IMAGE
================================================== */
.ma-vehicle-img {
    flex: 0 0 20%;
    max-width: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-vehicle-img img {
    max-width: 70%;
    max-height: 100%;
    object-fit: contain;
}

.ma-no-img {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* ==================================================
   CONTENU TEXTE
================================================== */
.ma-vehicle-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ma-vehicle-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.ma-vehicle-subtitle {
    font-size: 13px;
    color: #333;
}

.ma-vehicle-status {
    margin: 4px 0;
}

.ma-badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 10rem;
    color: #fff;
}
.ma-badge-success { background: #28a745; }
.ma-badge-warning { background: #f0ad4e; }

.ma-vehicle-category {
    font-size: 12px;
    color: #777;
}

.ma-vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 13px;
    color: #666;
}

.ma-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* ==================================================
   PRIX + BOUTON
================================================== */
.ma-vehicle-price {
    margin-left: auto;
    text-align: right;
}

.ma-price-label {
    font-size: 13px;
    color: #333;
}

.ma-price-value {
    font-size: 20px;
    font-weight: bold;
}

.ma-select-vehicle {
    margin-left: auto;
    margin-top: 8px;
    padding: 0.5rem 1.5rem;
    border-radius: 20px !important;
    border: none;
    corner-shape: squircle;
}
.ma-select-vehicle:hover { background: #005f8d; }
.ma-select-vehicle:disabled { background: #aaa; }

/* ==================================================
   PRICING WRAPPER
================================================== */
.ma-pricing-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: flex-start;
}

/* ==================================================
   TABLE PRICING
================================================== */
.ma-pricing-table {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.ma-pricing-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid #eee;
}

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

.ma-pricing-row > div {
    padding: 6px 8px;
}

/* Header */
.ma-pricing-head {
    background: var(--e-global-color-primary);
    font-weight: 600;
    text-align: center;
}
.ma-pricing-head div {
    color: white;
}

/* ==================================================
   COLONNE ACTIVE (PLEINE, PROPRE)
================================================== */
.ma-pricing-wrapper.selected-col-1 .ma-pricing-row > div:nth-child(2),
.ma-pricing-wrapper.selected-col-2 .ma-pricing-row > div:nth-child(3),
.ma-pricing-wrapper.selected-col-3 .ma-pricing-row > div:nth-child(4) {
    background: #f1f1f1;
	border-radius: 1rem;
    corner-shape: squircle;
	color: var( --e-global-color-text );
}

.ma-pricing-wrapper.selected-col-1 .ma-pricing-head > div:nth-child(2),
.ma-pricing-wrapper.selected-col-2 .ma-pricing-head > div:nth-child(3),
.ma-pricing-wrapper.selected-col-3 .ma-pricing-head > div:nth-child(4) {
    background: rgba(255,255,255,.75);
    font-weight: 700;
	border-radius: 1rem;
    corner-shape: squircle;
}

/* ==================================================
   LIGNE PRIX
================================================== */
.ma-pricing-price strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

/* ==================================================
   BOUTONS PACK
================================================== */
.ma-pack-select {
    width: 100%;
    padding: 8px 0;
    border: none;
    cursor: pointer;
    background: var( --e-global-color-primary );
    font-weight: 600;
    transition: background .2s ease;
	border-radius: 1rem !important;
    corner-shape: squircle;
}
.ma-pack-select.is-selected {
    background: var(--e-global-color-accent);
    color: #000;
}

/*.ma-pricing-wrapper.selected-col-1 [data-col="1"],
.ma-pricing-wrapper.selected-col-2 [data-col="2"],
.ma-pricing-wrapper.selected-col-3 [data-col="3"] {
    background: var( --e-global-color-primary );
    color: #fff;
}*/

/* ==================================================
   COLONNE DROITE (RÉCAP)
================================================== */
.ma-pricing-side {
    border-left: 1px solid #ddd;
    padding-left: 16px;
}

.ma-pricing-side img {
    max-width: 70%;
    margin: 0 auto;
    display: block;
}

.ma-final-box {
    margin-top: 20px;
    padding: 16px;
    background: #f7f7f7;
    border-radius: 12px;
    text-align: center;
}

.ma-next-step {
    margin-top: 12px;
    padding: 0.5rem 1.5rem;
    border: none;
	border-radius: 1rem !important;
    corner-shape: squircle;
}

.ma-next-step:disabled {
    background: #aaa;
}

/* ==================================================
   SUMMARY STEP 2
================================================== */
.ma-summary {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}
.ma-summary-row,
.ma-summary-total {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}
.ma-summary-total {
    font-size: 1.1em;
}
.ma-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}
.ma-option-title {
    font-weight: 600;
    font-size: 15px;
}
.ma-option-price {
    font-size: 14px;
    color: #333;
}
.ma-option-controls {
    display: flex;
    align-items: center;      /* alignement vertical */
    justify-content: center;  /* alignement horizontal */
    gap: 10px;
}
.opt-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;      /* centre verticalement le symbole */
    justify-content: center;  /* centre horizontalement le symbole */
    padding: 0;
    line-height: 1;
	border-radius: 1rem !important;
    corner-shape: squircle;
}
.opt-qty {
    min-width: 18px;
    text-align: center;
    font-weight: bold;
    color: #d60000;
}
.opt-check {
    width: 20px;
    height: 20px;
    cursor: pointer;
	accent-color: var(--e-global-color-primary);
}

/* MOTEUR DE RECHERCHE */

.elementor-element-6a3d92e4 {
    padding: 5px 10px 5px 5px !important;
    overflow: hidden !important;
}

/* Formulaire sur une ligne */
#ma-search-form form.elementor-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

/* Labels homogènes */
#ma-search-form .elementor-field-label {
    min-height: 32px;
    line-height: 1.2;
    display: flex;
    align-items: flex-end;
}

/* Hauteur identique inputs/select */
#ma-search-form select,
#ma-search-form input {
    height: 44px;
    box-sizing: border-box;
}

/* Agence de retrait */
.elementor-field-group-pickupStation {
    order: 1;
    flex: 0 0 15%;
    max-width: 15%;
}

/* Date de retrait */
.elementor-field-group-pickupDate {
    order: 2;
    flex: 0 0 10%;
    max-width: 10%;
}

/* Heure de retrait */
.elementor-field-group-pickupHour {
    order: 3;
    flex: 0 0 8%;
    max-width: 8%;
}

/* Agence de retour */
.elementor-field-group-dropoffStation {
    order: 4;
    flex: 0 0 15%;
    max-width: 15%;
}

/* Date de retour */
.elementor-field-group-dropoffDate {
    order: 5;
    flex: 0 0 10%;
    max-width: 10%;
}

/* Heure de retour */
.elementor-field-group-dropoffHour {
    order: 6;
    flex: 0 0 8%;
    max-width: 8%;
}

/* Âge conducteur */
.elementor-field-group-dAge {
    order: 7;
    flex: 0 0 5%;
    max-width: 5%;
}

/* Types de véhicule */
.elementor-field-group-types {
    order: 8;
    flex: 0 0 9%;
    max-width: 9%;
}

/* Code promo */
.elementor-field-group-codep {
    order: 9;
    flex: 0 0 8%;
    max-width: 8%;
}

/* BOUTON RECHERCHER – DESKTOP */
#ma-search-form .elementor-field-type-submit {
    order: 10;
    flex: 0 0 7%;
    max-width: 7%;
    align-self: flex-end;
}

.ma-info-block {
    background: #f3f3f3;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

.ma-info-row:first-of-type {
    margin-bottom: 10px;
}

.ma-info-row strong {
    font-weight: 600;
}

/* ==================================================
   ETAPE 3 INFOS CONDUCTEUR
================================================== */

/* ===== COLONNE GAUCHE ===== */
.ma-pricing-main {
  padding: 20px;
}

/* Titre */
.ma-pricing-main h4 {
  margin: 10px 0 10px;
  font-size: 20px;
}

/* Titres de sections */
.ma-form-section-title {
  display: block;
  margin: 18px 0 10px;
  font-weight: 700;
  font-size: 14px;
  color: #333;
}

/* Wrapper form */
.ma-driver-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Lignes */
.ma-form-row {
  display: grid;
  gap: 14px 16px;
}

.ma-form-row-2 {
  grid-template-columns: 1fr 1fr;
}

.ma-form-row-1 {
  grid-template-columns: 1fr;
}

/* Champ (label + input) */
.ma-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ma-field input, .ma-field select {
    border: 1px solid var( --e-global-color-text ) !important;
    border-radius: 1rem !important;
    corner-shape: squircle;
    box-shadow: none !important;
    outline: none !important;
}

/* Labels */
.ma-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

/* Inputs & selects */
.ma-field input,
.ma-field select {
  width: 100%;
  height: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

/* Focus */
.ma-field input:focus,
.ma-field select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
}

/* Séparateur mobile entre colonnes */
.ma-mobile-separator {
  display: none;
  border: none;
  border-top: 1px solid #a0a0a0;
  margin: 5px 0;
}

span.ma-meta-item img {
    width: 25px;
    height: 25px;
}

.ma-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #30434b;
}

/* FIX placeholder invisible iOS */
#driver_birthdate::placeholder {
    opacity: 1;
    color: #999;
}
#driver_birthdate {
    font-size: 16px; /* OBLIGATOIRE sur iOS */
}


/* *** */

/* ==================================================
   RESPONSIVE MOBILE
================================================== */

/* Par défaut (desktop) */
.ma-pricing-mobile {
    display: none;
}

@media (max-width: 767px) {

    .elementor-element-6a3d92e4 {
        padding: 5px !important;
    }

    #ma-search-form .elementor-field-group,
    #ma-search-form .elementor-field-type-submit {
        order: unset;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .ma-vehicle-body {
        gap: 4px;
    }

    #ma-booking-results {
        max-height: none;
    }

    /* Véhicules */
    .ma-vehicle-card {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        height: auto;
        overflow: hidden;
        padding-bottom: 20px;
    }

    .ma-vehicle-img {
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    .ma-vehicle-img img {
        max-height: 200px;
        width: 100%;
    }

    .ma-vehicle-price {
        margin-left: 0;
        margin-top: 6px;
        text-align: left;
    }

    .ma-select-vehicle {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }

    /* ===== PRICING ===== */
    .ma-pricing-wrapper {
        grid-template-columns: 1fr;
    }

    .ma-pricing-side {
        border-left: none;
        padding-left: 0;
        margin-top: 24px;
    }

    /* ===== ON CACHE LE TABLEAU ===== */
    .ma-pricing-table {
        display: none;
    }

    /* ===== ON AFFICHE POUR MOBILE ===== */
    .ma-pricing-mobile {
        display: grid;
        gap: 14px;
    }

    /* ===== CARTES FORMULES ===== */

    .ma-pricing-card {
        background: #fff;
        border-radius: 14px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .ma-pricing-card h4 {
        margin: 0 0 6px;
        font-size: 16px;
    }

    .ma-pricing-card .price {
        font-size: 20px;
        font-weight: 700;
        margin: 6px 0 10px;
    }

    .ma-pricing-card ul {
        list-style: none;
        padding: 0;
        margin: 0 0 12px;
        font-size: 14px;
    }

    .ma-pricing-card ul li {
        margin-bottom: 6px;
    }

    .ma-pricing-card .ma-pack-select {
        width: 100%;
    }

    /* Carte sélectionnée */
    .ma-pricing-card.active {
        border: 2px solid #e53935;
    }

    /* Bouton pack désactivé */
    .ma-pack-select[disabled] {
        opacity: 0.35 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
        background: #ccc !important;
        color: #666 !important;
        border-color: #ccc !important;
    }

    /* ETAPE 3 INFOS CONDUCTEUR */

    .ma-form-row-2 {
        grid-template-columns: 1fr;
    }

    /* On affiche la ligne seulement en mobile */
    .ma-mobile-separator {
        display: block;
    }

}