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

:root {
	--ljp-gap-small: 15px;
	--ljp-radius-normal: 8px;
	--ljp-radius-small: 4px;
	--ljp-menu-time: 0.8s;
	--wp--custom--ast-default-block-top-padding: 0;
    --wp--custom--ast-default-block-right-padding: 0;
    --wp--custom--ast-default-block-bottom-padding: 0;
    --wp--custom--ast-default-block-left-padding: 0;
}


@media (max-width: 1000px) {

/* essai */
	
/*
  .wp-block-columns {
	display: block !important;
	padding: 0 !important;
  }
*/
  
  body {
	font-size: 15px;
  }

  .ljp-main-home {
    margin-left: calc(-1 * var(--ljp-gap-small)) !important;
    margin-right: calc(-1 * var(--ljp-gap-small)) !important;
  }
}

/****************** CORRECTIONS CSS PAR DEFAUT */
.entry-content > .wp-block-columns {
	margin-top: var(--wp--style--block-gap);
	margin-bottom: var(--wp--style--block-gap);
}

.entry-content > .wp-block-columns:last-child {
	margin-bottom: 0;
}

.ast-container,.ast-container-fluid {
    padding-left: var(--wp--style--block-gap);
    padding-right: var(--wp--style--block-gap);
    padding-bottom: var(--wp--style--block-gap);
}

.ast-separate-container .ast-article-post,.ast-separate-container .ast-article-single {
    padding: 0;
	padding-top: calc(2 * var(--wp--style--block-gap)) !important;
}

.home .ast-article-single {
	padding-top: 0;
}

.wp-block-columns {
    align-items: flex-start !important;
}

.wp-block-column {
    word-break: normal;
}

.ast-separate-container #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container.ast-right-sidebar #primary {
	margin: 0;
}

p,.entry-content p, #main ul {
	margin-block-start: 0.75em;
	margin-block-end: 0.75em;
}
#main ul {
	padding-left: 2em;
}

.wp-block-buttons .wp-block-button__link {
    width: auto;
}

@media (max-width: 1000px) {
    .ast-separate-container.ast-right-sidebar #content #primary,.ast-separate-container.ast-left-sidebar #content #primary,.ast-separate-container #content #primary,.ast-plain-container #content #primary,.ast-narrow-container #content #primary {
        margin-top: 0;
        margin-bottom: 1em;
    }
	
	#content article {
        padding-top: 0;
        padding-bottom: 0;
    }
	
	.ast-separate-container #content .ast-container {
        padding-left: 0;
        padding-right: 0;
		padding-bottom: 0;
    }

	.ast-container {
		display: flex;
		flex-direction: column;
	}

	.ast-container > [class^=astra-advanced-hook]  {
		order: -2;
	}
	.ast-container > #secondary {
		order: -1;
		margin: 0;
	}
	.ast-container > #secondary .sidebar-main {
		margin: var(--ljp-gap-small);
	}
}

.ast-header-break-point .ast-icon.icon-arrow svg {
	margin-left: 0;
}

#ast-hf-mobile-menu .menu-item > a {
	margin-top: 2px;
	margin-bottom: 2px;
}	

.ast-search-menu-icon .search-form {
	border-radius: var(--ljp-radius-small);
}

:root :where(.is-layout-flow) > * {
	margin-block-start: 0px;
}

/***********************************************/

