/* =========================================================
   POPUP GLOBALE DES SONDAGES
========================================================= */

body.poll-popup-open {
    overflow: hidden;
}

.poll-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(8, 15, 27, 0.78);
    backdrop-filter: blur(6px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.poll-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.poll-popup {
    position: relative;

    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    padding: 34px;

    color: #172235;
    background: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;

    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);

    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}

.poll-popup-overlay.is-visible .poll-popup {
    transform: translateY(0) scale(1);
}

.poll-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    color: #66758a;
    background: #f0f4f8;

    border: 1px solid #dfe6ee;
    border-radius: 50%;

    font-size: 1rem;
    cursor: pointer;

    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.poll-popup-close:hover {
    color: #172235;
    background: #e6edf5;
    transform: rotate(6deg);
}

.poll-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 62px;
    height: 62px;
    margin-bottom: 20px;

    color: #ffffff;
    background: linear-gradient(135deg, #1677ff, #7357e8);

    border-radius: 18px;
    font-size: 1.55rem;

    box-shadow: 0 14px 30px rgba(22, 119, 255, 0.25);
}

.poll-popup-subtitle {
    margin: 0 0 7px;

    color: #1677ff;

    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.poll-popup h2 {
    margin: 0 48px 12px 0;

    color: #172235;

    font-size: clamp(1.7rem, 5vw, 2.3rem);
    line-height: 1.15;
}

.poll-popup-question {
    margin: 0 0 24px;

    color: #536176;

    font-size: 1rem;
    line-height: 1.6;
}

.poll-popup-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.poll-popup-options {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.poll-popup-option {
    position: relative;

    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 12px;

    min-height: 52px;
    padding: 13px 15px;

    color: #314158;
    background: #f7f9fc;

    border: 1px solid #dfe5ec;
    border-radius: 13px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.poll-popup-option:hover {
    background: #f1f6fc;
    border-color: #bdd3eb;
    transform: translateY(-1px);
}

.poll-popup-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.poll-popup-option-radio {
    position: relative;

    width: 20px;
    height: 20px;

    background: #ffffff;

    border: 2px solid #aeb9c7;
    border-radius: 50%;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.poll-popup-option-radio::after {
    content: "";

    position: absolute;
    inset: 4px;

    background: #ffffff;
    border-radius: 50%;

    opacity: 0;
    transform: scale(0.4);

    transition: opacity 0.2s ease, transform 0.2s ease;
}

.poll-popup-option input:checked+.poll-popup-option-radio {
    background: #1677ff;
    border-color: #1677ff;
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

.poll-popup-option input:checked+.poll-popup-option-radio::after {
    opacity: 1;
    transform: scale(1);
}

.poll-popup-option.selected {
    color: #172235;
    background: #edf5ff;
    border-color: #8cbeff;
    box-shadow: 0 8px 20px rgba(22, 119, 255, 0.1);
}

.poll-popup-option-label {
    min-width: 0;

    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

.poll-popup-message {
    display: none;

    margin: 0;
    padding: 12px 14px;

    border: 1px solid transparent;
    border-radius: 11px;

    font-size: 0.87rem;
    font-weight: 750;
    line-height: 1.45;
}

.poll-popup-message.success,
.poll-popup-message.error {
    display: block;
}

.poll-popup-message.success {
    color: #146c43;
    background: #dff8ea;
    border-color: #afe5c6;
}

.poll-popup-message.error {
    color: #a12c38;
    background: #ffe4e7;
    border-color: #f4b6be;
}

.poll-popup-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    width: 100%;
    min-height: 49px;
    padding: 0 18px;

    color: #ffffff;
    background: linear-gradient(135deg, #1677ff, #6257dd);

    border: 0;
    border-radius: 12px;

    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 850;

    cursor: pointer;
    box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22);

    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.poll-popup-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(22, 119, 255, 0.27);
}

.poll-popup-submit:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
}

.poll-popup-submit.is-loading {
    pointer-events: none;
}

@media screen and (max-width: 620px) {
    .poll-popup-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .poll-popup {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 28px 20px 22px;
        border-radius: 22px 22px 16px 16px;
        transform: translateY(35px) scale(1);
    }

    .poll-popup-icon {
        width: 54px;
        height: 54px;
        margin-bottom: 17px;
        border-radius: 15px;
        font-size: 1.35rem;
    }

    .poll-popup h2 {
        margin-right: 44px;
    }

    .poll-popup-question {
        font-size: 0.94rem;
    }

    .poll-popup-option {
        padding: 12px 13px;
    }
}

@media screen and (max-width: 380px) {
    .poll-popup-overlay {
        padding: 8px;
    }

    .poll-popup {
        max-height: calc(100vh - 16px);
        padding: 24px 16px 18px;
    }

    .poll-popup-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
}