/* Virginie photographie : couche de compatibilité WordPress.
   Neutralise ce que WordPress ajoute autour des blocs, et relie les blocs natifs aux composants de la charte. */

/* ---------- Socle ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.vp { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--font-sans); }
.vp .wp-site-blocks { padding: 0; min-height: 100vh; display: flex; flex-direction: column; }
.vp .wp-site-blocks > * { margin-block: 0; }
.vp .vp-principal { flex: 1; }
.vp .vp-gabarit-entete, .vp .vp-gabarit-pied, .vp .wp-block-post-content { display: contents; }
.vp :where(.is-layout-flow, .is-layout-constrained) > * { margin-block: 0; }
.vp .wp-block-group { box-sizing: border-box; }

/* Lien d'évitement, visible au clavier seulement */
.vp-saut { position: absolute; left: var(--espace-4); top: -100px; z-index: 100; background: var(--crepuscule); color: var(--ivoire); padding: var(--espace-3) var(--espace-4); border-radius: var(--rayon-1); text-decoration: none; }
.vp-saut:focus { top: var(--espace-3); }
.vp-logo-texte { font-family: var(--font-serif); font-size: 24px; color: var(--titre); }

/* Menu téléphone : icône ouvrir / fermer */
.vp-nav__menu .vp-nav__fermer { display: none; }
.vp-nav__menu[open] .vp-nav__ouvrir { display: none; }
.vp-nav__menu[open] .vp-nav__fermer { display: inline-flex; }
.vp-nav__menu summary span { display: inline-flex; }
@media (max-width: 760px) {
  .vp-nav { position: relative; }
  .vp-nav__menu { position: static; }
  .vp-nav__panneau { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; box-shadow: var(--ombre-tirage); }
}

/* ---------- Boutons natifs (bloc Bouton) ---------- */
.vp .wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--espace-4); }
.vp .wp-block-button { margin: 0; }
.vp .wp-block-button__link, .vp .wp-element-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--espace-2);
  min-height: 48px; padding: var(--espace-3) var(--espace-5); box-sizing: border-box;
  border: 1px solid transparent; border-radius: var(--rayon-1);
  font: 600 16px/20px var(--font-sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  background: var(--action); color: var(--sur-action);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.vp .wp-block-button__link:hover, .vp .wp-block-button__link:focus-visible { background: var(--action-survol); color: var(--sur-action); }
.vp .is-style-secondaire .wp-block-button__link { background: transparent; color: var(--titre); border-color: var(--bordure); }
.vp .is-style-secondaire .wp-block-button__link:hover { background: var(--fond-alt); border-color: var(--titre); color: var(--titre); }
.vp .is-style-lien .wp-block-button__link { min-height: 0; padding: var(--espace-1) 0; background: none; color: var(--lien); border: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.vp .is-style-lien .wp-block-button__link:hover { background: none; color: var(--titre); }

/* ---------- Images natives ---------- */
.vp .wp-block-image { margin: 0; }
.vp .wp-block-image img { display: block; max-width: 100%; height: auto; }
.vp .vp-ouverture .vp-ouverture__photo img { width: 100%; height: min(78vh, 820px); object-fit: cover; }
@media (max-width: 760px) { .vp .vp-ouverture .vp-ouverture__photo img { height: 62vh; } }
.vp .wp-block-image figcaption, .vp .wp-element-caption { margin: var(--espace-2) 0 0; font: 400 14px/20px var(--font-sans); color: var(--texte-doux); text-align: left; }

/* ---------- Encart texte + photo (accueil, expositions) ---------- */
.vp .vp-encart { background: var(--fond-alt); padding: clamp(24px, 5vw, 64px) clamp(20px, 4vw, 48px); }
.vp .vp-encart__texte { display: grid; gap: var(--espace-4); justify-items: start; }
.vp .vp-tirage-apercu { background: var(--fond); padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 48px); display: flex; justify-content: center; }
.vp .vp-tirage-apercu img { width: 82%; margin: 0 auto; box-shadow: var(--ombre-tirage); }
.vp .vp-duo--haut { align-items: start; }
.vp .vp-texte-long { display: grid; gap: var(--espace-5); max-width: var(--largeur-lecture); }
.vp .vp-portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 65%; width: 100%; }
.vp .vp-bandeau { border-top: 1px solid var(--filet); padding-top: var(--espace-7); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--espace-5); }
.vp .vp-bandeau > p { max-width: 30ch; }
.vp .vp-ligne-filets { border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); padding: var(--espace-8) 0; display: flex; justify-content: center; }
.vp .vp-titre-section { margin-bottom: var(--espace-5); }

/* Cartes « ce que je photographie » : toute la carte cliquable via le lien du titre */
.vp .vp-deux-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--espace-7); }
.vp .vp-carte-lien { position: relative; display: grid; gap: var(--espace-2); }
.vp .vp-carte-lien .wp-block-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.vp .vp-carte-lien h3 { margin-top: var(--espace-3); }
.vp .vp-carte-lien h3 a { color: inherit; text-decoration: none; }
.vp .vp-carte-lien h3 a::after { content: ""; position: absolute; inset: 0; }
.vp .vp-carte-lien:hover h3 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--lien); }
.vp .vp-carte-lien p { color: var(--texte-doux); }

