:root {
    --vert:        #e91e8c;
    --vert-clair:  #f06292;
    --menthe:      #f48fb1;
    --creme:       #fff5fa;
    --sable:       #fce4ec;
    --terre:       #880e4f;
    --safran:      #e8a020;
    --rouge-epice: #d81b60;
    --texte:       #2d0020;
    --texte-doux:  #ad1457;
    --blanc:       #ffffff;

    --nav-bg:      rgba(255, 245, 250, 0.94);
    --nav-border:  rgba(233, 30, 140, 0.18);
    --input-bg:    #fff0f8;
    --input-border:#f48fb1;
    --card-bg:     #ffffff;
    --footer-bg:   #2d0020;

    --bg-blob-1:   rgba(244, 143, 177, 0.18);
    --bg-blob-2:   rgba(233,  30, 140, 0.08);

    --radius-sm:   .8rem;
    --radius-md:   1.2rem;
    --radius-lg:   1.5rem;
    --radius-xl:   2rem;

    --shadow-sm:   0 2px 12px rgba(0,0,0,.06);
    --shadow-md:   0 8px 30px rgba(0,0,0,.10);
    --shadow-lg:   0 20px 60px rgba(0,0,0,.14);

    --transition:  .22s ease;
}

html.theme-vert {
    --vert:        #3a8a6a;
    --vert-clair:  #5aaa88;
    --menthe:      #7acc9a;
    --creme:       #f7faf8;
    --sable:       #ddf2e8;
    --terre:       #2a6a50;
    --safran:      #e8a020;
    --rouge-epice: #c0392b;
    --texte:       #1a3a2a;
    --texte-doux:  #6a9a88;
    --blanc:       #ffffff;

    --nav-bg:      rgba(247, 250, 248, 0.92);
    --nav-border:  rgba(58, 138, 106, 0.15);
    --input-bg:    #f0faf5;
    --input-border:#a8dcc8;
    --card-bg:     #ffffff;
    --footer-bg:   #1a3a2a;

    --bg-blob-1:   rgba(122, 204, 154, 0.18);
    --bg-blob-2:   rgba(58,  138, 106, 0.10);

}

html.theme-nuit {
    --vert:        #7c6cbf;
    --vert-clair:  #9d8dd4;
    --menthe:      #b8a8e8;
    --creme:       #0f0f1a;
    --sable:       #1a1a2e;
    --terre:       #9d8dd4;
    --safran:      #c8a8f0;
    --rouge-epice: #e05555;
    --texte:       #e8e4f8;
    --texte-doux:  #9890b8;
    --blanc:       #1a1a2e;

    --nav-bg:      rgba(10, 10, 20, 0.97);
    --nav-border:  rgba(124, 108, 191, 0.2);
    --input-bg:    #1a1a2e;
    --input-border:#3a2860;
    --card-bg:     #1a1a2e;
    --footer-bg:   #080810;

    --bg-blob-1:   rgba(124, 108, 191, 0.22);
    --bg-blob-2:   rgba(184, 168, 232, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--creme);
    background-image:
        radial-gradient(ellipse 75% 55% at 12%  4%,  var(--bg-blob-1) 0%, transparent 100%),
        radial-gradient(ellipse 55% 40% at 90%  18%, var(--bg-blob-2) 0%, transparent 100%),
        radial-gradient(ellipse 65% 45% at 55% 100%, var(--bg-blob-1) 0%, transparent 100%);
    color: var(--texte);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color .4s ease, color .4s ease;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 0; opacity: .6;
}

main, .container { flex: 1; }
footer { margin-top: auto; }

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nav-border);
    padding: 0 2rem;
    transition: background .4s ease, border-color .4s ease;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
}
.logo { display: flex; flex-direction: column; }
.logo-main {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem; font-weight: 700;
    color: var(--vert); line-height: 1;
}
.logo-sub { font-family: 'Caveat', cursive; font-size: .85rem; color: var(--terre); }

