/* =============================================
   CSS VARIABLES & BASE STYLES
   ============================================= */

:root {
  --primary-red: #e53935;
  --dark-bg: #19191b;
  --light-gray: #999;
  --medium-gray: #666;
  --light-bg: #f0f0f0;
  --white: #fff;
  --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.1);
  --shadow-dark: 0 2px 8px rgba(0, 0, 0, 0.1);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 24px;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* =============================================
   SECTION TITLES & COMMON ELEMENTS
   ============================================= */

.section-title {
  text-align: center;
  font-size: calc(var(--titleSize) * 1.1);
  margin-bottom: 60px;
  color: var(--gray);
  line-height: 1.2;
}




/* =============================================
   SERVICES SECTION
   ============================================= */
.section-title.exeptionTitle{
    margin-bottom: 0px;
}
.expertisesSection{
    width: var(--rn-width1);
    margin: 40px auto;
}
.swiper.myExpertises{
    width: var(--rn-width1);
    margin: 40px auto;
    overflow: hidden;
    position: relative;
}
.swiper-wrapper.expertises {
    margin-bottom: 50px;
}
.services {
    padding: 80px 0;
    background: var(--white);
}
/* Services Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 30px;
    margin-top: 40px;
    align-items: start;
}
/* Service Cards */
.swiper-slide.expertises {
    cursor: pointer;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--light-bg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    height: auto;
    width: 312px;
    flex-shrink: 0;
    margin: 8px;
}
.swiper-slide.expertises:hover {
    background: var(--primary-red);
}
.swiper-slide.expertises:hover p, .swiper-slide.expertises:hover h3 {
    color: white;
}
.swiper-slide.expertises:hover .service-icon{
    background-color: white;
}
.swiper-slide.expertises:hover svg{
    fill: var(--primary-red);
}

.swiper-slide.expertises::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-red);
    transition: left var(--transition-slow);
    z-index: 0;
}
.swiper-slide.expertises * {
    position: relative;
    z-index: 2;
}
/* Featured Service Card */
.swiper-slide.expertises {
    background: var(--white);
}
.swiper-slide.expertises .service-icon {
    background: var(--primary-red);
    width: 70px;
    height: 70px;
    font-size: 28px;
    margin: 30px;
}
.swiper-slide.expertises h3 {
    font-size: 24px;
    margin: 20px 22px;
    color: black;
    line-height: 30px;
    font-family: 'PoppinsBold';
}
.swiper-slide.expertises p {
    font-size: 17px;
    margin: 22px;
    line-height: 1.6;
    color: black;
}
/* Service Icons */
.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--white);
    transition: transform var(--transition-base);
}
.service-icon img {
    background: var(--white);
}
/* Service Content */
.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--gray);
    line-height: 1.3;
}
.service-card p {
    color: var(--medium-gray);
    font-size: var(--discrSize);
    line-height: 1.6;
}
@media (max-width: 1000px) {
  .swiper.myExpertises {
    padding: 0 10px;
  }

  .swiper-slide.expertises {
    width: calc(100% / 3 - 16px);
  }
}

@media (max-width: 700px) {
  .swiper-slide.expertises {
    width: calc(50% - 16px);
  }
}

