/* ============ TalenceYouth — site styles ============ */
:root {
  --accent: #1B4DE4;
  --bg: #F0EEEB;
  --ink: #1A1A1A;
  --muted: #4a463f;
  --soft: #f1efeb;
  --line: #e7e3dd;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; }
button { font-family: inherit; }

/* ============ Animations ============ */
@keyframes ty-ping {
  0% { transform: scale(1); opacity: .55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes ty-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1),
              transform .7s cubic-bezier(.16, 1, .3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Navigation hover ============ */
.ty-nav-link { position: relative; text-decoration: none; }
.ty-nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  transition: right .25s ease;
}
.ty-nav-link:hover::after { right: 0; }

/* ============ Buttons hover polish ============ */
.btn-primary:hover { background: #000; }
.btn-secondary:hover { border-color: var(--ink); }

/* ============ Gallery hover ============ */
.ty-gallery-tile { background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.ty-gallery-tile .ty-gallery-img { transition: transform .4s ease; }
.ty-gallery-tile:hover .ty-gallery-img { transform: scale(1.04); }
.ty-gallery-tile .ty-zoom { opacity: 0; transition: opacity .25s; }
.ty-gallery-tile:hover .ty-zoom { opacity: 1; }

/* ============ Lightbox ============ */
.ty-lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 19, 17, .86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.ty-lightbox.is-open { display: flex; }
.ty-lightbox-frame { position: relative; max-width: 720px; width: 100%; }
.ty-lightbox-image {
  aspect-ratio: 4/5;
  border-radius: 20px;
  background: #1A1A1A center / cover no-repeat;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.ty-lightbox-caption {
  text-align: center;
  color: #fff;
  font-size: 15px;
  margin: 18px 0 0;
}
.ty-lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

/* ============ Language switch ============ */
.ty-lang-btn {
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  background: transparent;
  color: #6b665e;
  transition: all .2s;
}
.ty-lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

/* ============ Team avatars ============ */
.ty-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.01em;
  color: #fff;
  flex-shrink: 0;
}
.ty-avatar.is-walid    { background: #1B4DE4; }
.ty-avatar.is-morad    { background: #C97052; }
.ty-avatar.is-pablo    { background: #2E7D6B; }
.ty-avatar.is-aziz     { background: #C9942F; }
.ty-avatar.is-souhaib  { background: #6B47CA; }

.ty-team-card {
  background: #fff;
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ty-team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .09);
}
.ty-team-name {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  margin: 0 0 2px;
}
.ty-team-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px;
  letter-spacing: .02em;
}
.ty-team-bio {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 14px;
  flex: 1;
}
.ty-team-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.ty-team-langs span {
  background: var(--soft);
  color: #4a463f;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 9999px;
  letter-spacing: .04em;
}
.ty-team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
}
.ty-team-linkedin:hover { text-decoration: underline; }

/* ============ Themes chips ============ */
.ty-theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .2s, transform .2s;
}
.ty-theme-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.ty-theme-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============ EU cofinance card (footer) ============ */
.ty-eu-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  display: inline-block;
}
.ty-eu-card img {
  display: block;
  max-width: 220px;
  height: auto;
}

/* ============ Static/policy pages ============ */
.ty-prose {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) 24px;
}
.ty-prose h1 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0 0 32px;
}
.ty-prose h2 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 40px 0 12px;
}
.ty-prose p, .ty-prose li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
.ty-prose ul { padding-left: 20px; }
.ty-prose a { color: var(--accent); }
.ty-prose .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 24px;
}
.ty-prose .back-link:hover { text-decoration: underline; }

/* ============ Mobile header (sticky compact) ============ */
@media (max-width: 768px) {
  /* Cache la nav principale, on garde juste logo + CTA Candidater */
  header nav[aria-label="Navigation principale"] {
    display: none !important;
  }
  /* Header compact : logo à gauche, bouton Candidater à droite, sur 1 seule ligne */
  header > div {
    padding: 10px 16px !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
  }
  /* Bouton CTA légèrement réduit pour rester confortable au pouce */
  header > div > a[href="#candidater"]:last-child {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ty-float, [style*="ty-float"] { animation: none !important; }
  html { scroll-behavior: auto; }
}
