/* =========================================================
   AGAPE SHOP — PAGE D'ACCUEIL
========================================================= */


/* =========================================================
   VARIABLES LOCALES
========================================================= */

:root {
    --home-red: #c62828;
    --home-red-dark: #a61f1f;

    --home-dark: #111827;
    --home-text: #374151;
    --home-muted: #6b7280;

    --home-white: #ffffff;
    --home-light: #f8fafc;
    --home-border: #e5e7eb;

    --home-radius: 18px;

    --home-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

    --home-shadow-hover:
        0 18px 40px rgba(15, 23, 42, 0.14);
}


/* =========================================================
   HERO
========================================================= */

.home-hero {
    position: relative;

    min-height: 520px;

    display: flex;
    align-items: center;

    overflow: hidden;

    background:
        linear-gradient(
            110deg,
            #111827 0%,
            #1f2937 55%,
            #374151 100%
        );

    color: #ffffff;
}


/* Décoration droite */

.home-hero::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    right: -150px;
    top: -180px;

    border-radius: 50%;

    background: rgba(198, 40, 40, 0.18);

    filter: blur(10px);
}

.home-hero::after {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    right: 18%;
    bottom: -180px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05);
}


/* =========================================================
   CONTENU HERO
========================================================= */

.home-hero-content {
    position: relative;

    z-index: 2;

    width: min(
        calc(100% - 40px),
        1250px
    );

    margin: 0 auto;

    padding: 80px 0;
}


/* =========================================================
   BADGE HERO
========================================================= */

.hero-badge {
    display: inline-flex;

    align-items: center;

    margin-bottom: 22px;

    padding: 8px 16px;

    border: 1px solid rgba(
        255,
        255,
        255,
        0.2
    );

    border-radius: 999px;

    background: rgba(
        255,
        255,
        255,
        0.08
    );

    color: #ffffff;

    font-size: 0.85rem;

    font-weight: 700;

    letter-spacing: 0.03em;
}


/* =========================================================
   TITRE HERO
========================================================= */

.home-hero h1 {
    max-width: 760px;

    margin-bottom: 24px;

    color: #ffffff;

    font-size: clamp(
        2.5rem,
        5vw,
        4.5rem
    );

    font-weight: 800;

    line-height: 1.05;

    letter-spacing: -0.04em;
}

.home-hero h1 span {
    display: block;

    color: #f87171;
}


/* =========================================================
   DESCRIPTION HERO
========================================================= */

.home-hero p {
    max-width: 600px;

    margin-bottom: 35px;

    color: #d1d5db;

    font-size: 1.15rem;

    line-height: 1.7;
}


/* =========================================================
   ACTIONS HERO
========================================================= */

.hero-actions {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 14px;
}


/* =========================================================
   BOUTONS
========================================================= */

.home-hero .btn,
.home-section .btn,
.home-cta .btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 48px;

    padding: 0 24px;

    border-radius: 10px;

    font-weight: 700;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.home-hero .btn:hover,
.home-section .btn:hover,
.home-cta .btn:hover {
    transform: translateY(-2px);
}


/* =========================================================
   BOUTON PRINCIPAL
========================================================= */

.btn-primary {
    background: var(--home-red);

    color: #ffffff;

    border: 1px solid var(--home-red);

    box-shadow:
        0 8px 20px rgba(
            198,
            40,
            40,
            0.22
        );
}

.btn-primary:hover {
    background: var(--home-red-dark);

    color: #ffffff;

    border-color: var(--home-red-dark);

    box-shadow:
        0 12px 25px rgba(
            198,
            40,
            40,
            0.30
        );
}


/* =========================================================
   BOUTON SECONDAIRE HERO
========================================================= */

.home-hero .btn-secondary {
    background: rgba(
        255,
        255,
        255,
        0.08
    );

    color: #ffffff;

    border: 1px solid rgba(
        255,
        255,
        255,
        0.25
    );
}

.home-hero .btn-secondary:hover {
    background: rgba(
        255,
        255,
        255,
        0.15
    );

    color: #ffffff;

    border-color: rgba(
        255,
        255,
        255,
        0.4
    );
}


/* =========================================================
   SECTIONS
========================================================= */

.home-section {
    width: min(
        calc(100% - 40px),
        1250px
    );

    margin: 0 auto;

    padding: 85px 0;
}


/* =========================================================
   HEADER DE SECTION
========================================================= */

.section-header {
    max-width: 700px;

    margin: 0 auto 50px;

    text-align: center;
}


/* Petit titre rouge */

.section-label {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--home-red);

    font-size: 0.78rem;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.12em;
}


/* Titre */

.section-header h2 {
    margin-bottom: 12px;

    color: var(--home-dark);

    font-size: clamp(
        2rem,
        4vw,
        2.8rem
    );

    font-weight: 800;

    line-height: 1.2;

    letter-spacing: -0.03em;
}


/* Description */

