@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Supprimer marges/blocs par défaut */
html, body {
    margin: 0;
    padding-top: 15px;

    /* ajuste si le bandeau est plus grand */
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    width: 100%;
}




/* Nouvelle section hero */
.hero {
    position: relative;
    top: -55px;
    /* ou -40px si tu veux la coller plus près du header */

    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.hero-text h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    font-weight: normal;
    text-align: center;
    color: #ffffff;
    /* à adapter selon ta DA */
    margin-bottom: 1rem;
}


/* Wrapper pour les deux images côte à côte */
.hero-img-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Chaque image prend 50% de largeur, 100% hauteur */
.hero-img {
    width: 50%;
    height: 100%;
    object-fit: cover;
}

/* Texte par-dessus, centré */
.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-btn {
    cursor: pointer;
    position: relative;
    padding: 10px 20px;
    background: white;
    font-size: 1.2rem;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    transition: all 1s;
    text-decoration: none;
    color: black;
    display: inline-block;
}

.hero-btn::after,
.hero-btn::before {
    content: " ";
    width: 10px;
    height: 10px;
    position: absolute;
    border: 0px solid #fff;
    transition: all 1s;
}

.hero-btn::after {
    top: -1px;
    left: -1px;
    border-top: 5px solid black;
    border-left: 5px solid black;
}

.hero-btn::before {
    bottom: -1px;
    right: -1px;
    border-bottom: 5px solid black;
    border-right: 5px solid black;
}

.hero-btn:hover {
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
}

.hero-btn:hover::after,
.hero-btn:hover::before {
    width: 100%;
    height: 100%;
}

.carousel {
    overflow-x: auto;
    overflow-y: hidden;
    /* évite la barre verticale */
    scroll-snap-type: x mandatory;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
}

.carousel::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.carousel-track {
    display: flex;
    gap: 2rem;
}

.carousel-track img {
    height: 400px;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-track img:hover {
    transform: scale(1.05);
}

.bandeau-livraison {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background-color: #e8dbcd;
    overflow: hidden;
    z-index: 1000;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.bandeau-slider {
    display: flex;
    width: 400%;
    /* 4 messages → 4 * 100% */
    animation: sliderAnim 24s infinite;
}

.slide {
    width: 100vw;
    flex-shrink: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: white;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 500;
}



@keyframes sliderAnim {
    0% {
        transform: translateX(0%);
    }

    20% {
        transform: translateX(0%);
    }

    25% {
        transform: translateX(-100vw);
    }

    45% {
        transform: translateX(-100vw);
    }

    50% {
        transform: translateX(-200vw);
    }

    70% {
        transform: translateX(-200vw);
    }

    75% {
        transform: translateX(-300vw);
    }

    95% {
        transform: translateX(-300vw);
    }

    100% {
        transform: translateX(0%);
    }
}

/* Effet d’apparition (fade + slide-up) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =======================
   Grilles collections
   ======================= */

.collection-grid {
    /* bloc visuel */
    padding: 3rem 1rem;
    background: #f3e9dc;
    /* même DA */
    text-align: center;
}

.collection-grid h2 {
    /* titre */
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #4e3a2d;
}

/* Grille responsive : auto-fit met 1 à 4 colonnes selon largeur.
   minmax(180px,1fr) force au moins 180px par carte.
   → En mobile, ça donne naturellement 2 colonnes (≈2x2 avec 4 items). */
.collection-grid .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Carte image */
.collection-grid .card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: #efe6d9;
    box-shadow: 0 6px 16px rgba(78, 58, 45, 0.14), inset 0 0 0 1px rgba(78, 58, 45, 0.06);
    transform: translateZ(0);
    /* active le GPU */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collection-grid .card img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    /* ratio cohérent */
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.collection-grid .card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(78, 58, 45, 0.18), 0 2px 0 rgba(127, 14, 48, 0.15);
}

.collection-grid .card:hover img {
    transform: scale(1.05);
    filter: saturate(1.04) contrast(1.03);
}

/* =======================
   Pattern “en selle”
   - pattern-a (Été 99) : 1 & 3 HAUT, 2 & 4 BAS
   - pattern-b (La rentrée) : inverse
   Offsets légers pour un effet subtil. Ajuste les px si tu veux plus/moins.
   ======================= */

/* Par défaut, pas d’offset (utile si plus de 4 items plus tard) */
.collection-grid .card {
    --offset: 0px;
    transform: translateY(var(--offset));
}

/* Été 99 : 1 & 3 ↑, 2 & 4 ↓ */
.collection-grid.pattern-a .card:nth-child(1),
.collection-grid.pattern-a .card:nth-child(3) {
    --offset: -10px;
}

.collection-grid.pattern-a .card:nth-child(2),
.collection-grid.pattern-a .card:nth-child(4) {
    --offset: 10px;
}

/* La rentrée : inverse */
.collection-grid.pattern-b .card:nth-child(1),
.collection-grid.pattern-b .card:nth-child(3) {
    --offset: 10px;
}

.collection-grid.pattern-b .card:nth-child(2),
.collection-grid.pattern-b .card:nth-child(4) {
    --offset: -10px;
}

/* En desktop large, on peut amplifier un peu l’effet */
@media (min-width: 1024px) {

    .collection-grid.pattern-a .card:nth-child(1),
    .collection-grid.pattern-a .card:nth-child(3) {
        --offset: -14px;
    }

    .collection-grid.pattern-a .card:nth-child(2),
    .collection-grid.pattern-a .card:nth-child(4) {
        --offset: 14px;
    }

    .collection-grid.pattern-b .card:nth-child(1),
    .collection-grid.pattern-b .card:nth-child(3) {
        --offset: 14px;
    }

    .collection-grid.pattern-b .card:nth-child(2),
    .collection-grid.pattern-b .card:nth-child(4) {
        --offset: -14px;
    }
}

/* =======================
   Animation au scroll (révélation + léger slide)
   ======================= */

/* État initial : invisibles + décalage vertical.
   On se base sur .reveal-grid posé sur la SECTION (et on anime aussi les .card). */
.reveal-grid,
.reveal-grid .card {
    opacity: 0;
    transform: translateY(calc(var(--offset, 0px) + 24px));
    /* conserve l’offset “selle”, ajoute +24px pour l’entrée */
    transition:
        opacity 600ms ease,
        transform 600ms cubic-bezier(.22, .61, .36, 1);
    /* ressort léger */
    will-change: opacity, transform;
}

/* Quand en vue : visible et revient à l’offset “selle” (pas 0) */
.reveal-grid.in-view,
.reveal-grid.in-view .card {
    opacity: 1;
    transform: translateY(var(--offset, 0px));
}

/* Stagger propre : on échelonne les cartes */
.reveal-grid .card:nth-child(1) {
    transition-delay: 60ms;
}

.reveal-grid .card:nth-child(2) {
    transition-delay: 140ms;
}

.reveal-grid .card:nth-child(3) {
    transition-delay: 220ms;
}

.reveal-grid .card:nth-child(4) {
    transition-delay: 300ms;
}

/* Accessibilité : réduit/neutralise les animations si l’utilisateur le demande */
@media (prefers-reduced-motion: reduce) {

    .collection-grid .card,
    .reveal-grid,
    .reveal-grid .card {
        transition: none !important;
        transform: translateY(var(--offset, 0px)) !important;
        opacity: 1 !important;
    }
}