#Popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#Popup.popup-ouvert {
    display: flex;
}

.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.popup-data {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 45px;
    border: 1px solid #e4e4e7;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    animation: popup-apparition 0.25s ease;
}

.popup-data-img-quit {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 11px;
    border: 1px solid #e4e4e7;
    border-radius: 50%;
    background: #f6f6f6;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.popup-data-img-quit:hover {
    transform: rotate(90deg);
    border-color: #171717;
    background: #eeeeee;
}

.popup-data-img-quit img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.popup-data-titre {
    margin-bottom: 32px;
    padding-right: 45px;
}

.popup-data-titre span {
    display: inline-block;
    margin-bottom: 10px;
    color: #525252;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.popup-data-titre h2 {
    margin: 0 0 12px;
    color: #000000;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.popup-data-titre p {
    margin: 0;
    color: #666666;
    font-size: 16px;
    line-height: 1.6;
}

.popup-data-form {
    display: grid;
    gap: 20px;
}

.popup-form-ligne {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.popup-form-champ {
    display: grid;
    gap: 8px;
}

.popup-form-champ label {
    color: #262626;
    font-size: 14px;
    font-weight: 700;
}

.popup-form-champ input,
.popup-form-champ textarea {
    width: 100%;
    border: 1px solid #d4d4d8;
    border-radius: 10px;
    background: #ffffff;
    color: #181818;
    font: inherit;
    font-size: 16px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.popup-form-champ input {
    min-height: 52px;
    padding: 0 16px;
}

.popup-form-champ textarea {
    min-height: 140px;
    padding: 15px 16px;
    line-height: 1.6;
    resize: vertical;
}

.popup-form-champ input::placeholder,
.popup-form-champ textarea::placeholder {
    color: #a3a3a3;
}

.popup-form-champ input:hover,
.popup-form-champ textarea:hover {
    border-color: #a3a3a3;
}

.popup-form-champ input:focus,
.popup-form-champ textarea:focus {
    border-color: #171717;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.popup-data-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.popup-data-submit button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 52px;
    padding: 0 24px;
    border: 1px solid #171717;
    border-radius: 10px;
    background: #171717;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.popup-data-submit button:hover {
    transform: translateY(-2px);
    background: #000000;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.popup-data-submit button:focus-visible,
.popup-data-img-quit:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.3);
    outline-offset: 4px;
}

@keyframes popup-apparition {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 650px) {
    #Popup {
        align-items: flex-start;
        padding: 12px;
    }

    .popup-data {
        max-height: calc(100vh - 24px);
        margin-top: 12px;
        padding: 35px 22px 25px;
        border-radius: 16px;
    }

    .popup-data-img-quit {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }

    .popup-data-titre {
        margin-bottom: 25px;
        padding-right: 35px;
    }

    .popup-data-titre h2 {
        font-size: 29px;
    }

    .popup-form-ligne {
        grid-template-columns: 1fr;
    }

    .popup-data-submit button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .popup-data,
    .popup-data-img-quit,
    .popup-data-submit button {
        animation: none;
        transition: none;
    }
}