.logo img {
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1),
                box-shadow .4s ease;
}
.logo:hover img {
    transform: rotate(-8deg) scale(1.12);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
    font-size: .88rem; font-weight: 500;
    color: var(--texte-doux);
    letter-spacing: .04em; text-transform: uppercase;
    position: relative; transition: color var(--transition);
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: var(--menthe);
    transform: scaleX(0); transform-origin: left;
    transition: transform .25s ease;
}
.nav-links a:hover { color: var(--vert); }
.nav-links a:hover::after { transform: scaleX(1); }

.hero {
    min-height: 88vh;
    display: grid; grid-template-columns: 1fr 1fr;
    max-width: 1200px; margin: 0 auto;
    padding: 5rem 2rem 3rem;
    gap: 4rem; align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58,138,106,.07) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: 5%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58,138,106,.05) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

.hero-text { position: relative; z-index: 1; }

.hero-text::before {
    content: '';
    position: absolute; left: -1.5rem; top: 20%; bottom: 20%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--vert), transparent);
}

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--sable); border: 1px solid var(--menthe);
    color: var(--terre); font-size: .78rem; font-weight: 500;
    padding: .35rem .9rem; border-radius: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: .05em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.6rem, 4.5vw, 4rem); font-weight: 700; margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; color: var(--vert); display: block; }
.hero-desc { font-size: 1.05rem; color: var(--texte-doux); line-height: 1.75; max-width: 480px; margin-bottom: 2.2rem; }
.hero-actions { display: flex; gap: 1rem; align-items: center; }

.btn-primary {
    background: var(--vert); color: white;
    padding: .85rem 2rem; border-radius: 3rem;
    font-weight: 500; font-size: .95rem;
    display: inline-flex; align-items: center; gap: .5rem;
    transition: transform var(--transition), box-shadow var(--transition), background .4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.22); }
.btn-ghost {
    color: var(--vert); font-weight: 500; font-size: .95rem;
    display: inline-flex; align-items: center; gap: .4rem;
    transition: gap var(--transition); background: none; border: none; cursor: pointer;
}
.btn-ghost:hover { gap: .7rem; }
.btn-secondary {
    background: transparent; border: 1.5px solid var(--vert); color: var(--vert);
    padding: .75rem 1.8rem; border-radius: 3rem; font-weight: 500; cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.btn-secondary:hover { background: var(--vert); color: white; }

.citation-home {
    padding: 3.5rem 2rem;
    text-align: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}
.citation-home::before,
.citation-home::after {
    content: '';
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 1px; height: 32px;
    background: linear-gradient(to bottom, transparent, var(--input-border), transparent);
}
.citation-home::before { top: 0; }
.citation-home::after  { bottom: 0; }
.citation-home p {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-style: italic; color: var(--texte-doux);
    max-width: 580px; margin: 0 auto;
    line-height: 1.8; position: relative;
}
.citation-home p::before {
    content: '«';
    font-size: 4rem; color: var(--sable);
    position: absolute; top: -1.5rem; left: -2rem;
    font-style: normal; line-height: 1;
}
.citation-home small {
    display: block; margin-top: .8rem;
    font-size: .8rem; color: var(--input-border);
    font-style: italic;
}

.recettes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.recipe-card {
    border-radius: var(--radius-lg); overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), background .4s ease;
    display: block;
}
.recipe-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.recipe-thumb {
    aspect-ratio: 4/3; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-size: 4rem;
}
.recipe-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.recipe-card:hover .recipe-thumb img { transform: scale(1.05); }

.recipe-thumb .time-badge {
    position: absolute; top: .8rem; left: .8rem;
    background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
    color: white; font-size: .72rem; font-weight: 500;
    border-radius: 2rem; padding: .25rem .6rem;
}
.recipe-thumb .saveur-badge {
    position: absolute; top: .8rem; right: .8rem;
    background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
    color: white; font-size: .72rem; font-weight: 500;
    border-radius: 2rem; padding: .25rem .6rem;
}
.recipe-thumb .origin-badge {
    position: absolute; top: .8rem; left: .8rem;
    background: var(--vert); color: white; border-radius: 2rem; padding: .3rem .7rem;
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}

