/* ===================== TOKENS ===================== */
:root {
  --teal: #0F6E56;
  --teal-dark: #0a5341;
  --teal-soft: #e6f0ec;
  --orange: #C85A20;
  --orange-dark: #a8481a;
  --cream: #F7F5F0;
  --ink: #1c2420;
  --muted: #5c6661;
  --line: #e3ded4;
  --white: #ffffff;

  --maxw: 1140px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px -22px rgba(15, 110, 86, .45);
  --shadow-soft: 0 6px 20px -14px rgba(28, 36, 32, .4);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.01em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--orange);
  margin: 0 0 .9rem;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-lg { padding: 1.05rem 2.2rem; font-size: 1.05rem; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, .85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 700; letter-spacing: .12em; color: var(--teal); font-size: 1.05rem; }
.brand-tagline { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-weight: 500; font-size: .95rem; color: var(--ink); position: relative; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--orange); transition: width .25s ease;
}
.nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--orange); color: #fff !important; padding: .55rem 1.15rem;
  border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { background: var(--orange-dark); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* ===================== HERO ===================== */
.hero { padding: clamp(3rem, 7vw, 6rem) 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 1.2rem; color: var(--ink); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 42ch; margin: 0 0 2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }

.hero-stats { display: flex; gap: 2.5rem; list-style: none; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--serif); font-size: 2rem; color: var(--teal); line-height: 1; }
.hero-stats span { font-size: .82rem; color: var(--muted); margin-top: .35rem; }

.hero-visual { display: flex; justify-content: center; }
.logo-card {
  width: 100%; max-width: 440px; border-radius: var(--radius);
  box-shadow: var(--shadow); filter: drop-shadow(0 0 0 transparent);
  transform: rotate(-1.5deg); transition: transform .4s ease;
}
.logo-card:hover { transform: rotate(0deg) scale(1.02); }

/* ===================== SECTIONS ===================== */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 640px; margin: 0 auto clamp(2.2rem, 4vw, 3.2rem); text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 1rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ===================== CARDS ===================== */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.realisations { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}
.section-alt .card { background: var(--cream); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--teal); }

.card-icon {
  width: 54px; height: 54px; display: grid; place-items: center;
  background: var(--teal-soft); border-radius: 14px; font-size: 1.6rem; margin-bottom: 1.2rem;
}
.service-card { display: flex; flex-direction: column; }
.service-card h3 { font-size: 1.3rem; margin-bottom: .7rem; color: var(--teal); }

/* Icône en tête des cartes de service — petit format aligné à gauche */
.service-media { margin-bottom: 1.2rem; display: flex; align-items: center; }
.service-media img { height: 64px; width: auto; max-width: 100%; display: block; border-radius: 8px; }
.service-media .media-badge { border-radius: 0; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Project cards */
.project-card { display: flex; flex-direction: column; }
.project-tag {
  align-self: flex-start; font-weight: 600; font-size: .82rem;
  background: var(--teal); color: #fff; padding: .35rem .85rem; border-radius: 999px;
  margin-bottom: 1.1rem;
}
/* Logo client (ex. SFR) — sans pastille, directement sur la carte */
.client-tag {
  background: none; color: var(--ink); border: 0;
  padding: 0; gap: .55rem; font-size: .95rem;
}
.client-logo { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }

/* Logo "en toutes lettres" (ex. Siemens) — sans pastille, directement sur la carte */
.wordmark-tag { background: none; border: 0; padding: 0; margin-bottom: 1.1rem; }
.wordmark-logo { height: 26px; width: auto; display: block; }

.project-card h3 { font-size: 1.4rem; margin-bottom: .35rem; }
.project-loc { font-size: .85rem; color: var(--orange); font-weight: 600; margin: 0 0 1rem; }
.kpis { list-style: none; padding: 1.2rem 0 0; margin: 1.2rem 0 0; display: flex; gap: 1.8rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.kpis li { font-size: .85rem; color: var(--muted); }
.kpis strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--teal); }

.download-line { text-align: center; margin-top: 2.8rem; }

