/* The braises module's own sheet (ADR-0015), linked by the block that draws the
   markup rather than imported by app.js, so nobody else downloads it. Caveat lives
   here for the same reason Dancing Script lives in engraving.css: it is a
   module's face, not a theme font pair. */
@font-face {
    font-family: "Caveat";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/caveat-variable-jM9h_2u.woff2") format("woff2-variations");
}

/* The template's own palette, on `:root` as toast.css keeps its own. Deliberately
   not theme tokens: a polaroid is paper whatever the site is painted, and the quotes band has
   to be the darker of the two schemes for a note taped to a board to read. Naming them here
   is what lets the board tone change in one place. */
:root {
    --braises-paper: #f3eee6;
    --braises-paper-ink: #171310;
    --braises-paper-shade: #e6e0d8;
    --braises-tape: #cfcac3;

    --braises-board: #141110;
    --braises-board-line: #2a2421;
    --braises-board-ink: #ede7df;

    --braises-ember: #ef834b;
    --braises-ember-deep: #c4521a;
    --braises-ember-hand: #da7137;

    --braises-meta: #6f665f;
}

.braises {
    min-height: 100svh;
    isolation: isolate;
    background: var(--ap-bg);
}

/* Oversized on both axes so the parallax shift never uncovers an edge: a layer at
   speed s travels s/2 of its own height each way, so the margin has to beat that. */
.braises__image {
    position: absolute;
    inset: -21% -4%;
    width: 108%;
    height: 142%;
    object-fit: cover;
    filter: grayscale(85%) contrast(1.25) brightness(0.42);
    z-index: 0;
    will-change: transform;
}

/* Darkest at the two edges so the transparent navbar and the foot stay readable. */
.braises__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgb(8 7 6 / 88%) 0%, rgb(8 7 6 / 35%) 34%, rgb(8 7 6 / 86%) 74%, var(--ap-bg) 100%);
}

.braises__heat {
    position: absolute;
    inset: 0;
    z-index: 1;
    mix-blend-mode: screen;
    background: radial-gradient(90% 60% at 50% 108%, rgba(var(--ap-accent-rgb), 0.42), transparent 62%);
}

.braises__body {
    position: relative;
    z-index: 3;
    width: 100%;
    /* Symmetric, so the text sits on the center of the screen whichever optional
       parts the tenant filled in. Sized on the foot, which is the demanding end:
       it has the scroll cue to clear where the head only has the navbar. */
    padding-block: clamp(7.5rem, 18vh, 13.75rem);
}

.braises .braises-label {
    color: var(--ap-accent);
}

.braises__title {
    margin: 0;
    font-family: var(--ap-font-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 7.2vw, 6.8rem);
    line-height: 0.9;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    color: #fff;
    will-change: transform;
}

/* The gap belongs to the pair: a title that kept this margin with no eyebrow above
   it would hold dead space at the head and push the block off center. */
.braises-label + .braises__title {
    margin-top: clamp(1.125rem, 3vh, 1.875rem);
}

.braises__line--accent {
    font-weight: 300;
    color: var(--ap-accent);
}

.braises__note {
    margin: clamp(1.5rem, 4vh, 2.25rem) 0 0;
    font-family: "Caveat", cursive;
    font-size: clamp(1.45rem, 2.6vw, 2.05rem);
    line-height: 1.3;
    color: var(--braises-board-ink);
}

/* Bottom center of the opener, outside the body so the body's own padding cannot
   push it off the fold. */
.braises__cue {
    bottom: clamp(1.75rem, 5vh, 3rem);
    z-index: 4;
    gap: 0.625rem;
    color: var(--braises-board-ink);
}

.braises__cue-mouse {
    display: block;
    opacity: 0.72;
}

.braises__cue-wheel {
    animation: braises-wheel 2.2s ease-in-out infinite;
}

.braises__cue-line {
    display: block;
    width: 1px;
    height: clamp(48px, 7vh, 72px);
    background: linear-gradient(180deg, rgba(var(--ap-accent-rgb), 0.9), transparent);
}

