/* Famille virtuelle « Bento UI » : une plage Unicode → un fichier (OFL dans chaque dossier sous public/fonts/). */
@font-face {
    font-family: "Bento UI";
    src: url("/fonts/cause/Cause-VariableFont_wght.ttf") format("truetype-variations"),
        url("/fonts/cause/Cause-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0100-024F, U+0250-02AF, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122,
        U+2190-21FF, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Bento UI";
    src: url("/fonts/gamja-flower/GamjaFlower-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7A3, U+A960-A97F, U+D7B0-D7FF;
}

@font-face {
    font-family: "Bento UI";
    src: url("/fonts/klee-one/KleeOne-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3040-309F, U+30A0-30FF, U+31F0-31FF,
        U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

@font-face {
    font-family: "Bento UI";
    src: url("/fonts/klee-one/KleeOne-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3040-309F, U+30A0-30FF, U+31F0-31FF,
        U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

/* Pastel ludique : rose bonbon + lilas + menthe (actions en rose, accents variés) */
:root {
    color-scheme: light;
    --font-sans: "Bento UI", ui-sans-serif, system-ui, sans-serif;
    /* Fond page : beige papier chaud (moins rosé que l’ancien #f5ecf2) */
    --bg: #f1e9de;
    --surface: #fff8fa;
    --surface-hover: #fffafc;
    --text: #3d2c36;
    --text-muted: #6e5562;
    --primary: #c4476d;
    --primary-hover: #a8365b;
    --primary-faint: rgba(196, 71, 109, 0.22);
    --selection-ring: rgba(196, 71, 109, 0.42);
    --selection-ring-strong: rgba(120, 36, 68, 0.55);
    --selection-ring-bubble: rgba(255, 255, 255, 0.95);
    --selection-fill: rgba(196, 71, 109, 0.1);
    --selection-fill-pick: rgba(196, 71, 109, 0.14);
    --selection-shadow: 0 5px 14px rgba(88, 38, 68, 0.07);
    --selection-shadow-hover: 0 6px 18px rgba(88, 38, 68, 0.1);
    --selection-drop: 3px 4px 0 rgba(88, 38, 68, 0.12);
    --selection-drop-hover: 4px 6px 0 rgba(88, 38, 68, 0.15);
    --selection-lip: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    --accent-warm: #e8885a;
    --accent-lilac: #9586d9;
    --accent-mint: #52a898;
    --wordmark-ben: #8a2650;
    /* Lilas profond (complément du rose), lisible sur --bg */
    --wordmark-to: #4f3d86;
    --progress-track: rgba(150, 90, 130, 0.11);
    --focus: rgba(196, 71, 109, 0.45);
    --ring-outline-soft: rgba(90, 32, 54, 0.16);
    --ring-outline: rgba(90, 32, 54, 0.22);
    --ring-outline-strong: rgba(90, 32, 54, 0.28);
    --ink-faint: rgba(72, 38, 58, 0.05);
    --ink-tap: rgba(72, 38, 58, 0.07);
    --ink-tap-strong: rgba(72, 38, 58, 0.1);
    --ink-line: rgba(72, 38, 58, 0.12);
    --ink-shadow: rgba(72, 38, 58, 0.14);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-pill: 999px;
    --app-shell-pad-x: 1.25rem;
    --cta-dock-height: 0px;
    /* Hauteur zone topbar (safe area encoche) pour padding contenu + layout recette */
    --topbar-height: calc(3.625rem + env(safe-area-inset-top, 0px));
    font-family: var(--font-sans);
}

html {
    /* Évite le léger décalage horizontal (étapes builder, colonne centrée) quand la scrollbar
     passe du document au panneau `.recipe-scroll` (overflow interne vs défilement du body). */
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

.app-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(var(--topbar-height) + 0.45rem) var(--app-shell-pad-x) 1.5rem;
}

.app-shell--with-dock:not(.app-shell--internal-scroll) {
    padding-bottom: calc(var(--cta-dock-height) + 1rem);
}

/* Écrans builder : scroll interne, barre de progression fixe sous le header.
   Le padding-top de .app-shell compense déjà la topbar fixe ; hauteur = viewport. */
.app-shell--internal-scroll {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.app-shell--internal-scroll .builder-steps {
    flex-shrink: 0;
}

.builder-scroll,
.recipe-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* Écart contenu / scrollbar (le hero full-bleed reste géré par marges négatives sur l’enfant) */
    padding-inline-end: 0.5rem;
    padding-bottom: calc(var(--cta-dock-height) + 0.9rem);
    box-sizing: border-box;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary) 72%, var(--surface)) var(--progress-track);
}

@supports not (color: color-mix(in srgb, black 50%, white)) {

    .builder-scroll,
    .recipe-scroll {
        scrollbar-color: var(--primary) var(--progress-track);
    }
}

.builder-scroll::-webkit-scrollbar,
.recipe-scroll::-webkit-scrollbar {
    width: 10px;
}

.builder-scroll::-webkit-scrollbar-track,
.recipe-scroll::-webkit-scrollbar-track {
    margin: 6px 0;
    background: var(--progress-track);
    border-radius: var(--radius-pill);
}

.builder-scroll::-webkit-scrollbar-thumb,
.recipe-scroll::-webkit-scrollbar-thumb {
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-clip: padding-box;
    background-color: color-mix(in srgb, var(--primary) 68%, var(--surface));
}

.builder-scroll::-webkit-scrollbar-thumb:hover,
.recipe-scroll::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--primary) 82%, var(--surface));
}

@supports not (background-color: color-mix(in srgb, black 50%, white)) {

    .builder-scroll::-webkit-scrollbar-thumb,
    .recipe-scroll::-webkit-scrollbar-thumb {
        background-color: var(--primary);
    }

    .builder-scroll::-webkit-scrollbar-thumb:hover,
    .recipe-scroll::-webkit-scrollbar-thumb:hover {
        background-color: var(--primary-hover);
    }
}

.cta-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 0.6rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(241, 233, 222, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: none;
}

.cta-dock__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--app-shell-pad-x);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.cta-dock .cta {
    margin-top: 0;
    width: 100%;
}

