/* ==================================================
   MEDIA BLOCKS — HERO / CAROUSEL
   JessAude CMS
================================================== */

/* =========================
   Structure globale
========================= */

.hero-carousel,
.custom-carousel {
    width: 100%;
    overflow: hidden;
}

.hero-slide,
.custom-carousel-slide {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   Hauteurs
========================= */

.height-auto {
    min-height: 450px;
}

.height-small {
    min-height: 300px;
}

.height-medium {
    min-height: 500px;
}

.height-large {
    min-height: 700px;
}

.height-fullscreen {
    min-height: 100vh;
}

.height-custom {
    min-height: 0;
}

/* =========================
   Images
========================= */

.hero-image-wrapper,
.custom-carousel-image-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    overflow: hidden;
}

.hero-slide-image,
.custom-carousel-image {
    width: 100%;
    height: 100%;
    display: block;
    object-position: center center;
    transition: all .3s ease;
}

.fit-cover {
    object-fit: cover !important;
}

.fit-contain {
    object-fit: contain !important;
}

/* =========================
   Animation du média
========================= */

.image-animation-none {
    animation: none;
}

/* Animations rapides */

.carousel-item.active .image-animation-fade-up {
    animation: imageFadeUp 1s ease both;
}

.carousel-item.active .image-animation-fade-down {
    animation: imageFadeDown 1s ease both;
}

.carousel-item.active .image-animation-slide-left {
    animation: imageSlideLeft 1s ease both;
}

.carousel-item.active .image-animation-slide-right {
    animation: imageSlideRight 1s ease both;
}

.carousel-item.active .image-animation-zoom-in {
    animation: imageZoomIn 1.2s ease both;
}

/* Animations cinématiques */

.carousel-item.active .image-animation-zoom-out {
    animation: imageZoomOut 15s ease-out forwards;
}

.carousel-item.active .image-animation-kenburns {
    animation: kenBurns 15s ease-out forwards;
}

.carousel-item.active .image-animation-kenburns-left {
    animation: kenBurnsLeft 15s ease-out forwards;
}

.carousel-item.active .image-animation-kenburns-right {
    animation: kenBurnsRight 15s ease-out forwards;
}

.carousel-item.active .image-animation-pan-left {
    animation: panLeft 15s ease-out forwards;
}

.carousel-item.active .image-animation-pan-right {
    animation: panRight 15s ease-out forwards;
}

.carousel-item.active .image-animation-parallax {
    animation: parallaxMove 15s ease-out forwards;
}

.carousel-item.active .image-animation-floating {
    animation: floating 15s ease-in-out infinite;
}

.carousel-item.active .image-animation-cinematic {
    animation: cinematic 15s ease-out forwards;
}

.carousel-item.active .image-animation-zoom-in-out {
    animation: zoomInOut 15s ease-in-out forwards;
}

.carousel-item.active .image-animation-breathing {
    animation: breathing 15s ease-in-out infinite;
}

