.callback-widget,
.callback-widget * {
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

.callback-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
}

.callback-tab {
    position: relative;
    width: 55px;
    height: 270px;
    background: #1070aa;
    border-radius: 18px 0 0 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    overflow: hidden;
}

.callback-flag {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    display: flex;
    flex-direction: column;
    border-radius: 18px 0 0 18px;
    overflow: hidden;
}

.flag-red {
    flex: 1;
    background: #e31d1c;
}

.flag-white {
    flex: 1;
    background: #ffffff;
}

.flag-blue {
    flex: 1;
    background: #0d4f8b;
}

.callback-tab-content {
    width: 100%;
    height: 100%;
    padding-left: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
}

.callback-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
    text-align: center;
}

.callback-arrow {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}

.callback-popup {
    position: absolute;
    right: 78px;
    top: 50%;
    transform: translateY(-50%) translateX(30px);
    width: 320px;
    max-width: calc(100vw - 95px);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.3s ease;
    overflow: hidden;
}

.callback-widget.open .callback-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.callback-popup-inner {
    padding: 32px 28px 20px;
    text-align: center;
    position: relative;
}

.callback-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 24px;
    color: #4b4f56;
    cursor: pointer;
    line-height: 1;
    z-index: 3;
}

.callback-icon-box {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.callback-popup h3 {
    margin: 0 0 8px;
    color: #1070aa;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
}

.callback-popup p {
    margin: 0 auto 18px;
    max-width: 240px;
    color: #5f6670;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.callback-popup p strong {
    font-weight: 600;
}

.callback-form {
    text-align: left;
}

.callback-form label {
    display: none;
}

/* Style commun */
.callback-input,
.callback-phone-group {
    width: 100%;
    height: 62px;
    border: 1.5px solid #e1e5ea;
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: none;
}

/* Inputs nom / prénom */
.callback-input {
    display: block;
    padding: 0 16px;
    margin-bottom: 18px;
    border-radius: 16px !important;
    font-size: 15px;
    font-weight: 500;
    color: #4a4a4a;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.callback-input::placeholder {
    color: #8f8f8f;
    font-weight: 500;
}

.callback-input:focus {
    border: 1.5px solid #1e88d9 !important;
    box-shadow: none !important;
    outline: none;
}

.callback-input:not(:placeholder-shown) {
    border: 1.5px solid #1e88d9 !important;
    box-shadow: none !important;
}

/* Champ téléphone */
.callback-phone-group {
    display: flex;
    align-items: center;
    width: 100%;
    height: 62px;
    border: 1.5px solid #e1e5ea;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: none;
}

.callback-phone-group:focus-within {
    border: 1.5px solid #1e88d9 !important;
    box-shadow: none !important;
    outline: none;
}

.callback-phone-group:has(input:not(:placeholder-shown)) {
    border: 1.5px solid #1e88d9 !important;
    box-shadow: none !important;
}

.callback-country {
    width: 76px; 
    min-width: 76px;
    border: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f3;
    border-right: none; /* supprime la séparation */
    padding: 0;
    border-radius: 16px 0 0 16px;
}

.flag-mini {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    background: linear-gradient(
        to right,
        #1a1acb 0%,
        #1a1acb 33.33%,
        #ffffff 33.33%,
        #ffffff 66.66%,
        #e4001b 66.66%,
        #e4001b 100%
    );
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.callback-phone-group input {
    flex: 1;
    height: 100%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    color: #4a4a4a;
    min-height: unset;
    border-radius: 0 16px 16px 0;
    appearance: none;
    -webkit-appearance: none;
}

.callback-phone-group input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
}

.callback-phone-group input::placeholder {
    color: #8f8f8f;
    font-weight: 500;
}

/* Bouton */
.callback-send {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 16px;
    background: #1070aa;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-top: 8px;
}

.callback-send:hover {
    opacity: 0.96;
    transform: translateY(-1px);
}

.callback-rgpd {
    text-align: center;
    color: #8b9097;
    font-size: 10px;
    font-weight: 600;
}

.callback-error {
    color: #d92c2c;
    font-size: 10px;
    margin: 2px 0 8px;
    min-height: 14px;
}

.callback-global-error {
    text-align: center;
    margin-top: 8px;
}

.callback-success {
    color: #1d7f3f;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
    min-height: 16px;
}

/* Erreurs */
.callback-input-error {
    border-color: #d92c2c !important;
}

#callback-phone-group.callback-input-error {
    border-color: #d92c2c !important;
}

/* Autofill */
.callback-input:-webkit-autofill,
.callback-phone-group input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f3f3f3 inset !important;
    -webkit-text-fill-color: #4a4a4a !important;
    border-radius: 16px;
}

/* Responsive */
@media (max-width: 767px) {
    .callback-tab {
        width: 50px;
        height: 220px;
    }

    .callback-text {
        font-size: 13px;
    }

    .callback-popup {
        width: 260px;
        right: 62px;
        max-width: calc(100vw - 75px);
        border-radius: 18px;
    }

    .callback-popup-inner {
        padding: 24px 16px 14px;
    }

    .callback-popup h3 {
        font-size: 18px;
    }

    .callback-popup p {
        font-size: 11px;
        max-width: 210px;
    }

    .callback-input {
        height: 54px;
        font-size: 14px;
        padding: 0 14px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .flag-mini {
        width: 24px;
        height: 18px;
    }

    .callback-phone-group {
        height: 54px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .callback-country {
        width: 64px;
        min-width: 64px;
        border-radius: 14px 0 0 14px;
    }

    .callback-phone-group input {
        font-size: 14px;
        padding: 0 14px;
        border-radius: 0 14px 14px 0;
    }

    .callback-send {
        min-height: 42px;
        font-size: 12px;
        border-radius: 12px;
    }

    .callback-icon-box {
        width: 60px;
        height: 60px;
    }
}