/* MPP Menuiserie — feuille de style partagée */

:root {
  --color-accent: #1c9e37;
  --color-accent-dark: #167a2b;
  --color-text: #313131;
  --color-text-light: #6b6b6b;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f5;
  --color-border: #e1e1e1;
  --font-heading: "Titillium Web", Arial, sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  margin: 0 0 20px;
}

h1 {
  font-size: 2.4rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h2 {
  font-size: 1.7rem;
}

h3 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  margin: 0 0 18px;
}

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

.btn {
  display: inline-block;
  padding: 13px 32px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--color-accent-dark);
  color: #fff;
  text-decoration: none;
}

/* ---------- Top bar (téléphone / email / facebook) ---------- */

.top-bar {
  background: var(--color-text);
  color: #cfcfcf;
  font-size: 0.85rem;
}

.top-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.top-bar a {
  color: #cfcfcf;
  font-weight: 700;
}

.top-bar a:hover {
  color: #fff;
}

.top-bar .top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar .icon {
  flex-shrink: 0;
}

/* ---------- Header / navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-logo img {
  height: 58px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: var(--color-text);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--color-text);
}

/* ---------- Hero (accueil) ---------- */

.hero {
  background: var(--color-bg-alt);
}

.hero-media {
  position: relative;
  height: 95vh;
  min-height: 620px;
  max-height: 920px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0;
  animation: hero-slide-fade 14s infinite ease-in-out;
}

.hero-slide-2 {
  animation-delay: 7s;
}

@keyframes hero-slide-fade {
  0%, 100% { opacity: 0; }
  4% { opacity: 1; }
  46% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-caption {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.hero-caption-box {
  background: rgba(0, 0, 0, 0.55);
  padding: 56px 72px;
  max-width: 1100px;
}

.hero-caption .tagline {
  color: #ffffff;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-caption h1 {
  color: #ffffff;
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 4px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.hero-caption h1 .accent {
  display: block;
  margin-top: 10px;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 10px;
}

.hero-caption-city {
  margin: 20px 0 0;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 10px;
  font-size: 1.3rem;
}

.hero-caption-box .btn {
  margin-top: 24px;
  text-transform: none;
}

.hero-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px 0;
}

.hero-intro-col h3 {
  position: relative;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.4rem;
  font-weight: 600;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.hero-intro-col h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  background: var(--color-accent);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
    background-attachment: scroll;
    opacity: 1;
  }

  .hero-slide-2 {
    opacity: 0;
  }
}

/* ---------- Page header (bandeau titre de page) ---------- */

.page-header {
  background: var(--color-bg-alt);
  padding: 48px 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header .subtitle {
  color: var(--color-text-light);
  max-width: 720px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 12px;
}

.breadcrumb a {
  color: var(--color-text-light);
}

/* ---------- Sections génériques ---------- */

.section {
  padding: 64px 0;
}

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

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

/* ---------- Bandeau "à votre service" ---------- */

.service-band {
  background: var(--color-accent);
  padding: 44px 0;
  text-align: center;
}

.service-band-label {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.service-band-words {
  position: relative;
  min-height: 3.2rem;
}

.service-band-words span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.2rem;
  color: #d9f2dd;
  opacity: 0;
  animation: service-word-fade 16s infinite ease-in-out;
}

.service-band-words span:nth-child(2) { animation-delay: 4s; }
.service-band-words span:nth-child(3) { animation-delay: 8s; }
.service-band-words span:nth-child(4) { animation-delay: 12s; }

@keyframes service-word-fade {
  0%, 100% { opacity: 0; }
  6% { opacity: 1; }
  16% { opacity: 1; }
  22% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .service-band-words span {
    animation: none;
    opacity: 0;
    position: static;
    display: none;
  }

  .service-band-words span:first-child {
    display: flex;
    opacity: 1;
  }
}

/* ---------- Domaines d'activité (accueil) ---------- */

.activities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.activity-card {
  text-align: center;
}

.activity-card img {
  border-radius: 50%;
  width: 220px;
  height: 220px;
  object-fit: cover;
  margin: 0 auto 20px;
}

.activity-card h3 {
  margin-bottom: 6px;
}

.activity-card p {
  color: var(--color-text-light);
  margin: 0;
}

/* ---------- Galerie réalisations ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 32px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 52px;
  height: 52px;
  cursor: pointer;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* ---------- Articles (actualités) ---------- */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 820px;
  margin: 0 auto;
}

.article-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
}

.article-card img {
  border-radius: 2px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.article-card h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.article-card p {
  color: var(--color-text-light);
}

.article-body {
  max-width: 780px;
  margin: 0 auto;
}

.article-body img {
  border-radius: 2px;
  margin: 24px 0;
}

.article-body figure {
  margin: 24px 0;
}

.article-body figcaption {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-top: 8px;
}

.article-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

/* ---------- Formulaire de contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: var(--color-bg-alt);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row input[type="file"] {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.form-row input[type="file"]::file-selector-button {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  margin-right: 12px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: var(--color-bg);
  cursor: pointer;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.form-consent input {
  margin-top: 4px;
}

.form-row-trap {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-status-success {
  color: var(--color-accent-dark);
}

.form-status-error {
  color: #b3261e;
}

.form-status-pending {
  color: var(--color-text-light);
}

.contact-form .btn:disabled {
  background: var(--color-text-light);
  cursor: not-allowed;
}

.contact-infos {
  background: var(--color-bg-alt);
  padding: 36px;
  border-radius: 2px;
}

.contact-infos h3 {
  margin-top: 0;
}

.contact-infos ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-infos li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ---------- Bandeau contact (accueil / réalisations) ---------- */

.contact-band {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
}

.contact-band-media {
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/contact-mpp-menuiserie-nice.webp');
  background-size: cover;
  background-position: center;
}

.contact-band-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 18, 0.35), rgba(20, 20, 18, 0.55));
}

.contact-band .container {
  position: relative;
}

.contact-band-panel {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.contact-band-panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.contact-band-panel p {
  margin: 0 0 14px;
}

.contact-band-panel p:last-child {
  margin-bottom: 0;
  margin-top: 22px;
}

.contact-band-panel .phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-band-signature {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-text);
  color: #cfcfcf;
  padding: 56px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #4a4a4a;
}

.footer-grid h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-grid p,
.footer-grid a {
  color: #b8b8b8;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 20px 0;
  font-size: 0.8rem;
  color: #8a8a8a;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom a {
  color: #8a8a8a;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .activities {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

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

  .article-images {
    grid-template-columns: 1fr;
  }

  .service-band-words {
    min-height: 3.8rem;
  }

  .service-band-words span {
    font-size: 1.5rem;
  }

  .hero-media {
    height: 70vh;
    min-height: 440px;
  }

  .hero-slide {
    background-attachment: scroll;
  }

  .hero-caption-box {
    padding: 24px 28px;
    max-width: 90%;
  }
}

@media (max-width: 700px) {
  .top-bar .container {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(300px, 80vw);
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 32px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 22px;
  }

  .nav-toggle {
    display: flex;
  }

  h1 {
    font-size: 1.8rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-band {
    padding: 48px 0;
  }

  .contact-band-panel {
    padding: 28px 20px;
  }
}
