.devis-step-container {
    min-width: 814px;
    position: relative;
    text-align: center;
    font-family: "Montserrat", Sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.devis-step {
    width: 100%;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.devis-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    transition: all 0.2s ease;
}

.devis-card {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 25px;
    width: 260px;
    height: 313px;
    padding: 7px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.devis-card-inner-wrapper {
    height: 293px;
    border-radius: 18px;
}

.devis-card img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px auto;
}

.devis-card span {
    display: block;
    font-weight: bold;
    font-size: 18px;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
}

/* Hover effect */
.devis-card:hover {
    transform: translateY(0.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.devis-card:hover .devis-card-inner-wrapper {
    border: 1px solid #1070AA;
}

.devis-card:nth-child(1) {
    background-image: url('https://beta.optisecurite.fr/wp-content/uploads/2025/12/ombre_cut_3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.devis-card:nth-child(2) {
    background-image: url('https://beta.optisecurite.fr/wp-content/uploads/2026/03/ombre_cut_2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.devis-card:nth-child(3) {
    background-image: url('https://beta.optisecurite.fr/wp-content/uploads/2026/03/Maison-Secondaire-copie.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.devis-card:nth-child(4) {
    background-image: url('https://beta.optisecurite.fr/wp-content/uploads/2026/03/autre-copie-copie.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.devis-title {
    font-size: 50px;
}

.devis-options-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.devis-subtitle {
    display: block;
    font-size: 22px;
    color: #1070AA;
    font-weight: 500;
    margin-bottom: 40px;
}

.devis-progress-container {
    width: 55%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.devis-progress-bar {
    height: 100%;
    width: 12%;
    background-color: #1070AA;
    transition: width 0.5s ease;
    border-radius: 12px;
}

.devis-progress-block {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
    margin-bottom: 30px;
    position: relative;
    width: 780px;
}

.devis-progress-title {
    font-size: 12px;
    font-weight: 500;
    color: #1070AA;
}

.devis-arrow-img {
    width: 65px;
    height: 152px;
    position: absolute;
    right: -80px;
    top: -102px;
}

.devis-check-box {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.devis-options-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 0;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}

.devis-check-box-label {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #1070AA;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
    color: #1e1e40;
    user-select: none;
    width: 38%;
    text-align: start;
}

.devis-check-box-label:hover {
    background: linear-gradient(to top, #fdfdfe, #dfe9f1);
}

.devis-back-step,
.devis-next-step {
    margin-top: 60px;
    padding: 10px 60px;
    font-size: 18px;
    border: none;
    border-radius: 12px;
    background-color: #1070AA;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.devis-check-box {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.devis-input-text {
    padding: 15px !important;
    font-size: 18px !important;
    border: 1px solid #1070AA !important;
    border-radius: 10px !important;
    width: 100% !important;
    background-color: #fff !important;
}

.devis-phone-input-text {
    padding: 15px !important;
    font-size: 18px !important;
    border: none !important;
    width: 90% !important;
    border-left: #1070AA 1px solid !important;
    border-radius: 0px !important;
}

.devis-check-box-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.devis-check-box-text {
    display: block;
    width: 100%;
    color: inherit;
}

.devis-check-box:checked + .devis-check-box-text {
    color: #ffffff;
}

.devis-check-box-label:has(.devis-check-box:checked) {
    background: #1070AA;
    border-color: #1070AA;
    color: #ffffff;
}

.devis-double-question-block {
    width: 100%;
    margin-bottom: 30px;
}

.devis-double-question-block .devis-subtitle {
    margin-bottom: 20px;
}

.devis-flag-container {
    display: flex;
    align-items: center;
    padding-right: 15px;
    width: 10% !important;
    height: 100% !important;
}

.devis-flag-container img {
    width: 100%;
    height: auto;
}

.devis-phone-input-container {
    display: flex;
    align-items: center;
    border: 1px solid #1070AA;
    border-radius: 10px;
    width: 100%;
    padding: 0px 15px;
    margin: 0 auto;
    overflow: hidden;
    background-color: #fff;
}

.devis-input-text:focus,
.devis-input-text:not(:placeholder-shown),
.devis-phone-input-text:focus,
.devis-phone-input-text:not(:placeholder-shown) {
    outline: none !important;
    box-shadow: none !important;
}

.last-form-field {
    width: 70%;
}


.devis-input-error {
    border-color: #e00000 !important;
    box-shadow: 0 0 0 2px rgba(224, 0, 0, 0.15) !important;
}

.devis-field-error {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e00000;
    min-height: 18px;
}

.devis-field {
    width: 70%;
}

.civilite-block {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.civilite-label {
    font-weight: 600;
    color: #1f2d3d;
}

.civilite-option input[type="radio"] {
    display: none;
}

.civilite-option span {
    display: inline-block;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: 0.2s ease;
}

.civilite-option input[type="radio"]:checked + span {
    background: #1070AA;
    border-color: #1070AA;
    color: #fff;
}

.devis-global-error {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #e00000;
    text-align: center;
}

@media (max-width: 1079px) and (min-width: 769px) {
    .devis-step-container {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .devis-cards {
        align-items: center;
        padding-bottom: 20px;
    }

    /* Hide arrow on tablet */
    .devis-arrow-img {
        display: none !important;
    }

    .last-form-field {
        width: 100%;
    }
}

@media (max-width: 768px) {

    /* Hide arrow on phones */
    .devis-arrow-img {
        display: none !important;
    }

    /* Remove forced minimum width */
    .devis-step-container {
        min-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Titles */
    .devis-title {
        font-size: 5.9vw !important;
        line-height: 1.2;
    }

    .devis-subtitle {
        font-size: 3.2vw !important;
        margin-bottom: 25px !important;
    }

    /* Progress bar */
    .devis-progress-container {
        width: 80% !important;
    }

    .devis-progress-block {
        width: 100% !important;
        flex-direction: column;
        gap: 8px !important;
        margin-bottom: 20px;
    }

    /* Cards become vertical */
    .devis-cards {
        align-items: center;
        padding-bottom: 20px;
        width: 100%;
    }

    .devis-card-inner-wrapper {
        padding: 25px 0 !important;
        height: 160px;
        border-radius: 15px;
    }

    /* Checkboxes / radio labels */
    .devis-options-container {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .devis-check-box-label {
        width: 100% !important;
        font-size: 16px !important;
        text-align: center !important;
        padding: 12px !important;
    }

    /* Text input */
    .devis-input-text {
        width: 100% !important;
        font-size: 18px !important;
    }

    /* Phone input container */
    .devis-phone-input-container {
        width: 100% !important;
        padding: 0 10px !important;
        justify-content: flex-start !important;
    }

    .devis-phone-input-text {
        width: 100% !important;
        font-size: 18px !important;
        padding-left: 12px !important;
    }

    .devis-flag-container {
        width: 45px !important;
        padding-right: 10px !important;
    }

    .devis-next-step,
    .devis-back-step {
        width: 100% !important;
        padding: 14px !important;
        margin-left: 0 !important;
        margin-top: 20px !important;
        font-size: 18px !important;
    }

    .devis-step {
        width: 100% !important;
        min-height: auto !important;
    }

    .last-form-field {
        width: 100%;
    }

    .devis-field {
        width: 100%;
    }
}

@media (max-width: 480px) {
  .devis-check-box-label {
    font-size: 14px !important;
    padding: 10px 12px !important;
    line-height: 1.2 !important;

    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;

    max-width: 100% !important;
    white-space: normal !important;
  }

  .devis-options-container {
    gap: 10px !important;
  }

  /* Reduce card size */
  .devis-card {
    width: 45% !important;
    max-width: 280px !important;   
    height: 200px !important;     
    padding: 5px !important;
  }

  .devis-card-inner-wrapper {
    height: 100% !important;
    padding: 20px 10px !important;
    border-radius: 15px !important;
  }

  .devis-card span {
    font-size: 14px !important;
    bottom: 15px !important;
    padding: 0 10px;

    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  .devis-cards {
    gap: 15px !important;
  }
}