/* =====================================================
   Atelier Tincani — feuille de style
   Style : atelier humain et brut, marque assumée
   Palette : encre / blanc cassé gris / vert d'eau en accent
   ===================================================== */

:root {
  --ink: #0e0e0e;
  --paper: #eff0f1;
  --paper-dark: #e3e5e7;
  --paper-darker: #d6d9dc;
  --teal: #4f9e95;
  --teal-deep: #3d827a;
  --gray: #6b6b66;
  --line: rgba(14, 14, 14, 0.1);

  /* Inter en attendant l'intégration éventuelle d'Elka (voir README) */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1320px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

::selection { background: var(--ink); color: var(--paper); }

/* ----------------- HEADER ----------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(239, 240, 241, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}

/* Mode transparent : au-dessus d'un hero foncé, en haut de page */
.header.header--transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
.header.header--transparent .nav a {
  color: var(--paper);
  background: transparent;
}
.header.header--transparent .nav a:not(.nav-cta)::after {
  background: var(--paper);
}
.header.header--transparent .burger span {
  background: var(--paper);
}
.header.header--transparent .logo-typo {
  filter: brightness(0) invert(1);
}
.header.header--transparent .nav-cta {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(239, 240, 241, 0.7);
}
.header.header--transparent .nav-cta:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
}
.logo-typo {
  height: 26px;
  width: auto;
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav-left { justify-self: start; }
.nav-right-wrap {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 1px;
  background: var(--ink);
  transition: right .3s ease;
}
.nav a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background .25s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--teal); }
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  justify-self: end;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 64px 0 auto 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter);
  gap: 18px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 40;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ----------------- BUTTONS ----------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  border: 1px solid var(--ink);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); }
.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(239, 240, 241, 0.5);
}
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-ghost-dark { background: transparent; color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; padding: 18px 22px; }

/* ----------------- HERO ----------------- */
.hero {
  position: relative;
  height: clamp(520px, 72vh, 700px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 14, 14, 0.15) 0%,
    rgba(14, 14, 14, 0.35) 55%,
    rgba(14, 14, 14, 0.85) 100%
  );
}
.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
  color: var(--paper);
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(239, 240, 241, 0.85);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: rgba(239, 240, 241, 0.6);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  color: var(--paper);
}
.lede {
  max-width: 540px;
  font-size: 18px;
  color: rgba(239, 240, 241, 0.85);
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ----------------- MANIFESTO ----------------- */
.manifesto {
  border-bottom: 1px solid var(--line);
  padding: 56px var(--gutter);
  background: var(--paper-dark);
  text-align: center;
}
.manifesto-text {
  max-width: 880px;
  margin: 0 auto 24px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  font-weight: 500;
  color: var(--ink);
}
.manifesto-sign {
  display: flex;
  justify-content: center;
}
.manifesto-sign img {
  height: 36px;
  width: auto;
  opacity: 0.85;
}

/* ----------------- SECTIONS ----------------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 56px;
  max-width: 760px;
}
.section-head-row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.section-num {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--teal-deep);
  font-weight: 700;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* ----------------- PRODUITS ----------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product {
  background: var(--paper-dark);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
}
.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(14, 14, 14, 0.18);
}
.product-img {
  background: var(--paper-dark);
  padding: 32px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.product-meta {
  padding: 24px 28px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  background: var(--paper);
}
.product-meta h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.product-price {
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.product-desc {
  color: var(--gray);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 14px;
}
.product-cta {
  margin-top: auto;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.product-cta:hover {
  color: var(--teal);
  border-color: var(--teal);
}

/* ----------------- GALERIE MASONRY (style Pinterest) ----------------- */
.masonry {
  column-count: 5;
  column-gap: 14px;
}
.masonry-item {
  break-inside: avoid;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper-dark);
  transition: transform .4s ease;
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform .6s ease;
}
.masonry-item:hover { transform: translateY(-2px); }
.masonry-item:hover img { transform: scale(1.03); }

.masonry-full {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 120px;
}

/* ----------------- PROCESS ----------------- */
.section-process {
  background: var(--paper-dark);
  max-width: none;
  margin: 0;
  padding: 120px var(--gutter);
}
.section-process > .section-head {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.process-steps {
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--paper);
  border-radius: 14px;
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .35s ease, box-shadow .35s ease;
  border: 1px solid var(--line);
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(14, 14, 14, 0.16);
}
.step-num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  display: inline-block;
}
.step-body { display: flex; flex-direction: column; gap: 8px; }
.step-body h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.step-body p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
}

