@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-NL-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-NL-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bleu: #14324f;
  --bleu-clair: #2f5c86;
  --or: #b8862f;
  --or-clair: #d9ac5c;
  --creme: #faf6ee;
  --texte: #2a2622;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Georgia", "Iowan Old Style", serif;
  color: var(--texte);
  background: var(--creme);
  line-height: 1.6;
}

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

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(20, 50, 79, 0.12);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

@media (max-width: 480px) {
  header.site .wrap { justify-content: center; text-align: center; }
  .btn { font-size: 0.8rem; padding: 10px 20px; }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--bleu);
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: block;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.langs {
  display: flex;
  gap: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
}

.langs a {
  color: var(--bleu);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0.55;
}

.langs a:hover { opacity: 0.85; }

.langs a.active {
  opacity: 1;
  background: rgba(20, 50, 79, 0.08);
  font-weight: 700;
}

@media (max-width: 480px) {
  .head-right { justify-content: center; }
}

.logo span { color: var(--or); }

.btn {
  display: inline-block;
  background: var(--bleu);
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--bleu-clair); }

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 80px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(184,134,47,0.10), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(20,50,79,0.10), transparent 45%);
}

.hero .kicker {
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--or);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 0 0 20px;
  color: var(--bleu);
  letter-spacing: 0.02em;
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto 34px;
  font-size: 1.15rem;
  color: #4a453e;
}

.ornament {
  width: 64px;
  height: 2px;
  background: var(--or);
  margin: 28px auto;
}

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

.section h2 {
  text-align: center;
  color: var(--bleu);
  font-size: 2rem;
  margin-bottom: 8px;
}

.section .sub {
  text-align: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #6b655b;
  font-size: 0.95rem;
  margin-bottom: 48px;
}

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.piece {
  display: block;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(20, 50, 79, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
  font: inherit;
}

.piece:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(20, 50, 79, 0.14);
}

.piece .frame {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1ece1;
}

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

.piece figcaption {
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  padding: 14px 10px;
  color: var(--bleu);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

/* Histoire */
.histoire {
  background: var(--bleu);
  color: #f2ede0;
}

.histoire h2 { color: #fff; }
.histoire .sub { color: rgba(242,237,224,0.75); }

.histoire .colonnes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  align-items: start;
}

.histoire p { color: rgba(242,237,224,0.9); }

.chiffre {
  font-size: 2.4rem;
  color: var(--or-clair);
  margin-bottom: 4px;
}

.chiffre-label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(242,237,224,0.7);
}

.stat { margin-bottom: 28px; }

/* Contact */
.contact-box {
  background: #fff;
  border-radius: 14px;
  padding: 48px;
  box-shadow: 0 8px 30px rgba(20,50,79,0.1);
  max-width: 560px;
  margin: 0 auto;
}

form.newsletter label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: #6b655b;
  display: block;
  margin-bottom: 6px;
}

form.newsletter input,
form.newsletter textarea {
  width: 100%;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #ddd3bf;
  border-radius: 8px;
  margin-bottom: 18px;
  background: var(--creme);
}

form.newsletter textarea { resize: vertical; min-height: 90px; }

.honeypot { position: absolute; left: -9999px; top: -9999px; }

.msg-ok, .msg-err {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  margin-top: 14px;
  display: none;
}

.msg-ok { color: #1a6b3c; }
.msg-err { color: #b3261e; }

/* Footer */
footer.site {
  padding: 40px 0;
  text-align: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: #6b655b;
  border-top: 1px solid rgba(20,50,79,0.1);
}

footer.site a { color: var(--bleu); }

/* Page catégorie */
.category-head { padding-top: 44px; }

.back-link {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--bleu-clair);
  text-decoration: none;
  margin-bottom: 22px;
}

.back-link:hover { text-decoration: underline; }

.category-head h1 {
  color: var(--bleu);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 6px;
}

.category-head .sub {
  text-align: left;
  margin-bottom: 40px;
}

html[dir="rtl"] .category-head .sub { text-align: right; }

.galerie-dense {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.galerie-dense .piece:hover { transform: translateY(-2px); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 26, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 88vw;
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,0.18); }

.lb-close {
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

@media (max-width: 600px) {
  .lb-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 12px; right: 12px; }
}

/* Persan (RTL) */
html[dir="rtl"] body,
html[dir="rtl"] .btn,
html[dir="rtl"] .kicker,
html[dir="rtl"] .section .sub,
html[dir="rtl"] .piece figcaption,
html[dir="rtl"] .chiffre-label,
html[dir="rtl"] form.newsletter label,
html[dir="rtl"] form.newsletter input,
html[dir="rtl"] form.newsletter textarea,
html[dir="rtl"] .msg-ok,
html[dir="rtl"] .msg-err,
html[dir="rtl"] footer.site,
html[dir="rtl"] .langs {
  font-family: "Vazirmatn", "Helvetica Neue", Arial, sans-serif;
}

html[dir="rtl"] .kicker,
html[dir="rtl"] .chiffre-label,
html[dir="rtl"] .langs,
html[dir="rtl"] .btn,
html[dir="rtl"] form.newsletter label {
  letter-spacing: normal;
}

html[dir="rtl"] .logo {
  direction: ltr;
}

html[dir="rtl"] form.newsletter input,
html[dir="rtl"] form.newsletter textarea {
  text-align: right;
}

html[dir="rtl"] .honeypot {
  left: auto;
  right: -9999px;
}
