/* Gallery Maker : feuille de style du site public.
   Principe : un mur de galerie. Le site s'efface, les œuvres ne sont jamais recadrées,
   chaque œuvre porte un cartel comme dans une exposition. */

:root {
  --mur: #fafafa;
  --panneau: #f0f0ee;
  --texte: #1c1c1e;
  --discret: #696a70;
  --filet: #dededb;
  --accent: var(--accent-site, #1c1c1e);
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --titres: var(--serif);
  --courant: var(--sans);
  --marge: clamp(1.25rem, 5vw, 4.5rem);
}
[data-theme="sombre"] {
  --mur: #1b1d21;
  --panneau: #24272c;
  --texte: #ecece9;
  --discret: #a0a2a9;
  --filet: #373a41;
  --accent: var(--accent-site, #ecece9);
  color-scheme: dark;
}
[data-police="serif"] { --courant: var(--serif); }
[data-police="sans"] { --titres: var(--sans); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mur);
  color: var(--texte);
  font: 400 1.0625rem/1.6 var(--courant);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding: 0 var(--marge) 5rem; width: 100%; max-width: 96rem; margin: 0 auto; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--titres); font-weight: 400; line-height: 1.2; text-wrap: balance; }

.evitement { position: absolute; left: -999rem; }
.evitement:focus { left: var(--marge); top: 0.5rem; background: var(--mur); padding: 0.5rem 0.75rem; z-index: 2; }

/* En-tête : le nom de l'artiste tient lieu d'enseigne */
.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 3rem;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--marge) clamp(1.25rem, 3vw, 2rem);
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
}
.enseigne { text-decoration: none; display: flex; flex-direction: column; }
.enseigne:hover { color: inherit; }
.enseigne-nom { font: 400 clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem)/1.15 var(--titres); letter-spacing: -0.01em; }
.enseigne-titre { color: var(--discret); font-size: 0.9375rem; margin-top: 0.2rem; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.menu a { text-decoration: none; font-size: 0.9375rem; padding: 0.35rem 0; display: inline-block; border-bottom: 1px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--accent); color: inherit; }
.menu-langue a { color: var(--discret); }

/* Titres et textes */
.titre-page { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); margin: clamp(1rem, 3vw, 2.5rem) 0 1.5rem; letter-spacing: -0.015em; }
.titre-bloc { font-size: 1.375rem; margin: 0 0 1.25rem; }
.titre-bloc a { text-decoration: none; }
.chapeau { color: var(--discret); max-width: 62ch; margin: -0.5rem 0 2rem; }
.fil { margin: 0.5rem 0 0; font-size: 0.9375rem; color: var(--discret); }
.fil + .titre-page { margin-top: 0.75rem; }
.bloc { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.titre-page + .bloc { margin-top: 0; }

.texte { max-width: 68ch; font-family: var(--titres); font-size: 1.125rem; line-height: 1.7; overflow-wrap: break-word; }
[data-police="sans"] .texte { font-size: 1.0625rem; line-height: 1.65; }
.texte > :first-child { margin-top: 0; }
.texte h2 { font-size: 1.5rem; margin: 2.2em 0 0.6em; }
.texte h3 { font-size: 1.1875rem; font-weight: 600; margin: 1.8em 0 0.4em; }
.texte img { display: block; margin: 1.5rem 0; }
.texte blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--accent); font-style: italic; }
.texte hr { border: 0; border-top: 1px solid var(--filet); margin: 2.5rem 0; }
.texte table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; font-family: var(--courant); font-size: 0.9375rem; }
.texte td, .texte th { padding: 0.4rem 0.9rem 0.4rem 0; vertical-align: top; text-align: left; }
.texte iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 1.5rem 0; }