.section-header p {
    margin-bottom: 0;

    color: var(--home-muted);

    font-size: 1rem;

    line-height: 1.6;
}


/* =========================================================
   CATÉGORIES
========================================================= */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;
}


/* Carte */

.category-card {
    position: relative;

    min-height: 190px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: flex-start;

    padding: 35px 30px;

    overflow: hidden;

    border: 1px solid var(--home-border);

    border-radius: var(--home-radius);

    background: #ffffff;

    box-shadow: var(--home-shadow);

    text-decoration: none;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* Cercle décoratif */

.category-card::after {
    content: "";

    position: absolute;

    width: 130px;

    height: 130px;

    right: -45px;

    bottom: -55px;

    border-radius: 50%;

    background: #fef2f2;

    transition:
        transform 0.3s ease;
}

.category-card:hover::after {
    transform: scale(1.3);
}


/* Hover */

.category-card:hover {
    transform: translateY(-6px);

    border-color: #fecaca;

    box-shadow: var(--home-shadow-hover);
}


/* Icône */

.category-icon {
    position: relative;

    z-index: 2;

    width: 55px;

    height: 55px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 20px;

    border-radius: 14px;

    background: #fef2f2;

    font-size: 1.6rem;

    transition:
        transform 0.25s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.08);
}


/* Titre catégorie */

.category-card h3 {
    position: relative;

    z-index: 2;

    margin-bottom: 7px;

    color: var(--home-dark);

    font-size: 1.25rem;

    font-weight: 750;
}


/* Texte catégorie */

.category-card p {
    position: relative;

    z-index: 2;

    margin-bottom: 0;

    color: var(--home-muted);

    font-size: 0.92rem;

    line-height: 1.5;
}


/* =========================================================
   SECTION PRODUITS
========================================================= */

.featured-products {
    width: 100%;

    padding-left: max(
        20px,
        calc(
            (100% - 1250px) / 2
        )
    );

    padding-right: max(
        20px,
        calc(
            (100% - 1250px) / 2
        )
    );

    background: var(--home-light);
}


/* =========================================================
   GRILLE PRODUITS
========================================================= */

.product-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 22px;
}


/* =========================================================
   CARTE PRODUIT
========================================================= */

.product-card {
    overflow: hidden;

    display: flex;

    flex-direction: column;

    min-width: 0;

    border: 1px solid var(--home-border);

    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 5px 18px rgba(
            15,
            23,
            42,
            0.06
        );

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);

    box-shadow: var(--home-shadow-hover);
}


/* =========================================================
   IMAGE PRODUIT
========================================================= */

.product-card-image {
    position: relative;

    height: 260px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background: #f9fafb;

    text-decoration: none;
}

.product-card-image img {
    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition:
        transform 0.4s ease;
}

.product-card:hover
.product-card-image img {
    transform: scale(1.05);
}


/* =========================================================
   PLACEHOLDER
========================================================= */

.product-placeholder {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    height: 100%;

    color: #9ca3af;

    font-size: 0.9rem;
}


/* =========================================================
   CONTENU PRODUIT
========================================================= */

.product-card-content {
    flex: 1;

    display: flex;

    flex-direction: column;

    padding: 20px;
}


/* =========================================================
   NOM PRODUIT
========================================================= */

.product-card-content h3 {
    margin-bottom: 8px;

    font-size: 1rem;

    font-weight: 700;

    line-height: 1.35;
}

.product-card-content h3 a {
    color: var(--home-dark);

    text-decoration: none;
}

.product-card-content h3 a:hover {
    color: var(--home-red);
}


/* =========================================================
   DESCRIPTION PRODUIT
========================================================= */

.product-card-description {
    min-height: 45px;

    margin-bottom: 18px;

    color: var(--home-muted);

    font-size: 0.85rem;

    line-height: 1.5;
}


/* =========================================================
   BAS DE CARTE
========================================================= */

.product-card-bottom {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: auto;
}


/* =========================================================
   PRIX
========================================================= */

.product-price {
    color: var(--home-dark);

    font-size: 1.15rem;

    font-weight: 800;

    white-space: nowrap;
}


/* =========================================================
   PETIT BOUTON
========================================================= */

.btn-small {
    min-height: 38px !important;

    padding: 0 14px !important;

    border-radius: 8px !important;

    font-size: 0.82rem;
}


/* =========================================================
   RUPTURE DE STOCK
========================================================= */

.stock-out {
    color: #dc2626;

    font-size: 0.75rem;

    font-weight: 700;

    text-align: right;
}


/* =========================================================
   ACTION "VOIR TOUS LES PRODUITS"
========================================================= */

.section-action {
    display: flex;

    align-items: center;

    justify-content: center;

    margin-top: 45px;
}


.section-action .btn-secondary {
    border: 1px solid #d1d5db;

    background: #ffffff;

    color: var(--home-dark);
}

.section-action .btn-secondary:hover {
    border-color: #9ca3af;

    background: #f9fafb;

    color: var(--home-dark);
}


