﻿:root {
    --offerte-accent: #8b0008;
    --offerte-accent-2: #b3141f;
    --offerte-accent-soft: rgba(139,0,8,.14);
    --offerte-ink: #111214;
    --offerte-ink-soft: rgba(17,18,20,.72);
    --offerte-muted: rgba(17,18,20,.52);
    --offerte-line: rgba(17,18,20,.11);
    --offerte-line-strong: rgba(139,0,8,.22);
    --offerte-white: rgba(255,255,255,.94);
    --offerte-white-soft: rgba(255,255,255,.76);
    --offerte-surface: rgba(248,246,242,.88);
    --offerte-shadow: 0 34px 90px rgba(0,0,0,.28), 0 16px 42px rgba(0,0,0,.18);
    --offerte-radius: 28px;
    --offerte-radius-sm: 16px;
}

#offerteModal {
    --bs-modal-zindex: 1080;
}

    #offerteModal .modal-dialog {
        position: relative;
        z-index: 1085;
        width: min(720px, calc(100vw - 32px));
        max-width: min(720px, calc(100vw - 32px));
        margin: 12vh auto 7vh !important;
    }

    #offerteModal .modal-content {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,.62);
        border-radius: var(--offerte-radius);
        background: linear-gradient(145deg, rgba(255,255,255,.96) 0%, rgba(244,241,236,.93) 46%, rgba(255,255,255,.88) 100%);
        box-shadow: var(--offerte-shadow);
        backdrop-filter: blur(22px) saturate(1.24);
        -webkit-backdrop-filter: blur(22px) saturate(1.24);
    }

        #offerteModal .modal-content::before {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(circle at 12% 0%, rgba(139,0,8,.20) 0%, rgba(139,0,8,.08) 24%, transparent 48%), radial-gradient(circle at 92% 12%, rgba(255,255,255,.92) 0%, rgba(255,255,255,.34) 28%, transparent 52%), linear-gradient(135deg, rgba(255,255,255,.38), transparent 36%, rgba(139,0,8,.07));
            opacity: .95;
        }

        #offerteModal .modal-content::after {
            content: "";
            position: absolute;
            left: 28px;
            right: 28px;
            top: 0;
            height: 4px;
            border-radius: 999px;
            background: linear-gradient(90deg, transparent, var(--offerte-accent), var(--offerte-accent-2), transparent);
            opacity: .9;
        }

        #offerteModal .modal-content > * {
            position: relative;
            z-index: 2;
        }

    #offerteModal .modal-header {
        display: flex;
        align-items: center;
        min-height: 76px;
        padding: 24px 28px 18px;
        border-bottom: 1px solid rgba(17,18,20,.08);
        background: linear-gradient(180deg, rgba(255,255,255,.44), rgba(255,255,255,0));
    }

    #offerteModal .modal-title {
        margin: 0;
        color: var(--offerte-ink);
        font-size: clamp(1.2rem, 2.2vw, 1.55rem);
        font-weight: 900;
        letter-spacing: -.035em;
        line-height: 1.05;
    }

        #offerteModal .modal-title::after {
            content: "";
            display: block;
            width: 54px;
            height: 3px;
            margin-top: 10px;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--offerte-accent), rgba(139,0,8,.12));
        }

    #offerteModal .btn-close {
        width: 42px;
        height: 42px;
        margin: 0;
        padding: 0;
        border-radius: 999px;
        border: 1px solid rgba(17,18,20,.10);
        background-color: rgba(255,255,255,.74);
        box-shadow: 0 14px 30px rgba(0,0,0,.10);
        opacity: .9;
        transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background-color .18s ease;
    }

        #offerteModal .btn-close:hover {
            transform: translateY(-1px) scale(1.03);
            background-color: rgba(255,255,255,.96);
            box-shadow: 0 18px 42px rgba(0,0,0,.16);
            opacity: 1;
        }

    #offerteModal .modal-body {
        padding: 22px 28px 28px;
        color: var(--offerte-ink-soft);
    }

    #offerteModal form {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px 18px;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #offerteModal .form-group {
        position: relative;
        margin: 0;
    }

        #offerteModal .form-group:nth-child(3),
        #offerteModal .form-group:nth-child(6),
        #offerteModal #submitBtn,
        #offerteModal #loading,
        #offerteModal #successMessage,
        #offerteModal #errorMessage {
            grid-column: 1 / -1;
        }

    #offerteModal label {
        display: block;
        margin: 0 0 8px;
        color: rgba(17,18,20,.82);
        font-size: .86rem;
        font-weight: 850;
        letter-spacing: -.01em;
    }

        #offerteModal label::first-letter {
            text-transform: uppercase;
        }

    #offerteModal input,
    #offerteModal textarea {
        width: 100%;
        min-height: 50px;
        border: 1px solid rgba(17,18,20,.11);
        border-radius: var(--offerte-radius-sm);
        background: rgba(255,255,255,.72);
        color: var(--offerte-ink);
        font-size: .98rem;
        font-weight: 600;
        line-height: 1.35;
        padding: 13px 15px;
        outline: none;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 10px 22px rgba(0,0,0,.045);
        transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
    }

    #offerteModal textarea {
        min-height: 112px;
        resize: vertical;
    }

        #offerteModal input:hover,
        #offerteModal textarea:hover {
            border-color: rgba(139,0,8,.22);
            background: rgba(255,255,255,.86);
        }

        #offerteModal input:focus,
        #offerteModal textarea:focus {
            border-color: rgba(139,0,8,.52);
            background: rgba(255,255,255,.96);
            box-shadow: 0 0 0 4px rgba(139,0,8,.13), 0 16px 34px rgba(0,0,0,.08);
            transform: translateY(-1px);
        }

        #offerteModal input::placeholder,
        #offerteModal textarea::placeholder {
            color: rgba(17,18,20,.36);
        }

    #offerteModal input[type="file"] {
        min-height: auto;
        padding: 11px;
        cursor: pointer;
        color: rgba(17,18,20,.72);
    }

        #offerteModal input[type="file"]::file-selector-button {
            margin-right: 12px;
            border: 0;
            border-radius: 999px;
            background: linear-gradient(135deg, var(--offerte-accent), var(--offerte-accent-2));
            color: #fff;
            font-weight: 850;
            padding: 9px 14px;
            cursor: pointer;
            box-shadow: 0 10px 22px rgba(139,0,8,.22);
            transition: transform .18s ease, box-shadow .18s ease;
        }

            #offerteModal input[type="file"]::file-selector-button:hover {
                transform: translateY(-1px);
                box-shadow: 0 14px 28px rgba(139,0,8,.28);
            }

    #offerteModal .form-text {
        display: block;
        margin-top: 8px;
        color: var(--offerte-muted) !important;
        font-size: .82rem;
        font-weight: 650;
    }

    #offerteModal #submitBtn {
        justify-self: start;
        position: relative;
        overflow: hidden;
        min-height: 52px;
        width: min(340px, 100%);
        margin-top: 4px;
        border: 0;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--offerte-accent) 0%, var(--offerte-accent-2) 58%, #7b0007 100%);
        color: #fff;
        font-size: .98rem;
        font-weight: 950;
        letter-spacing: -.01em;
        padding: 14px 22px;
        box-shadow: 0 18px 42px rgba(139,0,8,.30), 0 8px 18px rgba(0,0,0,.14);
        transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    }

        #offerteModal #submitBtn::before {
            content: "";
            position: absolute;
            top: -80%;
            bottom: -80%;
            left: -38%;
            width: 34%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
            transform: rotate(18deg);
            transition: left .55s ease;
        }

        #offerteModal #submitBtn:hover {
            transform: translateY(-2px);
            filter: saturate(1.08);
            box-shadow: 0 24px 54px rgba(139,0,8,.36), 0 12px 28px rgba(0,0,0,.16);
        }

            #offerteModal #submitBtn:hover::before {
                left: 115%;
            }

        #offerteModal #submitBtn:active {
            transform: translateY(0);
            box-shadow: 0 14px 32px rgba(139,0,8,.27), 0 7px 16px rgba(0,0,0,.13);
        }

        #offerteModal #submitBtn:disabled,
        #offerteModal #submitBtn.btn-disabled,
        #offerteModal.btn-disabled #submitBtn {
            background: linear-gradient(135deg, #d8d8d8, #c7c7c7) !important;
            color: rgba(17,18,20,.42) !important;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

    #offerteModal #loading {
        display: none;
        align-items: center;
        gap: 10px;
        margin-top: 4px;
        color: var(--offerte-accent);
        font-weight: 850;
    }

        #offerteModal #loading::before {
            content: "";
            width: 18px;
            height: 18px;
            border-radius: 999px;
            border: 3px solid rgba(139,0,8,.18);
            border-top-color: var(--offerte-accent);
            animation: offerteSpin .75s linear infinite;
        }

    #offerteModal #successMessage,
    #offerteModal #errorMessage,
    #offerteSuccess {
        border-radius: 18px;
        border: 1px solid rgba(17,18,20,.10);
        padding: 14px 16px;
        font-weight: 800;
        box-shadow: 0 14px 30px rgba(0,0,0,.08);
    }

    #offerteModal #successMessage,
    #offerteSuccess {
        background: rgba(235,249,241,.92);
        color: #146c43;
    }

    #offerteModal #errorMessage {
        background: rgba(255,238,236,.94);
        color: #b42318;
    }

