/* ============================================
   CK Formes — Gravure & création bois
   Mobile-first, warm wood palette
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bois-fonce: #3B2316;
  --bois-moyen: #6B4226;
  --bois-chaud: #8B5E3C;
  --bois-clair: #C4956A;
  --beige: #F5E6D3;
  --creme: #FDF8F2;
  --blanc: #FFFFFF;
  --noir: #1A1109;
  --accent: #A0714F;
  --text-dark: #2C1A0E;
  --text-light: #F5E6D3;
  --overlay: rgba(27, 16, 8, 0.55);
  --shadow: 0 4px 24px rgba(59, 35, 22, 0.12);
  --shadow-hover: 0 8px 32px rgba(59, 35, 22, 0.22);
  --radius: 8px;
  --transition: 0.3s ease;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--creme);
  overflow-x: hidden;
}

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

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

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
  background: transparent;
}

.site-header.scrolled {
  background: rgba(59, 35, 22, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.header-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}

/* Desktop nav */
.nav-desktop {
  display: none;
  gap: 28px;
}

.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blanc);
  letter-spacing: 0.02em;
  transition: opacity var(--transition);
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bois-clair);
  transition: width var(--transition);
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* Burger */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanc);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: var(--bois-fonce);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 80px 32px 32px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: var(--beige);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav a {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--beige);
  transition: color var(--transition);
}

.mobile-nav a:hover {
  color: var(--bois-clair);
}

/* Backdrop */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bois-fonce) url('img/logo.png') center / cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(59, 35, 22, 0.85), rgba(107, 66, 38, 0.7)),
    url('img/portecles-qrcode.jpg') center / cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.hero-logo {
  width: 160px;
  height: auto;
  margin: 0 auto 24px;
  filter: brightness(1.1) drop-shadow(0 4px 16px rgba(0,0,0,0.3));
  border-radius: 8px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--beige);
  line-height: 1.6;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

.btn-discover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  border: 2px solid var(--bois-clair);
  color: var(--beige);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}

.btn-discover:hover {
  background: var(--bois-clair);
  color: var(--bois-fonce);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 72px 0;
}

.section--light {
  background: var(--creme);
}

.section--warm {
  background: var(--beige);
}

.section--dark {
  background: var(--bois-fonce);
  color: var(--text-light);
}

.section--contact {
  background: var(--bois-fonce);
  color: var(--text-light);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.3;
}

.section--dark .section-title,
.section--contact .section-title {
  color: var(--beige);
}

.section-intro {
  font-size: 1rem;
  line-height: 1.8;
  text-align: center;
  max-width: 620px;
  margin: 0 auto 32px;
  opacity: 0.9;
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 32px 0 16px;
  text-align: center;
}

/* ============================================
   SECTION 2 — ARTISAN
   ============================================ */
.artisan-text {
  max-width: 620px;
  margin: 0 auto 36px;
  text-align: center;
}

.artisan-text p {
  margin-bottom: 12px;
}

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

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-icon {
  font-size: 1.2rem;
  color: var(--bois-chaud);
  flex-shrink: 0;
}

/* ============================================
   SECTION 3 — GRAVURE BOIS
   ============================================ */
.product-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.product-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.offer-list {
  list-style: none;
  max-width: 480px;
  margin: 0 auto;
}

.offer-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid rgba(139, 94, 60, 0.15);
  font-size: 0.95rem;
}

.offer-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--bois-chaud);
  font-size: 1rem;
}

.offer-list--light li {
  border-bottom-color: rgba(245, 230, 211, 0.2);
}

/* ============================================
   SECTION 4 — GRAVURE CARRELAGE
   ============================================ */
.parallax-section {
  position: relative;
}

.carrelage-showcase {
  max-width: 500px;
  margin: 0 auto 32px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.carrelage-showcase img {
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
}

/* ============================================
   SECTION 5 — GALLERY
   ============================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ============================================
   SECTION 6 — CONTACT
   ============================================ */
.contact-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.btn-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  padding: 16px 36px;
  background: var(--bois-chaud);
  color: var(--blanc);
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(139, 94, 60, 0.4);
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-phone:hover {
  background: var(--bois-clair);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(139, 94, 60, 0.5);
}

.btn-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 28px;
  background: transparent;
  border: 2px solid var(--bois-clair);
  color: var(--beige);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-email:hover {
  background: var(--bois-clair);
  color: var(--bois-fonce);
  transform: translateY(-2px);
}

.separator {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 28px;
  max-width: 400px;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(245, 230, 211, 0.25);
}

.separator span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bois-clair);
}

