/* ---------- Police (Montserrat, hébergée localement — pas de Google Fonts distant) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-variable-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Thème (configurable par artiste) ---------- */
:root {
  --gallery-light: 255, 255, 255;
}

body[data-theme="dark"] {
  --bg: #060606;
  --fg: #f2efe9;
  --fg-muted: rgba(242, 239, 233, 0.62);
  --rule: rgba(242, 239, 233, 0.14);
  --veil-strength: 0.55;
}

body[data-theme="light"] {
  --bg: #faf9f6;
  --fg: #16140f;
  --fg-muted: rgba(22, 20, 15, 0.6);
  --rule: rgba(22, 20, 15, 0.12);
  --veil-strength: 0.85;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

h1, h2 {
  font-weight: 600;
}

/* ---------- Voile lumineux global : la lumière "tombe" du haut ---------- */
.light-veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
      120% 60% at 50% -10%,
      rgba(var(--gallery-light), var(--veil-strength)) 0%,
      rgba(var(--gallery-light), calc(var(--veil-strength) * 0.35)) 28%,
      transparent 65%
    );
  mix-blend-mode: screen;
}

body[data-theme="light"] .light-veil {
  mix-blend-mode: multiply;
  background: radial-gradient(
      120% 55% at 50% -10%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.4) 30%,
      transparent 70%
    );
}

/* ---------- Section artiste (galerie commune de la page d'accueil) ---------- */
/* Chaque artiste empilé sur la page d'accueil est une réplique exacte de sa
   page individuelle (hero + carrousel) — même fond, même unique .light-veil
   en haut de page : pas de fond ni de dégradé propre à chaque section, pour
   éviter un second halo lumineux au milieu de la page. */
.artist-section + .artist-section {
  border-top: 1px solid var(--rule);
}

/* ---------- Logo (commun à toutes les pages) ---------- */
/* Volontairement non positionné (pas de z-index) : reste dans le flux normal
   et passe donc DERRIÈRE .light-veil (position fixed + z-index explicite),
   qui le peint par-dessus — le logo est ainsi "sous" le dégradé lumineux. */
.site-logo-bar {
  display: flex;
  justify-content: center;
  padding: 1.8rem 1.5rem 0.6rem;
}

.site-logo {
  display: block;
  height: 2.4rem;
  width: auto;
  /* logo source = traits noirs sur fond blanc ; sur fond clair on masque le
     blanc par multiplication, sur fond sombre on inverse puis on masque le
     noir par "screen" (même principe que .light-veil ci-dessous) */
  mix-blend-mode: multiply;
}

body[data-theme="dark"] .site-logo {
  filter: invert(1);
  mix-blend-mode: screen;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
}

.hero-inner { max-width: 46rem; margin: 0 auto; }

.back-link {
  display: inline-block;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--fg); }

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.artist-name {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.01em;
}

.artist-name a {
  color: inherit;
  text-decoration: none;
}
.artist-name a:hover { text-decoration: underline; }

.hero-meta {
  font-size: 0.92rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0 0 1.6rem;
}

.hero-meta a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.hero-meta a:hover { border-color: var(--fg); }

.hero-intro {
  font-size: 1.15rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--fg);
  opacity: 0.92;
  margin: 0 0 2.2rem;
}

.cta-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.cta-more:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ---------- Galerie ---------- */
.gallery {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.nav-arrow {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.nav-arrow:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  transform: scale(1.05);
}
.nav-arrow:active { transform: scale(0.95); }

.gallery-counter {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  min-width: 3.5rem;
  text-align: center;
}
.gallery-counter .sep { margin: 0 0.25em; opacity: 0.5; }

.artwork-stage {
  width: 100%;
  max-width: 78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Le cadre de l'œuvre occupe toute la hauteur de l'écran (sans la dépasser),
   quel que soit son format ; la galerie autour reste de hauteur naturelle. */
.artwork-frame {
  position: relative;
  height: 100vh;
  max-height: 100vh;
  max-width: 100%;
  display: inline-flex;
  overflow: hidden;
  border-radius: 3px;
  cursor: crosshair;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.5);
}
body[data-theme="light"] .artwork-frame {
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.12);
}

/* halo lumineux suivant la souris, simulant le projecteur du salon */
.artwork-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.18) 32%,
    transparent 62%
  );
  mix-blend-mode: overlay;
}
.artwork-frame.is-active::after { opacity: 1; }

.artwork-image {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(var(--b, 1)) contrast(var(--c, 1)) saturate(var(--s, 1));
  transition: filter 0.25s ease, opacity 0.3s ease;
}

.artwork-caption {
  flex: 0 0 auto;
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.caption-series {
  font-size: 1.15rem;
  font-style: italic;
}

.caption-technique,
.caption-format {
  font-size: 0.82rem;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

/* ---------- Infos artiste ---------- */
.artist-infos {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 7rem;
  scroll-margin-top: 2rem;
  border-top: 1px solid var(--rule);
}

.artist-infos h2 {
  font-size: 1.6rem;
  margin: 3rem 0 1.6rem;
  text-align: center;
}

.bio p {
  line-height: 1.85;
  font-size: 1.02rem;
  color: var(--fg);
  opacity: 0.92;
  margin: 0 0 1.3rem;
}

.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

@media (max-width: 640px) {
  .hero { padding: 1.75rem 1.25rem 2.5rem; }
  .gallery { padding: 1.25rem 1rem 1.5rem; }
}
