/* =====================================================================
   PRODIMED Slider — styles du hero rotatif de la page d'accueil.
   Fichier autonome : fonctionne avec l'ancien style.css comme avec le
   nouveau design. S'applique seulement quand slider.js est chargé.
   ===================================================================== */

@keyframes pdsl-kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}
@keyframes pdsl-progress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
@keyframes pdsl-up {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero.pd-has-slider {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 600px;
    padding: 96px 24px 110px;
}
/* les décors fixes du hero (photo et voile) sont remplacés par le slider */
.hero.pd-has-slider::before,
.hero.pd-has-slider::after { display: none; }

/* images */
.pd-slides { position: absolute; inset: 0; z-index: 0; }
.pd-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    transform-origin: right center;
    opacity: 0;
    transition: opacity .9s ease;
}
.pd-slide.is-active {
    opacity: 1;
    animation: pdsl-kenburns calc(var(--pd-interval, 3000ms) + 1500ms) ease-out both;
}
.hero.is-paused .pd-slide.is-active { animation-play-state: paused; }

/* voile sombre à gauche pour garder le texte lisible */
.pd-slider-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(95deg,
            rgba(11, 27, 63, .94) 0%,
            rgba(11, 27, 63, .82) 40%,
            rgba(11, 27, 63, .34) 78%,
            rgba(11, 27, 63, .18) 100%),
        linear-gradient(0deg, rgba(11, 27, 63, .55) 0%, rgba(11, 27, 63, 0) 28%);
}

/* bloc de texte à gauche */
.hero.pd-has-slider .hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    margin: 0 auto;
    animation: pdsl-up .8s cubic-bezier(.22, .61, .36, 1) .1s both;
}
.hero.pd-has-slider .hero-container > * {
    max-width: 580px;
    animation: none;
    transition: opacity .4s cubic-bezier(.22, .61, .36, 1), transform .4s cubic-bezier(.22, .61, .36, 1);
}
.hero.pd-has-slider .hero-container > *:nth-child(2) { transition-delay: .06s; }
.hero.pd-has-slider .hero-container > *:nth-child(3) { transition-delay: .12s; }
.hero.pd-has-slider .hero-container > *:nth-child(4) { transition-delay: .18s; }
.hero.pd-has-slider h1 { font-size: 50px; min-height: 2.2em; }

/* changement de texte : sortie par le haut, entrée par le bas */
.hero.pd-has-slider .hero-container.pd-out > * {
    opacity: 0;
    transform: translateY(-14px);
    transition-delay: 0s;
    transition-duration: .3s;
}
.hero.pd-has-slider .hero-container.pd-pre > * {
    opacity: 0;
    transform: translateY(16px);
    transition: none !important;
}

/* flèches */
.pd-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0 0 4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(11, 27, 63, .35);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transform: translateY(-50%);
    transition: background-color .25s ease, transform .25s ease, border-color .25s ease;
}
.pd-slider-arrow:hover { background: rgba(255, 255, 255, .22); border-color: #fff; transform: translateY(-50%) scale(1.08); }
.pd-slider-arrow:focus-visible, .pd-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pd-prev { left: 20px; }
.pd-next { right: 20px; }

/* points + barre de progression */
.pd-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pd-dot {
    position: relative;
    width: 38px;
    height: 5px;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: rgba(255, 255, 255, .32);
    cursor: pointer;
    overflow: hidden;
    transition: background-color .25s ease;
}
.pd-dot:hover { background: rgba(255, 255, 255, .55); }
.pd-dot.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    transform-origin: left;
    animation: pdsl-progress var(--pd-interval, 3000ms) linear both;
}
.hero.is-paused .pd-dot.is-active::after { animation-play-state: paused; }

@media (max-width: 768px) {
    .hero.pd-has-slider { min-height: 560px; padding: 72px 0 96px; }
    .pd-slider-shade { background: rgba(11, 27, 63, .80); }
    .hero.pd-has-slider h1 { font-size: 32px; }
    .hero.pd-has-slider .hero-container { padding: 0 20px; }
    .pd-slider-arrow { display: none; }                 /* sur mobile : glisser du doigt */
    .pd-slide { background-position: 72% center; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-slide,
    .pd-slide.is-active,
    .hero.pd-has-slider .hero-container,
    .hero.pd-has-slider .hero-container > *,
    .pd-dot,
    .pd-dot.is-active::after,
    .pd-slider-arrow {
        animation: none !important;
        transition: none !important;
    }
    .pd-dot.is-active { background: #fff; }
}
