/* Ébénisterie Mathieu Gagnon : noyer foncé, papier chaud et or du logo. */
:root {
  --ink: #1f1b17;
  --ink-2: #2b2621;
  --text: #2d2925;
  --muted: #6b645c;
  --paper: #f7f4ef;
  --paper-2: #efe9e0;
  --line: #e2dbd0;
  --gold: #fdc300;
  --gold-deep: #9a7400;
  --white: #fff;
  --radius: 10px;
  --wrap: 1180px;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.65 var(--body); color: var(--text); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.08; letter-spacing: .01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.eyebrow { font: 600 .82rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section-title { position: relative; padding-bottom: 14px; margin-bottom: 28px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: var(--gold); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font: 600 .98rem/1.2 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ffd23f; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.link-arrow, .link-back { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.link-arrow::after { content: " \2192"; }
.link-back::before { content: "\2190  "; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--white); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }
.brand img { width: 96px; height: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: #e9e3da; text-decoration: none; font-weight: 500; font-size: .96rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.nav .nav-phone { color: var(--white); font-weight: 600; }
.nav .nav-cta { color: var(--ink); padding: 10px 18px; }
.nav .nav-cta:hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Accueil */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--ink); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,17,14,.25) 0%, rgba(20,17,14,.35) 45%, rgba(20,17,14,.88) 100%); }
.hero-content { position: relative; padding-top: 120px; padding-bottom: 72px; width: 100%; }
.hero h1 { color: var(--white); max-width: 820px; }
.hero .eyebrow { color: var(--gold); display: block; font-family: var(--body); text-transform: uppercase; }
.hero .lead { color: #e9e3da; }
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.intro { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; padding-top: 88px; padding-bottom: 88px; }
.intro-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; align-content: start; }
.intro-points li { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 18px 20px; }
.intro-points strong { display: block; font: 700 1.3rem/1.2 var(--head); text-transform: uppercase; color: var(--ink); letter-spacing: .02em; }
.intro-points span { color: var(--muted); font-size: .97rem; }

.services { background: var(--white); padding: 88px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service { background: var(--paper); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.service img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.service-body { padding: 20px 20px 22px; }
.service-body p { color: var(--muted); font-size: .96rem; margin: 0; }

.featured { padding-top: 88px; padding-bottom: 88px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.process { background: var(--ink); color: #d9d2c8; padding: 88px 0; }
.process .section-title { color: var(--white); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps h3 { color: var(--white); margin-top: 14px; }
.steps p { font-size: .97rem; margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); font: 700 1.3rem/1 var(--head); }

.cta { background: var(--gold); padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0; color: var(--ink-2); }
.cta .cta-actions { margin-top: 0; }
.cta .btn-gold { background: var(--ink); color: var(--white); }
.cta .btn-gold:hover { background: var(--ink-2); }
.cta .btn-ghost { border-color: var(--ink); color: var(--ink); }

/* Réalisations */
.page-head { padding: 72px 0 40px; }
.page-head-project { padding-top: 40px; }
.page-head-project h1 { margin-top: 18px; font-size: clamp(2rem, 5vw, 3.4rem); }
.project-details { color: var(--gold-deep); font-weight: 600; letter-spacing: .04em; }
.project-desc { max-width: 760px; color: var(--muted); }
.gallery-section { padding-bottom: 88px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { font: 500 .92rem/1 var(--body); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--ink); text-decoration: none; aspect-ratio: 4 / 3; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.project-card:hover img { transform: scale(1.04); opacity: .9; }
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(20,17,14,.55) 60%, rgba(20,17,14,.92)); }
.project-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 20px; color: var(--white); display: grid; gap: 4px; }
.project-title { font: 700 1.35rem/1.15 var(--head); color: var(--white); margin: 0; }
.project-count { font-size: .85rem; color: #d9d2c8; }
.tag { justify-self: start; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--gold); padding: 4px 9px; border-radius: 4px; }
.project-card[hidden] { display: none; }
.empty { color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 88px; }
.photo { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photo:hover img { transform: scale(1.03); }
.photo-wide { grid-column: span 2; grid-row: span 2; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,10,8,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; border-radius: 6px; }
.lb-btn { position: absolute; background: rgba(255,255,255,.1); color: var(--white); border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #d9d2c8; font-size: .9rem; }

/* Nous joindre */
.contact-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 32px; align-items: start; padding-bottom: 88px; }
.contact-card, .form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-card { background: var(--ink); color: #d9d2c8; border-color: var(--ink); }
.contact-card h2 { color: var(--white); font-size: 1.8rem; }
.contact-card dl { margin: 0; }
.contact-card dt { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 18px; }
.contact-card dd { margin: 4px 0 0; color: var(--white); }
.contact-card a { color: var(--white); }
.form-card h2 { font-size: 1.9rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font: 400 1rem/1.4 var(--body); color: var(--text); padding: 12px 14px; border: 1px solid #cfc6b8; border-radius: 8px; background: var(--white); }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(253,195,0,.45); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: .88rem; margin: 6px 0 0; }
.req { color: #b3261e; }
.form-note { font-size: .88rem; color: var(--muted); }
.notice { border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; }
.notice-error { background: #fdecea; color: #7a1c15; }
.notice-ok { background: #f3f8ec; border: 1px solid #cfe3b5; padding: 24px; margin: 0; }
.notice-ok h2 { font-size: 1.6rem; }

/* Pied de page */
.site-footer { background: #171411; color: #b9b1a6; padding: 64px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
.footer-logo { width: 130px; }
.footer-title { font: 700 1.05rem/1.2 var(--head); margin: 0 0 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--white); margin-bottom: 12px; }
.site-footer a { color: #e9e3da; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: .85rem; }

/* Tablette */
@media (max-width: 1020px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-card { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); padding: 8px 20px 24px; border-top: 1px solid rgba(255,255,255,.08); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 1.05rem; }
  .nav .nav-cta { margin-top: 16px; border-bottom: 0; }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
}

/* Téléphone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .service-grid, .steps, .project-grid, .row-2, .footer-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .photo-wide { grid-column: span 2; grid-row: auto; }
  .intro, .featured, .services, .process { padding-top: 60px; padding-bottom: 60px; }
  .hero-content { padding-bottom: 48px; }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 100%; }
  .contact-card, .form-card { padding: 22px; }
  .brand img { width: 80px; }
  .header-inner { min-height: 66px; }
  .nav { inset: 66px 0 auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
