/*   
Theme Name: CDVI 2025 Minisite
Theme URI: https://www.francois-babin.com
Description: Thème CDVI pour les sites auxiliaires
Author: François BABIN
Author URI: https://www.francois-babin.com
Version: 1.0b9
.
TOus droits réservés CDVI Groupe.
.
*/
:root {
    --blue: #00457C;
/*    --red: #d80000;*/
    --white: #ffffff;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: Verdana, sans-serif;
    font-size:14px;
    color:black;
  }

  h1{
    font-weight: bold;
    font-size:28px;
    color: var(--blue);
  }
  h2{
    font-weight: bold;
    font-size:24px;
    color: var(--blue);
    margin-bottom:1em;
  }
  h3{
    font-weight: bold;
    font-size:22px;
    color: var(--blue);
  }
  h4{
    font-weight: bold;
    font-size:20x;
    color: var(--red);
  }
  h5{
    font-weight: bold;
    font-size:18px;
    color: var(--red);
  }
  
  a{
    text-decoration: none;
    color:black;
  }

  .topbar {
    background: var(--blue);
    color: var(--white);
    padding: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logos {
    display: flex;
    align-items: center;
    gap: 3em;
    margin-left: 2em;
  }
  .cdvi_logo{
    width:150px;
    height: auto;;
  }

  .divider {
    width: 1px;
    height: 20px;
    background: white;
  }
  
  .burger {
    display: none;
    font-size: 2em;
    background: none;
    border: none;
    color: white;
  }

  .topbar .searchbar {
    margin-right:2em;
  }

  .topbar .search {
    width: 100%;
    padding: 0.5em;
    margin: 1em 0 1em 0;
    border: none;
    border-bottom: 1px solid white;
    background: transparent;
    color: white;
    background-image: url("images/loupe.svg");
    background-repeat: no-repeat;
    background-position-x: right;
    background-size: 22px;
  }
  .topbar .search-form {
    display:inline-block;
  }

  .topbar .langs {
  display: inline-block;
  margin-left:1em;
  }
  .lang-switcher-custom {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-family: sans-serif;
    font-size: 11px;
  }
  

  .lang-switcher-custom .lang-code {
    color: white;
    text-decoration: none;
    font-weight: normal;
    transition: 0.3s ease;
  }
  
  .lang-switcher-custom .lang-code.current-lang {
    border: 1px solid white;
    border-radius: 50%;
    padding: 0.7em 0.7em;
  }
  


  /* Menu principal */
  .nav-desktop {
    background: var(--red);
    position: relative;
  }

  .nav-desktop ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    padding: 0.75em 0;
    margin: 0;
  }

  .nav-desktop li {
    position: relative; 
  }

  .nav-desktop li a {
    font-size:20px;
    color: white;
    text-decoration: none;
    font-weight: normal;
    padding: 0 1em;
    text-align: center;
    min-width: 120px;
    display: inline-block;
  }

  .nav-desktop li.active a {
    font-weight: bold;
  }

  .nav-desktop ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;  
    transform: translateX(-50%);  
    background: var(--red);
    padding: 0;
    margin: 0;
    list-style: none;
    min-width: 200px;
    z-index: 1000;
    padding-top:1em;
  }


  .nav-desktop ul ul li {
    display: block;
    width: 100%;
  }

  .nav-desktop ul ul li a {
    display: block;
    padding: 1em;
    color: white;
    font-weight: normal;
  }

  /* Effet au survol */
  .nav-desktop ul ul li a:hover {
    font-weight: bold;
    /*background: rgba(255, 255, 255, 0.1);*/
  }

  /* Afficher le sous-menu au survol */
  .nav-desktop li:hover > ul {
    display: block;
  }
  .nav-desktop li:hover a {
    font-weight: bold;
  }

  .nav-desktop li:hover li a {
    font-weight: normal;
  }

  
  .pagination {
    margin-top: 1em;
  }
  
  .pagination .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 4px;
  }
  
  .pagination .dot.active {
    background: var(--blue);
  }
  
  main {
    padding: 2em 1em;
  }
  .oblique{
    clip-path:polygon(0 0, 100% 0, 100% 100%, 0 95.76%);
  }
  .banner{
    background-color:grey;
    background-size: cover;
    background-position: center center;
    width:100%;
    min-height:200px;
    color:white;
    text-align: center;
    padding:3em;
    clip-path:polygon(0 0, 100% 0, 100% 100%, 0 95.76%);

  }
  .banner h2{
    color:white;
    
  }
  .section-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 2em 0;
    align-items: center; 
  }

  .section-cta h2{
    color: var(--red);
  }
  
  .section-cta.reverse {
    flex-direction: row-reverse;
  }

  .section-buttons {
    display: block;    
    margin-left:auto;
    margin-right:auto;
    text-align: center;
    margin-bottom:5em;
  }
  .section-buttons a{
    display: inline-block;
    margin: 0px 2em 0 2em;

  }

  .section-cta .text, .section-cta .content-image, .section-cta .content-media, .key-prod-image , .cat-summary {
    flex: 1 1 45%;
    margin: 1em;
  }
  
  .content-image, .content-media, .key-prod-image, .cat-image {
    background: #ccc;
    height: 400px;
    background-size:     cover;
    background-repeat:   no-repeat;
    background-position: center center; 
  }

  .content-media.youtube-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
  }

  .content-media.youtube-video iframe {
    width: 100%;
    height: 100%;
    border: none;
  }


  .cat-image {
    margin-top:20px;
    height:400px;
  }
  
  .cta {
    background: none;
    border: 1px solid var(--red);
    color: var(--red);
    padding-left:5.5em;
    padding-right:5.5em;
    padding-top:1em;
    padding-bottom:1em;
    margin-top: 1em;
    cursor: pointer;
    border-radius: 30px;
    font-weight:bold;
    margin-left: auto;
    margin-right: auto;
    display: block;
    text-transform: uppercase;
  }
  .product:hover .key-prod-image{
    opacity: 0.5;
    transition: opacity 0.3s;
    }
  .product:hover .cta,.cta:hover{
    background: var(--red);
    color:white;
  }

  .cta.small {
    font-size: 0.8em;
  }
  
  .key-products {
    text-align: center;
  }
  
  .key-products h2 {
    color: var(--blue);
    margin-bottom: 1em;
  }
  .key-products .cta{
    display:block;
    margin-left:auto;
    margin-right:auto;
  }
  
  .related-products h2{
    margin-top:5em;
    margin-left:.5em;
  }
  .products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
  }

  .products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
  }
  .product {
    flex: 1 1 150px;
    text-align: center;
  }

  .product .prod-title{
    color: var(--red);
    font-weight: bold;
    text-transform: uppercase;
    display: block;
  }

  .product-wrapper {
    display: flex;
    justify-content: space-between;
    margin-left:10px;
    margin-right:10px;
   padding-top:50px; 
  }
  
  .product-main,
  .visuals {
    /*border: 3px solid black;*/
    padding: 15px;
    background-color: #fff;
  }
  
  .product-main {
    width: 47%;
    min-height: 500px;
    }
  
  .visuals {
    width: 47%;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    text-align: center;
    display: block;
    }

    .visuals, .visuals img{
      height: 400px;
    }
    .visuals img{
      margin-top:1em;
      width:auto;
      display:inline-block;
    }

    .swiper-pagination{
        position: relative!important;
        margin-top: 20px;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        position: static !important;
        margin: 0 !important;
        width: auto !important;
        height: 40px !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }
    .swiper-button-prev{
      margin-right:10%!important;
    }
    .swiper-button-prev::after,.swiper-button-next:after{
      content:none!important;
    }
    .visuals .custom-zoomist-zoomer .swiper-button-prev svg,
    .visuals .custom-zoomist-zoomer .swiper-button-next svg{
      height:40px;
      width: auto;
    }

    .swiper-button-next{
      margin-left:10%!important;
    }
    .swiper-container-wrapper {
      position: relative;
      width: 100%;
      max-width: 100%; /* ou fixe si souhaité */
    }
    
    .swiper-container-wrapper .swiper{
      height:700px;
    }
    .swiper {
      width: 100%;
      height: auto;
    }
    
    /* Position des boutons */
    .home-swiper-button-prev,
    .home-swiper-button-next {
      position: absolute;
      top: 45%;
      transform: translateY(-45%);
      z-index: 10;
      background: none;
      border: none;
      padding: 0;
      width: 50px;
      height: 50px;
      cursor: pointer;
      color: white; /* couleur de la flèche */
    }
    
    /* Côtés */
    .home-swiper-button-prev {
      left: 20px;
    }
    
    .home-swiper-button-next {
      right: 20px;
    }

    .custom-zoomist-zoomer {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-top: 15px;
    }

    .visuals .zoomist-wrapper{
      background-color:white!important;
    }
    .visuals .custom-zoomist-zoomer input,.visuals .custom-zoomist-zoomer button  svg{
      height:30px;
      width:auto;
      margin:0 5px 0 5px;
    }
    .visuals .custom-zoomist-zoomer button{
      background:none;
      border:none;
      cursor: pointer;

    }
    
  .product-main .title{
      font-weight: bold;
      margin-bottom:1em;
    }
  .product-main .reference{
      color:#5c5c5b;
      margin-bottom:1em;
    }
  .product-main .description{
      margin-bottom:3em;
    }
  
  .product-main .ctas{
    text-align: center;
  }
  .product-main .cta{
    display:inline-block;
    margin:1em;
  }
    
  .accordion {
    overflow: hidden;
    margin-top:2em;
    margin-bottom:2em;
  }
  
  .accordion-title {
    width: 100%;
    text-align: left;
    padding: 1em 1em 1em 0;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--blue);
    font-weight: bold;;
    background-color: white;
    border-bottom: 1px solid var(--blue);
  }
  
  .accordion-content {
    display: none;
    padding: 1em 1em 1em 0;
    background: #fff;
  }

  .accordion-content .spec{
    display:table;
    width:100%;
  }
  .accordion-content .spec .specname,.accordion-content .spec .specvalue{
    display:table-cell;
    width:50%;
    padding:1em;
    border: solid 1px white;
    color: var(--blue);
  }

  .specname{
    background-color: #E9ECEE;
  }
  .specvalue{
    font-weight: bold;
  }

  .downloads{
    margin-top:4em;
  }
  .downloads a.dlbtn{
    display:block;
    border:1px solid var(--red);
    background: none;
    color: var(--red);
    padding:1em;
    margin-top: 1em;
    cursor: pointer;
    border-radius: 5px;
    font-weight:bold;
    margin-left: auto;
    margin-right: auto;
  }
  .downloads a.dlbtn:hover{
    color:white;
    background-color: var(--red);
  }



  .wpforms-container{
    margin-left:auto!important;
    margin-right:auto!important;
    width:100%!important;
    max-width:800px!important;
  }
  .wpforms-field-label{
    color: var(--red)!important;
  }

  .wpforms-field input[type=text],.wpforms-field input[type=email]{
    border:none!important;
    border-bottom:solid 1px grey!important;
  }
  .wpforms-container .wpforms-submit{
    background: none!important;
    border: 1px solid var(--red)!important;
    color: var(--red)!important;
    padding-left:5.5em!important;
    padding-right:5.5em!important;
    padding-top:1em!important;
    padding-bottom:2em!important;
    margin-top: 1em!important;
    cursor: pointer!important;
    border-radius: 30px!important;
    font-weight:bold!important;
    margin-left: auto!important;
    margin-right: auto!important;
    display: block!important;
    line-height:1em!important;
  }
  .wpforms-container .wpforms-submit:hover{
    background-color: var(--red)!important;
    color: white!important;
  }



  footer {
    background: var(--blue);
    color: white;
    padding: 2em 1em;
    text-align: center;
  }
  
  .footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4em;
    margin-bottom: 1em;
  }
  
  .footer-logos .secondary img, .topbar .logos .logo.secondary img, .mobile-logo img{
    max-height:60px;
    width:auto;
  }
  
  ul.footer-nav {
    display: flex;
    flex-wrap: wrap;
  }
  
  footer ul, footer li{
    margin-top:2em;
    list-style:none;
    padding-left:0;
  }
  footer li{
    flex-grow: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    width: calc(33.33% - 14px); 
    margin-bottom: 1em;
  }


  .footer-nav a {
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 0.25rem 0;
  }
  
  .footer-widgets{
    margin-top:3em;
  }
  .newsletter {
    margin-top:3em;   
  }

  .newsletter a {
    color:white;
    font-weight: bold;
    font-size:20px;
  }

  footer button.cta{
    color:white;
    border-color: white;
    font-size:20px;
  }
  
  footer .cta:hover{
    background:white;
    color:var(--blue);
  }

  /* Mobile Menu */
  
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--red);
    color: white;
    padding: 2em 1em;
    display: none;
    flex-direction: column;
    z-index: 1000;
  }
  
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-header div {
    flex: 1 1 0;
  }
  .mobile-logo.withlangs{
    text-align: center;
  }
  .mobile-menu ul {
    list-style: none;
    padding: 2em 0;
  }
  
  .mobile-menu li {
    padding: 0.8em 0;
    font-size: 20px;
    text-align: center;
    color:white;
  }

  .mobile-menu li a{
    color:white;
  }

  .mobile-menu li.active {
    font-weight: bold;
  }
  
  .mobile-menu .search {
    width: 100%;
    padding: 0.5em;
    margin: 1em 0;
    border: none;
    border-bottom: 1px solid white;
    background: transparent;
    color: white;
    background-image: url("images/loupe.svg");
    background-repeat: no-repeat;
    background-position-x: right;
    background-size: 22px;
  }
  
  .mobile-menu ul.sub-menu{
    display:none;
    width:100%;
    padding:1em 0 0 0;
  }

  .mobile-menu .submenu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    margin-left: 10px;
    cursor: pointer;
    vertical-align: middle;
  }
  
  /* Alignement lien + bouton */
  .mobile-menu li.menu-item-has-children {
    display: block;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }
  
  /* Sous-menu avec indentation */
  .mobile-menu ul.sub-menu {
    display: none;
    padding-left: 1em;
  }
  
  .mobile-menu ul.sub-menu li {
    font-size: 18px;
    padding: 0.5em 0;
  }
  

  #closeMenu{
    font-size: 2rem;
    cursor: pointer;
    text-align: end;
  }
  .socials {
    display: flex;
    justify-content: center;
    gap: 5em;
    margin-top: 2em;
  }

  .socials a img{
    color:white;
    width:auto;
    height: 25px;
  }

  footer .socials {
    margin-top:60px;
  }
  footer .socials a img{
    height: 15px;
  }


  /* SEARCH */
  .search-results{
    margin:1em;
  }

  .search-results h1{
    margin-bottom: 2em;
  }

  .search-results ul{
    margin-bottom:3em;
  }
  .search-results li{
    margin: 1em;
  }

  /* Responsive */
  
  @media (max-width: 768px) {
    .logos{
      margin-left: 0px;  
    }
    .nav-desktop {
      display: none;
    }
  
    .burger {
      display: block;
    }
    .searchbar, .langs{display:none;}
    .section-cta {
      flex-direction: column;
    }
  
    .footer-items {
      grid-template-columns: repeat(2, 1fr);
    }

    .swiper-container-wrapper .swiper{
      height:300px;
    }

    .product-wrapper{
      display:block;
    }
    .product-wrapper .visuals, .product-wrapper .product-main{
      width:100%;
    }
    .product-wrapper .product-main{
      margin-top:100px;
    }
    .product-wrapper .visuals{
      position: relative;
    }
    .product-wrapper .visuals img{
      margin-top:0;
      max-width: 100%;
      height: auto;
    }

    .key-products .products {
      display: flex;
      flex-direction: column;
      gap: 1em; /* espace entre les produits */
    }
  
    .key-products .product {
      width: 100%;
    }
  
    .key-products .key-prod-image {
      height: 400px;
      background-size: cover;
      background-position: center;
    }

    .footer-nav ul {
      grid-template-columns: repeat(1, 1fr); /* 2 colonnes en mobile */
    }    
    footer li{
      width: 100%; 
      margin-bottom:1em;
      margin-top:0;
    }
    .home-swiper-button-prev,
    .home-swiper-button-next {
      height:25px;
      width:25px;
    }

    .section-cta,
    .section-cta.reverse {
      flex-direction: column !important;
    }
  
    .section-cta .text,
    .section-cta .content-image {
      flex: none;
      width: 100%;
      margin: 0 0 1em 0;
    }
  
    .section-cta .content-image,
    .section-cta .content-media {
      height: 250px; 
      background-size: cover;
      background-position: center;
    }
  }
  



  /* Menu principal horizontal avec 3 sous-niveaux (4 niveaux total) */






/* Sous-menus (niveaux 2 et 3) */
.nav-desktop .sub-menu {
  position: absolute;
  top: 100%;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  flex-direction: column; /* Override du flex du parent */
}

/* Affichage des sous-menus au survol */
.nav-desktop li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
}

.nav-desktop .sub-menu li:hover > .sub-menu {
  transform: translateY(0);
}

/* Items des sous-menus */
.nav-desktop .sub-menu li {
  width: 100%;
}

/* Sous-menus de niveau 3 et 4 */
.nav-desktop .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 0;
}


.nav-desktop .menu-item-has-children {
  /* Styles pour les items avec enfants */
}

