/* =========================================================================
   Bloc "Infos produits" - carrousel de cartes pour la page d'accueil
   Classes prefixees .lcpib-  | marque : vert #a7bc44, gris #414142
   ========================================================================= */

.lcpib {
    /* Section dans le FLUX NORMAL (comme .lc-newproducts) : elle est donc
       contrainte par le meme conteneur que "Nouveautes" etc., ce qui garantit
       un alignement identique du contenu. Le fond gris pleine largeur est rendu
       par le pseudo-element ::before (100vw en arriere-plan). */
    position: relative;
    z-index: 0;
    padding: 48px 15px 56px 15px;
}
.lcpib::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--lc-sec-bg, #f2f4f7);
    z-index: -1;
}

.lcpib-wrap {
    /* Meme contrainte que le .container des autres sections (max 1200px,
       padding lateral 15px) : alignement identique a "Nouveautes". */
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

.lcpib-title {
    text-align: center;
    margin: 0 0 32px 0;
    color: #414142;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 1.7rem;
}

/* --- Carrousel --- */
.lcpib-carousel {
    position: relative;
}

.lcpib-viewport {
    overflow: hidden;
}

.lcpib-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.lcpib-track::-webkit-scrollbar { display: none; }

/* 4 cartes visibles (gap 24px x3 = 72px) */
.lcpib-card {
    flex: 0 0 calc((100% - 72px) / 4);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lcpib-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Image carree 1:1 */
.lcpib-card-imglink { display: block; }
.lcpib-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f3f3f3;
    overflow: hidden;
}
@supports not (aspect-ratio: 1 / 1) {
    .lcpib-card-img { height: 0; padding-bottom: 100%; }
}
.lcpib-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lcpib-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 16px 16px 18px 16px;
}
.lcpib-card-title {
    margin: 0 0 8px 0;
    font-size: 0.98rem;
    line-height: 1.32;
    font-weight: 700;
}
.lcpib-card-title a { color: #414142; text-decoration: none; }
.lcpib-card-title a:hover { color: #a7bc44; }

.lcpib-card-excerpt {
    margin: 0 0 14px 0;
    color: #6a6a6a;
    font-size: 0.88rem;
    line-height: 1.5;
}
.lcpib-card-more {
    margin-top: auto;
    align-self: flex-start;
    color: #a7bc44;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-decoration: none;
}
.lcpib-card-more:hover { color: #414142; }

/* --- Fleches --- */
.lcpib-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--lc-vert, #a7bc44);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.lcpib-arrow svg { width: 20px; height: 20px; }
.lcpib-arrow:hover {
    background: var(--lc-vert-dark, #8fa339);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
    transform: translateY(-50%) translateY(-1px);
}
.lcpib-arrow--prev { left: -20px; }
.lcpib-arrow--next { right: -20px; }
.lcpib-arrow.is-hidden { display: none; }

/* --- Carte CTA finale (meme gabarit qu'une carte article) --- */
.lcpib-card--cta {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 18px;
    padding: 24px;
    text-decoration: none;
    background: #f4f7e8;
    border-color: #e3ebc4;
}
.lcpib-cta-arrow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #a7bc44;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    line-height: 1;
    transition: background 0.15s ease, transform 0.15s ease;
}
.lcpib-card--cta:hover .lcpib-cta-arrow {
    background: #95a93a;
    transform: translateX(3px);
}
.lcpib-cta-label {
    color: #414142;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .lcpib-card { flex-basis: calc((100% - 48px) / 3); }
}
@media (max-width: 768px) {
    .lcpib-card { flex-basis: calc((100% - 24px) / 2); }
    .lcpib-arrow { display: none; } /* swipe natif sur mobile */
}
@media (max-width: 480px) {
    .lcpib-card { flex-basis: 78%; }
}
