/* =============================================
   DARIO PYTHON ÉBÉNISTERIE - Styles
   ============================================= */

/* --- Variables & Reset --- */
:root {
  --bg:        #faf7f2;
  --brown:     #2c1a0e;
  --accent:    #c8a882;
  --accent-dk: #a8865e;
  --tile-bg:   #e8e0d5;
  --text:      #3d2b1a;
  --text-muted:#7a6350;
  --white:     #ffffff;
  --card-bg:   #f4efe8;

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --radius: 4px;
  --shadow: 0 2px 20px rgba(44, 26, 14, 0.08);
  --shadow-lg: 0 8px 40px rgba(44, 26, 14, 0.14);

  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Utility --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--brown);
}
.btn-primary:hover {
  background: var(--accent-dk);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 168, 130, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full { width: 100%; justify-content: center; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(250, 247, 242, 0.0);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(250, 247, 242, 0.97);
  box-shadow: 0 1px 0 rgba(44, 26, 14, 0.08);
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.navbar .logo-main {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.3s;
}
.navbar.scrolled .logo-main { color: var(--brown); }
.navbar .logo-sub {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.navbar.scrolled .nav-link { color: var(--text-muted); }
.navbar.scrolled .nav-link:hover { color: var(--brown); }

.nav-cta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 20px;
  background: var(--accent);
  color: var(--brown);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.nav-cta:hover {
  background: var(--accent-dk);
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: background 0.3s, transform 0.3s;
}
.navbar.scrolled .nav-toggle span { background: var(--brown); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* To use a photo: replace the two lines below with:
     background: url('your-photo.jpg') center/cover no-repeat;
     Then remove .hero-texture or keep it as a dark overlay. */
  background: linear-gradient(145deg, #4a3c2e 0%, #372b20 50%, #2a2018 100%);
  overflow: hidden;
}

/* Wood grain overlay via CSS gradient stripes */
.hero-texture {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      92deg,
      transparent 0px,
      transparent 18px,
      rgba(255,255,255,0.012) 18px,
      rgba(255,255,255,0.012) 20px,
      transparent 20px,
      transparent 38px,
      rgba(0,0,0,0.02) 38px,
      rgba(0,0,0,0.02) 40px
    ),
    repeating-linear-gradient(
      88deg,
      transparent 0px,
      transparent 60px,
      rgba(255,255,255,0.015) 60px,
      rgba(255,255,255,0.015) 62px
    ),
    linear-gradient(
      160deg,
      rgba(44, 26, 14, 0.0) 0%,
      rgba(20, 10, 4, 0.5) 100%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  margin: 0 auto 0 max(24px, calc(50vw - 560px));
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-desc {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  max-width: 460px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  right: max(40px, calc(50vw - 520px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(200,168,130,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.7); opacity: 1; }
}

/* =============================================
   INTRO BAND
   ============================================= */
.intro-band {
  background: var(--brown);
  padding: 28px 0;
  border-top: 1px solid rgba(200,168,130,0.15);
}

.intro-grid {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.intro-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}
.intro-icon {
  color: var(--accent);
  font-size: 0.5rem;
}

/* =============================================
   SECTION HEADER (shared)
   ============================================= */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--brown);
  line-height: 1.15;
  margin-bottom: 18px;
}

.section-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =============================================
   RÉALISATIONS - Gallery
   ============================================= */
.realisations {
  background: var(--bg);
}

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

.gallery-tile {
  aspect-ratio: 4 / 3;
  background: var(--tile-bg);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter 0.2s ease, border-style 0.2s ease, border-color 0.2s ease;
  display: flex;
}

.gallery-tile:hover {
  filter: brightness(1.05);
  border-style: solid;
  border-color: var(--accent-dk);
}

.tile-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.tile-plus {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  transition: color 0.2s;
}
.gallery-tile:hover .tile-plus { color: var(--accent-dk); }

.tile-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* =============================================
   SERVICES
   ============================================= */
.services {
  background: var(--card-bg);
  position: relative;
}
.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    91deg,
    transparent 0px, transparent 28px,
    rgba(44,26,14,0.018) 28px, rgba(44,26,14,0.018) 30px
  );
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}

.service-card {
  background: var(--bg);
  border: 1px solid rgba(200,168,130,0.2);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
/* Centre the last row if 5 cards in 3-col grid */
.services-grid .service-card:nth-child(4) {
  grid-column: 1;
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(200,168,130,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}

.contact-block {
  margin-bottom: 40px;
}
.contact-block:last-child { margin-bottom: 0; }

.contact-block-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(200,168,130,0.25);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}
.contact-item-icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.contact-link {
  color: var(--text);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--accent-dk); }

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}
.hours-list li {
  display: flex;
  justify-content: space-between;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200,168,130,0.12);
}
.hours-list li:last-child { border-bottom: none; }
.hours-list span:first-child { color: var(--text-muted); }

