/* On définit le conteneur pour masquer le surplus */
.text-slide {
    overflow: hidden;
    white-space: nowrap;
}

/* On anime le titre */
.text-slide .elementor-heading-title {
    display: inline-block;
    padding-left: 0;
    animation: marquee-infinite 30s linear infinite;
}

/* L'astuce : on fait défiler de 0 à -50% (si le texte est doublé) */
@keyframes marquee-infinite {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

.cta-expertises .elementor-cta__content {
  transform: translateY(calc(100% - 300px));
  transition: transform 0.35s ease;
}

.cta-expertises:hover .elementor-cta__content {
  transform: translateY(0);
}

.cta-expertises .elementor-cta__description,
.cta-expertises .elementor-cta__button-wrapper {
  opacity: 0;
  transition: opacity 0.35s ease 0.1s;
}

.cta-expertises:hover .elementor-cta__description,
.cta-expertises:hover .elementor-cta__button-wrapper {
  opacity: 1;
}

.swiper-pagination-bullet{
    background: #1E1E1E !important;
    fill: #1E1E1E !important;
    opacity: 1 !important; 
}

.swiper-pagination-bullet-active {
    background: red !important;
    fill: red !important;
}

.card-expertise {
    height: 150px;
    max-height: 150px;
}

.card-expertise, .card {
    position: relative; 
    isolation: isolate;
    transition: all 0.3s ease-in-out !important; 
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px !important;
    padding: 30px !important; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); 
}

.card-expertise:hover, .card:hover {
    transform: translateY(-8px) !important; 
    border: 1px solid #FE1A1B !important; 
    box-shadow: 0 15px 30px rgba(169, 52, 52, 0.2), 0 5px 10px rgba(0, 0, 0, 0.1) !important; 
    cursor: pointer;
}

.card-expertise:hover .elementor-button-text {
    color: #FE1A1B !important; 
}

/* Transition douce pour le changement d'image de fond du parent */
#dynamic-bg-section {
    transition: background-image 0.5s ease-in-out;
}

/* Lignes verticales entre les colonnes (sauf la dernière) */
.hover-box {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px !important; /* Pour aérer le texte */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Aligner le texte vers le bas */
}
.hover-box:last-child {
    border-right: none;
}

/* Cacher le contenu par défaut */
.hover-box .hover-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    margin-top: 0;
}

/* Afficher le contenu au survol de la colonne */
.hover-box:hover .hover-content {
    max-height: 300px; /* Ajuste selon la longueur de ton texte */
    opacity: 1;
    margin-top: 15px; /* Espace entre le titre et le texte */
}

/* Optionnel : Assombrir légèrement les colonnes non survolées pour faire ressortir la colonne active */
#dynamic-bg-section:hover .hover-box:not(:hover) {
    opacity: 0.6;
}

.main-navbar.scrolled {
    background-color: white !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    border-radius: 0px 0px 22px 22px !important;
    box-shadow: 0 15px 30px rgba(169, 52, 52, 0.2), 0 5px 10px rgba(0, 0, 0, 0.1) !important; 
}

/* * CSS PERSONNALISÉ FAQ - S3DE
 * Design épuré (Blanc / Gris clair / Rouge vif)
 */

/* 1. Variables de couleurs S3DE */
.e-n-accordion {
    --s3de-red: #E62424; /* Le rouge vif des boutons/bannière (à ajuster si besoin) */
    --s3de-red-light: #FCE9E9; /* Un rouge très pâle pour le fond de l'icône (+) */
    --s3de-dark: #111827; /* Noir/Gris très foncé pour les titres */
    --s3de-gray: #4B5563; /* Gris de lecture pour le texte */
}

#ast-scroll-top {
    background-color: #E62424 !important;
    border-radius: 60px;
}

/* 2. Style global de la carte (fermée par défaut) */
.e-n-accordion-item {
    background-color: #ffffff;
    border-radius: 12px; /* Coins arrondis comme sur tes images */
    margin-bottom: 20px !important;
    border: 1px solid transparent; /* Prépare le terrain pour la bordure rouge */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04); /* Ombre très légère */
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Effet au survol de la carte entière */
.e-n-accordion-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* 3. L'en-tête (La question) */
.e-n-accordion-item-title {
    padding: 24px 30px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: transparent;
}

/* Nettoyage des puces natives du navigateur */
.e-n-accordion-item-title::-webkit-details-marker { display: none; }
.e-n-accordion-item-title { list-style: none; }

/* Texte de la question */
.e-n-accordion-item-title-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--s3de-dark);
    transition: color 0.3s ease;
}

/* 4. Style quand l'accordéon est OUVERT */
.e-n-accordion-item[open] {
    /* On reprend l'idée de la bordure rouge de ta carte partenaire "V2V" */
    border-color: var(--s3de-red); 
}

.e-n-accordion-item[open] .e-n-accordion-item-title-text {
    color: var(--s3de-red); /* Le titre passe en rouge */
}

/* 5. L'icône (+ / -) */
.e-n-accordion-item-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background-color: var(--s3de-red-light); /* Fond rouge très clair */
    border-radius: 50%; /* Icône ronde */
    color: var(--s3de-red); /* Croix rouge */
    transition: all 0.3s ease;
}

/* L'icône quand c'est OUVERT */
.e-n-accordion-item[open] .e-n-accordion-item-title-icon {
    background-color: var(--s3de-red); /* Le rond devient rouge vif */
    color: #ffffff !important; /* Le "moins" devient blanc */
    transform: rotate(180deg);
}

/* Forcer la couleur du SVG (pour contrer Elementor) */
.e-n-accordion-item[open] .e-n-accordion-item-title-icon svg,
.e-n-accordion-item[open] .e-n-accordion-item-title-icon svg path {
    fill: #ffffff !important; 
}

/* 6. Le contenu de la réponse (Texte) */
.e-n-accordion-item > div[role="region"] {
    padding: 0 30px 30px 30px !important; /* Pas de padding top, l'espace est géré par le titre */
    color: var(--s3de-gray);
    line-height: 1.7;
    font-size: 1rem;
    
    /* Pour éviter que le texte soit coupé */
    overflow: visible !important; 
    max-height: none !important; 
}

/* Animation d'ouverture fluide */
.e-n-accordion-item:not([open]) > div[role="region"] {
    display: none;
}

.e-n-accordion-item[open] > div[role="region"] {
    display: block;
    animation: fadeInS3de 0.4s ease;
}

@keyframes fadeInS3de {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}