@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Variable.ttf") format("truetype");
  font-weight: 100 600;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  background-color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  isolation: isolate;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("images/fond_ecran.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  opacity: 0.2;
  pointer-events: none;
}

main {
  /* Largeur commune au logo, au bouton et aux cartes. */
  --content-width: min(100%, 1020px);
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.logo {
  display: block;
  width: var(--content-width);
  height: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mer-button {
  position: relative;
  display: inline-flex;
  width: var(--content-width);
  min-height: clamp(58px, 8vw, 86px);
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
  padding: 0.65rem clamp(0.75rem, 3vw, 2rem);
  border: 0;
  border-radius: 999px;
  background-color: #e1bf00;
  color: #333;
  font: inherit;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.mer-button__text {
  white-space: nowrap;
}

.mer-button__logo {
  display: block;
  width: clamp(90px, 12vw, 135px);
  max-width: 25%;
  height: auto;
  flex: 0 1 auto;
}

.mer-features {
  width: var(--content-width);
  margin-top: clamp(2.5rem, 6vw, 5rem);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.mer-features__logo {
  display: block;
  width: min(48vw, 430px);
  height: auto;
  margin: 0 auto clamp(1rem, 2vw, 1.5rem);
}

.mer-features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.mer-feature-card {
  position: relative;
  min-height: 320px;
  margin-top: 52px;
  padding: 5.75rem clamp(1rem, 2.3vw, 2rem) 2rem;
  border: 1px solid rgba(0, 80, 138, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(0, 43, 78, 0.16);
  color: #050505;
  text-align: center;
}

.mer-feature-card__icon {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.mer-feature-card__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.mer-feature-card__divider {
  width: min(58%, 125px);
  height: 4px;
  margin: 1.25rem auto 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #005a96;
}

.mer-feature-card__text {
  margin: 0;
  font-size: clamp(1rem, 1.65vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
}

/* Carte de présentation : mêmes contours et ombre que les cartes des atouts. */
.mer-presentation {
  width: var(--content-width);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(0, 80, 138, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 43, 78, 0.16);
  color: #111;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  text-align: center;
}

.mer-presentation p {
  margin: 0 0 1.3em;
}

.mer-presentation p:last-child {
  margin-bottom: 0;
}

.mer-presentation strong {
  font-weight: 600;
}

/* Logo de fabrication : taille limitée à l'espace disponible sur mobile. */
.mer-presentation__origin {
  display: block;
  width: min(100%, 200px);
  height: auto;
  margin: 1.5rem auto 0;
}

.cursor-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: max-content;
  max-width: min(280px, 80vw);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background-color: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-9999px, -9999px, 0);
  transition: opacity 0.12s ease;
  visibility: hidden;
  white-space: nowrap;
  will-change: transform;
}

.cursor-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.mer-button:hover {
  filter: brightness(1.2);
}

.mer-button:focus-visible {
  outline: 3px solid #6f74c5;
  outline-offset: 3px;
}

/* Le contact suit le contenu et reste accessible en fin de page. */
.contact-footer {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  color: #333;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(0.72rem, 1.4vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

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

.contact-footer a:hover,
.contact-footer a:focus-visible {
  text-decoration: underline;
}

.contact-footer a:focus-visible {
  outline: 2px solid #6f74c5;
  outline-offset: 3px;
}

@media (max-width: 767px) and (orientation: portrait) {
  body::before {
    background-image: url("images/fond_ecran_mobile.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }
}

@media (max-width: 767px) {
  main {
    --content-width: min(88%, 360px);
  }

  .mer-button {
    min-height: 60px;
    padding-inline: 0.5rem;
    gap: clamp(0.35rem, 2vw, 0.6rem);
    font-size: clamp(0.65rem, 3vw, 1rem);
    letter-spacing: -0.02em;
  }

  .mer-button__logo {
    width: clamp(58px, 21vw, 88px);
    max-width: 27%;
    height: auto;
  }

  .mer-features {
    margin-top: 3rem;
  }

  .mer-features__logo {
    /* Réduit le logo MER pour préserver ses marges sur les petits écrans. */
    width: min(62vw, 240px);
    margin-bottom: 1rem;
  }

  .mer-features__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mer-feature-card {
    min-height: 0;
    margin-top: 44px;
    padding: 4.75rem 1.25rem 1.6rem;
  }

  .mer-feature-card__icon {
    width: 88px;
    height: 88px;
  }

  .contact-footer {
    font-size: clamp(0.95rem, 2.5vw, 1rem);
  }
}
