/*
Theme Name: Astra Child
Template: astra
*/

/* =========================================================
   GRILLE DES ARTICLES
   ========================================================= */

/* Desktop : 5 colonnes */
@media (min-width: 1200px) {

    .site-main .ast-row {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 30px;
        margin-left: 0;
        margin-right: 0;
    }

    .site-main .ast-row > article {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
}


/* =========================================================
   TABLETTE : 3 COLONNES
   ========================================================= */

@media (min-width: 768px) and (max-width: 1199px) {

    .site-main .ast-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 25px;
        margin-left: 0;
        margin-right: 0;
    }

    .site-main .ast-row > article {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
}


/* =========================================================
   MOBILE : 1 COLONNE
   ========================================================= */

@media (max-width: 767px) {

    .site-main .ast-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
        margin-left: 0;
        margin-right: 0;
    }

    .site-main .ast-row > article {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
}
.site-main .ast-row {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
}

/* =========================================================
   CARTES DES LIVRES
   ========================================================= */

.site-main .ast-row > article {
    box-sizing: border-box;
}


/* =========================================================
   IMAGES DES LIVRES
   ========================================================= */

.site-main .ast-row .post-thumb {
    width: 100%;
}

.site-main .ast-row .post-thumb img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}


/* =========================================================
   TITRES
   ========================================================= */

.site-main .ast-row .entry-title {
    margin-top: 15px;
}


/* =========================================================
   ANIMATION DES NOUVEAUX ARTICLES
   ========================================================= */

.ast-article-post.ajax-loaded {
    animation: articleFadeIn 0.5s ease both;
}


@keyframes articleFadeIn {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   LOADER
   ========================================================= */

#infinite-scroll-loader {

    display: none;

    width: 100%;

    box-sizing: border-box;

    text-align: center;

    padding: 40px 20px;

    color: #777;

}


/* Loader visible */

#infinite-scroll-loader.visible {
    display: block;
}


/* =========================================================
   SPINNER
   ========================================================= */

.infinite-spinner {


    width: 38px;

    height: 38px;

    margin: 0 auto 12px;

    border: 3px solid #e8e8e8;

    border-top-color: #1e73be;

    border-radius: 50%;

    animation: infiniteSpin 0.8s linear infinite;

}


@keyframes infiniteSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   TEXTE DU LOADER
   ========================================================= */

.infinite-loading-text {

    font-size: 14px;

    line-height: 1.5;

}


/* =========================================================
   MESSAGE DE FIN
   ========================================================= */

#infinite-scroll-end {
background: #fff;

    display: none;

    width: 100%;

    box-sizing: border-box;

    text-align: center;

    padding: 50px 20px;

    color: #777;

    font-size: 15px;

    line-height: 1.6;

}


/* Message visible */

#infinite-scroll-end.visible {
    display: block;
}


/* =========================================================
   PETITE LIGNE DÉCORATIVE AVANT LE MESSAGE DE FIN
   ========================================================= */

#infinite-scroll-end::before {

    content: "";

    display: block;

    width: 45px;

    height: 2px;

    margin: 0 auto 18px;

    background: #1e73be;

    opacity: 0.6;

}


/* =========================================================
   SENTINEL INFINITE SCROLL
   ========================================================= */

#infinite-scroll-trigger {

    width: 100%;

    height: 1px;

    clear: both;

}


/* =========================================================
   CACHER LA PAGINATION
   ========================================================= */

.navigation.pagination {
    display: none !important;
}


/* =========================================================
   RESPONSIVE - ESPACEMENT
   ========================================================= */

@media (max-width: 767px) {

    #infinite-scroll-loader {
        padding: 30px 15px;
    }

    #infinite-scroll-end {
        padding: 40px 15px;
    }

}


/* =========================================================
   ACCESSIBILITÉ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .ast-article-post.ajax-loaded {
        animation: none;
    }

    .infinite-spinner {
        animation: none;
    }

}


/* =========================================================
   IMAGE DES LIVRES
========================================================= */

.site-main .ast-row .post-thumb-img-content {
    position: relative;
    overflow: hidden;
    width: 100%;
}


/* Image plus grande */

