/* Reset pour le carousel */
.banner {
    position: relative;
    width: calc(100% - 80px);
    height: 100%-120px;
    overflow: hidden;
    background: #1a1a1a;
    
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    margin-left: 75px;
    margin-top:10px;
    
    /* Ajouter ces propriétés importantes */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    isolation: isolate;
   
}



/* Container principal du carousel */
.banner .views-view-responsive-grid.views-view-responsive-grid--horizontal {
    display: flex !important;
    width: 300%; /* 100% × nombre d'items */
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0);
    grid-template-columns: none !important;
    --views-responsive-grid--column-count: initial !important;
    --views-responsive-grid--cell-min-width: initial !important;
    --views-responsive-grid--layout-gap: 0 !important;
}

/* Chaque slide */
.banner .views-view-responsive-grid__item {
    flex: 0 0 33.333%; /* 100% / 3 items */
    height: 80vh;
    position: relative;
    overflow: hidden;
}

.banner .views-view-responsive-grid__item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

/* Image en background */
.banner .views-field-field-image-de-couverture {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner .views-field-field-image-de-couverture .field-content,
.banner .views-field-field-image-de-couverture .field-content > div,
.banner .views-field-field-image-de-couverture .field-content > div > div {
    width: 100%;
    height: 100%;
}

.banner .views-field-field-image-de-couverture img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
    /* Éviter le zoom excessif et le flou */
    max-width: none;
    min-width: 100%;
    min-height: 100%;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: scale(1.1); /* Léger zoom contrôlé */
    filter: brightness(0.85) contrast(1.1); /* Améliorer le contraste */
}

/* Overlay sombre - réduit pour laisser plus de clarté à l'image */
.banner .views-view-responsive-grid__item-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.7) 100%
    );
    z-index: 2;
}

/* Contenu textuel */
.banner .views-field-title,
.banner .views-field-body,
.banner .views-field-nid {
    position: relative;
    z-index: 3;
    color: white;
    padding: 0 3rem;
    margin-bottom: 1rem;
    margin-left: 80px;
}

/* Titre */
.banner .views-field-title {
    margin-bottom: 1.5rem;
}

.banner .views-field-title {
    color: white !important;
    text-decoration: none !important;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    display: block;
    transition: all 0.3s ease;
}

.banner .views-field-title a:hover {
    color: #90EE90 !important;
    transform: translateY(-2px);
}

/* Description */
.banner .views-field-body {
    margin-bottom: 1rem;
    max-width: 1000px;
}

.banner .views-field-body p {
    font-size: 1.3rem !important;
    line-height: 1.6;
    color: rgba(255,255,255,0.9) !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    margin: 0;
}

/* Bouton Découvrir */
.banner .views-field-nid {
    margin-bottom: 1rem;
}

.banner .views-field-nid .flex {
    display: block !important;
}

.banner .views-field-nid a {
    background: #2e8b57 !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    letter-spacing: 1px;
}

.banner .views-field-nid a:hover {
    background: transparent !important;
    border-color: #2e8b57;
    color: #2e8b57 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(46, 139, 87, 0.6);
}

/* Navigation - Flèches */
.banner::before,
.banner::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.banner::before {
    left: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;
}

.banner::after {
    right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;
}

.banner::before:hover,
.banner::after:hover {
    background-color: rgba(46, 139, 87, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* Indicateurs */
.banner .carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 1rem;
}

.banner .carousel-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.banner .carousel-indicator.active {
    background: #2e8b57;
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(46, 139, 87, 0.6);
}

.banner .carousel-indicator:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.1);
}

/* Animation d'entrée */
.banner .views-view-responsive-grid__item.active .views-field-title {
    animation: slideInUp 0.8s ease-out 0.3s both;
}

.banner .views-view-responsive-grid__item.active .views-field-body p {
    animation: slideInUp 0.8s ease-out 0.5s both;
}