/* --- Form --- */
.contact-form-wrap {
  background: var(--card-bg);
  border: 1px solid rgba(200,168,130,0.2);
  border-radius: var(--radius);
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid rgba(200,168,130,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input::placeholder { color: rgba(122, 99, 80, 0.45); }
.form-input:focus { border-color: var(--accent); }

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -4px;
}

.form-success {
  display: none;
  background: rgba(200,168,130,0.15);
  border: 1px solid rgba(200,168,130,0.4);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--brown);
  text-align: center;
}
.form-success.visible { display: block; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--brown);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer .logo-main {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}
.footer .logo-sub {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: 6px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  width: 100%;
  text-align: center;
}

/* =============================================
   ANIMATIONS
   ============================================= */
.fade-in,
.fade-in-up {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in { transform: translateY(0); }
.fade-in-up { transform: translateY(24px); }

.fade-in.visible,
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger gallery & services children */
.gallery-tile:nth-child(1) { transition-delay: 0.05s; }
.gallery-tile:nth-child(2) { transition-delay: 0.10s; }
.gallery-tile:nth-child(3) { transition-delay: 0.15s; }
.gallery-tile:nth-child(4) { transition-delay: 0.20s; }
.gallery-tile:nth-child(5) { transition-delay: 0.25s; }
.gallery-tile:nth-child(6) { transition-delay: 0.30s; }
.gallery-tile:nth-child(7) { transition-delay: 0.35s; }
.gallery-tile:nth-child(8) { transition-delay: 0.40s; }
.gallery-tile:nth-child(9) { transition-delay: 0.45s; }

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.12s; }
.service-card:nth-child(3) { transition-delay: 0.19s; }
.service-card:nth-child(4) { transition-delay: 0.26s; }
.service-card:nth-child(5) { transition-delay: 0.33s; }

.intro-item:nth-child(1) { transition-delay: 0.05s; }
.intro-item:nth-child(2) { transition-delay: 0.12s; }
.intro-item:nth-child(3) { transition-delay: 0.19s; }

/* =============================================
   RESPONSIVE - Tablet (≤ 900px)
   ============================================= */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid .service-card:nth-child(4) {
    grid-column: auto;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 0;
    border-top: 1px solid rgba(200,168,130,0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    color: var(--text);
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid rgba(200,168,130,0.1);
    font-size: 0.9rem;
  }
  .nav-cta {
    margin-top: 16px;
    width: 100%;
    text-align: center;
  }
  .nav-toggle { display: flex; }
  .navbar .logo-main { color: var(--brown); }
  .navbar { background: rgba(250, 247, 242, 0.97); box-shadow: 0 1px 0 rgba(44,26,14,0.08); }
  .navbar .nav-link { color: var(--text-muted); }
  .navbar .nav-toggle span { background: var(--brown); }
}

/* =============================================
   RESPONSIVE - Mobile (≤ 560px)
   ============================================= */
@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding-top: calc(var(--nav-h) + 32px);
    padding-bottom: 60px;
    margin-left: 0;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .contact-form-wrap { padding: 24px; }
  .intro-grid { gap: 28px; }
  .hero-scroll-hint { display: none; }
}
