/* Carrousel Portfolio — remplacement léger de LayerSlider (CSS + ~1 Ko de JS).
   3 slides : image cliquable à gauche, titre + sous-titre à droite. Le carrousel
   est transparent : il se pose sur le fond violet (image bokeh + masque #a415c8)
   de la section, comme le faisait LayerSlider. Défilement auto, navigation par
   flèches et puces, pause au survol. */

.pf-carousel {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 700px;
    margin: 0 auto;
    overflow: hidden;
    background: transparent;
}

/* piste + slides */
.pf-carousel__track {
    height: 100%;
}

.pf-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 4%;
    padding: 0 6%;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease;
}

.pf-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.pf-slide__media {
    flex: 0 0 auto;
    display: block;
}

.pf-slide__media img {
    width: 416px;
    max-width: 38vw;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.pf-slide__body {
    color: #fff;
    max-width: 460px;
}

.pf-slide__title {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin: 0 0 .4em;
    line-height: 1.1;
}

.pf-slide__subtitle {
    display: block;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    color: #cfe3dc;
    margin-bottom: .8em;
}

.pf-slide__desc {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .9);
}

/* flèches de navigation */
.pf-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .8;
    transition: opacity .2s ease;
    z-index: 10;
}

/* chevron dessiné en CSS (coin de bordure pivoté) : centrage géométrique
   fiable, contrairement aux glyphes ‹/› dépendants de la fonte. */
.pf-carousel__nav::before {
    content: "";
    width: 12px;
    height: 12px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}

.pf-carousel__nav:hover {
    opacity: 1;
}

.pf-carousel__nav--prev {
    left: 10px;
}

.pf-carousel__nav--prev::before {
    transform: translateX(3px) rotate(-135deg);
}

.pf-carousel__nav--next {
    right: 10px;
}

.pf-carousel__nav--next::before {
    transform: translateX(-3px) rotate(45deg);
}

/* puces */
.pf-carousel__dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 10;
}

/* zone tactile de 24px (WCAG 2.5.8) ; la puce visuelle de 11px est dessinée
   en ::before, centrée dans le bouton transparent. */
.pf-carousel__dot {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-carousel__dot::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    transition: background .2s ease;
}

.pf-carousel__dot.is-active::before {
    background: #fff;
}

/* responsive : image au-dessus du texte */
@media (max-width: 760px) {
    .pf-carousel {
        height: auto;
        min-height: 560px;
    }

    .pf-slide {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 1.5rem;
        padding: 3rem 1.5rem 4rem;
    }

    .pf-slide__media img {
        width: 220px;
        max-width: 60vw;
    }
}

/* repli sans JavaScript : on empile les slides, toutes visibles */
.no-js .pf-slide {
    position: static;
    opacity: 1;
    visibility: visible;
}

.no-js .pf-carousel {
    height: auto;
}

.no-js .pf-carousel__nav,
.no-js .pf-carousel__dots {
    display: none;
}
