/* ============================================================
   PEBA33 — Ingénierie Structure & Architecture Intérieure
   Direction : fond crème continu, la couleur portée par le texte
   Bodoni Moda / Jost — #1E3A2A / #7A1E2B sur #F6F1E5
   ============================================================ */

:root {
  --cream: #F6F1E5;
  --forest: #1E3A2A;
  --garnet: #7A1E2B;
  --ink: #2A362E;
  --muted: rgba(42, 54, 46, 0.68);
  --line: rgba(30, 58, 42, 0.3);
  --hairline: rgba(30, 58, 42, 0.15);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Jost", sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(24px, 5vw, 56px); }

::selection { background: var(--garnet); color: var(--cream); }

/* ---------- Typographie ---------- */

h1, h2, h3 {
  font-family: "Bodoni Moda", serif;
  font-weight: 400;
  line-height: 1.08;
  color: var(--forest);
}

h1 { font-size: clamp(3rem, 7.2vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.14; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.3; }

.accent-i { font-style: italic; color: var(--garnet); }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.85; color: var(--ink); }
.muted { color: var(--muted); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--garnet);
}

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

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
header.solid {
  background: rgba(246, 241, 229, 0.94);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(24px, 5vw, 56px);
  max-width: var(--max);
  margin: 0 auto;
}

.logo {
  font-family: "Bodoni Moda", serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--forest);
  text-decoration: none;
}
.logo em { font-style: italic; font-weight: 400; color: var(--garnet); }

.nav-links { display: flex; gap: 44px; list-style: none; }
.nav-links a {
  position: relative;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--forest);
  padding-bottom: 6px;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--garnet); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--garnet);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after, .nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a.active { color: var(--garnet); }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 26px; height: 1px; background: var(--forest); margin: 6px 0; }

/* ---------- Hero principal ---------- */

.hero-full {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 170px 0 90px;
  border-bottom: 1px solid var(--hairline);
}
.hero-full::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: clamp(24px, 5vw, 56px);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--hairline) 22%, var(--hairline) 78%, transparent);
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--garnet);
  margin-bottom: 3rem;
}

.hero-tagline {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--garnet);
  margin-top: 2.4rem;
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(3rem, 7vh, 5.5rem);
  flex-wrap: wrap;
}
.hero-poles { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-poles .pole {
  font-size: 0.72rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--forest);
}
.hero-poles .rule { width: 1px; height: 30px; background: var(--garnet); }

.hero-lede {
  max-width: 420px;
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--muted);
}

/* Entrée orchestrée */
.rise { opacity: 0; transform: translateY(26px); animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.rise-1 { animation-delay: 0.1s; }
.rise-2 { animation-delay: 0.28s; }
.rise-3 { animation-delay: 0.46s; }
.rise-4 { animation-delay: 0.66s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Hero secondaire ---------- */

.hero-sub {
  padding: 200px 0 100px;
  border-bottom: 1px solid var(--hairline);
}
.hero-sub .eyebrow { display: block; margin-bottom: 2rem; }
.hero-sub .lead { max-width: 640px; margin-top: 2.2rem; color: var(--muted); }

/* ---------- Sections ---------- */

section { padding: clamp(90px, 11vw, 140px) 0; }

.section-line { border-top: 1px solid var(--hairline); }

.section-head { margin-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.section-head .eyebrow { display: block; margin-bottom: 1.6rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(44px, 7vw, 110px);
  align-items: start;
}

/* ---------- Listes éditoriales numérotées ---------- */

.metiers { list-style: none; }
.metiers li {
  display: grid;
  grid-template-columns: 120px 1fr 1.25fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: baseline;
  padding: clamp(2.6rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--hairline);
}
.metiers li:last-child { border-bottom: 1px solid var(--hairline); }
.metiers .num {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--garnet);
  line-height: 1;
}
.metiers p { font-size: 0.98rem; line-height: 1.85; color: var(--muted); }
.metiers p + p { margin-top: 1rem; }
.metiers .lien { margin-top: 1.6rem; }

/* ---------- Lien élégant ---------- */

.lien {
  display: inline-block;
  position: relative;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--garnet);
  padding-bottom: 7px;
}
.lien::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left;
}
.lien:hover::after { transform: scaleX(0.4); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  padding: 17px 46px;
  font-family: "Jost", sans-serif;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--forest);
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  transition: background 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.4s, border-color 0.4s;
}
.btn:hover { background: var(--forest); color: var(--cream); }