/* #region annonces (page d'accueil) */
.ljp-announce {
    position: absolute;
    top: 23cqw;
    height: fit-content;
    right: 0px;
	width: 300px;
}
.site .ljp-announce, .site .ljp-submenu {
	display: none;
}
.site  .ljp-announce.ready, .site  .ljp-submenu.ready {
	display: block;
}
.ljp-announce-in {
    background-color: var(--ast-global-color-5);
	border: 2px solid var(--ast-global-color-0);
	border-right: 0;
    padding: 0.5em 1em 1em;
    border-radius: 0 0 0 var(--ljp-radius-normal);
	transition: clip-path var(--ljp-menu-time) ease-in-out;
	clip-path: inset(0px 0px 0px 0px);
    backface-visibility: hidden;
    transform: translateZ(0); /* Force le GPU à rester stable */
    -webkit-font-smoothing: subpixel-antialiased;	
}
.ljp-announce-in p:first-child {
	float: right;
}
.ljp-announce.closed .ljp-announce-in {
	clip-path: inset(0px 0px 0px 300px);
}
.ljp-announce .ljp-close, .ljp-submenu .ljp-close {
	position: absolute;
    left: -29px;
	top: 0px;
	transition: all var(--ljp-menu-time) ease-in-out;
    width: 30px;
    background-color: var(--ast-global-color-0);
    margin: 0;
    padding: 0.5em 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--ljp-radius-small) 0 0 var(--ljp-radius-small);
	cursor: pointer;
	display: grid;
	grid-template-areas: "stack";
}
.ljp-announce .ljp-close > span, .ljp-submenu .ljp-close > span {
	grid-area: stack;
	margin: 0;
	transition: opacity var(--ljp-menu-time) ease-in-out;
}
.ljp-announce .ljp-close > span:nth-child(1), .ljp-submenu .ljp-close > span:nth-child(1) {
	opacity: 1;
}
.ljp-announce .ljp-close > span:nth-child(2), .ljp-submenu .ljp-close > span:nth-child(2) {
	opacity: 0;
}
.ljp-announce.closed .ljp-close > span:nth-child(1), .ljp-submenu.closed .ljp-close > span:nth-child(1) {
	opacity: 0;
}
.ljp-announce.closed .ljp-close > span:nth-child(2), .ljp-submenu.closed .ljp-close > span:nth-child(2) {
	opacity: 1;
}
.ljp-announce.closed .ljp-close {
    left: 270px;
}
.ljp-submenu.closed .ljp-close {
    left: 220px;
}
.ljp-no-transition, .ljp-no-transition * {
	transition: none !important;
}
/* #endregion */

/*
@media (max-width: 650px) {
	.ljp-fil > :nth-child(1) {
		display: none;
	}
}
*/

/* Boxes colorées (surtout page d'accueil) */
.ljp-radius {
	border-radius: var(--ljp-radius-normal);
	padding: var(--ljp-gap-small);
}
.ljp-radius figure > img {
	border-radius: var(--ljp-radius-small);
}
.ljp-fils {
	gap: var(--wp--style--block-gap);
  }
@media (max-width: 781px) {
  .ljp-radius {
    margin: 0 !important;
  }
  .wp-block-columns {
	margin: 0 !important;
	gap: 0 !important;
	display: contents !important;
  }
  .wp-block-column {
	margin: 0 !important;
  } 
  .wp-block-column:last-child {
	padding-bottom: 0;
  }	  
  #primary {
    margin-bottom: 0 !important;
  }
  .ljp-fil {
	margin: 0 !important;
  }
  .ljp-fils {
	gap: var(--ljp-gap-small);
  }
  .entry-content:has(> .wp-block-columns:first-child) {
    display: flex;
	flex-direction: column;
	gap: var(--ljp-gap-small);
  }
  .ast-container {
	padding-bottom: 0;  
  }
}
/*******************************************/

.ljp-grid-1 {
	display: grid;
}

.ljp-fils {
	container-type: inline-size;
}

@media (min-width: 782px) {
	.ljp-fils {
		order: 1;
	}
}

@container (width >= 520px) {
	.ljp-fil > div {
		display: contents;
	}
}

div:has(> #ljp-bandeau) {
	flex-wrap: wrap;
}

#ljp-bandeau {
	min-width: 100%;
}

div:has(> .ljp-fil-header) {
	position: sticky;
	top: 0;
	z-index: 10;
}

.ljp-fil {
	background: #EDEDED;
	border-radius: var(--ljp-radius-normal);
	grid-template-rows: auto !important;
	grid-template-columns: 70px 2fr 3fr 40px !important;
	place-items: center center;
	container-type: normal !important;
	padding: var(--ljp-gap-small);
}
.ljp-fil p {
  margin: 0;
}

.ljp-fil-block {
	gap: 12px;
}

