/* ——— Design system commun PMC ——— */

:root {
  --pmc-navy: #0a2f4a;
  --pmc-blue: #1a6bb5;
  --pmc-teal: #0f766e;
  --pmc-sky: #eef5fa;
  --pmc-mist: #f5f8fb;
  --pmc-text: #1a2332;
  --pmc-muted: #5b6b7c;
  --pmc-border: rgba(10, 47, 74, 0.1);
  --font-ui: "Source Sans 3", sans-serif;
  --font-brand: "Source Serif 4", serif;
}

.page-pmc {
  background: #fff;
  color: var(--pmc-text);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

/* Pas d'opacity:0 au chargement : ça cachait aussi le préchargeur logo */
body.pmc-loading.page-pmc {
  background: #f5f9fc;
}

.page-pmc.is-leaving {
  animation: pmcPageOut 0.2s ease forwards;
}

@keyframes pmcPageOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.page-pmc *:not(i):not(.fa):not(.fas):not(.far):not(.fab) {
  font-family: var(--font-ui);
}

/* Ne pas forcer padding:0 : écrase les paddings des sections PMC (mobile). */

.page-pmc h1,
.page-pmc h2,
.page-pmc h3 {
  font-family: var(--font-brand);
  line-height: 1.25;
  font-weight: 600;
  color: var(--pmc-navy);
  letter-spacing: -0.01em;
}

.page-pmc p {
  text-align: justify;
  text-justify: inter-word;
}

.pmc-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pmc-teal);
}

.pmc-section-head {
  max-width: 58rem;
  margin: 0 auto 3.5rem;
  text-align: center;
  padding: 0 1rem;
}

.pmc-section-head h2 {
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  margin-bottom: 1rem;
}

.pmc-section-head__text {
  font-size: 1.45rem;
  color: var(--pmc-muted);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 50rem;
  text-align: center !important;
}

.pmc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

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

.pmc-btn--primary:hover {
  background: var(--pmc-navy);
  transform: translateY(-2px);
}

.pmc-btn--outline {
  background: transparent;
  color: var(--pmc-blue);
  border-color: var(--pmc-blue);
}

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

.pmc-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.pmc-btn--ghost:hover {
  background: #fff;
  color: var(--pmc-navy);
  border-color: #fff;
}

/* Page hero */
.pmc-page-hero {
  position: relative;
  min-height: 34rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.pmc-page-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pmc-page-hero__bg {
  position: absolute;
  inset: 0;
  background: #0a2f4a center / cover no-repeat;
  background-image: url(../../assets/img/batiment_pmc.12.jpeg);
}

/* Images contenu : rendu fluide */
.page-pmc img {
  max-width: 100%;
  height: auto;
}

.page-pmc img[loading="lazy"] {
  content-visibility: auto;
}

/* Fonds photo hors écran (activés via JS) */
[data-lazy-bg] {
  background-color: #0a2f4a;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.pmc-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 28, 46, 0.78), rgba(10, 47, 74, 0.86));
}

.pmc-page-hero__content {
  position: relative;
  z-index: 1;
  max-width: 70rem;
  padding: 8.5rem 9% 6.5rem;
}

.pmc-page-hero .pmc-eyebrow {
  color: #9ee0d6;
}

.pmc-page-hero h1 {
  color: #fff !important;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  margin: 0 0 1.1rem;
  text-align: center;
}

.pmc-page-hero__lead {
  font-size: 1.5rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 1.6rem;
  max-width: 52rem;
  text-align: center !important;
}

.pmc-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.75);
}

.pmc-breadcrumb a {
  color: #fff;
  font-weight: 600;
}

.pmc-breadcrumb a:hover {
  color: #9ee0d6;
}

/* Footer polish */
.page-pmc .footer {
  background: var(--pmc-navy);
  padding: 4rem 9% 2.4rem;
}

.page-pmc .footer .box-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
}

.page-pmc .footer .box h3 {
  color: #fff;
  font-family: var(--font-brand);
  font-size: 1.7rem;
  margin-bottom: 1.6rem;
}

.page-pmc .footer .box p,
.page-pmc .footer .box a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.4rem;
  line-height: 1.8;
}

.page-pmc .footer .box a:hover { color: #fff; }
.page-pmc .footer .box a i { color: #7dd3c7; }

.page-pmc .footer .btn {
  border-radius: 0.5rem;
  background: #fff;
  color: var(--pmc-navy);
  border: none;
  font-weight: 600;
}

.page-pmc .footer .btn:hover {
  background: #e8f1f8;
  color: var(--pmc-navy);
}

.page-pmc .footer form input[type="email"] {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 0.5rem;
}

/* Barre copyright : pas de bandeau bleu vif (style.css .credit) */
.page-pmc .credit,
.page-home .credit {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.35rem;
  padding: 2.4rem 0 0.4rem;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Back to top */
.pmc-back-top {
  position: fixed;
  right: 2.4rem;
  bottom: 2.4rem;
  z-index: 1200;
  width: 5rem;
  height: 5rem;
  border: none;
  border-radius: 50%;
  background: var(--pmc-blue);
  color: #fff;
  font-size: 1.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(10, 47, 74, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(1.2rem) scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}

.pmc-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.pmc-back-top:hover { background: var(--pmc-navy); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(2.4rem);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal.reveal-done {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Active nav hint */
.navbar a.is-active {
  color: var(--pmc-blue);
  background: var(--pmc-sky);
}

@media (max-width: 991px) {
  .pmc-page-hero__content {
    padding: 9rem 2rem 7rem;
  }

  .page-pmc .footer {
    padding-left: clamp(1.8rem, 5.5vw, 3.2rem);
    padding-right: clamp(1.8rem, 5.5vw, 3.2rem);
  }

  .page-pmc .footer .box-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .page-pmc .footer .box-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pmc-back-top {
    right: 1.6rem;
    bottom: 1.6rem;
    width: 4.6rem;
    height: 4.6rem;
  }
}

@media (max-width: 480px) {
  .pmc-page-hero {
    min-height: 0;
  }

  .pmc-page-hero__content {
    padding: 7rem 1.5rem 5rem;
  }

  .page-pmc p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }

  .page-pmc .pmc-section-head__text,
  .page-pmc .pmc-page-hero__content p {
    text-align: center;
  }

  .footer .box form .btn {
    width: 100%;
  }

  .footer .box a,
  .footer .box p {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-pmc,
  .page-pmc.is-leaving {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal,
  .pmc-back-top {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .pmc-back-top.is-visible {
    visibility: visible;
    pointer-events: auto;
  }
}

/* Dissuasion copie / inspect (site public) */
body[data-pmc-protect="1"] {
  -webkit-user-select: none;
  user-select: none;
}
body[data-pmc-protect="1"] input,
body[data-pmc-protect="1"] textarea {
  -webkit-user-select: text;
  user-select: text;
}
/* Overlay DevTools retiré : faux positif sur navigateurs mobiles. */
body.pmc-devtools-detected::after {
  content: none;
  display: none;
  pointer-events: none;
}
