/* ============================================
   ManuCycle Solaire & Eau — Design tokens
   ============================================ */
:root {
  --navy: #002651;
  --navy-light: #073768;
  --green: #4CAF50;
  --gold: #F5A623;
  --blue: #1B75BB;
  --bg: #FAFAF7;
  --bg-alt: #F1F0EA;
  --ink: #14181C;
  --gray: #64707A;
  --line: #E4E1D8;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.eyebrow.gold { color: var(--gold); }
.eyebrow.blue { color: var(--blue); }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; padding: 0 24px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head.light .eyebrow { color: var(--gold); }
.section-head.light h2 { color: white; }
.section-sub { color: var(--gray); font-size: 16px; margin-top: 12px; }
.section-head.light .section-sub { color: rgba(255,255,255,0.75); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 4px; font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; cursor: pointer; transition: all 0.18s ease;
  font-family: var(--font-body);
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #ffb43d; transform: translateY(-1px); }
.btn-outline { border-color: rgba(255,255,255,0.55); color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-full { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0, 38, 81, 0.0);
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
  padding: 18px 0;
}
.nav.scrolled {
  background: rgba(0, 38, 81, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
  padding: 12px 0;
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; color: white; font-size: 21px; }
.nav-logo { width: 46px; height: 46px; object-fit: contain; }
.nav-brand em { font-style: normal; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: rgba(255,255,255,0.88); font-size: 14.5px; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--gold); }
.nav-cta { background: var(--gold); color: var(--navy) !important; padding: 9px 18px; border-radius: 4px; font-weight: 600 !important; }
.nav-cta:hover { background: #ffb43d !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: white; border-radius: 2px; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--navy); overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero-inner {
  position: relative; max-width: var(--container); margin: 0 auto; padding: 130px 24px 80px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); color: white; }
.hero-sub { font-size: 16.5px; color: rgba(255,255,255,0.78); max-width: 480px; margin: 22px 0 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-photo {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4/5;
  border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(0,20,45,0.55) 100%);
  pointer-events: none;
}

.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.5); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--gold); border-radius: 2px;
  animation: scrollcue 1.6s ease-in-out infinite;
}
@keyframes scrollcue { 0%,100% { opacity: 1; top: 8px; } 50% { opacity: 0.3; top: 18px; } }

/* ============ LOCATIONS STRIP ============ */
.locations-strip { background: var(--gold); padding: 14px 24px; }
.locations-inner {
  max-width: var(--container); margin: 0 auto; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 10px 36px;
}
.locations-item { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.locations-item strong { font-weight: 700; }

/* ============ SERVICES ============ */
.services { padding: 110px 24px 90px; max-width: var(--container); margin: 0 auto; }
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.service-card {
  background: white; border: 1px solid var(--line); border-radius: 8px; padding: 30px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,38,81,0.08); border-color: transparent; }
.service-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border-radius: 8px; font-size: 22px; margin-bottom: 18px;
}
.service-card h3 { font-size: 17px; margin-bottom: 10px; }
.service-card p { font-size: 14px; color: var(--gray); }

.photo-card { padding: 0; overflow: hidden; }
.photo-card .service-photo {
  height: 140px; background-size: cover; background-position: center;
}
.photo-card h3 { padding: 20px 24px 0; }
.photo-card p { padding: 0 24px 24px; }