#offerteSuccess {
    margin: 0 28px 20px;
}

#offerteSuccessClose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 28px 28px;
    border: 1px solid rgba(17,18,20,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.76);
    color: var(--offerte-ink);
    font-weight: 850;
    padding: 10px 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

    #offerteSuccessClose:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,.96);
        box-shadow: 0 18px 38px rgba(0,0,0,.13);
    }

#offerteModal .modal-backdrop,
.modal-backdrop.show {
    opacity: .72;
}

@keyframes offerteSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991px) {
    #offerteModal .modal-dialog {
        width: min(680px, calc(100vw - 24px));
        max-width: min(680px, calc(100vw - 24px));
        margin-top: 16vh !important;
        margin-bottom: 5vh !important;
    }

    #offerteModal .modal-header {
        padding: 22px 24px 16px;
    }

    #offerteModal .modal-body {
        padding: 20px 24px 26px;
    }
}

@media (max-width: 767px) {
    #offerteModal .modal-dialog {
        width: calc(100vw - 18px);
        max-width: calc(100vw - 18px);
        margin-top: 10vh !important;
        margin-bottom: 4.5vh !important;
    }

    #offerteModal .modal-content {
        border-radius: 24px;
    }

    #offerteModal .modal-header {
        min-height: 68px;
        padding: 20px 18px 14px;
    }

    #offerteModal .modal-title {
        font-size: 1.22rem;
        max-width: calc(100% - 58px);
    }

    #offerteModal .btn-close {
        width: 38px;
        height: 38px;
    }

    #offerteModal .modal-body {
        padding: 18px 18px 22px;
    }

    #offerteModal form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #offerteModal .form-group:nth-child(3),
    #offerteModal .form-group:nth-child(6),
    #offerteModal #submitBtn,
    #offerteModal #loading,
    #offerteModal #successMessage,
    #offerteModal #errorMessage {
        grid-column: auto;
    }

    #offerteModal input,
    #offerteModal textarea {
        min-height: 48px;
        border-radius: 15px;
        padding: 12px 14px;
        font-size: .96rem;
    }

    #offerteModal textarea {
        min-height: 100px;
    }

    #offerteModal #submitBtn {
        justify-self: stretch;
        width: 100%;
        min-height: 52px;
        margin-top: 2px;
    }

    #offerteSuccess {
        margin: 0 18px 18px;
    }

    #offerteSuccessClose {
        margin: 0 18px 22px;
        width: calc(100% - 36px);
    }
}

@media (max-width: 420px) {
    #offerteModal .modal-dialog {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        margin-top: 10vh !important;
    }

    #offerteModal .modal-content {
        border-radius: 20px;
    }

    #offerteModal .modal-header {
        padding: 18px 15px 12px;
    }

    #offerteModal .modal-body {
        padding: 16px 15px 20px;
    }

    #offerteModal label {
        font-size: .82rem;
    }

    #offerteModal input,
    #offerteModal textarea {
        font-size: .94rem;
    }
}

@media (max-height: 760px) and (min-width: 768px) {
    #offerteModal .modal-dialog {
        margin-top: 3vh !important;
        margin-bottom: 3vh !important;
    }

    #offerteModal .modal-header {
        min-height: 62px;
        padding-top: 18px;
        padding-bottom: 12px;
    }

    #offerteModal .modal-body {
        padding-top: 16px;
        padding-bottom: 20px;
    }

    #offerteModal form {
        gap: 13px 16px;
    }

    #offerteModal textarea {
        min-height: 86px;
    }

    #offerteModal input,
    #offerteModal textarea {
        min-height: 46px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    #offerteModal #submitBtn {
        min-height: 48px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #offerteModal *,
    #offerteModal *::before,
    #offerteModal *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
