/* ══════════════════════════════════════════════════
   Terre Salée — feuille de style
   Esthétique : galerie éditoriale méditerranéenne
   ══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,200..900,0..100;1,9..144,200..900,0..100&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Archivo:wght@300;400;500;600&display=swap');

:root {
  /* Palette terre salée */
  --salt: #FAF6EE;
  --linen: #F2EBE0;
  --sand: #E8DCC4;
  --clay: #DBC9A8;
  --ink: #1F1A14;
  --ink-soft: #4A413A;
  --sienna: #B4593B;
  --sienna-deep: #8F4428;
  --sea: #6B8A80;
  --sea-deep: #4A6B62;

  --radius: 2px;
  --page-max: 1440px;

  --font-display: 'Fraunces', serif;
  --font-body: 'EB Garamond', serif;
  --font-mono: 'Archivo', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.45;
  mix-blend-mode: multiply;
}

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

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

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ─── typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 60, "opsz" 144;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rule {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 14px;
  opacity: 0.55;
}

/* ═════════════ NAVIGATION ═════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(242, 235, 224, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: padding 0.4s ease;
}
.nav.scrolled { padding: 14px 40px; border-bottom: 1px solid rgba(31,26,20,0.08); }

.nav-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  letter-spacing: -0.01em;
}
.nav-brand sup {
  font-size: 9px;
  font-style: normal;
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  margin-left: 6px;
  color: var(--sienna);
  vertical-align: super;
}

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--sienna); }
.nav-links a::after {
  content: ''; position: absolute;
  left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--sienna);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; }

/* ═════════════ HERO ═════════════ */
.hero {
  min-height: 100vh;
  padding: 140px 40px 60px;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--page-max);
  margin: 0 auto;
}

.hero-label {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  animation: fadeUp 0.9s 0.1s both;
}

.hero h1 {
  font-size: clamp(56px, 9vw, 156px);
  font-weight: 300;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 350;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
  animation: fadeUp 1s 0.2s both;
}
.hero h1 em {
  font-style: italic;
  color: var(--sienna);
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
}
.hero h1 .amp {
  font-style: italic;
  font-weight: 300;
  color: var(--sea);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  max-width: 440px;
  color: var(--ink-soft);
  font-style: italic;
  animation: fadeUp 1s 0.3s both;
}

.hero-meta {
  margin-top: 44px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: fadeUp 1s 0.4s both;
}
.hero-meta span strong { color: var(--ink); font-weight: 500; display: block; margin-top: 4px; font-family: var(--font-display); font-size: 14px; letter-spacing: 0; text-transform: none;}

.hero-visual {
  position: relative;
  height: min(80vh, 720px);
  animation: fadeIn 1.4s 0.3s both;
  overflow: hidden;
}

/* Si une image est placée, elle prime (balise avec classe .hero-photo) */
.hero-visual .hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.05) saturate(1.05) contrast(1.02);
}

/* Logo dans le hero */
.hero-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 40px;
  background: var(--linen);
}
html[data-theme="dark"] .hero-logo {
  background: var(--salt);
  filter: brightness(0.9);
}

/* Composition éditoriale par défaut (à utiliser tant qu'aucune image fournie) */
.hero-composition {
  position: absolute;
  inset: 0;
  background: var(--clay);
  display: grid;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}
.hero-composition::before,
.hero-composition::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Haut : texture « terre » */
.hero-composition .half-top {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(143, 68, 40, 0.35), transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(180, 89, 59, 0.25), transparent 55%),
    linear-gradient(180deg, #C9A877 0%, #A8844E 100%);
  overflow: hidden;
}
/* Bas : texture « sel/sea » */
.hero-composition .half-bottom {
  position: relative;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(250, 246, 238, 0.55), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(107, 138, 128, 0.3), transparent 55%),
    linear-gradient(180deg, #E8DCC4 0%, #D0C2A8 100%);
  overflow: hidden;
}
/* Grain matière */
.hero-composition::after {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: 0.65;
}
/* Ligne d'horizon */
.hero-composition .horizon {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: rgba(31, 26, 20, 0.25);
  z-index: 2;
}
/* Typographie-marque surajoutée */
.hero-composition .mark {
  position: absolute;
  z-index: 3;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(31, 26, 20, 0.42);
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
  mix-blend-mode: multiply;
  letter-spacing: -0.02em;
  line-height: 0.9;
  user-select: none;
}
.hero-composition .mark.m1 { top: 12%; left: 8%; font-size: clamp(60px, 8vw, 130px); }
.hero-composition .mark.m2 {
  bottom: 10%; right: 8%; font-size: clamp(50px, 7vw, 110px);
  color: rgba(143, 68, 40, 0.55);
}
.hero-composition .mark.m3 {
  top: 48%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  background: var(--linen);
  color: var(--ink);
  padding: 8px 16px;
  mix-blend-mode: normal;
  border: 1px solid rgba(31, 26, 20, 0.15);
}