/* The wheel falls, fades, then returns while invisible: a rewind the reader sees
   would read as a scroll upwards. */
@keyframes braises-wheel {
    0% { opacity: 1; transform: translateY(0); }
    65% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 0; transform: translateY(0); }
}

/* Without a photograph there is nothing to sit text on, so the panel colors carry it
   and OverlayGate refuses the transparent navbar for the same reason. */
.braises--flat {
    min-height: 70svh;
    background: var(--ap-panel);
}

.braises--flat .braises__scrim,
.braises--flat .braises__heat {
    display: none;
}

.braises--flat .braises__title,
.braises--flat .braises__note,
.braises--flat .braises__cue {
    color: var(--ap-text);
}

@media (prefers-reduced-motion: reduce) {
    .braises__canvas {
        display: none;
    }

    .braises__cue-wheel {
        animation: none;
    }
}

/* ---- Étapes épinglées ---------------------------------------------------- */

/* The halo rises from the bottom left of the volet on screen, so it belongs to the
   sticky box: pinned, the section itself is several viewports tall. */
.etapes__sticky {
    position: relative;
}

.etapes__sticky::before {
    --etapes-halo: 0.16;

    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: min(85%, 100vh);
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(72% 80% at 6% 104%, rgba(var(--ap-accent-rgb), var(--etapes-halo)), rgba(var(--ap-accent-rgb), calc(var(--etapes-halo) / 3)) 44%, transparent 70%);
}

/* An ember adds light to a dark ground and stains a paper one, so the halo is the
   weaker of the two where the page is paper. An html with no attribute is light. */
[data-bs-theme="dark"] .etapes__sticky::before {
    --etapes-halo: 0.38;
}

.etapes__panel {
    outline: none;
}

.etapes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr));
    gap: clamp(1.125rem, 4vw, 3.5rem);
    align-items: center;
}

.etapes__n {
    font-family: var(--ap-font-display);
    font-weight: 800;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.8;
    letter-spacing: -0.06em;
    color: var(--ap-accent);
    font-variant-numeric: tabular-nums;
}

.etapes__meta {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ap-faint);
}

.etapes__title {
    margin: clamp(0.875rem, 2vw, 1.625rem) 0 0;
    font-family: var(--ap-font-display);
    font-size: clamp(1.6rem, 3.4vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.etapes__body {
    margin: 1rem 0 0;
    max-width: 46ch;
    color: var(--ap-muted);
}

.etapes__points {
    display: grid;
    gap: 0.5625rem;
    margin: clamp(1rem, 2.4vw, 1.625rem) 0 0;
    padding: 1.125rem 0 0;
    border-top: 1px solid var(--ap-border);
    list-style: none;
}

.etapes__points li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.92rem;
}

.etapes__points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 0.75rem;
    height: 1px;
    background: var(--ap-accent);
}

.etapes__figure {
    position: relative;
    margin: 0;
    border: 1px solid var(--ap-border);
    overflow: hidden;
}

.etapes__figure img,
.etapes__figure .image-frame {
    display: block;
    height: 100%;
    min-height: min(40vh, 20rem);
    background: var(--ap-panel);
}

.etapes__note {
    position: absolute;
    left: 1.125rem;
    bottom: 1rem;
    font-family: "Caveat", cursive;
    font-size: 1.5rem;
    color: var(--ap-accent-text-hover);
}

/*
 * Stacked by default, which is the whole fallback: no support, a narrow viewport or
 * a refused animation and the volets simply read one under the other, in order.
 */
.etapes__track {
    display: grid;
    gap: var(--ap-space-section);
}

/*
 * The pin. The script adds .is-pinned once the viewport has room for it and motion is not
 * refused, so everything below is the enhanced state and the stack above is what a visitor
 * without it keeps.
 */
.etapes.is-pinned {
    position: relative;
    height: calc(var(--etapes-count) * 90vh);
}

