/* [HOME-BENEFIT-EVENT-LIST-20260922] À droite du bloc : les vrais
   événements (catalogue src/data/events.ts) sur deux colonnes, façon
   cartes Événements de l'app : carré de date gris, filière courte,
   plage horaire au symbole horloge. À l'entrée à l'écran, les
   lignes apparaissent progressivement, sans flou. Sous le titre,
   « Ça se passe ici » et sa flèche désignent le bouton Participer
   (téléchargements du haut). En haut à droite, l'invitation
   manuscrite se frappe lettre à lettre ; une frénésie de curseurs
   blancs à contour noir clique le bouton (chacun sa zone), puis le
   bouton continue seul pendant que le tracé néon noir fait le tour
   des paires, les lignes hors paire floutées. */
.benefit-event-stage {
  flex: 0 1 460px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.benefit-event-list {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(100%, 440px);
  max-height: 560px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  padding: 12px 0;
  color: #0a0d0c;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.benefit-event-list::-webkit-scrollbar {
  display: none;
}

/* [HOME-BENEFIT-EVENT-LYCEE-20260928] Même piège que les groupes de
   badges du héros : le display:grid ci-dessus écraserait le
   display:none natif de [hidden] (liste de la famille inactive). */
.benefit-event-list[hidden] {
  display: none;
}

/* [HOME-EVENT-SANS-LYCEE-20261003] Même piège : le display:flex de
   .benefit-row (benefits.css) écraserait le display:none natif de
   [hidden] (rangée masquée en section lycée). */
.benefit-row:has(.benefit-event-stage)[hidden] {
  display: none;
}

.benefit-event-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 5px 10px;
  border: 1px solid #e1e4e2;
  border-radius: 14px;
  background: #fff;
  transition: filter 0.45s ease;
}

/* Pendant l'apparition, les lignes attendent leur tour, invisibles. */
.benefit-event-list.is-appearing .benefit-event-list-row {
  opacity: 0;
}

/* Pendant le tour du tracé néon, les lignes hors paire sont floutées. */
.benefit-event-list.is-touring .benefit-event-list-row {
  filter: blur(3px);
}

.benefit-event-list.is-touring .benefit-event-list-row.is-focus {
  filter: none;
}

.benefit-event-list-date {
  flex: none;
  width: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 0;
  border-radius: 10px;
  background: #f4f5f4;
}

.benefit-event-list-weekday {
  color: #555b58;
  font-size: 9px;
  font-weight: 800;
  line-height: 11px;
}

.benefit-event-list-day {
  color: #0a0d0c;
  font-size: 16px;
  font-weight: 900;
  line-height: 18px;
}

.benefit-event-list-month {
  color: #555b58;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.benefit-event-list-main {
  flex: 1;
  min-width: 0;
}

.benefit-event-list-track {
  margin: 0;
  overflow: hidden;
  color: #0a0d0c;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefit-event-list-time {
  margin: 3px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #555b58;
  font-size: 11px;
  font-weight: 600;
}

.benefit-event-list-time svg {
  width: 12px;
  height: 12px;
  color: #8b918e;
}

.benefit-event-participate {
  flex: none;
  align-self: center;
  padding: 12px 28px;
  border: 0;
  border-radius: 14px;
  background: #0a0d0c;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

/* Sous le titre : « Ça se passe ici », puis la flèche vers le bouton. */
.benefit-event-here-label {
  margin: 10px 0 0;
  font-family: var(--home-handwritten-font, "Segoe Print", "Bradley Hand", cursive);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

/* La flèche se dessine progressivement pendant que la note se frappe. */
.benefit-event-here-arrow path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1s ease-out;
}

.benefit-card:has(.benefit-event-here-label.is-typing) .benefit-event-here-arrow path {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .benefit-event-here-arrow path {
    transition: none;
  }
}

.benefit-event-here-arrow {
  display: block;
  width: 44px;
  height: auto;
  margin: 2px 0 0 24px;
  overflow: visible;
}

/* Le bouton unique, sous le titre de la carte. */
.benefit-card .benefit-event-participate {
  display: inline-block;
  margin-top: 14px;
}

/* Le bouton s'enfonce quand un curseur appuie dessus. */
.benefit-event-participate.is-pressed {
  transform: scale(0.9);
  background: #000;
}

/* Au-dessus du titre, à droite : l'invitation manuscrite, qui se
   frappe lettre à lettre. */
.benefit-event-join-label {
  margin: 0 0 8px;
  font-family: var(--home-handwritten-font, "Segoe Print", "Bradley Hand", cursive);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  text-align: right;
}


/* La rangée porte le calque d'animation, au-dessus de la carte et de la
   liste (curseurs et tracé néon). */
.benefit-row:has(.benefit-event-stage) {
  position: relative;
}

/* Le composant ne dépend pas du border-box global du site. */
.benefit-event-stage,
.benefit-event-stage *,
.benefit-event-pointers,
.benefit-event-pointers * {
  box-sizing: border-box;
}

.benefit-event-pointers {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.benefit-event-pointer {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  /* La pointe de la flèche (12, 1.2 dans le gabarit 24) reste le
     point chaud, posé sur la cible. */
  margin: -1px 0 0 -14px;
  transform-origin: 14px 1px;
  opacity: 0;
}

.benefit-event-pointer svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 3px rgba(10, 13, 12, 0.25));
}

/* Tracé néon noir : le cadre lumineux fait le tour des paires. */
.benefit-event-neon {
  position: absolute;
  top: 0;
  left: 0;
  border: 2px solid #0a0d0c;
  border-radius: 16px;
  box-shadow: 0 0 16px rgba(10, 13, 12, 0.4);
  opacity: 0;
  transition:
    top 0.45s ease,
    left 0.45s ease,
    width 0.45s ease,
    height 0.45s ease,
    opacity 0.3s ease;
}

@media (max-width: 680px) {
  .benefit-event-stage {
    flex-basis: auto;
    width: min(100%, 440px);
    margin-inline: auto;
  }

  .benefit-event-list {
    grid-template-columns: 1fr 1fr;
    max-height: 440px;
  }

  /* [HOME-EVENT-MOBILE-DUO-20260928] Téléphone : blocs affinés de
     plus de moitié (deux par ligne, même grille que l'ordinateur ;
     à 15 blocs, la dernière ligne n'en porte qu'un), textes
     réduits pour tenir dans la demi-largeur. */
  .benefit-event-list-row {
    gap: 6px;
    padding: 4px 6px;
    border-radius: 12px;
  }

  .benefit-event-list-date {
    width: 34px;
  }

  .benefit-event-list-weekday {
    font-size: 8px;
    line-height: 10px;
  }

  .benefit-event-list-day {
    font-size: 14px;
    line-height: 16px;
  }

  .benefit-event-list-month {
    font-size: 8px;
  }

  .benefit-event-list-track {
    font-size: 11px;
  }

  .benefit-event-list-time {
    margin-top: 2px;
    gap: 4px;
    font-size: 10px;
  }

  .benefit-event-list-time svg {
    width: 10px;
    height: 10px;
  }

  /* [HOME-EVENT-MOBILE-NOSCROLL-20260929] Téléphone uniquement : la
     liste (15 blocs prépa) n'est plus une zone de défilement : tous
     les blocs s'affichent d'un coup et le balayage vertical fait
     défiler la page, pas les blocs. La liste se resserre pour garder
     du blanc à gauche et à droite. */
  .benefit-event-list {
    width: min(calc(100% - 32px), 400px);
    margin-inline: auto;
    max-height: none;
    overflow: visible;
  }

}
