/* =========================================================
   LARHANTEC · Expo Allauch · v4
   Aligné sur la charte larhantec.fr :
   - Major Mono Display (titres) - Cormorant Garamond italic (expressif)
   - Helvetica Neue 300 (corps)
   - Palette chaude : noir profond / or sourd / crème
   ========================================================= */

:root {
  /* Palette charte Larhantec - noir chaud, or sourd, crème claire */
  --bg:        #f1ebe0;            /* crème très claire, sourd */
  --bg-soft:   #e6dfd0;            /* crème assombri */
  --ink:       #0a0906;            /* noir chaud profond */
  --ink-soft:  #2a2520;
  --muted:     #7a6f5e;
  --muted-faint: #b8ad97;
  --gold:      #c9a86a;            /* or sourd */
  --rust:      #8b4513;            /* rouille */
  --rule:        rgba(10, 9, 6, 0.10);
  --rule-strong: rgba(10, 9, 6, 0.22);
  --accent: var(--gold);
  --accent-color: rgb(201, 168, 106);

  --font-display: 'Major Mono Display', 'Courier New', monospace;
  --font-body:    'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-expr:    'Cormorant Garamond', Georgia, serif;
  --font-mono:    'Major Mono Display', 'Courier New', monospace;

  --header-h: 56px;
  --footer-h: 60px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--ink); color: var(--bg); }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
body { transition: background 600ms var(--ease-soft); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   INDEX
   ========================================================= */

.site-header {
  text-align: center;
  padding: 64px 24px 20px;
  position: relative;
}
.site-header::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 28px auto 0;
}
.site-header .brand {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: 0.22em;
  text-transform: lowercase;
  line-height: 1;
  color: var(--ink);
}
.site-header .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-top: 16px;
  text-transform: lowercase;
}

.intro {
  text-align: center;
  padding: 28px 28px 44px;
  max-width: 560px;
  margin: 0 auto;
}
.intro-line {
  font-family: var(--font-expr);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 3.4vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.intro-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: lowercase;
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 8px 16px 120px;
  max-width: 1320px;
  margin: 0 auto;
}

.card {
  position: relative;
  display: block;
  background: var(--ink);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  transition: transform 500ms var(--ease-out);
  border: 1px solid var(--rule);
}

/* Placeholder pour cartes sans image - pattern subtil */
.card:not(:has(.card-image))::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,168,106,0.18), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(139,69,19,0.12), transparent 55%),
    linear-gradient(135deg, #1a1612 0%, #0a0906 100%);
}

.card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out), filter 600ms var(--ease-soft);
  filter: saturate(0.92);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 9, 6, 0.85) 0%,
    rgba(10, 9, 6, 0.30) 50%,
    rgba(10, 9, 6, 0.05) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px 16px;
  z-index: 2;
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  color: var(--gold);
  align-self: flex-start;
  text-transform: lowercase;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card-bottom { display: flex; flex-direction: column; gap: 6px; }

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.10em;
  line-height: 1.15;
  margin: 0;
  color: #f5e6d3;
  text-transform: lowercase;
}

.card-source {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(245, 230, 211, 0.75);
  margin: 0;
  /* Permettre 2 lignes au lieu de tronquer */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-transform: none;
}

@media (hover: hover) {
  .card:hover { transform: translateY(-3px); }
  .card:hover .card-image { transform: scale(1.05); filter: saturate(1); }
}

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 12px 22px 140px; }
  .card-title { font-size: 1.05rem; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 22px; padding: 16px 30px 160px; }
}

/* =========================================================
   ŒUVRE - page standalone (rétro-compat, peu utilisée)
   ========================================================= */

.oeuvre-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: var(--footer-h);
  padding-top: var(--header-h);
  background: var(--bg);
}

.page-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(245, 230, 211, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
  z-index: 30;
  border-bottom: 1px solid var(--rule);
}

.header-left, .header-right {
  display: flex; align-items: center; gap: 12px;
}

.header-back {
  font-size: 1.3rem; color: var(--ink);
  padding: 6px 8px; line-height: 1;
  transition: color 200ms var(--ease-soft), transform 200ms var(--ease-soft);
}
.header-back:hover { transform: translateX(-2px); }

.page-brand {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.26em;
  text-transform: lowercase;
  color: var(--ink);
}

.page-counter {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: lowercase;
}

.artwork-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  letter-spacing: 0.08em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--ink);
  text-transform: lowercase;
}

.artwork-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.20em;
  color: var(--gold);
  margin: 0 0 8px;
  text-transform: lowercase;
}

.artwork-meta {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 26px;
}

.accroche {
  margin: 18px 0 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.accroche::before {
  content: ""; position: absolute;
  top: -1px; left: 0;
  width: 40px; height: 1px;
  background: var(--gold);
}
.accroche p {
  font-family: var(--font-expr);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 3.4vw, 1.22rem);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}
