/* =========================================================
   FIX WP — Ressources V2 (anti-écrasement thème GT3)
   Scope : uniquement page template page-ressources-v2-test.php
   ========================================================= */

body.page-template-page-ressources-v2-test .resources-section{
  padding: 60px 0 100px;
  background: #fff;
}

body.page-template-page-ressources-v2-test .resources-section .container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Tabs / filtres ----- */
body.page-template-page-ressources-v2-test .resources-filters{
  display: flex;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* IMPORTANT : le thème peut styler button/a -> on neutralise propre */
body.page-template-page-ressources-v2-test .resources-filters .filter-tab{
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: inherit;

  /* anti GT3 */
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  outline: none;
}

body.page-template-page-ressources-v2-test .resources-filters .filter-tab:hover{
  color: #111827;
  background: #F3F4F6;
}

body.page-template-page-ressources-v2-test .resources-filters .filter-tab.active{
  color: #111827;
  position: relative;
}

/* Fix alignement underline active (WP) */
body.page-template-page-ressources-v2-test .resources-filters .filter-tab{
  position: relative;
}

body.page-template-page-ressources-v2-test .resources-filters .filter-tab.active::after{
  bottom: -25px; 
}


/* ----- Grid ----- */
body.page-template-page-ressources-v2-test .resources-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ----- Cards ----- */
body.page-template-page-ressources-v2-test .resource-card{
  background: #fff;
  border: 1px solid #E8E8E8;
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  padding: 2rem;
}

body.page-template-page-ressources-v2-test .resource-card:hover{
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

body.page-template-page-ressources-v2-test .resource-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 8px;
}

/* Image */
body.page-template-page-ressources-v2-test .resource-card-image{
  position: relative;
  height: 190px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8d7da 0%, #fce4ec 25%, #e8f5e9 50%, #fff3e0 75%, #e3f2fd 100%);
}

body.page-template-page-ressources-v2-test .resource-card-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block; /* anti thème */
}

body.page-template-page-ressources-v2-test .resource-card:hover .resource-card-image img{
  transform: scale(1.05);
}

/* Hover overlay */
body.page-template-page-ressources-v2-test .resource-card-hover{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #111827;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
}

body.page-template-page-ressources-v2-test .resource-card:hover .resource-card-hover{
  opacity: 1;
}

/* Texte */
body.page-template-page-ressources-v2-test .resource-card-body{
  padding: 18px 6px 10px;
}

body.page-template-page-ressources-v2-test .resource-card-title{
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
  margin: 0 0 10px;

  /* anti thème */
  text-transform: none;
  letter-spacing: normal;
}

body.page-template-page-ressources-v2-test .resource-card-desc{
  font-size: 14px;
  line-height: 1.55;
  color: #6B7280;
  margin: 0 0 20px;
}

/* CTA */
body.page-template-page-ressources-v2-test .resource-card-cta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  transition: gap 0.2s ease;
  text-decoration: none;
}

body.page-template-page-ressources-v2-test .resource-card-cta::after{
  content: '\21B3';
  font-size: 16px;
  transition: transform 0.2s ease;
}

body.page-template-page-ressources-v2-test .resource-card-cta svg{ display:none; }

body.page-template-page-ressources-v2-test .resource-card:hover .resource-card-cta{ gap: 10px; }

body.page-template-page-ressources-v2-test .resource-card:hover .resource-card-cta::after{
  transform: translateX(3px);
}

/* Coming soon */
body.page-template-page-ressources-v2-test .resource-card-coming{ cursor: default; }
body.page-template-page-ressources-v2-test .resource-card-coming:hover{
  transform:none; box-shadow:none;
}
body.page-template-page-ressources-v2-test .resource-card-coming .resource-card-link{ cursor: default; }

body.page-template-page-ressources-v2-test .resource-card-image-coming{
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}
body.page-template-page-ressources-v2-test .coming-soon-icon{ color:#9CA3AF; }
body.page-template-page-ressources-v2-test .resource-card-coming .resource-card-title{ color:#6B7280; }
body.page-template-page-ressources-v2-test .resource-card-coming .resource-card-desc{
  color:#9CA3AF; margin-bottom:0;
}

/* Responsive */
@media (max-width: 991px){
  body.page-template-page-ressources-v2-test .resources-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media (max-width: 640px){
  body.page-template-page-ressources-v2-test .resources-section{
    padding: 40px 0 60px;
  }
  body.page-template-page-ressources-v2-test .resources-filters{
    gap: 6px;
    margin-bottom: 32px;
  }
  body.page-template-page-ressources-v2-test .filter-tab{
    padding: 8px 14px;
    font-size: 13px;
  }
  body.page-template-page-ressources-v2-test .resources-grid{
    grid-template-columns: 1fr;
    gap: 20px;
  }
  body.page-template-page-ressources-v2-test .resource-card-image{
    height: 200px;
  }
  body.page-template-page-ressources-v2-test .resource-card-body{
    padding: 16px 8px 8px;
  }
  body.page-template-page-ressources-v2-test .resource-card-title{
    font-size: 16px;
  }
}

/* Réduction espace catégories → ligne (alignement client exact) */
body.page-template-page-ressources-v2-test .resources-filters{
  padding-bottom: 8px;   /* avant 24px */
  /*margin-bottom: 32px;     avant 48px */
}