/* =========================================================
   Services listing (resources/views/automoto/servicelist.blade.php)
   + automoto/sponsorships/sponsored-services.blade.php.
   Page content is scoped under .amp-svc-page (the page's <main>).
   Only loaded on /services.
========================================================= */

/* ---------- outside <main>: Select2 (filter + "Créer un service" modal) ---------- */

.select2-container {
    width: 100% !important;
}

.select2-container--open {
    z-index: 999999 !important;
}

/* ---------- tokens ---------- */

.amp-svc-page {
    --sv-navy: #011e40;
    --sv-navy-2: #0a2d57;
    --sv-orange: #ee5721;
    --sv-orange-dark: #d9481a;
    --sv-orange-soft: #fff3ed;
    --sv-text: #334155;
    --sv-muted: #64748b;
    --sv-faint: #94a3b8;
    --sv-line: #e5eaf1;
    --sv-line-soft: #eef2f7;
    --sv-field: #f6f8fb;
    --sv-field-line: #d9e1ec;
    --sv-radius: 16px;
    --sv-radius-sm: 10px;
    --sv-shadow: 0 1px 2px rgba(1, 30, 64, .04), 0 2px 8px rgba(1, 30, 64, .03);
}

.amp-svc-page .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- scrolling: one scrollbar (the window) ----------
   <main> carries h-[calc(100vh-var(--m-top))] from the shared layout. Its content is much
   taller, so the overflow was scrolled by <body> (overflow-y: auto because of the global
   overflow-x: hidden) while the window scrolled too: two nested scrollbars, and UIkit's
   sticky (which follows the window) froze the right column. Here <main> takes its height. */
#site__main.amp-svc-page {
    height: auto !important;
    min-height: calc(100vh - var(--m-top));
}

html:has(.amp-svc-page) {
    scroll-behavior: smooth;
}

/* "Explorer les services" → the results: keep the heading clear of the fixed header */
.amp-svc-page #service-results {
    scroll-margin-top: calc(var(--m-top, 70px) + 96px);
}

/* the section head stacks (title, text, count) on phones */
@media (max-width: 767px) {
    .amp-svc-page #service-results {
        scroll-margin-top: calc(var(--m-top, 56px) + 164px);
    }
}

/* ---------- layout ---------- */

.amp-svc-page .page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 12px 48px;
}

.amp-svc-page .services-main-col {
    width: 100%;
    min-width: 0;
}

.amp-svc-page .services-main-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.amp-svc-page .services-right-col {
    min-width: 0;
}

@media (min-width: 1024px) {
    .amp-svc-page .services-main-col {
        flex: 1 1 auto;
    }

    .amp-svc-page .services-right-col {
        flex: 0 0 320px;
        width: 320px;
    }
}

/* ---------- hero: photo on the right, navy behind the text ---------- */

.amp-svc-page .services-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    min-height: 248px;
    padding: 28px 30px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--sv-navy);
    color: #fff;
    box-shadow: 0 6px 20px rgba(1, 30, 64, .12);
}

.amp-svc-page .services-hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    z-index: -2;
    width: 58%;
    height: 100%;
    object-fit: cover;
    object-position: 22% 38%;
    /* the source photo is dark: lift it a little so the mechanic reads */
    filter: brightness(1.28) contrast(1.06) saturate(1.1);
}

.amp-svc-page .services-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #011e40 0%, #011e40 40%, rgba(1, 30, 64, .86) 50%, rgba(1, 30, 64, .35) 64%, rgba(1, 30, 64, 0) 78%);
}

.amp-svc-page .services-hero-copy {
    max-width: 56%;
}

.amp-svc-page .services-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 600;
}

.amp-svc-page .services-hero-kicker ion-icon {
    color: #ff8a5c;
    font-size: 14px;
}

.amp-svc-page .services-hero-title {
    margin: 0;
    color: #fff !important;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.amp-svc-page .services-hero-text {
    max-width: 460px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, .84);
    font-size: 14.5px;
    line-height: 1.55;
    text-wrap: pretty;
}

.amp-svc-page .services-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.amp-svc-page .btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}

.amp-svc-page .btn-pill ion-icon {
    font-size: 17px;
}

.amp-svc-page .btn-pill-primary {
    background: #fff;
    color: var(--sv-navy);
}

.amp-svc-page .btn-pill-primary:hover {
    background: #f1f5f9;
    color: var(--sv-navy);
}