/* Carte de réalisation cliquable */
.has-link { position: relative; }
.card-link {
  margin-top: 1.2rem; align-self: flex-start;
  font-weight: 600; color: var(--teal);
}
.card-link::after { content: ""; position: absolute; inset: 0; }
.has-link:hover .card-link { color: var(--orange); }

/* ===================== PAGE DÉTAIL RÉALISATION ===================== */
.back-link { display: inline-block; color: var(--muted); font-weight: 500; margin-bottom: 1.6rem; }
.back-link:hover { color: var(--teal); }
.detail-head .project-tag { margin-bottom: 1.2rem; }
.detail-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; max-width: 18ch; }
.detail-head .lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 0 2.2rem; }
.detail-meta {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, auto); gap: 2.4rem; justify-content: start;
}
.detail-meta li { display: flex; flex-direction: column; gap: .25rem; }
.detail-meta span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.detail-meta strong { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }

/* Avant / Après */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; align-items: start; }
.ba-item { position: relative; margin: 0; }
.ba-item img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft); object-fit: cover;
}
.ba-label {
  position: absolute; top: 14px; left: 14px;
  padding: .35rem .9rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700; color: #fff; letter-spacing: .05em;
}
.ba-before { background: var(--orange); }
.ba-after { background: var(--teal); }
.ba-item figcaption { margin-top: .9rem; font-size: .9rem; color: var(--muted); }

/* Corps détail */
.detail-body { max-width: 760px; }
.detail-body h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.detail-body p { color: var(--muted); font-size: 1.05rem; }
.detail-points { margin: 1.6rem 0; padding-left: 1.2rem; color: var(--muted); }
.detail-points li { margin-bottom: .5rem; }
.detail-kpis { border-top: 1px solid var(--line); margin-top: 2rem; }

/* ===================== PARTNERS ===================== */
.partners {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.2rem; grid-template-columns: repeat(5, 1fr);
}
.partner {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.5rem 1.2rem; display: flex; flex-direction: column; gap: .35rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.partner:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.partner-num { font-family: var(--serif); font-size: 1.1rem; color: var(--orange); font-weight: 700; }
.partner-logo { height: 52px; width: 100%; object-fit: contain; object-position: left center; margin: .2rem 0 .5rem; }
.partner strong { font-size: 1.02rem; }
.partner span:last-child { font-size: .8rem; color: var(--muted); }
.partner-self { background: var(--teal); border-color: var(--teal); }
.partner-self .partner-num { color: #fff; opacity: .7; }
.partner-self strong, .partner-self span:last-child { color: #fff; }

/* ===================== CTA ===================== */
.section-cta { background: var(--teal); color: #fff; text-align: center; }
.cta-inner { max-width: 640px; }
.section-cta h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.section-cta p { color: rgba(255, 255, 255, .85); font-size: 1.1rem; margin: 0 auto 2rem; max-width: 48ch; }
.section-cta .btn-primary { background: var(--orange); box-shadow: none; }
.section-cta .btn-primary:hover { background: var(--orange-dark); }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 2.6rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand strong { display: block; font-family: var(--serif); letter-spacing: .1em; color: #fff; }
.footer-brand span { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--orange); }
.footer-meta { text-align: right; display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.footer-mail { color: #fff; font-weight: 600; font-size: .95rem; }
.footer-mail:hover { color: var(--orange); }
.footer-tag { font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0; }
.footer-copy { font-size: .85rem; margin: 0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .logo-card { max-width: 340px; }
  .cards, .realisations { grid-template-columns: 1fr 1fr; }
  .partners { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .nav {
    display: flex; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--cream);
    border-bottom: 1px solid var(--line); padding: .5rem 0;
  }
  .site-header.open .nav a { padding: .9rem 24px; width: 100%; }
  .site-header.open .nav-cta { margin: .5rem 24px; text-align: center; justify-content: center; display: flex; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .cards, .realisations, .partners { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
  .hero-stats strong { font-size: 1.6rem; }
  .footer-meta { text-align: left; align-items: flex-start; }
}

/* Apparition au scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