.ljp-fil figure, .ljp-fil div {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

@container (width < 520px) {
	.ljp-fil > div {
		display: flex;
		align-items: center;
	}
	.ljp-fil > div:nth-child(1) {
		justify-content: flex-start;
		justify-self: start;
		gap: 24px;
	}
	.ljp-fil > div:nth-child(2) {
		justify-content: space-between;
		gap: 12px;
	}
	.ljp-fil > div:nth-child(1) > figure img {
		width: 70px;
		min-width: 70px;
	}
	.ljp-fil > div:nth-child(2) > figure img {
		width: 90px;
	}
	.ljp-fil {
		grid-template-columns: 1fr !important;
	}
}

.ljp-fil:hover {
	background: #CBCBCB;
	cursor: pointer;
}

.ljp-fil-titre {
	font-weight: 700;
	font-style: bold;
	font-size: 24px;
	/* font-size: clamp(18px, 4cqw, 26px); */
	line-height: 1.2em;
}

.ljp-fil-resume {
	font-weight: 700;
	font-style: bold;
	/* font-size: clamp(14px, 2cqw, 16px); */
	line-height: 1.2em;
}

.ljp-main-home {
	display: grid;
	grid-template-areas: "stack";
	container-type: inline-size;
}

.ljp-main-home > * {
	grid-area: stack;
	margin: 0;
}

.ljp-maintitle1 {
	font-weight: 800;
	font-style: bold;
	font-size: 5cqw;
	color: white;
	margin-top: 2cqw;
}

.ljp-maintitle2 {
	font-weight: 800;
	font-style: bold;
	font-size: 11cqw;
	color: white;
	margin-top: 8cqw;
}

/*
.wp-block-navigation {
	background-color: #F0F0F0;
	border-radius: 5px;
	padding: 10px;
	gap: 0;
}
*/

.main-header-bar .menu-item-has-children > .menu-link {
	color: var(--ast-global-color-0);
	font-weight: bold;
}

.ljp-btn-subtitle {
	font-weight: normal;
	font-size: 80%;
}

.ljp-footer-cols {
	border-bottom: 1px solid white;
}

.sidebar-main .ljp-submenu a {
    position: relative; /* Indispensable pour caler la bordure */
    display: block;
    text-decoration: none;
    color: inherit;
    /* On ne met AUCUN padding ici pour ne pas faire grandir le bloc */
}

.sidebar-main .current-menu-item a {
	z-index: 1;
}


.sidebar-main .current-menu-item {
	color: var(--ast-global-color-0);
	font-weight: bold;
}

.sidebar-main ul, .sidebar-main li {
	width: 100%;
}

.ljp-submenu-in {
    list-style: none;
    padding: 5px 0px 5px 20px;
	margin: 0;
	border-radius: var(--ljp-radius-normal);
}

.ljp-submenu-in li a {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 1000px) and (min-height: 500px) {
	@keyframes adjust-top {
	  from { top: 200px; }
	  to { top: 120px; }
	}

	.ljp-submenu {
	    position: fixed;
		animation: adjust-top linear both;
		animation-timeline: scroll();
		animation-range: 0px 80px;
	}
}

@media (max-width: 1000px) and (max-height: 500px) {
	.ljp-submenu {
	    position: absolute;
	}
}

@media (max-width: 1000px) {
	.ljp-submenu {
	    right: 0px;
		width: 250px;
		z-index: 10;
	}

	.ljp-submenu-in {
		border-radius: 0 0 0 var(--ljp-radius-normal);
	}
	.ljp-submenu-in {
	    background-color: var(--ast-global-color-5);
		border: 2px solid var(--ast-global-color-0);
		border-right: 0;
	    padding: 0.5em 1em 1em;
	    border-radius: 0 0 0 var(--ljp-radius-normal);
		transition: clip-path var(--ljp-menu-time) ease-in-out;
		clip-path: inset(0px 0px 0px 0px);
	    backface-visibility: hidden;
	    transform: translateZ(0);
	    -webkit-font-smoothing: subpixel-antialiased;	
	}
	.ljp-submenu.closed .ljp-submenu-in {
		clip-path: inset(0px 0px 0px 250px);
	}
}
@media (min-width: 1001px) {
	.ljp-submenu .ljp-close {
		display: none !important;
	}
}

/* ========== ACCORDÉONS LJP */
.ljp-acc-det {
  height: 0;
  overflow: hidden;
  transition: height 0.5s ease;
  margin-top: 0;
  margin-bottom: 0;
}
.ljp-acc-det > .ljp-acc-det-inner {
  padding: 1em;
  background-color: rgb(from var(--ast-global-color-6) r g b / 0.7);
  border-radius: var(--ljp-radius-small);
}

body.block-editor-iframe__body .ljp-acc-det {
  height: auto !important;
  overflow: visible !important;
}

/* reset et style du bouton */
body #content .ljp-acc {
  margin-left: 1.2em !important;
}
body #content .ljp-acc .wp-block-buttons {
  all: unset;
}
body #content .ljp-acc .wp-block-button {
  all: unset;
}
body #content .ljp-acc button {
  all: unset;
  width: 100%;
  cursor: pointer;
  position: relative;
}

