/*
  Fichier principal définissant header & footer.
  Chargé via functions.php
  Dépendances :
  - base.css
  - layout.css
  - components.css
  - breakpoints.css
  - home.css (seulement si front-page)
  - diagnostic.css (template page diagnostic territorial)
  - formations.css
  - conception-outils.css
  - page.css
*/

/*======== HEADER AND MENU ========*/
.site-header {
  padding: 2rem 0;
  background: var(--color-bg);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 60px;
}

.main-nav {
  display: flex;
}

.main-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-menu > .menu-item {
  position: relative;
}

.main-menu a {
  text-decoration: none;
  color: var(--color-text);
  padding: 0.5rem 1rem;
  display: block;
  font-weight: 600;
  border-radius: 999px;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
  background: var(--color-active-item);
}

.site-header .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  list-style: none;
  z-index: 20;
}

.menu-item-has-children:hover .sub-menu {
  display: block;
}

/* Hide burger by default */
.burger {
  display: none;
}


/*======== FOOTER ========*/
.site-footer {
  position: relative;
  color: var(--color-bg);
  z-index: 0;
  padding: 3rem 0;
  margin-top: 8rem;
}

.site-footer .container {
  position: relative;
  z-index: 2;
}

.site-footer .footer-bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-text);
  z-index: 0;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.site-footer .logo img {
  height: 40px;
  width: auto;
  display: block;
}

.footer-brand p, .footer-links p, .footer-links a {
  font-size: var(--font-size-small);
}

.footer-nav {
  margin-left: auto; /* Push le bloc nav à droite */
}
  .footer-nav-list {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 2rem;

  }
  .footer-nav-list a {
    font-weight: 400;
    color: var(--color-bg);
    text-decoration: none;
      background-image: linear-gradient(currentColor, currentColor);
      background-position: center bottom;
      background-repeat: no-repeat;
      background-size: 0% 1px;
      transition: background-size 0.3s ease;
  }
    .footer-nav-list a:hover,
    .footer-nav-list a:focus {
      text-decoration: none;
      background-size: 100% 1px;
    }
  .footer-nav-list .sub-menu {
    position: absolute;
    margin-top: 0.5rem;
    padding-left: 1rem;
    list-style-type: none;
  }

.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  margin-top: 3rem;
  font-size: var(--font-size-small);
  gap: 2rem;
}
  .footer-links p,
  .footer-links a {
    margin: 0;
    padding: 0;
    line-height: 1;
    text-decoration: none;
      background-image: linear-gradient(currentColor, currentColor);
      background-position: center bottom;
      background-repeat: no-repeat;
      background-size: 0% 1px;
      transition: background-size 0.3s ease;
    color: var(--color-primary);
  }
  .footer-links a:hover,
  .footer-links a:focus {
    text-decoration: none;
    background-size: 100% 1px;
  }
  .footer-links p {
    margin-left: auto;
  }

  .footer-wave {
    position: absolute;
    bottom: calc(70% - 3rem);
    left: 0;
    width: 100%;
    height: auto;
    overflow: hidden;
    line-height: 0;
    z-index: -1;
    pointer-events: none;
    user-select: none;
  }
    .footer-wave svg {
      display: block;
      width: 100%;
      height: auto;
    }
    .footer-wave svg path {
      fill: var(--color-bg-alt);
    }

    .footer-landscape {
      position: absolute;
      bottom:93%;
      right: 0;
      width: 100%;
      max-width: 200px;
      height: auto;
      z-index: 1;
      pointer-events: none;
      user-select: none;
    }