.recipe-body { padding: 1.4rem; }
.recipe-tags { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }
.recipe-tag {
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    padding: .2rem .65rem; border-radius: 2rem;
    background: var(--sable); color: var(--texte-doux);
    transition: background .4s ease, color .4s ease;
}
.recipe-title {
    font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700;
    margin-bottom: .5rem; line-height: 1.3; color: var(--texte);
}
.recipe-desc { font-size: .85rem; color: var(--texte-doux); line-height: 1.6; margin-bottom: 1rem; }
.recipe-footer {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--sable); padding-top: 1rem;
}
.recipe-stars { color: var(--safran); font-size: .85rem; letter-spacing: .05em; }

.section-label {
    font-family: 'Caveat', cursive; font-size: 1.15rem; color: var(--vert);
    display: block; margin-bottom: .5rem; letter-spacing: .03em;
}
.section-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(2rem, 3.2vw, 2.8rem); font-weight: 400; font-style: italic;
    color: var(--texte); line-height: 1.15;
    padding-bottom: 1rem; margin-bottom: 2rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute; bottom: 0; left: 0;
    width: 3.2rem; height: 3px; border-radius: 2px;
    background: linear-gradient(to right, var(--vert), var(--menthe));
}
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }

.section-categories {
    background: var(--sable);
    padding: 5rem 2rem;
    position: relative;

    background-image:
        radial-gradient(circle, rgba(58,138,106,.1) 1px, transparent 1px);
    background-size: 28px 28px;
    background-color: var(--sable);
    transition: background-color .4s ease;
}

.section-categories::before {
    content: '';
    position: absolute; top: -1px; left: 0; right: 0;
    height: 55px;
    background: var(--creme);
    clip-path: ellipse(55% 100% at 50% 0%);
    z-index: 1;
}

.section-categories::after {
    content: '';
    position: absolute; bottom: -1px; left: 0; right: 0;
    height: 55px;
    background: var(--creme);
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: 1;
}

.section-categories > * { position: relative; z-index: 2; }
.section-categories .container { position: relative; z-index: 2; }
.section-categories .section-title { color: var(--texte); }
.section-categories .section-label { color: var(--terre); }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }

@keyframes catCardIn {
    from { opacity: 0; transform: translateY(22px) scale(.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

.cat-card {
    background: var(--menthe);
    border: none;
    border-radius: var(--radius-md); padding: 1.5rem;
    transition: background var(--transition), transform var(--transition),
                box-shadow var(--transition), color var(--transition);
    display: flex; flex-direction: column; gap: .5rem;
    position: relative; z-index: 2;
    animation: catCardIn .45s cubic-bezier(.22, 1, .36, 1) both;
}

.cat-card:nth-child(1) { animation-delay: .05s; }
.cat-card:nth-child(2) { animation-delay: .12s; }
.cat-card:nth-child(3) { animation-delay: .19s; }
.cat-card:nth-child(4) { animation-delay: .26s; }
.cat-card:nth-child(5) { animation-delay: .33s; }

.cat-card:hover { background: var(--vert); transform: translateY(-4px); box-shadow: 0 14px 36px rgba(58,138,106,.28); }

.cat-icon {
    font-size: 2.2rem;
    display: block;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.cat-card:hover .cat-icon { transform: scale(1.18) rotate(-5deg); }

.cat-name { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--blanc); }
.cat-count { font-size: .8rem; color: rgba(255,255,255,.65); }
.cat-card.featured {
    grid-column: span 2; flex-direction: row; align-items: center; gap: 1.2rem;
    background: var(--menthe); border: none;
}
.cat-card.featured .cat-icon { font-size: 2.8rem; }
.cat-card.featured:hover { background: var(--vert); transform: translateY(-4px); }

.recipe-detail {
    max-width: 1200px; margin: 0 auto; padding: 5rem 2rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start;
}
.detail-img-wrap { position: sticky; top: 5rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
.detail-img { width: 100%; aspect-ratio: 1; border-radius: var(--radius-xl); object-fit: cover; box-shadow: var(--shadow-lg); }
.detail-img-placeholder {
    width: 100%; aspect-ratio: 1; border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--sable), var(--vert));
    display: flex; align-items: center; justify-content: center; font-size: 8rem;
}
.recipe-meta-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0 2rem;
    background: var(--sable); border-radius: var(--radius-md); padding: 1.2rem;
    transition: background .4s ease;
}
.meta-item { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.meta-val { font-size: .9rem; font-weight: 700; color: var(--vert); white-space: nowrap; text-align: center; }
.meta-key { font-size: .75rem; color: var(--texte-doux); text-align: center; }

.ingredients-epices-wrap {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1rem; margin-bottom: 2rem;
}
.ingredients-epices-wrap--solo { grid-template-columns: 1fr; }
.ingredients-epices-wrap .ingredients-box,
.ingredients-epices-wrap .epices-box { margin-bottom: 0; }

.ingredients-box {
    background: var(--card-bg); border-radius: var(--radius-md);
    padding: 1.5rem; margin-bottom: 2rem; box-shadow: var(--shadow-sm);
    transition: background .4s ease;
}
.ingredients-box h3 { font-size: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.ing-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 2px auto; }
.ing-list li { display: contents; }
.ing-nom { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; color: var(--texte-doux); padding-right: 1.2rem; padding-bottom: .35rem; }
.ing-list li:last-child .ing-nom,
.ing-list li:last-child .ing-qte { padding-bottom: 0; }
.ingredients-box .ing-nom::before, .epices-box .ing-nom::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--menthe); flex-shrink: 0; margin-top: .42rem; }
.ing-sep { background: var(--menthe); }
.ing-list li:first-child .ing-sep { background: linear-gradient(to bottom, transparent 0%, var(--menthe) 50%); }
.ing-list li:last-child  .ing-sep { background: linear-gradient(to bottom, var(--menthe) 50%, transparent 100%); }
.ing-list li:only-child  .ing-sep { background: linear-gradient(to bottom, transparent 0%, var(--menthe) 20%, var(--menthe) 80%, transparent 100%); }
.ing-qte { font-size: .92rem; font-weight: 700; color: var(--texte); padding-left: 1.2rem; padding-bottom: .35rem; }

