/* ============================================================
   Atelier Sève — Céramique contemporaine
   Direction "Cendre & Émail" : greige minéral, céladon, bleu de
   four, sang de bœuf en seule note chaude. Display Syne, body Spectral.
   Tailwind gère l'utilitaire ; ce fichier porte le langage éditorial.
   ============================================================ */

:root {
  --gres:   #E8E6DD;
  --encre:  #1A1B18;
  --celadon:#5E7059;
  --four:   #2C3A47;
  --boeuf:  #8C4A3C;
  --cendre: #C9C3B2;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.6; }
img { display: block; max-width: 100%; }

/* ── Typographie de base ───────────────────────────────────── */
.font-display, h1, h2, h3 { font-family: 'Syne', sans-serif; }
.eyebrow {
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--boeuf);
  margin: 0 0 1rem;
}
.eyebrow-light { color: var(--cendre); }

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

/* ── Accessibilité : skip + focus ──────────────────────────── */
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--encre); color: var(--gres);
  padding: 0.6rem 1rem; z-index: 200; border-radius: 2px;
  font-family: 'Syne', sans-serif; font-size: 0.85rem;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

a, button, input, textarea { outline: none; }
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible,
.gallery-item:focus-visible {
  outline: 2.5px solid var(--boeuf);
  outline-offset: 3px;
}

/* ── Boutons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.95rem 1.6rem; border: 0; cursor: pointer;
  text-decoration: none; border-radius: 1px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark  { background: var(--encre); color: var(--gres); }
.btn-dark:hover { background: var(--four); }
.btn-light { background: var(--gres); color: var(--encre); }
.btn-light:hover { background: #fff; }
.btn-boeuf { background: var(--boeuf); color: var(--gres); }
.btn-boeuf:hover { background: #743b30; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── NAV ───────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(232,230,221,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cendre);
}
.nav-inner {
  max-width: var(--shell); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem var(--gap);
}
.nav-mark {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1.4rem; letter-spacing: -0.02em;
  color: var(--encre); text-decoration: none;
}
.nav-mark-dot { color: var(--celadon); }
.nav-links { display: none; gap: 2rem; }
.nav-links a {
  font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--encre); text-decoration: none;
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--boeuf); transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cart {
  font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em; background: none; border: 0; cursor: pointer;
  color: var(--encre); display: inline-flex; align-items: center; gap: 0.5rem;
}
.cart-count {
  display: inline-grid; place-items: center;
  min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem;
  background: var(--encre); color: var(--gres);
  border-radius: 999px; font-size: 0.72rem;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  background: var(--encre); color: var(--gres);
  max-width: 100%; padding: clamp(3rem, 9vw, 6rem) var(--gap) clamp(3.5rem, 9vw, 6.5rem);
  display: grid; gap: clamp(2rem, 6vw, 4rem);
}
.hero-copy { max-width: 34rem; align-self: center; }
.hero-title {
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  font-weight: 700; line-height: 0.98; letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}
.hero-lede {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: #cfd0c6; max-width: 30rem; margin: 0 0 2.2rem; font-weight: 300;
}
.hero-figure { margin: 0; position: relative; }
.hero-img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
}
.hero-cap {
  font-family: 'Syne', sans-serif; text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 0.68rem; color: var(--cendre);
  margin-top: 0.9rem;
}

/* ── MANIFESTE ─────────────────────────────────────────────── */
.manifeste {
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gap);
}
.manifeste-lead {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem); line-height: 1.18;
  letter-spacing: -0.015em; max-width: 24ch; margin: 0 0 1.6rem;
}
.manifeste-body {
  font-size: 1.075rem; max-width: 46ch; color: #3a3a34; margin: 0;
}

/* ── CATALOGUE : mur d'exposition staggeré ─────────────────── */
.pieces {
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--gap) clamp(3.5rem, 9vw, 6rem);
}
.pieces-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 38rem; }
.section-note { color: #57574f; margin: 1rem 0 0; font-size: 1rem; }

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3rem);
}
.gallery-item {
  position: relative; width: 100%; cursor: pointer;
  background: none; border: 0; padding: 0; text-align: left;
  color: inherit; font: inherit;
  display: block;
}
.gi-frame {
  position: relative; overflow: hidden; background: var(--cendre);
}
.gi-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), filter 0.4s ease;
}
.gallery-item:hover .gi-img,
.gallery-item:focus-visible .gi-img { transform: scale(1.04); }
.gi-num {
  position: absolute; top: 0.7rem; left: 0.8rem;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.1em; color: var(--gres); mix-blend-mode: difference;
}
/* overlay révélé au hover / focus = dimensions + matériau */
.gi-reveal {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(26,27,24,0.92), rgba(26,27,24,0));
  color: var(--gres); padding: 2.4rem 1rem 1rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover .gi-reveal,