.amp-svc-page .btn-pill-orange {
    background: var(--sv-orange);
    color: #fff;
}

.amp-svc-page .btn-pill-orange:hover {
    background: var(--sv-orange-dark);
    color: #fff;
}

/* ---------- "Vous vendez un véhicule ?" ---------- */

.amp-svc-page .amp-promo-alert {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 10px 18px 10px 10px;
    border: 1px solid var(--sv-line);
    border-radius: var(--sv-radius);
    background: linear-gradient(90deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow: var(--sv-shadow);
}

.amp-svc-page .amp-promo-photo {
    flex: none;
    width: 176px;
    height: 104px;
    overflow: hidden;
    border-radius: 12px;
    background: #e6ecf3;
}

.amp-svc-page .amp-promo-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 50%;
}

.amp-svc-page .amp-promo-content {
    flex: 1;
    min-width: 0;
}

.amp-svc-page .amp-promo-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    color: var(--sv-orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.amp-svc-page .amp-promo-title {
    color: var(--sv-navy);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.amp-svc-page .amp-promo-sub {
    margin-top: 4px;
    color: var(--sv-muted);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
}

.amp-svc-page .amp-promo-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--sv-navy);
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .18s ease;
}

.amp-svc-page .amp-promo-btn:hover {
    background: var(--sv-orange);
}

.amp-svc-page .amp-promo-btn ion-icon {
    font-size: 16px;
}

/* ---------- cross-promo: "Annonces véhicules" + "Pièces & accessoires" ----------
   Two equal cards, same language as the Feed's Services / Pièces cards:
   photo on the left (35%), orange label, navy title, muted text, navy CTA at the bottom. */

.amp-svc-page .amp-svc-xpromo {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

@media (min-width: 640px) {
    .amp-svc-page .amp-svc-xpromo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.amp-svc-page .amp-svc-xcard {
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sv-line);
    border-radius: var(--sv-radius);
    background: #fff;
    box-shadow: var(--sv-shadow);
}

.amp-svc-page .amp-svc-xcard-media {
    position: relative;
    flex: 0 0 35%;
    overflow: hidden;
    background: #e6ecf3;
}

.amp-svc-page .amp-svc-xcard-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* hands and keys in the frame */
.amp-svc-page .amp-svc-xcard-media.is-keys img {
    object-position: 58% 50%;
}

/* brake disc + caliper (same framing as the Feed card) */
.amp-svc-page .amp-svc-xcard-media.is-parts img {
    object-position: 44% 70%;
    filter: brightness(1.08) contrast(1.04);
}

.amp-svc-page .amp-svc-xcard-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
}

.amp-svc-page .amp-svc-xcard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
    color: var(--sv-orange);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: .02em;
}

.amp-svc-page .amp-svc-xcard-kicker ion-icon {
    flex: none;
    font-size: 14px;
}

.amp-svc-page .amp-svc-xcard-title {
    margin: 0;
    color: var(--sv-navy);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.amp-svc-page .amp-svc-xcard-text {
    margin: 2px 0 7px;
    color: var(--sv-muted);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.32;
}

.amp-svc-page .amp-svc-xcard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    margin-top: auto;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--sv-navy);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .18s ease;
}

.amp-svc-page .amp-svc-xcard-btn:hover {
    background: var(--sv-orange);
}

.amp-svc-page .amp-svc-xcard-btn ion-icon {
    font-size: 16px;
}

.amp-svc-page .amp-svc-xcard-btn:focus-visible {
    outline: 2px solid var(--sv-orange);
    outline-offset: 2px;
}

@media (max-width: 639px) {
    .amp-svc-page .amp-svc-xcard-media {
        flex-basis: 36%;
    }

    .amp-svc-page .amp-svc-xcard-body {
        padding: 12px 14px;
    }

    .amp-svc-page .amp-svc-xcard-btn {
        height: 40px;
    }
}

/* ---------- section head + result count ---------- */

.amp-svc-page .section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 4px;
}

.amp-svc-page .section-head h2 {
    margin: 0;
    color: var(--sv-navy);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.amp-svc-page .section-head p {
    margin: 3px 0 0;
    color: var(--sv-muted);
    font-size: 13.5px;
}

.amp-svc-page .result-count {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--sv-line);
    border-radius: 999px;
    background: #fff;
    color: var(--sv-navy);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.amp-svc-page .result-count ion-icon {
    color: var(--sv-orange);
    font-size: 15px;
}

/* ---------- service cards (listing + sponsored block) ---------- */

.amp-svc-page .services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.amp-svc-page .service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--sv-line);
    border-radius: var(--sv-radius);
    background: #fff;
    box-shadow: var(--sv-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.amp-svc-page .service-card:hover {
    transform: translateY(-2px);
    border-color: #d5dde8;
    box-shadow: 0 8px 22px rgba(1, 30, 64, .08);
}

.amp-svc-page .service-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.amp-svc-page .service-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9eef4;
}

