/* ================================
   ARCHIVE ÉVÉNEMENTS
   ================================ */

/* ---- Shared ---- */
.section-heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 8px;
  border-radius: 2px;
}

.text-accent {
  color: var(--color-accent);
}

/* ---- Buttons ---- */
.ev-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid transparent;
}

.ev-btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.ev-btn-primary:hover {
  background: #2a5e30;
  border-color: #2a5e30;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 120, 61, 0.3);
}

.ev-btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.ev-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.ev-btn-secondary {
  background: var(--color-white);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.ev-btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 120, 61, 0.3);
}

/* ---- Scroll reveal ---- */
.ev-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.ev-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   SECTION 1 — HERO
   ================================ */
.events-hero {
  position: relative;
  width: 100%;
  min-height: 50vh;
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 50%, #1a3a2a 100%);
  overflow: hidden;
}

.events-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 50vh;
  padding: 0 max(1.5rem, 3vw);
  margin: 0;
}

.events-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem 2rem 0;
  z-index: 2;
  position: relative;
}

.events-hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  animation: heroFadeInUp 0.8s ease-out forwards;
}

.events-hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 520px;
  margin-bottom: 2rem;
  animation: heroFadeInUp 0.8s ease-out 0.15s forwards;
  opacity: 0;
}

.events-hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: heroFadeInUp 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

/* ---- Hero Media ---- */
.events-hero-media {
  position: relative;
  overflow: hidden;
}

.events-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: videoSlideUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.events-hero-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a3a2a 0%, #0d1b2a 50%, #2a1a3a 100%);
  animation: heroFadeInUp 0.8s ease-out forwards;
}

