/*
Theme Name: Yvan Chabre
Theme URI: https://www.yvanchabre.com/
Author: Yvan Chabre
Description: Thème de blocs sur mesure pour Yvan Chabre Photography — header épuré, héro plein écran (photo ou vidéo), grilles de galeries.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yvanchabre
*/

/* =========================
   BASE
   ========================= */

/* Gouttière de l'ascenseur toujours réservée : une page courte (sans
   ascenseur) et une page longue (avec) gardent la même colonne centrée,
   sinon logo, filets et images se décalent de ~7px de l'une à l'autre */
html {
  scrollbar-gutter: stable;
}

/* Pas d'écart automatique entre les blocs racine (header / main / footer) */
.wp-site-blocks > * + * {
  margin-block-start: 0;
}

/* Idem dans les zones gérées en flex/grid par le thème :
   l'écart auto de 24px entre blocs y décalerait les éléments verticalement */
.site-header-inner > *,
.header-zone-left > *,
.header-zone-center > *,
.header-zone-right > *,
.site-footer-inner > *,
.footer-row > *,
.footer-menu > * {
  margin-block-start: 0;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

a {
  transition: color 0.3s ease;
}

/* =========================
   HEADER
   ========================= */

.site-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  height: 80px;
}

body.admin-bar .site-header-bar {
  top: 32px;
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  /* content-box : les 1200px s'alignent sur le contenu, la gouttière de 30px
     ne sert que sous 1260px de large (comme le padding racine du contenu) */
  box-sizing: content-box;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 30px;
}

.header-zone-left {
  justify-self: start;
}

.header-zone-center {
  justify-self: center;
}

.header-zone-right {
  justify-self: end;
  display: flex;
  align-items: center;
}

/* Logo texte */
.site-title-logo {
  margin: 0;
  font-family: var(--wp--preset--font-family--onest), sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.site-title-logo a {
  color: #020000;
  text-decoration: none;
}

.site-title-logo a:hover {
  color: #969696;
}

@media (min-width: 768px) {
  .site-title-logo { font-size: 22px; }
}

@media (min-width: 992px) {
  .site-title-logo { font-size: 26px; }
}

/* Menu horizontal centré.
   Le bloc Navigation force « color: inherit » sur ses liens avec une
   spécificité élevée : on pose donc le noir sur le conteneur,
   l'héritage l'applique aux liens. */
.site-header-bar .header-menu {
  color: #020202;
}

.site-header-bar .header-menu a {
  font-family: var(--wp--preset--font-family--onest), sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #020202;
  text-decoration: none;
}

.site-header-bar .header-menu a:hover {
  color: #969696;
}

@media (max-width: 1024px) {
  .header-zone-center { display: none; }

  .site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* Icônes sociales */
.social-icons {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: 25px;
}

.social-icons a {
  color: #000;
  display: inline-flex;
  align-items: center;
}

.social-icons a:hover {
  color: #969696;
}

.social-icons svg {
  height: 24px;
  width: auto;
  fill: currentColor;
  display: block;
}

@media (max-width: 768px) {
  .social-icons {
    gap: 12px;
    margin-right: 12px;
  }

  .social-icons svg {
    height: 20px;
  }
}

/* Sélecteur de langue (drapeau) — même dessin que le bouton du portail
   clients : bordure fine, drapeau 21x11, code langue en Onest espacé.
   Les deux variantes sont rendues ; data-yc-current cache celle de la
   langue déjà active (le bouton montre toujours l'AUTRE langue). */
.lang-switch {
  display: inline-flex;
  align-items: center;
}

.lang-switch--header {
  margin-right: 25px;
}

.lang-switch__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: #ffffff;
  color: #020000;
  text-decoration: none;
  font-family: var(--wp--preset--font-family--onest), sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  transition: border-color 0.2s;
}

.lang-switch__link:hover {
  color: #020000;
  border-color: #969696;
}

.lang-switch__link svg {
  width: 21px;
  height: 11px;
  display: block;
  outline: 1px solid #d9d9d9;
}

.lang-switch[data-yc-current="fr"] .lang-switch__to-fr,
.lang-switch[data-yc-current="en"] .lang-switch__to-en {
  display: none;
}

.side-nav .lang-switch--drawer {
  margin-top: 36px;
}

@media (max-width: 768px) {
  .lang-switch--header {
    margin-right: 12px;
  }
  .lang-switch--header .lang-switch__link {
    padding: 6px 8px;
  }
}

/* Bouton burger
   (largeur fixe : sinon la largeur auto varie pendant l'animation
   des barres et fait trembler les icônes voisines) */
.navbar-toggle {
  background: none;
  border: 0;
  padding: 10px 0 10px 6px;
  cursor: pointer;
  display: block;
  box-sizing: content-box;
  width: 22px;
}

.navbar-toggle .icon-bar {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background: #020000;
  transition: width 0.13s ease-out, transform 0.13s ease-out, opacity 0.13s ease-out;
}

.navbar-toggle .icon-bar + .icon-bar {
  margin-top: 5px;
}

.navbar-toggle .icon-bar:nth-child(3) {
  width: 17px;
}

.navbar-toggle:hover .icon-bar {
  width: 17px;
}

.navbar-toggle:hover .icon-bar:nth-child(3) {
  width: 22px;
}

/* =========================
   MENU LATÉRAL (OFF-CANVAS)
   ========================= */

.side-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 5000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.side-nav-open .side-nav-overlay {
  opacity: 1;
  visibility: visible;
}

.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 9999;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(110%);
  transition: transform 0.25s ease;
  padding: 24px 30px;
  overflow-y: auto;
}

/* Espacement contrôlé au pixel : pas d'écart de bloc automatique ici */
.side-nav > * {
  margin-block-start: 0;
}

body.side-nav-open .side-nav {
  transform: translateX(0);
}

.side-nav__close {
  display: flex;
  justify-content: flex-end;
  /* le 1er lien du menu s'aligne sur le bord supérieur de l'image héro (80px) */
  margin-bottom: 20px;
}

/* Croix de fermeture (les barres du burger se croisent) */
.side-nav .navbar-toggle .icon-bar:nth-child(2) {
  transform: translateY(7px) rotate(45deg);
  width: 22px;
}

.side-nav .navbar-toggle .icon-bar:nth-child(3) {
  opacity: 0;
}

.side-nav .navbar-toggle .icon-bar:nth-child(4) {
  transform: translateY(-7px) rotate(-45deg);
  width: 22px;
}

/* Menu Sidebar (bloc Navigation) : couleur posée sur le conteneur,
   le bloc force « color: inherit » sur ses liens */
.side-nav-menu {
  color: #020202;
}

.side-nav-menu a {
  font-family: var(--wp--preset--font-family--onest), sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.side-nav .side-nav-menu a:hover {
  color: #969696;
}

/* =========================
   HÉRO PLEIN ÉCRAN
   ========================= */

.home-hero {
  margin: 0;
}

@supports (height: 100svh) {
  .home-hero {
    min-height: 100svh !important;
  }
}

/* Diaporama du héro (Apparence → Header Media → Slideshow) : les diapositives
   sont des images de fond du bloc Cover empilées (même format plein écran),
   fondu enchaîné entre elles ; les flèches sont celles du plugin YC Gallery
   (ycg-arrows.css — un seul dessin pour la lightbox et le héro). */
.home-hero .hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.home-hero .hero-slide {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.home-hero .hero-slide.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero .hero-slide {
    transition: none;
  }
}

/* Écrans très larges (au-delà de 21:9, ex. 49" 5120 × 1440 = 32:9) : le média
   du héro garde toute la hauteur de la fenêtre mais sa largeur est plafonnée
   à 21:9 et centrée, sur le fond blanc du site, pour ne pas réduire la photo
   à une mince bande recadrée. Les flèches du diaporama suivent le média.
   Le point focal (Apparence → Header Media, object-position sur chaque média)
   dit quelle partie de la photo garder quand le navigateur doit recadrer. */
@media (min-aspect-ratio: 21/9) {
  .wp-block-cover.home-hero {
    background: #fff;
  }

  .wp-block-cover.home-hero > .wp-block-cover__image-background,
  .wp-block-cover.home-hero > .wp-block-cover__video-background,
  .wp-block-cover.home-hero .hero-slides,
  .wp-block-cover.home-hero .hero-nav {
    width: calc(100svh * 21 / 9);
    max-width: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

.home-hero .hero-nav {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.home-hero .hero-nav .ycg-lb-arrow {
  pointer-events: auto;
}

/* Chevrons fins de navigation verticale : « défiler vers le contenu » en bas
   du héro (pointe en bas) et « retour en haut » du pied de page (pointe en
   haut, .chevron-up). UN SEUL dessin : un carré de 30 px à filet 2 px tourné
   de 45°, dont seule une pointe dépasse du cadre 56 × 24 px (choix d'Yvan,
   11 sept. 2026 : le retour en haut reprend ce chevron, pas les flèches
   carrées du diaporama qui sont réservées au passage d'une photo à l'autre). */
#scroll-to-content,
.chevron-up {
  display: block;
  position: relative;
  height: 1.5em;
  width: 3.5em;
  font-size: 1rem;
  overflow: hidden;
}

#scroll-to-content::before,
.chevron-up::before {
  content: "";
  display: block;
  position: absolute;
  left: 15px;
  height: 30px;
  width: 30px;
  border: 2px solid #020202;
  transform: rotate(45deg);
}

#scroll-to-content::before {
  bottom: 10px;
}

.chevron-up::before {
  top: 10px;
}

/* Flèche « défiler vers le contenu » en bas du héro */
.hero-wrap {
  position: relative;
}

#scroll-to-content {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 5;
  cursor: pointer;
  opacity: 0.5;
  transform: translateX(-50%);
  animation: pulsate 1.5s ease-out infinite;
}

#scroll-to-content:hover {
  opacity: 1;
}

@keyframes pulsate {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* =========================
   SECTION GALERIES
   ========================= */

.galleries-section {
  padding-top: 24px;
  padding-bottom: 140px;
}

/* Rangées de titre « filet — MOT — filet » (GALLERIES, WOMEN…).
   Enveloppe reprise du site en ligne : rangée de 90px (marges du texte),
   filets centrés sur le texte, contenu suivant collé dessous. */
.wp-block-post-content > .wp-block-columns:has(.wp-block-separator),
.site-main-plain > .wp-block-columns:has(.wp-block-separator) {
  margin-bottom: 0;
}

.wp-block-post-content > .wp-block-columns:has(.wp-block-separator) .wp-block-separator,
.site-main-plain > .wp-block-columns:has(.wp-block-separator) .wp-block-separator {
  border: 0;
  height: 1px;
  background: #d9d9d9;
  opacity: 1;
  width: 100%;
  margin: 0;
}

/* Le mot du motif — qu'il soit un simple paragraphe ou un H1 (SEO),
   il garde exactement le même rendu */
.wp-block-post-content > .wp-block-columns:has(.wp-block-separator) :is(p, h1, h2),
.site-main-plain > .wp-block-columns:has(.wp-block-separator) :is(p, h1, h2) {
  margin: 30px 0 31px;
  font-family: var(--wp--preset--font-family--inter), sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: normal;
  color: #444444;
}

/* Ce qui suit la rangée de titre s'y colle (la galerie a déjà 10px
   de padding interne au-dessus des photos) */
.wp-block-post-content > .wp-block-columns:has(.wp-block-separator) + * {
  margin-block-start: 0;
}

/* La grille de vignettes n'a pas ce padding interne : compenser
   pour que les photos démarrent au même pixel que dans les galeries */
.wp-block-post-content > .wp-block-columns:has(.wp-block-separator) + .galleries {
  margin-block-start: 10px;
}

/* Rangée de titre rendue par le gabarit de page par défaut (page.html) :
   le titre de la page devient un vrai H1 au style exact du paragraphe
   des rangées construites dans le contenu */
.page-title-row .wp-block-post-title {
  margin: 30px 0 31px;
  font-family: var(--wp--preset--font-family--inter);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  text-transform: uppercase;
  color: #444444;
}

.site-main-plain > .page-title-row + * {
  margin-block-start: 0;
}

.page-title-row + .wp-block-post-content > .galleries:first-child {
  margin-block-start: 10px;
}

.galleries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.gallery-item {
  margin: 0;
}

.gallery-item .gallery-image {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.gallery-item .gallery-image a {
  display: block;
}

.gallery-item .gallery-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  transition: transform 0.8s ease;
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.03);
}

a.gallery-item {
  display: block;
  text-decoration: none;
}

.gallery-label {
  margin: 10px 0 0;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: #000;
  transition: color 0.3s ease;
}

.gallery-item:hover .gallery-label {
  color: #969696;
}

@media (max-width: 768px) {
  .galleries-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
  }

  .gallery-item {
    width: 100%;
    max-width: 420px;
  }
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  background: #fff;
}