.contact-form {
  max-width: 460px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--bois-clair);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(245, 230, 211, 0.08);
  border: 1px solid rgba(245, 230, 211, 0.2);
  border-radius: var(--radius);
  color: var(--beige);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition), background var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(245, 230, 211, 0.35);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--bois-clair);
  background: rgba(245, 230, 211, 0.12);
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--bois-chaud);
  color: var(--blanc);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}

.btn-submit:hover {
  background: var(--bois-clair);
  transform: translateY(-1px);
}

.form-success {
  text-align: center;
  padding: 40px 20px;
  max-width: 400px;
  margin: 0 auto;
}

.form-success svg {
  color: #6DBF6D;
  margin-bottom: 16px;
}

.form-success p {
  color: var(--beige);
  font-size: 1rem;
  line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--noir);
  color: var(--beige);
  text-align: center;
  padding: 40px 20px 24px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-logo {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  border-radius: 4px;
  object-fit: contain;
}

.footer-brand p {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.footer-phone {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--bois-clair);
  transition: color var(--transition);
}

.footer-phone:hover {
  color: var(--beige);
}

.footer-email {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--bois-clair);
  transition: color var(--transition);
}

.footer-email:hover {
  color: var(--beige);
}

.footer-sep {
  width: 60px;
  height: 1px;
  background: rgba(245, 230, 211, 0.2);
  margin: 0 auto 16px;
}

.footer-credits {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-credits a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.5;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox:not([hidden]) {
  display: flex;
}

.lightbox.visible {
  opacity: 1;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.visible .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2.5rem;
  color: var(--blanc);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  z-index: 1010;
  transition: opacity var(--transition);
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--blanc);
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  transition: background var(--transition);
  z-index: 1010;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in for hero */
.reveal-fade {
  opacity: 0;
  transition: opacity 1s ease;
}

.reveal-fade.visible {
  opacity: 1;
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(192, 149, 106, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(192, 149, 106, 0);
  }
}

.pulse {
  animation: pulse 2.5s infinite;
}

/* Stagger feature items */
.features .feature:nth-child(1) { transition-delay: 0s; }
.features .feature:nth-child(2) { transition-delay: 0.1s; }
.features .feature:nth-child(3) { transition-delay: 0.2s; }
.features .feature:nth-child(4) { transition-delay: 0.3s; }

/* Gallery stagger */
.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: 0.08s; }
.gallery-item:nth-child(3) { transition-delay: 0.16s; }
.gallery-item:nth-child(4) { transition-delay: 0.24s; }
.gallery-item:nth-child(5) { transition-delay: 0.32s; }
.gallery-item:nth-child(6) { transition-delay: 0.40s; }

/* Offer list stagger */
.offer-list li:nth-child(1) { transition-delay: 0s; }
.offer-list li:nth-child(2) { transition-delay: 0.08s; }
.offer-list li:nth-child(3) { transition-delay: 0.08s; }
.offer-list li:nth-child(4) { transition-delay: 0.16s; }
.offer-list li:nth-child(5) { transition-delay: 0.24s; }

/* ============================================
   RESPONSIVE — TABLET (min 600px)
   ============================================ */
@media (min-width: 600px) {
  .section {
    padding: 96px 0;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .hero-logo {
    width: 200px;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .features {
    grid-template-columns: 1fr 1fr;
    max-width: 640px;
  }

  .product-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .product-card img {
    height: 280px;
  }

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

  .gallery-item img {
    height: 200px;
  }
}

/* ============================================
   RESPONSIVE — DESKTOP (min 900px)
   ============================================ */
@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }

  .burger {
    display: none;
  }

  .section {
    padding: 120px 0;
  }

  .section-title {
    font-size: 2.6rem;
  }

  .section-intro {
    font-size: 1.1rem;
  }

  .hero-logo {
    width: 220px;
  }

  .hero-tagline {
    font-size: 1.35rem;
  }

  .product-card img {
    height: 320px;
  }

  .gallery-item img {
    height: 240px;
  }

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