/* ---- Hero Animations ---- */
@keyframes heroFadeInUp {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes videoSlideUp {
  0%   { transform: translateY(6%); opacity: 0.8; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ================================
   SECTION 2 — LATEST HIGHLIGHT
   ================================ */
.events-highlight {
  padding: 5rem 55px 3rem;
  background: var(--color-bg);
}

.highlight-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  max-height: 40vh;
}

.highlight-card:hover {
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.highlight-card-image {
  height: 100%;
  max-height: 42vh;
  min-height: 320px;
  overflow: hidden;
}

.highlight-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.highlight-card:hover .highlight-card-img {
  transform: scale(1.04);
}



.highlight-card-body {
  padding: 3.2rem 2.5rem 3.2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.highlight-card-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.highlight-card-excerpt {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 1.25rem;
}

.highlight-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.highlight-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: #666;
}

.highlight-meta-item svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.highlight-card-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ================================
   SECTION 3 — YOUTUBE-STYLE GRID
   ================================ */
.events-grid-section {
  padding: 3rem 25px 5rem;
  background: var(--color-bg);
}

.events-yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.yt-card {
  background: var(--color-white);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.yt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

/* ---- Thumbnail ---- */
.yt-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8ecef;
}

.yt-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.yt-card:hover .yt-card-img {
  transform: scale(1.06);
}



.yt-card-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--color-white);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.yt-card-body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.yt-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-card-excerpt {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.55;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.yt-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.75rem;
}

.yt-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yt-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.yt-btn-join,
.yt-btn-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.25s ease;
  text-decoration: none;
}

.yt-btn-join {
  background: var(--color-accent);
  color: var(--color-white);
  flex: 1;
}

.yt-btn-join:hover {
  background: #2a5e30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 120, 61, 0.3);
}

.yt-btn-details {
  background: #f0f2f5;
  color: var(--color-text);
  flex: 1;
}

.yt-btn-details:hover {
  background: #e0e4ea;
  transform: translateY(-1px);
}

/* ================================
   FILTER BAR (persistent)
   ================================ */
.events-filter-bar {
  padding: 2.5rem 0 1.5rem;
  background: var(--color-bg);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.events-filter-bar .container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.events-filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.events-filter-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.events-filter-search:focus {
  outline: none;
  border-color: var(--color-accent);
}

.events-filter-year,
.events-filter-month {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  background: var(--color-white);
  cursor: pointer;
  min-width: 140px;
}

.events-filter-year:focus,
.events-filter-month:focus {
  outline: none;
  border-color: var(--color-accent);
}

.events-filter-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.events-filter-hashtag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 2px solid var(--color-accent);
  border-radius: 20px;
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.events-filter-hashtag:hover {
  background: rgba(52, 120, 61, 0.08);
}

.events-filter-hashtag.active {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ================================
   UNIFIED FILTER BAR (section 3)
   ================================ */
.ev-filter-bar {
  margin-bottom: 2rem;
}

.ev-filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.ev-filter-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.ev-filter-search:focus {
  outline: none;
  border-color: var(--color-accent);
}

.ev-filter-date {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  background: var(--color-white);
  cursor: pointer;
  min-width: 160px;
}

.ev-filter-date:focus {
  outline: none;
  border-color: var(--color-accent);
}

.ev-filter-status {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  background: var(--color-white);
  cursor: pointer;
  min-width: 180px;
}

.ev-filter-status:focus {
  outline: none;
  border-color: var(--color-accent);
}

.ev-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

/* ---- Agenda Merge : Période + Type ---- */
.events-filter-agenda {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ev-period-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.ev-period-toggle button {
  background: var(--color-white);
  border: none;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ev-period-toggle button:not(:last-child) {
  border-right: 1px solid #ddd;
}

.ev-period-toggle button.active {
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
}

.ev-period-toggle button:hover:not(.active) {
  background: #f0f0f0;
}

.events-filter-agenda select {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  background: var(--color-white);
  cursor: pointer;
  min-width: 160px;
}

.events-filter-agenda select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.ev-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.ev-filter-reset:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ---- Type select (standalone, outside form) ---- */
.events-filter-type {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  background: var(--color-white);
  cursor: pointer;
  min-width: 180px;
}

.events-filter-type:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ---- Card status badge (Complet / Clôturé / Passé) ---- */
.yt-card-status {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 6px;
  line-height: 1.3;
}

.yt-card-status--past {
  background: #64748b;
}

.ev-filter-reset:hover {
  background: #e0e0e0;
}

/* ---- Card Hashtags ---- */
.yt-card-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}

.yt-card-hashtag {
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.yt-card-hashtag:hover {
  opacity: 0.7;
}

/* ---- No results ---- */
.events-no-results-filter {
  text-align: center;
  padding: 3rem 1rem;
}

.events-no-results-filter p {
  font-size: 1.05rem;
  color: #888;
}

.events-no-results {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.events-no-results p {
  font-size: 1.1rem;
  color: #888;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
  .events-hero-title {
    font-size: 2.75rem;
  }
  .events-hero-content {
    padding: 2rem 1.5rem 2rem 0;
  }
  .events-hero-grid {
    grid-template-columns: 1fr 1.1fr;
    padding: 0 1.5rem;
  }
  .highlight-card {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .highlight-card-image {
    height: auto; 
    max-height: 40vh;
    min-height: 220px;
  }
  .highlight-card-body {
    padding: 1.5rem 1.5rem 2rem;
  }
}

@media (max-width: 768px) {
  .events-hero {
    min-height: auto;
  }
  .events-hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 0;
  }
  .events-hero-content {
    padding: 2rem 1.5rem 1.5rem;
  }
  .events-hero-media {
    min-height: 280px;
    order: -1;
  }
  .events-hero-title {
    font-size: 2.2rem;
  }
  .events-hero-desc {
    font-size: 1rem;
  }
  .section-heading {
    font-size: 1.4rem;
  }
  .events-highlight {
    padding: 4rem 25px 2.5rem;
  }

  .highlight-card-image {
    max-height: 36vh;
    min-height: 220px;
  }

  .events-yt-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .events-hero-content {
    padding: 2rem 1.25rem;
  }
  .events-hero-title {
    font-size: 1.8rem;
  }
  .events-hero-ctas {
    flex-direction: column;
  }
  .ev-btn {
    width: 100%;
    text-align: center;
  }
  .highlight-card-title {
    font-size: 1.3rem;
  }
  .highlight-card-actions {
    flex-direction: column;
  }
  .events-yt-grid {
    grid-template-columns: 1fr;
  }
  .yt-card-actions {
    flex-direction: column;
  }
  .yt-btn-join,
  .yt-btn-details {
    width: 100%;
  }
  
  .highlight-card-image {
  min-height: 160px;
  max-height: 30vh;
  padding: 0;
  }
}

/* ================================
   THUMBNAIL PLACEHOLDER (fallback)
   ================================ */
.ev-thumb-fb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ev-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: inherit;
}

.highlight-card-image.ev-thumb-fb {
  min-height: 260px;
}

.yt-card-thumb.ev-thumb-fb {
  aspect-ratio: 16 / 9;
}
