/* ═══════════════════════════════════════════════════════════════════════════
   RANGEES DE PASTILLES SUR UNE SEULE LIGNE (18/11/2026)
   Sur telephone, les onglets et tris en pastilles passaient sur deux ou trois
   lignes (Communaute, tris de Categories, tris de Studios). Ici : une ligne par
   role, qui defile au doigt quand la langue est trop longue.
   Fichier a part, charge par les trois blocs concernes eux-memes :
     template/blocks/community/list_members_members.tpl
     template/blocks/categories_videos/list_categories_categories_list.tpl
     template/blocks/sponsors_videos/list_content_sources_sponsors_list.tpl
   Retirer le <link> d'un bloc = retour a l'ancien rendu de ce bloc.
   Le bureau et la tablette (768 px et plus) ne changent pas.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── socle : la rangee qui defile (classe posee par les gabarits) ── */
.am-row{scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.am-row::-webkit-scrollbar{display:none}
/* il reste des pastilles a droite (classe posee par le petit script des blocs) : fondu sur le bord */
.am-row--more{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 44px),rgba(0,0,0,.08));mask-image:linear-gradient(90deg,#000 calc(100% - 44px),rgba(0,0,0,.08))}

/* ── COMMUNAUTE ───────────────────────────────────────────────────────────
   Le gabarit porte deux exemplaires du bouton « Poster une annonce » et du
   bouton de filtres : --d pour le bureau (a leur place d'origine, dans la barre
   des onglets), --m pour le telephone (l'annonce a cote du compteur, les filtres
   en tete des raccourcis). Un seul des deux est affiche. */
.am-post-btn--m,
.community-filter-btn--m{display:none}

/* les raccourcis defilent dans leur propre boite : le bouton de filtres du
   telephone reste fixe devant eux */
.am-quick{overflow:visible}
.am-quick__scroll{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;overflow-x:auto}

@media (max-width:767px){
  .community-toolbar .am-post-btn--d,
  .community-toolbar .community-filter-btn--d{display:none}

  /* 1. titre, puis « · N membres » a gauche et le bouton d'annonce a droite */
  .community-section .community-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;margin-bottom:14px}
  .community-section .community-header .community-title{grid-column:1/-1}
  .community-section .community-header .community-stats{grid-column:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .community-section .community-header .am-post-btn--m{display:inline-flex;grid-column:2;margin:0;padding:9px 16px;font-size:13px}
  /* liste vide : pas de compteur, le bouton se range a gauche sous le titre */
  .community-section .community-header .community-title + .am-post-btn--m{grid-column:1/-1;justify-self:start}

  /* 2. onglets : une ligne, sur toute la largeur ; ils defilent si la langue deborde */
  .community-section .community-toolbar{display:block;margin-bottom:10px}
  .community-section .community-sort-tabs{flex-wrap:nowrap;gap:6px;overflow-x:auto;margin:0 -10px;padding:0 10px}
  .community-section .community-tab{flex:1 0 auto;justify-content:center;min-height:36px;padding:0 12px;font-size:13px;box-sizing:border-box}

  /* 3. filtres : le bouton (icone seule) reste en place, les raccourcis defilent jusqu'au bord de l'ecran */
  .community-section .am-quick{gap:8px;margin-bottom:14px}
  .community-section .community-filter-btn--m{display:inline-flex;flex:none;justify-content:center;width:36px;height:36px;margin:0;padding:0;border-radius:50%}
  .community-section .community-filter-btn--m svg{width:16px;height:16px}
  .community-section .am-quick__scroll{margin-right:-10px;padding-right:10px}
  .community-section .am-quick__chip{display:inline-flex;align-items:center;min-height:36px;padding:0 13px;box-sizing:border-box}
  .community-section .am-quick__safety{margin-left:4px;padding:0 2px;min-height:36px}
}
@media (max-width:380px){
  .community-section .community-tab{padding:0 9px;font-size:12px}
  .community-section .community-sort-tabs{gap:5px}
  .community-section .community-header .am-post-btn--m{padding:9px 13px}
}

/* ── CATEGORIES et STUDIOS : les tris sur une ligne ───────────────────────── */
@media (max-width:767px){
  /* width:0 + min-width : la rangee prend la largeur de la barre sans que la somme de ses pastilles n'elargisse la page
     (sans cela un parent en flex se cale sur la largeur totale des pastilles) ; elle file de 10 px jusqu'au bord de l'ecran */
  .cat-toolbar .cat-sort-chips.am-row{flex:none;flex-wrap:nowrap;overflow-x:auto;width:0;min-width:calc(100% + 10px);margin-right:-10px;padding-right:10px;box-sizing:border-box}
  .cat-toolbar .cat-sort-chips.am-row .sort-chip{flex:none;min-height:36px;padding-top:0;padding-bottom:0;box-sizing:border-box}
}
