/* ==========================================================================
   MOZAIC menuiserie — Menuiserie bois et agencement d'intérieur
   ========================================================================== */

:root {
  --wood-dark: #a85f1d;
  --wood-mid: #e69138;
  --wood-light: #f3c184;
  --wood-lighter: #fbeedd;
  --charcoal: #181410;
  --charcoal-hover: #2b241c;
  --ink: #1b1816;
  --ink-soft: #655f58;
  --bg: #ffffff;
  --bg-subtle: #f7f5f2;
  --white: #ffffff;
  --border: #e8e3da;

  --font-display: "Poppins", var(--font-base);
  --font-base: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-width: 1160px;
  --radius: 4px;
  --shadow: 0 14px 34px rgba(24, 20, 16, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.1rem; margin-bottom: 8px; letter-spacing: 0; }

p { margin: 0 0 16px; color: var(--ink-soft); }

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

ul, ol { padding: 0; margin: 0; list-style: none; }

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-subtle);
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wood-dark);
  margin-bottom: 12px;
}

.section-lead {
  max-width: 640px;
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--charcoal-hover);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-ghost:hover {
  background: var(--charcoal);
  color: var(--white);
}

/* ---------------- Top bar ---------------- */
.top-bar {
  background: var(--charcoal);
  color: var(--wood-lighter);
  font-size: 0.82rem;
}

.top-bar-inner {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding: 9px 24px;
}

.top-bar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(251, 238, 221, 0.9);
  font-weight: 600;
  transition: color 0.15s ease;
}

.top-bar a:hover { color: var(--white); }

.top-bar svg { width: 15px; height: 15px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.logo img {
  height: 36px;
  width: auto;
}

.mobile-panel {
  display: contents;
}

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--charcoal);
  border-color: var(--wood-mid);
}

.nav-cta { flex-shrink: 0; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 64px 0 48px;
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wood-dark);
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.08rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}

/* ---------------- Projects (home) ---------------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.project-item {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: center;
}

.project-item.reverse .project-visual { order: 2; }
.project-item.reverse .project-text { order: 1; }

.project-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.project-text p {
  font-size: 1rem;
}

.project-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--wood-dark);
  transition: gap 0.15s ease;
}

.project-more:hover { gap: 10px; }

/* ---------------- Gallery / Réalisations ---------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-item {
  margin: 0;
}

.gallery-visual {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.gallery-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.gallery-visual img:hover {
  transform: scale(1.04);
}

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 13, 10, 0.95);
  padding: 60px 80px;
}

.lightbox.open {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.lightbox-caption {
  margin-top: 16px;
  color: var(--white);
  font-size: 0.88rem;
  text-align: center;
  max-width: 60ch;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  line-height: 1;
  padding: 10px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 18px;
  right: 20px;
  font-size: 2rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.6rem;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ---------------- Articles ---------------- */
.article-list {
  display: flex;
  flex-direction: column;
  max-width: 780px;
}

.article-card {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.article-card:first-child {
  border-top: 1px solid var(--border);
}

.article-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wood-dark);
  font-weight: 600;
  margin-bottom: 8px;
}

.article-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.article-card:hover h2 { color: var(--wood-dark); }

.article-excerpt {
  margin: 0;
}

.article-hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-body {
  max-width: 740px;
  margin: 0 auto;
}

.article-body h2 {
  font-size: 1.35rem;
  margin-top: 40px;
}

.article-body h3 {
  font-size: 1.1rem;
  margin-top: 28px;
}

.article-body p,
.article-body li {
  font-size: 1rem;
  color: var(--ink);
}

.article-body ul {
  margin-bottom: 16px;
}

.article-body li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.article-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wood-mid);
}

.article-signature {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--ink);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: 32px;
}

/* ---------------- Contact strip ---------------- */
.contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.contact-detail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
  transition: border-color 0.15s ease;
  color: var(--ink);
}

.contact-detail svg { width: 18px; height: 18px; color: var(--wood-mid); flex-shrink: 0; }

.contact-detail:hover {
  border-color: var(--wood-mid);
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--charcoal);
  color: var(--wood-lighter);
  padding: 48px 0 24px;
}

.site-footer .logo img { filter: brightness(0) invert(1); }

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

.footer-brand p {
  color: rgba(251, 238, 221, 0.75);
  max-width: 320px;
  margin-top: 14px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: rgba(251, 238, 221, 0.85);
  font-weight: 600;
}

.footer-contact a:hover { color: var(--white); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-content: start;
  justify-content: flex-end;
}

.footer-nav a {
  color: rgba(251, 238, 221, 0.85);
  font-weight: 600;
  font-size: 0.92rem;
}

.footer-nav a:hover { color: var(--white); }

.footer-copy {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(251, 238, 221, 0.6);
  margin: 20px 0 0;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .project-item {
    grid-template-columns: 1fr;
  }

  .project-item.reverse .project-visual,
  .project-item.reverse .project-text {
    order: 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .top-bar { display: none; }

  .mobile-panel { display: none; }

  .menu-toggle { display: flex; }

  .site-header.nav-open .mobile-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px 24px;
    border-bottom: 1px solid var(--border);
  }

  .site-header.nav-open .main-nav {
    flex-direction: column;
    gap: 14px;
  }

  .site-header.nav-open .nav-cta {
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section { padding: 64px 0; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }

  .lightbox { padding: 24px 16px; }
  .lightbox-prev, .lightbox-next { font-size: 2rem; padding: 6px; }
  .lightbox-close { top: 10px; right: 12px; }
}
