/* Milky Lady — styles partagés des pages recettes
   Reprend les design tokens du site (index.html) : DM Sans / DM Serif Display,
   palette terracotta / sage / cream. */

:root {
    --cream: #f4eae0;
    --cream-dark: #ead9ca;
    --cream-med: #ede0d4;
    --terra: #c05a3e;
    --terra-light: #f0d5cb;
    --terra-muted: #d4886e;
    --sage: #6b9e82;
    --sage-light: #e4f0ea;
    --night: #2d2560;
    --text-dark: #2e1a10;
    --text-mid: #7a5444;
    --text-light: #6b5245;
    --white: #fffcfa;
    --border: rgba(176, 133, 117, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--white);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--terra);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--terra);
    outline-offset: 2px;
    border-radius: 4px;
}

img {
    max-width: 100%;
    display: block;
}

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

/* ── NAV ── */
header {
    background: var(--white);
    border-bottom: 0.5px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: "DM Serif Display", serif;
    font-size: 20px;
    color: var(--text-dark);
    text-decoration: none;
}
.nav-logo em {
    color: var(--terra);
    font-style: normal;
}
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}
.nav-links a {
    font-size: 13px;
    color: var(--text-mid);
    text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--terra);
}
.nav-cta {
    background: var(--terra);
    color: white !important;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
}
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    line-height: 0;
}
.hamburger svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

/* ── LAYOUT ── */
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}
.breadcrumb {
    padding: 24px 0 4px;
}
.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    min-width: 0;
}
.breadcrumb li + li::before {
    content: "";
    flex: none;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid var(--terra-muted);
    border-top: 1.5px solid var(--terra-muted);
    transform: rotate(45deg);
    opacity: 0.7;
}
.breadcrumb a {
    color: var(--text-mid);
    text-decoration: none;
    transition: color 0.12s ease;
}
.breadcrumb a:hover {
    color: var(--terra);
}
.breadcrumb [aria-current="page"] {
    color: var(--text-dark);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── BUTTONS ── */
.btn-primary {
    background: var(--terra);
    color: white;
    border-radius: 12px;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border-radius: 12px;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 0.5px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── HERO HUB ── */
.recipes-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(192, 90, 62, 0.06), transparent 55%),
        radial-gradient(110% 130% at 0% 100%, rgba(107, 158, 130, 0.08), transparent 55%),
        var(--cream);
    border-bottom: 0.5px solid var(--border);
}
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}
.hero-blob-1 {
    width: 320px;
    height: 320px;
    top: -120px;
    right: -80px;
    background: rgba(192, 90, 62, 0.08);
}
.hero-blob-2 {
    width: 200px;
    height: 200px;
    bottom: -90px;
    left: 8%;
    background: rgba(107, 158, 130, 0.1);
}
.recipes-hero .wrap {
    position: relative;
    z-index: 1;
    padding-top: 48px;
    padding-bottom: 52px;
}
.recipes-hero h1 {
    font-family: "DM Serif Display", serif;
    font-size: 46px;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--text-dark);
    margin-bottom: 18px;
    max-width: 820px;
}
.recipes-hero h1 em {
    color: var(--terra);
    font-style: italic;
}
.recipes-hero p {
    font-size: 16.5px;
    color: var(--text-mid);
    line-height: 1.75;
    max-width: 620px;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--terra);
    margin-bottom: 22px;
    box-shadow: 0 2px 10px rgba(46, 26, 16, 0.04);
}

/* ── FILTERS ── */
.filters {
    background: var(--white);
    border-bottom: 0.5px solid var(--border);
}
.filters-inner {
    padding-top: 26px;
    padding-bottom: 26px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.search-box {
    position: relative;
    max-width: 540px;
}
.search-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-light);
    pointer-events: none;
}
.search-box input {
    width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--text-dark);
    padding: 13px 16px 13px 44px;
    border: 0.5px solid var(--border);
    border-radius: 14px;
    background: var(--cream);
    transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.search-box input::placeholder {
    color: var(--text-light);
}
.search-box input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--terra-muted);
    box-shadow: 0 0 0 3px rgba(192, 90, 62, 0.1);
}

.filter-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.filter-row {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 16px;
    align-items: baseline;
}
.filter-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    color: var(--text-light);
    padding-top: 9px;
}
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-mid);
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.chip:hover {
    border-color: var(--terra-muted);
    color: var(--terra);
    transform: translateY(-1px);
}
.chip[aria-pressed="true"] {
    background: var(--terra);
    border-color: var(--terra);
    color: white;
    box-shadow: 0 4px 12px rgba(192, 90, 62, 0.22);
}
.chip[data-filter="noallergen"][aria-pressed="true"] {
    background: var(--sage);
    border-color: var(--sage);
    box-shadow: 0 4px 12px rgba(107, 158, 130, 0.22);
}

