html {
    scroll-behavior: smooth;
}

#satisfaction-block {
    scroll-margin-top: 1rem;
}

:root {
    --color-bg: #e1ebff;
    --color-surface: #faebe7;
    --color-primary: #1565a3;
    --color-primary-hover: #0d4a7a;
    --color-primary-muted: #e3eef6;
    --color-secondary-light: #e4ffef;
    --color-border: #c5d9e8;
    --color-border-light: #e8f0f6;
    --color-text: #1a1a1a;
    --color-text-muted: #555;
    --color-text-soft: #888;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
    --shadow-sm: 0 1px 3px rgba(21, 101, 163, 0.06);
    --shadow-md: 0 4px 12px rgba(21, 101, 163, 0.08);
    --transition: 0.2s ease;
}

@font-face {
    font-family: 'Value Serif';
    src: url('./fonts/Value_Serif.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--color-bg);
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    color: var(--color-text);
    text-align: center;
}

h1 {
    font-family: 'Value Serif', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

p {
    font-size: 1rem;
    max-width: 600px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
}

h1+p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

a {
    font-size: 1rem;
    text-decoration: none;
    color: var(--color-primary);
    cursor: pointer;
    font-family: 'Value Serif', serif;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

/* Homepage two-column split */
.home-page {
    align-items: stretch;
    justify-content: flex-start;
}

.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
    gap: 0;
    padding: 0;
    box-sizing: border-box;
}

.home-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 2.5rem 4vw;
    box-sizing: border-box;
}

.home-col-banners {
    background-color: var(--color-surface);
}

.home-col-main h1 {
    max-width: 100%;
}

.home-col-main p {
    max-width: 36rem;
    width: 100%;
}

.home-donate {
    margin-top: 1.25rem;
}

.home-donate-btn {
    text-align: center;
    border: none;
    border-radius: 5rem;
    min-width: 0;
    padding: 0 1.1rem;
    height: 2.25rem;

    background-color: #000;
    color: #fff;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.2rem;
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
}

.home-donate-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.home-contact {
    margin-bottom: 0;
}

.home-banner-group {
    width: 100%;
    max-width: 28rem;
}

.home-banner-group + .home-banner-group {
    margin-top: 1.5rem;
}

.home-now-title {
    font-size: 1rem;
    font-weight: normal;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0 0 0.75rem;
    width: 100%;
    text-align: left;
    text-decoration: underline;
}

/* In the slider, the calendar title matches the other slide titles */
.home-slide .home-now-title {
    font-family: 'Value Serif', serif;
    font-size: clamp(2.4rem, 4.6vw, 4rem);
    line-height: 1.05;
    color: var(--color-text);
    text-decoration: none;
    margin: 0 0 1.5rem;
}

.home-bulletins {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.home-bulletins li + li {
    margin-top: 0.35rem;
}

.home-col-banners .banners {
    width: 100%;
    max-width: none;
    margin: 0;
}

.home-col-banners .banner {
    width: 100%;
    max-width: none;
}

/* Right column: vertical slider (Halloween, then actions + calendar) */
.home-col-banners.home-slider {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    min-width: 0;
}

.home-slides {
    position: relative;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.home-slides::-webkit-scrollbar {
    display: none;
}

.home-slide {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    overflow: hidden;
}

.home-slide.home-col {
    overflow-y: auto;
}

.home-slide-halloween {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--halloween-bg-deep) 0%, var(--halloween-bg) 55%, var(--halloween-bg-deep) 100%);
    color: #fff;
}

.home-slide-halloween .halloween-moon {
    width: clamp(3.5rem, 7vw, 5.5rem);
}

.home-hw-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Even spacing between the blocks, tighter on short screens */
    gap: min(1.5rem, 2.8vh);
    padding: 2.5rem 2rem 1rem;
}

.home-hw-partners {
    font-family: 'Value Serif', serif;
    font-size: 1.05rem;
    color: #fff;
    max-width: none;
    margin: 0;
}

.home-hw-brand {
    display: block;
    font-size: 1.5rem;
    white-space: nowrap;
}

.home-hw-title {
    font-family: 'Creepster', 'Value Serif', cursive;
    font-weight: normal;
    /* Sized to the column so "La magie d’Halloween" stays on one line */
    font-size: clamp(2.2rem, calc(5.6vw - 8px), 4.4rem);
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--halloween-orange);
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
    margin: 0;
}