.site-main .ast-row .post-thumb-img-content img {
    display: block;

    width: 100% !important;
    max-width: none !important;
    height: auto;

    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* =========================================================
   ZOOM
========================================================= */

.site-main .ast-row .post-thumb-img-content:hover img {
    transform: scale(1.08);
}


/* =========================================================
   CATÉGORIE SUR L'IMAGE
========================================================= */

.site-main .ast-row .cat-links {
    position: absolute;

    top: 6px;

    z-index: 20;

    margin: 0 !important;
    padding: 3px 5px !important;

    background: rgba(0, 0, 0, 0.55);

    border: 1px solid rgba(255, 255, 255, 0.7);

    border-radius: 4px;

    color: #fff;

    line-height: 1;

    text-transform: uppercase;
}


/* Liens */

.site-main .ast-row .cat-links a {
    color: #fff !important;
    text-decoration: none !important;
}


/* Hover */

.site-main .ast-row > article:hover .cat-links {
    background: #79aed6;
}

/* =========================================================
   AFFICHER UNIQUEMENT LA PREMIÈRE CATÉGORIE
========================================================= */

/* Catégories : afficher uniquement la première */
.site-main .cat-links {
    font-size: 0 !important;
}

.site-main .cat-links a:first-child {
    display: inline-block !important;
    font-size: 12px !important;
}

.site-main .cat-links a:not(:first-child) {
    display: none !important;
}



/* =========================================================
   HERO
========================================================= */

/* =========================================================
   HERO - PLEINE LARGEUR
========================================================= */

.livre-single {
	width: 100%;
  z-index: 1;
	background: #ffffff;
	margin: 0 !important;
	padding: 0 !important;
}


.livre-hero {
	position: sticky;
 top:0px;
 z-index:-1;
 background: #ffffff;

	width: 100vw;
	max-width: 100vw;

	height: 390px;

	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);

	overflow: hidden;

	background: #777;

	display: flex;
	align-items: center;
	justify-content: center;
}


.livre-hero-image {

	position: absolute;

	inset: 0;

	width: 100%;
	height: 100%;

	object-fit: cover;
	object-position: center;

	z-index: 1;
}


.livre-hero-overlay {
	position: absolute;

	inset: 0;

	width: 100%;
	height: 100%;

	z-index: 2;

	background:
		linear-gradient(
			to bottom,
			rgba(0, 0, 0, .20),
			rgba(0, 0, 0, .60)
		);
}


.livre-hero-title {
	position: relative;

	z-index: 3;

	width: 100%;
	max-width: 1200px;

	margin: 0 auto;

	padding: 30px;

	box-sizing: border-box;

	text-align: center;
}


.livre-hero-title h1 {
	margin: 0;

	color: #fff;

	font-family: Arial, Helvetica, sans-serif;

	font-size: 48px;

	font-weight: 700;

	line-height: 1.2;

	text-shadow:
		0 2px 8px rgba(0, 0, 0, .7);
}



/* =========================================================
   CONTAINER
========================================================= */

.livre-container {
	position: relative;
 

	z-index: 5;

	width: 100%;

	max-width: 1850px;

	margin: -55px auto 0;

	padding: 0 25px;

	box-sizing: border-box;
}


/* =========================================================
   GRANDE CARTE BLANCHE
========================================================= */

.livre-card {
	width: 100%;

	min-height: 420px;

	margin: 0 auto;

	background: #fff;

	border-radius: 8px;

	box-shadow:
		0 8px 25px rgba(0, 0, 0, .22);
}


/* =========================================================
   CONTENU
========================================================= */

.livre-content {
	width: 850px;

	max-width: calc(100% - 70px);

	margin: 0 auto;

	padding: 40px 0;

	box-sizing: border-box;

	color: #3d4c60;

	font-family: Arial, Helvetica, sans-serif;
}


/* =========================================================
   CHAMPS ACF
========================================================= */

.livre-field {
	margin-bottom: 20px;
}
.livre-field-2 {
	display: flex;
	gap: 5px;
	margin-bottom: 20px;
}


.livre-label {
	margin-bottom: 4px;

	color: #3d4c60;

	font-size: 16px;

	font-weight: 700;

	line-height: 1.4;
}


.livre-value {
	color: #3d4c60;

	font-size: 16px;

	font-weight: 400;

	line-height: 1.65;
}


.livre-value p {
	margin-top: 0;
}