/* Bandeau consentement : au-dessus du dock CTA fixe pour ne pas bloquer Continuer */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    padding: 0.75rem var(--app-shell-pad-x) calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: rgba(42, 28, 38, 0.94);
    color: #fff8fa;
    box-shadow: 0 -6px 28px rgba(42, 28, 38, 0.18);
}

.cookie-consent__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cookie-consent__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #fff8fa;
}

.cookie-consent__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(255, 248, 250, 0.92);
}

.cookie-consent__privacy {
    margin: 0;
    font-size: 0.85rem;
}

.cookie-consent__link {
    color: #ffd6e5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__link:hover {
    color: #fff;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

.cookie-consent__btn {
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.cookie-consent__btn--primary {
    background: var(--primary);
    color: #fffaf9;
    box-shadow: var(--selection-lip), 0 0 0 1px var(--selection-ring-strong);
}

.cookie-consent__btn--primary:hover {
    background: var(--primary-hover);
}

.cookie-consent__btn--ghost {
    background: transparent;
    color: rgba(255, 248, 250, 0.95);
    box-shadow: inset 0 0 0 1.5px rgba(255, 248, 250, 0.35);
}

.cookie-consent__btn--ghost:hover {
    background: rgba(255, 248, 250, 0.08);
}

/* Tour d'accueil (première visite sur /) : au-dessus du menu et du bandeau cookies */
.welcome-tour__backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(42, 28, 38, 0.45);
    animation: nav-backdrop-in 0.2s ease;
}

.welcome-tour {
    position: fixed;
    inset: 0;
    z-index: 56;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--app-shell-pad-x);
    padding-top: max(var(--app-shell-pad-x), env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.welcome-tour__inner {
    pointer-events: auto;
    width: min(32rem, 100%);
    max-height: min(90dvh, 42rem);
    overflow: auto;
    padding: 1.1rem 1.15rem 1.15rem;
    border-radius: var(--radius-card, 1rem);
    background: var(--surface);
    box-shadow: 0 12px 40px var(--ink-shadow);
    border: 1px solid var(--ink-line);
}

.welcome-tour__title {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.welcome-tour__intro {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--ink-muted);
}

.welcome-tour__bullets {
    margin: 0 0 0.75rem;
    padding-left: 1.15rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--ink);
}

.welcome-tour__bullets li+li {
    margin-top: 0.35rem;
}

.welcome-tour__gifs {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.welcome-tour__figure {
    margin: 0;
}

.welcome-tour__gif {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm, 0.5rem);
    border: 1px solid var(--ink-line);
    background: rgba(62, 52, 88, 0.06);
}

.welcome-tour__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.welcome-tour__btn {
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.welcome-tour__btn--primary {
    background: var(--primary);
    color: #fffaf9;
    box-shadow: var(--selection-lip), 0 0 0 1px var(--selection-ring-strong);
}

.welcome-tour__btn--primary:hover {
    background: var(--primary-hover);
}

.welcome-tour__btn--ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1.5px var(--ink-line);
}

.welcome-tour__btn--ghost:hover {
    background: color-mix(in srgb, var(--surface) 85%, var(--primary) 8%);
}

/* 1fr | auto | 1fr : même espace à gauche et à droite → logo + nom au centre de l’écran */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.65rem 1rem;
    box-sizing: border-box;
    min-height: var(--topbar-height);
    padding: max(0.35rem, env(safe-area-inset-top, 0px)) var(--app-shell-pad-x) 0.4rem;
    background: rgba(241, 233, 222, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ink-faint);
}