.gallery-item:focus-visible .gi-reveal { opacity: 1; transform: translateY(0); }
.gi-reveal span {
  display: block; font-family: 'Syne', sans-serif;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem;
  color: var(--cendre);
}
.gi-reveal span + span { margin-top: 0.2rem; color: var(--gres); }
.gi-meta { margin-top: 1rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.gi-name {
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: 1.15rem;
  letter-spacing: -0.01em; margin: 0; color: var(--encre);
}
.gi-glaze { font-size: 0.9rem; color: var(--celadon); font-style: italic; margin: 0.15rem 0 0; }
.gi-price {
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: 1rem;
  white-space: nowrap; color: var(--encre);
}

/* ── SUR COMMANDE ──────────────────────────────────────────── */
.commande {
  background: var(--four); color: var(--gres);
}
.commande-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) var(--gap);
  max-width: 56rem;
}
.commande-h {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 1.3rem; max-width: 18ch;
}
.commande-body { font-size: 1.1rem; color: #d6dade; max-width: 52ch; margin: 0 0 2rem; font-weight: 300; }

/* ── CONTACT ───────────────────────────────────────────────── */
.contact {
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) var(--gap);
  display: grid; gap: clamp(2.5rem, 6vw, 4rem);
}
.contact-body { font-size: 1.05rem; color: #4a4a43; max-width: 38ch; margin: 1.2rem 0 2rem; }
.contact-mail {
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: 1.25rem;
  color: var(--encre); text-decoration: none; border-bottom: 1px solid var(--boeuf);
  padding-bottom: 2px;
}
.contact-mail:hover { color: var(--boeuf); }
.contact-addr { font-size: 0.95rem; color: #6a6a61; margin-top: 1rem; }

.contact-form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: 'Syne', sans-serif; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.7rem; font-weight: 600; color: #4a4a43;
}
.field input, .field textarea {
  font-family: 'Spectral', serif; font-size: 1rem;
  background: #f3f1ea; border: 1px solid var(--cendre);
  padding: 0.8rem 0.9rem; color: var(--encre); border-radius: 1px;
  width: 100%; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--boeuf); }
.form-status { font-size: 0.92rem; color: var(--celadon); margin: 0; min-height: 1.2rem; }
.form-status.error { color: var(--boeuf); }