/* Accueil */
.accueil { margin-top: clamp(1rem, 3vw, 2.5rem); }
.accueil-illustre { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.accueil-image { margin: 0; }
.accueil-image img { display: block; max-height: 78vh; width: auto; }
@media (min-width: 60rem) {
  .accueil-illustre { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .accueil-illustre .texte { padding-top: 0.5rem; }
}

/* Liste des galeries : chaque couverture est posée entière sur un panneau */
.salles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: 2.5rem 2rem; }
.salle { display: block; text-decoration: none; }
.salle-image { display: block; aspect-ratio: 1; background: var(--panneau); padding: 9%; }
.salle-image img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.35s ease; }
.salle:hover .salle-image img { transform: scale(1.025); }
.salle-nom { display: block; font: 400 1.1875rem/1.3 var(--titres); margin-top: 0.85rem; }
.salle-nb { display: block; color: var(--discret); font-size: 0.875rem; margin-top: 0.15rem; }
.salle:hover { color: inherit; }
.salle:hover .salle-nom { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

/* Galerie : six accrochages au choix. Dans tous, l'œuvre est montrée entière. */
.oeuvres { list-style: none; margin: 0; padding: 0; }
.oeuvres a { display: flex; flex-direction: column; text-decoration: none; }
.oeuvres a:hover { color: inherit; }
.oeuvres-image { display: block; }
.oeuvres img { display: block; max-width: 100%; }
.cartel { display: block; margin-top: 0.7rem; font-size: 0.875rem; line-height: 1.4; }
.cartel-titre { display: block; font: italic 400 1rem/1.35 var(--titres); }
.cartel-infos { display: block; color: var(--discret); margin-top: 0.1rem; }
.cartel-descr { display: block; margin-top: 0.75rem; font-size: 1rem; line-height: 1.6; max-width: 60ch; }
.oeuvres a:hover .cartel-titre { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

/* 1. Cimaise : rangées de hauteur commune, proportions respectées */
.oeuvres-cimaise { display: flex; flex-wrap: wrap; gap: 2.75rem 2.25rem; align-items: flex-start; }
.oeuvres-cimaise li { max-width: 100%; }
.oeuvres-cimaise img { height: clamp(11rem, 21vw, 18.5rem); width: auto; object-fit: contain; object-position: left bottom; background: var(--panneau); }
.oeuvres-cimaise .cartel { width: 0; min-width: 100%; }
@media (max-width: 34rem) {
  .oeuvres-cimaise { gap: 2rem 1rem; }
  .oeuvres-cimaise img { height: 9.5rem; }
}

/* 1 bis. Justifiée : chaque rangée remplit exactement la largeur (calcul fait par le script).
   Sans script, elle se comporte comme la cimaise. Le cartel apparaît au survol. */
.oeuvres-justifie { display: flex; flex-wrap: wrap; gap: 14px; }
.oeuvres-justifie li { height: clamp(9.5rem, 17vw, 14.5rem); max-width: 100%; }
.oeuvres-justifie a { position: relative; display: block; height: 100%; overflow: hidden; }
.oeuvres-justifie .oeuvres-image { height: 100%; }
.oeuvres-justifie img { height: 100%; width: auto; background: var(--panneau); }
.oeuvres-justifie.calee img { width: 100%; object-fit: cover; }
.oeuvres-justifie .cartel { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 1.75rem 0.7rem 0.55rem; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0)); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
.oeuvres-justifie .cartel:empty { display: none; }
.oeuvres-justifie .cartel-infos { color: rgba(255, 255, 255, 0.8); }
.oeuvres-justifie a:hover .cartel, .oeuvres-justifie a:focus-visible .cartel { opacity: 1; }

/* 2. Mosaïque : colonnes serrées, chaque œuvre à sa largeur de colonne */
.oeuvres-mosaique { columns: 4 15rem; column-gap: 1.5rem; }
.oeuvres-mosaique li { break-inside: avoid; margin-bottom: 1.75rem; }
.oeuvres-mosaique img { width: 100%; height: auto; background: var(--panneau); }
.oeuvres-mosaique .cartel { margin-top: 0.5rem; }
@media (max-width: 34rem) { .oeuvres-mosaique { columns: 2; column-gap: 0.9rem; } .oeuvres-mosaique li { margin-bottom: 1.1rem; } }

/* 3. Grille : cases égales, l'œuvre posée entière sur son panneau */
.oeuvres-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 44%), 1fr)); gap: 2.5rem 2rem; }
.oeuvres-grille .oeuvres-image { position: relative; aspect-ratio: 1; background: var(--panneau); }
.oeuvres-grille img { position: absolute; top: 8%; left: 8%; width: 84%; height: 84%; object-fit: contain; }
.oeuvres-grille a:hover img { transform: scale(1.03); }
@media (max-width: 34rem) { .oeuvres-grille { gap: 1.5rem 1rem; } }

/* 4. Défilé : un long mur que l'on parcourt de gauche à droite */
.accrochage-defile, .accrochage-diaporama { position: relative; margin: 0 calc(-1 * var(--marge)); }
.oeuvres-defile, .oeuvres-diaporama { display: flex; overflow-x: auto; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--filet) transparent; }
.oeuvres-defile { gap: clamp(2rem, 5vw, 5rem); padding: 1rem var(--marge) 1.5rem; scroll-snap-type: x proximity; scroll-padding: 0 var(--marge); align-items: flex-end; }
.oeuvres-defile li { flex: none; scroll-snap-align: start; }
.oeuvres-defile img { height: min(52vh, 34rem); width: auto; max-width: 86vw; object-fit: contain; object-position: left bottom; }
.oeuvres-defile .cartel { width: 0; min-width: 100%; }

/* 5. Diaporama : une œuvre à la fois, en grand */
.oeuvres-diaporama { scroll-snap-type: x mandatory; padding-bottom: 1rem; }
.oeuvres-diaporama li { flex: 0 0 100%; scroll-snap-align: center; padding: 0 var(--marge); }
.oeuvres-diaporama a { align-items: center; text-align: center; }
.oeuvres-diaporama img { max-height: min(56vh, 42rem); width: auto; margin: 0 auto; }
.oeuvres-diaporama .cartel { margin-top: 1.25rem; }
.oeuvres-diaporama .cartel-titre { font-size: 1.25rem; }

@media (max-width: 34rem) { .oeuvres-defile img { height: 46vh; } .oeuvres-diaporama img { max-height: 50vh; } }

