/* Les Compères du Bâtiment — styles
   Direction artistique : artisan français, sobre, éditorial.
   Pas de gradient, pas de glassmorphism, pas d'icônes décoratives. */

:root {
  --ink: #211d19;
  --ink-soft: #4a433c;
  --cream: #f6f1e8;
  --paper: #fbf8f2;
  --white: #ffffff;
  --line: #e3d9c8;
  --brick: #963a25;
  --brick-dark: #7a2e1c;
  --wood: #a9805a;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, "Segoe UI", sans-serif;

  --container: 1120px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-soft); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 0.9em;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
}
.btn-primary {
  background: var(--brick);
  color: var(--white);
}
.btn-primary:hover { background: var(--brick-dark); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.1;
}
.brand-name span { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: 0.96rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--brick); }
.nav-phone { display: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 76px 0 0 0; background: var(--paper);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 24px; transform: translateY(-8px);
    opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: 16px 4px; }
  .nav-phone { display: block; margin-top: 18px; }
  .nav-phone .btn { width: 100%; justify-content: center; }
}

/* Hero */
.hero { padding: 64px 0 80px; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero .container > * { min-width: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.hero-media { position: relative; }
.hero-media figcaption {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(33,29,25,0.82); color: var(--white);
  font-size: 0.78rem; padding: 8px 12px; border-radius: var(--radius);
  max-width: calc(100% - 32px);
}
@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { order: -1; }
  /* On a smaller photo the overlay caption covers too much of the image —
     drop it below the photo instead of floating on top of it. */
  .hero-media { position: static; }
  .hero-media figcaption {
    position: static; margin-top: 10px;
    background: none; color: var(--ink-soft);
    padding: 0; font-size: 0.82rem; max-width: none;
  }
}

/* Section spacing */
.section { padding: 72px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 44px; }
@media (max-width: 700px) { .section { padding: 52px 0; } }

/* Services editorial list */
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid; grid-template-columns: 90px 1fr; gap: 28px;
  padding: 34px 0; border-bottom: 1px solid var(--line);
}
.service-num { font-family: var(--font-display); font-size: 2rem; color: var(--brick); font-weight: 600; }
.service-row h3 { margin-bottom: 0.35em; }
.service-row p { margin: 0; max-width: 62ch; }
@media (max-width: 620px) {
  .service-row { grid-template-columns: 1fr; gap: 8px; }
  .service-num { font-size: 1.5rem; }
}

/* Case study */
.case-figure { margin: 0 0 32px; }
.case-figure img { width: 100%; border-radius: var(--radius); }
.case-figure figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.case-grid > * { min-width: 0; }
.case-list { list-style: none; margin: 0; padding: 0; }
.case-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.case-list li::before { content: "— "; color: var(--brick); font-weight: 600; }
@media (max-width: 800px) { .case-grid { grid-template-columns: 1fr; } }

.support-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.support-row figure { margin: 0; }
.support-row img { width: 100%; border-radius: var(--radius); }
.support-row figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 8px; }
@media (max-width: 640px) { .support-row { grid-template-columns: 1fr; } }

/* Founders */
.founders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 40px; }
.founders > * { min-width: 0; }
.founder-card { border: 1px solid var(--line); background: var(--paper); padding: 28px; border-radius: var(--radius); }
.founder-card .role { color: var(--brick); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.6em; display:block; }
@media (max-width: 700px) { .founders { grid-template-columns: 1fr; } }

/* Zone */
.zone-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.zone-grid > * { min-width: 0; }
.commune-list { list-style: none; margin: 20px 0 0; padding: 0; columns: 2; gap: 24px; }
.commune-list li { padding: 8px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.commune-list li.is-base { font-weight: 700; }
@media (max-width: 800px) { .zone-grid { grid-template-columns: 1fr; } .commune-list { columns: 1; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-card { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 32px; }
.contact-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: none; }
.contact-line .label { flex: 0 0 100px; font-weight: 600; font-size: 0.88rem; color: var(--ink-soft); }
.contact-line a, .contact-line span:last-child { text-decoration: none; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.contact-line a:hover { color: var(--brick); }
@media (max-width: 420px) {
  .contact-line { flex-direction: column; gap: 4px; }
  .contact-line .label { flex-basis: auto; }
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

form.quote-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row > * { min-width: 0; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
}
textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
.form-status { margin-top: 12px; font-size: 0.92rem; font-weight: 600; }
.form-status[hidden] { display: none; }

/* CTA band */
.cta-band { background: var(--ink); color: var(--white); }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #d8d0c4; }
.cta-band .btn-secondary { border-color: var(--white); color: var(--white); }
.cta-band .btn-secondary:hover { background: var(--white); color: var(--ink); }

/* Footer */
/* Dark footer — continues the .cta-band's black straight into the page's
   last section instead of bouncing back to cream and breaking the flow. */
.site-footer { background: var(--ink); padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid > div { min-width: 0; }
.footer-grid h4 { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; color: #948a7b; }
.footer-grid p { color: #c9beae; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; overflow-wrap: anywhere; color: #d8d0c4; }
.footer-grid a:hover { color: #e7b9a6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 20px; font-size: 0.85rem; color: #948a7b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* Page hero (interior pages) */
.page-hero { padding: 56px 0 24px; }
.page-hero .eyebrow { margin-bottom: 0.6em; }
.page-hero .lede { max-width: 60ch; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white);
  padding: 12px 18px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }
