/* ============================================================
   En-tête avec couverture paysage (classe jpc-ph-landscape,
   ajoutée par PHP quand l'image est plus large que haute)
   Le thème affiche l'image d'en-tête en colonne portrait étroite
   (380-480px, ratio 130%) : pour une photo paysage on passe au
   ratio 16:9 avec une colonne bien plus large.
   ============================================================ */

#page-header.jpc-ph-landscape:not(.ph-bg-image).ph-image-cropped .ph-image-inner {
  padding-bottom: 56.25% !important;
}
#page-header.ph-full.jpc-ph-landscape:not(.ph-center):not(.ph-bg-image) .ph-image {
  width: clamp(680px, 58vw, 1400px);
  right: 6vw;
}
@media (max-width: 1600px) {
  #page-header.ph-full.jpc-ph-landscape:not(.ph-center):not(.ph-bg-image) .ph-image {
    width: 58vw;
  }
}
@media (max-width: 1024px) {
  #page-header.ph-full.jpc-ph-landscape:not(.ph-center):not(.ph-bg-image) .ph-image {
    width: 70vw;
    right: 5vw;
  }
}
@media (max-width: 540px) {
  #page-header.ph-full.jpc-ph-landscape:not(.ph-center):not(.ph-bg-image) .ph-image {
    width: 92%;
  }
}

/* ============================================================
   Popup partage/social : grandes icônes rondes + nom du réseau
   flottant et animé au survol
   ============================================================ */

.ph-share-content .social-buttons > ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}
.ph-share-content .social-buttons > ul > li { margin: 0; }
.ph-share-content .social-buttons > ul > li a {
  position: relative;
  width: 96px;
  height: 96px;
  font-size: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, opacity 0.2s;
}
.ph-share-content .social-buttons > ul > li a:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-6px);
}
/* Nom du réseau flottant au-dessus de l'icône */
.ph-share-content .social-buttons a[data-network]::after {
  content: attr(data-network);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  transform: translate(-50%, 10px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ph-share-content .social-buttons a[data-network]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 767px) {
  .ph-share-content .social-buttons > ul { gap: 18px; }
  .ph-share-content .social-buttons > ul > li a {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}

/* ============================================================
   Indicateurs de scroll (bas du page-header)
   4 variantes activables depuis Réglages → Personnalisation
   ============================================================ */

.jpc-scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 5;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px; /* zone cliquable confortable */
  transition: opacity 0.45s ease;
}
.jpc-scroll-indicator:hover { opacity: 1 !important; }

/* Enveloppe neutre de l'icône : c'est elle que l'effet magnétique du thème
   déplace (theme.js l'entoure d'un .magnetic-wrap au chargement), ce qui laisse
   à l'icône sa propre transformation — rotation du chevron, roulette, etc. */
/* Zone au moins aussi généreuse que l'icône du bouton de partage (40 px) :
   l'anneau du curseur a ainsi un cercle net à épouser, et la cible reste facile
   à attraper même quand l'icône est fine. */
.jpc-si-magnet {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
}
.jpc-scroll-indicator .magnetic-wrap { display: block; }

/* Libellé façon bouton de partage : discret, il se révèle au survol */
.jpc-si-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.jpc-scroll-indicator:hover .jpc-si-label {
  opacity: 0.9;
  transform: translateY(0);
}
@media (max-width: 1024px) {
  /* Pas de survol au doigt : le libellé n'apparaîtrait jamais */
  .jpc-si-label { display: none; }
}

/* Masqué en fondu dès que la page n'est plus tout en haut */
.jpc-scroll-indicator.jpc-si-hidden { opacity: 0 !important; pointer-events: none; }

/* ── 1. Chevron en boucle (arrow-loop) ── */
.jpc-si-arrow-loop {
  display: block;
  height: 13px;
  width: 13px;
  border: 11px solid transparent;
  transform: rotate(45deg);
  position: relative;
  margin: 0 auto;
}
.jpc-si-arrow-loop::after,
.jpc-si-arrow-loop::before {
  content: "";
  display: block;
  height: inherit;
  width: inherit;
  position: absolute;
  top: 0;
  left: 0;
  border-bottom: 3px solid #fff;
  border-right: 3px solid #fff;
}
.jpc-si-arrow-loop::after { animation: jpc-bottom-arrow 1.65s infinite; }
.jpc-si-arrow-loop::before { animation: jpc-top-arrow 1.65s infinite; }
@keyframes jpc-bottom-arrow {
  0%   { opacity: 1; transform: translate(0, 0); }
  45%  { opacity: 0; transform: translate(12px, 12px); }
  46%  { opacity: 0; transform: translate(-16px, -16px); }
  90%  { opacity: 1; transform: translate(-6px, -6px); }
  100% { opacity: 1; transform: translate(-6px, -6px); }
}
@keyframes jpc-top-arrow {
  0%   { transform: translate(-6px, -6px); }
  35%  { transform: translate(0, 0); }
  90%  { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 1; transform: translate(0, 0); }
}

/* ── 2. Flèche ronde rebondissante (bounce) ── */
.jpc-si-bounce svg {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  animation: jpc-bounce 2s infinite;
}
@keyframes jpc-bounce {
  0%, 25%, 50%, 75%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-12px); }
}

