/* ---------- Variables ---------- */
:root {
    --bg: #f8f5f2;
    --bg-alt: #ffffff;
    --primary: #ff7b54;
    --primary-dark: #e55e35;
    --accent: #ffc145;
    --text: #1f1f1f;
    --muted: #777777;
    --border: #e2dfda;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.06);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Reset simple ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- Layout de base ---------- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 1.9rem;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--muted);
}

/* ---------- Header & nav ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(248, 245, 242, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
}

.logo::before {
    content: "🍽️ ";
    font-size: 1.6rem;
    /* un peu plus grand que le texte */
}

.nav a {
    margin-left: 18px;
    font-size: 0.95rem;
    color: var(--muted);
    position: relative;
}

.nav a.active,
.nav a:hover {
    color: var(--primary-dark);
}

.nav a.active::after,
.nav a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 60%;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero {
    padding: 60px 0 50px;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.hero-text p {
    color: var(--muted);
    max-width: 480px;
}



.hero-buttons {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, border-color 0.1s ease;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-alt);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: #f0ece7;
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 123, 84, 0.06);
}

/*---serving-box---*/
.servings-box {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
    margin: 14px 0 18px 0;
}

.servings-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.servings-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.servings-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    cursor: pointer;
    font-size: 1.1rem;
}

.servings-input {
    width: 80px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 10px;
    font-size: 1rem;
}

.servings-note,
.ingredients-optional {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}


/* Hero image */
.hero-image {
    position: relative;
    min-height: 260px;
}

.hero-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.hero-photo {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background-image: linear-gradient(135deg, rgba(23, 22, 21, 0.077), hsla(0, 25%, 13%, 0.287)),
        url("../images/chaomen-crevette.png");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    z-index: 1;
}

/* ---------- Grille ---------- */
.grid {
    display: grid;
    gap: 24px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 18px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.card-recipe,
.card-blog {
    overflow: hidden;
    padding: 0;

}

.card-recipe {
    height: 100%;
}


.card-image {
    height: 170px;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;

}

.card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-link {
    margin-top: auto;
    /* pousse le lien tout en bas */
}


.card-body h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.card-body p {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.card-meta i {
    margin-right: 4px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--primary-dark);

}

.card-link:hover {
    text-decoration: underline;
}

/* ===== CARD IMAGE VERSION IMG ===== */

/* ===== CARD RECIPE ===== */

.card-recipe {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-recipe:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-recipe .card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-recipe .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card-recipe:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    margin-top: 10px;
    color: #777;
}

.card-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: #e67e22;
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}



/* Tags */
.tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
    font-weight: 600;
}

.tag-easy {
    background: rgba(76, 175, 80, 0.12);
    color: #277a2b;
}

.tag-medium {
    background: rgba(255, 193, 69, 0.15);
    color: #b87300;
}

.tag-hard {
    background: rgba(244, 67, 54, 0.1);
    color: #b22222;
}

.tag-blog {
    background: rgba(118, 93, 239, 0.12);
    color: #4a3bba;
}

/* ===== TABLE OF CONTENTS ===== */

.table-of-contents {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
}

.table-of-contents h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 10px;
}

.table-of-contents a {
    text-decoration: none;
    color: #e67e22;
    font-weight: 500;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: #c45f0f;
    text-decoration: underline;
}

/* ===== HERO PILIER ===== */

.page-header-pilier {
    position: relative;
    background: linear-gradient(
                    rgba(0,0,0,0.6),
                    rgba(0,0,0,0.6)
                ),
                url("../images/recettes-rapides.png");

    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;

    min-height: 65vh;
    display: flex;
    align-items: center;

    color: #fff;
    padding: 60px 0;
}


.page-header-pilier h1 {
    font-size: 2.5rem;
    font-weight: 700;


}

.page-header-pilier p {
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 650px;
    color: rgb(249, 9, 9);
}

.category-highlight {
    background: #fff5ed;
    padding: 20px;
    border-left: 4px solid #e67e22;
    margin-bottom: 20px;
    border-radius: 8px;
}

.fredy-tip {
    background: #f0f8ff;
    padding: 18px;
    border-radius: 10px;
    margin: 30px 0;
    font-size: 0.95rem;
}

.article-content h2 {
    margin-top: 40px;
    font-size: 1.6rem;
}

.article-content h3 {
    margin-top: 25px;
    font-size: 1.2rem;
}

.article-content p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.sommaire {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    margin: 40px 0;
}

.sommaire h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.sommaire ul {
    list-style: none;
    padding-left: 0;
}

.sommaire li {
    margin-bottom: 10px;
}

.sommaire a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.sommaire a:hover {
    color: #e67e22;
}

/* ---------- Images de démo (tu peux remplacer par les tiennes) 
.image-1 {
    background-image: url("../images/pâtes-crémeuses-poulet.png");
}

.image-2 {
    background-image: url("../images/cheese-cake-citron.png");
}

.image-3 {
    background-image: url("../images/salade-mediterraneenne.png");
}

.image-4 {
    background-image: url("../images/boeuf-bourguignon.png");
}

.image-5 {
    background-image: url("../images/toast-avocat-oeuf-poche.png");
}

.image-6 {
    background-image: url("../images/penne-al-pomodoro.png");
}

.image-7 {
    background-image: url("../images/burger.jpg");
}

.image-8 {
    background-image: url("../images/poulet-creme.png");
}

.image-9 {
    background-image: url("../images/pates-saumon-citron.png");
}

.image-10 {
    background-image: url("../images/poulet-miel.png");
}

.image-11 {
    background-image: url("../images/chaomen-crevette.png");
}---------- */


/* ---------- Page headers ---------- */
.page-header {
    padding: 40px 0 20px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 2rem;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.back-link {
    font-size: 0.9rem;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

/* ---------- Filtres ---------- */
.filters {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 6px 12px;
    font-size: 0.85rem;
    background: #fff;
    cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* ---------- Layout recette ---------- */
.recipe-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 32px;
}

.recipe-image-large {
    border-radius: var(--radius-xl);
    height: 260px;
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
}

.recipe-photo {
    width: 80%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    margin: 18px 0;
}


.recipe-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--muted);
}

.recipe-main h2 {
    margin-top: 18px;
    margin-bottom: 8px;
}

.list {
    padding-left: 18px;
    margin-top: 8px;
}

.list li {
    margin-bottom: 6px;
}

.list-steps li {
    margin-bottom: 8px;
}

.recipe-sidebar .card+.card {
    margin-top: 16px;
}

.list-compact {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list-compact li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.list-compact i {
    margin-right: 6px;
}

.list-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list-links li {
    margin-bottom: 6px;
}

.list-links a {
    font-size: 0.9rem;
    color: var(--primary-dark);
}

/* ---------- Blog article layout ---------- */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}


.article-content h2 {
    margin-top: 18px;
    margin-bottom: 6px;
}

.article-content p {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.link-primary {
    color: var(--primary-dark);
    text-decoration: none;
}

.link-primary:hover {
    text-decoration: underline;
}






/* ---------- Contact ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 28px;
}

.contact-form .form-group {
    margin-bottom: 12px;
}

.contact-form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(255, 123, 84, 0.4);
}

.form-note {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 6px;
}

/* ---------- Section footer ---------- */
.section-footer {
    text-align: center;
    margin-top: 24px;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    background: #faf7f3;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-socials a {
    margin-left: 10px;
    font-size: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-image {
        order: -1;
        max-width: 420px;
        margin: 0 auto 20px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recipe-layout,
    .article-layout,
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav a {
        margin-left: 0;
        margin-right: 14px;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 6px;
    }
}