body.legacy-scope { padding-left: 60px; padding-right: 60px; }

body.legacy-scope.single-estampe .image-wrapper{ position: relative; }

body.legacy-scope.single-estampe .artwork__wrapper__preview{
  display: grid !important;
  place-items: center !important;
  /* Donne une vraie hauteur au conteneur pour permettre le centrage */
  height: clamp(420px, 75dvh, calc(100dvh - 260px)) !important;
  overflow: hidden !important;
}

body.legacy-scope.single-estampe .artwork__wrapper__preview img.target{
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Mobile : on laisse le flux respirer */
@media (max-width: 780px){
  body.legacy-scope.single-estampe .artwork__wrapper__preview{
    height: auto !important;
    max-height: calc(100dvh - 220px) !important;
  }
}


/* === Overlay Zoom v2 — styles minimaux (compatibles thème) === */
.art-zoom-overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);opacity:0;transition:opacity .12s ease;z-index:10000}
.art-zoom-overlay.is-open{opacity:1}
.art-zoom-stage{position:absolute;inset:0;overflow:hidden}
.art-zoom-image{
  position:absolute; top:0; left:0;
  max-width:none!important; max-height:none!important;
  width:auto!important; height:auto!important;
  will-change:transform;
  transform-origin:0 0!important;
  cursor:zoom-in;
}
.art-zoom-overlay.is-native .art-zoom-image{cursor:grab}
.art-zoom-overlay.dragging .art-zoom-image{cursor:grabbing}
.art-zoom-close{
  position:fixed; top:14px; right:16px;
  background:transparent; border:0; color:#fff;
  font-size:32px; line-height:1; opacity:.85; cursor:pointer
}
.art-zoom-close:hover{opacity:1}


/*
#proute-zoom[hidden]{ display:none; }
#proute-zoom{
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: rgba(0,0,0,.85);
}
#proute-zoom img{ max-width: 96vw; max-height: 96vh; display: block; }
#proute-zoom .zoom-close{
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  background: transparent; color: #fff; font-size: 28px; line-height: 1;
}
*/
body.is-zoom-open{ overflow: hidden; }


/* === Single Estampe — visuel borné + bouton + overlay zoom === */

/* 0) Le wrapper image ne doit PAS être figé à 600px (hérité de main.min.css) */
body.legacy-scope.single-estampe .image-wrapper.show-image{
  height: auto !important;             /* override du 600px */
  margin-bottom: 12px !important;      /* le + vient juste dessous */
}

/* 1) Le conteneur du visuel s’ajuste au contenu, borné au viewport */
body.legacy-scope.single-estampe .artwork__wrapper__preview{
  height: auto !important;
  /* marge de sécurité = hauteur du header + respirations */
  max-height: clamp(420px, calc(100vh - 260px), 80vh) !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}

/* 2) L’image reste entièrement visible et centrée */
body.legacy-scope.single-estampe .artwork__wrapper__preview img.target{
  display: block !important;
  width: auto !important; height: auto !important;
  max-width: 100% !important; max-height: 100% !important;
  object-fit: contain !important; object-position: center !important;
}

/* 3) Le bouton + reste en flux, collé au bas du visuel */
body.legacy-scope.single-estampe .image-wrapper .zoom{
  position: static !important;         /* pas d’absolu */
  margin: 10px auto 0 !important;      /* centré, juste sous l’image */
}

/* 4) Overlay de zoom (le JS est déjà dans le DOM) */
#proute-zoom{
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.8);
  display: grid; place-items: center;
}
#proute-zoom[hidden]{ display: none !important; }
#proute-zoom img{
  max-width: min(92vw, 1600px);
  max-height: 90vh;
  display: block;
}
#proute-zoom .zoom-close{
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(0,0,0,.5); color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer;
}
body.is-zoom-open{ overflow: hidden; }  /* pas de scroll derrière l’overlay */



/* === Single Estampe — correctifs image + zoom + centrage (2025‑10‑08) === */

/* 1) Le conteneur de page ne doit pas couper le contenu */
body.legacy-scope.single-estampe section.page.artwork{ overflow: visible !important; }
body.legacy-scope.single-estampe section.page.artwork > .page__inner{ height: auto !important; }

/* 2) Grille + centrage vertical des deux colonnes */
body.legacy-scope.single-estampe .artwork__detail{
  display: grid !important;
  grid-template-columns: minmax(360px,520px) minmax(460px,1fr) !important;
  gap: clamp(32px, 5vw, 64px) !important;
  align-items: center !important;    /* centre image ET texte */
}