/* Commandes ajoutées par le script au défilé et au diaporama */
.ruban-commandes { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 0.75rem; font-size: 0.9375rem; color: var(--discret); }
.ruban-commandes button { font: inherit; color: var(--texte); background: none; border: 1px solid var(--filet); border-radius: 2rem; padding: 0.5rem 1.2rem; cursor: pointer; }
.ruban-commandes button:hover:not(:disabled) { border-color: var(--accent); }
.ruban-commandes button:disabled { opacity: 0.35; cursor: default; }
.ruban-compte { font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: center; }

/* 6. Catalogue : l'image et sa notice côte à côte */
.oeuvres-catalogue { max-width: 62rem; }
.oeuvres-catalogue li { padding: 2rem 0; border-top: 1px solid var(--filet); }
.oeuvres-catalogue li:first-child { border-top: 0; padding-top: 0; }
.oeuvres-catalogue a { display: grid; grid-template-columns: minmax(8rem, 20rem) minmax(0, 1fr); gap: 1.25rem clamp(1.25rem, 4vw, 3rem); align-items: start; }
.oeuvres-catalogue img { width: 100%; height: auto; max-height: 26rem; object-fit: contain; object-position: left top; }
.oeuvres-catalogue .cartel { margin-top: 0; font-size: 0.9375rem; }
.oeuvres-catalogue .cartel-titre { font-size: 1.5rem; line-height: 1.25; margin-bottom: 0.35rem; }
@media (max-width: 34rem) { .oeuvres-catalogue a { grid-template-columns: 1fr; } }

/* Œuvre */
.oeuvre { margin-top: 1.25rem; }
.oeuvre-image { margin: 0; display: flex; justify-content: center; }
.oeuvre-image img { display: block; max-height: 80vh; width: auto; max-width: 100%; }
[data-zoom] .oeuvre-image a, [data-visionneuse] a { cursor: zoom-in; }
.oeuvre-image img { view-transition-name: oeuvre; }
.oeuvre-cartel { max-width: 44rem; margin: 2rem auto 0; padding-left: 1.25rem; border-left: 1px solid var(--accent); }
.oeuvre-titre { font: italic 400 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.2 var(--titres); margin: 0; }
.oeuvre-infos { color: var(--discret); margin: 0.5rem 0 0; }
.oeuvre-descr { margin: 1rem 0 0; }
.oeuvre-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: baseline; max-width: 44rem; margin: 3rem auto 0; padding-top: 1rem; border-top: 1px solid var(--filet); font-size: 0.9375rem; }
.oeuvre-nav a[rel="next"] { text-align: right; }
.oeuvre-position { color: var(--discret); font-variant-numeric: tabular-nums; }
.livre .oeuvre-nav { margin-left: 0; }

/* Pages de texte */
.page-image { margin: 0 0 2rem; }
.page-image img { display: block; max-height: 70vh; width: auto; }

/* Contact et livre d'or */
.deux-colonnes { display: grid; gap: 3rem clamp(2rem, 6vw, 6rem); }
@media (min-width: 56rem) { .deux-colonnes { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); } }
.coordonnees-nom { font: 400 1.375rem/1.3 var(--titres); margin: 0 0 1rem; }
.coordonnees dl { margin: 0 0 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; }
.coordonnees dt { color: var(--discret); }
.coordonnees dd { margin: 0; overflow-wrap: anywhere; }
.mot { margin: 0 0 2.25rem; max-width: 62ch; }
.mot p { margin: 0; font: 400 1.0625rem/1.65 var(--titres); overflow-wrap: break-word; }
.mot footer { margin-top: 0.5rem; color: var(--discret); font-size: 0.875rem; }

.formulaire p { margin: 0 0 1.1rem; }
.formulaire label { display: block; font-size: 0.9375rem; margin-bottom: 0.3rem; }
.formulaire input, .formulaire textarea {
  width: 100%; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--discret); border-radius: 2px; padding: 0.6rem 0.7rem;
}
.formulaire textarea { resize: vertical; min-height: 9rem; }
.formulaire button {
  font: 500 1rem/1 var(--courant); color: var(--mur); background: var(--texte);
  border: 1px solid var(--texte); border-radius: 2px; padding: 0.85rem 1.4rem; cursor: pointer;
}
.formulaire button:hover { background: transparent; color: var(--texte); }
.piege { position: absolute; left: -999rem; }
.message-erreur, .message-ok { border-left: 2px solid var(--accent); padding: 0.1rem 0 0.1rem 1rem; }