.topbar__burger {
    justify-self: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.18s ease;
}

.topbar__burger:hover {
    background: var(--ink-tap);
}

.topbar__burger-line {
    display: block;
    height: 2px;
    width: 1.25rem;
    margin: 0 auto;
    border-radius: 1px;
    background: var(--text);
}

.topbar__title {
    margin: 0;
    justify-self: center;
    grid-column: 2;
    max-width: min(100vw - 8rem, 100%);
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font: inherit;
    text-align: center;
    color: inherit;
    text-decoration: none;
    transition: background 0.18s ease;
}

.brand:hover {
    background: var(--ink-faint);
}

.brand:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.brand__logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.brand__wordmark {
    display: flex;
    align-items: baseline;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand__ben {
    color: var(--wordmark-ben);
}

.brand__to {
    color: var(--wordmark-to);
}

.topbar__locale {
    justify-self: end;
    grid-column: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.12rem;
    padding: 0.2rem 0.28rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    box-shadow: inset 0 0 0 1px var(--ink-line);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .topbar__locale {
        background: rgba(241, 233, 222, 0.55);
    }
}

.topbar__locale-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 1.75rem;
    padding: 0 0.28rem;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    cursor: pointer;
    line-height: 1;
    opacity: 0.5;
    transition:
        opacity 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.topbar__locale-btn:hover {
    opacity: 0.88;
    background: var(--ink-tap);
}

.topbar__locale-btn:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.topbar__locale-btn--active {
    opacity: 1;
    background: color-mix(in srgb, var(--surface) 70%, var(--primary) 12%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .topbar__locale-btn--active {
        background: rgba(255, 248, 250, 0.75);
    }
}

.topbar__locale-flag {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
    filter: saturate(0.92);
}

.nav-drawer__backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(62, 52, 88, 0.32);
    animation: nav-backdrop-in 0.2s ease;
}

@keyframes nav-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    width: min(18rem, 88vw);
    height: 100%;
    max-height: 100dvh;
    padding: 0.85rem 1rem 1.25rem;
    background: var(--surface);
    box-shadow: -6px 0 24px var(--ink-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: nav-drawer-in 0.22s ease;
}

@keyframes nav-drawer-in {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.nav-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ink-line);
}

.nav-drawer__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.nav-drawer__close {
    border: none;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.35rem;
    border-radius: var(--radius-sm);
}

.nav-drawer__close:hover {
    background: var(--ink-tap);
}

.nav-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-drawer__link {
    display: block;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.18s ease;
}

.nav-drawer__link:hover {
    background: var(--ink-tap);
    color: var(--primary);
}

.static-doc {
    padding-top: 0.5rem;
}

.static-doc__nav {
    margin-bottom: 1rem;
}

.static-doc__back {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 0.35rem 0.15rem;
    border-radius: var(--radius-sm);
}

.static-doc__back:hover {
    text-decoration: underline;
}

