/* Page Share HAL CSS */

/*
 * Ce fichier s'applique a des pages qui contiennent aussi le theme et d'autres plugins (charge
 * seulement la ou un shortcode du plugin s'affiche, voir sharehal_adding_style()) : chaque regle est
 * donc limitee au HTML du plugin, soit par un nom deja propre au plugin (sharehal-*), soit par le prefixe :where(.sharehal) - la
 * classe "sharehal" est posee sur les conteneurs de plus haut niveau (#filtre-hal, #publications,
 * .sharehal-reviewlist). :where() n'ajoute aucune specificite : l'ordre de priorite entre les regles
 * du plugin, et face aux regles du theme, reste celui d'un selecteur non prefixe.
 */

/*
 ******* Thème de couleurs (reglage admin "Thème de couleurs") - valeurs ci-dessous = theme "legacy"
 * (rendu historique, inchange). Un theme different injecte une surcharge de ces variables via
 * wp_add_inline_style() - voir includes/color-themes.php et sharehal_adding_style() dans share-hal.php.
 */
:root {
	--sharehal-color-primary: #0e87c9;
	--sharehal-color-text: #000000;
	--sharehal-color-neutral: #777777;
	--sharehal-color-pagination: #0e87c9;
	--sharehal-color-pagination-link: inherit;
	--sharehal-color-filter-background: #f9f9f9;
	--sharehal-color-submit-button: #0e87c9;
	--sharehal-color-submit-button-text: #ffffff;
	--sharehal-color-reset-button: #f9f9f9;
	--sharehal-color-reset-button-text: #000000;
	--sharehal-color-badge-text: #ffffff;
}

/*
 ******* Layouts (attribut de shortcode "layout")
 * legacy  : presentation historique du LPS, plancher fixe.
 * boxed   : centre, largeur plafonnee, cf plus bas (defaut, voir sharehal_sanitize_layout()).
 * compact : colonne unique empilee, cf plus bas.
 * liquid  : pas de regle dediee ici - une fois la regle "legacy" ci-dessous scopee, l'absence de
 *           classe legacy/boxed/compact laisse le conteneur fluide a 100% par defaut du navigateur.
 */

.sharehal-layout-legacy#filtre-hal, .sharehal-layout-legacy#publications {
	min-width: 960px;
}
/*
 ******* Décompte des publications
 */

:where(.sharehal) .counter-doc {
	text-align: center;
	margin-bottom: 60px;
	margin-top: 40px;  
	font-style: italic;
  color: var(--sharehal-color-neutral);
	font-size: 1.4em;
}

/*
 ******* Filtres de recherche
 */

:where(.sharehal) div.form__fieldset h4#sd-title {
	margin: 0 0 20px;
}

:where(.sharehal) .filter__fields {
	flex-grow: 1;
  width: 100%;
}

:where(.sharehal) .filter__fields-group {
	box-sizing: border-box;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
	margin: 0 0 20px;
	padding: 0;
}

:where(.sharehal) div.filter__field.structure {
	padding-left: 7.5px;
  padding-right: 7.5px;
  width: auto;
	box-sizing: border-box;
  flex: 0 0 auto;   
	flex-basis: 25%;
  max-width: 25%;
}
:where(.sharehal) div.filter__field.team {
	padding-left: 7.5px;
  padding-right: 7.5px;
  width: auto;
	box-sizing: border-box;
  flex: 0 0 auto;   
	flex-basis: 33.33%;
  max-width: 33.33%;
}

:where(.sharehal) div.form__field-wrapper input, :where(.sharehal) div.form__field-wrapper select {
	width: 100%;
}

/*
 ******* Filtres Dates et Keywords
 */

:where(.sharehal) label.form__label {
	clear: both;
	font-size : 15px;
  font-weight: 600;
  margin: 0;
  color: var(--sharehal-color-text);
  cursor: pointer;
  display: block;
  position: relative;
}

:where(.sharehal) input.form__field, :where(.sharehal) select.form__field {
	color: var(--sharehal-color-neutral);
	border-radius: 0px;
	border: 1px solid var(--sharehal-color-neutral);
	background-color: var(--sharehal-color-filter-background);
}

/*
 ******* Filtre des types de documents (#fieldset-thematics)
 */
 
