/* Babillard Culture Laurentides — styles de base (surchargeables par le thème). */

.babillard { max-width: 1100px; margin: 0 auto; }

/* Pas de soulignement sur les liens/boutons du babillard.
   !important pour surcharger les thèmes qui soulignent les liens. */
.babillard a,
.babillard a:hover,
.babillard a:focus { text-decoration: none !important; }
/* Spécificité renforcée pour les boutons (face à un thème utilisant lui-même !important). */
.babillard a.babillard-btn,
.babillard a.babillard-btn:hover,
.babillard a.babillard-btn:focus { text-decoration: none !important; }

/* ---- Filtres ---- */
/* Zone commune : sert d'ancre pour le scroll automatique après recherche. */
.babillard-filtres-zone {
	margin-top: 30px;
	margin-bottom: 28px;
	scroll-margin-top: 20px;
}

/* Version DROPDOWN (cellulaire) — masquée par défaut (tablette/desktop). */
.babillard-filtres { display: none; }

/* Version BOUTONS (tablette + desktop) — 3 rangées. */
.babillard-filtres2 {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.babillard-frow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* Boutons de filtre (base) */
.babillard-btn {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid #bbb;
	border-radius: 999px;
	background: #fff;
	color: #333;
	font: inherit;
	font-size: 14px;
	line-height: 1.3;
	cursor: pointer;
}
.babillard-btn:hover { border-color: #888; }

/* Rangée 1 : types */
.babillard-btn--type.is-active {
	background: #222;
	color: #fff;
	border-color: #222;
}

/* Rangée 2 : catégories — couleur propre à chaque catégorie */
.babillard-cat-btn--actualite                    { --cat: #e76f51; }
.babillard-cat-btn--emploi-service-professionnel { --cat: #2a9d8f; }
.babillard-cat-btn--espace                       { --cat: #457b9d; }
.babillard-cat-btn--conseil-information          { --cat: #9b5de5; }
.babillard-cat-btn--materiel-equipement          { --cat: #c98a00; }
.babillard-cat-btn--collaboration                { --cat: #d1495b; }
.babillard-cat-btn {
	color: var(--cat, #333);
	border-color: var(--cat, #bbb);
	font-weight: 600;
}
.babillard-cat-btn:hover { border-color: var(--cat, #888); filter: brightness(.95); }
.babillard-cat-btn.is-active {
	background: var(--cat, #222);
	color: #fff;
	border-color: var(--cat, #222);
}

/* Rangée 3 : recherche texte + boutons */
.babillard-frow--search { margin-top: 4px; }
.babillard-filtres__texte {
	flex: 1 1 240px;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font: inherit;
	background: #fff;
}
.babillard-filtres__submit {
	padding: 9px 20px;
	border: 0;
	border-radius: 4px;
	background: #222;
	color: #fff;
	cursor: pointer;
	font: inherit;
}
.babillard-ajouter {
	margin-left: auto; /* « Ajouter » poussé à droite de la rangée recherche */
	display: inline-block;
	padding: 9px 18px;
	border-radius: 4px;
	background: #e8b400;
	color: #222;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

/* Version DROPDOWN (cellulaire) : disposition interne. */
.babillard-filtres__ligne {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.babillard-filtres__select {
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font: inherit;
	background: #fff;
}

/* ---- Liste ---- */
.babillard-liste {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}
.babillard-tuile {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .15s ease;
}
.babillard-tuile:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.babillard-tuile__lien { display: block; color: inherit; text-decoration: none; height: 100%; }
.babillard-tuile__entete {
	display: flex;
	flex-direction: column; /* type et catégorie sur deux lignes distinctes */
	align-items: flex-start;
	gap: 4px;
	padding: 12px 14px;
	background: #f6f6f6;
	border-top: 3px solid var(--cat, #e5e5e5); /* accent du haut à la couleur de la catégorie */
}
.babillard-tuile__type {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.babillard-tuile__cat {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--cat, #333); /* même couleur que la catégorie */
}

/* Couleur de chaque catégorie (variable --cat) : sert au texte ET à la bordure de la tuile. */
.babillard-cat--actualite                    { --cat: #e76f51; }
.babillard-cat--emploi-service-professionnel { --cat: #2a9d8f; }
.babillard-cat--espace                       { --cat: #457b9d; }
.babillard-cat--conseil-information          { --cat: #9b5de5; }
.babillard-cat--materiel-equipement          { --cat: #c98a00; }
.babillard-cat--collaboration                { --cat: #d1495b; }
.babillard-tuile__corps { padding: 14px; }
.babillard-tuile__titre { margin: 0 0 8px; font-size: 18px; }
.babillard-tuile__extrait { font-size: 14px; color: #444; }
.babillard-tuile__fichier { display: inline-block; margin-top: 8px; }

/* ---- Pagination ---- */
.babillard-pagination { margin-top: 28px; margin-bottom: 45px; text-align: center; }
.babillard-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: #222;
}
.babillard-pagination .current { background: #222; color: #fff; border-color: #222; }

/* ---- Vide ---- */
.babillard-vide { padding: 40px 0; text-align: center; color: #777; }

/* ---- Détail (ajouté à la fin du contenu de l'article) ---- */
.babillard-detail { margin-top: 28px; padding-top: 22px; border-top: 1px solid #e5e5e5; }
.babillard-detail__meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.babillard-detail__coordonnees {
	margin: 24px 0;
	padding: 18px 20px;
	background: #f6f6f6;
	border-radius: 6px;
}
.babillard-detail__coordonnees p { margin: 6px 0; }
.babillard-detail__fichier { margin: 22px 0; }
/* Bouton de téléchargement : plein (solide), couleur d'action du site. */
.babillard-btn--solid {
	background: #e8b400;
	border-color: #e8b400;
	color: #222;
}
.babillard-btn--solid:hover,
.babillard-btn--solid:focus {
	background: #c99a00;
	border-color: #c99a00;
	color: #222;
}
/* Icône (trombone) du bouton : suit la couleur du texte (stroke="currentColor"). */
.babillard-btn__icon {
	width: 1.05em;
	height: 1.05em;
	vertical-align: -0.18em;
	margin-right: .45em;
}
.babillard-detail__retour { margin-top: 30px; }
/* Bouton « Retour » outlined : se remplit au survol. */
.babillard-retour:hover,
.babillard-retour:focus { background: #222; color: #fff; border-color: #222; }

/* ---- Formulaire ---- */
.babillard-formulaire__choix { margin: 20px 0; }
.babillard-formulaire__label { margin: 0 0 14px; font-weight: 600; font-size: 17px; }
.babillard-formulaire__boutons { display: flex; flex-wrap: wrap; gap: 12px; }
/* Boutons de choix du type (couleur d'accent par type). */
.babillard-btn--offre      { --c: #2a9d8f; }
.babillard-btn--besoin     { --c: #e76f51; }
.babillard-btn--au-courant { --c: #457b9d; }
.babillard-btn--choix {
	padding: 14px 26px;
	font-size: 16px;
	font-weight: 600;
	border-width: 2px;
	color: var(--c, #333);
	border-color: var(--c, #bbb);
}
.babillard-btn--choix:hover {
	background: var(--c, #222);
	color: #fff;
	border-color: var(--c, #222);
}
.babillard-formulaire__retour { margin-top: 20px; }

/* Cellulaire (< 768px) : on remplace les boutons par les menus déroulants. */
@media (max-width: 767px) {
	.babillard-filtres2 { display: none; }
	.babillard-filtres  { display: flex; flex-direction: column; gap: 14px; }
	.babillard-filtres__ligne { flex-direction: column; align-items: stretch; }
	/* En colonne, flex-basis s'applique à la hauteur : neutralisé pour garder une hauteur normale. */
	.babillard-filtres__texte,
	.babillard-filtres__select { flex: 0 0 auto; }
	.babillard-ajouter { margin-left: 0; text-align: center; align-self: stretch; }
}