.static-doc__heading {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.static-doc__p {
    margin: 0 0 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 62ch;
}

@media (prefers-reduced-motion: reduce) {

    .nav-drawer,
    .nav-drawer__backdrop {
        animation: none;
    }
}

select,
input[type="number"] {
    font: inherit;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--surface);
    color: var(--text);
}

.app-shell h2,
.app-shell h3 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* Parcours constructeur : 3 étapes lisibles + barre de complétion */
.builder-steps {
    margin: 0.75rem 0 1.05rem;
}

/* Recette : compacter pastilles + piste quand on scroll le contenu */
.builder-steps--compact {
    margin: 0.4rem 0 0.65rem;
}

.builder-steps--compact .builder-steps__list {
    margin-bottom: 0.32rem;
    gap: 0.28rem;
}

.builder-steps--compact .builder-steps__step {
    gap: 0;
}

.builder-steps--compact .builder-steps__badge {
    width: 1.38rem;
    height: 1.38rem;
    font-size: 0.72rem;
}

.builder-steps--compact .builder-steps__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.builder-steps--compact .builder-steps__track {
    height: 4px;
}

.builder-steps__list {
    list-style: none;
    margin: 0 0 0.55rem;
    padding: 0;
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    align-items: flex-start;
}

.builder-steps__step {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.builder-steps__step--current {
    color: var(--text);
    font-weight: 700;
}

/* Libellés étapes terminées : assez foncés pour WCAG AA sur --bg (axe e2e). */
.builder-steps__step--done {
    color: var(--text);
    font-weight: 600;
}

.builder-steps__badge {
    flex-shrink: 0;
    width: 1.7rem;
    height: 1.7rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    box-shadow:
        var(--selection-lip),
        0 0 0 1.5px var(--ink-line);
    transition:
        opacity 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.builder-steps__badge:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.builder-steps__badge:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.builder-steps__step--current .builder-steps__badge {
    background: var(--primary);
    color: #fffaf9;
    box-shadow:
        var(--selection-lip),
        0 0 0 2px var(--selection-ring-strong);
}

.builder-steps__step--done .builder-steps__badge {
    background: color-mix(in srgb, var(--primary) 22%, var(--surface));
    color: #5c3045;
    box-shadow:
        var(--selection-lip),
        0 0 0 1.5px var(--ring-outline-strong);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .builder-steps__step--done .builder-steps__badge {
        background: rgba(196, 71, 109, 0.14);
    }
}

.builder-steps__label {
    max-width: 6.5rem;
}

.builder-steps__track {
    height: 6px;
    background: var(--progress-track);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.builder-steps__fill {
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
    .builder-steps__fill {
        transition-duration: 0.01ms;
    }
}

.builder-variant-base-reminder {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.35;
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline-soft);
}

.builder-variant-base-reminder__media {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.builder-variant-base-reminder__icon {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.builder-variant-base-reminder__text {
    flex: 1;
    min-width: 0;
}

/* Mobile : toujours 2 colonnes (minmax(200px) ne laissait qu’1 carte sur < ~416px) */
.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

@media (min-width: 31.25rem) {
    .cards {
        gap: 1rem;
        grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    }
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.85rem 0 1.1rem;
}

.chip {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.85rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.chip:hover {
    background: var(--ink-tap);
    color: var(--text);
}

.chip.selected {
    background: var(--primary-faint);
    color: var(--text);
    font-weight: 600;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 0 0 1px var(--ring-outline-soft);
}

.card {
    border: none;
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 1rem 1rem 0.95rem;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: 0 0 0 0 transparent;
    transition:
        background 0.2s ease,
        box-shadow 0.22s ease,
        color 0.2s ease,
        transform 0.28s cubic-bezier(0.33, 1.35, 0.52, 1);
}

.card:hover:not(.selected) {
    background: var(--surface-hover);
}

.card.selected {
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
    box-shadow:
        var(--selection-lip),
        0 0 0 2px var(--selection-ring),
        var(--selection-drop),
        var(--selection-shadow);
    transform: translateY(-1px);
}

.card.selected:hover {
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    box-shadow:
        var(--selection-lip),
        0 0 0 2px var(--selection-ring-strong),
        var(--selection-drop-hover),
        var(--selection-shadow-hover);
    transform: translateY(-2px);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .card.selected {
        background: rgba(196, 71, 109, 0.12);
    }

    .card.selected:hover {
        background: rgba(196, 71, 109, 0.18);
    }
}

.card__cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.65rem;
}

.card__sprite {
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin-bottom: 0.65rem;
}

.card.card--pick {
    background: transparent;
    box-shadow: none;
    touch-action: manipulation;
}

.card.card--pick:hover:not(.selected) {
    background: var(--ink-faint);
    box-shadow: none;
}

/* Sélection : fond blanc + ombre type boutons Partager / Imprimer */
.card.card--pick.selected {
    background: #fff;
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline-soft),
        var(--selection-drop),
        var(--selection-shadow);
    transform: translateY(-1px);
}

.card.card--pick.selected:hover {
    background: #fff;
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline),
        var(--selection-drop-hover),
        var(--selection-shadow-hover);
    transform: translateY(-2px);
}

.card.card--pick.selected .card__pick-name {
    color: #4a2434;
    font-weight: 700;
    text-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .card {
        transition-duration: 0.01ms;
    }

    .card.selected,
    .card.selected:hover {
        transform: none;
    }
}

.card--pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    border-radius: calc(var(--radius-md) + 6px);
}

/* Icônes catalogue : grille de base 32px, boîtes carrées (pas d’arrondi) */
.card__pick-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    flex-shrink: 0;
    margin: 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.card--pick .card__sprite {
    border-radius: 0;
}

.card__pick-sprite {
    margin-bottom: 0;
}

.card__pick-name {
    font-weight: 600;
    line-height: 1.3;
    font-size: 0.95rem;
}

.cta-context {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

/* Icône alignée sur la ligne du titre ; accroche en dessous, colonne texte décalée */
.cta-context--with-media {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0.28rem;
    align-items: start;
}

.cta-context--with-media .cta-context__media {
    grid-row: 1;
    grid-column: 1;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-context--with-media .cta-context__title {
    grid-row: 1;
    grid-column: 2;
}

.cta-context--with-media .cta-context__subtitle {
    grid-row: 2;
    grid-column: 2;
}

.cta-context__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--primary);
    min-width: 0;
}

.cta-context__subtitle {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-muted);
    min-width: 0;
}