.site-footer-inner {
  box-sizing: content-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-separator {
  border: 0;
  height: 1px;
  background: #232323;
  opacity: 1;
  margin: 0;
  width: 100%;
  max-width: none;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 75px;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 14px;
  color: #020202;
  margin: 0;
}

/* Menu Footer (bloc Navigation) : couleur posée sur le conteneur,
   le bloc force « color: inherit » sur ses liens */
.footer-menu {
  white-space: nowrap;
  margin-left: auto;
  color: #000;
  font-size: 16px;
}

.footer-menu a {
  text-decoration: none;
}

.site-footer-inner .footer-menu a:hover {
  color: #969696;
}

@media (max-width: 600px) {
  .footer-row {
    padding: 16px 0;
    row-gap: 4px;
  }
}

/* =========================
   BOUTON RETOUR EN HAUT
   (réplique du plugin WPFront Scroll Top du site en ligne :
   64x64 à 20px du coin bas-droit, icône 56px noire, opacité 0.8,
   survol gris, apparition sans fondu)
   ========================= */

/* Même chevron fin que la flèche de descente du héro (voir section HÉRO),
   sans pulsation ; zone cliquable 64 × 48 px, dessin 56 × 24 px centré. */
#wpfront-scroll-top-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 64px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#wpfront-scroll-top-container.show {
  visibility: visible;
  opacity: 0.5;
}

