:root {
  --bg: #f5f5f5;
  --white: #fff;
  --dark: #1a365d;
  --accent: #0f766e;
}

/* =========================================================
   RESET
   ========================================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
}

/* =========================================================
   BACKGROUNDS PAR PAGE
   ========================================================= */
body.home main {
  background: #f5f5f5 url("IMAGES/platforme-offshore.png") center top/contain no-repeat;
}

body.presentation main {
  display: block;
  background: #f5f5f5 url("IMAGES/eolienne.png") center top/contain no-repeat;
}

body.competences main {
  background: #f5f5f5 url("IMAGES/nacelle-elevatrice.png") center top/contain no-repeat;
}

body.services main {
  background: #f5f5f5 url("IMAGES/pelle-brh.png") center top/contain no-repeat;
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 20;
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 120px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.logo {
  height: 110px;
  width: auto;
  display: block;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
}

nav a.active {
  color: var(--accent);
}

/* =========================================================
   STRUCTURE GÉNÉRALE
   ========================================================= */
.hero {
  padding: 4.2rem 0 3.5rem;
}

.section {
  padding: 2.5rem 0;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: .7rem 1.3rem;
  border-radius: .5rem;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
}

/* =========================================================
   ACCUEIL
   ========================================================= */
body.home .hero .container {
  max-width: 1050px;
}

.hero-title-box {
  background: rgba(245,245,245,0.93);
  padding: .8rem 1.2rem;
  border-radius: .5rem;
  display: inline-block;
  margin-bottom: .8rem;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  font-weight: 700;
  white-space: nowrap;
}

body.home .hero > .container > p:not(.subhead) {
  background: rgba(245,245,245,0.93);
  padding: .5rem .9rem;
  border-radius: .4rem;
  max-width: 720px;
  margin-bottom: .7rem;
}

.highlight-callout {
  background: rgba(245,245,245,0.93);
  border-radius: .5rem;
  padding: .75rem 1rem;
  margin: 1rem 0 0.5rem;
  max-width: 650px;
  font-weight: 600;
}

body.home .section .container .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

body.home .section .container .card.performance {
  grid-column: 2;
}

/* =========================================================
   GRILLE GÉNÉRALE
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255,255,255,0.85);
  border-radius: .75rem;
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(229,231,235,0.4);
  backdrop-filter: blur(2px);
}

/* =========================================================
   PAGE PRÉSENTATION
   ========================================================= */
body.presentation .hero.presentation-hero {
  width: min(900px, 100%);
  margin: 0 auto;
  background: transparent;
  padding: 4.2rem 0 1.5rem;
}

.presentation-hero-box {
  background: rgba(245, 245, 245, 0.78);
  backdrop-filter: blur(3px);
  border-radius: 1rem;
  padding: 1.6rem 2rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.presentation-content .container {
  width: min(900px, 100%);
  margin: 0 auto;
  background: transparent;
  padding: 0;
}

.presentation-box {
  background: rgba(245, 245, 245, 0.78);
  backdrop-filter: blur(3px);
  border-radius: 1rem;
  padding: 2rem 2rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

/* =========================================================
   PAGE COMPÉTENCES
   ========================================================= */
body.competences .hero.competences-hero {
  width: min(900px, 100%);
  margin: 0 auto;
  background: transparent;
  padding: 4.2rem 0 1.5rem;
  text-align: left;
}

.competences-hero-box {
  background: rgba(245, 245, 245, 0.78);
  backdrop-filter: blur(3px);
  border-radius: 1rem;
  padding: 1.6rem 2rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.competences-hero-box h1 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.competences-hero-box p {
  margin: 0;
}

/* fond du bloc compétences */
body.competences .section .container {
  width: min(1050px, 100%);
  margin-left: auto;
  background: rgba(245,245,245,0.65);
  border-radius: 1rem;
  padding: 2rem 2.5rem 2.5rem;
}

/* =========================================================
   PAGE SERVICES
   ========================================================= */
body.services .hero.services-hero {
  width: min(900px, 100%);
  margin: 0 auto;
  background: transparent;
  padding: 4.2rem 0 1.5rem;
  text-align: left;
}

.services-hero-box {
  background: rgba(245, 245, 245, 0.78);
  backdrop-filter: blur(3px);
  border-radius: 1rem;
  padding: 1.6rem 2rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.services-hero-box h1 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.services-hero-box p {
  margin: 0;
}

/* grille services : 3 colonnes et carte fabricants centrée */
body.services .section .container .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

body.services .section .container .card.fabricants {
  grid-column: 2;
}

body.services .grid {
  width: min(1050px, 100%);
  margin: 0 auto;
  background: rgba(245,245,245,0.0);
  padding: 0;
}

/* boîte opaque pour les liens */
body.services .link-box {
  background: rgba(245,245,245,0.85);
  backdrop-filter: blur(3px);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

body.services .link-box a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

body.services .link-box a:hover {
  text-decoration: underline;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  background:
    linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.35) 100%),
    url("IMAGES/portique.png") center bottom/contain no-repeat;
  padding: 4.5rem 0 3.8rem;
  text-align: center;
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact-header-box {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(3px);
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-header-box h2 {
  margin: 0.3rem 0;
}

.contact-header-box p {
  margin: 0;
  font-weight: 400;
  font-size: 0.95rem;
}

.contact-form {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(229,231,235,0.3);
  border-radius: .75rem;
  padding: 1.5rem;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: 500;
  margin-bottom: .3rem;
}

.form-group input,
.form-group textarea {
  border: 1px solid #d1d5db;
  border-radius: .4rem;
  padding: .5rem .6rem;
  font-size: 1rem;
  color: var(--dark);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: #0f172a;
  color: white;
  padding: 1.2rem 0 2rem;
  text-align: center;
  font-size: .85rem;
  line-height: 1.5;
  width: 100%;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 750px) {
  nav {
    flex-wrap: wrap;
    gap: .5rem;
  }

  .logo {
    height: 70px;
  }

  body.presentation .hero.presentation-hero,
  .presentation-content .container,
  body.competences .hero.competences-hero,
  body.competences .section .container,
  body.services .hero.services-hero {
    width: 94%;
    margin: 0 auto;
  }

  body.home .section .container .grid,
  body.services .section .container .grid {
    grid-template-columns: 1fr;
  }

  .contact {
    background-position: center bottom;
    background-size: 150% auto;
  }

  .contact-form {
    padding: 1rem;
  }

  .hero-title-box {
    white-space: normal;
  }
}