/* 3) L’image ne doit jamais être rognée */
body.legacy-scope.single-estampe .artwork__detail__left .image-wrapper{ position: relative !important; }
body.legacy-scope.single-estampe .artwork__wrapper__preview{ 
  height: auto !important;           /* annule height:100% de .lazyload_background */
  max-height: none !important; 
  overflow: visible !important;
  display: block !important;
}
body.legacy-scope.single-estampe .lazyload_background{ height: auto !important; overflow: visible !important; }
body.legacy-scope.single-estampe .artwork__wrapper__preview img.target{
  display:block !important;
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:none !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 auto !important;
}

/* 4) Bouton zoom : visible, sans ellipse de hover, et collé à l’image */
body.legacy-scope.single-estampe .artwork__detail__left .zoom{
  position:absolute !important;
  left:50% !important; transform:translateX(-50%) !important;
  bottom:-26px !important;           /* suit le bas du visuel */
  width:44px !important; height:44px !important;
  border:1px solid #998040 !important; border-radius:50% !important;
  background:#fff !important; color:#998040 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  line-height:1 !important; font-size:28px !important; font-weight:400 !important;
  z-index:3 !important;
}
body.legacy-scope.single-estampe .artwork__detail__left .zoom::before,
body.legacy-scope.single-estampe .artwork__detail__left .zoom::after{ content:none !important; } /* coupe l’ellipse */
body.legacy-scope.single-estampe .artwork__detail__left .zoom span{ display:block !important; }
body.legacy-scope.single-estampe .artwork__detail__left .zoom:hover{ background:#998040 !important; color:#fff !important; }

/* 5) Désactiver la “loupe” canvas héritée (ellipse géante au survol) */
body.legacy-scope.single-estampe .zoomer{ display:none !important; }

/* 6) Colonne texte : centre vertical */
body.legacy-scope.single-estampe .artwork__detail__right{
  display:flex !important; flex-direction:column !important; justify-content:center !important;
}

/* 7) Curseur de zoom directement sur l’image */
body.legacy-scope.single-estampe .artwork__wrapper__preview,
body.legacy-scope.single-estampe .artwork__wrapper__preview img{ cursor: zoom-in !important; }

/* 8) Responsive */
@media (max-width:1080px){
  body.legacy-scope.single-estampe .artwork__detail{ grid-template-columns: 1fr !important; }
  body.legacy-scope.single-estampe .artwork__detail__left .zoom{ bottom: -20px !important; }
}


/* Single Estampe — plafonner l’aperçu pour les visuels très hauts */
body.legacy-scope.single-estampe .artwork__wrapper__preview{
  /* plafond dur à 600px, mais sans dépasser la fenêtre sur petits écrans */
  max-height: 600px !important;
  max-height: min(600px, calc(100vh - 260px)) !important;
  /* le reste (flex + centrage) peut rester tel qu’actuellement */
}


/* === Single Estampe — plafond dur 600px sur l’aperçu (anti-débordement) === */

/* 0) Aucun rognage par les wrappers de page */
body.legacy-scope.single-estampe section.page.artwork,
body.legacy-scope.single-estampe section.page.artwork > .page__inner{
  overflow: visible !important;
}

/* 1) Les wrappers d'image ne doivent pas imposer de height:100% */
body.legacy-scope.single-estampe .lazyload_background{
  height: auto !important;   /* bat le 100% hérité du legacy */
  overflow: visible !important;
}

/* 2) Conteneur d’aperçu : plafond dur + centrage */
body.legacy-scope.single-estampe .artwork__detail__left .image-wrapper .artwork__wrapper__preview{
  display: grid !important;
  place-items: center !important;
  height: auto !important;
  /* plafond dur à 600px, mais jamais > viewport utile */
  max-height: min(600px, calc(100vh - 260px)) !important;
  overflow: hidden !important;
}

/* 3) L’image ne dépasse jamais le plafond et reste contenue */
body.legacy-scope.single-estampe .artwork__detail__left .image-wrapper .artwork__wrapper__preview img.target{
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(600px, calc(100vh - 260px)) !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* 4) Le bouton + suit le bas de l’image (pas trop bas) */
body.legacy-scope.single-estampe .artwork__detail__left .zoom{
  position: static !important;
  margin: 10px auto 0 !important;
}

/* Fiche Dessin : forcer l’onglet Dessins actif et neutraliser Estampes */
body.single-dessin .header__nav__left .menu > li > a[href*="/dessins/"]{
  font-weight:700 !important; position:relative; padding-bottom:10px;
}
body.single-dessin .header__nav__left .menu > li > a[href*="/dessins/"]::after{
  content:""; position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:6px; height:6px; border-radius:50%; background:#998040;
}
/* Empêche le point sous Estampes sur une fiche Dessin */
body.single-dessin .header__nav__left .menu > li > a[href*="/estampes/"]::after{
  content:none !important;
}

.art-zoom-overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;cursor:zoom-out;z-index:10000}
.art-zoom-overlay.is-open{opacity:1}
.art-zoom-overlay img{max-width:94vw;max-height:94vh}


