/* ==========================================================================
   Z&M Menuiserie — Feuille de style principale
   ========================================================================== */

:root {
  --bg: #faf8f5;
  --bg-alt: #f2ede6;
  --surface: #ffffff;
  --ink: #231f1c;
  --ink-muted: #5c534b;
  --accent: #8c5a2b;
  --accent-hover: #6e451f;
  --accent-light: #c89d66;
  --border: #e4ddd3;
  --dark: #1d1916;
  --dark-ink: #f7f3ed;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(35, 31, 28, 0.08);
  --shadow-md: 0 10px 30px rgba(35, 31, 28, 0.12);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --container: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dark);
  color: var(--dark-ink);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: var(--radius);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation
   ========================================================================== */

.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 6px;
  background: var(--dark);
  color: var(--dark-ink);
  border: 1.5px solid var(--accent-light);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Main
   ========================================================================== */

main {
  flex: 1;
}

/* Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: clamp(380px, 56vh, 560px);
  display: flex;
  align-items: center;
  background-color: var(--dark);
  color: var(--dark-ink);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.48;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(23, 19, 16, 0.85) 0%,
    rgba(23, 19, 16, 0.55) 55%,
    rgba(23, 19, 16, 0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-block: 4rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  color: #ffffff;
}

.hero p {
  font-size: 1.125rem;
  color: #ebe4db;
  margin: 0 0 2rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.btn-outline-light {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #ffffff;
}

/* Sections
   ========================================================================== */

.section {
  padding: 4rem 0;
  scroll-margin-top: 4.5rem;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}

.section-subtitle {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
  max-width: 60ch;
}

/* About / Savoir-faire
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 820px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.about-card h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

.about-card p {
  margin: 0 0 1rem;
  color: var(--ink);
}

.about-card p:last-child {
  margin-bottom: 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 520px) {
  .pillars {
    grid-template-columns: 1fr;
  }
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.pillar-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.pillar-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.gallery-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery-trigger img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Page Header (subpages)
   ========================================================================== */

.page-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 2.75rem 0;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0;
  line-height: 1.2;
}

.page-header p {
  margin: 0.6rem 0 0;
  color: var(--ink-muted);
  max-width: 62ch;
}

/* Legal & Prose Pages
   ========================================================================== */

.prose {
  max-width: 760px;
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

/* Contact CTA band
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 760px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.contact-card p {
  margin: 0;
  font-weight: 500;
}

/* Footer
   ========================================================================== */

.site-footer {
  background-color: var(--dark);
  color: var(--dark-ink);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 0.85rem;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  font-size: 0.92rem;
  color: #cfc6bc;
  margin: 0 0 0.45rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: #efe8df;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #a99f94;
}

/* Lightbox Dialog
   ========================================================================== */

.lightbox {
  border: 0;
  padding: 0;
  margin: auto;
  max-width: min(94vw, 1080px);
  max-height: 92vh;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(16, 13, 11, 0.88);
  backdrop-filter: blur(3px);
}

.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.75rem;
  gap: 0.75rem;
}

.lightbox-controls > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lightbox-counter {
  color: #e6dfd6;
  font-size: 0.9rem;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: rgba(35, 31, 28, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}