/* Pied de page */
.pied { padding: 2rem var(--marge) 2.5rem; width: 100%; max-width: 96rem; margin: 0 auto; color: var(--discret); font-size: 0.875rem; border-top: 1px solid var(--filet); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.pied p { margin: 0; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Mises en page : « galerie » est celle par défaut, décrite plus haut.
   --------------------------------------------------------------------------- */

/* Catalogue : tout est centré, le nom de l'artiste en grand titre */
[data-mise="centre"] .entete { flex-direction: column; align-items: center; gap: 1.25rem; padding-top: clamp(2.25rem, 6vw, 5rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
[data-mise="centre"] .enseigne { align-items: center; text-align: center; }
[data-mise="centre"] .enseigne-nom { font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.05; }
[data-mise="centre"] .enseigne-titre { margin-top: 0.6rem; font-size: 1rem; }
[data-mise="centre"] .menu ul { justify-content: center; gap: 0.25rem 2rem; }
[data-mise="centre"] .titre-page, [data-mise="centre"] .fil, [data-mise="centre"] .titre-bloc { text-align: center; }
[data-mise="centre"] .chapeau, [data-mise="centre"] .texte, [data-mise="centre"] .oeuvres-catalogue { margin-left: auto; margin-right: auto; }
[data-mise="centre"] .chapeau { text-align: center; }
[data-mise="centre"] .oeuvres-cimaise { justify-content: center; }
[data-mise="centre"] .accueil-illustre { justify-items: center; }
[data-mise="centre"] .pied { justify-content: center; text-align: center; }

/* Atelier : le nom et le menu tiennent dans une colonne fixe, les œuvres occupent le reste */
@media (min-width: 62rem) {
  [data-mise="lateral"] body { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); grid-template-rows: 1fr auto; --marge: clamp(1.5rem, 3.5vw, 3.5rem); }
  [data-mise="lateral"] .entete { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 2.5rem; margin: 0; padding: 3rem 1.5rem 2rem 2.25rem; border-right: 1px solid var(--filet); }
  [data-mise="lateral"] .enseigne-nom { font-size: 1.75rem; line-height: 1.15; }
  [data-mise="lateral"] .menu ul { flex-direction: column; gap: 0.1rem; }
  [data-mise="lateral"] .menu a { padding: 0.3rem 0; }
  [data-mise="lateral"] .menu-langue { margin-top: 1.25rem; }
  [data-mise="lateral"] main { grid-column: 2; grid-row: 1; max-width: none; margin: 0; padding-top: 2.25rem; }
  [data-mise="lateral"] .pied { grid-column: 2; grid-row: 2; max-width: none; margin: 0; }
  [data-mise="lateral"] .titre-page { margin-top: 0.75rem; }
}

/* Immersion : en-tête léger, et une grande image qui ouvre l'accueil */
[data-mise="immersif"] .entete { align-items: center; padding-top: 1.25rem; padding-bottom: 1.25rem; max-width: none; }
[data-mise="immersif"] .enseigne-nom { font-size: 1.25rem; letter-spacing: 0; }
[data-mise="immersif"] .enseigne-titre { display: none; }
[data-mise="immersif"] main, [data-mise="immersif"] .pied { max-width: 110rem; }
[data-mise="immersif"] .titre-page { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem); font-weight: 300; letter-spacing: -0.025em; margin-top: clamp(1.5rem, 4vw, 3.5rem); }
[data-mise="immersif"] [data-hero] .entete { position: absolute; top: 0; left: 0; right: 0; z-index: 1; color: #fff; }
[data-mise="immersif"] [data-hero] .enseigne { visibility: hidden; }
[data-mise="immersif"] [data-hero] .menu a:hover, [data-mise="immersif"] [data-hero] .menu a[aria-current="page"] { border-bottom-color: #fff; }
[data-mise="immersif"] [data-hero] .menu-langue a { color: rgba(255, 255, 255, 0.8); }
.hero { position: relative; height: 100vh; height: 100svh; min-height: 30rem; background: #111; color: #fff; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(var(--voile-rvb, 0, 0, 0), 0.45) 0%, rgba(var(--voile-rvb, 0, 0, 0), 0) 22%, rgba(var(--voile-rvb, 0, 0, 0), 0) 45%, rgba(var(--voile-rvb, 0, 0, 0), 0.7) 100%); }
.hero-texte { position: absolute; z-index: 1; left: var(--marge); right: var(--marge); bottom: clamp(2rem, 7vh, 5rem); }
.hero-texte p { margin: 0; }
.hero-nom { font: 300 clamp(2.75rem, 1rem + 8.5vw, 8.5rem)/0.95 var(--titres); letter-spacing: -0.03em; text-wrap: balance; }
.hero-titre { margin-top: 1rem !important; font-size: clamp(1rem, 0.9rem + 0.6vw, 1.375rem); max-width: 46ch; opacity: 0.92; }
.hero-lien { display: inline-block; margin-top: 1.75rem; padding: 0.8rem 1.6rem; border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 2rem; color: #fff; text-decoration: none; }
.hero-lien:hover { background: #fff; color: #111; }
[data-hero] main { padding-top: clamp(2.5rem, 6vw, 5rem); }

/* ---------------------------------------------------------------------------
   Visionneuse : l'œuvre en plein écran, avec agrandissement
   --------------------------------------------------------------------------- */
.visionneuse { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #101113; color: #f2f2f0; overflow: hidden; }
.visionneuse::backdrop { background: #101113; }
.visionneuse-scene { position: absolute; inset: 3.5rem 0 4.5rem; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.visionneuse-scene.agrandi { cursor: grab; }
.visionneuse-scene.saisi { cursor: grabbing; }
.visionneuse-scene img { max-width: 100%; max-height: 100%; width: auto; height: auto; transform-origin: center; will-change: transform; user-select: none; -webkit-user-drag: none; }
.visionneuse-scene img.fluide { transition: transform 0.25s ease; }
.visionneuse-haut { position: absolute; top: 0; left: 0; right: 0; height: 3.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1rem; font-size: 0.9375rem; }
.visionneuse-bas { position: absolute; bottom: 0; left: 0; right: 0; min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; }
.visionneuse-cartel { flex: 1; min-width: 0; text-align: center; font-size: 0.875rem; line-height: 1.35; color: #b9bbc0; }
.visionneuse-cartel strong { display: block; font: italic 400 1.0625rem/1.3 var(--titres); color: #f2f2f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visionneuse-cartel a { color: inherit; }
.visionneuse button { font: inherit; color: inherit; background: none; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 2rem; padding: 0.45rem 1rem; cursor: pointer; white-space: nowrap; }
.visionneuse button:hover:not(:disabled) { border-color: #fff; }
.visionneuse button:disabled { opacity: 0.3; cursor: default; }
.visionneuse button[hidden] { display: none; }
.visionneuse-outils { display: flex; gap: 0.5rem; }
.visionneuse-compte { color: #b9bbc0; font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) { .visionneuse-bas button { padding: 0.45rem 0.7rem; } .visionneuse-cartel span { display: none; } }

/* Passage fondu d'une page à l'autre, et de la vignette à l'œuvre en grand */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
  ::view-transition-group(oeuvre) { animation-duration: 0.4s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .oeuvres img, .js .salle-image img { opacity: 0; transition: opacity 0.5s ease, transform 0.35s ease; }
  .js .oeuvres img.charge, .js .salle-image img.charge { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .menu, .oeuvre-nav, .formulaire, .pied-realisation, .fil { display: none; } }

/* ---------------------------------------------------------------------------
   Compléments communs : « voir plus », filtre, figures, grilles de vignettes, audio, contact
   --------------------------------------------------------------------------- */
.oeuvres li.en-reserve { display: none; }
.voir-plus { display: block; margin: 2.25rem auto 0; font: 500 0.9375rem/1 var(--courant); color: var(--texte); background: none; border: 1px solid var(--accent); border-radius: 2rem; padding: 0.85rem 1.6rem; cursor: pointer; }
.voir-plus:hover { background: var(--accent); color: var(--mur); }
.filtre { margin: 0 0 1.75rem; }
.filtre select { font: inherit; font-size: 0.9375rem; color: var(--texte); background: var(--mur); border: 1px solid var(--filet); border-radius: 2px; padding: 0.55rem 0.8rem; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.texte figure { margin: 2rem 0; }
.texte figure img { margin: 0; max-height: min(78vh, 36rem); width: auto; }
/* Deux figures qui se suivent se placent côte à côte */
@media (min-width: 36rem) {
  .texte figure:has(+ figure), .texte figure + figure { display: inline-block; vertical-align: top; width: calc(50% - 0.75rem); margin-top: 1rem; margin-bottom: 1rem; }
  .texte figure:has(+ figure) { margin-right: 1rem; }
  .texte figure + figure:has(+ figure) { margin-right: 0; }
  .texte figure:has(+ figure) img, .texte figure + figure img { max-height: 24rem; }
}
.texte figcaption { margin-top: 0.5rem; color: var(--discret); font: italic 400 0.9375rem/1.4 var(--titres); }
/* Un paragraphe fait de plusieurs images liées devient une planche de vignettes (elles s'ouvrent en grand au clic) */
.texte p:has(> a + a > img) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(10rem, 45%), 1fr)); gap: 0.9rem; max-width: none; }
.texte p:has(> a + a > img) img { width: 100%; height: 9rem; object-fit: cover; margin: 0; }
.texte p:has(> a + a > img) br { display: none; }

/* Pistes audio d'une page et lecteur fixé en bas d'écran */
.pistes { max-width: 46rem; margin-top: 2.5rem; scroll-margin-top: 5.5rem; }
.pistes + .texte { margin-top: 2.5rem; }
.pistes-sommaire { display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; max-width: 46rem; margin-top: 2rem; font-size: 0.9375rem; }
.pistes-sommaire a { text-decoration: none; padding: 0.25rem 0; border-bottom: 1px solid var(--accent); }
.pistes-sommaire span, .pistes-compte { color: var(--discret); font-variant-numeric: tabular-nums; }
.pistes-sommaire span { margin-left: 0.3em; font-size: 0.875em; }
.pistes-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.pistes-tete .titre-bloc { margin: 0; }
.pistes-compte { margin: 0 0 0 auto; font-size: 0.875rem; white-space: nowrap; }
.pistes-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--filet); }
.pistes-liste li { border-bottom: 1px solid var(--filet); }
/* Une piste : rang, titre et détail, durée, bouton de lecture */
.piste { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto auto; align-items: center; gap: 0 0.9rem; width: 100%; padding: 0.65rem 0.5rem; font: inherit; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.piste:hover, .en-lecture .piste { background: var(--panneau); }
.piste-rang { text-align: right; color: var(--discret); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.piste-texte { min-width: 0; }
.piste-nom { display: block; }
.piste-titre { font: 400 1.125rem/1.3 var(--titres); font-variant-numeric: lining-nums; }
.piste-auteur { color: var(--discret); font-size: 0.9375rem; }
.piste-detail { display: block; margin-top: 0.1rem; color: var(--discret); font-size: 0.875rem; line-height: 1.35; }
.piste-duree { color: var(--discret); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.piste-icone { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 1px solid var(--accent); border-radius: 50%; font-size: 0.7rem; color: var(--accent); }
.piste:hover .piste-icone, .en-lecture .piste-icone { background: var(--accent); color: var(--mur); }
.en-lecture .piste-rang { color: var(--accent); font-weight: 600; }
@media (max-width: 30rem) { .piste { grid-template-columns: 1.4rem minmax(0, 1fr) auto; } .piste-duree { display: none; } }
.lecteur { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem var(--marge); background: #14161a; color: #f2efe8; font-size: 0.9375rem; box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.12); }
.lecteur[hidden] { display: none; }
.lecteur button { flex: none; width: 2.4rem; height: 2.4rem; font: inherit; color: inherit; background: none; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; cursor: pointer; }
.lecteur button:hover { border-color: #fff; }
.lecteur-texte { flex: 1 1 8rem; min-width: 0; line-height: 1.3; }
.lecteur-titre, .lecteur-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lecteur-detail { font-size: 0.8125rem; color: #b9bbc0; }
.lecteur-detail:empty { display: none; }
.lecteur-temps { flex: none; color: #b9bbc0; font-variant-numeric: tabular-nums; }
.lecteur-barre { flex: 2 1 10rem; height: 1.5rem; position: relative; cursor: pointer; }
.lecteur-barre::before, .lecteur-barre span { content: ""; position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; }
.lecteur-barre::before { right: 0; background: rgba(255, 255, 255, 0.22); }
.lecteur-barre span { width: 0; background: var(--accent-site, #c8a567); }
body.avec-lecteur { padding-bottom: 4.5rem; }
@media (max-width: 40rem) { .lecteur { flex-wrap: wrap; } .lecteur-barre { flex-basis: 100%; order: 9; } }

.contact-photo { margin: 0 0 1.5rem; }
.contact-photo img { display: block; max-width: 16rem; max-height: 20rem; width: auto; }
.coordonnees-titre { color: var(--discret); margin: -0.75rem 0 1rem; }
.contact-seul { grid-template-columns: minmax(0, 1fr); }

/* ---------------------------------------------------------------------------
   Mise en page « Encre de Chine » : barre de navigation posée sur une grande image d'ouverture,
   titres en Cormorant Garamond, filets et accents dorés, tout est centré.
   --------------------------------------------------------------------------- */
[data-mise="encre"] { --titres: "Cormorant Garamond", "Literata", Georgia, serif; --accent: var(--accent-site, #c8a567); --encre: #14161a; --creme: #f3ecdc; --mur: #f7f4ee; --panneau: #ece7dc; --filet: #d8d1c2; }
[data-mise="encre"][data-theme="sombre"] { --mur: #16181c; --panneau: #20232a; --filet: #33363d; --accent: var(--accent-site, #c8a567); }
[data-mise="encre"] .entete { position: fixed; top: 0; left: 0; right: 0; z-index: 4; max-width: none; align-items: center; padding: 1rem clamp(1rem, 2vw, 1.75rem); color: var(--creme); transition: background-color 0.3s ease; flex-wrap: nowrap; gap: 1.5rem; }
[data-mise="encre"] .entete.defilee { background: rgba(var(--encre-rvb, 20, 22, 26), 0.97); box-shadow: 0 1px 0 rgba(var(--creme-rvb, 243, 236, 220), 0.08); }
[data-mise="encre"] .enseigne-nom { font: 600 1.375rem/1.2 var(--titres); letter-spacing: 0; white-space: nowrap; }
[data-mise="encre"] .enseigne-mention::before { content: "·"; color: var(--accent); margin: 0 0.35em 0 0.15em; }
[data-mise="encre"] .enseigne-titre { display: none; }
[data-mise="encre"] .menu { min-width: 0; overflow-x: auto; scrollbar-width: none; }
[data-mise="encre"] .menu ul { flex-wrap: nowrap; gap: 0 1.5rem; }
[data-mise="encre"] .menu a { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; color: rgba(var(--creme-rvb, 243, 236, 220), 0.72); padding: 0.5rem 0; }
[data-mise="encre"] .menu a:hover, [data-mise="encre"] .menu a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
[data-mise="encre"] .menu-langue a { border: 1px solid rgba(var(--creme-rvb, 243, 236, 220), 0.35); padding: 0.45rem 0.7rem; color: rgba(var(--creme-rvb, 243, 236, 220), 0.8); }
[data-mise="encre"] .menu-langue a:hover { border-color: var(--accent); }
@media (max-width: 48rem) { [data-mise="encre"] .enseigne-mention { display: none; } [data-mise="encre"] .enseigne-nom { font-size: 1.125rem; } }

.ouverture { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--encre, #14161a); color: var(--creme, #f3ecdc); text-align: center; }
.ouverture-pleine { min-height: 100vh; min-height: 100svh; }
.ouverture-courte { min-height: 26rem; height: 52vh; }
.ouverture-mini { min-height: 14rem; height: 30vh; }
.ouverture-fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: grayscale(1); opacity: 0.38; }
.ouverture::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 35%, rgba(var(--encre-rvb, 20, 22, 26), 0) 0%, rgba(var(--encre-rvb, 20, 22, 26), 0.55) 70%), linear-gradient(to bottom, rgba(var(--encre-rvb, 20, 22, 26), 0.5) 0%, rgba(var(--encre-rvb, 20, 22, 26), 0) 30%, rgba(var(--encre-rvb, 20, 22, 26), 0.92) 100%); }
.ouverture-texte { position: relative; z-index: 1; padding: 5.5rem var(--marge) 3rem; max-width: 100%; }
.ouverture-texte p { margin: 0; }
.ouverture-accroche { font-size: 0.6875rem; letter-spacing: 0.42em; text-transform: uppercase; color: #8fa0b5; margin-bottom: 1.25rem !important; }
.ouverture-nom { margin: 0; font: 500 clamp(2.75rem, 1rem + 8vw, 7.75rem)/1 var(--titres); letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.ouverture-mention { margin-top: 1.75rem !important; font: italic 500 clamp(1.25rem, 1rem + 0.9vw, 1.75rem)/1 var(--titres); color: var(--accent); display: flex; align-items: center; justify-content: center; gap: 1.1rem; }
.ouverture-mention::before, .ouverture-mention::after { content: ""; width: clamp(2rem, 5vw, 4rem); height: 1px; background: var(--accent); opacity: 0.7; }
.ouverture-titre { margin-top: 1.75rem !important; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; }
.ouverture-suite { position: absolute; z-index: 1; left: 50%; bottom: 4.5rem; transform: translateX(-50%); color: rgba(var(--creme-rvb, 243, 236, 220), 0.65); text-decoration: none; font-size: 0.9rem; padding: 0.5rem; }
.ouverture-suite:hover { color: var(--accent); }
.ouverture-courte .ouverture-nom { font-size: clamp(2.25rem, 1rem + 5vw, 5rem); }
.ouverture-mini .ouverture-nom { font-size: clamp(1.75rem, 1rem + 3vw, 3.25rem); }
.ouverture-mini .ouverture-accroche, .ouverture-mini .ouverture-titre { display: none; }
.ouverture-mini .ouverture-mention { margin-top: 0.75rem !important; font-size: 1.125rem; }
.ouverture-mini .ouverture-texte { padding-bottom: 1.5rem; }

[data-mise="encre"] main { padding-top: clamp(2.5rem, 6vw, 5rem); }
[data-mise="encre"] .titre-page, [data-mise="encre"] .titre-bloc { text-align: center; font-weight: 500; letter-spacing: 0; }
[data-mise="encre"] .titre-page { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); margin-top: 0; }
[data-mise="encre"] .titre-bloc { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
/* Petit trait de pinceau doré sous les titres */
[data-mise="encre"] .titre-page::after, [data-mise="encre"] .titre-bloc::after, [data-mise="encre"] .texte h2::after { content: ""; display: block; width: 70px; height: 14px; margin: 0.7rem auto 0; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 14'%3E%3Cpath d='M2 9C18 3 40 13 68 5' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 14'%3E%3Cpath d='M2 9C18 3 40 13 68 5' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
[data-mise="encre"] .fil, [data-mise="encre"] .chapeau { text-align: center; }
[data-mise="encre"] .chapeau, [data-mise="encre"] .texte, [data-mise="encre"] .pistes, [data-mise="encre"] .oeuvres-catalogue, [data-mise="encre"] .livre { margin-left: auto; margin-right: auto; }
[data-mise="encre"] .texte { font-family: var(--courant); font-size: 1.0625rem; line-height: 1.75; max-width: 44rem; }
[data-mise="encre"] .texte figure, [data-mise="encre"] .page-image { text-align: center; }
[data-mise="encre"] .texte figure img, [data-mise="encre"] .page-image img { margin-left: auto; margin-right: auto; padding: 7px; background: var(--mur); border: 1px solid var(--filet); }
[data-mise="encre"] .filtre { text-align: center; }
[data-mise="encre"] .oeuvres-cimaise, [data-mise="encre"] .oeuvres-justifie:not(.calee) { justify-content: center; }
[data-mise="encre"] .oeuvres-justifie li { padding: 7px; border: 1px solid var(--filet); background: var(--mur); box-sizing: border-box; }
[data-mise="encre"] .cartel-titre, [data-mise="encre"] .oeuvre-titre, [data-mise="encre"] .salle-nom { font-size: 1.2em; }
[data-mise="encre"] .salles { justify-content: center; }
[data-mise="encre"] .salle { text-align: center; }
[data-mise="encre"] .oeuvre-cartel { border-left: 0; padding-left: 0; text-align: center; }
[data-mise="encre"] .deux-colonnes { max-width: 62rem; margin-left: auto; margin-right: auto; }
[data-mise="encre"] .contact-seul { justify-items: center; text-align: center; }
[data-mise="encre"] .contact-seul .coordonnees { max-width: 34rem; padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid var(--filet); }
[data-mise="encre"] .contact-seul .contact-photo img { margin: 0 auto; padding: 7px; border: 1px solid var(--filet); }
[data-mise="encre"] .contact-seul dl { grid-template-columns: 1fr; gap: 0.15rem; }
[data-mise="encre"] .contact-seul dt { font-size: 0.6875rem; letter-spacing: 0.22em; text-transform: uppercase; margin-top: 0.9rem; }
[data-mise="encre"] .coordonnees-nom { font-size: 2rem; font-weight: 500; margin-bottom: 0.5rem; }
[data-mise="encre"] .coordonnees-titre { margin-top: 0; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; }
[data-mise="encre"] .pied { max-width: none; justify-content: center; text-align: center; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3rem var(--marge); background: var(--encre); color: rgba(var(--creme-rvb, 243, 236, 220), 0.7); border-top: 0; }
[data-mise="encre"] .pied p:first-child { font: italic 500 1.25rem/1.4 var(--titres); color: var(--creme); }

/* Encre de Chine : le texte d'accueil se lit comme une dédicace, centré sous l'image d'ouverture */
[data-mise="encre"] .accueil .texte { text-align: center; font-size: 1.1875rem; }
[data-mise="encre"] .texte h2 { text-align: center; font-weight: 500; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); margin-top: 2.5em; }
[data-mise="encre"] .texte figure:has(+ figure), [data-mise="encre"] .texte figure + figure { text-align: center; }
[data-mise="encre"] .texte p:has(> a + a > img) img { padding: 5px; background: var(--mur); border: 1px solid var(--filet); box-sizing: border-box; }

/* ---------------------------------------------------------------------------
   Packs de couleurs. Ces règles ne jouent que si le site a un pack (data-couleurs) :
   le bandeau, le pied et les titres prennent alors leurs propres couleurs.
   Sans pack, tout ce qui précède s'applique tel quel.
   --------------------------------------------------------------------------- */
[data-couleurs] main :is(h1, h2, h3) { color: var(--c-titres); }
/* Bandeau et pied : leur couleur s'étend sur toute la largeur de l'écran, même quand le contenu est centré */
[data-couleurs] .entete { color: var(--bandeau-texte); border-image: conic-gradient(var(--bandeau) 0 0) fill 0 / 0 / 0 100vw; }
[data-couleurs] .enseigne-titre, [data-couleurs] .menu-langue a { color: var(--bandeau-discret); }
[data-couleurs] .menu a:hover, [data-couleurs] .menu a[aria-current="page"] { border-bottom-color: var(--bandeau-accent); }
[data-couleurs] .entete a:hover { color: inherit; }
[data-couleurs] .entete :focus-visible { outline-color: var(--bandeau-accent); }
[data-couleurs] .pied { color: var(--pied-texte); border-image: linear-gradient(var(--pied-filet) 1px, var(--pied-fond) 0) fill 0 / 0 / 0 100vw; }
[data-couleurs] .pied a:hover { color: var(--pied-accent); }
/* Atelier : la colonne du menu porte la couleur du bandeau */
@media (min-width: 62rem) {
  [data-couleurs][data-mise="lateral"] .entete { border-image: none; background: var(--bandeau); border-right-color: var(--bandeau-filet); }
}
/* Immersion : sur l'image d'ouverture, le menu reste posé sur la photo */
[data-couleurs][data-mise="immersif"] [data-hero] .entete { border-image: none; color: #fff; }
[data-couleurs][data-mise="immersif"] [data-hero] .menu-langue a { color: rgba(255, 255, 255, 0.8); }
[data-couleurs][data-mise="immersif"] [data-hero] .menu a:hover, [data-couleurs][data-mise="immersif"] [data-hero] .menu a[aria-current="page"] { border-bottom-color: #fff; }
/* Encre de Chine : la barre est transparente en haut de page, puis prend la couleur du bandeau */
[data-couleurs][data-mise="encre"] .entete { border-image: none; }
[data-couleurs][data-mise="encre"] .menu a { color: rgba(var(--creme-rvb), 0.72); }
[data-couleurs][data-mise="encre"] .menu a:hover, [data-couleurs][data-mise="encre"] .menu a[aria-current="page"] { color: var(--bandeau-accent); border-bottom-color: var(--bandeau-accent); }
[data-couleurs][data-mise="encre"] .menu-langue a { color: rgba(var(--creme-rvb), 0.8); }
[data-couleurs][data-mise="encre"] .menu-langue a:hover { border-color: var(--bandeau-accent); }
[data-couleurs][data-mise="encre"] .enseigne-mention::before, [data-couleurs] .ouverture-mention { color: var(--bandeau-accent); }
[data-couleurs] .ouverture-mention::before, [data-couleurs] .ouverture-mention::after { background: var(--bandeau-accent); }
[data-couleurs] .ouverture-accroche { color: var(--bandeau-discret); }
[data-couleurs] .ouverture-suite:hover { color: var(--bandeau-accent); }
[data-couleurs][data-mise="encre"] .pied { border-image: none; background: var(--pied-fond); }
[data-couleurs][data-mise="encre"] .pied p { opacity: 0.7; }
[data-couleurs][data-mise="encre"] .pied p:first-child { color: var(--pied-texte); opacity: 1; }
[data-mise="encre"] .pistes-sommaire { margin-left: auto; margin-right: auto; justify-content: center; }
[data-mise="encre"] .pistes-tete { flex-direction: column; align-items: center; gap: 0.35rem; }
[data-mise="encre"] .pistes-compte { margin: 0; }