/* Fiche Dessin : activer Dessins et neutraliser Estampes */
body.single-dessin .header__nav__left .menu > li > a[href*="/dessins/"]{
  font-weight:700 !important; position:relative; padding-bottom:10px;
}
body.single-dessin .header__nav__left .menu > li > a[href*="/dessins/"]::after{
  content:""; position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:6px; height:6px; border-radius:50%; background:#998040;
}
/* Estampes redevient normal (le point est déjà neutralisé) */
body.single-dessin .header__nav__left .menu > li > a[href*="/estampes/"]{
  font-weight:400 !important;
}



/* Overlay Zoom v2 (corrige max-width:100% du thème) */
.art-zoom-overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);opacity:0;transition:opacity .12s ease;z-index:10000}
.art-zoom-overlay.is-open{opacity:1}
.art-zoom-stage{position:absolute;inset:0;overflow:hidden}
.art-zoom-image{position:absolute;top:0;left:0;max-width:none!important;max-height:none!important;width:auto!important;height:auto!important;will-change:transform;cursor:zoom-in}
.art-zoom-overlay.is-native .art-zoom-image{cursor:grab}
.art-zoom-overlay.dragging .art-zoom-image{cursor:grabbing}
.art-zoom-close{position:fixed;top:14px;right:16px;background:transparent;border:0;color:#fff;font-size:32px;line-height:1;opacity:.85;cursor:pointer}
.art-zoom-close:hover{opacity:1}

/* Centrage correct : le scale/translate se fait depuis le coin haut-gauche */
.art-zoom-image{
  transform-origin: 0 0 !important;
}

/* === PATCH: Mise en colonnes image gauche / texte droite pour les singles === */

body.legacy-scope.single-estampe .dispatch-view__content--oeuvre--wp .oeuvre__content--artwork,
body.legacy-scope.single-dessin  .dispatch-view__content--oeuvre--wp .oeuvre__content--artwork {
  display: flex;
  flex-wrap: nowrap;
  gap: 40px;
  align-items: flex-start;
}

/* Colonne image */
body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__visual,
body.legacy-scope.single-dessin  .oeuvre__content--artwork .artwork__visual {
  flex: 0 0 55%;
  max-width: 55%;
}

/* Colonne texte */
body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__detail__right,
body.legacy-scope.single-dessin  .oeuvre__content--artwork .artwork__detail__right {
  flex: 0 0 45%;
  max-width: 45%;
  text-align: left;
}

/* Empilement propre sur mobile */
@media (max-width: 900px) {
  body.legacy-scope.single-estampe .dispatch-view__content--oeuvre--wp .oeuvre__content--artwork,
  body.legacy-scope.single-dessin  .dispatch-view__content--oeuvre--wp .oeuvre__content--artwork {
    display: block;
  }

  body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__visual,
  body.legacy-scope.single-dessin  .oeuvre__content--artwork .artwork__visual,
  body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__detail__right,
  body.legacy-scope.single-dessin  .oeuvre__content--artwork .artwork__detail__right {
    max-width: none;
  }
}
/* === SINGLE DESSIN & ESTAMPE : carte blanche + 2 colonnes === */

body.legacy-scope.single-dessin .dispatch-view__content--oeuvre--wp,
body.legacy-scope.single-estampe .dispatch-view__content--oeuvre--wp {
  padding: 80px 0 100px;
}

body.legacy-scope.single-dessin .dispatch-view__content--oeuvre__inner,
body.legacy-scope.single-estampe .dispatch-view__content--oeuvre__inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Carte blanche centrale */
body.legacy-scope.single-dessin .oeuvre__border,
body.legacy-scope.single-estampe .oeuvre__border {
  background: #ffffff;
  padding: 60px 80px;
}

/* 2 colonnes image / texte */
body.legacy-scope.single-dessin .oeuvre__content--artwork,
body.legacy-scope.single-estampe .oeuvre__content--artwork {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

body.legacy-scope.single-dessin .oeuvre__content--artwork .artwork__visual,
body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__visual {
  flex: 0 0 52%;
  max-width: 52%;
}

body.legacy-scope.single-dessin .oeuvre__content--artwork .artwork__detail__right,
body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__detail__right {
  flex: 0 0 48%;
  max-width: 48%;
  text-align: left;
}

/* Ajustements typographiques de base */
body.legacy-scope.single-dessin .artwork__detail__right h1.text--large,
body.legacy-scope.single-estampe .artwork__detail__right h1.text--large {
  margin-bottom: 0.15em;
}

body.legacy-scope.single-dessin .artwork__detail__right h2.text--large,
body.legacy-scope.single-estampe .artwork__detail__right h2.text--large {
  margin-top: 1em;
  margin-bottom: 0.7em;
}

/* Évite le soulignement "moche" sur le nom de l'artiste */
body.legacy-scope.single-dessin a.artist-link,
body.legacy-scope.single-estampe a.artist-link {
  text-decoration: none;
}

/* Empilement propre sur mobile */
@media (max-width: 900px) {
  body.legacy-scope.single-dessin .oeuvre__content--artwork,
  body.legacy-scope.single-estampe .oeuvre__content--artwork {
    display: block;
  }

  body.legacy-scope.single-dessin .oeuvre__border,
  body.legacy-scope.single-estampe .oeuvre__border {
    padding: 30px 20px 40px;
  }

  body.legacy-scope.single-dessin .oeuvre__content--artwork .artwork__visual,
  body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__visual,
  body.legacy-scope.single-dessin .oeuvre__content--artwork .artwork__detail__right,
  body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__detail__right {
    max-width: 100%;
  }

  body.legacy-scope.single-dessin .artwork__detail__right,
  body.legacy-scope.single-estampe .artwork__detail__right {
    margin-top: 2rem;
  }
}

/* === SINGLE DESSIN / ESTAMPE – Alignement + titres dorés === */

/* 1. Colonne texte centrée verticalement dans la carte blanche */
body.legacy-scope.single-dessin  .oeuvre__content--artwork,
body.legacy-scope.single-estampe .oeuvre__content--artwork {
  align-items: center !important;
}

body.legacy-scope.single-dessin  .artwork__detail__right,
body.legacy-scope.single-estampe .artwork__detail__right {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* 2. Nom de l’artiste + titre de l’œuvre en doré, comme sur l’ancien site */
body.legacy-scope.single-dessin  .artwork__detail__right h1.text--large,
body.legacy-scope.single-estampe .artwork__detail__right h1.text--large,
body.legacy-scope.single-dessin  .artwork__detail__right h1.text--large .artist-link,
body.legacy-scope.single-estampe .artwork__detail__right h1.text--large .artist-link {
  color: #998040 !important;
}

body.legacy-scope.single-dessin  .artwork__detail__right h2.text--large,
body.legacy-scope.single-estampe .artwork__detail__right h2.text--large {
  color: #998040 !important;
  font-style: italic; /* comme sur les titres d’œuvre legacy */
}

/* 3. Lien vers la fiche artiste : pas de soulignement « WordPress » parasite */
body.legacy-scope.single-dessin  .artwork__detail__right a.artist-link,
body.legacy-scope.single-estampe .artwork__detail__right a.artist-link {
  text-decoration: none !important;
  color: #998040 !important;
}

body.legacy-scope.single-dessin  .artwork__detail__right a.artist-link:hover,
body.legacy-scope.single-estampe .artwork__detail__right a.artist-link:hover {
  text-decoration: underline;
}


/* === SINGLE DESSIN & ESTAMPE – alignement + titres dorés + boutons centrés === */

/* 1. Alignement vertical du bloc texte par rapport à l'image (desktop) */
@media (min-width: 900px) {
  body.legacy-scope.single-dessin  .oeuvre__content--artwork,
  body.legacy-scope.single-estampe .oeuvre__content--artwork {
    align-items: center;
  }

  body.legacy-scope.single-dessin  .artwork__detail__right,
  body.legacy-scope.single-estampe .artwork__detail__right {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* 2. Nom de l'artiste et titre de l'œuvre en doré */
body.legacy-scope.single-dessin  .artwork__detail__right h1.text--large,
body.legacy-scope.single-estampe .artwork__detail__right h1.text--large,
body.legacy-scope.single-dessin  .artwork__detail__right h1.text--large .artist-link,
body.legacy-scope.single-estampe .artwork__detail__right h1.text--large .artist-link {
  color: #998040;
}

body.legacy-scope.single-dessin  .artwork__detail__right h2.text--large,
body.legacy-scope.single-estampe .artwork__detail__right h2.text--large {
  color: #998040;
  font-style: italic;
}

/* 3. Lien vers l'artiste : pas de soulignement "par défaut" */
body.legacy-scope.single-dessin  .artwork__detail__right a.artist-link,
body.legacy-scope.single-estampe .artwork__detail__right a.artist-link {
  text-decoration: none;
  color: #998040;
}

body.legacy-scope.single-dessin  .artwork__detail__right a.artist-link:hover,
body.legacy-scope.single-estampe .artwork__detail__right a.artist-link:hover {
  text-decoration: underline;
}

/* 4. Boutons Prix + Plus d'information centrés horizontalement */
body.legacy-scope.single-dessin  .artwork__detail__button__wrapper,
body.legacy-scope.single-estampe .artwork__detail__button__wrapper {
  margin-top: 2.5rem;
  text-align: center;
}

body.legacy-scope.single-dessin  .artwork__detail__button__wrapper .artwork__detail__button,
body.legacy-scope.single-estampe .artwork__detail__button__wrapper .artwork__detail__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
}

/* Sur mobile, on accepte que les deux boutons passent à la ligne */
@media (max-width: 600px) {
  body.legacy-scope.single-dessin  .artwork__detail__button__wrapper .artwork__detail__button,
  body.legacy-scope.single-estampe .artwork__detail__button__wrapper .artwork__detail__button {
    display: block;
    margin: 0 auto 0.75rem;
  }
}


/* Colonne texte centrée horizontalement dans la carte blanche */
body.legacy-scope.single-dessin  .artwork__detail__right,
body.legacy-scope.single-estampe .artwork__detail__right {
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center;   /* centre le bloc texte dans sa colonne */
}
/* Boutons Prix + Plus d'infos sur la même ligne et centrés */
body.legacy-scope.single-dessin  .artwork__detail__footer,
body.legacy-scope.single-estampe .artwork__detail__footer {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap; /* sur mobile, ils peuvent repasser l'un sous l'autre */
}

body.legacy-scope.single-dessin  .artwork__detail__footer .artwork__detail__button,
body.legacy-scope.single-estampe .artwork__detail__footer .artwork__detail__button {
  float: none !important;          /* écrase les éventuels floats legacy */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === FINAL PATCH SINGLE DESSIN / ESTAMPE === */

/* Colonne texte : centré dans sa colonne (FR + EN, dessins + estampes) */
body.legacy-scope.single-dessin  .oeuvre__content--artwork .artwork__detail__right,
body.legacy-scope.single-estampe .oeuvre__content--artwork .artwork__detail__right {
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Footer : Prix + Plus d'infos sur une seule ligne, centrés */
body.legacy-scope.single-dessin  .artwork__detail__footer,
body.legacy-scope.single-estampe .artwork__detail__footer {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 18px !important;
  width: 100%;
  flex-wrap: nowrap !important; /* une seule ligne en desktop */
}

/* Boutons : taille auto, plus de float ni largeur 100% */
body.legacy-scope.single-dessin  .artwork__detail__footer .artwork__detail__button,
body.legacy-scope.single-estampe .artwork__detail__footer .artwork__detail__button {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  white-space: nowrap;
  margin: 0 !important;
}

/* Sur mobile, on autorise le retour à la ligne si nécessaire */
@media (max-width: 600px) {
  body.legacy-scope.single-dessin  .artwork__detail__footer,
  body.legacy-scope.single-estampe .artwork__detail__footer {
    flex-wrap: wrap !important;
  }
}

/* === PATCH PRIX : cartouche pilule et plus rond complet === */

body.legacy-scope.single-dessin  .artwork__detail__footer .artwork__detail__pricing,
body.legacy-scope.single-estampe .artwork__detail__footer .artwork__detail__pricing {
  box-sizing: border-box;
  height: auto !important;
  min-width: 9rem !important;      /* élargit le cartouche */
  padding: 0em 2.2em !important;  /* plus de largeur que de hauteur */
  border-radius: 999px !important;  /* pilule, pas cercle */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