.epices-box {
    background: var(--card-bg); border-radius: var(--radius-md);
    padding: 1.5rem; box-shadow: var(--shadow-sm);
    transition: background .4s ease;
}
.epices-box h3 { font-size: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

@media (max-width: 600px) {
    .ingredients-epices-wrap { grid-template-columns: 1fr; }
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.steps-list::before {
    content: '';
    position: absolute;
    left: 19px; top: 20px; bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--menthe), var(--sable));
    z-index: 0;
    border-radius: 2px;
    pointer-events: none;
}

.step-normal {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: .4rem 0;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.step-num {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--input-border);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700;
    color: var(--texte-doux);
    position: relative; z-index: 2;
    transition: background .22s, border-color .22s, color .22s,
                transform .25s cubic-bezier(.34, 1.56, .64, 1);
    user-select: none;
}
.step-check { display: none; font-size: .9rem; }

.step-normal:hover .step-num {
    border-color: var(--vert);
    color: var(--vert);
    transform: scale(1.1);
}
.step-normal.done .step-num {
    background: var(--vert);
    border-color: var(--vert);
    color: white;
    transform: scale(1);
}
.step-normal.done .step-check   { display: block; }
.step-normal.done .step-num-val { display: none; }

.step-card {
    flex: 1;
    margin-top: .05rem;
    background: var(--card-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: .8rem 1.1rem;
    font-size: .93rem; line-height: 1.72;
    color: var(--texte);
    transition: border-color .22s, box-shadow .22s,
                background .22s, color .22s, opacity .22s;
}
.step-normal:hover .step-card {
    border-color: var(--vert);
    box-shadow: 0 3px 14px rgba(0, 0, 0, .07);
}
.step-normal.done .step-card {
    background: var(--sable);
    border-color: var(--menthe);
    color: var(--texte-doux);
    opacity: .72;
}
.step-normal.done .step-text {
    text-decoration: line-through;
    text-decoration-color: var(--menthe);
}

.step-section-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.1rem 0 .6rem;
    position: relative;
    z-index: 1;
}