:where(.sharehal) #fieldset-thematics-wrapper {
	padding: 0 7.5px;
	margin: 0 0 25px;
}

:where(.sharehal) #fieldset-thematics {
	padding: 0 15px;
	padding-bottom: 10px;
	border: 1px solid var(--sharehal-color-neutral);
	margin: 0;
	background-color: var(--sharehal-color-filter-background);
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
  -webkit-transition: all 0.2s linear;
}

:where(.sharehal) #fieldset-thematics legend {
	font-size : 15px;
  font-weight: 600;
  margin: 0;
  color: var(--sharehal-color-text);
	width: auto;
	padding: 0 5px;
}

:where(.sharehal) .fieldset-thematic-checkboxes-wrapper {
	display: inline-block;
	width: 33%;
}

:where(.sharehal) .fieldset-thematic-checkboxes-wrapper label {
	margin: 0;
}
 
:where(.sharehal) .fieldset-thematic-checkboxes-wrapper label .count-them {
	font-size: 11px;
}

:where(.sharehal) .fieldset-thematic-checkboxes-wrapper label .counter-by-thematics {
  font-weight: 700;
	color: var(--sharehal-color-primary);
}

:where(.sharehal) .fieldset-thematic-checkboxes-wrapper label .counter-by-search {
  font-weight: 700;
	color: #f08d3c;
}

/*
 * Boutons Filtrer et Reset
 */

:where(.sharehal) .filter__buttons {
  align-content: flex-start;
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
	padding: 0 7.5px;
}

:where(.sharehal) .filter__buttons button {
	font-size : 15px;
	font-family: inherit; /* un bouton n'herite pas de la police par defaut */
  font-weight: 600;
  margin: 0;
	padding: 4px 10px;
	margin-left: 7.5px;
	border-radius: 0px;
	border: 1px solid var(--sharehal-color-neutral);
}

:where(.sharehal) button.filter-reset {
	color: var(--sharehal-color-reset-button-text);
	background-color: var(--sharehal-color-reset-button);
}

:where(.sharehal) button.filter-submit {
	background-color: var(--sharehal-color-submit-button);
}

:where(.sharehal) .filter-submit span {
	color: var(--sharehal-color-submit-button-text);
}

/*
 ******* Liste des publications
 */

:where(.sharehal) ul.list-publis {
	list-style: none;
  margin: 0;
  padding: 0;
}

:where(.sharehal) li.publi-item {
	margin: 0;  
	margin-bottom: 30px !important;
	list-style: none;
	padding-left: 12px;
  padding-right: 12px;
  transition-property: opacity, transform, visibility;
	width: 100%;
	position: relative;
}

/*
 ******* Item Article Publication
 */

:where(.sharehal) article.publications-item {
	border-bottom: 2px solid #e9e9e9;
  padding-bottom: 10px;
}

:where(.sharehal) article.publications-item p.publications-item__type {
	background-color: var(--sharehal-color-primary);
  align-items: center;
  color: var(--sharehal-color-badge-text);
  display: inline-flex;
  line-height: 1;
  padding: 0.8em 1em 0.7em;
  text-transform: uppercase;
	box-sizing: border-box;
}

:where(.sharehal) div.publications-item__wrapper {
	display: flex;
}

:where(.sharehal) div.publications-item__content {
	box-sizing: border-box;
}

:where(.sharehal) div.publications-item__info {
  flex-shrink: 0;
  padding: 0 43px 0 25px;
  width: 310px; 
	box-sizing: border-box;
}

:where(.sharehal) div.publications-item__info p {
	margin: 0;
}

/*
 * Equipe de recherche
 */
:where(.sharehal) p.publications-item__team {
	font-size: 1rem;
  line-height: 16px;
  font-weight: 500;
  color: var(--sharehal-color-text);
	padding-bottom: 3px;
}

/*
 ******* Année de la publication
 */

:where(.sharehal) div.publications-item__info p.publications-item__publication {
  font-size: 1rem;
	line-height: 16px;
  font-weight: 500;
  color: var(--sharehal-color-text);
}


/*
 ******* Statut de la publication
 */

:where(.sharehal) span.publications-item__status-text {
	font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
	color: var(--sharehal-color-text);
}

/*
 * Icones : Dashicons, fournies par WordPress (dependance "dashicons" de la feuille de style, voir
 * sharehal_adding_style()) - chargees avant ce fichier, donc ces regles l'emportent sur .dashicons
 * a specificite egale.
 */
