/* Customer identity and actions. Server visibility and existing handlers are unchanged. */
.white.customer-page-header {
    margin-top: 0;
    padding: 24px 0 0;
}

.customer-page-header .customer-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
    padding: 26px;
    border: 1px solid #e2e8ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(22, 39, 54, .04);
}

.customer-summary-identity {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    min-width: 0;
}

.customer-summary-portrait {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce6ee;
    border-radius: 24px;
    background: #f3f7fa;
    box-shadow: 0 5px 16px rgba(0, 60, 112, .08);
}

.customer-summary-portrait:empty {
    display: none;
}

.customer-page-header .customer-image-profile {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    object-fit: cover;
    object-position: center;
}

.customer-summary-copy {
    flex: 1 1 0;
}

.customer-summary-copy,
.customer-summary-actions {
    min-width: 0;
}

.customer-page-header .customer-summary-name {
    margin: 0;
    color: #173c56;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.02em;
    text-align: start;
    text-transform: none;
}

.customer-page-header .customer-summary-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 0;
    padding: 12px;
    border: 1px solid #e7eef4;
    border-radius: 14px;
    background: #f5f8fb;
    color: #4c6070;
    font-size: 14px;
    line-height: 1.75;
    text-align: start;
}

.customer-summary-address > .customer-summary-address-icon {
    flex: 0 0 20px;
    width: 20px;
    margin-top: 2px;
    color: #25628e;
    font-size: 20px;
    line-height: 1;
}

.customer-summary-address > .fa.customer-summary-address-icon::before {
    display: block;
    vertical-align: 0;
}

.customer-summary-address-text {
    flex: 1 1 0;
    min-width: 0;
}

.customer-summary-address a {
    color: #003c70;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #c1d0df;
    text-underline-offset: 3px;
}

.customer-page-header .has-offerte-new {
    display: inline-block;
    max-width: 100%;
    min-height: 44px;
    margin: 16px 0 0;
    padding: 10px 16px;
    border: 1px solid #cbddea;
    border-radius: 12px !important;
    background: #eef5fb !important;
    color: #003c70;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.6;
    white-space: normal;
    text-align: start;
    cursor: pointer;
}

.customer-page-header .title.customer.customer-summary-actions-inner {
    margin: 0 !important;
    padding: 0;
    background: transparent;
}

.customer-summary-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.customer-page-header .customer-summary-links > a,
.customer-page-header .title.customer .customer-summary-links #scrollToText {
    display: flex;
    flex: 1 1 56px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid #e2e8ee;
    border-radius: 12px;
    background: #f7f9fb;
    color: #003c70 !important;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.customer-summary-links > a > br {
    display: none;
}

.customer-summary-links > a > .fa {
    font-size: 26px;
    line-height: 1;
}

.customer-page-header .customer-summary-contact > button[data-target="#modal-contact-form"] {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    height: auto;
    margin: 0 !important;
    padding: 12px 18px;
    text-align: center;
    line-height: 1.5;
}

.customer-summary a:focus-visible,
.customer-summary .has-offerte-new:focus-visible {
    outline: 3px solid #003c70;
    outline-offset: 4px;
}

@media (hover: hover) {
    .customer-page-header .customer-summary-links > a:hover,
    .customer-page-header .title.customer .customer-summary-links #scrollToText:hover,
    .customer-page-header .has-offerte-new:hover {
        background: #eaf2f9 !important;
        border-color: #a8c3d9;
        color: #003c70;
    }
}

@media (max-width: 1199px) {
    .customer-page-header .customer-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        padding: 24px;
    }

    .customer-summary-actions {
        padding-top: 20px;
        border-top: 1px solid #edf1f5;
    }

    .customer-page-header .customer-summary-actions-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 20px;
    }

    .customer-summary-links {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    #scrollToPhone.btn-phone {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .65);
        border-radius: 16px;
        background: #003c70;
        color: #fff;
        line-height: 1;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 38, 70, .22);
        transition: background-color .18s ease, box-shadow .18s ease;
    }

    #scrollToPhone.btn-phone > .fa {
        display: block;
        margin: 0;
        font-size: 28px;
        line-height: 1;
    }

    #scrollToPhone.btn-phone > .fa::before {
        display: block;
        vertical-align: 0;
    }

    #scrollToPhone.btn-phone:active {
        background: #002d54;
    }

    @media (hover: hover) {
        #scrollToPhone.btn-phone:hover {
            background: #002d54;
            box-shadow: 0 5px 14px rgba(0, 38, 70, .28);
        }
    }

    #scrollToPhone.btn-phone:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 3px;
        box-shadow: 0 0 0 6px #003c70;
    }

    .white.customer-page-header {
        padding-top: 16px;
    }

    .customer-page-header .customer-summary {
        gap: 18px;
        margin-bottom: 22px;
        padding: 18px;
        border-radius: 16px;
    }

    .customer-page-header .customer-summary-name {
        font-size: 24px;
    }

    .customer-page-header .customer-summary-address {
        margin-top: 14px;
        padding: 10px;
        gap: 8px;
    }

    .customer-page-header .customer-summary-actions-inner {
        display: block;
    }

    .customer-summary-links {
        margin-bottom: 14px;
    }
}

@media (max-width: 374px) {
    .customer-page-header .customer-summary {
        padding: 14px;
    }

    .customer-page-header .customer-summary-name {
        font-size: 22px;
    }

    .customer-summary-links {
        gap: 6px;
    }

    .customer-page-header .customer-summary-links > a,
    .customer-page-header .title.customer .customer-summary-links #scrollToText {
        flex-basis: 44px;
        padding-inline: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #scrollToPhone.btn-phone,
    .customer-page-header .customer-summary-links > a,
    .customer-page-header .title.customer .customer-summary-links #scrollToText {
        transition: none;
    }
}
