/* ============================================================
   Astra Jardin — Homepage CSS
   Sections : Hero · À propos · Feature · Blog grid
   ============================================================ */

/* ── Utilitaires ──────────────────────────────────────────── */
.jd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.jd-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jd-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-left: 3px solid var(--jd-accent);
    padding-left: 10px;
    margin-bottom: 14px;
}

.jd-section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--jd-heading);
    text-align: center;
    margin: 0 0 48px;
}

/* Boutons */
.jd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
    white-space: nowrap;
}
.jd-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}
.jd-btn--solid {
    background: #fff;
    color: var(--jd-dark) !important;
    border: 2px solid transparent;
}
.jd-btn--solid:hover {
    background: var(--jd-accent);
    color: #fff !important;
}
.jd-btn--ghost {
    background: transparent;
    color: rgba(255,255,255,.88) !important;
    border: 2px solid rgba(255,255,255,.4);
}
.jd-btn--ghost:hover {
    border-color: #fff;
    color: #fff !important;
}
.jd-btn--green {
    background: var(--jd-primary);
    color: #fff !important;
    border: 2px solid transparent;
}
.jd-btn--green:hover {
    background: var(--jd-accent);
}
.jd-btn--outline-light {
    background: transparent;
    color: rgba(255,255,255,.88) !important;
    border: 2px solid rgba(255,255,255,.35);
    margin-top: 24px;
}
.jd-btn--outline-light:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.7);
    color: #fff !important;
}

/* ── SECTION 1 : HERO ─────────────────────────────────────── */
.jd-hero {
    position: relative;
    min-height: 65vh;
    background-color: var(--jd-dark);
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: flex-end;
    padding-bottom: 80px;
    overflow: hidden;
}

/* Couche 1 — teinte verte sur toute l'image */
.jd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--jd-dark-rgb), 0.35);
    mix-blend-mode: multiply;
    z-index: 1;
}

/* Couche 2 — gradient gauche→droite pour lisibilité du texte */
.jd-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(var(--jd-dark-rgb), 0.90) 0%,
        rgba(var(--jd-dark-rgb), 0.70) 30%,
        rgba(var(--jd-dark-rgb), 0.35) 60%,
        rgba(var(--jd-dark-rgb), 0.05) 100%
    );
    z-index: 2;
}

.jd-hero .jd-container {
    position: relative;
    z-index: 3;
}

.jd-hero__content {
    max-width: 580px;
}

.jd-hero__title {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 20px;
    letter-spacing: -.02em;
}

.jd-hero__subtitle {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, .82);
    margin: 0 0 34px;
    max-width: 480px;
}

.jd-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

/* Vague SVG en bas du hero */
.jd-hero__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
}
.jd-hero__wave svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* ── SECTION 2 : À PROPOS ─────────────────────────────────── */
.jd-about {
    padding: 90px 0 80px;
    background: #fff;
}

.jd-about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.jd-about__title {
    font-size: clamp(1.7rem, 2.8vw, 2.2rem);
    font-weight: 800;
    color: var(--jd-heading);
    line-height: 1.18;
    margin: 0 0 22px;
    letter-spacing: -.01em;
}

.jd-about__text p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--jd-muted);
    margin: 0 0 16px;
}
.jd-about__text p:last-child { margin-bottom: 0; }

.jd-about__image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(26, 46, 10, .12);
}
.jd-about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
}
.jd-img-placeholder {
    background: var(--jd-pale);
    border-radius: 8px;
}
.jd-img-placeholder svg {
    width: 100%;
    display: block;
}

/* ── SECTION 3 : FEATURE ──────────────────────────────────── */
.jd-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 520px;
    margin-top: 10px;
}

.jd-feature__image {
    background-color: var(--jd-panel);
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 400px;
}
.jd-feature__placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jd-feature__placeholder svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jd-feature__panel {
    background: var(--jd-panel);
    display: flex;
    align-items: center;
    padding: 60px 56px;
}

.jd-feature__content {
    max-width: 480px;
}

.jd-feature__title {
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 20px;
    letter-spacing: -.015em;
}

.jd-feature__content p {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .75);
    margin: 0 0 14px;
}
.jd-feature__content p:last-of-type { margin-bottom: 0; }

/* ── SECTION 4 : BLOG GRID ────────────────────────────────── */
.jd-blog {
    padding: 90px 0 100px;
    background: var(--jd-cream);
}

.jd-blog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ── Carte article — Homepage ─────────────────────────────── */
.jd-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
    /* Nécessaire pour le stretch link */
    position: relative;
}
.jd-card:hover {
    box-shadow: 0 10px 40px rgba(26, 46, 10, .10);
    transform: translateY(-4px);
}

/* Image : div simple, pas de <a> */
.jd-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.jd-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    display: block;
}
.jd-card:hover .jd-card__image img {
    transform: scale(1.04);
}
.jd-card__no-thumb {
    width: 100%;
    height: 100%;
    background: var(--jd-pale);
}
.jd-card__no-thumb svg {
    width: 100%;
    display: block;
}

.jd-card__body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.jd-card__cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--jd-accent);
    /* Au-dessus du stretch link */
    position: relative;
    z-index: 2;
}

.jd-card__title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.38;
    margin: 0;
    flex: 1;
}
.jd-card__title a {
    color: var(--jd-heading) !important;
    text-decoration: none;
}
.jd-card__title a:hover {
    color: var(--jd-primary) !important;
}

/* ★ STRETCH LINK — le ::after couvre toute la carte */
.jd-card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
    border-radius: inherit;
}

/* "Voir l'article" — décoratif, pas un <a> */
.jd-card__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--jd-primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    transition: gap .15s, color .15s;
    /* Positionnement au-dessus du stretch mais non cliquable */
    position: relative;
    z-index: 2;
    pointer-events: none;
}
.jd-card:hover .jd-card__link {
    color: var(--jd-accent);
    gap: 8px;
}

.jd-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--jd-muted);
    padding: 48px 0;
}
.jd-no-posts a {
    color: var(--jd-primary);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .jd-container { padding: 0 28px; }

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

@media (max-width: 768px) {
    .jd-hero {
        min-height: 75vh;
        padding-bottom: 80px;
        align-items: center;
    }
    .jd-hero__content { max-width: 100%; }
    /* Sur mobile : overlay uniforme fort (image moins visible, texte prioritaire) */
    .jd-hero::before { background: rgba(var(--jd-dark-rgb), 0.50); }
    .jd-hero__overlay {
        background: linear-gradient(
            to bottom,
            rgba(var(--jd-dark-rgb), 0.55) 0%,
            rgba(var(--jd-dark-rgb), 0.85) 100%
        );
    }

    .jd-about { padding: 60px 0; }
    .jd-about__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .jd-about__image { order: -1; }

    .jd-feature {
        grid-template-columns: 1fr;
    }
    .jd-feature__image { min-height: 280px; }
    .jd-feature__panel { padding: 44px 28px; }

    .jd-blog { padding: 60px 0 70px; }
    .jd-blog__grid {
        grid-template-columns: 1fr;
    }
    .jd-section-title { margin-bottom: 32px; }
}

@media (max-width: 480px) {
    .jd-container { padding: 0 18px; }
    .jd-hero__buttons { flex-direction: column; align-items: flex-start; }
    .jd-btn { width: 100%; justify-content: center; }
}
