﻿* {
  box-sizing: border-box;
}

html,
html body {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  max-width: none !important;
  width: 100% !important;
  min-width: 100% !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
}

.site-main,
.home-page,
main {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  max-width: none !important;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin-top: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
}

h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

p {
  margin-top: 0;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.text-orange {
  color: var(--color-primary);
}

.section-alt {
  background: var(--color-gray-light);
}

/* Mobile : aucun débordement horizontal (desktop inchangé) */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  html body,
  body {
    overflow-x: hidden;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  main,
  .site-main,
  .home-page,
  .archive-page,
  .carrieres-page,
  .contact-page,
  .apropos-page,
  .service-page,
  header,
  footer {
    overflow-x: hidden;
    max-width: 100%;
    min-width: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .section {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* minmax(280px) force le scroll sur petits écrans */
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  img,
  video,
  iframe,
  embed,
  object {
    max-width: 100%;
    height: auto;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}