.step-header-bar {
    flex-shrink: 0;
    width: 40px; height: 2px;
    background: linear-gradient(to right, var(--vert), var(--menthe));
    border-radius: 2px;
    position: relative; z-index: 2;
}

.step-header-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--vert);
    line-height: 1.3;
}

.comments-section { max-width: 760px; margin: 0 auto; padding: 0 2rem 5rem; }
.comment {
    display: flex; gap: 1rem; margin-bottom: 1.5rem;
    padding-bottom: 1.5rem; border-bottom: 1px solid var(--sable);
}
.comment:last-of-type { border-bottom: none; }
.comment-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: white; font-size: .9rem;
    background: linear-gradient(135deg, var(--vert), var(--menthe));
}
.comment-name { font-weight: 600; font-size: .9rem; }
.comment-date { font-size: .78rem; color: var(--texte-doux); margin-left: .5rem; }
.comment-text { font-size: .92rem; line-height: 1.65; color: var(--texte-doux); margin-top: .3rem; }

.comment-form {
    background: var(--card-bg); border-radius: var(--radius-lg);
    padding: 2rem; margin-top: 2.5rem; box-shadow: var(--shadow-sm);
    transition: background .4s ease;
}
.comment-form h3 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field label { font-size: .82rem; font-weight: 500; color: var(--texte-doux); }
.form-field input,
.form-field textarea {
    border: 1.5px solid var(--input-border); border-radius: var(--radius-sm);
    padding: .7rem 1rem; font-size: .9rem; outline: none;
    background: var(--input-bg); color: var(--texte);
    transition: border-color var(--transition), background .4s ease;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--vert); }
.form-field textarea { min-height: 110px; resize: vertical; }

.site-footer {
    background: var(--footer-bg);
    color: rgba(255,255,255,.7);
    padding: 3.5rem 2rem 2rem;
    transition: background .4s ease;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem; padding-bottom: 2rem;
}
.site-footer .logo-main { color: var(--menthe); font-size: 1.2rem; }
.site-footer .logo-sub  { color: var(--safran); }
.footer-desc { font-size: .88rem; line-height: 1.7; margin-top: .8rem; max-width: 300px; }
.footer-col h5 { color: white; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .88rem; transition: color var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom {
    max-width: 1200px; margin: 0 auto; padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex; justify-content: space-between; font-size: .82rem;
}

.page-404 { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.page-404 .emoji { font-size: 5rem; margin-bottom: 1.5rem; }
.page-404 h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.page-404 p  { color: var(--texte-doux); margin-bottom: 2rem; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 3rem; }
    .hero::before, .hero::after { display: none; }
    .hero-text::before { display: none; }
    .hero-visual { display: none; }
    .recettes-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-card.featured { grid-column: span 2; }
    .recipe-detail { grid-template-columns: 1fr; gap: 2rem; }
    .detail-img-wrap { position: static; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .recettes-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
    .cat-card.featured { grid-column: span 1; }
    .nav-links { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .recipe-meta-bar { grid-template-columns: repeat(2, 1fr); }
    .citation-home p::before { display: none; }
}

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.input-error { border-color: var(--rouge-epice) !important; }
.field-error { font-size: .78rem; color: var(--rouge-epice); margin-top: .2rem; display: block; }

.star-rating { display: flex; gap: .3rem; margin-bottom: 1rem; }
.star { font-size: 1.5rem; cursor: pointer; color: #ddd; transition: color var(--transition); }
.star.hovered, .star.selected { color: var(--safran); }

.filtre-btn {
    padding: .45rem 1.1rem; border-radius: 2rem;
    border: 1.5px solid var(--input-border);
    font-size: .85rem; font-weight: 500; color: var(--texte-doux);
    background: var(--card-bg);
    transition: all var(--transition);
    cursor: pointer;
}
.filtre-btn:hover, .filtre-btn.active { background: var(--vert); color: white; border-color: var(--vert); }

.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; }
.page-btn {
    padding: .5rem 1rem; border-radius: var(--radius-sm);
    border: 1.5px solid var(--input-border); font-size: .88rem; color: var(--texte-doux);
    transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--vert); color: white; border-color: var(--vert); }

.alert-success {
    background: var(--sable); color: var(--vert);
    border: 1px solid var(--input-border); border-radius: var(--radius-sm);
    padding: 1rem 1.2rem; margin-bottom: 1.5rem; font-size: .92rem;
}

.hero-card-main { position: relative; overflow: hidden; border-radius: var(--radius-xl); }
.hero-card-main img { border-radius: var(--radius-xl); transition: transform .5s ease; }
.hero-card-main:hover img { transform: scale(1.05); }
.hero-card-main::after {
    content: 'Voir la recette →';
    position: absolute; bottom: 1.5rem; right: 1.5rem;
    background: white; color: var(--vert);
    padding: .5rem 1.1rem; border-radius: 2rem;
    font-size: .82rem; font-weight: 600;
    opacity: 0; transform: translateY(6px);
    transition: opacity .3s ease, transform .3s ease; z-index: 3;
}
.hero-card-main:hover::after { opacity: 1; transform: translateY(0); }
.hero-card-main .recipe-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; z-index: 2; transition: transform .3s ease; }
.hero-card-main:hover .recipe-label { transform: translateY(-4px); }
.hero-card-main .recipe-label h3 { color: white; font-size: 1.2rem; margin-top: .3rem; }
.hero-card-main .tag { background: rgba(255,255,255,.2); backdrop-filter: blur(4px); color: white; border: 1px solid rgba(255,255,255,.3); }

.food-emoji {
    width: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
    background: linear-gradient(135deg, var(--sable) 0%, var(--menthe) 100%);
    transition: background .4s ease;
}

.vues-badge {
    position: absolute; bottom: .6rem; left: .6rem;
    background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
    color: white; font-size: .72rem; font-weight: 500;
    padding: .2rem .55rem; border-radius: 2rem;
}

.regime-badge {
    position: absolute; bottom: .6rem; right: .6rem;
    background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
    color: white; font-size: .72rem; font-weight: 500;
    padding: .2rem .55rem; border-radius: 2rem;
}

.badge-regime {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--sable); color: var(--vert);
    border: 1px solid var(--input-border);
    font-size: .82rem; font-weight: 600;
    padding: .3rem .8rem; border-radius: 2rem;
}