.home-slide-halloween .halloween-date {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    margin: 0;
}

.home-hw-intro {
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-weight: 700;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.3;
    color: #fff;
    max-width: 26rem;
    margin: 0 auto;
}

.home-slide-halloween /* "Balade aux bonbons" in the title font */
.halloween-highlight {
    font-family: 'Creepster', 'Value Serif', cursive;
    font-weight: normal;
    font-size: 1.3em;
    letter-spacing: 0.03em;
    color: var(--halloween-orange);
    white-space: nowrap;
}

.halloween-steps {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    margin: 0 auto;
}

.home-slide-halloween .halloween-step-icon {
    width: 1.75rem;
    height: 1.75rem;
}

.home-slide-halloween .halloween-btn {
    font-size: 1.25rem;
    padding: 0.7rem 2.25rem;
    margin-top: 0.75rem;
}

.home-hw-visual {
    display: block;
    /* Shrinks on short screens by cropping, keeping the kids' faces; never upscaled */
    flex: 0 1 auto;
    min-height: 140px;
    width: 100%;
    max-width: 1080px;
    height: auto;
    margin: 0 auto;
    object-fit: cover;
    object-position: center 30%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%);
    mask-image: linear-gradient(180deg, transparent, #000 25%);
}

/* Photo slides (petitions): full-bleed photo, text on a tinted gradient at the bottom.
   Each slide sets --photo-tint (RGB channels), --photo-accent and the photo framing. */
.home-slide-marne {
    --photo-tint: 12 59 71;
    --photo-accent: #a8dccf;
    --photo-intro: #d6efe9;
    --photo-position: center 20%;
}

.home-slide-parking {
    --photo-tint: 40 30 27;
    --photo-accent: #e3c7bf;
    --photo-intro: #f3e6e2;
    --photo-position: center 40%;
}

.home-slide-photo {
    display: flex;
    flex-direction: column;
    background-color: rgb(var(--photo-tint));
    color: #fff;
}

.home-photo-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--photo-position);
}

.home-slide-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(var(--photo-tint) / 0) 0%, rgb(var(--photo-tint) / 0.1) 35%, rgb(var(--photo-tint) / 0.75) 60%, rgb(var(--photo-tint) / 0.92) 100%);
}

.home-photo-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 2.5rem 2.5rem 5rem;
}

.home-photo-kicker {
    display: inline-block;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--photo-accent);
    background-color: rgb(var(--photo-tint) / 0.7);
    border: 1px solid color-mix(in srgb, var(--photo-accent) 50%, transparent);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.9rem;
    margin: 0 0 1.25rem;
}

.home-photo-title {
    font-family: 'Value Serif', serif;
    font-weight: normal;
    font-size: clamp(2.4rem, 4.6vw, 4rem);
    line-height: 1.05;
    color: #fff;
    max-width: 14ch;
    margin: 0 0 1.25rem;
}

.home-photo-intro {
    font-family: 'Value Serif', serif;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.4;
    color: var(--photo-intro);
    max-width: 24rem;
    margin: 0 0 1.75rem;
}

.home-photo-btn {
    display: inline-block;
    background-color: #fd5e5e;
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.75rem 2.25rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: background-color var(--transition), transform var(--transition);
}

.home-photo-btn:hover {
    background-color: #e54d4d;
    color: #fff;
    transform: translateY(-2px);
}

.home-photo-credit {
    position: absolute;
    right: 0.75rem;
    bottom: 0.5rem;
    z-index: 1;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: none;
    margin: 0;
}

.home-slider-dots {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateY(-50%);
}

/* Thin bars; the active one stretches into a pill */
.home-slider-dot {
    width: 4px;
    height: 14px;
    padding: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color var(--transition);
    position: relative;
}

/* Larger hit area than the visible bar */
.home-slider-dot::before {
    content: "";
    position: absolute;
    inset: -4px -10px;
}

.home-slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.home-slider-dot.is-active {
    height: 36px;
    background: rgba(255, 255, 255, 0.4);
}

/* Autoplay progress: when the fill completes, the script moves to the next slide */
.home-slider-dot.is-active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    border-radius: inherit;
    background: #fff;
    animation: home-slider-progress 3s linear forwards;
}

.home-slider:hover .home-slider-dot.is-active::after,
.home-slider:focus-within .home-slider-dot.is-active::after {
    animation-play-state: paused;
}