.hero-number {
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--sienna);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scroll-cue::after {
  content: ''; width: 1px; height: 40px; background: var(--ink-soft);
  animation: scroll-line 2s ease infinite;
}

/* ═════════════ SECTIONS ═════════════ */
section { position: relative; z-index: 2; }

.section-head {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 120px 40px 60px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: end;
}
.section-head .number {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--sienna);
}
.section-head h2 {
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 300;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.section-head h2 em {
  font-style: italic;
  color: var(--sienna);
  font-variation-settings: "SOFT" 100, "opsz" 144;
}

/* ═════════════ MANIFESTO ═════════════ */
.manifesto {
  padding: 60px 40px 120px;
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 100px;
  align-items: start;
}
.manifesto-left {
  position: sticky;
  top: 120px;
}
.manifesto-quote {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--sienna-deep);
  margin-bottom: 24px;
}
.manifesto-quote::before {
  content: '“';
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.3em;
  color: var(--sienna);
  opacity: 0.4;
  margin-right: 6px;
}
.manifesto-cite {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.manifesto-right p {
  font-size: 20px;
  line-height: 1.65;
  margin-bottom: 26px;
  color: var(--ink);
}
.manifesto-right p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 5em;
  line-height: 0.85;
  float: left;
  margin: 0.04em 0.14em 0 -0.04em;
  color: var(--sienna);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.manifesto-right p strong {
  font-weight: 600;
  color: var(--ink);
}

/* ═════════════ VITRINE / GALERIE ═════════════ */
.vitrine {
  padding: 0 40px 120px;
  max-width: var(--page-max);
  margin: 0 auto;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 60px;
  border-top: 1px solid rgba(31,26,20,0.12);
  border-bottom: 1px solid rgba(31,26,20,0.12);
  padding: 18px 0;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 0;
  position: relative;
  transition: color 0.25s ease;
}
.filter-btn.active { color: var(--sienna); }
.filter-btn.active::after {
  content: '●';
  position: absolute;
  top: -2px;
  right: -14px;
  font-size: 6px;
  color: var(--sienna);
}
.filter-btn:hover { color: var(--ink); }
.filter-btn .count {
  font-size: 9px;
  vertical-align: super;
  margin-left: 4px;
  opacity: 0.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 60px 32px;
}

.card {
  grid-column: span 4;
  cursor: pointer;
  position: relative;
}

.card-image {
  overflow: hidden;
  background: var(--linen);
  aspect-ratio: 3/4;
  margin-bottom: 16px;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1), filter 0.4s ease;
  filter: saturate(1.02) contrast(1.02);
}
.card:hover .card-image img { transform: scale(1.04); }
.card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31,26,20,0.15), transparent 40%);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover .card-image::after { opacity: 1; }

.card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}
.card-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  font-variation-settings: "SOFT" 80, "opsz" 144;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.card-price {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.card-price .currency { color: var(--ink-soft); font-size: 10px; margin-left: 4px; }

.card .num {
  position: absolute;
  top: -8px;
  left: -8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--sienna);
  background: var(--linen);
  padding: 2px 6px;
  z-index: 2;
}