.amp-svc-page .service-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.amp-svc-page .service-card:hover .service-image-wrapper img {
    transform: scale(1.03);
}

.amp-svc-page .service-image-overlay {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(1, 30, 64, .18), rgba(1, 30, 64, 0));
    pointer-events: none;
}

.amp-svc-page .service-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    max-width: calc(100% - 24px);
    padding: 5px 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--sv-navy);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: 0 1px 4px rgba(1, 30, 64, .14);
}

.amp-svc-page .service-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 16px 14px;
}

.amp-svc-page .service-top-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    overflow: hidden;
    color: var(--sv-muted);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amp-svc-page .service-top-meta ion-icon {
    flex: none;
    color: var(--sv-orange);
    font-size: 14px;
}

.amp-svc-page .service-top-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.amp-svc-page .service-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--sv-navy);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .15s ease;
}

.amp-svc-page .service-title:hover {
    color: var(--sv-orange);
}

.amp-svc-page .service-desc {
    display: -webkit-box;
    min-height: 3em;
    margin-top: 6px;
    overflow: hidden;
    color: var(--sv-text);
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.amp-svc-page .service-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--sv-line-soft);
}

.amp-svc-page .service-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.amp-svc-page .service-user-avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    object-fit: cover;
    background: #e6ecf3;
    box-shadow: 0 0 0 1px var(--sv-line);
}

.amp-svc-page .service-user-name {
    display: block;
    max-width: 150px;
    overflow: hidden;
    color: var(--sv-navy);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amp-svc-page a.service-user-name:hover {
    color: var(--sv-orange);
}

.amp-svc-page .service-user-date {
    color: var(--sv-muted);
    font-size: 12px;
    line-height: 1.3;
}

.amp-svc-page .service-view-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--sv-radius-sm);
    background: var(--sv-navy);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease;
}

.amp-svc-page .service-view-btn:hover {
    background: var(--sv-orange);
    color: #fff;
}

.amp-svc-page .service-view-btn ion-icon {
    font-size: 16px;
}

/* empty state */
.amp-svc-page .empty-services {
    padding: 48px 20px;
    border: 1px dashed #d5dde8;
    border-radius: var(--sv-radius);
    background: #fff;
    text-align: center;
}

.amp-svc-page .empty-services-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--sv-orange-soft);
    color: var(--sv-orange);
    font-size: 28px;
}

.amp-svc-page .empty-services h3 {
    margin: 0;
    color: var(--sv-navy);
    font-size: 19px;
    font-weight: 800;
}

.amp-svc-page .empty-services p {
    margin-top: 6px;
    color: var(--sv-muted);
    font-size: 14px;
}

/* sponsored block (main column) */
.amp-svc-page .sponsored-services-box {
    padding: 18px 18px 20px;
    border: 1px solid var(--sv-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--sv-shadow);
}

.amp-svc-page .sponsored-services-head {
    margin-bottom: 14px;
}

.amp-svc-page .sponsored-services-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--sv-orange-soft);
    color: var(--sv-orange-dark);
    font-size: 11.5px;
    font-weight: 700;
}

.amp-svc-page .sponsored-services-head h3 {
    margin: 8px 0 0;
    color: var(--sv-navy);
    font-size: 18px;
    font-weight: 800;
}

.amp-svc-page .sponsored-service-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--sv-navy);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(1, 30, 64, .14);
}

.amp-svc-page .sponsored-service-badge ion-icon {
    color: var(--sv-orange);
}

/* leave room for the "Sponsorisé" badge on the right */
.amp-svc-page .sponsored-services-box .service-badge {
    max-width: calc(100% - 132px);
}

/* ---------- right column cards ---------- */

.amp-svc-page .sidebar-card {
    padding: 18px;
    border: 1px solid var(--sv-line);
    border-radius: var(--sv-radius);
    background: #fff;
    box-shadow: var(--sv-shadow);
}

