/*
Theme Name: CRC Procréation
Theme URI:
Author: Erick
Author URI:
Description: Thème FSE de la Chaire de recherche du Canada sur la procréation pour autrui et les liens familiaux
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crc-procreation
Tags: Block Editor Patterns, Site Editor

/*  Smoot Scroll */

html {
  scroll-behavior: smooth;
}

/*  Reduced motion prefs  */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/*  Navigation Block Breakpoint. Credit: https://wpdocs.io/ */
body .wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}

body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none !important;
}

/* Change the width to the breakpoit of the Nav */
@media (min-width: 799px) {
  body .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }
}

/* end nav break point */

.site-header .rechercher .icon-container svg{
  cursor:pointer;
  transition:color 250ms;
}

.site-header .wp-block-navigation-item:hover,
.site-header .rechercher:hover .icon-container svg,
.site-header .wp-block-navigation-item.current-menu-item{
  color: var(--wp--preset--color--custom-orange);
}



/* Nicley wrapped headlines */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* I've no idea why when you add a backgroud colour to a column, WP by default adds padding to it... so weird - this get's rid of that */
:where(.wp-block-columns.has-background) {
  padding: initial;
}

/* bloc paragraphe - hériter line height */
:root :where(p){
  line-height:inherit;
}


/*  pagination */

.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination .wp-block-query-pagination-next,
.wp-block-query-pagination .wp-block-query-pagination-previous
{
	text-align:center;
	display:inline-block;
	border:1px solid var(--wp--preset--color--primary);
	padding:6px 18px;
	transition: background-color 250ms ;
	background:#fff;
	border-radius:15px;
	font-size:.96rem;
	font-weight:700;
	line-height:1em;
	margin:0.3em;
}

.wp-block-query-pagination .page-numbers:hover,
.wp-block-query-pagination .wp-block-query-pagination-next:hover,
.wp-block-query-pagination .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination .page-numbers.current
{
	background-color:#111;
	border-color:#111;
	color:#fff;
	text-decoration:none !important;
}

.wp-block-query-pagination .page-numbers.dots:hover{
		background:#fff;
		color:#111;
		border-color:var(--wp--preset--color--primary);
}

.wp-block-query-pagination .is-arrow-arrow{
	margin:0;
}


.wp-block-query-pagination.sombre .page-numbers,
.wp-block-query-pagination.sombre .wp-block-query-pagination-next,
.wp-block-query-pagination.sombre .wp-block-query-pagination-previous
{
	background:#111;
	color: #bbb;
}
.wp-block-query-pagination.sombre .page-numbers:hover,
.wp-block-query-pagination.sombre .wp-block-query-pagination-next:hover,
.wp-block-query-pagination.sombre .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination.sombre .page-numbers.current
{
	background-color:#aaa;
	border-color:#111;
	color:#111;
}
.wp-block-query-pagination.sombre .page-numbers.dots:hover{
		background:#111;
		color: #bbb;
}



/* POST CONTENT ALIGN OFFSETS */

/* .is-layout-constrained > .wp-block-image.aligncenter{
	max-width: var(--wp--style--global--wide-size);
} */

@media screen and (min-width: 1280px) {
	.wp-block-post-content  > .alignright{
		 margin-right:calc( ( 100% - var(--wp--style--global--wide-size) ) / 2 )  !important;
	}
	.wp-block-post-content  > .alignleft{
		 margin-left:calc( ( 100% - var(--wp--style--global--wide-size) ) / 2 )  !important;
	}
}


/* Pull Quote */
.wp-block-pullquote blockquote {
  display: grid;
  gap: 20px;
}

.wp-block-pullquote cite {
  font-size: 80%;
  font-weight: 600;
}

/* Search Block */
.wp-block-search__input {
  border: 1px solid;
}

.wp-block-search__button {
  box-shadow: none;
  border: 1px solid var(--wp--preset--color--custom-off-black);
  border-radius: 0;
  color: white;
  padding: 0.4rem 1rem 0.5rem 1rem;
  font-weight: 500;
}

/* Comments */
.comment-form-cookies-consent {
  font-size: 14px;
  line-height: 2;
}

/* Keep our titles link the off black color*/
.wp-block-post-title :where(a) {
  color: var(--wp--preset--color--custom-off-black);
}

/* Button hover state  - core button block still does not have this and I can't figure out how to do it in theme.json! */
.wp-block-button__link,
a {
  transition: 0.3s;
}

.wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-white);
  color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-custom-white);
  color: var(--wp--preset--color--off-black);
  border-color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-off-black);
  color: var(--wp--preset--color--custom-white);
  border-color: var(--wp--preset--color--custom-off-black);
}


/* .wp-block-file{
  display:flex;
  flex-direction:row;
  align-items: center;
  justify-content: space-between;
  gap:1em;
  max-width:500px;
}
.wp-block-file > a:not(.wp-element-button){
  font-size:0.9rem;
  display:inline-block;
  font-weight:600;
  line-height:1.2;

} */




.wp-element-button{
  background-color:var(--wp--preset--color--custom-violet);
  border-radius:60px;
  color:#fff;
}
.wp-element-button:hover{
  background-color:var(--wp--preset--color--custom-violet-fonce);

}


a{
 text-decoration: none !important;
}
/* a:hover:not(.wp-block-site-title a, .wp-block-button__link.wp-element-button) {
  text-decoration: underline !important;
} */



.wp-block-query .image-en-avant{
  overflow:hidden;
  border-radius:4px;
}
.wp-block-query .image-en-avant img {
  transform: scale(1.1);
}
.wp-block-query .publication .image-en-avant img {
  transform: revert;
}
.single .image-en-avant{
  text-align:center;
}
.single .image-en-avant img {
  max-height:425px;
  width:auto;
  border-radius:6px;
}
.single-projet .image-en-avant img {
  border-radius:30px;
}

.wp-block-search__button{
  border:0;
}


.carte .type{
  position:relative;
  left:0.8rem;
}
.type{
  display:inline-block;
  transition:all 250ms;
}
.type a{
  padding:5px 12px 4px;
  display:inline-block;
}
.type:hover{
  background:black !important;

}
.type:hover a{
  color:#ccc !important;
}
