/* ==========================================================================
   Accueil — Partenaires (#trust-partners.tpw) : mur de logos façon écran LED.
   Grille fixe (pas de bandeau qui défile) ; des logos s'allument au hasard en doré,
   et ceux proches de la souris s'éclairent. Piloté par js/home-partners.js.
   ========================================================================== */
#trust-partners {
  --tpw-text: #f5f4f1;
  --tpw-muted: rgba(245, 244, 241, 0.62);
  --tpw-faint: rgba(245, 244, 241, 0.4);
  --tpw-line: rgba(245, 244, 241, 0.08);
  --tpw-gold: #c6a66a;
  --tpw-gold-hi: #e8d5a8;
  --tpw-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
  margin: 0;
  padding: clamp(5rem, 9vw, 8rem) clamp(1rem, 4vw, 3rem);
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(198, 166, 106, 0.1), transparent 70%),
    #050505;
  color: var(--tpw-text);
  text-align: left;
  overflow: hidden;
}
.tpw-wrap { max-width: 1240px; margin: 0 auto; }

/* En-tête : titre à gauche, gros compteur à droite */
.tpw-head { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.tpw-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--tpw-gold-hi); font-size: 11.5px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.tpw-kicker i { width: 26px; height: 2px; border-radius: 2px; background: var(--tpw-gold); }
#trust-partners .tpw-title { margin: 0; font: 800 clamp(38px, 5.6vw, 80px) / 0.95 Rubik, Montserrat, sans-serif; letter-spacing: -0.035em; color: var(--tpw-text); text-transform: uppercase; }
#trust-partners .tpw-accent { display: block; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.1em; letter-spacing: -0.01em; text-transform: none; color: var(--tpw-gold); }
#trust-partners .tpw-sub { max-width: 520px; margin: 18px 0 0; color: var(--tpw-muted); font-size: 16px; line-height: 1.6; }
.tpw-stat { text-align: right; padding-bottom: 6px; }
.tpw-stat b { display: block; font: 800 clamp(64px, 9vw, 132px) / 0.85 Rubik, Montserrat, sans-serif; letter-spacing: -0.05em; background: linear-gradient(180deg, #f3e2b6, #c6a66a 60%, #8f7443); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.tpw-stat span { display: block; max-width: 220px; margin: 10px 0 0 auto; color: var(--tpw-muted); font-size: 13.5px; font-weight: 700; line-height: 1.4; }

/* Mur de logos */
.tpw-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-radius: 22px;
  overflow: hidden;
  background: var(--tpw-line);
  gap: 1px;
  box-shadow: 0 0 0 1px var(--tpw-line), 0 40px 120px rgba(0, 0, 0, 0.6);
}
.tpw-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0a0a0a;
  isolation: isolate;
}
.tpw-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(70% 70% at 50% 50%, rgba(198, 166, 106, 0.28), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s var(--tpw-ease);
}
.tpw-tile img {
  max-width: 62%;
  max-height: 46%;
  object-fit: contain;
  opacity: 0.38;
  transition: opacity 0.5s var(--tpw-ease), transform 0.5s var(--tpw-ease);
}
.tpw-tile.is-lit::before { opacity: 1; }
.tpw-tile.is-lit img { opacity: 1; transform: scale(1.06); }
.tpw-tile.is-near img { opacity: 0.8; }
.tpw-tile.is-near::before { opacity: 0.45; }
.tpw-tile:hover::before { opacity: 1; }
.tpw-tile:hover img { opacity: 1; transform: scale(1.08); }

/* Arrivée : les cases s'allument en vague */
.tpw-grid.is-in .tpw-tile { animation: tpwIn 0.7s var(--tpw-ease) both; animation-delay: var(--d, 0s); }
@keyframes tpwIn { from { opacity: 0; transform: scale(0.92); } }

/* Case « Votre lieu ici ? » */
.tpw-join { text-decoration: none !important; background: linear-gradient(135deg, rgba(198, 166, 106, 0.16), rgba(198, 166, 106, 0.04)); }
.tpw-join span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 8px; text-align: center; color: var(--tpw-gold-hi); font-size: 13px; font-weight: 800; line-height: 1.25; }
.tpw-join small { color: var(--tpw-muted); font-size: 11.5px; font-weight: 700; }
.tpw-join:hover { background: linear-gradient(135deg, rgba(198, 166, 106, 0.28), rgba(198, 166, 106, 0.08)); }

.tpw-more { display: none; margin: 18px auto 0; height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: rgba(245, 244, 241, 0.07); box-shadow: inset 0 0 0 1px rgba(245, 244, 241, 0.16); color: var(--tpw-text); font: 800 13.5px Montserrat, sans-serif; cursor: pointer; }
.tpw-more[hidden] { display: none !important; }

/* Pied : avantages + lien organisateurs */
.tpw-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 30px; }
.tpw-tags { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.tpw-tags li { display: inline-flex; align-items: center; gap: 8px; color: var(--tpw-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tpw-tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tpw-gold); }
.tpw-cta { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px; background: linear-gradient(180deg, #e2c68e, #c6a66a 55%, #b08f55); box-shadow: 0 10px 34px rgba(198, 166, 106, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5); color: #160f03 !important; font-size: 14px; font-weight: 800; text-decoration: none !important; transition: transform 0.3s var(--tpw-ease); }
.tpw-cta:hover { transform: translateY(-2px); }
.tpw-cta svg { width: 16px; height: 16px; }

@media (max-width: 1100px) { .tpw-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tpw-head { grid-template-columns: 1fr; gap: 22px; }
  .tpw-stat { display: flex; align-items: center; gap: 14px; text-align: left; padding: 0; }
  .tpw-stat span { margin: 0; }
  .tpw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 16px; }
  .tpw-tile img { max-width: 68%; max-height: 50%; }
  .tpw-join span { font-size: 11.5px; }
  .tpw-join small { font-size: 10px; }
  .tpw-grid:not(.is-open) .tpw-tile.is-extra { display: none; }
  .tpw-more { display: block; }
  .tpw-foot { flex-direction: column; align-items: flex-start; }
  .tpw-tags { gap: 8px 16px; }
  .tpw-tags li { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .tpw-grid.is-in .tpw-tile { animation: none; }
}
