/* ==========================================================================
   Aldo De Silvestri — feuille de style
   ========================================================================== */

:root {
  --encre: #17171a;
  --gris: #76767b;
  --gris-clair: #a3a3a7;
  --trait: #e6e5e2;
  --fond: #fcfcfb;
  --largeur: 1080px;
  --haut-entete: 57px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 1.5px solid var(--encre);
  outline-offset: 3px;
}

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--encre);
  color: var(--fond);
  padding: 10px 16px;
  z-index: 50;
}
.saut-contenu:focus { left: 0; }

/* --- En-tête ------------------------------------------------------------ */

.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--fond);
  border-bottom: 1px solid var(--trait);
}

.entete-interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 17px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.nom {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.entete nav {
  display: flex;
  align-items: baseline;
  gap: 22px;
  font-size: 13.5px;
}

.entete nav a {
  color: var(--gris);
  text-decoration: none;
  transition: color 0.15s;
}
.entete nav a:hover { color: var(--encre); }

.langues {
  color: var(--gris-clair);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.langues a { text-decoration: none; color: var(--gris-clair); }
.langues a:hover { color: var(--encre); }
.langues .active { color: var(--encre); }

@media (max-width: 620px) {
  .entete-interieur { padding: 14px 20px; }
  .entete nav .lien-section { display: none; }
}

/* --- Ossature ----------------------------------------------------------- */

.page {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 28px 100px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

@media (max-width: 900px) {
  .page {
    display: block;
    padding: 0 20px 72px;
  }
}

/* --- Sommaire de vignettes ---------------------------------------------- */

.sommaire {
  position: sticky;
  top: calc(var(--haut-entete) + 28px);
  max-height: calc(100vh - var(--haut-entete) - 28px);
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sommaire-defilement {
  width: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.sommaire-defilement::-webkit-scrollbar { display: none; }

.sommaire-liste {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sommaire-fleche {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--gris-clair);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}
.sommaire-fleche:hover { color: var(--encre); }
.sommaire-fleche[hidden] { visibility: hidden; }

.vignette {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: none;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.25s;
}
.vignette:hover { opacity: 0.7; }
.vignette.active { opacity: 1; }
.vignette.vendue { filter: grayscale(1); }

@media (max-width: 900px) {
  .sommaire {
    position: sticky;
    top: var(--haut-entete);
    padding: 12px 0;
    max-height: none;
    flex-direction: row;
    background: var(--fond);
    border-bottom: 1px solid var(--trait);
    z-index: 15;
    margin: 0 -20px;
  }
  .sommaire-fleche { display: none; }
  .sommaire-defilement {
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
  }
  .sommaire-liste {
    flex-direction: row;
    gap: 8px;
    padding: 0 20px;
  }
  .vignette { width: 46px; flex: 0 0 46px; }
}

/* --- Intro -------------------------------------------------------------- */

.intro {
  padding: 84px 0 76px;
  max-width: 520px;
}

.intro h1 {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 10px;
}

.intro p {
  margin: 0;
  color: var(--gris);
  font-size: 15px;
}

@media (max-width: 900px) {
  .intro { padding: 52px 0 48px; }
  .intro h1 { font-size: 23px; }
}

/* --- Œuvres ------------------------------------------------------------- */

.oeuvre {
  padding-bottom: 108px;
  scroll-margin-top: calc(var(--haut-entete) + 24px);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.oeuvre.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .oeuvre { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .oeuvre { padding-bottom: 76px; scroll-margin-top: calc(var(--haut-entete) + 82px); }
}

.cadre {
  position: relative;
  margin: 0;
  line-height: 0;
  width: fit-content;
  max-width: 100%;
}

.cadre-detail { margin-top: 10px; }
.cadre-detail .cadre-image { max-height: 46vh; }

.cadre-image {
  width: auto;
  max-width: 100%;
  max-height: 75vh;
  border-radius: 2px;
  background: var(--trait);
  cursor: zoom-in;
}

@media (max-width: 620px) {
  .cadre-image { max-height: 72vh; }
  .cadre-detail .cadre-image { max-height: 52vh; }
}

.plein-ecran {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: rgba(252, 252, 251, 0.92);
  color: var(--encre);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.cadre:hover .plein-ecran,
.plein-ecran:focus-visible { opacity: 1; }

@media (hover: none) {
  .plein-ecran { opacity: 1; }
}

.legende {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 28px;
  padding-top: 16px;
}

.legende h2 {
  font-size: 15px;
  font-weight: 400;
  margin: 0 0 2px;
}

.cartel {
  margin: 0;
  color: var(--gris);
  font-size: 13.5px;
}

.achat {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.prix { font-size: 15px; white-space: nowrap; }

.bouton {
  display: inline-block;
  border: 1px solid var(--trait);
  border-radius: 2px;
  padding: 8px 20px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--encre);
  background: none;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.bouton:hover {
  background: var(--encre);
  border-color: var(--encre);
  color: var(--fond);
}

.mention-vendu {
  color: var(--gris-clair);
  font-size: 13.5px;
  white-space: nowrap;
}

.oeuvre.est-vendue .cadre-image { opacity: 1; }
.oeuvre.est-vendue h2 { color: var(--gris); }

.commentaire {
  margin: 14px 0 0;
  max-width: 470px;
  color: var(--gris);
  font-size: 14px;
}

@media (max-width: 620px) {
  .legende { display: block; }
  .achat { padding-top: 12px; }
}

/* --- Sections ----------------------------------------------------------- */

.section {
  border-top: 1px solid var(--trait);
  padding: 56px 0 0;
  scroll-margin-top: calc(var(--haut-entete) + 24px);
}

.section + .section { margin-top: 56px; }

.section h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 20px;
}

.atelier { display: flex; gap: 40px; align-items: flex-start; }
.atelier img { width: 208px; border-radius: 2px; flex-shrink: 0; }
.atelier p { margin: 0; max-width: 470px; }

@media (max-width: 620px) {
  .atelier { display: block; }
  .atelier img { width: 148px; margin-bottom: 22px; }
}

.contact p { margin: 0 0 8px; max-width: 470px; }
.contact a { color: var(--encre); text-decoration-color: var(--trait); text-underline-offset: 3px; }
.contact .note { color: var(--gris); font-size: 13.5px; margin-top: 16px; }

/* --- Pied de page ------------------------------------------------------- */

.pied {
  border-top: 1px solid var(--trait);
  margin-top: 76px;
}

.pied-interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--gris-clair);
  font-size: 12.5px;
}

.pied a { color: var(--gris-clair); text-decoration: none; }
.pied a:hover { color: var(--encre); }

@media (max-width: 620px) {
  .pied-interieur { padding: 18px 20px; }
}

/* --- Page mentions légales ---------------------------------------------- */

.texte-legal {
  max-width: 620px;
  margin: 0 auto;
  padding: 64px 28px 80px;
}
.texte-legal h1 { font-size: 21px; font-weight: 500; margin: 0 0 32px; }
.texte-legal h2 { font-size: 15px; font-weight: 500; margin: 34px 0 8px; }
.texte-legal p { margin: 0 0 12px; color: var(--gris); }

/* --- Visionneuse plein écran -------------------------------------------- */

body.vue-ouverte { overflow: hidden; }

.visionneuse {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0e0e10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 52px;
}

.visionneuse[hidden] { display: none; }

.vue-scene {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vue-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.vue-bouton {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: none;
  color: #f2f2f0;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.18s;
}
.vue-bouton:hover, .vue-bouton:focus-visible { opacity: 1; }
.vue-bouton[hidden] { display: none; }
.vue-bouton:focus-visible { outline: 1.5px solid #f2f2f0; outline-offset: 2px; }

.vue-fermer { top: 12px; right: 14px; }
.vue-prec { left: 10px; top: 50%; transform: translateY(-50%); }
.vue-suiv { right: 10px; top: 50%; transform: translateY(-50%); }

.vue-barre {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding-top: 16px;
  color: #a8a8a5;
  font-size: 13px;
}

.vue-compteur { flex-shrink: 0; font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .visionneuse { padding: 52px 12px 46px; }
  .vue-prec, .vue-suiv { top: auto; bottom: 8px; transform: none; }
  .vue-prec { left: 4px; }
  .vue-suiv { right: 4px; }
  .vue-barre { justify-content: center; text-align: center; padding-bottom: 4px; }
}

/* --- Zoom dans la visionneuse -------------------------------------------- */

.vue-scene { overflow: hidden; }

.vue-image {
  cursor: zoom-in;
  transition: transform 0.18s ease-out;
  touch-action: none;
}

.visionneuse.zoome .vue-image { cursor: zoom-out; }

.visionneuse.zoome .vue-prec,
.visionneuse.zoome .vue-suiv { opacity: 0; pointer-events: none; }