/* Listing page additions (owner request 04/12/2026): trust badges, service details, availability,
   service area map and the reviews section. Loaded after the listing bundles. */
.ak-detail-service {
    --svc-ink: #17162e;
    --svc-muted: #5a5870;
    --svc-line: #e7e3ef;
    --svc-violet: #6d28d9;
    --svc-violet-dark: #4c1d95;
    --svc-tint: #f3edff;
    --svc-paper: #fff;
}
html[data-theme="dark"] .ak-detail-service {
    --svc-ink: #f6f3ff;
    --svc-muted: #cdc6dd;
    --svc-line: #3b3450;
    --svc-tint: #302346;
    --svc-paper: #1e192d;
}

/* Provider card: rating and badges */
.ak-service-provider__rating { display: flex; align-items: center; gap: .3rem; margin: .5rem 0 0; color: var(--svc-ink); font-size: .9rem; }
.ak-service-provider__rating span { color: #f59e0b; }
.ak-service-provider__rating a { color: var(--svc-violet); text-decoration: underline; text-underline-offset: 2px; }
.ak-service-provider__badges { display: flex; flex-wrap: wrap; gap: .35rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.svc-badge { display: inline-flex; align-items: center; gap: .3rem; min-block-size: 26px; padding: .2rem .55rem; border: 1px solid var(--svc-line); border-radius: 999px; background: var(--svc-paper); color: var(--svc-ink); font-size: .76rem; font-weight: 650; line-height: 1.2; }
.svc-badge svg { flex: none; color: var(--svc-violet); }
.svc-badge--email-verified svg, .svc-badge--id-verified svg, .svc-badge--phone-verified svg { color: #047857; }
.svc-badge--top-provider svg, .svc-badge--highly-rated svg { color: #b45309; }
.svc-badge--plan-gold { border-color: #f5d27a; background: #fff8e6; color: #7a5300; }
.svc-badge--plan-gold svg { color: #b7791f; }
.svc-badge--plan-diamond { border-color: #c7d2fe; background: #eef2ff; color: #3730a3; }
.svc-badge--plan-diamond svg { color: #4f46e5; }

/* Service details (answers of the publication form) */
.svc-details__list { display: grid; gap: .1rem; margin: .75rem 0 0; }
.svc-details__row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .35rem 1rem; padding-block: .7rem; border-block-start: 1px solid var(--svc-line); }
.svc-details__row:first-child { border-block-start: 0; }
.svc-details__row dt { color: var(--svc-muted); font-size: .9rem; font-weight: 600; }
.svc-details__row dd { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
@media (max-width: 40rem) { .svc-details__row { grid-template-columns: minmax(0, 1fr); } }

/* Availability grid */
.svc-availability__scroll { margin-block-start: .75rem; overflow-x: auto; }
.svc-availability__grid { inline-size: 100%; min-inline-size: 30rem; border-collapse: separate; border-spacing: 4px; }
.svc-availability__grid th { color: var(--svc-muted); font-size: .8rem; font-weight: 650; text-align: center; white-space: nowrap; }
.svc-availability__grid tbody th { padding-inline-end: .5rem; text-align: start; }
.svc-slot { display: grid; place-items: center; block-size: 34px; border-radius: 8px; background: #f5f4f8; color: transparent; font-weight: 700; }
.svc-slot.is-on { background: var(--svc-tint); color: var(--svc-violet); }
.svc-availability__note { margin: .6rem 0 0; color: var(--svc-muted); font-size: .82rem; }

/* Service area map */
.svc-area__head { display: flex; align-items: flex-start; gap: .75rem; }
.svc-area__head .section-title { margin: 0; }
.svc-area__lead { margin: .3rem 0 0; color: var(--svc-muted); font-size: .95rem; }
.svc-area__map { position: relative; margin: 1rem 0 0; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--svc-line); border-radius: 14px; background: linear-gradient(135deg, #f6f3fd, #eef3fb); }
.svc-area__canvas { position: absolute; inset: 0; z-index: 1; }
.svc-area__canvas .leaflet-tile-pane { filter: grayscale(.45) saturate(.85) brightness(1.04); }
.svc-area__placeholder { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: .4rem; color: var(--svc-muted); font-size: .85rem; pointer-events: none; }
.svc-area__unavailable { display: none; }
.svc-area__map.is-ready .svc-area__placeholder { display: none; }
.svc-area__map.is-unavailable .svc-area__loading { display: none; }
.svc-area__map.is-unavailable .svc-area__unavailable { display: inline; }
.svc-area__map .leaflet-control-attribution { font-size: 10px; }
.svc-area__more { display: inline-flex; align-items: center; gap: .3rem; min-block-size: 2.75rem; margin-block-start: .5rem; color: var(--svc-violet); font-weight: 650; text-decoration: none; }
.svc-area__more:hover { text-decoration: underline; }
@media (max-width: 40rem) { .svc-area__map { aspect-ratio: 4 / 3; } }

/* Reviews */
.svc-reviews__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-block-end: 1rem; }
.svc-reviews__count { color: var(--svc-muted); font-weight: 600; }
.svc-reviews__score { display: flex; align-items: center; gap: .35rem; margin: .35rem 0 0; color: var(--svc-ink); }
.svc-stars { color: #f59e0b; letter-spacing: .05em; }
.svc-reviews__empty { margin: 0; color: var(--svc-muted); }
.ak-detail-service .sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* The page's base CSS caps img/svg (max-width 100%, 1.5rem icons): not for the map's tiles and layers. */
.svc-area__map .leaflet-container img, .svc-area__map .leaflet-container svg { max-width: none !important; max-height: none !important; }
/* .svc-page svg sizes every icon to 1rem: Leaflet's vector layer keeps the size it sets itself. */
.svc-page .svc-area__map .leaflet-container svg { width: auto; height: auto; }

/* Section links on phones: five links now (Zone, Avis added), so they scroll sideways in one line
   instead of breaking words ("Présentat ion"). */
@media (max-width: 40rem) {
    html body.ak-universal #main-content .ak-detail-service .profile-section-nav-wrap .profile-section-nav {
        display: flex;
        flex-wrap: nowrap;
        flex: 1 1 0;
        min-inline-size: 0;
        gap: 0 18px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
        padding-inline-end: 24px;
    }
    html body.ak-universal #main-content .ak-detail-service .profile-section-nav-wrap .profile-section-nav::-webkit-scrollbar { display: none; }
    html body.ak-universal #main-content .ak-detail-service .profile-section-nav-wrap .profile-section-nav a {
        flex: none;
        white-space: nowrap;
        overflow-wrap: normal;
    }
    html[dir="rtl"] body.ak-universal #main-content .ak-detail-service .profile-section-nav-wrap .profile-section-nav {
        -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent);
    }
}

/* ── Top of the listing (owner, 04/12/2026: "plus pro, plus clair, avec des emoji") ───────── */
.svc-hero-chip { display: inline-flex; align-items: center; gap: .3rem; min-block-size: 28px; padding: .2rem .65rem; border: 1px solid var(--svc-line); border-radius: 999px; background: var(--svc-paper); color: var(--svc-ink); font-size: .8rem; font-weight: 650; }
.ak-detail-service .ak-service-summary .pill.pill-green { gap: .3rem; }
.svc-keyfacts { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.svc-keyfacts li { display: inline-flex; align-items: center; gap: .35rem; min-block-size: 32px; padding: .25rem .7rem; border: 1px solid var(--svc-line); border-radius: 10px; background: var(--svc-paper); color: var(--svc-ink); font-size: .86rem; line-height: 1.25; }
.svc-keyfacts li strong { font-weight: 750; }
.svc-keyfacts a { color: var(--svc-violet); text-decoration: underline; text-underline-offset: 2px; }
.svc-hero-photo { position: relative; display: block; align-self: stretch; min-inline-size: 0; overflow: hidden; border: 1px solid var(--svc-line); border-radius: 14px; background: var(--svc-tint); }
.svc-hero-photo img { display: block; inline-size: 100%; block-size: 100%; min-block-size: 140px; object-fit: cover; }
.svc-hero-photo__count { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; padding: .15rem .5rem; border-radius: 999px; background: rgba(23, 22, 46, .78); color: #fff; font-size: .75rem; font-weight: 700; }
html body.ak-universal #main-content .ak-detail-service .ak-service-summary--themed:has(.svc-hero-photo) { grid-template-columns: minmax(0, 1fr) clamp(150px, 19vw, 260px); }

/* Provider card */
.svc-avatar { position: relative; flex: none; display: inline-block; }
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-avatar .profile-portrait__photo { inline-size: 60px !important; block-size: 60px !important; border-radius: 50%; object-fit: cover; border: 2px solid var(--svc-paper); box-shadow: 0 0 0 1px var(--svc-line); }
.svc-avatar__dot { position: absolute; inset-block-end: 2px; inset-inline-end: 2px; inline-size: 14px; block-size: 14px; border: 2px solid var(--svc-paper); border-radius: 50%; background: #9ca3af; }
.svc-avatar__dot.is-online { background: #16a34a; }
.svc-presence { margin: .2rem 0 0; color: var(--svc-muted); font-size: .82rem; }
.ak-service-provider .profile-portrait__location { display: flex; align-items: center; gap: .25rem; }
.svc-checks { margin-block-start: .85rem; padding-block-start: .75rem; border-block-start: 1px solid var(--svc-line); }
.svc-checks__title { margin: 0; color: var(--svc-muted); font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.svc-checks .ak-service-provider__badges { margin-block-start: .45rem; }
.svc-checks__none { margin: .35rem 0 0; color: var(--svc-muted); font-size: .84rem; }
.svc-badge > span[aria-hidden] { font-size: .9rem; line-height: 1; }
.svc-badge--email-verified, .svc-badge--id-verified, .svc-badge--phone-verified { border-color: #bbe5cf; background: #f0faf4; color: #065f46; }
.svc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin: .85rem 0 0; }
.svc-stats > div { min-inline-size: 0; padding: .5rem .55rem; border: 1px solid var(--svc-line); border-radius: 10px; background: var(--svc-paper); }
.svc-stats dt { overflow: hidden; color: var(--svc-muted); font-size: .7rem; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.svc-stats dd { margin: .15rem 0 0; color: var(--svc-ink); font-size: .9rem; font-weight: 750; }
.svc-stats dd a { color: var(--svc-violet); }
.ak-service-provider__price dt { display: inline-flex; align-items: center; gap: .3rem; }

/* Details: one emoji per row, neutral tags */
.svc-details__row dt { display: flex; align-items: flex-start; gap: .45rem; }
.svc-details__emoji { flex: none; inline-size: 1.4rem; text-align: center; }
.svc-tag { display: inline-flex; align-items: center; min-block-size: 28px; padding: .2rem .6rem; border: 1px solid var(--svc-line); border-radius: 8px; background: #faf9fc; color: var(--svc-ink); font-size: .85rem; }
html[data-theme="dark"] .svc-tag { background: var(--svc-paper); }

/* Related cards: listing photo, or the category emoji (no more "PR", "ET" initials) */
.ak-detail-service .sim-thumb.sim-thumb--photo { padding: 0; object-fit: cover; }
html body.ak-universal #main-content .ak-service-related img.sim-thumb { object-fit: cover; }
.ak-detail-service .sim-thumb.sim-thumb--emoji { font-size: 1.35rem; line-height: 1; }

@media (max-width: 40rem) {
    .svc-hero-photo { grid-column: 2; grid-row: 1 / span 2; }
    .svc-hero-photo img { min-block-size: 74px; }
    html body.ak-universal #main-content .ak-detail-service .ak-service-summary--themed:has(.svc-hero-photo) { grid-template-columns: minmax(0, 1fr) 96px; }
    .svc-keyfacts li { font-size: .82rem; }
    .svc-stats dt { white-space: normal; }
}

/* The hero's old rule `.svc-page > section:first-child :is(h1, p, span) { color: inherit }` made
   the new chips and provider texts inherit the hero's light text colour: set them explicitly. */
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-hero-chip { color: var(--svc-ink); -webkit-text-fill-color: var(--svc-ink); }
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-presence,
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-checks__title,
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-checks__none { color: var(--svc-muted); -webkit-text-fill-color: var(--svc-muted); }
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-hero-photo__count { color: #fff; -webkit-text-fill-color: #fff; }
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-keyfacts li,
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-stats dd { color: var(--svc-ink); -webkit-text-fill-color: var(--svc-ink); }
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-stats dt { color: var(--svc-muted); -webkit-text-fill-color: var(--svc-muted); }
/* Avatar column: 60px (was 44px), avatar and presence dot aligned. */
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .ak-service-provider__identity { grid-template-columns: 60px minmax(0, 1fr); align-items: center; }
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-avatar { display: block; inline-size: 60px; block-size: 60px; line-height: 0; }
/* The availability table scrolls inside its card instead of widening the page column (a phone
   showed the page at 530px: the table's 30rem minimum pushed the main column out). */
/* position: relative keeps the screen-reader labels (.sr-only, absolute) inside the scroller:
   without it they were placed against the page and widened it to 476px on a phone. */
.svc-availability__scroll { position: relative; contain: inline-size; }
.svc-availability__grid td { position: relative; }
@media (max-width: 40rem) {
    .svc-availability__grid { min-inline-size: 21rem; border-spacing: 3px; }
    .svc-availability__grid th { font-size: .72rem; white-space: normal; }
    .svc-slot { block-size: 28px; }
}
/* Same inherited light colour hid the specialty line under the title. */
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .ak-service-summary__specialty { color: var(--cat-color, var(--svc-violet)); -webkit-text-fill-color: var(--cat-color, var(--svc-violet)); font-weight: 650; }
/* The provider card is a grid on some widths: checks and stats span the whole card. */
.ak-service-provider .svc-checks, .ak-service-provider .svc-stats { grid-column: 1 / -1; }
.ak-service-provider .svc-checks, .ak-service-provider .svc-stats { inline-size: 100%; }
html body.ak-universal #main-content .ak-detail-service .ad-service-hero .svc-stats dt { white-space: normal; text-overflow: clip; }

/* ── No empty space (owner, 04/12/2026: "corrige les espaces vides") ─────────────────────────
   The provider card moved from the hero to the side column: the hero spans the full width at
   its own height, and the side column (provider card, facts, report link) follows the reader. */
html body.ak-universal #main-content .ak-detail-service .ak-service-summary-grid { grid-template-columns: minmax(0, 1fr); }
html body.ak-universal #main-content .ak-detail-service .ak-service-summary--themed { min-block-size: 0; }
html body.ak-universal #main-content .ak-detail-service .ak-service-summary .profile-service-lead { max-inline-size: 70ch; }
@media (min-width: 1024px) {
    html body.ak-universal #main-content .ak-detail-service .ak-service-content__aside { align-self: stretch; }
}
@media (min-width: 1024px) and (min-height: 900px) {
    html body.ak-universal #main-content .ak-detail-service .ak-service-content__aside .sticky-aside { position: sticky; top: 140px; }
}
@media (max-width: 800px) {
    /* One column: the provider card right after the hero, facts and report link after the content. */
    html body.ak-universal #main-content .ak-detail-service .ak-service-content__aside,
    html body.ak-universal #main-content .ak-detail-service .ak-service-content__aside .sticky-aside { display: contents; }
    html body.ak-universal #main-content .ak-detail-service .ak-service-content > .ak-service-content__main { order: 0; }
    html body.ak-universal #main-content .ak-detail-service .ak-service-content__aside .ak-service-provider { order: -1; margin: 0; }
    html body.ak-universal #main-content .ak-detail-service .ak-service-content__aside .sticky-aside > :not(.ak-service-provider) { order: 1; margin: 0; }
}
/* Provider card texts outside the hero: the colours no longer come from the hero rules. */
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-presence,
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-checks__title,
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-checks__none,
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-stats dt { color: var(--svc-muted); -webkit-text-fill-color: var(--svc-muted); }
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-stats dd { color: var(--svc-ink); -webkit-text-fill-color: var(--svc-ink); }
/* Links inside facts and stats keep the link colour (text-fill-color is inherited). */
html body.ak-universal #main-content .ak-detail-service .svc-keyfacts a,
html body.ak-universal #main-content .ak-detail-service .svc-stats dd a { color: var(--svc-violet); -webkit-text-fill-color: var(--svc-violet); text-decoration: underline; text-underline-offset: 2px; }
/* Listing facts line in "En pratique" */
.svc-listing-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .75rem 0 0; padding-block-start: .7rem; border-block-start: 1px solid var(--svc-line); color: var(--svc-muted); font-size: .85rem; }
.svc-listing-meta > span { display: inline-flex; align-items: center; gap: .3rem; }
html body.ak-universal #main-content .ak-detail-service .ak-service-provider .svc-stats dt { white-space: normal; text-overflow: clip; overflow: visible; }
@media (max-width: 40rem) {
    html body.ak-universal #main-content .ak-detail-service .profile-section-nav-wrap { flex-wrap: nowrap; align-items: center; }
}
