/* =======================================
   STYLE.CSS — TrouveMaRecette (global + home)
   - Header responsive (dropdown mobile, max-height)
   - Design lumineux, food-forward
   - Sections Home: hero, value, howto, grids, posts, pricing, FAQ…
   ======================================= */

/* ===== Reset & Base ===== */
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: #f7fbf8; color: #1b2b22;
    font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans";
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 16px; }

/* ===== Layout helpers ===== */
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.section { padding: clamp(48px, 6.5vw, 96px) 0; }
.grid { display: grid; gap: clamp(20px, 2.6vw, 32px); }
.grid--2 { grid-template-columns: 1.6fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) {
    .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ===== Cards & Text helpers ===== */
.card {
    background: #fff;
    border: 1px solid rgba(22, 44, 33, .08);
    border-radius: 16px;
    padding: clamp(22px, 2.6vw, 28px);
    box-shadow: 0 10px 28px rgba(26, 43, 34, .06);
}
.muted { color: #6c8a7a; }
.heading-sub {
    letter-spacing: .2px;
    text-transform: uppercase;
    font-weight: 800;
    font-size: .85rem;
    color: #5d7a6a;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: 1rem 1.25rem; border-radius: 999px; font-weight: 800;
}
.btn-primary {
    background: linear-gradient(135deg, #86e3a2, #ffd89a);
    color: #143824;
    border: 1px solid rgba(20, 56, 36, .06);
    box-shadow: 0 12px 26px rgba(134, 227, 162, .25);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: #fff; border: 1px solid rgba(22, 44, 33, .14); color: #1b2b22; }
.btn-ghost:hover { background: #f2f6f4; }

/* =======================================
   Header & Nav (dropdown mobile via max-height)
   ======================================= */
header.site {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(135%) blur(10px);
    border-bottom: 1px solid rgba(22, 44, 33, .08);
}
.nav {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding-block: clamp(14px, 1.8vw, 18px);
}
.brand {
    display: flex; gap: .8rem; align-items: center;
    font-weight: 900; letter-spacing: .2px;
}
.brand i {
    width: 36px; height: 36px; display: inline-grid; place-items: center;
    border-radius: 10px; background: #ffd89a;
}
.brand b { font-size: 1.12rem; }
.cta { display: flex; align-items: center; gap: .7rem; }

/* Hamburger button (compatible JS minimal) */
.nav-toggle {
    display: none; appearance: none; background: #fff;
    border: 1px solid rgba(22,44,33,.14); width: 48px; height: 44px;
    border-radius: 12px; padding: 0; margin: 0;
    align-items: center; justify-content: center; gap: 5px; flex-direction: column;
}
.nav-toggle-bar {
    width: 22px; height: 2px; background: #143824; border-radius: 2px; display: block;
    transition: .2s transform, .2s opacity;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Desktop: nav visible inline */
@media (min-width: 901px) {
    .nav { flex-wrap: nowrap; }
    .nav-toggle { display: none; }
    #primary-nav {
        display: flex !important; position: static; max-height: none; opacity: 1; transform: none;
        box-shadow: none; border: none; background: transparent; padding: 0;
    }
}

/* Mobile: dropdown via max-height */
@media (max-width: 900px) {
    .nav { flex-wrap: wrap; }
    .brand { flex: 1 0 auto; }
    .nav-toggle { display: inline-flex; }
    #primary-nav {
        display: block; width: 100%; overflow: hidden;
        max-height: 0; opacity: 0; transform: translateY(-6px);
        transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
        border: 1px solid rgba(22,44,33,.12); border-radius: 14px; background: #fff;
        box-shadow: 0 10px 24px rgba(26,43,34,.08);
        margin-top: 10px; padding: 0;
    }
    #primary-nav.is-open { max-height: 420px; opacity: 1; transform: translateY(0); padding: 12px; }
    #primary-nav .btn { width: 100%; justify-content: center; padding: 1rem 1rem; }
}

/* =======================================
   HERO (Home)
   ======================================= */
.hero { position: relative; isolation: isolate; }
.hero .bg {
    position: absolute; inset: 0; z-index: -1;
    background:
            radial-gradient(1000px 600px at -10% 10%, #e9f7ef 0%, transparent 70%),
            radial-gradient(900px 500px at 110% 0%, #fff2de 0%, transparent 70%),
            url('https://images.unsplash.com/photo-1490474418585-ba9bad8fd0ea?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
    filter: saturate(110%) contrast(102%) brightness(101%);
    opacity: .6;
}
.hero .wrap { padding-block: clamp(64px, 7.5vw, 110px); }
.hero h1 {
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    line-height: 1.12; margin: 0 0 .7rem; color: #0d2417;
}
.hero p.lead {
    color: #355b46; font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    max-width: 820px; margin: .5rem 0 1.3rem;
}
.hero .inputs { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero input[type="text"], .hero input[type="email"] {
    appearance: none; border: 1px solid rgba(22,44,33,.16); background: #fff;
    border-radius: 12px; padding: 1rem 1.05rem; color: #1b2b22; outline: none; min-width: 260px;
}
.kpis { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.kpis .kpi {
    display: flex; align-items: center; gap: .6rem;
    background: #fff; border: 1px solid rgba(22,44,33,.12);
    padding: .6rem .9rem; border-radius: 12px; color: #244635;
}

/* =======================================
   Value props & How-to (Home)
   ======================================= */
.value .item { display: flex; gap: 14px; align-items: flex-start; }
.value .icon {
    width: 46px; height: 46px; display: inline-grid; place-items: center;
    border-radius: 12px; background: #e9f7ef; border: 1px solid #cdebd9;
}
.value h3 { margin: .1rem 0 .25rem; font-size: 1.12rem; }
.value p { margin: 0; color: #6c8a7a; }

.howto .step {
    display: flex; gap: 1rem; align-items: flex-start;
    background: #fff; border: 1px solid rgba(22,44,33,.1);
    border-radius: 14px; padding: 18px;
}
.howto .step i {
    width: 36px; height: 36px; border-radius: 999px;
    display: inline-grid; place-items: center;
    background: #f1faf5; border: 1px solid #d9eee4; font-weight: 800;
}

/* =======================================
   Food grid (Home)
   ======================================= */
.food-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: clamp(16px, 2.2vw, 24px);
}
@media (max-width: 980px) { .food-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .food-grid { grid-template-columns: 1fr; } }

/* =======================================
   Blog cards (Home)
   ======================================= */
.posts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: clamp(20px, 2.6vw, 28px);
}
@media (max-width: 1100px) { .posts { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px)  { .posts { grid-template-columns: 1fr; } }
.post { display: flex; flex-direction: column; gap: .9rem; }
.post .thumb { aspect-ratio: 16/9; overflow: hidden; border-radius: 16px; }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post h3 { margin: .2rem 0; font-size: 1.15rem; }
.post .excerpt { color: #6c8a7a; }

/* =======================================
   Reading columns (Home)
   ======================================= */
.reading { columns: 2; column-gap: clamp(20px, 2.6vw, 32px); }
@media (max-width: 900px) { .reading { columns: 1; } }

/* =======================================
   Pricing teaser (Home)
   ======================================= */
.pricing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: clamp(16px, 2.2vw, 24px);
}
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.plan { border: 1px solid rgba(22,44,33,.12); background: #fff; border-radius: 16px; padding: 24px; }
.price { font-size: 1.9rem; font-weight: 900; color: #0d2417; }
.plan ul { margin: .7rem 0 0; padding-left: 1.1rem; color: #486a59; }

/* =======================================
   FAQ
   ======================================= */
details.faq {
    border: 1px solid rgba(22,44,33,.12);
    border-radius: 12px; padding: 1rem 1.1rem; background: #fff;
}
details.faq + details.faq { margin-top: .9rem; }
details.faq summary { cursor: pointer; font-weight: 800; list-style: none; }

/* =======================================
   Tables (pour articles)
   ======================================= */
.table { overflow: auto; border: 1px solid rgba(22,44,33,.1); border-radius: 12px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: .7rem 1rem; border-bottom: 1px solid rgba(22,44,33,.08); text-align: left; }
th { background: #f7fbf8; }

/* =======================================
   Footer
   ======================================= */
footer {
    padding: 48px 0; color: #6c8a7a;
    border-top: 1px solid rgba(22,44,33,.08);
    margin-top: 48px;
}
footer a:hover { text-decoration: underline; }
/* Liens du menu */
.cta a {
    display: block;
    margin-top: 14px !important; /* anciennement plus petit */
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
}

/* Optionnel : si tu veux aussi espacer un peu plus verticalement les boutons */
.cta {
    gap: 14px; /* anciennement peut-être 8px */
}