@keyframes home-slider-progress {
    to { height: 100%; }
}

/* Darker bars over light slides */
.home-slider.is-on-light .home-slider-dot {
    background: rgba(85, 85, 85, 0.3);
}

.home-slider.is-on-light .home-slider-dot:hover {
    background: rgba(85, 85, 85, 0.6);
}

.home-slider.is-on-light .home-slider-dot.is-active {
    background: rgba(85, 85, 85, 0.3);
}

.home-slider.is-on-light .home-slider-dot.is-active::after {
    background: var(--color-text-muted);
}

.home-slider-next {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(43, 31, 71, 0.75);
    color: #fff;
    cursor: pointer;
    transform: translateX(-50%);
    animation: home-slider-bounce 1.8s ease-in-out infinite;
    transition: opacity var(--transition);
}

.home-slider-next.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes home-slider-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 6px); }
}

@media (prefers-reduced-motion: reduce) {
    .home-slider-next {
        animation: none;
    }

    .home-slides {
        scroll-behavior: auto;
    }

    /* No autoplay */
    .home-slider-dot.is-active::after {
        animation: none;
        height: 100%;
    }
}

/* Adhesion box */
.adhesion-box {
    /* border: 1px solid #007BFF; */
    background-color: #fef9d1;
    padding: 20px;
    min-width: 0;
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
    text-align: center;
    margin-top: 20px;
    border-radius: var(--radius-lg);
    /* box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); */
}

.adhesion-box p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Home link: just above H1 */
.home-link {
    display: block;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

.home-link:hover {
    color: var(--color-primary-hover);
}

/* Banner block */
.banners {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: max-content;
    max-width: 90%;
    margin: 0 auto;
}

.banners .banner {
    width: 100%;
    max-width: none;
    margin: 0;
    /* Stacked above the pulsing banner so its ring passes behind them */
    position: relative;
    z-index: 1;
}

.banners .banner-incoming {
    z-index: 0;
}

.banner {
    display: block;
    width: max-content;
    max-width: 90%;
    margin: 0 auto;
    box-sizing: border-box;
    background-color: #fd5e5e;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    padding: 0;
    overflow: hidden;
}

.banner:hover {
    background-color: #e54d4d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.banner-announce {
    background-color: #f8d1d7;
}

.banner-announce:hover {
    background-color: #f3bec6;
}

.banner-stationnement {
    background-color: #c7a69d;
}

.banner-stationnement:hover {
    background-color: #b8958b;
}

.banner-announce .banner-link {
    color: var(--color-text);
}

.banner-announce .banner-link:hover {
    color: var(--color-text);
}

.banner-incoming {
    background-color: #7c9bdb;
    animation: banner-pulse 2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

/* Expanding ring with a barely visible swell on the banner */
@keyframes banner-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(254, 249, 209, 1);
    }

    30% {
        transform: scale(1.012);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 34px rgba(254, 249, 209, 0);
    }
}

.banner-incoming:hover {
    background-color: #6b8ad0;
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .banner-incoming {
        animation: none;
    }
}

.banner-incoming .banner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.banner-badge {
    display: inline-block;
    background-color: #5270ac;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.banner-incoming:hover .banner-badge {
    color: #ffffff;
}

.banner-link {
    display: block;
    color: white;
    padding: 1rem 1.75rem;
    text-align: center;
}

.banner-link:hover {
    color: white;
    text-decoration: none;
}

/* Apero invitation page */
.apero-page {
    justify-content: flex-start;
    align-items: stretch;
    background-color: #777dbe;
    padding: 0.5rem 0 0;
    box-sizing: border-box;
    min-height: 100dvh;
    height: 100dvh;
}

.apero-page .home-link {
    align-self: flex-start;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    color: #fff;
}

.apero-page .home-link:hover {
    color: #fff;
    text-decoration: underline;
}

.apero-flyer {
    max-width: 32rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 1.25rem 1.5rem;
    color: #fff;
}

.apero-visual {
    display: block;
    width: 100%;
    min-height: 0;
    flex: 1 1 0;
    object-fit: contain;
    object-position: right bottom;
}

.apero-brand,
.apero-invite,
.apero-when,
.apero-where,
.apero-intro,
.apero-url {
    font-family: 'Value Serif', serif;
    color: #fff;
    max-width: none;
}

