/* Anneau showcase 3D — sandromatera.fr */
.showcase-ring {
  --ring-max: 720px;           /* largeur maximale du bloc */
  --ring-size: 80;             /* diamètre de l'anneau, en % du bloc */
  --card-size: 20;             /* taille d'une carte, en % du bloc */
  --opening: -11deg;           /* angle de vue au-dessus de l'anneau */
  --tilt: -37deg;               /* inclinaison de l'anneau dans le plan */
  --perspective: 170cqw;       /* plus petit = perspective plus forte */
  width: 100%;
  max-width: var(--ring-max);
  aspect-ratio: 1;
  position: relative;
  container-type: inline-size;
  perspective: var(--perspective);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.showcase-ring.is-dragging { cursor: grabbing; }
.showcase-ring__scene {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateZ(var(--tilt)) rotateX(var(--opening));
}
.showcase-ring__track {
  position: absolute; left: 50%; top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
}
.showcase-ring__card {
  --w: calc(var(--card-size) * 1cqw);
  position: absolute;
  width: var(--w); height: var(--w);
  margin: calc(var(--w) / -2);
  border-radius: 16%;
  overflow: hidden;
  background: #1c1c22;
  will-change: transform, filter;
}
/* Éclairage global : voile blanc doux dont l'opacité (pilotée par le JS) dépend de la position
   de la carte à l'écran — ensemble, les cartes dessinent une seule tache de lumière en haut à droite */
.showcase-ring__gloss {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(140% 140% at 70% 25%, rgba(255,255,255,.75) 0%, rgba(255,255,255,.45) 60%, rgba(255,255,255,.3) 100%);
}
/* Carte = lien vers l'article : pas de glisser-déposer natif du lien, pas de surbrillance au toucher */
a.showcase-ring__card,
.showcase-ring__card[data-href] {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: inherit;                       /* « main qui attrape » de la roue ; passe en pointeur via .is-link */
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.showcase-ring.is-link:not(.is-dragging) { cursor: pointer; }
.showcase-ring__card img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.showcase-ring__card.is-hover img { transform: scale(1.07); }
.showcase-ring__card:focus-visible { outline: 2px solid #f7971e; outline-offset: 3px; }

/* Vidéo à la une (fichier WordPress ou Vimeo) : posée sur l'image, recadrée comme elle */
.showcase-ring__card .sm-real__video,
.showcase-ring__card .sm-real__vimeo {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;                  /* le clic et le glisser restent à la carte */
  transition: opacity .6s ease;
}
.showcase-ring__card .sm-real__video.is-on,
.showcase-ring__card .sm-real__vimeo.is-on { opacity: 1; }
.showcase-ring__card .sm-real__video { width: 100%; height: 100%; object-fit: cover; }
.showcase-ring__card .sm-real__vimeo { container-type: size; overflow: hidden; }
.showcase-ring__card .sm-real__vimeo iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: max(100cqw, calc(100cqh * var(--sm-ratio, 1.7778)));
  height: max(100cqh, calc(100cqw / var(--sm-ratio, 1.7778)));
  max-width: none;
  border: 0;
  transform: translate(-50%, -50%);
}

/* Mobile : voile noir qui remplace le filtre de luminosité (ajouté par le JS, opacité pilotée par lui) */
.showcase-ring__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: #000;
  opacity: 0;
}

.showcase-ring__card picture { display: block; width: 100%; height: 100%; }
.showcase-ring__card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  max-width: none; margin: 0;
  pointer-events: none; -webkit-user-drag: none;
}

/* ===== Intégration dans le hero de la page d'accueil ===== */
#page-header.ph-has-ring .ph-image--ring {
  line-height: normal;
}
/* Dans l'accueil (fond transparent), les cartes peuvent déborder du cadre :
   évite qu'elles soient coupées net, surtout quand la roue grossit au scroll */
