/* Homepage refinements: keep the existing fonts, content and component sizes. */
body.tsg-layout-home,
.tsg-elementor-page {
    --tsg-ui-purple: var(--tsg-primary, #3b1e7b);
}

body.tsg-layout-home .tsg-hero__copy > h1,
.tsg-elementor-page .tsg-hero__copy > h1 {
    color: var(--tsg-ui-purple) !important;
    -webkit-text-fill-color: var(--tsg-ui-purple) !important;
}

/* One brand colour, applied at render time; stored place accents are preserved. */
body.tsg-layout-home .tsg-map360__place-dot,
body.tsg-layout-home .tsg-map360__legend i,
.tsg-elementor-page .tsg-map360__place-dot,
.tsg-elementor-page .tsg-map360__legend i {
    background: var(--tsg-ui-purple) !important;
    border-color: var(--tsg-ui-purple) !important;
    color: #fff !important;
    box-shadow: 0 5px 12px rgba(59, 30, 123, .15),
        inset 0 1px 0 rgba(255, 255, 255, .24) !important;
}
body.tsg-layout-home .tsg-map-pin,
.tsg-elementor-page .tsg-map-pin {
    --pin: var(--tsg-ui-purple) !important;
    background: var(--tsg-ui-purple) !important;
}
body.tsg-layout-home .tsg-map360__legend button,
.tsg-elementor-page .tsg-map360__legend button {
    background: var(--tsg-ui-purple) !important;
    color: #fff !important;
    border-color: var(--tsg-ui-purple) !important;
    transition: background-color 280ms ease, box-shadow 280ms ease,
        transform 280ms cubic-bezier(.22, 1, .36, 1) !important;
}
body.tsg-layout-home .tsg-map360__legend button:hover,
body.tsg-layout-home .tsg-map360__legend button:focus-visible,
.tsg-elementor-page .tsg-map360__legend button:hover,
.tsg-elementor-page .tsg-map360__legend button:focus-visible {
    background: #4f2b91 !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38),
        0 5px 12px rgba(59, 30, 123, .16) !important;
}
body.tsg-layout-home .tsg-map360__legend button.is-active,
body.tsg-layout-home .tsg-map360__legend button[aria-pressed="true"],
.tsg-elementor-page .tsg-map360__legend button.is-active,
.tsg-elementor-page .tsg-map360__legend button[aria-pressed="true"] {
    background: var(--tsg-ui-purple) !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72),
        0 5px 12px rgba(59, 30, 123, .16) !important;
}

/* The category stays centred on its photograph, including the smaller slides. */
body.tsg-layout-home .tsg-showcase-card__tag,
.tsg-elementor-page .tsg-showcase-card__tag {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    max-width: calc(100% - 28px);
    justify-content: center;
    text-align: center !important;
}

