/**
 * Nomades Home Styles
 *
 * @author Les Nomades
 * @copyright 2026 Les Nomades
 * @license AFL-3.0
 */

 /* ===================================
   RESET GÉNÉRAL DU MODULE
   =================================== */

body.page-index #nomades-home,
body.page-index #nomades-home * {
    box-sizing: border-box;
}

/* ===================================
   WRAPPER GLOBAL
   =================================== */

body.page-index #nomades-home {
    margin: 50px 0 70px;
    padding: 0 5%;
}

/* ===================================
   HERO SLIDER – FULL WIDTH
   =================================== */

body.page-index main .container:has(#carousel) {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.page-index #carousel {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 5%;
    padding-right: 5%;
    box-sizing: border-box;
}

body.page-index #carousel .carousel-control.right { right: 5%; }
body.page-index #carousel .carousel-control.left  { left:  5%; }

body.page-index #carousel .carousel-inner {
    min-height: 300px;
}

body.page-index #carousel .carousel-item {
    height: 100%;
}

body.page-index #carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

body.page-index #carousel .carousel-caption {
    display: none !important;
}

@media (min-width: 992px) {
    body.page-index #carousel .carousel-inner {
        height: 70vh;
        min-height: 520px;
        max-height: 860px;
    }
    body.page-index #carousel .carousel-item img {
        object-fit: contain;
        background: #f5f5f5;
    }
}

@media (max-width: 991px) {
    #carousel { background-color: #fff; }
    body.page-index #carousel .carousel-control.right,
    body.page-index #carousel .carousel-control.left {
        display: none;
    }
}

/* ===================================
   HERO TEXTE (ps_customtext)
   =================================== */

#index #custom-text {
    position: relative !important;
    inset: auto !important;
    z-index: auto !important;
    pointer-events: auto !important;
    background: transparent !important;
    padding: 0 5% !important;
    margin: 0 !important;
}

#index #carousel { position: relative; }

#index #custom-text .nomades-hero {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: none !important;
}

#index #carousel .nomades-hero {
    position: absolute;
    left: 50%;
    bottom: 38%;
    opacity: 0;
    visibility: visible;
    transform: translate(-50%, 8px);
    transition: opacity .35s ease, transform .45s cubic-bezier(.25, .8, .25, 1);
    will-change: transform, opacity;
    min-width: 450px;
    padding: 36px 56px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    text-align: center;
    z-index: 50;
}

#index #carousel .nomades-hero.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

#index #carousel .nomades-hero h1 {
    margin: 0 0 10px;
    font-size: 34px;
    font-weight: 500;
    font-family: var(--nomades-font-titres);
}

#index #carousel .nomades-hero p {
    margin: 0;
    font-family: var(--nomades-font-body);
    font-size: 18px;
    line-height: 1.5;
    color: #fff;
}

@media (max-width: 991px) {
    #index #carousel .nomades-hero h1 { font-size: 26px; }
    #index #carousel .nomades-hero .tagline { font-size: 15px; }
}

@media (max-width: 575px) {
    body.page-index #nomades-home { margin: 0; padding: 0 4%; }
    #index #carousel .nomades-hero {
        min-width: 75%;
        padding: 25px;
        bottom: 30%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #index #carousel .nomades-hero {
        transition: none !important;
        transform: translate(-50%, 0) !important;
        opacity: 1 !important;
    }
}

/* ===================================
   TITRE DE SECTION
   =================================== */

body.page-index #nomades-home .nomades-section-title {
    font-size: 42px;
    text-align: center;
    line-height: 50px;
    color: #222;
    padding: 0;
    margin: 0 0 30px;
    font-weight: 600
}

/* ===================================
   CATEGORIES – GRILLES
   =================================== */

body.page-index #nomades-home .nomades-cats.featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

body.page-index #nomades-home .nomades-cats.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

/* ===================================
   TUILE – structure
   =================================== */

body.page-index #nomades-home .nomades-tile {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

body.page-index #nomades-home .nomades-cats.featured .nomades-tile {
    aspect-ratio: 16 / 9;
    min-height: 320px;
}

body.page-index #nomades-home .nomades-cats.grid .nomades-tile {
    aspect-ratio: 4 / 3;
    min-height: 220px;
}

/* ===================================
   TUILE – image via ::before
   Zoom fluide GPU via transform: scale()
   background-image: inherit récupère
   l'url() défini en style inline sur <a>
   =================================== */

body.page-index #nomades-home .nomades-tile:not(.nomades-tile-mini)::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 4s cubic-bezier(.25, .8, .25, 1);
    will-change: transform;
    z-index: 0;
}

