/* ===========================================================
   A.D.M.A.M - page "Les jeunes ont du talent"
   Cadrage des visages : reglage unique ci-dessous (valeurs par defaut).
   Ajustement par personne : style="--cx:.42;--cy:.24;--zoom:2.6" sur le lien .talent-card
   =========================================================== */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.talent-grid {
  list-style: none; margin: 0 0 72px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}

.talent-card {
  --cx: .42;   /* position horizontale du visage sur l'affiche (0 a 1) */
  --cy: .24;   /* position verticale du visage sur l'affiche (0 a 1) */
  --zoom: 2.6; /* agrandissement */
  display: flex; flex-direction: column; align-items: center; text-align: center;
  height: 100%; padding: 26px 18px 24px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .45s var(--ease-fluid), border-color .3s ease, box-shadow .45s var(--ease-fluid);
}

.talent-photo {
  position: relative; display: block; width: 78%; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--sky-blue), var(--violet-deep));
  box-shadow: 0 0 0 3px var(--navy-deep), 0 0 0 5px var(--sunset-orange);
}
.talent-photo img {
  position: absolute; max-width: none; height: auto;
  width: calc(var(--zoom) * 100%);
  left: calc(50% - var(--cx) * var(--zoom) * 100%);
  top: calc(50% - var(--cy) * var(--zoom) * 150%);
  transition: transform .6s var(--ease-fluid);
  will-change: transform;
}

.talent-name { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; color: var(--text-primary); }
.talent-name strong { font-weight: 800; display: block; overflow-wrap: anywhere; }
.talent-role { margin-top: 6px; color: var(--sunset-gold); font-size: .85rem; line-height: 1.4; }

.talent-card:focus-visible,
.talent-close:focus-visible { outline: 3px solid var(--sunset-gold); outline-offset: 3px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .talent-card:hover { transform: translateY(-6px); border-color: rgba(245,148,31,.55); box-shadow: 0 18px 40px -18px rgba(245,148,31,.45); }
  .talent-card:hover .talent-photo img { transform: scale(1.05); }
}

/* Appel a l'action */
.talent-cta {
  text-align: center; padding: 48px 28px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius);
}
.talent-cta h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: 8px; }
.talent-cta p { color: var(--text-muted); margin: 0; }
.talent-cta-actions { justify-content: center; }

/* Fenetre (lightbox) */
.talent-dialog {
  padding: 0; border: 1px solid var(--glass-border); border-radius: 18px;
  background: var(--navy-mid); color: var(--text-primary);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
}
.talent-dialog::backdrop { background: rgba(5,7,20,.82); }
.talent-dialog-inner { position: relative; }
.talent-poster { display: block; width: 100%; height: auto; }
.talent-close {
  position: sticky; top: 10px; float: right; margin: 10px 10px -54px 0; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
  color: #fff; background: rgba(10,14,39,.82); border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
}
.talent-close:hover { background: var(--sunset-orange); color: #1a1204; }
.talent-dialog-text { padding: 24px 24px calc(28px + var(--safe-bottom)); }
.talent-dialog-text h2 { font-size: 1.35rem; margin-bottom: 2px; }
.talent-dialog-role { color: var(--sunset-gold); margin: 0 0 18px; font-size: .9rem; }
.talent-dialog-text h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.talent-dialog-bio p { margin: 0 0 .8em; line-height: 1.65; }

html.talent-lock, html.talent-lock body { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .talent-dialog[open] { animation: talent-in .35s var(--ease-fluid); }
  .talent-dialog[open]::backdrop { animation: talent-fade .35s ease; }
}
@keyframes talent-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes talent-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1000px) { .talent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .talent-grid { gap: 12px; }
  .talent-card { padding: 18px 10px 18px; }
  .talent-photo { width: 84%; margin-bottom: 12px; }
  .talent-name { font-size: .95rem; }
  .talent-role { font-size: .78rem; }
  .talent-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
}
@media (max-width: 340px) { .talent-grid { grid-template-columns: 1fr; } }