.amp-svc-page .sidebar-title {
    margin: 0;
    color: var(--sv-navy);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.amp-svc-page .side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.amp-svc-page .side-card-icon-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--sv-muted);
    font-size: 17px;
    transition: background-color .15s ease, color .15s ease;
}

.amp-svc-page .side-card-icon-btn:hover {
    background: var(--sv-field);
    color: var(--sv-navy);
}

/* "Je cherche" */
.amp-svc-page .filter-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--sv-line-soft);
}

.amp-svc-page .filter-head .sidebar-title {
    font-size: 17px;
}

.amp-svc-page .sidebar-sub-link {
    color: var(--sv-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color .15s ease, text-decoration-color .15s ease;
}

.amp-svc-page .sidebar-sub-link:hover {
    color: var(--sv-orange);
    text-decoration-color: currentColor;
}

.amp-svc-page .filter-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.amp-svc-page .filter-label {
    display: block;
    margin: 0 0 6px;
    color: var(--sv-text);
    font-size: 12.5px;
    font-weight: 700;
}

.amp-svc-page .filter-input-wrap {
    position: relative;
    display: block;
    margin: 0;
}

.amp-svc-page .filter-input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 17px;
    height: 17px;
    color: var(--sv-faint);
    transform: translateY(-50%);
    pointer-events: none;
}

.amp-svc-page .filter-input-wrap:focus-within .filter-input-icon {
    color: var(--sv-navy);
}

.amp-svc-page .filter-input,
.amp-svc-page .filter-select {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--sv-field-line);
    border-radius: var(--sv-radius-sm);
    background-color: var(--sv-field);
    color: var(--sv-navy);
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.amp-svc-page .filter-input {
    padding-left: 38px;
}

.amp-svc-page .filter-input::placeholder {
    color: var(--sv-faint);
}

.amp-svc-page .filter-select {
    padding-right: 34px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 11px center;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.amp-svc-page .filter-input:hover,
.amp-svc-page .filter-select:hover {
    border-color: #c3cfde;
}

.amp-svc-page .filter-input:focus,
.amp-svc-page .filter-select:focus {
    border-color: var(--sv-navy);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(1, 30, 64, .08);
}

/* Select2 on #villes2 */
.amp-svc-page .filter-card .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--sv-field-line);
    border-radius: var(--sv-radius-sm);
    background: var(--sv-field);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.amp-svc-page .filter-card .select2-container--focus .select2-selection--single,
.amp-svc-page .filter-card .select2-container--open .select2-selection--single {
    border-color: var(--sv-navy);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(1, 30, 64, .08);
}

.amp-svc-page .filter-card .select2-selection__rendered {
    padding: 0 !important;
    color: var(--sv-navy) !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 42px !important;
}

.amp-svc-page .filter-card .select2-selection__placeholder {
    color: var(--sv-faint) !important;
}

.amp-svc-page .filter-card .select2-selection__arrow {
    top: 50% !important;
    right: 8px !important;
    height: 20px !important;
    transform: translateY(-50%);
}

.amp-svc-page .filter-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    margin-top: 4px;
    border: 0;
    border-radius: var(--sv-radius-sm);
    background: var(--sv-orange);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(238, 87, 33, .22);
    transition: background-color .18s ease, box-shadow .18s ease;
}

.amp-svc-page .filter-submit:hover {
    background: var(--sv-orange-dark);
    box-shadow: 0 4px 12px rgba(238, 87, 33, .26);
}

.amp-svc-page .filter-submit:focus-visible,
.amp-svc-page .service-view-btn:focus-visible,
.amp-svc-page .btn-pill:focus-visible,
.amp-svc-page .amp-promo-btn:focus-visible {
    outline: 2px solid var(--sv-orange);
    outline-offset: 2px;
}

/* "Vous connaissez peut-être" */
.amp-svc-page .side-list {
    display: flex;
    flex-direction: column;
    margin-top: 12px !important;
}

.amp-svc-page .side-list-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.amp-svc-page .side-list-item + .side-list-item {
    border-top: 1px solid var(--sv-line-soft);
}

.amp-svc-page .side-list-item:first-child {
    padding-top: 2px;
}

.amp-svc-page .side-list-item:last-child {
    padding-bottom: 0;
}

.amp-svc-page .side-list-image {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    background: #e6ecf3;
    box-shadow: 0 0 0 1px var(--sv-line);
}

.amp-svc-page .side-list-item > .flex-1 {
    min-width: 0;
}