/* ----------------- ATELIER ----------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-visual {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 5 / 4;
}
.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-text p {
  margin-bottom: 18px;
  color: var(--gray);
  font-size: 17px;
  max-width: 520px;
}
.about-text .section-num { margin-bottom: 16px; display: block; }
.about-text h2 { margin-bottom: 28px; }
.stats {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gray);
  font-weight: 500;
}

/* ----------------- DEVIS ----------------- */
.section-devis {
  background: var(--ink);
  color: var(--paper);
  max-width: none;
  padding: 120px var(--gutter);
  margin: 0;
}
.section-devis .section-num { color: var(--teal); }
.section-devis h2 { color: var(--paper); }
.devis-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.devis-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 16px 0 24px;
}
.devis-intro > p {
  color: rgba(239, 240, 241, 0.7);
  max-width: 380px;
  margin-bottom: 36px;
}
.contact-direct {
  border-top: 1px solid rgba(239, 240, 241, 0.15);
  padding-top: 20px;
  margin-top: 18px;
}
.contact-direct:first-of-type { margin-top: 0; }
.contact-direct p {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(239, 240, 241, 0.6);
  margin-bottom: 6px;
  font-weight: 500;
}
.contact-direct a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--paper);
  border-bottom: 1px solid var(--teal);
  padding-bottom: 2px;
}

.devis-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.devis-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.devis-form label > span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(239, 240, 241, 0.7);
  font-weight: 500;
}
.devis-form input,
.devis-form select,
.devis-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(239, 240, 241, 0.2);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color .2s;
}
.devis-form input:focus,
.devis-form select:focus,
.devis-form textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.devis-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23eff0f1' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.devis-form select option { background: var(--ink); color: var(--paper); }
.devis-form textarea { resize: vertical; min-height: 120px; }
.devis-form .btn-primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  margin-top: 8px;
}
.devis-form .btn-primary:hover {
  background: var(--teal);
  color: var(--paper);
  border-color: var(--teal);
}
.form-note {
  font-size: 12px;
  color: rgba(239, 240, 241, 0.5);
  text-align: center;
}
.form-success,
.form-error {
  padding: 18px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
}
.form-success { background: rgba(255,255,255,0.08); color: var(--paper); }
.form-error { background: rgba(79, 158, 149, 0.15); color: var(--paper); }

/* ----------------- FOOTER ----------------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--gutter) 32px;
  border-top: 1px solid rgba(239, 240, 241, 0.08);
}
.footer-cols {
  max-width: var(--max);
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(239, 240, 241, 0.5);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-cols a, .footer-line {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--paper);
  transition: color .2s;
}
.footer-cols a:hover { color: var(--teal); }

.footer-brand {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 8px 0 32px;
  border-top: 1px solid rgba(239, 240, 241, 0.1);
  padding-top: 56px;
}
.footer-logo-typo {
  height: clamp(60px, 14vw, 180px);
  width: auto;
  filter: brightness(0) invert(1);
}
.footer-logo-lapin {
  height: clamp(56px, 12vw, 160px);
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-bottom {
  max-width: var(--max);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(239, 240, 241, 0.5);
}

/* ----------------- LIGHTBOX (image en grand) ----------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
  padding: 5vh 4vw;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  transform: scale(0.96);
  transition: transform .3s ease;
}
.lightbox.is-open .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
  font-size: 24px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  line-height: 1;
  padding: 0;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

/* ----------------- ANIMATIONS REVEAL ----------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------- PAGE RÉALISATIONS ----------------- */
.page-header {
  padding: 140px var(--gutter) 80px;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.page-header .section-num {
  display: block;
  margin-bottom: 18px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.page-header p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--gray);
  font-size: 17px;
}

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 1280px) {
  .masonry { column-count: 4; }
}

@media (max-width: 1024px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .masonry { column-count: 3; }
}

@media (max-width: 880px) {
  .header { padding: 14px 20px; }
  .nav-left, .nav-right-wrap { display: none; }
  .header { grid-template-columns: 1fr auto 1fr; }
  .hero { height: auto; min-height: 540px; padding-top: 240px; }
  .hero-overlay { padding: 56px var(--gutter); }
  .products-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .devis-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 80px var(--gutter); }
  .section-process { padding: 80px var(--gutter); }
  .manifesto { padding: 48px var(--gutter); }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .burger { display: flex; }
  .masonry { column-count: 2; column-gap: 10px; }
  .masonry-item { margin-bottom: 10px; }
}

@media (max-width: 640px) {
  .process-steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .step-num { font-size: 56px; }
  .masonry { column-count: 2; }
}
