/* ==========================================================================
   MPF-Inter : feuille de style unique du site
   1. Réglages (couleurs, tailles)   5. Tableaux de produits
   2. Base                           6. Catalogue PDF
   3. En-tête                        7. Pied de page
   4. Contenu des pages              8. Page 404
   ========================================================================== */

/* 1. Réglages : modifier une valeur ici la change sur tout le site
   ========================================================================== */
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: fallback;
  src: url("/assets/fonts/Manrope-VariableFont_wght.woff2") format("woff2");
}

:root {
  --color-text: #111111;
  --color-background: #ffffff;
  --color-muted: #767676;
  --color-heading: #686868;
  --color-link: #503aa8;
  --color-green-light: #5c9c31;
  --color-green: #417a22;
  --color-green-dark: #295313;
  --color-green-border: #4d8427;
  --color-button: #2271b1;

  --font-small: 0.875rem;
  --font-body: clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.392), 1.375rem);

  --gap-none: 0;
  --gap-s: 10px;
  --gap-m: 20px;
  --gap-default: 1.2rem;
  --gap-l: 30px;
  --gap-xl: clamp(30px, 5vw, 50px);
  --page-margin: clamp(70px, 10vw, 140px);
}

/* 2. Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: Manrope, sans-serif;
  font-size: var(--font-body);
  font-weight: 300;
  letter-spacing: -0.1px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul,
figure {
  margin: 0;
}

h1,
h2 {
  color: var(--color-heading);
  font-size: var(--font-body);
  font-weight: 700;
  line-height: 1.125;
}

p {
  color: var(--color-muted);
  font-size: var(--font-small);
  font-weight: 400;
  line-height: 1.5;
}

p a {
  color: var(--color-link);
}

h1,
h2,
p {
  text-wrap: pretty;
}

a {
  color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.1em;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 6px;
  top: 7px;
  z-index: 100000;
  padding: 15px 23px 14px;
  background-color: #eeeeee;
}

/* 3. En-tête
   ========================================================================== */
.site-header {
  width: 100%;
  padding-bottom: 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.header-band {
  position: relative;
  width: 100%;
  height: 140px;
  background: linear-gradient(to bottom, var(--color-green), var(--color-green-dark));
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.header-logo-link {
  position: relative;
  z-index: 10;
  display: block;
}

.header-logo {
  position: absolute;
  top: -45px;
  max-width: 190px;
}

.main-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: var(--color-green-light);
  border: 1px solid var(--color-green-border);
}

.main-nav li {
  position: relative;
  border-right: 1px solid var(--color-green-border);
}

.main-nav li:last-child {
  border-right: none;
}

.main-nav a {
  display: block;
  padding: 12px 20px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.2s ease;
}

.main-nav a:hover {
  background-color: #437622;
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  color: #ffffff;
}

.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  flex-direction: column;
  min-width: 200px;
  background-color: #ffffff;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-nav .has-dropdown:hover .dropdown {
  display: flex;
}

.main-nav .dropdown li {
  width: 100%;
  border-right: none;
  border-bottom: 1px solid #f5f5f5;
}

.main-nav .dropdown li:last-child {
  border-bottom: none;
}

.main-nav .dropdown a {
  padding: 12px 15px;
  background: transparent;
  color: #333333;
  font-weight: normal;
}

.main-nav .dropdown a:hover {
  background-color: #f4f6f4;
  color: var(--color-green);
}

.banner {
  position: relative;
  z-index: 5;
  max-width: 1180px;
  margin: -35px auto 0;
  padding: 0 20px;
}

.banner-box {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.banner-box img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.banner-large {
  flex: 2;
}

.banner-small {
  flex: 1;
}

@media (max-width: 768px) {
  .header-band {
    height: auto;
    padding: 20px 0;
  }

  .header-container {
    flex-direction: column;
    gap: 20px;
  }

  .header-logo-link {
    position: static;
  }

  .header-logo {
    position: static;
    max-width: 140px;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .banner {
    margin-top: 15px;
  }

  .banner-box {
    flex-direction: column;
  }
}

/* 4. Contenu des pages
   ========================================================================== */
.page {
  padding: 0 var(--page-margin) var(--gap-default);
}

/* Bloc de texte, avec une marge supplémentaire de chaque côté */
.text {
  padding-inline: var(--page-margin);
}

/* Empile les éléments avec un espace régulier.
   Ajouter gap-none, gap-s, gap-m, gap-l ou gap-xl pour changer cet espace. */
.stack > * + *,
.text > * + * {
  margin-block-start: var(--gap-default);
}

.gap-none > * + * { margin-block-start: var(--gap-none); }
.gap-s > * + * { margin-block-start: var(--gap-s); }
.gap-m > * + * { margin-block-start: var(--gap-m); }
.gap-l > * + * { margin-block-start: var(--gap-l); }
.gap-xl > * + * { margin-block-start: var(--gap-xl); }

/* Deux colonnes côte à côte (texte et photo) */
.columns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-default);
}

.columns--start {
  justify-content: flex-start;
}

.columns .text-column {
  flex: 0 1 645px;
}

.page ul {
  color: var(--color-muted);
  font-size: var(--font-small);
}

.page li {
  margin-top: 0.5rem;
}

.contact-name {
  font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.667), 1.3rem);
  color: var(--color-text);
  font-weight: 800;
}

.contact-tagline {
  font-size: 0.75rem;
}

.legal h1 {
  margin-block-end: var(--gap-xl);
}

/* 5. Tableaux de produits
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--gap-default);
  margin-top: var(--gap-xl);
}

.product-family h2 {
  margin-bottom: var(--gap-default);
}

.products {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--font-small);
}

.products thead {
  border-bottom: 3px solid;
}

.products th,
.products td {
  padding: 0.5em;
  border: 1px solid;
  word-break: break-word;
}

/* 6. Catalogue PDF
   ========================================================================== */
.catalogue {
  margin-top: var(--gap-default);
}

.catalogue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.catalogue-actions a {
  padding: 10px 20px;
  border-radius: 3px;
  background: var(--color-button);
  color: #ffffff;
  font-size: 16px;
  text-decoration: none;
}

.catalogue iframe {
  display: block;
  width: 100%;
  height: 840px;
  border: 0;
  border-bottom: 10px solid #2a2a2a;
}

@media (max-width: 1024px) {
  .catalogue iframe {
    height: 700px;
  }
}

@media (max-width: 640px) {
  .catalogue iframe {
    height: 400px;
  }
}

/* 7. Pied de page
   ========================================================================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gap-default);
  margin-top: var(--gap-default);
  padding: 20px 40px;
  background-color: var(--color-green-dark);
  color: #ffffff;
}

.footer-brand {
  display: flex;
  align-items: flex-end;
  gap: var(--gap-default);
}

.footer-logo {
  display: block;
}

.footer-name {
  color: inherit;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.125;
}

.footer-name a {
  color: inherit;
  text-decoration: none;
}

.footer-name a:hover {
  text-decoration: underline;
}

.footer-links {
  font-size: var(--font-small);
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* 8. Page 404
   ========================================================================== */
.not-found {
  padding: var(--gap-xl);
}

.not-found-content {
  max-width: 645px;
  margin: 0 auto;
}

.button-row {
  display: flex;
  justify-content: center;
  margin-top: var(--gap-default);
}

.button {
  padding: 1rem 2.25rem;
  background-color: var(--color-text);
  color: #ffffff;
  text-decoration: none;
}