.etapes.is-pinned .etapes__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1rem, 3vh, 2.5rem);
    overflow: hidden;
}

.etapes.is-pinned .etapes__track {
    display: flex;
    gap: 0;
    width: calc(var(--etapes-count) * 100%);
    will-change: transform;
}

.etapes.is-pinned .etapes__panel {
    flex: 0 0 calc(100% / var(--etapes-count));
    width: calc(100% / var(--etapes-count));
}

/*
 * Settling on a volet rather than between two. The anchors sit at the scroll offsets
 * the pin squares up on, measured against the section rather than the sticky box, and
 * proximity is what keeps the rest of the page scrolling normally: it engages near a
 * target and nowhere else.
 */
:root:has(.etapes.is-pinned) {
    scroll-snap-type: y proximity;
}

.etapes__snap {
    display: none;
}

.etapes.is-pinned .etapes__snap {
    display: block;
    position: absolute;
    left: 0;
    width: 1px;
    height: 1px;
    top: calc((100% - 100vh) * var(--etapes-index) / (var(--etapes-count) - 1));
    scroll-snap-align: start;
}

/* ---- Coachs et chronos --------------------------------------------------- */

.coachs__note {
    font-family: "Caveat", cursive;
    font-size: 1.6rem;
    color: var(--ap-accent-text-hover);
}

.coachs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 28.75rem), 1fr));
    gap: clamp(2rem, 5vw, 3rem);
    margin-top: clamp(2.25rem, 5vw, 4rem);
}

.coachs__card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.875rem), 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
}

/* Paper, not a theme surface: a polaroid is white whatever the site is painted. */
.coachs__polaroid {
    /* The tilt is a property rather than a transform, so the second card can lean the
       other way without outranking the hover that straightens it: a descendant
       selector beats a bare :hover whatever the order, which left every even card
       stuck at its angle. */
    --tilt: -3deg;

    position: relative;
    max-width: 17.5rem;
    padding: 0.75rem 0.75rem 0;
    border-radius: 3px;
    background: var(--braises-paper);
    box-shadow: 0 1.875rem 3.75rem -1.25rem rgb(0 0 0 / 80%);
    transform: rotate(var(--tilt));
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coachs__card:nth-child(even) .coachs__polaroid {
    --tilt: 2.5deg;
}

.coachs__polaroid:hover,
.coachs__polaroid:focus-within {
    transform: rotate(0deg) scale(1.03);
}

.coachs__tape {
    position: absolute;
    top: -1.125rem;
    left: 1.375rem;
    width: 1.25rem;
    height: 3.25rem;
    border: 3px solid var(--braises-tape);
    border-radius: 11px;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 2px var(--braises-paper);
}

/* The empty frame gets the same box as a photograph: without it a coach with no
   portrait yet collapses the polaroid to its caption strip, which reads as broken
   rather than as pending. */
.coachs__polaroid img,
.coachs__polaroid .image-frame {
    display: block;
    aspect-ratio: 4 / 5;
    object-position: top;
    background: var(--braises-paper-shade);
}

.coachs__caption {
    margin: 0;
    padding: 0.875rem 0.25rem 1rem;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--braises-paper-ink);
    text-align: center;
}

.coachs__role {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ap-faint);
}

.coachs__name {
    margin: 0.625rem 0 0;
    font-family: var(--ap-font-display);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ap-accent-text);
}

.coachs__bio {
    margin: 1rem 0 0;
    color: var(--ap-muted);
}

.coachs__records {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem 1.125rem;
    margin: 1.375rem 0 0;
    padding-top: 1.125rem;
    border-top: 1px solid var(--ap-border);
    font-variant-numeric: tabular-nums;
}

.coachs__record dt {
    min-width: 2.75rem;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ap-accent-text);
}

.coachs__record dd {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.coachs__tags li {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--ap-border);
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ap-muted);
}

/* ---- Citations sur papier ------------------------------------------------ */