#wpfront-scroll-top-container.show:hover {
  opacity: 1;
}

/* =========================
   DESCRIPTION DE GALERIE
   (paragraphe discret sous les photos — colophon de la série)
   ========================= */

.gallery-description {
  max-width: 720px;
  margin: 90px auto 0;
  font-size: 14px;
  line-height: 1.9;
  color: #6e6e6e;
  text-align: center;
}

/* petit filet centré au-dessus, dans le langage des motifs du site */
.gallery-description::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto 28px;
  background: #d9d9d9;
}

.gallery-description a {
  color: #444444;
}

/* =========================
   PAGES DE TEXTE (FAQ, Cookie Policy…)
   Rythme vertical : un titre appartient au paragraphe qui le suit.
   Grand espace AVANT un titre (56px), petit espace APRÈS (12px),
   paragraphes entre eux à 24px (blockGap). Interligne des titres
   resserré : le 1.8 du corps laissait 20px d'air interne au H2.
   ========================= */

.wp-block-post-content .wp-block-heading {
  line-height: 1.3;
}

:is(.wp-block-post-content, .wp-block-post-content .wp-block-group) > :where(h2, h3).wp-block-heading:not(:first-child) {
  margin-block-start: 56px;
}

:is(.wp-block-post-content, .wp-block-post-content .wp-block-group) > :where(h3).wp-block-heading:not(:first-child) {
  margin-block-start: 40px;
}

:is(.wp-block-post-content, .wp-block-post-content .wp-block-group) > .wp-block-heading + * {
  margin-block-start: 12px;
}

/* =========================
   VERSIONS LINGUISTIQUES
   Lien « Version française » / « English version » injecté sous la
   rangée de titre (pages sœurs), et encart « Version française
   ci-dessous » d'une page empilée : petites capitales espacées,
   même traitement que le lien View Instagram de la page Contact.
   ========================= */