body #content .ljp-acc .ljp-acc-tit, body h2 {
  font-weight: bold;
  font-size: 110%;
  color: var(--ast-global-color-0);
}
body #content .ljp-acc .ljp-acc .ljp-acc-tit {
  font-size: 110%;
}
.ljp-acc-tit button::before {
  content: "+";
  color: var(--ast-global-color-0);
  font-size: 150%;
  position: absolute;
  left: -1em;
  top: 0.5em;
  
  width: 1em;
  height: 1em;
  
  display: flex;
  align-items: center;
  justify-content: center;

  transform: translateY(-50%);
  transform-origin: center;
  
  transition: transform 0.5s ease;
}
.ljp-acc-item.open > div > .ljp-acc-tit button::before {
  transform: translateY(-50%) rotate(45deg);
}
/* ========================= */

/****** Compteurs */
.ljp-big-counters {
	display: grid;
	grid-template: 100px / 100px 100px 100px;
	justify-content: space-around;
}
.ljp-big-counter {
	border: 2px solid var(--ast-global-color-0);
	border-radius: var(--ljp-radius-normal);
	padding: 0.5em;
	text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.ljp-big-counter .counter {
	font-size: 120%;
	font-weight: bold;
	color: var(--ast-global-color-0);
}
/******************/

.ast-custom-footer > div > .wp-block-group p {
	margin-top: 15px;
	margin-block-start: 15px;
	margin-bottom: 15px;
	margin-block-end: 15px;
}

/*********** LOGO site à cheval sur le header ***/
@media (min-width: 1200px) {
	.ast-desktop .site-above-header-wrap {
		position: relative;
	}
	.ast-desktop .site-branding {
		position: absolute;
		top: 0px;
		z-index: 10;
	}
}
.ast-desktop .site-above-header-wrap {
	padding-bottom: 0px;
}
/************************************************/

/* résultats de la recherche */
.entry-meta {
	display: none;
}

/* Titres */
h2, .entry-content :where(h2), .editor-styles-wrapper h2 {
  font-weight: bold;
  font-size: 130%;
  color: var(--ast-global-color-0);
  text-transform: uppercase;
  margin-top: 2em;
  margin-block-start: 2em;
}

@media (max-width: 781px) {
  .wp-block-column:nth-child(2) > :first-child {
    margin-top: revert;
  }
  .wp-block-column:nth-child(2) > h2:first-child {
    margin-top: 2em;
  }
}

/*
h2:first-child, .entry-content :where(h2:first-child), .editor-styles-wrapper h2:first-child {
  margin-top: 1em;
}
*/

h3, .entry-content :where(h3), .editor-styles-wrapper h3 {
  font-weight: bold;
  font-size: 110%;
  color: var(--ast-global-color-0);
}

/* Page d'accueil mobile revue */
@media (max-width: 781px) {
  .home .entry-content {
    display: grid;
    row-gap: var(--ljp-gap-small);
  }
}