/* Explicit timings make both entry and return gentle. */
body.tsg-layout-home .tsg-quicklinks a,
.tsg-elementor-page .tsg-quicklinks a {
    transition: background-color 360ms ease, box-shadow 360ms ease !important;
}
body.tsg-layout-home .tsg-quicklinks a svg,
body.tsg-layout-home .tsg-quicklinks a > span,
.tsg-elementor-page .tsg-quicklinks a svg,
.tsg-elementor-page .tsg-quicklinks a > span {
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1) !important;
}
body.tsg-layout-home .tsg-service-card,
.tsg-elementor-page .tsg-service-card {
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1),
        box-shadow 420ms ease, border-color 360ms ease !important;
}
body.tsg-layout-home .tsg-service-card__cta b,
.tsg-elementor-page .tsg-service-card__cta b {
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1) !important;
}
body.tsg-layout-home .tsg-service-card--2 .tsg-service-card__main-image,
.tsg-elementor-page .tsg-service-card--2 .tsg-service-card__main-image {
    transition: transform 500ms cubic-bezier(.22, 1, .36, 1) !important;
}
body.tsg-motion-enabled .tsg-identity-motion__moving {
    transition: transform 450ms cubic-bezier(.22, 1, .36, 1) !important;
}
body.tsg-layout-home.tsg-motion-enabled .tsg-service-card:focus-visible,
body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card:focus-visible {
    transform: translateY(-6px) !important;
    border-color: rgba(59, 30, 123, .28) !important;
    box-shadow: inset 0 -3px 0 rgba(59, 30, 123, .3),
        0 24px 48px rgba(59, 30, 123, .13) !important;
}
body.tsg-layout-home.tsg-motion-enabled .tsg-service-card:focus-visible .tsg-service-card__cta b,
body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card:focus-visible .tsg-service-card__cta b {
    transform: translateX(5px) !important;
}
body.tsg-layout-home.tsg-motion-enabled .tsg-quicklinks a:focus-visible,
body.tsg-motion-enabled .tsg-elementor-page .tsg-quicklinks a:focus-visible {
    background: rgba(255, 255, 255, .16) !important;
    box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .55) !important;
}
body.tsg-layout-home.tsg-motion-enabled .tsg-quicklinks a:focus-visible svg,
body.tsg-motion-enabled .tsg-elementor-page .tsg-quicklinks a:focus-visible svg {
    transform: translateY(-3px) rotate(-4deg) !important;
}
@media (hover: hover) and (pointer: fine) {
    body.tsg-layout-home.tsg-motion-enabled .tsg-quicklinks a:hover,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-quicklinks a:hover {
        background: rgba(255, 255, 255, .16) !important;
        box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .55) !important;
    }
    body.tsg-layout-home.tsg-motion-enabled .tsg-quicklinks a:hover svg,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-quicklinks a:hover svg {
        transform: translateY(-3px) rotate(-4deg) !important;
    }
    body.tsg-layout-home.tsg-motion-enabled .tsg-quicklinks a:hover > span,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-quicklinks a:hover > span {
        transform: translateY(-1px) !important;
    }
    body.tsg-layout-home.tsg-motion-enabled .tsg-service-card:hover,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card:hover {
        transform: translateY(-6px) !important;
        border-color: rgba(59, 30, 123, .28) !important;
        box-shadow: inset 0 -3px 0 rgba(59, 30, 123, .3),
            0 24px 48px rgba(59, 30, 123, .13) !important;
    }
    body.tsg-layout-home.tsg-motion-enabled .tsg-service-card:hover .tsg-service-card__cta b,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card:hover .tsg-service-card__cta b {
        transform: translateX(5px) !important;
    }
    body.tsg-layout-home.tsg-motion-enabled .tsg-service-card--2:hover .tsg-service-card__main-image,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card--2:hover .tsg-service-card__main-image {
        transform: translateY(-3px) !important;
    }
}

/* A larger poster sits a little higher; the four-item panel stays centred. */
@media (min-width: 1051px) {
    body.tsg-layout-home .tsg-agenda-speciality__stage,
    .tsg-elementor-page .tsg-agenda-speciality__stage {
        grid-template-columns: 48% minmax(0, 1fr) !important;
    }
    body.tsg-layout-home .tsg-agenda-speciality__feature,
    .tsg-elementor-page .tsg-agenda-speciality__feature {
        transform: translateY(-14px) !important;
    }
}
@media (min-width: 821px) and (max-width: 1050px) {
    body.tsg-layout-home .tsg-agenda-speciality__stage,
    .tsg-elementor-page .tsg-agenda-speciality__stage {
        grid-template-columns: 52% minmax(0, 1fr) !important;
    }
    body.tsg-layout-home .tsg-agenda-speciality__feature,
    .tsg-elementor-page .tsg-agenda-speciality__feature {
        transform: translateY(-10px) !important;
    }
}