.btn-garnet { border-color: var(--garnet); color: var(--garnet); }
.btn-garnet:hover { background: var(--garnet); color: var(--cream); }

.cta-row { display: flex; gap: 22px; align-items: center; margin-top: 3rem; flex-wrap: wrap; }

/* ---------- Chiffres ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
}
.stats > div {
  padding: 2.6rem clamp(1rem, 3vw, 3rem) 0;
  border-left: 1px solid var(--hairline);
}
.stats > div:first-child { border-left: none; padding-left: 0; }
.stat-num {
  font-family: "Bodoni Moda", serif;
  font-size: clamp(2rem, 3.4vw, 3rem);
  color: var(--forest);
  line-height: 1.1;
}
.stat-num em { font-style: italic; color: var(--garnet); }
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.8rem;
}

/* ---------- Méthode (séquence) ---------- */

.methode {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
}
.methode li {
  padding: 2.6rem clamp(1rem, 2.5vw, 2.4rem) 0;
  border-left: 1px solid var(--hairline);
}
.methode li:first-child { border-left: none; padding-left: 0; }
.methode .m-num {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--garnet);
}
.methode h3 { font-size: 1.25rem; margin: 0.9rem 0 0.8rem; }
.methode p { font-size: 0.92rem; line-height: 1.8; color: var(--muted); }

/* ---------- Prestations détaillées ---------- */

.prest-block { padding: clamp(4rem, 7vw, 6.5rem) 0; border-top: 1px solid var(--hairline); }
.prest-block:first-child { border-top: none; padding-top: 0; }
.prest-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: baseline;
}
.prest-head .num {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  color: var(--garnet);
  line-height: 1;
}
.prest-intro {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(24px, 4vw, 64px);
  margin: 1.8rem 0 3rem;
}
.prest-intro p { max-width: 62ch; color: var(--muted); }
.prest-list { list-style: none; }
.prest-list li {
  display: grid;
  grid-template-columns: 120px 250px 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding: 2.1rem 0;
  border-top: 1px solid var(--hairline);
}
.prest-list li > span:first-child { visibility: hidden; }
.prest-list .p-title {
  font-family: "Bodoni Moda", serif;
  font-size: 1.18rem;
  color: var(--forest);
  line-height: 1.35;
}
.prest-list p { font-size: 0.96rem; line-height: 1.85; color: var(--muted); }

/* ---------- Réalisations ---------- */

.projets { display: grid; gap: clamp(70px, 9vw, 120px); }

.projet {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  text-decoration: none;
}
.projet:nth-child(even) { grid-template-columns: 5fr 7fr; }
.projet:nth-child(even) .projet-visuel { order: 2; }

.projet-visuel {
  position: relative;
  aspect-ratio: 16 / 11;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
}
.projet-visuel svg { width: 56%; height: auto; transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.projet-visuel img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.projet:hover .projet-visuel svg, .projet:hover .projet-visuel img { transform: scale(1.03); }

.projet-meta .idx {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--garnet);
}
.projet-meta .cat {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--garnet);
  margin: 1.2rem 0 0.9rem;
}
.projet-meta h3 { max-width: 24ch; }
.projet-meta p { font-size: 0.95rem; line-height: 1.85; color: var(--muted); margin-top: 1rem; max-width: 46ch; }

/* ---------- Contact ---------- */

.contact-info .big {
  display: inline-block;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--forest);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.3s;
}
.contact-info .big:hover { color: var(--garnet); }
.contact-info p { margin-bottom: 1.4rem; }
.contact-detail { font-size: 0.95rem; color: var(--muted); line-height: 1.9; }