@keyframes zoomInOut {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes breathing {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    75% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* Keyframes média */

@keyframes imageFadeUp {
    from {
        opacity: .7;
        transform: translateY(30px) scale(1.03);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes imageFadeDown {
    from {
        opacity: .7;
        transform: translateY(-30px) scale(1.03);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes imageSlideLeft {
    from {
        opacity: .8;
        transform: translateX(40px) scale(1.04);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes imageSlideRight {
    from {
        opacity: .8;
        transform: translateX(-40px) scale(1.04);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes imageZoomIn {
    from {
        transform: scale(1.12);
    }

    to {
        transform: scale(1);
    }
}

@keyframes imageZoomOut {
    from {
        transform: scale(1.18);
    }

    to {
        transform: scale(1);
    }
}

@keyframes kenBurns {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.12);
    }
}

@keyframes kenBurnsLeft {
    from {
        transform: scale(1) translateX(0);
    }

    to {
        transform: scale(1.12) translateX(-2%);
    }
}

@keyframes kenBurnsRight {
    from {
        transform: scale(1) translateX(0);
    }

    to {
        transform: scale(1.12) translateX(2%);
    }
}

@keyframes panLeft {
    from {
        transform: scale(1.08) translateX(2%);
    }

    to {
        transform: scale(1.08) translateX(-2%);
    }
}

@keyframes panRight {
    from {
        transform: scale(1.08) translateX(-2%);
    }

    to {
        transform: scale(1.08) translateX(2%);
    }
}

@keyframes parallaxMove {
    from {
        transform: scale(1.08) translateY(0);
    }

    to {
        transform: scale(1.08) translateY(-12px);
    }
}

@keyframes floating {
    0% {
        transform: translateY(0) scale(1.03);
    }

    50% {
        transform: translateY(-10px) scale(1.03);
    }

    100% {
        transform: translateY(0) scale(1.03);
    }
}

@keyframes cinematic {
    from {
        transform: scale(1) rotate(0deg);
    }

    to {
        transform: scale(1.08) rotate(0.3deg);
    }
}

/* =========================
   Overlay
========================= */

.hero-overlay,
.custom-carousel-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* =========================
   Contenu texte
========================= */

.hero-content,
.custom-carousel-caption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    padding: 3rem;
}

.hero-content-inner,
.custom-carousel-caption-inner {
    width: 100%;
    max-width: 680px;
    color: inherit;
    transition: all .3s ease;
}

.hero-title,
.custom-carousel-title {
    color: inherit;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-description,
.custom-carousel-description {
    color: inherit;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 0;
}

.hero-btn {
    border-radius: 50rem;
    padding: .8rem 1.6rem;
    font-weight: 700;
}

/* =========================
   Taille dynamique du titre
========================= */

.title-sm {
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.title-md {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.title-lg {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.title-xl {
    font-size: clamp(3rem, 6vw, 5rem);
}

/* =========================
   Taille dynamique description
========================= */

.desc-sm {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.desc-md {
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.desc-lg {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

/* =========================
   Positions du contenu
========================= */

.position-center {
    align-items: center;
    justify-content: center;
}

.position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

.position-top-center {
    align-items: flex-start;
    justify-content: center;
}

.position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

.position-center-left {
    align-items: center;
    justify-content: flex-start;
}

.position-center-right {
    align-items: center;
    justify-content: flex-end;
}

.position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.position-bottom-center {
    align-items: flex-end;
    justify-content: center;
}

.position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

/* =========================
   Alignement texte
========================= */

.text-start,
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-end,
.text-right {
    text-align: right;
}

/* =========================
   Animation du texte
========================= */

.animation-none {
    animation: none;
}

.animation-fade-up {
    animation: blocFadeUp .8s ease both;
}

.animation-fade-down {
    animation: blocFadeDown .8s ease both;
}

.animation-zoom-in {
    animation: blocZoomIn .8s ease both;
}

.animation-slide-left {
    animation: blocSlideLeft .8s ease both;
}

.animation-slide-right {
    animation: blocSlideRight .8s ease both;
}

@keyframes blocFadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blocFadeDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blocZoomIn {
    from {
        opacity: 0;
        transform: scale(.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes blocSlideLeft {
    from {
        opacity: 0;
        transform: translateX(35px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blocSlideRight {
    from {
        opacity: 0;
        transform: translateX(-35px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================
   Contrôles Bootstrap
========================= */

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next,
.custom-carousel .carousel-control-prev,
.custom-carousel .carousel-control-next {
    width: 6%;
    z-index: 10;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon,
.custom-carousel .carousel-control-prev-icon,
.custom-carousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    backdrop-filter: blur(8px);
}

/* =========================
   Indicateurs Bootstrap
========================= */

.hero-carousel .carousel-indicators,
.custom-carousel .carousel-indicators {
    z-index: 11;
}

.hero-carousel .carousel-indicators button,
.custom-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* =========================
   Masquage responsive
========================= */

@media (max-width: 768px) {
    .bloc-hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .bloc-hide-desktop {
        display: none !important;
    }
}

/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

    .hero-slide,
    .custom-carousel-slide,
    .height-auto,
    .height-small,
    .height-medium,
    .height-large,
    .height-fullscreen {
        min-height: var(--bloc-mobile-height, 350px);
    }

    .hero-content,
    .custom-carousel-caption {
        padding: 1.5rem;
    }

    .hero-content-inner,
    .custom-carousel-caption-inner {
        max-width: 100%;
    }

    .title-sm {
        font-size: clamp(1.2rem, 6vw, 1.8rem);
    }

    .title-md {
        font-size: clamp(1.4rem, 7vw, 2.2rem);
    }

    .title-lg {
        font-size: clamp(1.6rem, 8vw, 2.6rem);
    }

    .title-xl {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .desc-sm {
        font-size: .85rem;
    }

    .desc-md {
        font-size: .95rem;
    }

    .desc-lg {
        font-size: 1.05rem;
    }

    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next,
    .custom-carousel .carousel-control-prev,
    .custom-carousel .carousel-control-next {
        width: 12%;
    }

    .hero-carousel .carousel-control-prev-icon,
    .hero-carousel .carousel-control-next-icon,
    .custom-carousel .carousel-control-prev-icon,
    .custom-carousel .carousel-control-next-icon {
        width: 2.2rem;
        height: 2.2rem;
    }
}