.wp-block-post-content > :is(.page-lang-switch, .page-lang-note) {
  margin: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.wp-block-post-content > :is(.page-lang-switch, .page-lang-note) a {
  color: #020000;
  text-decoration: none;
}

.wp-block-post-content > :is(.page-lang-switch, .page-lang-note) a:hover {
  color: #969696;
}

.wp-block-post-content > :is(.page-lang-switch, .page-lang-note) + *,
.wp-block-post-content > :is(.page-lang-switch, .page-lang-note) + .wp-block-heading:not(:first-child) {
  margin-block-start: 40px;
}

/* Section française empilée à la suite du texte anglais (Cookie Policy) */
.wp-block-post-content > .wp-block-separator.lang-sep {
  border: 0;
  height: 1px;
  width: 100px;
  margin: 72px auto 0;
  background: #d9d9d9;
  opacity: 1;
}

.wp-block-post-content > .lang-fr {
  margin-block-start: 72px;
  scroll-margin-top: 110px;
}

.wp-block-post-content > .lang-fr > .lang-section-title {
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: normal;
  text-transform: uppercase;
  color: #444444;
}

/* =========================
   PAGE ABOUT
   Colonnes photo 40% / texte 60%. L'encart photo est un groupe
   .about-photo : tant que le bloc Image est vide, il affiche un
   cadre 3:4 gris clair en attente du portrait ; une fois l'image
   choisie dans l'éditeur, le cadre disparaît.
   ========================= */

.about-columns {
  align-items: flex-start;
}

.about-photo .about-portrait {
  margin: 0;
}

.about-photo .about-portrait img {
  display: block;
  width: 100%;
  height: auto;
}

/* Bloc Image vide = rien d'émis au rendu : le cadre d'attente est
   porté par le groupe lui-même */
.about-photo:not(:has(img)) {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f4f4f4;
  border: 1px dashed #d9d9d9;
}

.about-photo:not(:has(img))::after {
  content: "Portrait photo";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #969696;
}

:lang(fr) .about-photo:not(:has(img))::after {
  content: "Photo portrait";
}

.about-lead {
  font-size: 20px;
  line-height: 1.6;
  color: #020000;
}

.about-signature {
  margin-block-start: 40px;
  font-family: var(--wp--preset--font-family--onest);
  font-size: 22px;
  font-weight: 700;
  color: #020000;
}

@media (max-width: 781px) {
  .about-columns .wp-block-column {
    flex-basis: 100% !important;
  }
  .about-photo {
    max-width: 360px;
    margin: 0 auto 24px;
  }
}

/* =========================
   PAGE TESTIMONIALS
   Citations sans filet : texte en 18px, auteur en petites capitales
   espacées, 56px entre deux témoignages.
   ========================= */

.testimonials-intro,
.testimonials-note,
.testimonials-outro {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

/* Note « témoignages dans leur langue d'origine » : discrète, collée à l'intro */
.wp-block-post-content > .testimonials-note {
  margin-block-start: 8px;
  font-size: 13px;
  color: #969696;
}

.wp-block-post-content > .testimonials-note + .wp-block-quote.testimonial {
  margin-block-start: 56px;
}

.wp-block-quote.testimonial {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.wp-block-post-content > .wp-block-quote.testimonial:not(:first-child) {
  margin-block-start: 56px;
}

.wp-block-post-content > .wp-block-quote.testimonial + .testimonials-outro {
  margin-block-start: 72px;
}

.wp-block-quote.testimonial p {
  font-size: 18px;
  line-height: 1.7;
  font-style: normal;
  color: #020000;
}

.wp-block-quote.testimonial cite {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-style: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #444444;
}

/* =========================
   PAGES SESSIONS / SEANCES
   Parent : intro centree + grille de 3 cartes (titre lie, texte,
   lien en petites capitales). Enfants : accroche 20px, liste de
   faits sans puces, appel a l'action en petites capitales.
   ========================= */

.sessions-intro,
.session-lead {
  font-size: 20px;
  line-height: 1.6;
  color: #020000;
}

.sessions-intro {
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}

.wp-block-post-content > .sessions-grid {
  margin-block-start: 48px;
  gap: 24px;
}

.session-card {
  padding: 32px 28px 28px;
  border: 1px solid #d9d9d9;
  display: flex;
  flex-direction: column;
}

.session-card > .wp-block-heading {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.3;
}

.session-card > .wp-block-heading a,
.session-card > .wp-block-heading a:hover {
  text-decoration: none;
}

.session-card > p {
  margin: 0;
}

.session-card > .session-more {
  margin-top: auto;
  padding-top: 24px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.session-card > .session-more a,
.session-cta a {
  color: #020000;
  text-decoration: none;
}

.session-card > .session-more a:hover,
.session-cta a:hover {
  color: #969696;
}

.wp-block-post-content > .sessions-grid + .wp-block-heading {
  margin-block-start: 72px;
}

.session-facts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.session-facts li {
  padding: 14px 0;
  border-top: 1px solid #d9d9d9;
}

.session-facts li:last-child {
  border-bottom: 1px solid #d9d9d9;
}

.session-facts strong {
  color: #020000;
  font-weight: 500;
}

.wp-block-post-content > .session-cta {
  margin-block-start: 56px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Photo d'en-tête des encarts de la page Sessions (shortcode [yc_card_photo]) :
   bandeau 3:2 à fond perdu jusqu'aux bords de la carte, filet dessous.
   Les marges négatives compensent le padding de .session-card. */
.session-card {
  --card-pad-y: 32px;
  --card-pad-x: 28px;
}

.session-card > .session-card-photo {
  display: block;
  margin: calc(-1 * var(--card-pad-y)) calc(-1 * var(--card-pad-x)) 22px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid #d9d9d9;
  line-height: 0;
}

.session-card > .session-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}

.session-card:hover > .session-card-photo img {
  transform: scale(1.03);
}

/* Photos des pages Séances enfants : rangée de petites photos sous
   l'accroche (shortcode [yc_session_photos]), hauteur commune, proportions
   d'origine, puis lien vers la galerie en petit texte centré. */
.wp-block-post-content > .session-photos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 36px;
}

.session-photos a {
  display: block;
  line-height: 0;
}

.session-photos img {
  display: block;
  height: var(--session-photo-h, 180px);
  width: auto;
  transition: opacity 0.4s ease;
}

.session-photos a:hover img {
  opacity: 0.85;
}

.wp-block-post-content > .session-photos-more {
  margin-block-start: 14px;
  text-align: center;
  font-size: 13px;
  color: #6e6e6e;
}

.session-photos-more a {
  color: #444444;
}

.wp-block-post-content > .session-photos-more + .wp-block-heading {
  margin-block-start: 56px;
}

@media (max-width: 781px) {
  .session-photos {
    gap: 8px;
  }

  .session-photos img {
    height: calc(var(--session-photo-h, 180px) * 0.6);
  }

  .session-card {
    --card-pad-y: 24px;
    --card-pad-x: 22px;
    padding: 24px 22px 22px;
  }
}

/* =========================
   LIENS DANS LE TEXTE
   Filet fin et clair, décollé du mot ; mot et filet passent au gris
   de survol. Les liens « éléments » (menus, vignettes, boutons,
   View Instagram) gardent leur text-decoration: none propre.
   ========================= */

:root body :where(a:not(.wp-element-button)) {
  text-decoration-thickness: 1px;
  text-decoration-color: #d9d9d9;
  text-underline-offset: 4px;
}

:root body :where(a:not(.wp-element-button)):hover {
  text-decoration-color: #969696;
}

/* =========================
   PAGE 404
   ========================= */

.error-404 a {
  color: #020202;
}

.error-404 a:hover {
  color: #969696;
}

/* =========================
   PAGES INTÉRIEURES
   ========================= */

/* Le header étant fixe, les pages sans héro plein écran ont besoin d'un dégagement */
.site-main-padded {
  padding-top: 140px;
  padding-bottom: 80px;
}

/* =========================
   PAGE CONTACT
   (même design que l'écran de connexion des galeries privées :
   carte centrée 460px, champs centrés à filets fins, boutons noirs carrés)
   ========================= */

/* Le plugin galeries pose un box-sizing: border-box global : sans lui,
   les champs à padding en width:100% déborderaient de la carte */
.contact-wrap,
.contact-wrap * {
  box-sizing: border-box;
}

.contact-wrap {
  width: 460px;
  max-width: 100%;
  margin: 0 auto;
  padding-bottom: 100px;
  text-align: center;
}

.contact-hint {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: #444444;
}

/* Intitulés des deux moyens de contact (« Fastest way… », « For detailed inquiries: ») */
.contact-note {
  margin: 40px 0 0;
  font-size: 13.5px;
  color: #444444;
}

/* Bouton noir plein — copie du bouton de connexion des galeries */
.contact-insta-btn,
.contact-form button {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: #020000;
  color: #ffffff;
  border: 1px solid #020000;
  border-radius: 2px;
  padding: 13px;
  font-family: var(--wp--preset--font-family--onest), sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-insta-btn:hover,
.contact-form button:hover {
  background: #2b2b2b;
  color: #ffffff;
}

.contact-insta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.contact-insta-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Lien vers le profil Instagram — même habillage que les libellés de galeries */
.contact-insta-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #020000;
  text-decoration: none;
}

.contact-insta-link:hover {
  color: #969696;
}

.contact-sep {
  width: 100px;
  height: 1px;
  background: #d9d9d9;
  margin: 44px auto 0;
}

/* Champs — copie des champs de l'écran de connexion */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: #020000;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  letter-spacing: 0.08em;
}

.contact-form input[type="text"] {
  margin-top: 24px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #020000;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  margin-top: 12px;
}

.contact-reply-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: #444444;
}

/* Messages d'état : fondu à l'apparition, hors de l'arbre d'accessibilité sinon */
.contact-msg {
  margin: 14px 0 0;
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.contact-msg.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.contact-msg-error {
  color: #d92d20;
}

.contact-msg-success {
  color: #189d52;
}

/* Anneau « envoi en cours » dans le bouton */
.contact-loader {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  margin-left: 8px;
  animation: contact-spin 0.8s linear infinite;
}

@keyframes contact-spin {
  to { transform: rotate(360deg); }
}