/* Honour the site's own motion switch as well as the device preference. */
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-service-card:hover,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-service-card:focus-visible,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-service-card:hover,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-service-card:focus-visible,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-service-card:hover .tsg-service-card__art img,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-service-card:hover .tsg-service-card__art img {
    transform: none !important;
}
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-service-card,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-quicklinks a,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-quicklinks a svg,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-quicklinks a > span,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-service-card__cta b,
body.tsg-layout-home:not(.tsg-motion-enabled) .tsg-service-card--2 .tsg-service-card__main-image,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-service-card,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-quicklinks a,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-quicklinks a svg,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-quicklinks a > span,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-service-card__cta b,
body:not(.tsg-motion-enabled) .tsg-elementor-page .tsg-service-card--2 .tsg-service-card__main-image {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body.tsg-layout-home .tsg-quicklinks a,
    body.tsg-layout-home .tsg-quicklinks a svg,
    body.tsg-layout-home .tsg-quicklinks a > span,
    body.tsg-layout-home .tsg-service-card,
    body.tsg-layout-home .tsg-service-card__cta b,
    body.tsg-layout-home .tsg-service-card__main-image,
    body.tsg-layout-home .tsg-map360__legend button,
    .tsg-elementor-page .tsg-quicklinks a,
    .tsg-elementor-page .tsg-quicklinks a svg,
    .tsg-elementor-page .tsg-quicklinks a > span,
    .tsg-elementor-page .tsg-service-card,
    .tsg-elementor-page .tsg-service-card__cta b,
    .tsg-elementor-page .tsg-service-card__main-image,
    .tsg-elementor-page .tsg-map360__legend button,
    body.tsg-motion-enabled .tsg-identity-motion__moving {
        transition: none !important;
    }
    body.tsg-layout-home .tsg-service-card:hover,
    body.tsg-layout-home .tsg-service-card:focus-visible,
    body.tsg-layout-home .tsg-quicklinks a svg,
    body.tsg-layout-home .tsg-quicklinks a > span,
    body.tsg-layout-home .tsg-service-card__cta b,
    body.tsg-layout-home .tsg-service-card--2 .tsg-service-card__main-image,
    .tsg-elementor-page .tsg-service-card:hover,
    .tsg-elementor-page .tsg-service-card:focus-visible,
    .tsg-elementor-page .tsg-quicklinks a svg,
    .tsg-elementor-page .tsg-quicklinks a > span,
    .tsg-elementor-page .tsg-service-card__cta b,
    .tsg-elementor-page .tsg-service-card--2 .tsg-service-card__main-image {
        transform: none !important;
        transition: none !important;
    }
    body.tsg-layout-home .tsg-service-card:hover .tsg-service-card__art .tsg-service-card__main-image,
    body.tsg-layout-home .tsg-service-card:focus-visible .tsg-service-card__art .tsg-service-card__main-image,
    .tsg-elementor-page .tsg-service-card:hover .tsg-service-card__art .tsg-service-card__main-image,
    .tsg-elementor-page .tsg-service-card:focus-visible .tsg-service-card__art .tsg-service-card__main-image {
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    /* Match the enabled hover selectors so reduced motion wins the cascade. */
    body.tsg-layout-home.tsg-motion-enabled .tsg-service-card:is(:hover, :focus-visible),
    body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card:is(:hover, :focus-visible),
    body.tsg-layout-home.tsg-motion-enabled .tsg-quicklinks a:is(:hover, :focus-visible) :is(svg, span),
    body.tsg-motion-enabled .tsg-elementor-page .tsg-quicklinks a:is(:hover, :focus-visible) :is(svg, span),
    body.tsg-layout-home.tsg-motion-enabled .tsg-service-card:is(:hover, :focus-visible) .tsg-service-card__cta b,
    body.tsg-motion-enabled .tsg-elementor-page .tsg-service-card:is(:hover, :focus-visible) .tsg-service-card__cta b {
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}


/* V1.7.91 — Carte : boutons clairs, violet réservé aux badges emoji. */
body.tsg-layout-home .tsg-map360__legend button,
.tsg-elementor-page .tsg-map360__legend button {
    background: #f8f6fc !important;
    color: var(--tsg-ui-purple, var(--tsg-primary, #3b1e7b)) !important;
    border-color: rgba(59, 30, 123, .10) !important;
    box-shadow: none !important;
}
body.tsg-layout-home .tsg-map360__legend button:hover,
body.tsg-layout-home .tsg-map360__legend button:focus-visible,
.tsg-elementor-page .tsg-map360__legend button:hover,
.tsg-elementor-page .tsg-map360__legend button:focus-visible {
    background: #f1ebf8 !important;
    color: var(--tsg-ui-purple, var(--tsg-primary, #3b1e7b)) !important;
    box-shadow: inset 0 0 0 1px rgba(59, 30, 123, .16) !important;
}
body.tsg-layout-home .tsg-map360__legend button.is-active,
body.tsg-layout-home .tsg-map360__legend button[aria-pressed="true"],
.tsg-elementor-page .tsg-map360__legend button.is-active,
.tsg-elementor-page .tsg-map360__legend button[aria-pressed="true"] {
    background: #eee7f7 !important;
    color: var(--tsg-ui-purple, var(--tsg-primary, #3b1e7b)) !important;
    border-color: rgba(59, 30, 123, .28) !important;
    box-shadow: inset 0 0 0 1px rgba(59, 30, 123, .22) !important;
}
body.tsg-layout-home .tsg-map360__legend button:focus-visible,
.tsg-elementor-page .tsg-map360__legend button:focus-visible {
    outline: 2px solid var(--tsg-ui-purple, var(--tsg-primary, #3b1e7b)) !important;
    outline-offset: 2px !important;
}
/* Keep the original badge dimensions, place data and filtering untouched. */
body.tsg-layout-home .tsg-map360__legend button > i,
.tsg-elementor-page .tsg-map360__legend button > i {
    background: var(--tsg-ui-purple, var(--tsg-primary, #3b1e7b)) !important;
    border-color: var(--tsg-ui-purple, var(--tsg-primary, #3b1e7b)) !important;
    color: #fff !important;
}

/* V1.7.91 — Align the two agenda surfaces without changing their images. */
@media (min-width: 821px) {
    body.tsg-layout-home .tsg-agenda-speciality__stage,
    .tsg-elementor-page .tsg-agenda-speciality__stage {
        align-items: stretch !important;
    }
    body.tsg-layout-home .tsg-agenda-speciality__feature,
    .tsg-elementor-page .tsg-agenda-speciality__feature {
        align-self: stretch !important;
        min-height: 100% !important;
        transform: none !important;
    }
    body.tsg-layout-home .tsg-agenda-speciality__menu,
    .tsg-elementor-page .tsg-agenda-speciality__menu {
        align-self: stretch !important;
        display: flex !important;
        flex-direction: column !important;
    }
    body.tsg-layout-home .tsg-agenda-speciality__item,
    .tsg-elementor-page .tsg-agenda-speciality__item {
        flex: 1 0 auto;
    }
    body.tsg-layout-home .tsg-agenda-speciality__footer,
    .tsg-elementor-page .tsg-agenda-speciality__footer {
        flex: 0 0 auto;
    }
}


/* V1.7.93 — More readable subtitles in the moving news cards. */
body.tsg-layout-home .tsg-showcase-card__meta p,
.tsg-elementor-page .tsg-showcase-card__meta p {
    font-weight: 600 !important;
}


/* V1.7.94 — A shorter desktop agenda with the same aligned surfaces. */
@media (min-width: 1051px) {
    body.tsg-layout-home .tsg-agenda-speciality__stage,
    .tsg-elementor-page .tsg-agenda-speciality__stage {
        min-height: 0 !important;
    }
    body.tsg-layout-home .tsg-agenda-speciality__feature,
    .tsg-elementor-page .tsg-agenda-speciality__feature {
        aspect-ratio: 5 / 4 !important;
    }
}