/* ── FOOTER ────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--cendre);
  max-width: var(--shell); margin: 0 auto;
  padding: 1.8rem var(--gap);
  display: flex; flex-direction: column; gap: 0.4rem;
  font-family: 'Syne', sans-serif; font-size: 0.78rem;
  letter-spacing: 0.04em; color: #6a6a61;
}
.site-foot span:first-child { font-weight: 700; color: var(--encre); }
.foot-note { color: #8a8a80; }

/* ── MODALES (commun) ──────────────────────────────────────── */
.modal-root { position: fixed; inset: 0; z-index: 150; display: grid; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(18,18,16,0.6); backdrop-filter: blur(3px);
  animation: fade 0.25s ease;
}
.modal-x {
  position: absolute; top: 0.6rem; right: 0.8rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border: 0; cursor: pointer;
  background: rgba(232,230,221,0.9); color: var(--encre);
  font-size: 1.5rem; line-height: 1; border-radius: 999px;
}
.modal-x:hover { background: #fff; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ── MODALE FICHE PRODUIT (signature) ──────────────────────── */
.product-card {
  position: relative; z-index: 2; margin: auto;
  width: min(940px, 94vw); max-height: 92vh; overflow-y: auto;
  background: var(--gres);
  display: grid; grid-template-columns: 1fr;
  animation: rise 0.32s cubic-bezier(.2,.7,.2,1);
}
.pm-figure { margin: 0; background: var(--cendre); }
.pm-figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pm-body { padding: clamp(1.6rem, 4vw, 2.6rem); display: flex; flex-direction: column; }
.pm-eyebrow {
  font-family: 'Syne', sans-serif; text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 0.72rem; font-weight: 600;
  color: var(--boeuf); margin: 0 0 0.8rem;
}
.pm-name {
  font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.02; margin: 0 0 1rem;
}
.pm-gesture {
  font-style: italic; font-size: 1.12rem; color: #3c3c35;
  line-height: 1.55; margin: 0 0 1.8rem; max-width: 38ch;
}
.pm-spec {
  margin: 0 0 1.8rem; padding: 1.2rem 0; display: grid; gap: 0.7rem;
  border-top: 1px solid var(--cendre); border-bottom: 1px solid var(--cendre);
}
.pm-spec div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.pm-spec dt {
  font-family: 'Syne', sans-serif; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 600; color: #6a6a61;
}
.pm-spec dd { margin: 0; font-size: 1rem; color: var(--encre); text-align: right; }
.pm-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pm-price { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 2rem; letter-spacing: -0.01em; }

/* ── MODALE PANIER ─────────────────────────────────────────── */
.cart-panel {
  position: relative; z-index: 2; margin-left: auto;
  width: min(420px, 100vw); height: 100%;
  background: var(--gres); display: flex; flex-direction: column;
  animation: slide 0.3s cubic-bezier(.2,.7,.2,1);
}
.cart-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--gap) 1.2rem; border-bottom: 1px solid var(--cendre);
}
.cart-top .modal-x { position: static; background: none; }
.cart-top .modal-x:hover { background: var(--cendre); }
.cart-h { font-size: 1.3rem; font-weight: 700; margin: 0; }
.cart-items { list-style: none; margin: 0; padding: 0.5rem var(--gap); overflow-y: auto; flex: 1; }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.9rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--cendre); }
.cart-line img { width: 56px; height: 56px; object-fit: cover; background: var(--cendre); }
.cart-line-name { font-family: 'Syne', sans-serif; font-weight: 600; font-size: 0.95rem; margin: 0; }
.cart-line-glaze { font-size: 0.82rem; color: var(--celadon); font-style: italic; margin: 0.1rem 0 0; }
.cart-line-price { font-family: 'Syne', sans-serif; font-weight: 600; font-size: 0.95rem; }
.cart-line-rm { background: none; border: 0; cursor: pointer; color: #8a8a80; font-size: 0.78rem; font-family: 'Syne', sans-serif; text-decoration: underline; margin-top: 0.3rem; padding: 0; }
.cart-line-rm:hover { color: var(--boeuf); }
.cart-empty { padding: 2.5rem var(--gap); color: #6a6a61; text-align: center; font-style: italic; }
.cart-bottom { padding: 1.4rem var(--gap) 1.8rem; border-top: 1px solid var(--cendre); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-family: 'Syne', sans-serif; margin-bottom: 1.2rem; }
.cart-total span:first-child { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: #6a6a61; }
.cart-total span:last-child { font-weight: 700; font-size: 1.6rem; }
.cart-note { text-align: center; font-size: 0.78rem; color: #8a8a80; margin: 0.9rem 0 0; }

/* ── TOAST ─────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--encre); color: var(--gres);
  padding: 0.85rem 1.4rem; z-index: 300; border-radius: 2px;
  font-family: 'Syne', sans-serif; font-size: 0.85rem; letter-spacing: 0.03em;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25); animation: rise 0.3s ease;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — mobile-first, points de bascule
   ════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .product-card { grid-template-columns: 1.05fr 1fr; max-height: 88vh; }
  .pm-figure img { aspect-ratio: auto; height: 100%; }
}

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    padding-block: clamp(4rem, 8vw, 7rem);
  }
  .hero-figure { justify-self: end; max-width: 460px; }
  .contact { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .site-foot { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 980px) {
  /* mur d'exposition staggeré : 3 colonnes + décalages verticaux */
  .gallery { grid-template-columns: repeat(3, 1fr); column-gap: clamp(2rem,4vw,3.2rem); row-gap: 0; }
  .gallery-item { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
  .gallery-item:nth-child(2) { margin-top: 4.5rem; }
  .gallery-item:nth-child(3) { margin-top: 1.5rem; }
  .gallery-item:nth-child(5) { margin-top: 3rem; }
  .gallery-item:nth-child(6) { margin-top: -1rem; }
}

/* hauteurs d'images variables = rythme d'exposition (desktop) */
@media (min-width: 640px) {
  .gi-frame { aspect-ratio: 4 / 5; }
  .gallery-item.tall .gi-frame   { aspect-ratio: 3 / 4.4; }
  .gallery-item.wide .gi-frame   { aspect-ratio: 1 / 1; }
}
.gi-frame { aspect-ratio: 4 / 5; }

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .gallery-item:hover .gi-img { transform: none; }
}