form label {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 30px 0 10px;
  color: var(--forest);
}
form input, form textarea {
  width: 100%;
  padding: 12px 2px;
  font-family: "Jost", sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.3s;
}
form input:focus, form textarea:focus {
  outline: none;
  border-bottom-color: var(--garnet);
  box-shadow: 0 1px 0 var(--garnet);
}
form input:focus-visible, form textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--garnet);
  outline-offset: 3px;
}
form textarea { min-height: 120px; resize: vertical; }
form .btn { margin-top: 40px; }
.form-note { font-size: 0.8rem; margin-top: 20px; color: var(--muted); }
.form-note a { color: var(--garnet); }

/* ---------- CTA final ---------- */

.cta-final { text-align: center; border-top: 1px solid var(--hairline); }
.cta-final h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.cta-final p { max-width: 520px; margin: 1.8rem auto 0; color: var(--muted); }
.cta-final .cta-row { justify-content: center; }

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

footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(70px, 9vw, 100px) 0 40px;
  font-size: 0.94rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 56px;
  margin-bottom: clamp(50px, 7vw, 80px);
}
footer .logo { font-size: 1.6rem; }
.footer-tag {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 1.15rem;
  margin-top: 1.1rem;
  color: var(--garnet);
}
.footer-desc { margin-top: 1.4rem; max-width: 40ch; line-height: 1.85; }
footer h4 {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 1.4rem;
}
footer ul { list-style: none; }
footer li { margin-bottom: 10px; line-height: 1.7; }
footer a { text-decoration: none; transition: color 0.3s; }
footer a:hover { color: var(--garnet); }
.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.footer-bottom a { text-decoration: none; border-bottom: 1px solid var(--hairline); }
.footer-bottom a:hover { color: var(--garnet); }

/* ---------- Mentions légales ---------- */

.legal { padding-top: 200px; }
.legal h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-top: 1.6rem; }
.legal h2 { font-size: 1.35rem; margin: 3rem 0 0.9rem; }
.legal p { max-width: 680px; color: var(--muted); }

/* ---------- Révélation au défilement ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .rise { opacity: 1; transform: none; transition: none; animation: none; }
  .projet-visuel svg, .projet-visuel img { transition: none; }
}

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

@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; gap: 48px; }
  .metiers li { grid-template-columns: 64px 1fr; }
  .metiers li > div:last-child { grid-column: 2; }
  .prest-head, .prest-intro { grid-template-columns: 64px 1fr; }
  .prest-list li { grid-template-columns: 1fr; gap: 10px; padding: 1.8rem 0; }
  .prest-list li > span:first-child { display: none; }
  .projet, .projet:nth-child(even) { grid-template-columns: 1fr; align-items: start; }
  .projet:nth-child(even) .projet-visuel { order: 0; }
  .stats, .methode { grid-template-columns: 1fr; border-top: none; }
  .stats > div, .methode li { border-left: none; border-top: 1px solid var(--hairline); padding: 2rem 0 0; margin-bottom: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-full { min-height: auto; padding: 160px 0 80px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    gap: 0;
    padding: 16px clamp(24px, 5vw, 56px) 28px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 13px 0; }
  .burger { display: block; }
}

/* ---------- Illustrations ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.hero-art svg { width: 100%; height: auto; }

.metiers li { grid-template-columns: 110px 1fr 1.15fr 200px; align-items: center; }
.metiers .m-art { align-self: center; }
.metiers .m-art svg { width: 100%; height: auto; }

.prest-block { scroll-margin-top: 120px; }

/* ---------- Page en construction ---------- */

.construction {
  text-align: center;
  padding: clamp(40px, 6vw, 70px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
}
.construction svg { width: min(340px, 70%); height: auto; margin: 0 auto 2.4rem; }
.construction h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.construction p { max-width: 54ch; margin: 1.4rem auto 0; color: var(--muted); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; }
  .metiers li { grid-template-columns: 64px 1fr; }
  .metiers .m-art { grid-column: 2; max-width: 260px; margin-top: 0.6rem; }
}