.cta-context__icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    flex-shrink: 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.cta-context__sprite {
    flex-shrink: 0;
    border-radius: 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin: 0;
}

.cta {
    margin-top: 1rem;
    width: 100%;
    background: var(--primary);
    color: #f7f6f4;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.85rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline),
        var(--selection-drop);
    transition:
        background 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
}

.cta:hover {
    background: var(--primary-hover);
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline-strong),
        var(--selection-drop-hover);
}

.cta:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.08),
        0 0 0 1px var(--ring-outline);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.recipe-sheet {
    margin-top: 0.25rem;
}

/* Ligne portions uniquement sur papier (le stepper interactif est masqué à l’impression) */
.recipe-sheet__print-servings {
    display: none;
}

/* Hero recette : pleine largeur de la colonne, sans cadre, fondu vers le fond de page */
.recipe-sheet__hero {
    margin-left: calc(-1 * var(--app-shell-pad-x));
    margin-right: calc(-1 * var(--app-shell-pad-x));
    width: calc(100% + 2 * var(--app-shell-pad-x));
    margin-bottom: 1rem;
}

.recipe-sheet__hero-media {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.recipe-sheet__hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
            transparent 0%,
            transparent 52%,
            color-mix(in srgb, var(--bg) 35%, transparent) 80%,
            color-mix(in srgb, var(--bg) 88%, transparent) 94%,
            var(--bg) 100%);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .recipe-sheet__hero-media::after {
        background: linear-gradient(to bottom,
                transparent 0%,
                transparent 50%,
                rgba(241, 233, 222, 0.22) 74%,
                rgba(241, 233, 222, 0.5) 88%,
                #f1e9de 100%);
    }
}

.recipe-sheet__photo {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: clamp(11.5rem, 48vw, 17.5rem);
    object-fit: cover;
    object-position: center;
    margin: 0;
    border-radius: 0;
    filter: none;
}

.recipe-sheet__title {
    margin: 0 0 0.85rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}

.recipe-sheet__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.recipe-sheet__share-feedback {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary);
    text-align: center;
}