.banner .views-view-responsive-grid__item.active .views-field-nid {
    animation: slideInUp 0.8s ease-out 0.7s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Masquer les éléments visuellement cachés de Drupal */
.banner .visually-hidden {
    display: none !important;
}

/* ===== RESPONSIVE DESIGN AMÉLIORÉ ===== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .banner {
        height: 85vh;
        border-top-left-radius: 60px;
        border-bottom-left-radius: 60px;
        margin-left: 80px;
    }

    .banner .views-field-title {
        font-size: 4rem;
    }

    .banner .views-field-body p {
        font-size: 1.4rem !important;
        max-width: 700px;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-left: 120px;
        padding: 0 4rem;
    }
}

/* Desktop (1200px à 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .banner .views-field-title {
        font-size: 3.2rem;
    }

    .banner .views-field-body p {
        font-size: 1.25rem !important;
    }
}

/* Tablet Large (992px à 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .banner {
        width: calc(100% - 60px);
        margin-left: 60px;
        border-top-left-radius: 40px;
        border-bottom-left-radius: 40px;
        height: 75vh;
    }

    .banner .views-field-title {
        font-size: 2.8rem;
    }

    .banner .views-field-body p {
        font-size: 1.2rem !important;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-left: 80px;
        padding: 0 2.5rem;
    }

    .banner::before,
    .banner::after {
        width: 55px;
        height: 55px;
        background-size: 28px;
    }
}

/* Tablet (768px à 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .banner {
        width: calc(100% - 40px);
        margin-left: 40px;
        border-top-left-radius: 40px;
        border-bottom-left-radius: 40px;
        height: 60vh;
    }

    .banner .views-field-title {
        font-size: 2.4rem;
        line-height: 1.2;
    }

    .banner .views-field-body p {
        font-size: 1.15rem !important;
        line-height: 1.5;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-left: 60px;
        padding: 0 2rem;
    }

    .banner .views-field-nid a {
        padding: 0.9rem 1.8rem !important;
        font-size: 1rem;
    }

    .banner::before,
    .banner::after {
        width: 50px;
        height: 50px;
        background-size: 25px;
    }

    .banner::before {
        left: 1.5rem;
    }

    .banner::after {
        right: 1.5rem;
    }

    .banner .carousel-indicators {
        bottom: 1.5rem;
        gap: 0.8rem;
    }

    .banner .carousel-indicator {
        width: 12px;
        height: 12px;
    }
}

/* Mobile Large (576px à 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .banner {
        width: calc(100% - 20px);
        margin-left: 20px;
        border-top-left-radius: 25px;
        border-bottom-left-radius: 25px;
        height: 65vh;
    }

    .banner .views-field-title {
        font-size: 2.1rem;
        line-height: 1.2;
    }

    .banner .views-field-body p {
        font-size: 1.1rem !important;
        line-height: 1.5;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-left: 30px;
        padding: 0 1.5rem;
        margin-bottom: 1.2rem;
    }

    .banner .views-field-nid {
        margin-bottom: 3rem;
    }

    .banner .views-field-nid a {
        padding: 0.8rem 1.6rem !important;
        font-size: 0.95rem;
        border-radius: 40px !important;
    }

    .banner::before,
    .banner::after {
        width: 45px;
        height: 45px;
        background-size: 22px;
    }

    .banner::before {
        left: 1rem;
    }

    .banner::after {
        right: 1rem;
    }

    .banner .carousel-indicators {
        bottom: 1.2rem;
        gap: 0.7rem;
    }

    .banner .carousel-indicator {
        width: 11px;
        height: 11px;
    }
}

/* Mobile (max-width: 575px) */
@media (max-width: 575px) {
    .banner {
        width: calc(100% - 10px);
        margin-left: 10px;
        border-top-left-radius: 40px;
        border-bottom-left-radius: 40px;
        height: 60vh;
        min-height: 500px;
    }

    .banner .views-view-responsive-grid__item {
        height: 60vh;
        min-height: 500px;
    }

    .banner .views-field-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .banner .views-field-body p {
        font-size: 1rem !important;
        line-height: 1.5;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-left: 15px;
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .banner .views-field-title {
        margin-bottom: 1.2rem;
    }

    .banner .views-field-body {
        margin-bottom: 1.5rem;
        max-width: none;
    }

    .banner .views-field-nid {
        margin-bottom: 2.5rem;
    }

    .banner .views-field-nid a {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem;
        border-radius: 35px !important;
        letter-spacing: 0.5px;
    }

    /* Navigation adaptée mobile */
    .banner::before,
    .banner::after {
        width: 40px;
        height: 40px;
        background-size: 20px;
    }

    .banner::before {
        left: 0.5rem;
    }

    .banner::after {
        right: 0.5rem;
    }

    /* Indicateurs plus petits sur mobile */
    .banner .carousel-indicators {
        bottom: 1rem;
        gap: 0.6rem;
    }

    .banner .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Mobile très petit (max-width: 375px) */
@media (max-width: 375px) {
    .banner {
        width: calc(100% - 5px);
        margin-left: 5px;
        height: 55vh;
        min-height: 450px;
    }

    .banner .views-view-responsive-grid__item {
        height: 55vh;
        min-height: 450px;
    }

    .banner .views-field-title {
        font-size: 1.6rem;
    }

    .banner .views-field-body p {
        font-size: 0.95rem !important;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-left: 10px;
        padding: 0 0.8rem;
    }

    .banner .views-field-nid a {
        padding: 0.7rem 1.3rem !important;
        font-size: 0.85rem;
    }

    .banner::before,
    .banner::after {
        width: 35px;
        height: 35px;
        background-size: 18px;
    }

    .banner::before {
        left: 0.3rem;
    }

    .banner::after {
        right: 0.3rem;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (max-width: 900px) {
    .banner {
        height: 90vh;
        min-height: 400px;
    }

    .banner .views-view-responsive-grid__item {
        height: 90vh;
        min-height: 400px;
    }

    .banner .views-field-title,
    .banner .views-field-body,
    .banner .views-field-nid {
        margin-bottom: 0.8rem;
    }

    .banner .views-field-nid {
        margin-bottom: 2rem;
    }

    .banner .carousel-indicators {
        bottom: 0.8rem;
    }
}

/* Amélioration des performances sur mobile */
@media (max-width: 768px) {
    .banner .views-field-field-image-de-couverture img {
        transform: scale(1.05); /* Moins de zoom sur mobile */
        will-change: transform;
    }

    .banner .views-view-responsive-grid.views-view-responsive-grid--horizontal {
        will-change: transform;
    }
}