.livre-value ul,
.livre-value ol {
	margin-top: 5px;
}


/* =========================================================
   IMAGE ACF
========================================================= */

.acf-image {
	display: block;

	max-width: 100%;

	height: auto;

	margin-top: 10px;
}


/* =========================================================
   FICHIERS
========================================================= */

.acf-file-link,
.acf-link {
	color: #ec1764;

	text-decoration: underline;
}


.acf-file-link:hover,
.acf-link:hover {
	color: #c9004d;
}


/* =========================================================
   CHAMPS COMPLEXES
========================================================= */

.acf-complex-field {
	padding: 12px;

	background: #f7f7f7;

	border-radius: 5px;
}


.acf-repeater-row {
	padding: 10px 0;

	border-bottom: 1px solid #ddd;
}


.acf-repeater-row:last-child {
	border-bottom: 0;
}


.acf-sub-field {
	margin-bottom: 6px;
}


.acf-sub-field:last-child {
	margin-bottom: 0;
}


/* =========================================================
   CATEGORIES
========================================================= */

.livre-categories {
	margin-top: 30px;

	padding-top: 25px;

	border-top: 1px solid #e5e5e5;
}


.livre-category-list {
	display: flex;

	flex-wrap: wrap;

	gap: 8px;
}


.livre-category {
	display: inline-flex;

	align-items: center;
	justify-content: center;

	padding: 8px 14px;

	background: trasparent;
 
   border: 1px solid #000000;

	border-radius: 30px;

	color: #000 !important;

	font-size: 11px !important;

	font-weight: 400;

	text-decoration: none !important;

	text-transform: uppercase;
}


.livre-category:hover {
	background: #79aed6;
  border: 1px solid #79aed6;
	color: #fff !important;
}


/* =========================================================
   ARTICLES SIMILAIRES
========================================================= */

.articles-similaires {
  background: white;
	width: 100%;

	max-width: 1750px;

	margin: 70px auto 0;

	padding: 0 25px;

	box-sizing: border-box;
}


.articles-similaires h2 {
	margin: 0 0 30px;

	text-align: center;

	color: #3d4c60;

	font-family: Arial, Helvetica, sans-serif;

	font-size: 28px;

	font-weight: 700;
}


/* =========================================================
   GRILLE
========================================================= */

.articles-similaires-grid {
	display: grid;

	grid-template-columns: repeat(3, 1fr);

	gap: 25px;
}


/* =========================================================
   CARTE ARTICLE
========================================================= */

.article-similaire {
	background: #fff;

	border-radius: 7px;

	overflow: hidden;

	box-shadow:
		0 5px 18px rgba(0, 0, 0, .18);

	transition:
		transform .25s ease,
		box-shadow .25s ease;
}


.article-similaire:hover {
	transform: translateY(-5px);

	box-shadow:
		0 10px 28px rgba(0, 0, 0, .25);
}


.article-similaire-link {
	display: block;

	width: 100%;

	color: inherit !important;

	text-decoration: none !important;
}


/* =========================================================
   IMAGE ARTICLE
========================================================= */

.article-similaire-image {
	width: 100%;

	height: 260px;

	overflow: hidden;

	background: #ddd;
}


.article-similaire-img {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;

	transition:
		transform .4s ease;
}


.article-similaire:hover .article-similaire-img {
	transform: scale(1.05);
}


.article-similaire-no-image {
	width: 100%;
	height: 100%;

	background:
		linear-gradient(
			135deg,
			#777,
			#aaa
		);
}


/* =========================================================
   CONTENU ARTICLE
========================================================= */

.article-similaire-content {
	padding: 20px 22px 25px;
}


.article-similaire-category {
	margin-bottom: 8px;

	color: #ec1764;

	font-size: 11px;

	font-weight: 700;

	text-transform: uppercase;
}


.article-similaire h3 {
	margin: 0 0 10px;

	color: #3d4c60;

	font-family: Arial, Helvetica, sans-serif;

	font-size: 20px;

	font-weight: 700;

	line-height: 1.35;
}


.article-similaire-excerpt {
	color: #777;

	font-size: 14px;

	line-height: 1.6;
}


/* =========================================================
   AUCUN ARTICLE
========================================================= */

.aucun-article-similaire {
	color: #777;

	text-align: center;

	font-size: 15px;
}