/* Contact : formulaire et colonne d'aide */
.vp .vp-contact { display: flex; flex-wrap: wrap; gap: var(--espace-8); align-items: start; }
.vp .vp-contact > .vp-form { flex: 999 1 520px; min-width: 0; max-width: 46rem; }
.vp .vp-contact__aside { flex: 1 1 280px; display: grid; gap: var(--espace-5); max-width: 22rem; }
.vp .vp-contact__aside .wp-block-group { display: grid; gap: var(--espace-2); }

/* Filtres au dessus de la grille */
.vp .vp-section--series > .vp-filtres { margin: calc(-1 * var(--espace-4)) 0 var(--espace-7); }
.vp .vp-note { color: var(--texte-doux); margin-top: var(--espace-5); }
@media (max-width: 760px) {
  .vp .vp-ouverture__actions .wp-block-button { flex: 1 1 100%; }
  .vp .vp-ouverture__actions .wp-block-button__link { width: 100%; }
}

/* Étapes « Comment commander » saisies en blocs */
.vp ol.vp-commande__etapes > li { list-style: none; }

/* ---------- Citation (bloc Citation) ---------- */
.vp .wp-block-quote.vp-citation { border: 0; padding: 0; margin: 0; }
.vp .wp-block-quote.vp-citation p { font-family: var(--font-serif); font-variation-settings: "SOFT" 100, "WONK" 0; font-style: italic; font-weight: 340; font-size: 22px; line-height: 34px; color: var(--titre); margin: 0; }
.vp .wp-block-quote.vp-citation cite { grid-column: 2; margin-top: var(--espace-3); font: 400 14px/20px var(--font-sans); font-style: normal; color: var(--texte-doux); }

/* ---------- Page d'une série ---------- */
.vp-serie-entete { max-width: var(--largeur-contenu); margin: 0 auto; padding: var(--espace-6) var(--espace-6) 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--espace-3); }
.vp-serie-entete__titre { display: grid; gap: var(--espace-1); justify-items: start; }
.vp-serie-presentation { max-width: var(--largeur-contenu); margin: var(--espace-3) auto 0; padding: 0 var(--espace-6); color: var(--texte-doux); }
.vp-visionneuse__liste { list-style: none; margin: 0; padding: 0; }
/* Sans JavaScript, un lien vers #photo-3 affiche quand même la photo 3. */
.vp-visionneuse:not(.est-active) .vp-visionneuse__photo[hidden]:target { display: block; }
.vp-visionneuse:not(.est-active):has(.vp-visionneuse__photo:target) .vp-visionneuse__photo:first-child:not(:target) { display: none; }
.vp-visionneuse:not(.est-active) .vp-photo__nav { display: none; }
.vp-visionneuse .vp-photo__cadre img { width: auto; height: auto; max-width: min(100%, 1180px); max-height: 82vh; }
.vp-visionneuse .vp-photo__texte h2 { margin: 0; }
.vp-serie-page__bas { max-width: var(--largeur-contenu); margin: 0 auto; padding: 0 var(--espace-6) var(--espace-9); box-sizing: border-box; }
.vp-serie-page__suite { border-top: 1px solid var(--filet); margin-top: var(--espace-7); padding-top: var(--espace-6); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--espace-4); }
.vp-bande a { display: block; }
.vp-bande img { display: block; }
@media (max-width: 640px) {
  .vp-serie-entete, .vp-serie-presentation { padding-left: var(--espace-4); padding-right: var(--espace-4); }
  .vp-serie-page__bas { padding: 0 var(--espace-4) var(--espace-8); }
  .vp-visionneuse .vp-photo__cadre img { width: 100%; max-height: none; }
}

/* ---------- Formulaires ---------- */
.vp-form__piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vp-form { position: relative; }
.vp-form__alerte { border: 2px solid var(--erreur); border-radius: var(--rayon-1); padding: var(--espace-3) var(--espace-4); background: var(--fond); color: var(--erreur); }
.vp-facultatif { font-weight: 400; color: var(--texte-doux); }
.vp-confirmation { scroll-margin-top: var(--espace-7); }
.vp-confirmation .titre-3 { color: var(--titre); }
.vp-form { scroll-margin-top: var(--espace-6); }

/* ---------- Bas de page : texte clair sur fond sombre ---------- */
.vp .vp-pied .legende, .vp .vp-pied__bas { color: var(--sable); }
.vp .vp-pied__bas a { text-decoration: underline; text-underline-offset: 3px; }
.vp .vp-pied .vp-pied__presentation { display: grid; gap: var(--espace-4); align-content: start; }
.vp .vp-pied__presentation p { max-width: 32ch; }

/* ---------- Divers ---------- */
.vp-vide { color: var(--texte-doux); }
.vp-section > .vp-titre-section + .vp-vide, .vp-section > h2 + .vp-vide { margin-top: var(--espace-3); }
.vp .vp-format__apercu img { max-width: 58%; height: auto; }
.vp .vp-format__apercu--livre img { max-width: 46%; outline: 10px solid var(--fond-alt); }
