/*
Theme Name: Divi-child
Description: Theme enfant de Divi. Vous pouvez maintenant effectuer vos modifications en toute sécurité.
Author: WPMarmite
Author URI: https://wpmarmite.com
Template: Divi
Version: 1.0
*/

/* Fonts */
@font-face {
  font-family: "Roboto";
  src: url("./assets/fonts/Roboto-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("./assets/fonts/Roboto-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("./assets/fonts/Roboto-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("./assets/fonts/Roboto-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body { font-family: "Roboto", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

#page-container { padding-top: 0 !important; }

/* ==============================
   HEADER
================================*/
.header-custom{
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  background: #fff;
  transition: min-height .25s ease, box-shadow .25s ease, padding .25s ease;
  will-change: min-height;
}
body.admin-bar .header-custom { top: 32px; }
@media (max-width: 782px){ body.admin-bar .header-custom { top: 46px; } }

.header-custom .container{
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex: 1;
  transition: transform .25s ease;
  transform-origin: center center;
}

.header-custom .logo { flex: 0 0 auto; }
.header-custom .logo a { display: flex; align-items: center; }
.header-custom .logo svg,
.header-custom .logo img{
  display: block;
  height: clamp(60px, 6vw, 80px);
  width: auto;
  transition: height .25s ease;
}

/* ==============================
   MENU
================================*/
.menu-header { flex: 1 1 auto; min-width: 0; }
.menu-header .nav-menu{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
  transition: gap .25s ease;
}
.menu-header .nav-menu > li { flex: 0 1 auto; min-width: 0; display: flex; }
.menu-header .nav-menu > li > a{
  display: inline-flex;
  align-items: center;
  position: relative;
  padding-bottom: 8px;
  height: auto;
  line-height: 1.2;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 500;
  color: #7F8083;
  text-decoration: none;
  white-space: nowrap;
  transition: font-size .25s ease, height .25s ease, padding .25s ease, background .25s ease, color .25s ease;
}
.menu-header .nav-menu > li:last-child > a{
  background: #75B62C;
  color: #fff;
  font-weight: 600;
  height: clamp(36px, 4vw, 42px);
  padding: 0 clamp(12px, 1.4vw, 18px);
}

/* Lien actif (hors "Contact") */
.menu-header .nav-menu > li:not(:last-child).current-menu-item > a,
.menu-header .nav-menu > li:not(:last-child).current_page_item > a,
.menu-header .nav-menu > li:not(:last-child).current-menu-ancestor > a { text-decoration: none; }
.menu-header .nav-menu > li:not(:last-child).current-menu-item > a::after,
.menu-header .nav-menu > li:not(:last-child).current_page_item > a::after,
.menu-header .nav-menu > li:not(:last-child).current-menu-ancestor > a::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 3px;
  background: #75B62C;
  border-radius: 2px;
  transition: width .4s ease;
}
.menu-header .nav-menu > li:not(:last-child).active-underline > a::after { width: 36px; }

/* ==============================
   BURGER — overlay plein écran
================================*/
.menu-toggle{
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: none;
  background: none; border: 0; padding: 0; margin: 0;
  flex-direction: column; justify-content: center; gap: 7px;
  z-index: 1001; -webkit-tap-highlight-color: transparent;
}
.menu-toggle .bar{
  width: 26px; height: 2.5px; background: #2AA0D9; border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
@media (min-width: 992px){ .menu-toggle { display: none !important; } }

@media (max-width: 991.98px){
  .menu-toggle { display: flex; }

  .header-custom .menu-header{
    position: fixed; inset: 0; z-index: 999;
    display: grid; place-items: center;
    background: #fff;
    transform: translateX(100%); opacity: 0; pointer-events: none;
    transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .3s ease;
    padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
  }
  .header-custom.menu-open .menu-header{
    transform: translateX(0); opacity: 1; pointer-events: auto;
  }

  .header-custom .menu-header .nav-menu{
    flex-direction: column; align-items: center; justify-content: center;
    gap: 22px; text-align: center; width: min(90vw, 520px);
  }
  .header-custom .menu-header .nav-menu > li > a{
    font-size: clamp(20px, 3.6vw, 28px); line-height: 1.25; color: #7F8083; padding: 8px 0;
  }
  .header-custom .menu-header .nav-menu > li:last-child > a{
    background: none; color: #7F8083; border-radius: 0; height: auto; padding: 8px 0;
  }
  .header-custom .menu-header .nav-menu > li > a::after { display: none; }

  .header-custom .menu-header .nav-menu > li{
    opacity: 0; transform: translateY(6px);
    transition: opacity .4s ease, transform .4s ease;
  }
  .header-custom.menu-open .menu-header .nav-menu > li { opacity: 1; transform: none; }
  .header-custom.menu-open .menu-header .nav-menu > li:nth-child(1){ transition-delay: .05s; }
  .header-custom.menu-open .menu-header .nav-menu > li:nth-child(2){ transition-delay: .10s; }
  .header-custom.menu-open .menu-header .nav-menu > li:nth-child(3){ transition-delay: .15s; }
  .header-custom.menu-open .menu-header .nav-menu > li:nth-child(4){ transition-delay: .20s; }
  .header-custom.menu-open .menu-header .nav-menu > li:nth-child(5){ transition-delay: .25s; }
  .header-custom.menu-open .menu-header .nav-menu > li:nth-child(6){ transition-delay: .30s; }

  .header-custom.menu-open .menu-toggle .bar:nth-child(1){ transform: translateY(10px) rotate(45deg); }
  .header-custom.menu-open .menu-toggle .bar:nth-child(2){ opacity: 0; }
  .header-custom.menu-open .menu-toggle .bar:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }
}

/* Scroll lock quand le menu est ouvert */
.no-scroll { overflow: hidden !important; height: 100%; }

/* ==============================
   SHRINK AU SCROLL
================================*/
.header-custom.is-sticky { min-height: 110px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.header-custom.is-sticky .container { transform: scale(.9); }
@media (max-width: 991.98px){ .header-custom.is-sticky .container { transform: none; } }

/* ==============================
   FOOTER
================================*/
.footer-custom{
  background: #fff;
  padding: 48px 20px 28px;
  color: #7F8083;
  font-weight: 500;
}

.footer-custom .wrapp-footer{
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .9fr 1fr 1fr;
  align-items: center;
  gap: 32px;
}

.footer-custom .column-footer.left{ display: flex; justify-content: center; }
.footer-custom .column-footer.left svg,
.footer-custom .column-footer.left img{
  display: block;
  height: 140px;
  width: auto;
}

.footer-custom .column-footer.center ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-custom .column-footer.center a{
  text-decoration: none;
  color: #7F8083;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 500;
}

.footer-custom .column-footer.right p{
  margin: 0 0 10px;
  line-height: 1.35;
  font-size: 16px;
}
.footer-custom .column-footer.right a{
  color: #7F8083;
  text-decoration: none;
}

/* Téléphone en vert */
.footer-custom .green-coord{
  color: #75B62C !important;
  font-weight: 700;
  font-size: 26px;
}

/* Bouton "Suivez-nous" (lien + SVG inline) */
.footer-custom .btn-follow-us{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  margin-top: 8px;
  text-decoration: none;
  color: #75B62C !important;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: 1px solid #75B62C;
  background: transparent;
  line-height: 1;
}
.footer-custom .btn-follow-us svg{ width: 22px; height: 22px; display: block; }
.footer-custom .btn-follow-us svg .vert{ fill: #75B62C !important; }
.footer-custom .btn-follow-us svg .blanc{ fill: #fff !important; }

/* Bandeau d’infos */
.footer-custom .wrapp-infos{
  max-width: 1280px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .2px;
  text-transform: uppercase;
}
.footer-custom .wrapp-infos a{
  color: #7F8083;
  text-decoration: none;
}

/* ==============================
   RESPONSIVE (≤ 991.98px)
================================*/
@media (max-width: 991.98px){
  .footer-custom{ padding: 32px 16px 20px; }
  .footer-custom .wrapp-footer{
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .footer-custom .column-footer.left svg,
  .footer-custom .column-footer.left img{ height: 110px; }
  .footer-custom .column-footer.center ul{
    align-items: center;
    gap: 10px;
  }
  .footer-custom .column-footer.center a{ font-size: 16px; }
  .footer-custom .column-footer.right p{
    font-size: 15px;
    margin-bottom: 8px;
  }
  .footer-custom .green-coord{ font-size: 22px; }
  .footer-custom .btn-follow-us{ margin-left: auto; margin-right: auto; }
  .footer-custom .wrapp-infos{
    margin-top: 16px;
    font-size: 11px;
  }
}

/* Motion-safe (global) */
@media (prefers-reduced-motion: reduce){
  .header-custom,
  .header-custom .logo svg,
  .header-custom .logo img,
  .menu-header .nav-menu,
  .menu-header .nav-menu > li,
  .menu-header .nav-menu > li > a,
  .menu-toggle .bar,
  .header-custom .menu-header,
  .header-custom .menu-header .nav-menu > li { transition: none !important; }
}