.recipe-sheet__action {
    flex: 1 1 auto;
    min-width: 7rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-pill);
    border: none;
    background: color-mix(in srgb, var(--surface) 88%, var(--primary) 12%);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline-soft);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .recipe-sheet__action {
        background: #fceef2;
    }
}

.recipe-sheet__action:hover {
    background: var(--surface-hover);
    box-shadow:
        var(--selection-lip),
        0 0 0 1px var(--ring-outline),
        var(--selection-drop);
}

.recipe-sheet__subtitle {
    margin: 1.35rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.recipe-sheet__ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
}

.recipe-sheet__ingredient-item {
    margin: 0.35rem 0;
    padding: 0;
}

.recipe-sheet__ingredient-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    font: inherit;
    font-weight: 400;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease;
    box-sizing: border-box;
}

.app-shell section ul li button.recipe-sheet__ingredient-row {
    font-weight: 400;
}

.recipe-sheet__ingredient-row:hover {
    background: color-mix(in srgb, var(--surface) 88%, var(--primary) 12%);
}

.recipe-sheet__ingredient-row:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .recipe-sheet__ingredient-row:hover {
        background: #fceef2;
    }
}

.recipe-sheet__ingredient-media {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-sheet__ingredient-sprite {
    display: block;
    flex-shrink: 0;
}

.recipe-sheet__ingredient-fallback {
    display: block;
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.recipe-sheet__ingredient-btn {
    flex: 1;
    text-align: left;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: default;
}

.recipe-sheet__ingredient-text {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    color: var(--text);
    transition: color 0.15s ease;
}

.app-shell section ul li button.recipe-sheet__ingredient-row:hover .recipe-sheet__ingredient-text {
    color: var(--text);
}

.recipe-sheet__ingredient-row--done .recipe-sheet__ingredient-text {
    color: var(--primary);
    font-weight: 600;
}

.app-shell section ul li button.recipe-sheet__ingredient-row--done:hover .recipe-sheet__ingredient-text {
    color: var(--primary);
}

.recipe-sheet__ingredient-row-check {
    flex-shrink: 0;
    width: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    pointer-events: none;
}

.recipe-sheet__ingredient-mark__glyph {
    opacity: 0;
    transition: opacity 0.12s ease;
}

.recipe-sheet__ingredient-row--done .recipe-sheet__ingredient-mark__glyph {
    opacity: 1;
}

.recipe-sheet__steps-list {
    margin: 0.35rem 0 0;
    padding-left: 2rem;
}

.recipe-sheet__step-item {
    margin: 0.25rem 0;
    padding-left: 0.15rem;
}

.recipe-sheet__step-btn {
    display: block;
    width: calc(100% - 0.25rem);
    text-align: left;
    padding: 0.35rem 0.5rem;
    margin-left: -0.35rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    line-height: 1.45;
    transition: background 0.15s ease;
}

.recipe-sheet__step-btn:hover {
    background: color-mix(in srgb, var(--surface) 85%, var(--primary) 15%);
}

.recipe-sheet__step-btn:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.recipe-sheet__step-btn--done {
    text-decoration: line-through;
    opacity: 0.72;
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .recipe-sheet__step-btn:hover {
        background: #fceef2;
    }
}

.servings-stepper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    padding: 0.35rem 0;
}

.servings-stepper__btn {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.18s ease,
        transform 0.15s ease,
        box-shadow 0.18s ease;
    box-shadow:
        var(--selection-lip),
        0 0 0 1.5px var(--selection-ring),
        2px 3px 0 var(--ink-shadow);
}

.servings-stepper__btn:hover:not(:disabled) {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.servings-stepper__btn:active:not(:disabled) {
    transform: translateY(0);
}

.servings-stepper__btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    box-shadow: 0 0 0 1px var(--ink-line);
}

.servings-stepper__field {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0 0.35rem;
}

.servings-stepper__input {
    width: 2.75rem;
    max-width: 100%;
    padding: 0.2rem 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.2;
    caret-color: var(--primary);
}

.servings-stepper__input:focus {
    outline: none;
}

.servings-stepper__input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.actions {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.actions button {
    flex: 1;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-pill);
    border: none;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease;
    box-shadow: 0 0 0 1px var(--ink-line);
}

.actions button:hover {
    background: var(--surface-hover);
}

.app-shell section ul li button {
    font: inherit;
    color: #2c2838;
    background: transparent;
    border: none;
    padding: 0.25rem 0;
    cursor: pointer;
    text-align: left;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.app-shell section ul li button:hover {
    color: var(--primary-hover);
}

.app-shell section ul li button:focus-visible {
    color: #1f1b2a;
    outline-offset: 3px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* ——— Impression recette : texte seul, quantités à l’écran, peu d’encre ——— */
@media print {
    @page {
        margin: 14mm 12mm;
        size: auto;
    }

    html,
    body {
        background: #fff !important;
        color: #111 !important;
    }

    * {
        -webkit-print-color-adjust: economy;
        print-color-adjust: economy;
    }

    .topbar,
    .nav-drawer,
    .nav-drawer__backdrop,
    .builder-steps,
    .recipe-sheet__hero,
    .recipe-sheet__actions,
    .recipe-sheet__share-feedback,
    .servings-stepper,
    .cta-dock {
        display: none !important;
    }

    .cookie-consent {
        display: none !important;
    }

    .app-shell {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-shell--internal-scroll {
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .builder-scroll,
    .recipe-scroll {
        overflow: visible !important;
        padding: 0 !important;
        flex: none !important;
    }

    .recipe-sheet {
        margin: 0 !important;
        max-width: 72ch;
    }

    .recipe-sheet__print-servings {
        display: block !important;
        margin: 0 0 0.65rem;
        font-size: 11pt;
        font-weight: 600;
        line-height: 1.35;
        color: #000 !important;
    }

    .recipe-sheet__title {
        font-size: 18pt !important;
        font-weight: 700 !important;
        margin: 0 0 0.35rem !important;
        color: #000 !important;
        letter-spacing: -0.02em;
        page-break-after: avoid;
        break-after: avoid;
    }

    .recipe-sheet__subtitle {
        margin: 0.85rem 0 0.35rem !important;
        font-size: 12pt !important;
        font-weight: 700 !important;
        color: #000 !important;
        page-break-after: avoid;
        break-after: avoid;
    }

    .recipe-sheet ul,
    .recipe-sheet ol {
        margin: 0 0 0.65rem;
        padding-left: 1.15rem;
    }

    .recipe-sheet__ingredient-list {
        padding-left: 0 !important;
    }

    .recipe-sheet ul li,
    .recipe-sheet ol li {
        margin: 0.15em 0;
        line-height: 1.45;
        color: #111 !important;
    }

    .recipe-sheet ol li button {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        color: #111 !important;
        font: inherit !important;
        font-weight: 400 !important;
        font-size: 11pt !important;
        line-height: 1.45 !important;
        cursor: default !important;
        text-align: left !important;
        display: block;
        width: 100%;
        border-radius: 0 !important;
    }

    .recipe-sheet ul li button.recipe-sheet__ingredient-row {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0.12em 0 !important;
        margin: 0 !important;
        cursor: default !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 100% !important;
        font-weight: 400 !important;
        font-size: 11pt !important;
        line-height: 1.45 !important;
        border-radius: 0 !important;
        text-align: left !important;
    }

    .recipe-sheet ul li button.recipe-sheet__ingredient-row .recipe-sheet__ingredient-text {
        color: #333 !important;
        font-weight: 400 !important;
    }

    .recipe-sheet ul li button.recipe-sheet__ingredient-row--done .recipe-sheet__ingredient-text {
        color: #000 !important;
        font-weight: 700 !important;
    }

    .recipe-sheet ul li button.recipe-sheet__ingredient-row .recipe-sheet__ingredient-row-check {
        font-size: 11pt !important;
        color: #111 !important;
        width: 1.25rem !important;
    }

    .recipe-sheet ul li button.recipe-sheet__ingredient-row--done .recipe-sheet__ingredient-mark__glyph {
        opacity: 1 !important;
    }

    .recipe-sheet__step-btn--done {
        text-decoration: line-through !important;
        opacity: 0.82 !important;
    }

    .recipe-sheet ol li {
        page-break-inside: avoid;
        break-inside: avoid;
        font-size: 11pt;
    }
}