/* ── 3. Souris + chevrons (mouse) ── */
.jpc-si-mouse { display: block; width: 24px; margin: 0 auto; }
.jpc-si-mouse .jpc-mouse {
  height: 42px;
  width: 24px;
  border-radius: 14px;
  border: 2px solid #fff;
}
.jpc-si-mouse .jpc-wheel {
  height: 4px;
  width: 4px;
  display: block;
  margin: 5px auto;
  border: 2px solid #fff;
  border-radius: 8px;
  position: relative;
  animation: jpc-mouse-wheel 0.6s linear infinite;
}
.jpc-si-mouse .jpc-m-arrows { padding-top: 6px; }
.jpc-si-mouse .jpc-m-arrows span {
  display: block;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  margin: 0 auto;
  animation: jpc-mouse-scroll 1s infinite alternate;
}
.jpc-si-mouse .jpc-m-arrows span + span { margin-top: -7px; }
.jpc-si-mouse .jpc-m-arrows span:nth-child(1) { animation-delay: 0.1s; }
.jpc-si-mouse .jpc-m-arrows span:nth-child(2) { animation-delay: 0.2s; }
.jpc-si-mouse .jpc-m-arrows span:nth-child(3) { animation-delay: 0.3s; }
@keyframes jpc-mouse-wheel {
  0%   { top: 1px; }
  25%  { top: 2px; }
  50%  { top: 3px; }
  75%  { top: 2px; }
  100% { top: 1px; }
}
@keyframes jpc-mouse-scroll {
  0%   { opacity: 0; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ── 4. Double flèche en cascade (arrows) ── */
.jpc-si-arrows {
  position: relative;
  width: 36px;
  height: 36px;
  /* Les flèches descendent 24px sous la boîte pendant l'animation */
  margin: 0 auto 26px;
}
.jpc-si-arrows::before,
.jpc-si-arrows::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-left: 12px solid rgba(255, 255, 255, 0);
  border-bottom: 12px solid rgba(255, 255, 255, 0);
  animation: jpc-arrows 3s linear infinite;
}
.jpc-si-arrows::after { animation-delay: -1.5s; }
@keyframes jpc-arrows {
  0% {
    border-left: 12px solid rgba(255, 255, 255, 0);
    border-bottom: 12px solid rgba(255, 255, 255, 0);
    transform: translate(-6px, -24px) rotate(-45deg);
  }
  10%, 90% {
    border-left: 12px solid rgba(255, 255, 255, 0);
    border-bottom: 12px solid rgba(255, 255, 255, 0);
  }
  50% {
    border-left: 12px solid rgba(255, 255, 255, 0.9);
    border-bottom: 12px solid rgba(255, 255, 255, 0.9);
    transform: translate(-6px, 0) rotate(-45deg);
  }
  100% {
    border-left: 12px solid rgba(255, 255, 255, 0);
    border-bottom: 12px solid rgba(255, 255, 255, 0);
    transform: translate(-6px, 24px) rotate(-45deg);
  }
}