/*========================TEMPLATE PARTS===================*/
/*==== SECTION PROJETS ====*/
.projects {
  padding: 6rem 0;
  background: var(--color-bg);
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.projects-header h3 {
  color: var(--color-text);
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--color-bg-alt);
  border-radius: 2rem;
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.project-card a {
  text-decoration: none;
}

.project-card-inner {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-thumb img {
  border-radius: 1.5rem 1.5rem 8px 8px;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-title {
  color: var(--color-caption);
  font-size: 1.4rem;
}

.project-description {
  color: var(--color-text);
}

.mobile-btn {
  display:none;
}

/*==== SECTION CONTACT CTA ====*/
.contact-block {
  padding: 4rem 0;
  background-color: var(--color-bg);
  position: relative;
  overflow: hidden;
}

.contact-box {
  background: var(--color-caption);
  border-radius: 4rem;
  padding: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  max-width: 76%;
  margin: 0 auto;
}

.contact-content {
  flex: 1 1 60%;
  color: var(--color-bg);
}

.contact-title {
  margin-bottom: 2rem;
}

.contact-infos {
  font-style: normal;
  color: var(--color-bg);
}

.contact-infos a {
  color: var(--color-bg);
  text-decoration: underline;
}

.contact-cta {
  flex-shrink: 0;
}

      /*==== DECOR SVG CONTACT ====*/
      @keyframes floaty {
        0%   { transform: translateY(0px) rotate(0deg) scale(1.00);}
        50%  { transform: translateY(-8px) rotate(1deg) scale(1.04);}
        100% { transform: translateY(0px) rotate(0deg) scale(1.00); }
      }

      .contact-decor {
        position: absolute;
        inset: 0;
        pointer-events: none;
      }

      .contact-decor svg {
          animation: floaty 6s ease-in-out infinite;
          will-change: transform;
      }

      .contact-decor .wheel1 {
        position: absolute;
        top: 20%;
        right: 25%;
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 0;
      }
        .contact-decor .wheel1 svg {
            width: 6rem;
            height: auto;
            display: block;
            fill: var(--color-accent-1);
            animation-duration: 7.3s;
            animation-delay: 1.2s;
        }

        .contact-decor .wheel2 {
          position: absolute;
          top: 44%;
          right: 4%;
          display: flex;
          flex-direction: column;
          align-items: center;
          z-index: 0;
        }
          .contact-decor .wheel2 svg {
              width: 3rem;
              height: auto;
              display: block;
              fill: var(--color-accent-5);
              animation-duration: 6.2s;
              animation-delay: 0.7s;
          }

        .contact-decor .wheel3 {
          position: absolute;
          top: 60%;
          left: 20%;
          display: flex;
          flex-direction: column;
          align-items: center;
          z-index: 0;
        }
          .contact-decor .wheel3 svg {
              width: 3rem;
              height: auto;
              display: block;
              fill: var(--color-bg-alt);
          }

        .contact-decor .mountain1 {
          position: absolute;
          top: 44%;
          left: 8%;
          display: flex;
          flex-direction: column;
          align-items: center;
          z-index: 0;
        }
          .contact-decor .mountain1 svg {
              width: 6rem;
              height: auto;
              display: block;
              fill: var(--color-accent-4);
              animation-duration: 4.9s;
              animation-delay: 2.0s;
          }

        .contact-decor .mountain2 {
          position: absolute;
          bottom: 10%;
          right: 32%;
          display: flex;
          flex-direction: column;
          align-items: center;
          z-index: 2;
        }
          .contact-decor .mountain2 svg {
              width: 6rem;
              height: auto;
              display: block;
              fill: var(--color-accent-2);
          }

        .contact-decor .rectangle1 {
          position: absolute;
          top: 16%;
          left: 26%;
          display: flex;
          flex-direction: column;
          align-items: center;
          z-index: 2;
        }
          .contact-decor .rectangle1 svg {
              width: 6rem;
              height: auto;
              display: block;
              fill: var(--color-accent-3);
          }


          .bg-full {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            min-height: 100%;
            background-color: var(--color-text);
            z-index: -1;
          }

          /* hero sur page Diagnostic territorial + page Formations */
          .hero-img img {
            display: block;
            max-width: 100%;
            height: auto;
            border-radius: 4rem;
          }

