/**
 * HESPERANS - Page Ressources Styles
 * ===================================
 * Styles pour la page ressources (livres blancs, etudes, apps, repos, videos, podcasts)
 */

/* ========================================
   SECTION 1 — HERO RESSOURCES
   ======================================== */

.res-hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, #fbfbfb 0%, #fff 100%);
}

.res-hero > .circles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.res-hero-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 100px 0 80px;
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.res-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgb(249, 115, 22);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.res-hero-badge svg {
  width: 16px;
  height: 16px;
}

.res-hero-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  color: #000;
  margin: 0 0 20px;
}

.res-hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: #555;
  margin: 0;
  max-width: 600px;
}

/* ========================================
   SECTION 2 — FILTRES PAR CATEGORIE
   ======================================== */

.res-filters {
  padding: 40px 0;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 100;
}

.res-filters-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.res-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 30px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.25s ease;
}

.res-filter-btn:hover {
  border-color: #000;
  background: #fbfbfb;
}

.res-filter-btn.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.res-filter-btn svg {
  width: 18px;
  height: 18px;
}

.res-filter-btn .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.res-filter-btn.active .count {
  background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   SECTION 3 — GRILLE DE RESSOURCES
   ======================================== */

.res-content {
  padding: 60px 0 100px;
  background: #fbfbfb;
  min-height: 50vh;
}

.res-section {
  margin-bottom: 80px;
}

.res-section:last-child {
  margin-bottom: 0;
}

.res-section.hidden {
  display: none;
}

.res-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.res-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.res-section-title h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #000;
  margin: 0;
}

.res-section-title .icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 10px;
  color: #fff;
}

.res-section-title .icon svg {
  width: 20px;
  height: 20px;
}

.res-section-count {
  font-size: 14px;
  color: #666;
}

/* Grille de cards */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Card Ressource */
.res-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
}

.res-card:hover {
  border-color: #000;
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

.res-card-image {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.res-card-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.res-card:hover .res-card-image img {
  transform: scale(1.05);
}

.res-card-type {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  background: rgb(249, 115, 22);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.res-card-type.app {
  background: #0066cc;
}

.res-card-type.github {
  background: #24292e;
}

.res-card-type.video {
  background: #dc2626;
}

.res-card-type.podcast {
  background: #7c3aed;
}

.res-card-type.etude {
  background: #059669;
}

.res-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.res-card-title {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0 0 12px;
  line-height: 1.3;
}

.res-card-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.res-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.res-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #888;
}

.res-card-meta-item svg {
  width: 14px;
  height: 14px;
}

.res-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.res-card-chips .chip {
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #666;
}

.res-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  margin-top: auto;
}

.res-card-action svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.res-card:hover .res-card-action svg {
  transform: translateX(4px);
}

/* Card pour les liens externes */
.res-card.external .res-card-action svg {
  transform: rotate(-45deg);
}

.res-card.external:hover .res-card-action svg {
  transform: rotate(-45deg) translate(2px, -2px);
}

/* ========================================
   SECTION 4 — ETAT VIDE (COMING SOON)
   ======================================== */

.res-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  background: #fff;
  border: 2px dashed #e6e6e6;
  border-radius: 16px;
}

.res-empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 50%;
  margin-bottom: 24px;
  color: #999;
}

.res-empty-icon svg {
  width: 28px;
  height: 28px;
}

.res-empty-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px;
}

.res-empty-text {
  font-size: 15px;
  color: #666;
  margin: 0;
  max-width: 400px;
}

/* ========================================
   SECTION 5 — CTA NEWSLETTER
   ======================================== */

.res-cta {
  padding: 100px 0;
  background-color: #000;
  position: relative;
  overflow: hidden;
}

.res-cta .circles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.res-cta-wrap {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.res-cta-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  color: #fff;
  margin: 0 0 20px;
}

.res-cta-text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin: 0 0 40px;
}

.res-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* ========================================
   UTILITAIRES SPECIFIQUES
   ======================================== */

/* Cercles animes */
.circles .circle-1,
.circles .circle-2,
.circles .circle-3,
.circles .circle-4 {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  animation: pulse 10s ease-in-out infinite;
}

.res-hero .circles .circle-1,
.res-hero .circles .circle-2,
.res-hero .circles .circle-3,
.res-hero .circles .circle-4 {
  background: rgba(0, 0, 0, 0.02);
}

.circles .circle-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.circles .circle-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
  animation-delay: -2s;
}

.circles .circle-3 {
  width: 200px;
  height: 200px;
  top: 40%;
  left: 20%;
  animation-delay: -4s;
}

.circles .circle-4 {
  width: 250px;
  height: 250px;
  bottom: 20%;
  right: 15%;
  animation-delay: -6s;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* White variant buttons for dark backgrounds */
.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-white:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
}

.btn-white-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 991px) {
  .res-hero-wrap {
    padding: 80px 0 60px;
  }

  .res-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .res-filters {
    padding: 24px 0;
  }

  .res-filters-wrap {
    gap: 8px;
  }

  .res-filter-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .res-hero-wrap {
    padding: 60px 0 40px;
  }

  .res-hero-title {
    font-size: 32px;
  }

  .res-hero-subtitle {
    font-size: 17px;
  }

  .res-content {
    padding: 40px 0 80px;
  }

  .res-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .res-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .res-section-title h2 {
    font-size: 24px;
  }

  .res-filters {
    position: relative;
    top: auto;
  }

  .res-filters-wrap {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .res-filter-btn {
    flex-shrink: 0;
  }

  .res-cta {
    padding: 60px 0;
  }

  .res-cta-actions {
    flex-direction: column;
  }

  .res-cta-actions .btn-white,
  .res-cta-actions .btn-white-outline {
    width: 100%;
  }
}

@media (max-width: 479px) {
  .res-card-content {
    padding: 20px;
  }

  .res-empty {
    padding: 60px 24px;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.res-hero-wrap {
  animation: fadeInUp 0.8s ease-out;
}

.res-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.res-card:nth-child(1) { animation-delay: 0.05s; }
.res-card:nth-child(2) { animation-delay: 0.1s; }
.res-card:nth-child(3) { animation-delay: 0.15s; }
.res-card:nth-child(4) { animation-delay: 0.2s; }
.res-card:nth-child(5) { animation-delay: 0.25s; }
.res-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