/* =========================================================
   POURQUOI AGAPE SHOP
========================================================= */

.benefits-section {
    background: #ffffff;
}


/* Grille */

.benefits-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;
}


/* Carte */

.benefit-card {
    padding: 32px 28px;

    border: 1px solid var(--home-border);

    border-radius: var(--home-radius);

    background: #ffffff;

    text-align: center;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);

    box-shadow: var(--home-shadow);
}


/* Icône */

.benefit-icon {
    width: 58px;

    height: 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #fef2f2;

    font-size: 1.5rem;
}


/* Titre */

.benefit-card h3 {
    margin-bottom: 10px;

    color: var(--home-dark);

    font-size: 1.1rem;

    font-weight: 700;
}


/* Texte */

.benefit-card p {
    margin-bottom: 0;

    color: var(--home-muted);

    font-size: 0.9rem;

    line-height: 1.6;
}


/* =========================================================
   CTA FINAL
========================================================= */

.home-cta {
    position: relative;

    overflow: hidden;

    padding: 90px 20px;

    background:
        linear-gradient(
            120deg,
            #991b1b,
            #c62828
        );

    color: #ffffff;

    text-align: center;
}


/* Décoration */

.home-cta::before {
    content: "";

    position: absolute;

    width: 350px;

    height: 350px;

    top: -200px;

    left: -100px;

    border-radius: 50%;

    background: rgba(
        255,
        255,
        255,
        0.08
    );
}

.home-cta::after {
    content: "";

    position: absolute;

    width: 280px;

    height: 280px;

    right: -120px;

    bottom: -180px;

    border-radius: 50%;

    background: rgba(
        255,
        255,
        255,
        0.06
    );
}


/* Contenu */

.home-cta-content {
    position: relative;

    z-index: 2;

    max-width: 700px;

    margin: 0 auto;
}


/* Petit texte */

.home-cta-content > span {
    display: block;

    margin-bottom: 12px;

    color: #fecaca;

    font-size: 0.85rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.1em;
}


/* Titre */

.home-cta h2 {
    margin-bottom: 28px;

    color: #ffffff;

    font-size: clamp(
        2rem,
        4vw,
        3.2rem
    );

    font-weight: 800;

    line-height: 1.1;
}


/* Bouton blanc */

.btn-light {
    background: #ffffff;

    color: #991b1b;

    border: 1px solid #ffffff;
}

.btn-light:hover {
    background: #f9fafb;

    color: #7f1d1d;
}


/* =========================================================
   ÉTAT VIDE
========================================================= */

.empty-state {
    padding: 60px 20px;

    border: 1px dashed #d1d5db;

    border-radius: 16px;

    background: #ffffff;

    color: var(--home-muted);

    text-align: center;
}


/* =========================================================
   TABLETTE LARGE
========================================================= */

@media (max-width: 1100px) {

    .product-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .category-grid,
    .benefits-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   TABLETTE
========================================================= */

@media (max-width: 800px) {

    .home-hero {
        min-height: 470px;
    }

    .home-hero-content {
        padding: 65px 0;
    }

    .home-hero h1 {
        font-size: 2.8rem;
    }

    .product-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .home-hero {
        min-height: 450px;
    }

    .home-hero-content {
        width: calc(100% - 30px);

        padding: 55px 0;
    }

    .hero-badge {
        margin-bottom: 18px;

        padding: 7px 13px;

        font-size: 0.75rem;
    }

    .home-hero h1 {
        margin-bottom: 20px;

        font-size: 2.35rem;

        letter-spacing: -0.03em;
    }

    .home-hero p {
        margin-bottom: 28px;

        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;

        align-items: stretch;

        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
    }


    /* Sections */

    .home-section {
        width: calc(100% - 30px);

        padding: 60px 0;
    }


    /* Produits */

    .featured-products {
        width: 100%;

        padding-left: 15px;

        padding-right: 15px;
    }


    /* Grilles */

    .category-grid,
    .product-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }


    /* Produits */

    .product-card-image {
        height: 280px;
    }


    /* Titres */

    .section-header {
        margin-bottom: 35px;
    }

    .section-header h2 {
        font-size: 2rem;
    }


    /* CTA */

    .home-cta {
        padding: 70px 20px;
    }

    .home-cta h2 {
        font-size: 2.2rem;
    }

}


/* =========================================================
   PETIT MOBILE
========================================================= */

@media (max-width: 400px) {

    .home-hero h1 {
        font-size: 2rem;
    }

    .home-hero-content {
        width: calc(100% - 24px);
    }

    .home-section {
        width: calc(100% - 24px);
    }

    .product-card-image {
        height: 240px;
    }

    .product-card-content {
        padding: 16px;
    }

    .product-card-bottom {
        align-items: flex-end;
    }

    .product-price {
        font-size: 1rem;
    }

    .btn-small {
        padding: 0 10px !important;
    }

}
