:root {
      --green: #1D7E53;
      --green-dark: #123F2E;
      --green-header: #123F2E;
      --green-section-soft: #527A62;
      --green-section-medium: #2F6549;
      --gold: #FDCA4E;
      --blue: #094997;
      --blue-light: #3E8FED;
      --text: #1a1a1a;
      --text-muted: #555;
      --bg: #ffffff;
      --bg-light: #f5f7fa;
      --border: #e2e8f0;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      color: var(--text);
      line-height: 1.6;
      background: var(--bg);
      padding-top: calc(var(--site-header-offset, 124px) + 18px);
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    img {
      max-width: 100%;
      display: block;
    }

    .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* ========== HEADER ========== */
    .site-header-wrap {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      background: transparent;
    }

    .site-header-wrap::after {
      content: "";
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      bottom: -9px;
      width: min(calc(100% - 6px), 1920px);
      height: 13px;
      border-radius: 999px;
      background:
        linear-gradient(180deg,
          #fff6c9 0%,
          #ffe89a 14%,
          #f9d35f 38%,
          #d6a83a 62%,
          #b87d19 100%);
      border: 1px solid rgba(133, 88, 10, 0.35);
      box-shadow:
        inset 0 2px 2px rgba(255,255,255,0.65),
        inset 0 -2px 3px rgba(104, 67, 0, 0.30),
        0 5px 10px rgba(67, 46, 4, 0.25);
      pointer-events: none;
    }

    .top-bar {
      background: #0B2F22;
      color: var(--gold);
      font-size: 0.875rem;
      padding: 8px 0;
    }

    .top-bar .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
    }

    .top-bar a {
      color: inherit;
      opacity: 1;
    }

    .top-bar a:hover {
      opacity: 1;
      text-decoration: underline;
    }

    header,
    .site-header {
      --header-green: var(--green-header);
      --header-gold: var(--gold);
      background: var(--header-green);
      border-bottom: 1px solid rgba(253, 202, 78, 0.3);
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .header-main {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 0;
      gap: 20px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .logo-text {
      font-size: 1.6rem;
      font-weight: 700;
      color: var(--green);
      letter-spacing: -0.5px;
    }

    .logo-sub {
      font-size: 0.7rem;
      color: var(--text-muted);
      font-weight: 500;
      margin-top: -2px;
    }

    nav ul {
      display: flex;
      list-style: none;
      gap: 28px;
      align-items: center;
    }

    nav a {
      font-weight: 500;
      font-size: 0.95rem;
      color: var(--text);
      transition: color 0.2s;
    }

    nav a:hover,
    nav a.active {
      color: var(--green);
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 20px;
      border-radius: 6px;
      font-weight: 600;
      font-size: 0.9rem;
      transition: all 0.2s;
      border: none;
      cursor: pointer;
    }

    .btn-primary {
      background: var(--green);
      color: #fff;
    }

    .btn-primary:hover {
      background: var(--green-dark);
    }

    .btn-outline {
      background: transparent;
      border: 2px solid var(--green);
      color: var(--green);
    }

    .btn-outline:hover {
      background: var(--green);
      color: #fff;
    }

    .btn-blue {
      background: var(--blue);
      color: #fff;
    }

    .btn-blue:hover {
      background: #073a7a;
    }

    .mobile-menu-btn {
      display: none;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--text);
    }

    /* Couleurs du header inspirées de la référence Kintsugi. */
    header .logo-text,
    header nav a,
    header .mobile-menu-btn {
      color: var(--header-gold);
    }

    header .logo-sub {
      color: #f8f5e8;
    }

    header nav a:hover,
    header nav a.active {
      color: #ffe4a3;
    }

    header .btn-primary {
      background: transparent;
      box-shadow: inset 0 0 0 1px var(--header-gold);
    }

    header .btn-primary:hover {
      background: rgba(253, 202, 78, 0.12);
    }

    header .btn-primary.active,
    header .btn-primary:focus-visible {
      background: rgba(253, 202, 78, 0.12);
      box-shadow: inset 0 0 0 1px var(--header-gold), 0 0 0 2px rgba(253, 202, 78, 0.08);
    }

    /* ========== HERO ========== */
    .hero {
      background: linear-gradient(135deg, #f0f7f4 0%, #e8f0fa 100%);
      padding: 70px 0 80px;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 50px;
      align-items: center;
    }

    .hero h1 {
      font-size: 2.4rem;
      font-weight: 700;
      line-height: 1.25;
      color: var(--text);
      margin-bottom: 18px;
    }

    .hero h1 span {
      color: var(--green);
    }

    .hero p {
      font-size: 1.1rem;
      color: var(--text-muted);
      margin-bottom: 28px;
      max-width: 520px;
    }

    .hero-actions {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #fff;
      border: 1px solid var(--border);
      padding: 8px 14px;
      border-radius: 50px;
      font-size: 0.85rem;
      font-weight: 500;
      margin-bottom: 20px;
      color: var(--blue);
    }

    .hero-card {
      background: #fff;
      border-radius: 12px;
      padding: 28px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.08);
      border: 1px solid var(--border);
    }

    .hero-card h3 {
      font-size: 1.1rem;
      margin-bottom: 16px;
      color: var(--blue);
    }

    .hero-card ul {
      list-style: none;
    }

    .hero-card li {
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.95rem;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .hero-card li:last-child {
      border-bottom: none;
    }

    .hero-card li::before {
      content: "✓";
      color: var(--green);
      font-weight: 700;
    }

    /* ========== SECTIONS ========== */
    section {
      padding: 70px 0;
    }

    .section-title {
      text-align: center;
      margin-bottom: 48px;
    }

    .section-title h2 {
      font-size: 1.9rem;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .section-title p {
      color: var(--text-muted);
      max-width: 600px;
      margin: 0 auto;
    }

    /* ========== PRODUCTS ========== */
    .products {
      background: var(--bg-light);
    }

    .products-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 24px;
    }

    .product-card {
      background: #fff;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--border);
      transition: all 0.25s;
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    .product-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 30px rgba(0,0,0,0.08);
      border-color: var(--green);
    }

    .product-card img {
      width: 100%;
      height: 160px;
      object-fit: cover;
      background: #f1f5f9;
      display: block;
    }

    .product-card-body {
      padding: 20px 22px 24px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
    }

    .product-card h3 {
      font-size: 1.15rem;
      margin-bottom: 10px;
      color: var(--text);
    }

    .product-card p {
      font-size: 0.92rem;
      color: var(--text-muted);
      flex-grow: 1;
      margin-bottom: 16px;
    }

    .product-card a {
      color: var(--green);
      font-weight: 600;
      font-size: 0.9rem;
    }

    .product-card a:hover {
      text-decoration: underline;
    }

    /* ========== SERVICES ========== */
    .services-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 20px;
    }

    .service-item {
      text-align: center;
      padding: 30px 20px;
      background: #fff;
      border-radius: 10px;
      border: 1px solid var(--border);
    }

    .service-item .icon {
      width: 56px;
      height: 56px;
      margin: 0 auto 16px;
      background: linear-gradient(135deg, var(--green), var(--blue));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 1.3rem;
    }

    .service-item h3 {
      font-size: 1.05rem;
      margin-bottom: 8px;
    }

    .service-item p {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    /* ========== WHY US ========== */
    .why {
      background: var(--green-section-soft);
      color: #fff;
    }

    .why .section-title h2,
    .why .section-title p {
      color: #fff;
    }

    .why .section-title p {
      opacity: 0.85;
    }

    .why-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 28px;
    }

    .why-item h3 {
      font-size: 1.1rem;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .why-item p {
      opacity: 0.9;
      font-size: 0.95rem;
    }

    /* ========== CTA ========== */
    .cta {
      background: var(--green-section-medium);
      color: #fff;
      text-align: center;
      padding: 60px 0;
    }

    .cta h2 {
      font-size: 1.8rem;
      margin-bottom: 12px;
    }

    .cta p {
      opacity: 0.95;
      margin-bottom: 24px;
      max-width: 500px;
      margin-left: auto;
      margin-right: auto;
    }

    .cta .btn {
      background: #fff;
      color: var(--green);
    }

    .cta .btn:hover {
      background: #f0f0f0;
    }

    /* ========== FOOTER ========== */
    footer {
      background: var(--green-header);
      color: var(--gold);
      padding: 50px 0 25px;
      font-size: 0.9rem;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr 1fr;
      gap: 40px;
      margin-bottom: 40px;
    }

    .footer-brand .logo-text {
      color: var(--gold);
      margin-bottom: 12px;
    }

    .footer-brand p {
      margin-bottom: 16px;
      line-height: 1.7;
    }

    footer h4 {
      color: var(--gold);
      font-size: 0.95rem;
      margin-bottom: 16px;
      font-weight: 600;
    }

    footer ul {
      list-style: none;
    }

    footer li {
      margin-bottom: 10px;
    }

    footer a {
      color: var(--gold);
    }

    footer a:hover {
      color: #fff4c7;
    }

    .footer-bottom {
      border-top: 1px solid rgba(253, 202, 78, 0.28);
      padding-top: 20px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      font-size: 0.85rem;
    }

    /* ========== RESPONSIVE ========== */
    @media (max-width: 900px) {
      .hero-grid {
        grid-template-columns: 1fr;
      }

      .footer-grid {
        grid-template-columns: 1fr 1fr;
      }

      nav ul {
        display: none;
      }

      .mobile-menu-btn {
        display: block;
      }

      .hero h1 {
        font-size: 1.9rem;
      }
    }

    @media (max-width: 600px) {
      .footer-grid {
        grid-template-columns: 1fr;
      }

      .top-bar .container {
        justify-content: center;
        text-align: center;
      }
    }

@media (max-width: 900px) {
  #main-navigation.is-open ul { display: flex; position: absolute; left: 20px; right: 20px; top: calc(100% + 8px); flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: var(--green-header); border: 1px solid rgba(253,202,78,.3); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
  #main-navigation.is-open li { width: 100%; }
  #main-navigation.is-open a { display: block; padding: 10px 12px; }
  header .header-main { position: relative; }
}

/* Palette basse : progression du vert jusqu'au footer */
footer .footer-brand p,
footer .footer-bottom {
  color: #f5d97f;
}


@media (max-width: 900px) {
  .site-header-wrap::after {
    height: 11px;
    bottom: -8px;
    width: calc(100% - 8px);
  }
}

@media (max-width: 600px) {
  body {
    padding-top: calc(var(--site-header-offset, 150px) + 16px);
  }

  .site-header-wrap::after {
    height: 10px;
    bottom: -7px;
    width: calc(100% - 10px);
  }
}


/* ========== OFFICIAL METTLER TOLEDO PRODUCT IMAGES ========== */
.product-card img,
.category-image,
.hero-img {
  object-fit: contain !important;
  background: #fff !important;
  padding: 14px;
}

.product-card img {
  height: 180px;
}

.category-image {
  min-height: 260px;
  max-height: 360px;
}

.product-thumb {
  width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px;
  margin-bottom: 14px;
}

.subcard:hover .product-thumb {
  border-color: rgba(29, 126, 83, 0.45);
}

@media (max-width: 600px) {
  .product-thumb { height: 140px; }
  .category-image { min-height: 210px; }
}

/* =========================================================
   HARMONISATION DES CARTES — max. 3 cartes par ligne
   Desktop : 3 colonnes | Tablette : 2 | Mobile : 1
   Les mises en page éditoriales (hero, sidebar, footer, contact)
   ne sont volontairement pas concernées.
   ========================================================= */
.products-grid,
.services-grid,
.why-grid,
.subgrid,
.values,
.sectors-grid,
.services-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Les cartes de la page Services deviennent de vraies cartes verticales
   afin de rester lisibles dans une grille à trois colonnes. */
.services-list .service-block {
  grid-template-columns: 1fr;
  align-content: start;
  height: 100%;
  gap: 16px;
}

/* Une 4e carte isolée est centrée sur la seconde ligne. */
.services-grid > :last-child:nth-child(3n + 1),
.why-grid > :last-child:nth-child(3n + 1),
.values > :last-child:nth-child(3n + 1) {
  grid-column: 2;
}

@media (max-width: 1000px) {
  .products-grid,
  .services-grid,
  .why-grid,
  .subgrid,
  .values,
  .sectors-grid,
  .services-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-grid > :last-child:nth-child(3n + 1),
  .why-grid > :last-child:nth-child(3n + 1),
  .values > :last-child:nth-child(3n + 1) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .products-grid,
  .services-grid,
  .why-grid,
  .subgrid,
  .values,
  .sectors-grid,
  .services-list {
    grid-template-columns: 1fr;
  }

  .services-grid > :last-child:nth-child(3n + 1),
  .why-grid > :last-child:nth-child(3n + 1),
  .values > :last-child:nth-child(3n + 1) {
    grid-column: auto;
  }
}

/* =========================================================
   AJUSTEMENTS VISUELS — 01/10/2026
   - CTA sans aplat bleu : cadre simple
   - séparation coordonnées/menu façon fil barbelé
   - item de menu actif souligné
   - tous les boutons deviennent jaunes au survol
   ========================================================= */

/* Bloc CTA : plus d'aplat bleu, seulement un cadre propre. */
.cta-box {
  background: #fff !important;
  color: var(--text) !important;
  border: 1.5px solid rgba(18, 63, 46, 0.55) !important;
  box-shadow: none !important;
}

.cta-box h3 {
  color: var(--green-header) !important;
}

.cta-box p {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

.cta-box .btn {
  background: transparent !important;
  color: var(--green-header) !important;
  border: 1px solid var(--green-header) !important;
}

/* Séparation décorative entre la barre e-mail/téléphone et le menu. */
.top-bar {
  position: relative;
  z-index: 2;
}

.top-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 8px;
  pointer-events: none;
  z-index: 3;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(253, 202, 78, 0.98) 0 11px,
      transparent 11px 18px
    ),
    repeating-linear-gradient(
      60deg,
      transparent 0 13px,
      rgba(253, 202, 78, 0.92) 13px 14px,
      transparent 14px 27px
    ),
    repeating-linear-gradient(
      120deg,
      transparent 0 13px,
      rgba(253, 202, 78, 0.72) 13px 14px,
      transparent 14px 27px
    );
  background-size: 100% 1px, 27px 8px, 27px 8px;
  background-position: center, center, 13px center;
  background-repeat: no-repeat, repeat-x, repeat-x;
  filter: drop-shadow(0 1px 0 rgba(76, 50, 0, 0.18));
}

/* L'item correspondant à la page courante est clairement souligné. */
header nav a.active {
  color: var(--header-gold) !important;
  text-decoration-line: underline;
  text-decoration-color: var(--header-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

/* Tous les vrais boutons passent au jaune/or au survol. */
.btn:hover,
.btn:focus-visible,
header .btn-primary:hover,
header .btn-primary:focus-visible,
.cta-box .btn:hover,
.side-cta .btn:hover,
.cta .btn:hover {
  background: var(--gold) !important;
  color: var(--green-header) !important;
  border-color: var(--gold) !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .top-bar::after {
    bottom: -3px;
    height: 7px;
  }

  header nav a.active {
    text-underline-offset: 4px;
  }
}

/* En-tête mobile : coordonnées masquées et menu plus accessible. */
@media (max-width: 900px) {
  .site-header-wrap .top-bar { display: none; }
  header .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    padding: 0;
    font-size: 36px;
    line-height: 1;
  }
  .header-main .logo { min-width: 0; }
  header .mobile-menu-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
  }
}
