/* Ultra spécifique + !important : bat Elementor Kit */
body #js-ressources .guides-track .guide-card .guide-content h3,
body #js-ressources .articles-grid .article-card .article-content h3{
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
}

@media (max-width: 1023px){
  body #js-ressources .guides-track .guide-card .guide-content h3,
  body #js-ressources .articles-grid .article-card .article-content h3{
    font-size: 20px !important;
    line-height: 1.3 !important;
  }
}

@media (max-width: 767px){
  body #js-ressources .guides-track .guide-card .guide-content h3,
  body #js-ressources .articles-grid .article-card .article-content h3{
    font-size: 18px !important;
    line-height: 1.35 !important;
  }
}








/* =========================================================
   RESSOURCES – ARTICLES GRID (FIX MOBILE + CARD HEIGHT)
   Scope: #js-ressources pour ne rien casser ailleurs
   ========================================================= */

body #js-ressources .articles-grid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  overflow: visible !important;
}

/* Tablette */
@media (max-width: 1023px){
  body #js-ressources .articles-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 767px){
  body #js-ressources .articles-grid{
    grid-template-columns: 1fr;
  }

  /* si le thème cache les autres items */
  body #js-ressources .articles-grid > *{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    height: auto !important;
  }
}

/* ===== Card layout (enlève le gros vide) ===== */
body #js-ressources .article-card,
body #js-ressources .article-card-link{
  height: auto !important;
  min-height: 0 !important;
}

body #js-ressources .article-card-link{
  display: flex !important;
  flex-direction: column !important;
}

body #js-ressources .article-image{
  width: 100%;
  height: 180px;           /* ajuste si tu veux */
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

body #js-ressources .article-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body #js-ressources .article-content{
  padding: 14px 16px;
}

body #js-ressources .article-content p{
  margin-bottom: 12px;
}


/* =========================================================
   RESSOURCES – Articles: container full width sur mobile
   ========================================================= */
@media (max-width: 767px){

  /* Le container ne doit pas être bloqué par un max-width */
  body #js-ressources .latest-articles-section,
  body #js-ressources .latest-articles-section .container{
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Padding mobile “comme Guides” */
  body #js-ressources .latest-articles-section .container{
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Les cartes doivent occuper toute la largeur dispo */
  body #js-ressources .articles-grid{
    width: 100% !important;
  }
  body #js-ressources .article-card{
    width: 100% !important;
  }
}




/* =========================================================
   RESSOURCES — GUIDES ARROWS + SNAP (MOBILE ONLY)
   Scope: #js-ressources
   ========================================================= */

@media (max-width: 767px){

  /* Head (flèches) au-dessus du track, alignées à droite */
  body #js-ressources .guides-scroll{
    position: relative;
  }

  body #js-ressources .guides-head{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0 10px 0;
  }

  body #js-ressources .guides-arrows{
    display: inline-flex;
    gap: 10px;
  }

  body #js-ressources .guides-arrow{
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  body #js-ressources .guides-arrow:active{
    transform: scale(.98);
  }

  body #js-ressources .guides-arrow[disabled]{
    opacity: .45;
    cursor: default;
    transform: none;
  }

  /* Défilement carte par carte */
  body #js-ressources .guides-track{
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  body #js-ressources .guides-track .guide-card{
    scroll-snap-align: start;
  }
}




/* =========================================================
   GUIDES ARROWS — DESKTOP OFF / MOBILE ON (FORCE)
   ========================================================= */

/* Par défaut: on masque partout (donc PC = OFF) */
body #js-ressources .guides-head{
  display: none !important;
}

/* Mobile: ON + visible (pas dépendant du hover) */
@media (max-width: 767px){
  body #js-ressources .guides-head{
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin: 0 0 10px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 5 !important;
  }

  body #js-ressources .guides-arrows{
    display: inline-flex !important;
    gap: 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body #js-ressources .guides-arrow{
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(15, 23, 42, .12) !important;
    background: #fff !important;
    color: #0f172a !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 6 !important;
  }

  body #js-ressources .guides-arrow span{
    display: inline-block !important;
    font-size: 28px !important;
    line-height: 1 !important;
    color: inherit !important;
  }

  body #js-ressources .guides-arrow[disabled]{
    opacity: .45 !important;
    cursor: default !important;
  }

  /* Snap carte par carte */
  body #js-ressources .guides-track{
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  body #js-ressources .guides-track .guide-card{
    scroll-snap-align: start;
  }
}


@media (max-width: 767px){
  body #js-ressources .guides-arrow[disabled]{
    opacity: .45 !important;
    pointer-events: none !important;

    /* empêche Elementor/Kit de les masquer */
    display: inline-flex !important;
    visibility: visible !important;
  }
}




/* =========================================================
   FIX FINAL — Flèches restent visibles pendant le scroll
   (mobile only, ne touche pas PC)
   ========================================================= */

@media (max-width: 767px){

  /* PC OFF déjà géré chez toi, on ne touche pas */

  /* le conteneur scrolle horizontalement */
  body #js-ressources .guides-scroll{
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    position: relative !important;
  }

  /* ✅ les flèches "collent" à l'écran pendant le scroll horizontal */
  body #js-ressources .guides-head{
    position: sticky !important;
    left: 0 !important;          /* clé pour le scroll horizontal */
    top: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
    padding: 0 0 10px 0 !important;
    background: transparent !important;
  }

  /* ✅ même en disabled, jamais caché */
  body #js-ressources .guides-arrow[disabled]{
    display: inline-flex !important;
    visibility: visible !important;
    opacity: .45 !important;
    pointer-events: none !important;
  }
}