.filters-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 0.5px solid var(--border);
    margin-top: 2px;
    padding-top: 18px;
}
.results-count {
    font-size: 13px;
    color: var(--text-light);
}
.results-count strong {
    color: var(--text-dark);
    font-weight: 500;
}
.reset-btn {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--terra);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
}
.reset-btn:hover {
    text-decoration: underline;
}

/* ── GRID & CARDS ── */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 22px 0 64px;
}
.recipe-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(46, 26, 16, 0.09);
}
.recipe-card-media {
    aspect-ratio: 4 / 3;
    background: var(--cream);
    overflow: hidden;
}
.recipe-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.recipe-card:hover .recipe-card-media img {
    transform: scale(1.05);
}
.recipe-card-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.recipe-card h2 {
    font-family: "DM Serif Display", serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-dark);
}
.recipe-card-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.badge {
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
    padding: 4px 10px;
    background: var(--sage-light);
    color: #3f6b53;
}
.badge.cat {
    background: var(--terra-light);
    color: var(--terra);
}
.empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    padding: 48px 0;
}

/* ── DETAIL ── */
.recipe-detail {
    padding-bottom: 48px;
}
.detail-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
    padding: 24px 0 8px;
}
.detail-media {
    border-radius: 20px;
    overflow: hidden;
    background: var(--cream);
    aspect-ratio: 4 / 3;
}
.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-head h1 {
    font-family: "DM Serif Display", serif;
    font-size: 36px;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 14px;
}
.detail-desc {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text-mid);
    margin-bottom: 18px;
}
.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    padding: 16px 0;
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
}
.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat .k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
}
.stat .v {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.detail-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    padding: 40px 0;
    align-items: start;
}
.section-title {
    font-family: "DM Serif Display", serif;
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 16px;
}
.ingredients {
    background: var(--cream);
    border-radius: 16px;
    padding: 22px;
    position: sticky;
    top: 80px;
}
.ingredients ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ingredients li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 14.5px;
    color: var(--text-dark);
    padding-bottom: 12px;
    border-bottom: 0.5px solid var(--border);
}
.ingredients li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ingredients li .qty {
    color: var(--terra);
    font-weight: 500;
    white-space: nowrap;
}
.steps {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 16px;
    align-items: start;
}
.steps li::before {
    content: counter(step);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--terra);
    color: white;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps li .step-text {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--text-dark);
    padding-top: 6px;
}
.steps li .step-dur {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--sage);
    font-weight: 500;
}

.age-note {
    background: var(--sage-light);
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #3f6b53;
    margin: 8px 0 0;
}

/* ── CTA APP ── */
.app-cta {
    background: var(--cream);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin: 16px 0 8px;
}
.app-cta h2 {
    font-family: "DM Serif Display", serif;
    font-size: 26px;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.app-cta p {
    font-size: 15px;
    color: var(--text-mid);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 22px;
}
.app-cta .hero-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── RELATED ── */
.related {
    padding: 8px 0 56px;
}
.related h2 {
    font-family: "DM Serif Display", serif;
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* ── FOOTER ── */
footer {
    background: var(--cream);
    padding: 48px 40px;
    border-top: 0.5px solid var(--border);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 28px;
}
.footer-logo {
    font-family: "DM Serif Display", serif;
    font-size: 20px;
    color: var(--text-dark);
}
.footer-logo em {
    color: var(--terra);
    font-style: normal;
}
.footer-sub {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 240px;
    margin-top: 8px;
}
.footer-links h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 12px;
}
.footer-links a {
    display: block;
    font-size: 13px;
    color: var(--text-mid);
    text-decoration: none;
    margin-bottom: 8px;
}
.footer-links a:hover {
    color: var(--terra);
}
.footer-bottom {
    padding: 16px 40px;
    font-size: 11px;
    color: var(--text-light);
    border-top: 0.5px solid var(--border);
    text-align: left;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .recipe-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .detail-body {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .ingredients {
        position: static;
    }
}
@media (max-width: 768px) {
    nav {
        padding: 14px 20px;
    }
    .wrap {
        padding: 0 20px;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 0.5px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .nav-links.open {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .recipes-hero h1 {
        font-size: 32px;
    }
    .recipes-hero h1 br {
        display: none;
    }
    .detail-head {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .detail-head h1 {
        font-size: 28px;
    }
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    .filter-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .filter-label {
        padding-top: 0;
    }
    .search-box {
        max-width: none;
    }
    .app-cta {
        padding: 28px 20px;
    }
    footer {
        padding: 36px 20px;
    }
    .footer-bottom {
        padding: 16px 20px;
    }
}