.amp-svc-page .side-list-title {
    margin: 0;
    overflow: hidden;
    color: var(--sv-navy);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amp-svc-page .side-list-info {
    margin-top: 1px;
    color: var(--sv-muted);
    font-size: 12px;
    line-height: 1.3;
}

/* .button (global) sets its own box model: keep these authoritative */
.amp-svc-page .amp-svc-follow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 32px !important;
    min-height: 0 !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: var(--sv-orange) !important;
    color: #fff !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.amp-svc-page .amp-svc-follow:hover {
    background: var(--sv-orange-dark) !important;
}

/* already followed: secondary look */
.amp-svc-page .amp-svc-follow.is-following {
    border: 1px solid var(--sv-line) !important;
    background: #fff !important;
    color: var(--sv-navy) !important;
}

.amp-svc-page .amp-svc-follow.is-following:hover {
    background: var(--sv-field) !important;
}

.amp-svc-page .amp-svc-follow[aria-busy="true"] {
    opacity: .6;
    cursor: progress;
}

/* small sliders: "Sponsoriser" + "Services sponsorisés" */
.amp-svc-page .side-slider {
    margin-top: 14px;
}

.amp-svc-page .side-slide-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #e9eef4;
}

.amp-svc-page .side-slide-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.amp-svc-page .side-slide-tag {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--sv-navy);
    font-size: 10.5px;
    font-weight: 700;
}

.amp-svc-page .side-slide-tag.is-sponsored {
    color: var(--sv-orange-dark);
}

.amp-svc-page .side-slide-name {
    margin-top: 8px;
    overflow: hidden;
    color: var(--sv-navy);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amp-svc-page .side-slide-meta {
    margin-top: 2px;
    overflow: hidden;
    color: var(--sv-muted);
    font-size: 11.5px;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amp-svc-page .side-slider-nav {
    position: absolute;
    top: 34%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--sv-navy);
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(1, 30, 64, .18);
    transform: translateY(-50%);
    transition: background-color .15s ease, color .15s ease;
}

.amp-svc-page .side-slider-nav:hover {
    background: var(--sv-orange);
    color: #fff;
}

.amp-svc-page .side-slider-nav.is-prev {
    left: 6px;
}

.amp-svc-page .side-slider-nav.is-next {
    right: 6px;
}

/* À propos */
.amp-svc-page .about-box {
    background: #fff;
}

.amp-svc-page .about-box .text-sm {
    color: var(--sv-muted) !important;
    font-size: 13.5px;
    line-height: 1.6;
}

/* ---------- tablet ---------- */

@media (max-width: 1023px) {
    .amp-svc-page .services-right-col {
        width: 100%;
        margin-top: 20px;
    }

    .amp-svc-page .sidebar-card {
        min-width: 0;
    }
}

/* below `sm` the right column is a grid without template: without this its single
   track sizes to the (nowrap) slide titles and the page overflows */
@media (max-width: 639px) {
    .amp-svc-page .services-right-col > div {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .amp-svc-page .services-hero-photo {
        width: 54%;
    }

    .amp-svc-page .services-hero-copy {
        max-width: 60%;
    }
}

/* ---------- mobile (kept close to the previous behaviour) ---------- */

@media (max-width: 767px) {
    .amp-svc-page .page-shell {
        padding: 8px 2px 32px;
    }

    .amp-svc-page .services-main-stack {
        gap: 16px;
    }

    .amp-svc-page .services-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .amp-svc-page .service-bottom {
        flex-wrap: wrap;
    }

    .amp-svc-page .section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 639px) {
    /* photo on top, text and buttons below on navy */
    .amp-svc-page .services-hero {
        min-height: 0;
        gap: 14px;
        padding: 0 16px 18px;
    }

    .amp-svc-page .services-hero::before {
        display: none;
    }

    .amp-svc-page .services-hero-photo {
        position: relative;
        z-index: 0;
        width: calc(100% + 32px);
        height: 150px;
        margin: 0 -16px;
    }

    .amp-svc-page .services-hero-copy {
        max-width: none;
    }

    .amp-svc-page .services-hero-title {
        font-size: 21px;
    }

    .amp-svc-page .services-hero-actions > a {
        flex: 1 1 150px;
    }

    .amp-svc-page .amp-promo-alert {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .amp-svc-page .amp-promo-photo {
        width: 96px;
        height: 84px;
        border-radius: 10px;
    }

    .amp-svc-page .amp-promo-btn {
        grid-column: 1 / -1;
        width: 100%;
        height: 42px;
    }
}
