/* =================================================================
   VARIABLES — palette et typographies temporaires, à remplacer
   une fois l'identité visuelle définitive choisie.
   ================================================================= */
:root {
  --color-bg: #f5f1ea;        /* beige clair */
  --color-bg-alt: #ece5d8;    /* beige légèrement plus soutenu, pour alterner les sections */
  --color-text: #2b2420;      /* brun-noir, texte principal */
  --color-text-muted: #6b5f52;
  --color-accent: #8a5a34;    /* brun bois */
  --color-border: #d8cdbc;
  --color-overlay: rgba(20, 16, 12, 0.45);

  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container-width: 1200px;
  --section-padding: 5rem 1.25rem;
  --transition-base: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

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

.section {
  padding: var(--section-padding);
}

.section:nth-of-type(even) {
  background-color: var(--color-bg-alt);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  text-align: center;
}

.section__intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--color-text-muted);
}

/* =================================================================
   NAVIGATION — identique sur toutes les pages. Deux variantes :
   .nav--overlay (superposée au hero vidéo, texte clair, sans fond)
   et .nav--static (barre sticky au-dessus des pages de contenu).
   ================================================================= */
.nav__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 1.5rem 1.25rem;
}

.nav__brand {
  grid-column: 2;
  justify-self: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* Liens de la barre du haut — masqués en mobile, restaurés dès 768px */
.nav__links {
  display: none;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav__links a {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, opacity 0.3s ease;
}

.nav__links a:hover {
  border-color: currentColor;
}

.nav__links a.is-active {
  border-color: currentColor;
}

/* ----------------------------------------------------------------
   Bouton hamburger — visible uniquement en dessous de 768px
   ---------------------------------------------------------------- */
.nav__toggle {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.nav__toggle-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav__toggle-icon::before {
  top: -7px;
}

.nav__toggle-icon::after {
  top: 7px;
}

/* Variante fermeture (X), utilisée par le bouton dans le menu plein écran */
.nav__toggle--close .nav__toggle-icon {
  background-color: transparent;
}

.nav__toggle--close .nav__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle--close .nav__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ----------------------------------------------------------------
   Menu mobile plein écran
   ---------------------------------------------------------------- */
.nav__mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  background-color: var(--color-text);
  color: var(--color-bg);
}

.nav__mobile-menu.is-open {
  display: flex;
}

.nav__mobile-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.nav__mobile-header .nav__toggle {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.nav__mobile-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 1.5rem;
}

.nav__mobile-links a {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  letter-spacing: 0.02em;
}

.nav__mobile-links a.is-active {
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
}

@media (min-width: 640px) {
  .nav__inner {
    padding: 1.5rem 2rem;
  }
  .nav__links {
    gap: 1.75rem;
  }
}

@media (min-width: 768px) {
  .nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .nav__brand {
    justify-self: auto;
  }
  .nav__links {
    display: flex;
  }
  .nav__toggle {
    display: none;
  }
  .nav__mobile-menu,
  .nav__mobile-menu.is-open {
    display: none;
  }
}

.nav--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  color: #fff;
}

.nav--static {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--color-bg);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* =================================================================
   SCROLL REVEAL (fade-in au défilement)
   ================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* =================================================================
   1. HERO
   ================================================================= */
.hero {
  position: relative;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4a4038;
  color: #d8cdbc;
  font-family: var(--font-heading);
  letter-spacing: 0.3em;
  font-size: clamp(1.5rem, 6vw, 3rem);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem 1.5rem 1rem;
}

@media (min-width: 640px) {
  .hero__content {
    padding: 0 2rem 2.25rem;
  }
}

.hero__tagline {
  max-width: min(100%, 900px);
  text-align: center;
}

.hero__tagline-main {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.hero__tagline-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.85rem, 2.6vw, 1.7rem);
  line-height: 1.3;
  margin: 0.4em auto 0;
  max-width: 46ch;
}

.hero__scroll {
  position: relative;
  z-index: 2;
  align-self: center;
  margin-bottom: 2rem;
  width: 1px;
  height: 48px;
  overflow: hidden;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 100%;
  background: currentColor;
  transform: translateY(-100%);
  animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* =================================================================
   2 & 3. GALLERIES (Bricoli dans le monde / L'atelier)
   ================================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.gallery__item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--color-border);
}

.gallery__item img,
.gallery__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__item:hover img,
.gallery__item:hover video {
  transform: scale(1.04);
}

.gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

/* =================================================================
   4. CRÉATIONS — cartes produits
   ================================================================= */
.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.product-card {
  cursor: pointer;
}

.product-card__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--color-border);
  margin-bottom: 0.9rem;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card__image img {
  transform: scale(1.04);
}

.product-card__name {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.product-card__desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.product-card__unique {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 0.25rem 0.6rem;
}

@media (min-width: 640px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (min-width: 960px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Grille "origine" (accueil) — 4 pièces maximum : 1 colonne mobile,
   2x2 tablette, 4 colonnes fixes sur desktop (ne s'étire jamais pour
   combler l'espace s'il y a moins de 4 pièces). Portrait 4:5 recadré,
   légende discrète (même traitement que les légendes de galerie). */
@media (min-width: 640px) {
  .products--origine {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .products--origine {
    grid-template-columns: repeat(4, 1fr);
  }
}

.products--origine .product-card__image {
  aspect-ratio: 4 / 5;
}

.products--origine .product-card__name {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0;
}

/* =================================================================
   5. CONTACT
   ================================================================= */
.contact {
  text-align: center;
}

.contact__text {
  max-width: 520px;
  margin: 0 auto 1.75rem;
  color: var(--color-text-muted);
}

.contact__instagram {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 0.15rem;
  color: var(--color-accent);
  transition: opacity 0.3s ease;
}

.contact__instagram:hover {
  opacity: 0.7;
}

/* =================================================================
   PROSE — texte d'histoire (About Us) et texte de mission (Environment)
   ================================================================= */
.prose {
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  line-height: 1.8;
  white-space: pre-line;
}

.mission-text {
  max-width: 760px;
  margin: 0 auto 3rem;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

/* =================================================================
   FOOTER + NEWSLETTER — présents sur toutes les pages
   ================================================================= */
.footer {
  border-top: 1px solid var(--color-border);
}

.newsletter {
  padding: 4rem 1.25rem;
  text-align: center;
}

.newsletter__heading {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: 0.6rem;
}

.newsletter__subtext {
  max-width: 480px;
  margin: 0 auto 1.75rem;
  color: var(--color-text-muted);
}

.newsletter__form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter__input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 0.95rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.newsletter__input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.newsletter__button {
  padding: 0.75rem 1.5rem;
  background-color: var(--color-text);
  color: var(--color-bg);
  border: none;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.newsletter__button:hover {
  opacity: 0.85;
}

.footer__copy {
  padding: 1.25rem 1.25rem 1.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* =================================================================
   LIGHTBOX
   ================================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 12, 10, 0.92);
  padding: 1.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__stage {
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: none;
  color: #f5f1ea;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
}

.lightbox__nav--prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (min-width: 640px) {
  .lightbox__nav--prev {
    left: 1.5rem;
  }
  .lightbox__nav--next {
    right: 1.5rem;
  }
}
