/* ================================================================
   Eric Lepoureau — feuille de style
   ================================================================ */

:root {
  --fond: #faf9f7;
  --gris-fond: #4f494b;   /* bande biographie */
  --encre: #1c1b19;
  --gris: #514d47;
  --ligne: rgba(28, 27, 25, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --marge: clamp(16px, 5vw, 72px);
  --largeur: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Petits libellés en capitales */
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

/* Lien « trait + texte » (comme LEARN MORE sur la référence) */
.lien-trait {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.lien-trait::before {
  content: "";
  width: 72px;
  height: 1px;
  background: currentColor;
  transition: width 0.35s ease;
}
.lien-trait:hover::before { width: 110px; }

.conteneur { max-width: var(--largeur); margin: 0 auto; }

/* ---------------- En-tête ---------------- */
.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(26px + env(safe-area-inset-top, 0px)) var(--marge) 26px;
  color: #fff;
  transition: background 0.4s ease, color 0.4s ease, padding 0.4s ease;
}
.entete.defile {
  background: rgba(250, 249, 247, 0.94);
  backdrop-filter: blur(8px);
  color: var(--encre);
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: 16px;
}

.nom {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav a { opacity: 0.85; transition: opacity 0.2s; }
.nav a:hover { opacity: 1; }

/* ---------------- Bannière ---------------- */
.banniere {
  position: relative;
  height: 82vh;
  height: 82svh;
  min-height: 460px;
  overflow: hidden;
  background: #0d0d0c;
}
.banniere img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
  animation: apparition 2.2s ease both;
}
.banniere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 20%, transparent 70%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.banniere .lien-trait {
  position: absolute;
  right: var(--marge);
  bottom: clamp(28px, 6vh, 56px);
  z-index: 2;
  color: #fff;
}

@keyframes apparition {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------------- Sections ---------------- */
section { padding: clamp(72px, 10vw, 140px) var(--marge); }

.titre-nom {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------------- Biographie (fond gris) ---------------- */
.biographie { background: var(--gris-fond); }

/* Sections sur fond gris foncé : on inverse les tons du texte */
.biographie,
.oeuvres {
  --encre: #eeebe6;
  --gris: #bdb6b7;
  --ligne: rgba(238, 235, 230, 0.28);
  --fond: #4f494b;
  color: var(--encre);
}

.bio {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
}
.bio-photo img {
  width: 100%;
  aspect-ratio: 4 / 5.4;
  object-fit: cover;
  object-position: center 42%;
  filter: grayscale(1);
}



.texte-artiste {
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.6;
  max-width: 32em;
}
.texte-artiste p + p { margin-top: 1em; }

.signature {
  filter: invert(0.94);
  width: clamp(180px, 22vw, 260px);
  height: auto;
  margin-top: clamp(24px, 3vw, 36px);
}

.bio-texte .lien-trait { margin-top: clamp(32px, 4vw, 56px); }

/* ---------------- Œuvres (défilement) ---------------- */
.oeuvres { padding-left: 0; padding-right: 0; padding-top: 0; margin-top: -1px; background: var(--gris-fond); }

.oeuvres-entete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 0 var(--marge);
  margin-bottom: clamp(32px, 4vw, 56px);
}

.carrousel {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.4vw, 36px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--marge);
  padding: 0 var(--marge) 6px;
  scrollbar-width: none;
}
.carrousel::-webkit-scrollbar { display: none; }

.toile {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.toile img {
  /* hauteur commune, sauf pour les formats très allongés qu'on limite en largeur */
  height: min(clamp(300px, 58vh, 560px), calc(86vw / var(--r, 1)));
  width: auto;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 12px 32px -12px rgba(0,0,0,0.28);
}
.toile figcaption {
  margin-top: 14px;
  color: var(--gris);
}

.carrousel-pied {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px var(--marge) 0;
}
.compteur { color: var(--gris); }
.carrousel-nav { display: flex; gap: 10px; }
.carrousel-nav button {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--encre);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.carrousel-nav button:hover:not(:disabled) { opacity: 1; }
.carrousel-nav button:disabled { opacity: 0.25; cursor: default; }

/* Visionneuse plein écran */
.visionneuse {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 6vh 6vw;
  background: rgba(14, 14, 13, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.visionneuse.ouverte { opacity: 1; pointer-events: auto; }
.visionneuse img { max-height: 86vh; max-width: 86vw; object-fit: contain; }
.visionneuse button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  opacity: 0.7;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 26px;
  padding: 16px;
}
.visionneuse button:hover { opacity: 1; }
.visionneuse .fermer { top: 12px; right: 16px; }
.visionneuse .prec { left: 8px; top: 50%; transform: translateY(-50%); }
.visionneuse .suiv { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------------- Contact ---------------- */
.contact {
  border-top: 1px solid var(--ligne);
  text-align: center;
}
.contact .titre-nom { margin-bottom: 32px; }
.contact-liens {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px clamp(24px, 5vw, 64px);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.08em;
}
.contact-liens a { border-bottom: 1px solid var(--ligne); padding-bottom: 3px; transition: border-color 0.2s; }
.contact-liens a:hover { border-color: var(--encre); }

.pied {
  padding: 26px var(--marge);
  display: flex;
  justify-content: space-between;
  color: var(--gris);
  border-top: 1px solid var(--ligne);
}

/* ---------------- Page CV ---------------- */
.page-cv .entete { color: var(--encre); background: var(--fond); }
.page-cv main { padding: 150px var(--marge) 100px; }
.cv { max-width: 620px; margin: 0 auto; }
.cv .titre-nom { margin-bottom: 40px; }
.expos {
  list-style: none;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}
.expos li {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  padding: 5px 0;
}
.expos .annee { font-variant-numeric: lining-nums tabular-nums; color: var(--gris); }
.retour { margin-top: 56px; }

/* ---------------- Mobile ---------------- */
@media (max-width: 760px) {
  .nav { display: none; }
  .nom { font-size: 16px; letter-spacing: 0.16em; }
  .banniere { height: 70svh; }
  .bio { grid-template-columns: 1fr; }
  .toile img { height: min(52vh, calc(84vw / var(--r, 1))); }
  .pied { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .banniere img { animation: none; }
}

/* ---------------- Mentions légales ---------------- */
.legal h2 { color: var(--gris); margin: 36px 0 8px; }
.legal p { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 18px; font-weight: 400; line-height: 1.6; }
.legal p a { border-bottom: 1px solid var(--ligne); }
.pied a { transition: color 0.2s; }
.pied a:hover { color: var(--encre); }