.apero-brand {
    font-size: 1.75rem;
    margin: 1.5rem 0 0;
    line-height: 1.2;
}

.apero-invite {
    font-style: italic;
    font-size: 1.15rem;
    margin: 0.15rem 0 0.55rem;
    line-height: 1.3;
}

.apero-page h1 {
    font-size: clamp(3.2rem, 12vw, 4.6rem);
    line-height: 0.92;
    margin: 0 0 0.65rem;
    color: #fff;
    max-width: none;
}

.apero-when {
    font-style: italic;
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.25;
    margin: 0 0 0.65rem;
}

.apero-where {
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 1.35rem;
}

.apero-intro {
    font-size: 1.05rem;
    line-height: 1.4;
    margin: 0 0 1.5rem;
    color: #fff;
}

.apero-url {
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.apero-url a {
    font-family: 'Value Serif', serif;
    color: #fff;
    font-size: inherit;
}

.apero-url a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Halloween page (with Café Moz'Art) */
.halloween-page,
.home-slide-halloween {
    --halloween-bg: #3a2a5c;
    --halloween-bg-deep: #2b1f47;
    --halloween-orange: #f7913d;
    --halloween-orange-hover: #ffa65c;
    --halloween-moon: #f6e7c1;
}

.halloween-page {
    /* Height of the visual pinned to the bottom of the screen */
    /* Native width of the source, so it is never upscaled */
    --halloween-visual-w: min(100vw, 1080px);
    --halloween-visual-h: calc(var(--halloween-visual-w) * 440 / 1080);
    position: relative;
    justify-content: flex-start;
    align-items: stretch;
    background: linear-gradient(180deg, var(--halloween-bg-deep) 0%, var(--halloween-bg) 45%, var(--halloween-bg-deep) 100%);
    padding: 0.5rem 0 0;
    box-sizing: border-box;
    min-height: 100dvh;
    overflow-x: hidden;
    color: #fff;
}

.halloween-page .home-link {
    align-self: flex-start;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    color: #fff;
    position: relative;
    z-index: 1;
}

.halloween-page .home-link:hover {
    color: #fff;
    text-decoration: underline;
}

.halloween-moon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: clamp(4rem, 12vw, 7rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 35%, rgba(214, 188, 140, 0.55) 0 8%, transparent 9%),
        radial-gradient(circle at 62% 58%, rgba(214, 188, 140, 0.45) 0 6%, transparent 7%),
        radial-gradient(circle at 70% 28%, rgba(214, 188, 140, 0.4) 0 4%, transparent 5%),
        var(--halloween-moon);
    box-shadow: 0 0 40px rgba(246, 231, 193, 0.35);
}

.halloween-bat {
    position: absolute;
    left: -55%;
    bottom: 5%;
    width: 60%;
    color: #15102a;
}

.halloween-partners {
    margin: 1.5rem auto 0;
    padding: 0 1.25rem;
    max-width: 32rem;
}

.halloween-partners p {
    font-family: 'Value Serif', serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #fff;
    max-width: none;
    margin: 0;
}

.halloween-brand {
    font-size: 1.75rem;
    display: block;
}

.halloween-pill {
    display: inline-block;
    background-color: var(--halloween-orange);
    color: #fff;
    font-weight: 700;
    padding: 0.15rem 0.85rem;
    border-radius: 1.5rem 1.2rem 1.6rem 1rem;
}

.halloween-flyer {
    max-width: 60rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.halloween-page h1 {
    font-family: 'Creepster', 'Value Serif', cursive;
    font-weight: normal;
    font-size: clamp(2.6rem, 10vw, 4.6rem);
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--halloween-orange);
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
    margin: 1.25rem 0 1rem;
    max-width: none;
}

.halloween-intro {
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    line-height: 1.25;
    color: #fff;
    max-width: 34rem;
    margin: 0 auto 1.25rem;
}

.halloween-visual-wrap {
    position: relative;
    width: var(--halloween-visual-w);
    margin: 1.5rem auto 0;
}

/* Blurred copy of the visual behind it, for a soft halo */
.halloween-visual-wrap::before {
    content: "";
    position: absolute;
    inset: -8% -6%;
    background: url('./images/halloween-illustration.jpg') center / cover no-repeat;
    filter: blur(32px) saturate(1.2);
    opacity: 0.85;
    -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
    mask-image: radial-gradient(closest-side, #000 55%, transparent);
}

.halloween-visual {
    position: relative;
    display: block;
    width: 100%;
    height: var(--halloween-visual-h);
    -webkit-mask-image: radial-gradient(ellipse 58% 56% at center, #000 50%, transparent);
    mask-image: radial-gradient(ellipse 58% 56% at center, #000 50%, transparent);
}

.halloween-page .home-link,
.halloween-partners,
.halloween-flyer {
    position: relative;
    z-index: 1;
}

.halloween-steps {
    list-style: none;
    padding: 0;
    margin: 0 auto 1.25rem;
    max-width: 30rem;
    text-align: left;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 3.8vw, 1.2rem);
    line-height: 1.35;
    color: #fff;
}

.halloween-steps li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.halloween-steps li + li {
    margin-top: 0.75rem;
}

.halloween-step-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    color: var(--halloween-orange);
}

.halloween-date {
    display: inline-block;
    background-color: var(--halloween-orange);
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-weight: 800;
    font-size: clamp(1.15rem, 4.5vw, 1.6rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    max-width: none;
    margin: 0 0 1.25rem;
}

.halloween-date span {
    white-space: nowrap;
}

.halloween-date span + span {
    margin-left: 0.6em;
}

.halloween-flyer .halloween-btn {
    display: table;
    margin: 0 auto;
}

.halloween-btn {
    display: inline-block;
    background-color: var(--halloween-orange);
    color: #2a1d42;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    padding: 0.8rem 2.75rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: background-color var(--transition), transform var(--transition);
}

.halloween-btn:hover {
    background-color: var(--halloween-orange-hover);
    color: #2a1d42;
    transform: translateY(-2px);
}

/* Questions page */
.questions-list {
    max-width: 600px;
    text-align: left;
    margin-bottom: 1.5rem;
}

.questions-list h2 {
    font-family: 'Value Serif', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.questions {
    padding-left: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* Candidate Q&A */
.candidate-responses {
    max-width: 720px;
    text-align: left;
    margin-bottom: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.candidate-responses h2 {
    font-family: 'Value Serif', serif;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.candidate-responses h2:first-child {
    margin-top: 0;
}

.theme-section {
    margin-bottom: 2rem;
}

.theme-section h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-family: 'Value Serif', serif;
}

.qa-block {
    margin-bottom: 2.25rem;
}

.qa-question {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    font-family: 'Value Serif', serif;
    font-size: 1.1rem;
}

.qa-accordion {
    margin-top: 0.5rem;
    max-width: 700px;
}

.qa-response {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.qa-response:hover {
    box-shadow: var(--shadow-md);
}

.qa-response summary {
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    color: var(--color-primary);
    background-color: var(--color-primary-muted);
    list-style: none;
    user-select: none;
    transition: background-color var(--transition);
}

.qa-response summary::-webkit-details-marker {
    display: none;
}

.qa-response summary::before {
    content: "";
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-right: 0.5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    vertical-align: 0.15em;
    transition: transform var(--transition);
}

.qa-response[open] summary::before {
    transform: rotate(45deg);
}

.qa-response[open] summary {
    background-color: var(--color-secondary-light);
    color: var(--color-primary-hover);
}

.qa-response .qa-answer {
    padding: 1rem 1.25rem;
    margin: 0;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    background-color: var(--color-surface);
    line-height: 1.65;
    color: var(--color-text-muted);
    text-align: left;
}

.qa-response .qa-answer.qa-empty {
    color: var(--color-text-soft);
    font-style: italic;
}

.qa-answer {
    line-height: 1.65;
    color: var(--color-text-muted);
    margin-left: 0;
}

/* Layout: centered questions + satisfaction block on the right */
.content-with-sidebar {
    display: flex;
    gap: 2rem;
    max-width: 1600px;
    width: 100%;
    align-self: center;
    align-items: stretch;
    text-align: left;
    margin-top: 0;
}

.sidebar-spacer {
    flex: 1;
    min-width: 0;
}

.sidebar-spacer-right {
    width: 312px;
    /* flex: 0 0 312px; */
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.candidate-responses-wrap {
    width: 720px;
    max-width: 720px;
    flex-shrink: 0;
}

/* Satisfaction block: sticky card */
.satisfaction-block {
    position: sticky;
    top: 2rem;
    width: 250px;
    padding: 1.25rem 1.25rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.satisfaction-title {
    font-family: 'Value Serif', serif;
    font-size: 1.15rem;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.satisfaction-results {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.satisfaction-results .candidate-row {
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.satisfaction-results .candidate-row:last-child {
    margin-bottom: 0;
}

.satisfaction-results .candidate-name {
    color: var(--color-primary);
    font-size: 0.9rem;
    line-height: 1.3;
}

.satisfaction-results .candidate-pct {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.satisfaction-results .candidate-bar {
    height: 6px;
    background-color: var(--color-border-light);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.satisfaction-results .candidate-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    border-radius: var(--radius-pill);
    transition: width 0.3s ease-out;
}

.satisfaction-results .satisfaction-empty {
    color: var(--color-text-soft);
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Satisfait button: integrated at the end of the answer */
.qa-response .satisfait-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem 1rem;
    margin: 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
}

.qa-response .voir-resultats-link {
    display: none;
    font-size: 0.9rem;
    color: var(--color-primary);
    text-decoration: none;
}

.qa-response .voir-resultats-link:hover {
    text-decoration: underline;
}

.qa-response .satisfait-btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--color-primary);
    background-color: var(--color-secondary-light);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
}

.qa-response .satisfait-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.qa-response .satisfait-btn.is-satisfait {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.qa-response .satisfait-btn.is-satisfait:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* Tablet / narrow: stack layout, results block below main content */
@media (max-width: 1200px) {
    .content-with-sidebar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .sidebar-spacer-left {
        display: none;
    }

    .sidebar-spacer-right {
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        justify-content: center;
        order: 1;
    }

    .candidate-responses-wrap {
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        order: 0;
    }

    .satisfaction-block {
        position: static;
        width: 100%;
        max-width: 100%;
        margin: 0;
        margin-bottom: 2rem;
        box-sizing: border-box;
    }
}

/* Mobile & tablet: show "Voir les résultats" link when results block is visible */
@media (max-width: 1200px) {
    body.has-satisfaction-results .qa-response .voir-resultats-link {
        display: inline-block;
    }
}

@media (max-width: 900px) {
    .home-split {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 0;
        padding: 0;
    }

    .home-col {
        padding: 2rem 1.25rem;
    }

    .home-col-banners .banners {
        max-width: 100%;
    }

    /* Stacked layout: slides simply follow each other */
    .home-col-banners.home-slider {
        position: static;
        height: auto;
        background-color: var(--color-bg);
    }

    /* Slides become separate rounded cards */
    .home-slides {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        height: auto;
        padding: 1rem;
        overflow: visible;
        scroll-snap-type: none;
    }

    .home-slide {
        height: auto;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .home-slide.home-col {
        overflow: hidden;
        background-color: rgba(255, 255, 255, 0.6);
    }

    .home-slide-photo {
        min-height: 560px;
    }

    /* No arrow on mobile, so less room below the button */
    .home-photo-content {
        padding-bottom: 2rem;
    }

    /* Text takes more of the card: darken from higher up */
    .home-slide-photo::after {
        background: linear-gradient(180deg, rgb(var(--photo-tint) / 0) 0%, rgb(var(--photo-tint) / 0.55) 30%, rgb(var(--photo-tint) / 0.85) 55%, rgb(var(--photo-tint) / 0.95) 100%);
    }

    .home-slider-dots,
    .home-slider-next {
        display: none;
    }
}

/* Mobile: margins and tighter results block */
@media (max-width: 600px) {
    body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        box-sizing: border-box;
    }

    .home-page,
    .apero-page,
    .halloween-page {
        padding-left: 0;
        padding-right: 0;
    }

    .home-col-main h1 {
        font-size: 3rem;
    }

    h1 {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .banners,
    .banner {
        margin-left: 0;
        margin-right: 0;
    }

    .banner-link {
        padding: 0.9rem 1.1rem;
    }

    .apero-page h1 {
        font-size: 3.1rem;
    }

    .content-with-sidebar {
        padding: 0;
        gap: 1.25rem;
        margin-left: 0;
        margin-right: 0;
    }

    .satisfaction-block {
        padding: 1rem 1rem 1.25rem;
    }

    .satisfaction-title {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }

    .satisfaction-results .candidate-row {
        margin-bottom: 0.7rem;
    }

    .satisfaction-results .candidate-name,
    .satisfaction-results .candidate-pct {
        font-size: 0.85rem;
    }
}