.theme-switcher {
    position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 999;
    display: flex; align-items: center;
    background: var(--card-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 3rem; padding: .45rem .7rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    transition: background .4s ease, border-color .4s ease, box-shadow .2s ease;
    overflow: hidden;
}
.theme-switcher:hover { box-shadow: 0 6px 28px rgba(0,0,0,.22); }

.theme-handle {
    font-size: 1.05rem; line-height: 1;
    background: none; border: none; cursor: pointer;
    padding: .15rem .2rem; flex-shrink: 0;
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.theme-switcher.open .theme-handle { transform: rotate(20deg) scale(1.25); }

.theme-panel {
    display: flex; align-items: center; gap: .4rem;
    max-width: 0; overflow: hidden; opacity: 0;
    margin-left: 0;
    transition: max-width .42s cubic-bezier(.22, 1, .36, 1),
                opacity    .25s ease,
                margin-left .42s ease;
}
.theme-switcher.open .theme-panel {
    max-width: 280px; opacity: 1; margin-left: .45rem;
}

.theme-option {
    display: flex; align-items: center; gap: .3rem;
    padding: .3rem .65rem; border-radius: 2rem;
    font-size: .78rem; font-weight: 500; color: var(--texte-doux);
    transition: background .2s ease, color .2s ease;
    cursor: pointer; white-space: nowrap;
    background: none; border: none;
}
.theme-option:hover { background: var(--sable); color: var(--texte); }
.theme-option.active { background: var(--vert); color: white; }

.theme-sep { width: 1px; height: 1rem; background: var(--input-border); flex-shrink: 0; }

.btn-sm.reset { border-color: #5a5248; color: #5a5248; transition: all .25s; }
.btn-sm.reset:hover { background: #5a5248; color: white; }
.btn-sm.reset .icon-reset { display: inline-block; transition: transform .4s ease; }
.btn-sm.reset:hover .icon-reset { transform: rotate(180deg); }

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .75rem;
}