:where(.sharehal) .publications-item__icon-lock {
	position: relative;
  margin-right: 10px;
	color: var(--sharehal-color-primary);
	font-size: 22px;
	width: 22px;
	height: 22px;
}

/*
 ******* Lien Publication HAL
 */

:where(.sharehal) .publications-item__icon-doc {
	position: relative;
  margin-right: 15px;
	color: var(--sharehal-color-primary);
	pointer-events: none;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

:where(.sharehal) a.link_hal {
	font-size: 15px;
	font-weight: 700;
	color: var(--sharehal-color-text);
	text-decoration: none;
	background-size: 100% 100% !important;
	transition: all 300ms ease-in-out 0ms;
	background-image: linear-gradient(transparent calc(100% - 1px), var(--sharehal-color-text) 1px);
	background-repeat: no-repeat;
	width: 100%;
}
:where(.sharehal) a.link_hal::after {
	transition: all 250ms ease-in-out 0ms;
	display: block;
	z-index: 3;		
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	content: "";
}

:where(.sharehal) span.publications-item__link-text a:hover {
	background-size: 0 100% !important;
	text-decoration: none;
	transition: all 300ms ease-in-out 0ms;
  background-image: linear-gradient(transparent calc(100% - 1px), var(--sharehal-color-text) 1px);
  background-repeat: no-repeat;
}

/*
 * Aucun Resultat - le prefixe :where(.sharehal) est indispensable ici : WordPress ajoute aussi la classe
 * "search-no-results" au <body> d'une recherche du site sans resultat (get_body_class()).
 */

:where(.sharehal) .search-no-results {
  align-items: center;
  display: flex;
  flex-direction: column;
	margin-top: 60px;
}

:where(.sharehal) .search-no-results span.dashicons {
  color: var(--sharehal-color-primary);
  font-size: 5rem;
  width: 5rem;
  height: 5rem;
  pointer-events: none;
}

/* Icones des boutons Filtrer / Effacer : a la taille du texte du bouton (20px par defaut sinon). */
:where(.sharehal) .filter__buttons .dashicons {
  font-size: 1em;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

:where(.sharehal) .sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

:where(.sharehal) .search-no-results__content {
  font-style: italic;
  padding: 20px 0;
  text-align: center;
}

:where(.sharehal) .rte > :first-child {
  margin-top: 0 !important;
}

:where(.sharehal) .rte p {
  font-size: 20px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.7;
  margin: 0 0 15px;
  word-break: break-word;
}

/*
 ******* Pagination
 */
 
ul.sharehal-pagination {
	text-align: center;
	margin: 20px;
}

ul.sharehal-pagination li {
	margin: 0;
	background: #fff;
	display: inline-block;
	padding: 4px 8px;
	border-bottom: none !important;
	text-decoration: none !important;
	line-height: 1.5em;
}

ul.sharehal-pagination a {
	border: 1px var(--sharehal-color-neutral) solid;
	display: inline-block;
	padding: 4px 8px;
	color: var(--sharehal-color-pagination-link);
}

ul.sharehal-pagination a:hover {
	background-color: #fff;
	color: var(--sharehal-color-pagination);
	font-weight: 700;
}

ul.sharehal-pagination li.active a {
	background: var(--sharehal-color-pagination);
	color: #fff;
}

ul.sharehal-pagination li.disabled {
	pointer-events: none;
}

ul.sharehal-pagination li.disabled a, ul.sharehal-pagination li.before-publi a, ul.sharehal-pagination li.next-publi a {
	border: 0;
	font-weight: 500;
	font-size: 20px;
}

/*
 * Profil Chercheur : onglet "publications" d'un profil Ultimate Member (conteneur genere par UM, pas
 * par le plugin), ou s'affiche [share-hal-researcher] - classes propres a UM, pas de risque de collision.
 */

.um-profile .um-profile-body.publications {
  padding-top: 15px;
  padding-bottom: 15px;
  margin: auto;
	max-width: 1140px;
	width: 100%;
}

/*
 * ReviewList Theses Ouvrages HDR
 */
:where(.sharehal) .year-reviewlist {
	background-color: var(--sharehal-color-primary);
	font-weight: bold;
  align-items: center;
  color: var(--sharehal-color-badge-text);
  display: inline-flex;
  line-height: 1;
  padding: 0.8em 1em 0.7em;
  text-transform: uppercase;
	box-sizing: border-box;
	margin: 25px 0;
}

/*
 ******* Layout "legacy" : polices historiques du LPS. Les autres layouts n'imposent aucune police et
 * heritent de celle du site. Placees apres les regles de base, a specificite egale (:where()).
 * Raleway n'est pas chargee par le plugin (elle l'est par le theme du LPS) ; Jost ne l'est nulle part
 * sur le LPS, qui affiche donc les polices de repli - conservees telles quelles pour un rendu inchange.
 */
:where(.sharehal-layout-legacy) label.form__label,
:where(.sharehal-layout-legacy) #fieldset-thematics legend,
:where(.sharehal-layout-legacy) .filter__buttons button,
:where(.sharehal-layout-legacy) .rte p {
	font-family: "Raleway", Helvetica, Arial, sans-serif;
}
:where(.sharehal-layout-legacy) p.publications-item__team,
:where(.sharehal-layout-legacy) div.publications-item__info p.publications-item__publication {
	font-family: "Jost", "Franklin Gothic Medium", Tahoma, sans-serif;
}

/*
 ******* Layout "boxed" : centre, largeur plafonnee (meme valeur que .um-profile-body.publications
 * ci-dessus, pour rester coherent avec le seul autre plafond de largeur deja utilise par le plugin).
 */
.sharehal-layout-boxed#filtre-hal,
.sharehal-layout-boxed#publications,
.sharehal-reviewlist.sharehal-layout-boxed {
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	box-sizing: border-box;
}

/*
 ******* Layout "compact" : colonne unique empilee (pas d'encart lateral fixe), champs de filtre en
 * une seule colonne, a toute largeur d'ecran.
 */
/* div.filter__field : meme specificite que div.filter__field.structure/.team plus haut, qui sinon
 * l'emporteraient (25 % / 33 %) - cette regle, placee apres, gagne a specificite egale. */
.sharehal-layout-compact div.filter__field {
	padding-left: 7.5px;
	padding-right: 7.5px;
	max-width: 100%;
	box-sizing: border-box;
	flex: 0 0 100%;
}
.sharehal-layout-compact .fieldset-thematic-checkboxes-wrapper {
	width: auto;
}
.sharehal-layout-compact .publications-item__wrapper {
	flex-direction: column;
}
.sharehal-layout-compact .publications-item__info {
	width: auto;
	flex-shrink: 1;
	padding: 10px 0 0;
}

/*
 ******* [share-hal-latest] : liste compacte des dernieres publications (widget)
 * Pas d'attribut layout : la liste prend la largeur de son conteneur (sidebar, colonne...).
 */

.sharehal-latest__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sharehal-latest__item {
	margin: 0 0 0.8em;
	padding: 0 0 0.8em;
	border-bottom: 1px solid #e5e5e5;
}
.sharehal-latest__item:last-child {
	margin-bottom: 0;
	border-bottom: none;
}
.sharehal-latest__title {
	display: block;
	color: var(--sharehal-color-primary);
	text-decoration: none;
	line-height: 1.35;
}
.sharehal-latest__title:hover,
.sharehal-latest__title:focus {
	text-decoration: underline;
}
.sharehal-latest__meta {
	display: block;
	margin-top: 0.2em;
	font-size: 0.85em;
	color: var(--sharehal-color-neutral);
}
.sharehal-latest__empty {
	color: var(--sharehal-color-neutral);
	font-style: italic;
}

@media only screen and (max-width: 1279px) {
	/* Meme selecteur que la regle legacy plus haut : un selecteur moins specifique ne la leverait pas. */
	.sharehal-layout-legacy#filtre-hal, .sharehal-layout-legacy#publications {
		min-width: auto;
	}
	:where(.sharehal) div.filter__field {
		padding-left: 7.5px;
		padding-right: 7.5px;
		width: auto;
		box-sizing: border-box;
		flex: 1 1 auto;
	}
	:where(.sharehal) .fieldset-thematic-checkboxes-wrapper {
		width: auto;
	} 
	:where(.sharehal) .publications-item__wrapper {
		flex-direction: column;
  }
}