/* The one section that inverts the page, and it inverts it in both schemes: a note
   taped to a board needs the board to be the darker of the two, so the band states its
   pair the way the polaroid states paper. On a light page it is the ink band the hero
   and the closing invitation already are. */
.citations {
    background: var(--braises-board);
    border-block: 1px solid var(--braises-board-line);
    color: var(--braises-board-ink);
    padding-block: clamp(4rem, 9vw, 7.5rem);
}

.citations .braises-label {
    /* The mockup's dimmer ember reads 4.2:1 against the board, which a 0.68rem line
       cannot afford; this one reads 7:1. */
    color: var(--braises-ember);
}

.citations .braises-label__rule {
    background: currentcolor;
}

.citations__hand {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 0;
    color: var(--braises-ember-hand);
}

/* Bootstrap's carousel, the one the gallery block and the boutique already use, so
   the swipe and the arrow keys come with it rather than being written again here. */
.citations__carousel {
    margin-top: clamp(2rem, 5vw, 3.5rem);
}

/* One grid cell for every slide (the track is d-grid), so the band is as tall as the
   longest quote and turning one moves nothing below it. */
.citations__carousel .carousel-item {
    display: grid;
    align-content: center;
    grid-area: 1 / 1;
    margin-right: 0;
    visibility: hidden;
    /* Bootstrap parks the incoming slide at 100% and counts on display:none to make
       that jump instant. A hidden slide animates it instead, and the turn plays with
       both notes over each other, so only a slide in flight transitions. */
    transition-property: none;
    /* The slide is what clips: the tape over the note and the shadow under it need
       their room here rather than on the note. */
    padding: 1.375rem 0.5rem 2.375rem;
}

.citations__carousel .carousel-item-start,
.citations__carousel .carousel-item-end {
    transition-property: transform;
}

/* The slide at rest, and the two a turn has in flight. */
.citations__carousel .carousel-item.active,
.citations__carousel .carousel-item-next,
.citations__carousel .carousel-item-prev {
    visibility: visible;
}

.citations__quote {
    /* The tilt is a property for the reason the polaroid's is: a descendant selector
       leaning the second note the other way would outrank anything straightening it. */
    --tilt: -1.5deg;

    position: relative;
    /* The width is stated, not taken from the text: the slide is a grid cell, where an
       auto width would make a short quote a narrower note than a long one. */
    width: 100%;
    max-width: 58rem;
    margin: 0 auto;
    padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 2.4vw, 2.125rem);
    border-radius: 6px;
    background: var(--braises-paper);
    color: var(--braises-paper-ink);
    box-shadow: 0 2.5rem 5rem -1.875rem rgb(0 0 0 / 90%);
    text-align: center;
    transform: rotate(var(--tilt));
}

.citations__carousel .carousel-item:nth-child(even) .citations__quote {
    --tilt: 1.4deg;
}

.citations__quote::before {
    content: "\201C" / "";
    display: block;
    height: 0.5em;
    font-family: var(--ap-font-display);
    font-weight: 900;
    font-size: 4rem;
    line-height: 0.6;
    color: var(--braises-ember-deep);
}

.citations__tape {
    position: absolute;
    top: -0.875rem;
    left: 50%;
    width: 7.5rem;
    height: 1.75rem;
    margin-left: -3.75rem;
    border: 1px solid rgb(0 0 0 / 8%);
    background: rgb(255 255 255 / 55%);
    box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
    transform: rotate(-2deg);
}

.citations__quote p {
    margin: 0;
    font-family: var(--ap-font-display);
    font-weight: 300;
    font-size: clamp(1.15rem, 2.4vw, 1.9rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-wrap: pretty;
}

.citations__by {
    gap: 0.875rem;
    margin-top: clamp(1.375rem, 3vw, 2.125rem);
    padding-top: 1.125rem;
    border-top: 1px solid rgb(23 19 16 / 18%);
}

.citations__dash {
    width: 2.125rem;
    height: 1px;
    background: var(--braises-ember-deep);
}

.citations__who {
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.citations__meta {
    font-size: 0.8rem;
    color: var(--braises-meta);
}

/* ---- The section head every braises section shares ----------------------- */

.braises-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ap-accent-text);
}

