﻿/* ====== Section "6 raisons" ====== */
.reasons {
    padding: clamp(2.5rem, 3vw, 4rem) 5%;
    background: var(--logoWhite);
    color: #1a1a1a;
}

.reasons__title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 2rem;
    color: var(--logoRed, #d41f26);
}

.reasons__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
}

.reason {
    background: var(--background-light);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 16px;
    padding: clamp(1rem, 2.2vw, 1.75rem);
    box-shadow: 0 8px 24px rgba(0,0,0,.04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}

.reason__icon {
    width: 56px; /* un tout petit peu plus large */
    height: 56px;
    flex: 0 0 56px; /* évite qu’il s’écrase si tu es en flex */
    display: flex; /* centre ce qu’il y a dedans */
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}

    .reason__icon img {
        display: block;
        width: 80%; /* 80% pour que tous aient un petit “marge” interne */
        height: 80%;
        object-fit: contain;
    }

    /* 2) Si tu insères le SVG inline (<svg>...</svg>) */
    .reason__icon svg {
        width: 80%;
        height: 80%;
        display: block;
    }

        /* Optionnel : si certains svg ont un “stroke” trop gros */
        .reason__icon svg path {
            vector-effect: non-scaling-stroke;
        }

.reason__heading {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 .4rem;
    line-height: 1.3;
    color: var(--logoRed);
}

.reason__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--logoBlack);
}

.reason:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,.08);
    border-color: rgba(0,0,0,.1);
}

.reason:hover .reason__icon {
    transform: scale(1.1);
}

/* ===== Vidéo ===== */
.video {
    text-align: center;
    padding: 2rem;
}

.section__title {
    margin-bottom: 2rem;
}

.video__wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

    .video__wrapper iframe {
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 12px;
        border: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

        .video__wrapper iframe:hover {
            transform: scale(1.02);
            box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
        }

/* ===== Lien sous le titre ===== */
.link_title__container {
    padding: 2rem 0 1rem 0;
}

.link__title {
    text-decoration: none;
    border: 1px solid var(--logoRed);
    color: var(--logoRed);
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.5rem;
    margin-left: 2rem;
    transition: 0.3s ease;
}

    .link__title:hover {
        background: var(--logoRed);
        color: var(--logoWhite);
    }

/* Container global des publicités */
.pub__container {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
    gap: 1rem;
    padding: 1.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Chaque bloc pub */
.pub {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background-color: var(--logoWhite);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    /* Le LinkButton se rend en <a>, on le force en bloc */
    .pub a {
        display: block;
        text-decoration: none;
    }

    /* Image de pub */
    .pub__image,
    .pub img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
        transition: transform 0.25s ease, filter 0.25s ease;
    }

    /* Effet hover : léger lift du bloc + zoom léger et un peu plus de contraste */
.pub:hover {
    transform: translateY(-2px);
    border-color: var(--logoRed, #d41f26);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.pub:hover .pub__image,
.pub:hover img {
    transform: scale(1.03);
    filter: brightness(1.04);
}

    /* Focus clavier : contour accessible cohérent avec ton thème */
    .pub a:focus-visible {
        outline: 3px solid var(--logoRed, #d41f26);
        outline-offset: 3px;
    }

/* ===== Slider ===== */
.pslider {
    position: relative;
    margin: 2rem;
}

.pslider__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    border: 1px solid var(--logoRed);
    border-radius: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

    /* Scrollbar */
    .pslider__viewport::-webkit-scrollbar {
        height: 8px;
    }

    .pslider__viewport::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,.2);
        border-radius: 999px;
    }

.pslider__track {
    display: flex;
    gap: var(--ps-gap, 16px);
    padding: 1.25rem;
    align-items: stretch;
}

/* Carte produit - mobile d’abord (2 colonnes dans le viewport) */
.product-card {
    flex: 0 0 calc((100% - (var(--ps-gap, 16px) * 1)) / 2);
    background: var(--logoWhite);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-align: start;
    user-select: none;
}

.product-card__imageWrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 280px;
    background: var(--logoWhite);
    overflow: hidden;
    margin-bottom: .75rem;
    pointer-events: auto; /*!important*/
    cursor: pointer;
}

    .product-card__imageWrap img {
        width: 100%;
        height: 100%;
        padding-top: 10px;
        object-fit: contain;
        display: block;
        transition: all 0.3s ease;
    }

    .product-card__imageWrap img:hover {
        transform: translateY(-10px);
    }

.product-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .25rem;
    font-size: 1rem;
    text-align: center;
    line-height: 1.3;
    min-height: 2.6em; /* réserve 2 lignes => prix mieux alignés */
}

.product-card__format {
    min-height: 1.2em;
    margin: 0 0 .35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .92rem;
    line-height: 1.25;
    text-align: center;
    color: var(--bf-muted, rgba(0,0,0,.65));
}

.product-card__status {
    min-height: 1.2em;
    margin: 0;
    text-align: center;
    font-size: .9rem;
    line-height: 1.25;
    color: var(--bf-subtle, rgba(0,0,0,.48));
}

/* Flèches */
.pslider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(3px);
    color: #fff;
    cursor: pointer;
    z-index: 2;
    transition: transform .15s ease, background .2s ease;
}

    .pslider__btn:hover {
        background: rgba(217,55,49,.35);
        transform: translateY(-50%) scale(1.05);
    }
    
.pslider__btn:focus-visible {
    outline: 3px solid var(--logoRed, #d41f26);
    outline-offset: 3px;
}
.pslider__btn[disabled] {
        opacity: .35;
        pointer-events: none;
    }

.pslider__btn--prev {
    left: .5rem;
}

.pslider__btn--next {
    right: .5rem;
}

/* ===== Liens utiles ===== */
.usefull-links {
    padding: 4rem 5%;
    text-align: center;
}

.links__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.link__item {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    transition: transform .3s, box-shadow .3s;
    width: 100%;
    max-width: 300px;
}

    .link__item img {
        width: 100%;
        max-width: 120px;
        margin-bottom: 1.5rem;
        border-radius: 12px;
        transition: transform 0.3s ease;
    }

    .link__item:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 25px rgba(0,0,0,.2);
    }

        .link__item:hover img {
            transform: scale(1.05);
        }

/* ===== Réduire les animations ===== */
@media (prefers-reduced-motion: reduce) {
    .pslider__viewport {
        scroll-behavior: auto;
    }

    .video__wrapper iframe {
        transition: none;
    }

    .pub, .pub__image, .pub img {
        transition: none;
    }

    .reason, .reason__icon,
    .link__item, .link__item img,
    .product-card__imageWrap img,
    .pslider__btn {
        transition: none;
    }
}

/* ====== MEDIA QUERIES ====== */
@media (min-width: 769px) and (max-width: 1199px) {
    .reasons__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .pub__container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-card {
        flex: 0 0 calc((100% - (var(--ps-gap,16px) * 2)) / 3);
    }

    .links__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
        gap: 1.5rem;
    }

    .link__item {
        max-width: 400px;
    }
}

@media (min-width: 1200px) {
    .reasons__container {
        grid-template-columns: repeat(3, 1fr);
    }

    .pub__container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .product-card {
        flex: 0 0 calc((100% - (var(--ps-gap,16px) * 2)) / 4);
    }

    .links__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
        gap: 2.5rem;
    }
}