@media (max-width: 500px) {
  .swiper-slide.expertises {
    width: 90% !important;    /* La carte prend 90% de la largeur écran */
    max-width: 90%;
    flex: 0 0 90%;
  }
  .swiper-slide.expertises {
  margin-right: 20px; /* espace entre les cartes */
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide:last-child {
  margin-right: 0; /* pas d'espace après la dernière */
}
.swiper-slide.expertises {
  top: 0 !important;
}
}


/* =============================================
   SERVICES CAROUSEL
   ============================================= */

.services-carousel {
  width: var(--rn-width1);
  margin: 40px auto;
  overflow: hidden;
  position: relative;
}

.services-track {
  display: flex;
  gap: 32px;
  transition: transform var(--transition-slow);
}

.services-track .service-card {
  flex: 0 0 calc(25% - 26.25px);
  box-sizing: border-box;
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 10px;
}

.dot {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  cursor: pointer;
  transition: background var(--transition-base);
}

.dot.active {
  background: var(--primary-red);
}

.carousel-nav {
  display: flex;
  gap: 10px;
  margin-left: 20px;
  justify-content: flex-end;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 20%;
  border: 1px solid #ddd;
  background: var(--white);
  color: var(--medium-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-base);
}

.carousel-btn:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* =============================================
   VALUES SECTION (Des convictions fortes)
   ============================================= */
        /* =============================================
           VALUES SECTION (Des convictions fortes)
           ============================================= */

        .valeurs-section {
            display: flex;
            background: var(--dark-bg);
            border-radius: var(--border-radius-xl);
            padding: 40px 30px;
            color: var(--white);
            width: var(--rn-width1);
            margin: 40px auto;
            gap: 40px;
            box-sizing: border-box;
            position: relative;
            align-items: center;
        }

        /* Values Left Side */
        .valeurs-gauche {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .valeurs-row {
            display: flex;
            gap: 16px;
            justify-content: flex-start;
        }

        /* .valeurs-row:nth-child(2) {
            margin-left: 50px;
        } */

        /* Value Boxes */
        .valeur-box {
            background: var(--white);
            color: var(--dark-bg);
            border-radius: var(--border-radius-sm);
            padding: 21px 20px;
            font-size: 1.05em;
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 140px;
            box-shadow: var(--shadow-dark);
            cursor: pointer;
            user-select: none;
            transition: background 0.2s, color 0.2s;
        }

        .valeur-box:hover,
        .valeur-box.active {
            background: var(--primary-red);
            color: var(--white);
        }
        .valeur-box .valeur-icon path
         {
            fill: var(--red);
            /* stroke: var(--white); */
        }
        .valeur-box.active .valeur-icon path,.valeur-box.mobile-active .valeur-icon path,
        .valeur-box:hover .valeur-icon path {
            fill: var(--white);
             stroke: var(--white);
        }

        /* Value Icons */
        .valeur-icon {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .valeur-box .valeur-icon path {
            fill: var(--primary-red);
            /* stroke: var(--primary-red); */
            stroke-miterlimit: 10;
            stroke-width: 0.25px;
            transition: fill var(--transition-base), stroke var(--transition-base);
        }

        /* Values Right Side */
        .valeurs-droite {
            flex: 1;
            display: none;
            flex-direction: column;
            justify-content: center;
        }

        .valeurs-droite.active {
            display: flex;
        }

        .valeurs-titre {
            font-size: 19px;
            letter-spacing: 1px;
            color: var(--white);
            margin-bottom: 6px;
        }

        .valeurs-soustitre {
            color: var(--primary-red);
            font-size: 25px;
            margin-bottom: 16px;
            line-height: 1.2;
        }

        .valeurs-texte {
            color: #bbb;
            font-size: 18px;
            margin-bottom: 18px;
            line-height: 1.5;
        }

        .btn-box {
            margin-top: 20px;
            justify-content: center;
        }

        .thm-btn {
            display: inline-block;
            background: var(--primary-red);
            color: var(--white);
            padding: 12px 24px;
            border-radius: var(--border-radius-sm);
            text-decoration: none;
            transition: background 0.3s ease;
        }


.mobile-content-overlay{
    display: none;
}

@media (max-width: 1300px) {
  .swiper-slide.expertises {
      width: 213px;
  }
  .swiper-slide.expertises h3 {
        font-size: 18px;
        line-height: 22px;
    margin: 15px 15px;
  }
  .swiper-slide.expertises p {
    font-size: 14px;
    margin: 15px;
  }
  .swiper-slide.expertises .service-icon {
    width: 60px;
    height: 60px;
    margin: 15px;
  }
}

/* Mobile Design - Intuitive Overlay */
@media (max-width: 720px) {
    .mobile-content-overlay{
        display: block;
    }
    .topFooter .thm-btn{
        height: 35px;
                align-items: center;
        display: flex;
        text-align: center;
        justify-content: center;
    }
        .btn-box {
            margin-top: -5px;
        }
            .valeurs-section {
                flex-direction: column;
                padding: 30px 20px;
                position: relative;
                overflow: visible;
            }

            .valeurs-gauche {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 12px;
                z-index: 2;
                position: relative;
            }

            .valeurs-row {
                display: contents;
            }

            .valeurs-row:nth-child(2) {
                margin-left: 0;
            }

            .valeur-box {
                min-width: unset;
                padding: 16px 12px;
                font-size: 14px;
                justify-content: center;
                text-align: center;
                flex-direction: column;
                gap: 8px;
                position: relative;
                z-index: 3;
                transition: all 0.3s ease;
            }

            .valeur-box.mobile-active {
                transform: scale(1.05);
                background-color: var(--primary-red);
                color: white;
            }
            .valeur-box.mobile-active {

                fill: white;
            }

            /* Hide desktop content area */
            .valeurs-droite {
                display: none !important;
            }

            /* Mobile Content Overlay */
            .mobile-content-overlay {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: linear-gradient(135deg, var(--dark-bg) 0%, #2c2c2c 100%);
                border-radius: var(--border-radius-xl);
                padding: 30px 25px;
                margin-top: 15px;
                transform: translateY(-20px);
                opacity: 0;
                visibility: hidden;
                transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
                z-index: 10;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
                /* border: 2px solid var(--primary-red); */
            }

            .mobile-content-overlay.show {
                transform: translateY(0);
                opacity: 1;
                visibility: visible;
            }

            .mobile-content-overlay::before {
                content: '';
                position: absolute;
                top: -12px;
                left: 50%;
                transform: translateX(-50%);
                width: 0;
                height: 0;
                border-left: 12px solid transparent;
                border-right: 12px solid transparent;
                border-bottom: 12px solid var(--primary-red);
            }

            .mobile-valeurs-titre {
                font-size: 1.1em;
                letter-spacing: 1px;
                color: var(--white);
                margin-bottom: 8px;
                text-transform: uppercase;
            }

            .mobile-valeurs-soustitre {
                color: var(--primary-red);
                font-size: 1.3em;
                margin-bottom: 16px;
                line-height: 1.3;
            }

            .mobile-valeurs-texte {
                color: #ccc;
                font-size: var(--discrSize);
                margin-bottom: 20px;
                line-height: 1.6;
            }

            .mobile-btn-box {
                text-align: center;
            }

            .close-btn {
                position: absolute;
                top: 15px;
                right: 20px;
                background: none;
                border: none;
                color: var(--primary-red);
                font-size: var(--discrSize);
                cursor: pointer;
                width: 30px;
                height: 30px;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 50%;
                transition: background 0.3s ease;
            }

            .close-btn:hover {
                background: rgba(231, 76, 60, 0.1);
            }

            /* Animation for smooth appearance */
            .valeurs-section.mobile-expanded {
                margin-bottom: 380px;
            }

        }

        /* Tablet adjustments */
        @media (max-width: 1024px) and (min-width: 721px) {
            .valeurs-section {
                gap: 30px;
                padding: 35px 25px;
            }

            .valeurs-row:nth-child(2) {
                margin-left: 30px;
            }
        }

/* =============================================
   AUTOMATION SOLUTIONS SECTION
   ============================================= */

.solutions.Auto {
  width: var(--rn-width1);
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1rem;
}

.solutions.Auto .SAContent {
  width: 48%;
  flex: 0 0 auto;
}

.solutions.Auto .SAContent .context {
  font-family: "PoppinsRegular";
  margin-bottom: 20px;
  font-size: var(--discrSize);
  line-height: 28px;
}

.solutions.Auto .img img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.solutions.Auto .video {
  border: 10px solid black;
  border-radius: 10px;
  width: 48%;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Large Screens */
@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 20px;
  }

  .service-card.featured {
    grid-row: 1 / 2;
    grid-column: 1 / 3;
    min-height: 200px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .services-track .service-card {
    flex: 0 0 calc(50% - 17.5px);
  }

  .solutions.Auto {
    gap: 1.5rem;
    padding: 1.5rem 1rem;
  }

  .solutions.Auto .SAContent {
    width: 45%;
  }

  .solutions.Auto .img {
    width: 50%;
  }

  .solutions.Auto .SAContent .context {
    font-size: var(--discrSize);
    line-height: 26px;
  }
}

@media (max-width: 992px) {
  .services-track .service-card {
    flex: 0 0 calc(50% - 17.5px);
  }
}

/* Tablet & Mobile */
@media (max-width: 768px) {
  .services {
    padding: 60px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card.featured {
    grid-row: auto;
    grid-column: auto;
    min-height: auto;
  }

  .section-title {
    font-size: var(--titleSize);
    margin-bottom: 40px;
  }

  /* Automation Solutions Mobile */
  .solutions.Auto {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem 1rem;
  }

  .solutions.Auto .SAContent {
    width: 100%;
    order: 1;
    display: flex
;
        align-content: stretch;
        flex-direction: column;
        align-items: center;
  }

  .solutions.Auto .img {
    width: 100%;
    order: 2;
  }

  .solutions.Auto .img img {
    max-width: 100%;
  }

  .solutions.Auto .video {
    width: 100%;
  }

  .solutions.Auto .SAContent .context {
    font-size: var(--discrSize) ;
    line-height: 24px;
    margin-bottom: 1.5rem;
  }
}

/* Values Mobile */
@media (max-width: 720px) {
  .valeurs-section {
    flex-direction: column;
    padding: 30px 20px;
  }

  .valeurs-gauche {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .valeurs-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .valeurs-row:nth-child(2) {
    margin-left: 0;
  }

  .valeur-box {
    min-width: 110px;
    margin-bottom: 12px;
    flex: 0 0 calc(50% - 6px);

  }

  .valeurs-droite {
    margin-top: 30px;
    align-items: center;
    text-align: center;
  }

  .valeurs-btn {
    align-self: center;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .services-track .service-card {
    flex: 0 0 78%;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .solutions.Auto {
    padding: 1.5rem 0.5rem;
    gap: 1.5rem;
  }

  .solutions.Auto .SAContent .context {
    font-size: var(--discrSize) ;
    line-height: 22px;
    margin-bottom: 1.25rem;
  }

  .solutions.Auto .btn-box {
    margin-top: 1.5rem;
  }

  .solutions.Auto .thm-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    top:-20px
  }
}


/** louhab code foor valeur section **/

/* For very small screens, adjust tooltip width */
@media (max-width: 480px) {
  .valeur-box::after {
    max-width: 200px;
    font-size: 0.85em;
    padding: 10px 14px;
  }


}

/* Touch-friendly hover for mobile devices */
@media (hover: none) and (pointer: coarse) {
  .valeur-box {
    -webkit-tap-highlight-color: transparent;
  }

  /* Alternative: show on active/focus for better mobile experience */
  .valeur-box:active::after,
  .valeur-box:active::before,
  .valeur-box:focus::after,
  .valeur-box:focus::before {
    opacity: 1;
    visibility: visible;
  }

}
.section1_descriptionindex {
    font-size: var(--discrSize);
    color: #1a1a1a;
    margin: 0 auto;
    text-align: center;
    font-family: "PoppinsMedium";
}