/* ═════════════ ARTISTE ═════════════ */
.artist {
  background: var(--salt);
  padding: 140px 40px;
  position: relative;
}
.artist-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
}
.artist-portrait {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--sand);
  overflow: hidden;
}
.artist-portrait::after {
  content: 'M. B.';
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 120px;
  color: var(--clay);
  font-variation-settings: "SOFT" 100;
}
.artist-portrait.has-image::after { display: none; }
.artist-portrait img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.artist-eyebrow {
  margin-bottom: 20px;
}
.artist-name {
  font-size: clamp(46px, 6vw, 86px);
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 300;
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.artist-name em { font-style: italic; color: var(--sienna); }
.artist-bio p {
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 18px;
  color: var(--ink);
}
.artist-bio p strong { color: var(--sienna-deep); font-weight: 600; }

.artist-signature {
  margin-top: 36px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  color: var(--ink);
  font-variation-settings: "SOFT" 100, "wght" 400;
}

/* ═════════════ CONTACT / ATELIER ═════════════ */
.atelier {
  background: var(--ink);
  color: var(--salt);
  padding: 140px 40px 80px;
  position: relative;
}
.atelier-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.atelier h2 {
  font-size: clamp(56px, 8vw, 120px);
  font-weight: 300;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 300;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.atelier h2 em { font-style: italic; color: var(--clay); }
.atelier .intro {
  font-size: 19px;
  line-height: 1.6;
  opacity: 0.85;
  max-width: 440px;
  font-style: italic;
}

.atelier-details {
  display: grid;
  gap: 32px;
  padding-top: 20px;
}
.detail {
  border-top: 1px solid rgba(250, 246, 238, 0.18);
  padding-top: 18px;
}
.detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 8px;
}
.detail-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  line-height: 1.25;
}
.detail-value a { border-bottom: 1px solid rgba(250, 246, 238, 0.3); transition: border 0.25s ease; }
.detail-value a:hover { border-color: var(--clay); color: var(--clay); }

.socials {
  display: flex; gap: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 16px;
}
.socials a { position: relative; padding-right: 14px; }
.socials a::after { content: '↗'; position: absolute; right: 0; top: -2px; font-size: 14px; opacity: 0.6; }
.socials a:hover { color: var(--clay); }

/* ═════════════ FOOTER ═════════════ */
.footer {
  background: var(--ink);
  color: var(--salt);
  padding: 40px;
  border-top: 1px solid rgba(250, 246, 238, 0.12);
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ═════════════ MODAL (product detail) ═════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(31, 26, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadeIn 0.3s ease;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--salt);
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  padding: 50px;
  position: relative;
  animation: modalUp 0.5s cubic-bezier(.2,.8,.2,1);
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.modal-close:hover { color: var(--sienna); }
.modal-image { aspect-ratio: 4/5; overflow: hidden; background: var(--linen); cursor: zoom-in; }
.modal-image img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.3s ease; }

/* Galerie : conteneur image principale + miniatures */
.modal-gallery { display: flex; flex-direction: column; gap: 12px; }
.modal-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.modal-thumb {
  width: 64px; height: 64px;
  padding: 0;
  border: 1px solid rgba(31, 26, 20, 0.15);
  background: var(--sand);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumb:hover { opacity: 0.85; }
.modal-thumb.active {
  opacity: 1;
  border-color: var(--sienna);
  transform: translateY(-2px);
}

/* Badge sur les cartes pour signaler la présence d'une galerie */
.card-image { position: relative; }
.card-gallery-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(31, 26, 20, 0.85);
  color: var(--salt);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  z-index: 3;
  pointer-events: none;
}

/* Prix « Sur demande » */
.card-price .on-request,
.modal-info .price .on-request {
  color: var(--sienna);
  font-style: italic;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  letter-spacing: 0;
}
.card-price .on-request { font-size: 15px; }
.modal-info .price .on-request { font-size: 22px; }

.modal-info .eyebrow { display: block; margin-bottom: 16px; }
.modal-info h3 {
  font-size: clamp(32px, 4vw, 54px);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  line-height: 1.05;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.modal-info .price {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--sienna-deep);
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}
.modal-info .desc { font-size: 17px; line-height: 1.6; margin-bottom: 36px; }
.modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  background: var(--ink);
  color: var(--salt);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.25s ease;
}
.modal-cta:hover { background: var(--sienna-deep); }

/* ═════════════ ANIMATIONS ═════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ═════════════ LIGHTBOX (zoom photo modale) ═════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(31, 26, 20, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--salt);
  background: transparent;
  border: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.lightbox-close:hover { opacity: 1; }

/* ═════════════ RESPONSIVE ═════════════ */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 120px 20px 80px;
    min-height: auto;
  }
  .hero-visual { height: 60vh; margin-top: 20px; }
  .hero-number { display: none; }
  .scroll-cue { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 16px; padding: 80px 20px 40px; }
  .manifesto, .artist-inner, .atelier-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 20px;
  }
  .manifesto-left { position: static; }
  .vitrine { padding: 0 20px 80px; }
  .grid { gap: 40px 20px; }
  .card { grid-column: span 6; }
  .card-title { font-size: 20px; }
  .modal-content { grid-template-columns: 1fr; padding: 30px; gap: 30px; max-height: 95vh; }
  .filters { gap: 18px; }
  .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
}