#page-header.ph-has-ring .showcase-ring {
  --ring-max: 100%;            /* la roue prend toute la place que lui donne la mise en page */
  overflow: visible;
  transform-origin: 50% 50%;
}
/* Texte descriptif sous le titre, plus discret */
#page-header.ph-has-ring .ph-caption-subtitle {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.7;
}
@media (min-width: 1025px) {
  /* Colonne texte à gauche */
  /* Marges équilibrées : le texte démarre à la même distance du bord gauche
     que le bloc « Formateur et Activateur » du bord droit (5,5 % de l'écran) */
  body.tt-boxed #page-header.ph-has-ring .page-header-inner.tt-wrap {
    max-width: none;
    padding-left: 5.5vw;
    padding-right: 5.5vw;
  }
  #page-header.ph-has-ring .ph-caption-title,
  #page-header.ph-has-ring .ph-caption-subtitle {
    max-width: 40vw !important;
  }
  /* Roue à droite, centrée verticalement, sans toucher les logos du bord droit */
  #page-header.ph-has-ring .ph-image--ring,
  #page-header.ph-full.ph-has-ring:not(.ph-center):not(.ph-bg-image) .ph-image--ring {
    width: min(43vw, 760px);
    right: 13.5vw;
    justify-content: center;
  }
}
@media (max-width: 1024px) {
  /* Tablette / mobile : la roue passe dans le flux, au-dessus du titre */
  #page-header.ph-has-ring .ph-image--ring,
  #page-header.ph-full.ph-has-ring:not(.ph-center):not(.ph-bg-image) .ph-image--ring {
    position: relative;
    top: auto; right: auto; bottom: auto;
    width: min(92vw, 520px);
    height: auto;
    margin: -200px auto -20px;
    display: flex;
    justify-content: center;
  }
}

/* ===== Curseur sur la roue (balle du thème réduite de 20 % + texte) ===== */
#ball.ball-ring .ball-drag::before,
#ball.ball-ring .ball-drag::after {
  font-size: 15px;                       /* 19px -20 % */
}
#ball.ball-ring .ball-drag::before { transform: translate3d(-24px, 0, 0); } /* 30px -20 % */
#ball.ball-ring .ball-drag::after  { transform: translate3d(24px, 0, 0); }
#ball .ball-ring-label {
  position: absolute;
  left: calc(100% + 36px);               /* après la flèche de droite */
  top: 50%;
  transform: translate3d(-6px, -50%, 0);
  white-space: nowrap;
  font-family: "botanika-mono-web", monospace;
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1;
  color: #FFF;
  text-shadow: 0 1px 3px rgba(0,0,0,.6), 0 0 10px rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .3s, transform .3s;
}
#ball .ball-ring-label.is-visible {
  opacity: .9;
  transform: translate3d(0, -50%, 0);
}
#ball .ball-drag-v {
  position: absolute;
  inset: 0;
}
#ball .ball-drag-v::before,
#ball .ball-drag-v::after {
  position: absolute;
  left: 50%;
  width: 10px;
  margin-left: -5px;
  text-align: center;
  font-size: 15px;
  line-height: 10px;
  color: #FFF;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
#ball .ball-drag-v::before { content: "\f106"; top: 50%; margin-top: -5px; transform: translate3d(0, -43px, 0); } /* haut */
#ball .ball-drag-v::after  { content: "\f107"; top: 50%; margin-top: -5px; transform: translate3d(0, 43px, 0); }  /* bas */

/* ===== Grands écrans (≥ 1600px) : roue plus grande ===== */
@media (min-width: 1600px) {
  #page-header.ph-has-ring .ph-image--ring,
  #page-header.ph-full.ph-has-ring:not(.ph-center):not(.ph-bg-image) .ph-image--ring {
    width: min(53vw, 1300px, 125vh);   /* plafonds relevés : la roue peut vraiment grandir */
    right: calc(4.5vw + 118px);   /* juste avant le bloc « Formateur et Activateur » */
  }
}

/* ---------- Bouton « Cliquez ici » du hero : même effet verre que « Voir toutes les réalisations » ---------- */
/* Comme l'ancien bouton du thème : passe devant le grand titre fantôme « Sandro Matera » */
.sm-btn-verre-wrap { position: relative; z-index: 9; }
a.sm-btn-verre {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
a.sm-btn-verre i {
  font-style: normal;
  transition: transform .35s ease;
}
a.sm-btn-verre:hover {
  background: #f7971e;
  border-color: #f7971e;
  color: #000;
}
a.sm-btn-verre:hover i { transform: translateX(6px); }
a.sm-btn-verre:focus-visible {
  outline: 2px solid #f7971e;
  outline-offset: 4px;
}