body.page-index #nomades-home .nomades-tile:not(.nomades-tile-mini):hover::before  {
    transform: scale(1.06);
}

body.page-index #nomades-home .nomades-tile-mini::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 4s cubic-bezier(.25, .8, .25, 1);
    will-change: transform;
    z-index: 0;
}

body.page-index #nomades-home .nomades-tile-mini:hover::before {
    transform: scale(1.06);
}

/* ===================================
   TUILE – overlay sombre (::after)
   =================================== */

body.page-index #nomades-home .nomades-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, .30) 0%,
        rgba(0, 0, 0, .15) 50%,
        rgba(0, 0, 0, .38) 100%
    );
    pointer-events: none;
    transition: opacity .35s ease;
    z-index: 1;
}

body.page-index #nomades-home .nomades-tile:hover::after {
    opacity: .5;
}

/* ===================================
   TUILE – label
   =================================== */

body.page-index #nomades-home .nomades-tile .label {
    position: absolute;
    z-index: 2;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 20px;
    text-align: left;
    line-height: 1.2;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
    max-width: calc(100% - 40px);
}

body.page-index #nomades-home .nomades-cats.featured .nomades-tile .label {
    font-size: 26px;
    bottom: 30px;
    left: 35px;
}

/* ===================================
   PRODUCTS SECTION
   =================================== */

body.page-index #nomades-home .nomades-products {
    margin: 60px 0;
}

/* Grille CSS native */
body.page-index #nomades-home .nomades-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Carte produit */
body.page-index #nomades-home .nomades-product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    /* border: 1px solid rgb(232, 232, 232); */
    /* box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; */
    /* transition: border-color .3s ease; */
    transition: all .3s ease;
}

body.page-index #nomades-home .nomades-product-card:hover {
    box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;
}

/* Zone image */
body.page-index #nomades-home .nomades-product-img {
    width: 100%;
    overflow: hidden;
}

body.page-index #nomades-home .nomades-product-cover {
    display: block;
    width: 100%;
    height: 220px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    padding: 20px;
    transition: transform .4s ease;
}

body.page-index #nomades-home .nomades-product-card:hover .nomades-product-cover {
    transform: scale(1.04);
}

/* Infos produit */
body.page-index #nomades-home .nomades-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px 18px;
    text-align: center;
    min-height: 90px;
}

body.page-index #nomades-home .nomades-product-name {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
    font-weight: 500;
    color: #111;
    line-height: 1.3;
}

body.page-index #nomades-home .nomades-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
}

body.page-index #nomades-home .nomades-price-label {
    font-size: 0.9rem;
    font-weight: 400;
    color: #111;
}

/* ===================================
   RESPONSIVE – tablette (≤ 991px)
   =================================== */

@media (max-width: 991px) {

    body.page-index #nomades-home .nomades-cats.featured {
        grid-template-columns: 1fr;
    }

    body.page-index #nomades-home .nomades-cats.featured .nomades-tile {
        min-height: 220px;
    }

    body.page-index #nomades-home .nomades-cats.grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    body.page-index #nomades-home .nomades-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    body.page-index #nomades-home .nomades-tile .label {
        font-size: 22px;
        padding: 24px 20px 0;
    }

    body.page-index #nomades-home .nomades-cats.featured .nomades-tile .label {
        font-size: 28px;
        padding: 30px 25px 0;
    }

    body.page-index #nomades-home .nomades-section-title {
        font-size: 26px;
    }
}

/* ===================================
   RESPONSIVE – mobile (≤ 575px)
   =================================== */

@media (max-width: 575px) {

    body.page-index #nomades-home {
        margin: 0;
        padding: 0 4%;
    }

    body.page-index #nomades-home .nomades-cats.featured {
        gap: 12px;
        margin-bottom: 20px;
    }

    body.page-index #nomades-home .nomades-cats.grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 20px;
    }

    body.page-index #nomades-home .nomades-products {
        margin: 30px 0;
    }

    body.page-index #nomades-home .nomades-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    body.page-index #nomades-home .nomades-tile .label {
        font-size: 20px;
        padding: 20px 16px 0;
    }

    body.page-index #nomades-home .nomades-cats.featured .nomades-tile .label {
        font-size: 24px;
    }

    body.page-index #nomades-home .nomades-section-title {
        font-size: 22px;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

@media (prefers-reduced-motion: reduce) {
    body.page-index #nomades-home .nomades-tile::before,
    body.page-index #nomades-home .nomades-tile::after,
    body.page-index #nomades-home .nomades-product-cover {
        transition: none !important;
    }
}

body.page-index #nomades-home .nomades-tile:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 3px;
}

body.page-index #nomades-home .nomades-tile:focus:not(:focus-visible) {
    outline: none;
}