@media (max-width: 600px) {
  .card { grid-column: span 12; }
  .hero h1 { font-size: 64px; }
}

/* ═══════════════════════════════════════════════════
   THEME : SUPPORT DU MODE SOMBRE
   La palette par défaut est ci-dessus dans :root
   Le mode sombre est activé via [data-theme="dark"] sur <html>
   ═══════════════════════════════════════════════════ */
:root {
  --transition-theme: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

html[data-theme="dark"] {
  --linen: #1A1612;          /* fond profond */
  --salt: #221D17;            /* fond doux */
  --ink: #F2EBE0;             /* texte principal (claire sur fond sombre) */
  --ink-soft: #A89D8E;        /* texte secondaire */
  --sand: #3A322A;            /* surfaces type cartes */
  --clay: #4D4136;            /* accent neutre */
  --sienna: #D17A5A;          /* sienna éclairci pour contraste */
  --sienna-deep: #B4593B;     /* sienna profond */
  --sea: #8FAFA3;             /* vert mer éclairci */
  --sea-deep: #6B8A80;
  --gold: #D4A85C;
}

html, body {
  transition: var(--transition-theme);
}
.nav, .modal-content, .filter-btn, .card-image, .one14-credit,
.atelier, .home-blog, .post-related, .footer,
section, header.hero {
  transition: var(--transition-theme);
}

/* Fonds spécifiques en sombre */
html[data-theme="dark"] body { background: var(--linen); }
html[data-theme="dark"] .nav.scrolled { background: rgba(26, 22, 18, 0.95); border-bottom: 1px solid rgba(242, 235, 224, 0.08); }
html[data-theme="dark"] .nav:not(.scrolled) { background: transparent; }
html[data-theme="dark"] .home-blog,
html[data-theme="dark"] .post-related,
html[data-theme="dark"] .atelier { background: var(--salt); }
html[data-theme="dark"] .modal-content { background: var(--salt); }
html[data-theme="dark"] .modal { background: rgba(10, 8, 6, 0.85); }
html[data-theme="dark"] .card-image,
html[data-theme="dark"] .modal-image { background: var(--sand); }
html[data-theme="dark"] .filter-btn { color: var(--ink-soft); }
html[data-theme="dark"] .filter-btn:hover,
html[data-theme="dark"] .filter-btn.active { color: var(--sienna); }
html[data-theme="dark"] .hero-composition .half-top { background: var(--salt); }
html[data-theme="dark"] .hero-composition .half-bottom { background: var(--sand); }
html[data-theme="dark"] .footer { background: #0F0D0B; color: var(--ink-soft); }

/* ═══════════════════════════════════════════════════
   NAV TOOLS : sélecteur de langue + bascule thème
   ═══════════════════════════════════════════════════ */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-selector {
  display: flex;
  gap: 6px;
  align-items: center;
}
.lang-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lang-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.lang-btn.active { opacity: 1; }
.lang-flag {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(31, 26, 20, 0.15);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .lang-flag { border-color: rgba(242, 235, 224, 0.15); }
.lang-flag svg { width: 100%; height: 100%; display: block; }
.lang-code {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-weight: 500;
}
.lang-btn.active .lang-code { color: var(--sienna); font-weight: 700; }
.lang-btn.active .lang-flag {
  border-color: var(--sienna);
  box-shadow: 0 0 0 2px rgba(180, 89, 59, 0.15);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(31, 26, 20, 0.18);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}
html[data-theme="dark"] .theme-toggle { border-color: rgba(242, 235, 224, 0.2); color: var(--ink); }
.theme-toggle:hover { transform: rotate(20deg); }
.theme-toggle .theme-icon { position: absolute; transition: opacity 0.3s ease, transform 0.3s ease; }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* ═══════════════════════════════════════════════════
   ARABIC / RTL SUPPORT
   ═══════════════════════════════════════════════════ */
html[lang="ar"] {
  --font-display: 'Noto Naskh Arabic', 'Fraunces', Georgia, serif;
  --font-body: 'Noto Naskh Arabic', 'EB Garamond', Georgia, serif;
}
html[lang="ar"] .nav-brand,
html[lang="ar"] .hero-number,
html[lang="ar"] .eyebrow,
html[lang="ar"] .number,
html[lang="ar"] .filter-btn,
html[lang="ar"] .count {
  /* La mono Archivo est OK pour les codes/numéros */
  font-family: var(--font-mono);
}

html[dir="rtl"] .hero { direction: rtl; }
html[dir="rtl"] .hero h1 em,
html[dir="rtl"] .artist-name em,
html[dir="rtl"] h2 em {
  /* L'italique de l'arabe n'a pas grand sens, on garde une couleur sienna */
  font-style: normal;
  color: var(--sienna);
}
html[dir="rtl"] .lang-selector,
html[dir="rtl"] .nav-tools { flex-direction: row-reverse; }
html[dir="rtl"] .scroll-cue { right: auto; left: 40px; }
html[dir="rtl"] .post-card-readmore::after,
html[dir="rtl"] .modal-cta::after,
html[dir="rtl"] .home-blog-link::after { content: ' ←'; }
html[dir="rtl"] .filter-btn .count { margin-right: 6px; margin-left: 0; }

/* ═══════════════════════════════════════════════════
   ONE14 TECHNOLOGIES CREDIT
   ═══════════════════════════════════════════════════ */
.one14-credit {
  display: flex;
  justify-content: center;
  padding: 18px 40px;
  background: rgba(59, 93, 204, 0.04);
  border-top: 1px solid rgba(59, 93, 204, 0.15);
}
html[data-theme="dark"] .one14-credit {
  background: rgba(59, 93, 204, 0.08);
  border-top-color: rgba(59, 93, 204, 0.25);
}

.one14-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid #3B5DCC;
  border-radius: 999px;
  color: #3B5DCC;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.25s ease;
}
.one14-badge:hover {
  background: #3B5DCC;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 93, 204, 0.25);
}
.one14-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  opacity: 0.75;
}
.one14-name {
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE pour les nouveaux outils
   ═══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .nav-links { gap: 16px; }
  .nav-tools { gap: 10px; }
  .lang-selector { gap: 4px; }
  .lang-flag { width: 18px; height: 18px; }
  .lang-code { font-size: 7px; }
}

@media (max-width: 900px) {
  .nav-tools {
    position: absolute;
    top: 56px;
    right: 20px;
  }
  .lang-selector { gap: 8px; }
  .lang-flag { width: 22px; height: 22px; }
  .one14-credit { padding: 14px 20px; }
  .one14-badge { font-size: 9px; padding: 6px 14px; }
}

/* ═══════════════════════════════════════════════════
   VIDÉOS DANS LA MODALE PRODUIT
   ═══════════════════════════════════════════════════ */
.modal-video {
  margin: 16px 0;
}
.modal-video video {
  width: 100%;
  max-height: 400px;
  background: #000;
  border-radius: 2px;
}
#modal-videos { display: flex; flex-direction: column; gap: 12px; }

/* ═══════════════════════════════════════════════════
   SECTION MUNDUS — Newsletter
   ═══════════════════════════════════════════════════ */
.mundus-section {
  margin-top: 80px;
  padding: 0 40px;
}
.mundus-divider {
  border: none;
  border-top: 1px solid var(--sand);
  max-width: 600px;
  margin: 0 auto 60px;
}
.mundus-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.mundus-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 350;
  margin-bottom: 20px;
  color: var(--ink);
}
.mundus-title em { color: var(--sienna); }
.mundus-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--clay);
  margin-bottom: 30px;
}
.mundus-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.mundus-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--sand);
  background: var(--salt);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.mundus-form input[type="email"]:focus {
  border-color: var(--sienna);
}
.mundus-form input[type="email"]::placeholder {
  color: var(--clay);
  opacity: 0.6;
}
.mundus-form button {
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--salt);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.mundus-form button:hover {
  background: var(--sienna);
}
.mundus-confirmation {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--sienna);
  font-style: italic;
  margin-top: 20px;
}
@media (max-width: 600px) {
  .mundus-form {
    flex-direction: column;
  }
  .mundus-section { padding: 0 20px; }
}

/* Photo artiste */
.artist-photo-container {
  margin: 30px 0;
  max-width: 320px;
}
.artist-photo {
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: sepia(0.05) contrast(1.02);
}
