:root {
  --red: #f20d0d;
  --red-dark: #c90707;
  --ink: #252525;
  --muted: #646464;
  --line: #e7e2dc;
  --paper: #f6f1ea;
  --white: #ffffff;
  --cream: #fff8ee;
  --gold: #d9a728;
  --shadow: 0 18px 44px rgba(37, 37, 37, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.page-top {
  position: absolute;
  top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: var(--white);
  border-top: 8px solid var(--red);
  box-shadow: 0 4px 22px rgba(37, 37, 37, 0.08);
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding: 9px clamp(16px, 5vw, 72px);
  color: var(--white);
  background: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  padding: 10px clamp(16px, 5vw, 72px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 190px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  color: var(--red);
  font-weight: 800;
}

.site-nav a {
  padding: 8px 0;
}

.site-nav a:hover {
  color: var(--red-dark);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #2a241d;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(20, 16, 13, 0.86), rgba(20, 16, 13, 0.54) 44%, rgba(20, 16, 13, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100% - 32px));
  margin-left: clamp(16px, 6vw, 84px);
  padding: 70px 0 150px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #ffd8d8;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h1 span {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.4rem, 2.8vw, 2.5rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

h1 span::before {
  content: "";
  display: block;
  width: clamp(44px, 8vw, 92px);
  height: 4px;
  background: var(--red);
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 4px;
  font-weight: 900;
}

.button.primary {
  color: var(--white);
  background: var(--red);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.trade-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: min(1120px, calc(100% - 32px));
  margin: -96px auto 0;
  position: relative;
  z-index: 2;
}

.trade-cards article {
  min-height: 310px;
  padding: 34px 28px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.trade-cards article.featured {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.trade-cards h2 {
  margin-bottom: 12px;
  color: var(--red);
  font-size: 1.35rem;
  text-transform: uppercase;
}

.trade-cards .featured h2,
.trade-cards .featured p {
  color: var(--white);
}

.trade-cards p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.68;
}

.trade-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 24px;
  background: var(--red);
  border-radius: 50%;
  position: relative;
}

.featured .trade-icon {
  background: var(--white);
}

.trade-icon::before,
.trade-icon::after {
  content: "";
  position: absolute;
  background: var(--white);
}

.featured .trade-icon::before,
.featured .trade-icon::after {
  background: var(--red);
}

.trade-icon.roof::before {
  left: 18px;
  right: 18px;
  top: 32px;
  height: 24px;
  border: 4px solid currentColor;
  background: transparent;
  color: var(--white);
  transform: skewX(-18deg);
}

.trade-icon.roof::after {
  left: 22px;
  right: 22px;
  top: 24px;
  height: 4px;
  transform: rotate(-18deg);
}

.trade-icon.joinery::before {
  left: 28px;
  top: 18px;
  width: 28px;
  height: 46px;
}

.trade-icon.joinery::after {
  right: 27px;
  top: 38px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.trade-icon.frame::before {
  left: 20px;
  top: 24px;
  width: 44px;
  height: 30px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%, 84% 100%, 50% 28%, 16% 100%);
}

.trade-icon.frame::after {
  left: 24px;
  top: 54px;
  width: 36px;
  height: 5px;
}

.section {
  padding: clamp(72px, 9vw, 118px) clamp(16px, 5vw, 72px);
}

.section-title {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-title.centered {
  margin-inline: auto;
  text-align: center;
}

.section-title h2,
.about h2,
.contact-section h2 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-title p:not(.eyebrow),
.about p,
.contact-section p,
.service-copy p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.72;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.proof-grid span {
  padding: 14px 16px;
  color: var(--red-dark);
  background: var(--cream);
  border-left: 4px solid var(--red);
  font-weight: 800;
}

.contact-card {
  display: grid;
  gap: 10px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-style: normal;
}

.contact-card strong {
  color: var(--red);
  font-size: 1.2rem;
}

.contact-card a {
  font-weight: 800;
}

.section-red {
  padding-block: 42px;
  color: var(--white);
  background: var(--red);
}

.section-red .section-title {
  margin-bottom: 0;
}

.section-red h2 {
  color: var(--white);
}

.services {
  display: grid;
  gap: 42px;
  background: var(--white);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.service-row.reverse {
  grid-template-columns: minmax(300px, 1.1fr) minmax(260px, 0.9fr);
}

.service-row.reverse .service-media {
  order: 2;
}

.service-media {
  min-height: 330px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.media-charpente {
  background-image:
    linear-gradient(135deg, rgba(242, 13, 13, 0.06), rgba(37, 37, 37, 0.1)),
    url("assets/realisations/service-charpente.webp");
}

.media-menuiserie {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(242, 13, 13, 0.08)),
    url("assets/realisations/service-menuiserie.webp");
}

.media-couverture {
  background-image:
    linear-gradient(135deg, rgba(242, 13, 13, 0.06), rgba(0, 0, 0, 0.12)),
    url("assets/realisations/service-couverture-zinc.webp");
}

.service-copy h3 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
}

ul {
  margin: 22px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
}

.two-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.realizations {
  background: var(--paper);
}

.gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  grid-auto-rows: 230px;
  gap: 18px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.gallery-item.large {
  grid-row: span 2;
}

.gallery-charpente {
  background-image: url("assets/realisations/gallery-charpente-finition.webp");
}

.gallery-zinguerie {
  background-image: url("assets/realisations/gallery-zinguerie.webp");
}

.gallery-menuiserie {
  background-image: url("assets/realisations/gallery-menuiserie-alu.webp");
}

.gallery-terrasse {
  background-image: url("assets/realisations/gallery-terrasse-bois.webp");
}

.gallery-escalier {
  background-image: url("assets/realisations/gallery-escalier-bois.webp");
}

.gallery-volets {
  background-image: url("assets/realisations/gallery-volets-bois.webp");
}

.gallery-garage {
  background-image: url("assets/realisations/gallery-porte-garage.webp");
}

.gallery-fenetres {
  background-image: url("assets/realisations/gallery-fenetres-toit.webp");
}

.gallery-item span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 12px;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
  font-weight: 900;
}

.certifications {
  background: var(--white);
}

.cert-grid,
.partners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.cert-grid figure,
.partners figure {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 112px;
  padding: 18px;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cert-grid img,
.partners img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 84px;
  object-fit: contain;
}

.logo-ffb,
.logo-btp87 {
  max-height: 78px;
}

.logo-qualibat {
  max-height: 108px;
}

.logo-artisanat {
  max-height: 72px;
}

.logo-asturienne {
  max-height: 64px;
}

.logo-leul {
  width: 96px;
  max-height: none;
}

.logo-france-fermetures {
  max-height: 48px;
}

.logo-partedis {
  max-height: 54px;
}

.partners {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
}

.partners figure {
  min-height: 86px;
  background: var(--white);
}

.partners img {
  max-height: 58px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(28px, 6vw, 74px);
  align-items: center;
  padding: clamp(72px, 9vw, 116px) clamp(16px, 5vw, 72px);
  color: var(--white);
  background: var(--red);
}

.contact-section p {
  color: rgba(255, 255, 255, 0.86);
}

.contact-actions {
  display: grid;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.contact-actions a,
.contact-actions address {
  display: block;
  margin: 0;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-style: normal;
}

.contact-actions address {
  border-bottom: 0;
}

.contact-actions span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-actions strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(16px, 5vw, 72px);
  color: var(--muted);
  background: var(--white);
}

@media (max-width: 940px) {
  .topbar {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .site-nav {
    position: fixed;
    top: 126px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    color: var(--red);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px;
  }

  .nav-toggle {
    display: grid;
    gap: 6px;
    width: 44px;
    height: 44px;
    place-content: center;
    color: var(--red);
    background: transparent;
    border: 1px solid var(--red);
    border-radius: 4px;
  }

  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
  }

  .trade-cards,
  .about,
  .service-row,
  .service-row.reverse,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .service-row.reverse .service-media {
    order: 0;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .cert-grid,
  .partners {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .brand img {
    width: 154px;
  }

  .nav-shell {
    min-height: 76px;
  }

  .site-nav {
    top: 116px;
  }

  .topbar {
    font-size: 0.76rem;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 auto;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4.2rem);
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .trade-cards {
    margin-top: -64px;
  }

  .proof-grid,
  .two-lists,
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item.large {
    grid-row: span 1;
  }
}