.braises-label__rule {
    display: inline-block;
    width: 1.875rem;
    height: 1px;
    background: var(--ap-accent);
}

/* Light by default, and the weight lands on the words the tenant singles out. */
.braises-heading {
    margin: 0.875rem 0 0;
    font-family: var(--ap-font-display);
    font-weight: 300;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.035em;
    text-transform: none;
}

.braises-heading b {
    font-weight: 800;
}

.citations__nav {
    margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.citations__step {
    width: 2.625rem;
    height: 2.625rem;
    border: 1px solid var(--braises-board-line);
    background: transparent;
    color: var(--braises-board-ink);
    transition: border-color 0.3s, color 0.3s;
}

.citations__step:hover,
.citations__step:focus-visible {
    border-color: var(--braises-ember);
    color: var(--braises-ember);
}

.citations__dots [data-bs-target] {
    width: 1.75rem;
    height: 2px;
    margin-inline: 0.25rem;
    background-color: var(--braises-board-ink);
    opacity: 0.25;
}

.citations__dots .active {
    background-color: var(--braises-ember);
    opacity: 1;
}

/* ---- Questions en deux colonnes ------------------------------------------ */

.questions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.questions__intro {
    margin: 1.125rem 0 0;
    max-width: 40ch;
    color: var(--ap-muted);
}

.questions__list {
    border-top: 1px solid var(--ap-border);
}

.questions__item {
    border-bottom: 1px solid var(--ap-border);
}

.questions__question {
    gap: 1.125rem;
    padding: 1.25rem 0;
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
    transition: color 0.3s;
}

/* Safari draws its own marker through ::-webkit-details-marker, not list-style. */
.questions__question::-webkit-details-marker {
    display: none;
}

.questions__question::after {
    content: "+";
    flex: none;
    color: var(--ap-accent-text);
    font-size: 1.3rem;
    line-height: 1;
}

.questions__item[open] .questions__question::after {
    content: "\2212";
}

.questions__question:hover,
.questions__item[open] .questions__question {
    color: var(--ap-accent-text);
}

.questions__answer {
    margin: 0;
    padding: 0 0 1.375rem;
    max-width: 54ch;
    color: var(--ap-muted);
    font-size: 0.98rem;
}

/* ---- Appel découverte ---------------------------------------------------- */

.appel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-top: 1px solid var(--ap-border);
    background: var(--ap-bg);
}

.appel__image {
    position: absolute;
    inset: -16% 0;
    width: 100%;
    height: 132%;
    object-fit: cover;
    filter: grayscale(85%) brightness(0.34) contrast(1.15);
    z-index: 0;
    will-change: transform;
}

.appel__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, var(--ap-bg) 0%, rgba(var(--ap-bg-rgb), 0.62) 40%, rgba(var(--ap-bg-rgb), 0.85) 100%);
}

.appel--flat .appel__scrim {
    display: none;
}

.appel__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr));
    gap: clamp(1.75rem, 5vw, 4rem);
    align-items: center;
    padding-block: clamp(4.375rem, 10vw, 8.125rem);
}

.appel__body {
    margin: 1.25rem 0 0;
    max-width: 42ch;
    color: var(--ap-muted);
}

.appel__note {
    display: inline-block;
    margin-top: 1.125rem;
    font-family: "Caveat", cursive;
    font-size: 1.6rem;
    color: var(--ap-accent-text-hover);
}

/* No chrome of its own: blocks/form/_form.html.twig already draws the panel, and
   two of them nested read as a frame around a frame. */
.appel__panel {
    min-width: 0;
}

.appel__missing {
    margin: 0;
    color: var(--ap-faint);
}