/* ============ PROCESS (signature element) ============ */
.process { background: var(--navy); padding: 100px 24px; position: relative; overflow: hidden; }
.process::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}
.process-diagram {
  position: relative; max-width: var(--container); margin: 0 auto;
  display: flex; align-items: flex-start; gap: 0;
}
.process-step {
  flex: 1; position: relative; padding: 0 16px 0 0; color: white;
}
.process-step:not(:last-child)::after {
  content: ""; position: absolute; top: 20px; left: calc(100% - 8px); width: calc(100% - 8px);
  height: 1px; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px);
}
.step-num {
  display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--gold); border: 1.5px solid var(--gold); width: 40px; height: 40px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; background: var(--navy); position: relative; z-index: 1;
}
.process-step h4 { color: white; font-size: 15.5px; margin-bottom: 6px; }
.process-step p { font-size: 12.5px; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* ============ DETAIL SECTIONS (Photovoltaique / Eau) ============ */
.detail {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  max-width: var(--container); margin: 0 auto;
}
.detail.reverse { direction: rtl; }
.detail.reverse .detail-content { direction: ltr; }
.detail-media { min-height: 460px; background-size: cover; background-position: center; }
.detail-content { padding: 80px 60px; display: flex; flex-direction: column; justify-content: center; direction: ltr; }
.detail-content h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 20px; }
.detail-content p { color: var(--gray); font-size: 15.5px; }
.domaines-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--navy); margin-top: 28px; margin-bottom: 12px;
}
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 20px;
  background: var(--bg-alt); color: var(--navy); border: 1px solid var(--line);
}

/* ============ WHY (Pourquoi choisir) ============ */
.why { padding: 100px 24px; max-width: var(--container); margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.why-item { background: var(--bg); padding: 26px 30px; display: flex; align-items: baseline; gap: 18px; }
.why-item span { font-family: var(--font-mono); color: var(--green); font-weight: 600; font-size: 13px; }
.why-item p { font-size: 15px; color: var(--ink); font-weight: 500; }

/* ============ BRANDS ============ */
.brands { background: var(--bg-alt); padding: 80px 24px; }
.brands-grid {
  max-width: var(--container); margin: 0 auto; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 14px;
}
.brands-grid span {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--navy);
  padding: 12px 22px; background: white; border: 1px solid var(--line); border-radius: 6px;
}

/* ============ CONTACT ============ */
.contact { padding: 110px 24px; max-width: var(--container); margin: 0 auto; }
.contact-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; }
.contact-info h2 { font-size: clamp(26px, 3.4vw, 36px); }
.contact-details { list-style: none; margin-top: 36px; display: flex; flex-direction: column; gap: 20px; }
.contact-details li { font-size: 14.5px; color: var(--gray); }
.contact-details strong { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); display: block; margin-bottom: 4px; }
[data-placeholder] { color: var(--gold); font-style: italic; }

.contact-form { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 40px; }
.form-row { display: flex; gap: 16px; }
.form-field { margin-bottom: 18px; flex: 1; }
.form-field label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--navy); margin-bottom: 6px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 5px;
  font-family: var(--font-body); font-size: 14.5px; background: var(--bg); color: var(--ink);
  transition: border-color 0.15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue);
}
.form-status { margin-top: 14px; font-size: 13.5px; text-align: center; min-height: 18px; }
.form-status.ok { color: var(--green); font-weight: 600; }
.form-status.err { color: #C0392B; font-weight: 600; }

/* ============ FOOTER ============ */
.footer { background: var(--navy); padding: 50px 24px 24px; }
.footer-inner {
  max-width: var(--container); margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 42px; height: 42px; object-fit: contain; }
.footer-brand strong { color: white; font-family: var(--font-display); font-size: 15px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 12.5px; margin-top: 2px; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 13.5px; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { max-width: var(--container); margin: 20px auto 0; color: rgba(255,255,255,0.4); font-size: 12.5px; }

/* ============ SCROLL REVEAL ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.in { opacity: 1; transform: translateY(0); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .detail, .detail.reverse { grid-template-columns: 1fr; direction: ltr; }
  .detail-media { min-height: 320px; }
  .detail-content { padding: 50px 32px; }
  .why-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .process-diagram { flex-wrap: wrap; row-gap: 40px; }
  .process-step { flex: 1 1 45%; }
  .process-step:not(:last-child)::after { display: none; }
}

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 110px; }
  .hero-photo { aspect-ratio: 16/10; order: -1; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: 260px;
    background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: 100px 28px 28px; gap: 22px; transform: translateX(100%);
    transition: transform 0.25s ease; box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
}
