/*
Theme Name: CunyCreations
Author: Stephanie Delon
Author URI: stephaniedelon.com
Tested up to: 6.9.1
Requires PHP: 7.3
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cunycreations
*/

.wp-block-navigation__overlay-container > div {
	min-height: 100vh;
}

#modal-1-content > div > div > div.is-vertical.wp-block-navigation.is-layout-flow.wp-container-core-navigation-is-layout-6ab10bbc.wp-block-navigation-is-layout-flow > ul > li.wp-block-navigation-item.has-child.open-always.current-menu-item.wp-block-navigation-submenu > ul > li {
	margin-left:  2rem;
}

.card-hovering-effect {
	cursor: pointer;
	transition: background-color 0.3s ease;

	&:hover {
		background-color: rgba(234, 119, 28, 0.2);
	}
}

.flex-center {
	display:flex;
	flex-direction: column;
	justify-content: center;
}

/* Cover block — grayscale par défaut, couleur au survol
---------------------------------------------------------------------------- */

.wp-block-cover:not(.no-grayscale) .wp-block-cover__image-background,
.wp-block-cover:not(.no-grayscale) .wp-block-cover__video-background {
	filter: grayscale(100%);
	transition: filter .4s ease;
}

.wp-block-cover:not(.no-grayscale):hover .wp-block-cover__image-background,
.wp-block-cover:not(.no-grayscale):hover .wp-block-cover__video-background {
	filter: none;
}

/* Blocs cliquables (group, column, cover)
---------------------------------------------------------------------------- */

.wp-block-group:has(> .block-link-overlay),
.wp-block-column:has(> .block-link-overlay),
.wp-block-cover:has(> .block-link-overlay) {
	position: relative;
	cursor: pointer;
}

.block-link-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Garder les liens et boutons internes cliquables au-dessus de l'overlay */
.wp-block-group:has(.block-link-overlay) a:not(.block-link-overlay),
.wp-block-group:has(.block-link-overlay) button,
.wp-block-column:has(.block-link-overlay) a:not(.block-link-overlay),
.wp-block-column:has(.block-link-overlay) button,
.wp-block-cover:has(.block-link-overlay) a:not(.block-link-overlay),
.wp-block-cover:has(.block-link-overlay) button {
	position: relative;
	z-index: 2;
}

/* CSS Reset
---------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

b,
strong {
	font-weight: var(--wp--custom--font-weight--semi-bold);
}

ol,
ul {
	padding: 0;
}

ol:where(:not([class*="wp-block"])),
ol:where(.wp-block-list),
ul:where(:not([class*="wp-block"])),
ul:where(.wp-block-list) {
	padding-inline-start: var(--wp--preset--spacing--medium);
}

div[class*="wp-block-"] figcaption {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--x-small);
	margin-bottom: 0;
	margin-top: 20px;
	text-align: center;
}

img,
figure {
	max-width: 100%;
	height: auto;
}

/* Temporary fix for text-decoration-thickness in Firefox */
@-moz-document url-prefix() {
	a {
		text-decoration-thickness: .1rem !important;
	}
}

/* Standardize form styling
--------------------------------------------- */

input,
button,
textarea,
select {
	font: inherit;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
	-webkit-appearance: none;
	appearance: none;
}

input:not([type="submit"]),
select,
textarea,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
	color: var(--wp--preset--color--main);
	border-radius: 5px;
	border: solid 1px var(--wp--preset--color--border-light);
	padding: .5em 1em;
	font-size: var(--wp--preset--font-size--small);
	background-color: #fff;
}

input:focus-visible,
textarea:focus-visible {
	outline-color: var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
}

label {
	width: 100%;
	display: block;
}

::placeholder {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}

/* Helper styles
---------------------------------------------------------------------------- */

a.more-link {
	display: block;
}

/* Inline code */
*:not(.wp-block-code) > code {
	background-color: var(--wp--preset--color--tertiary);
	padding: 3px 5px;
	position: relative;
	border-radius: 3px;
}

.wp-block-categories {
	position: relative;
}

/* Adjust terms at bottom of posts */
.single .wp-block-group .wp-block-post-terms,
.blog .wp-block-group .wp-block-post-terms {
	margin-bottom: -8px !important;
}

/* Remove margin on term description on archive pages */
.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* Remove last separator on post list */
.remove-border-and-padding .wp-block-post-template li:last-child .wp-block-separator {
	display: none;
}

/* Hide post meta div if no tags assigned */
.single .wp-block-group:has(> .post-meta:empty) {
	display: none;
}

.wp-block-group:empty:has(+ .comment-respond) {
	display: none;
}

.row-logos > figure {
	flex-shrink: 1 !important;
}

/* Sticky header */

body:not(.wp-admin) header:has(>.is-position-sticky),
body.has-sticky-header:not(.wp-admin) .site-header {
	position: sticky;
	/* top: calc( 0px + var( --wp-admin--admin-bar--height, 0px ) ); */
	top: 0;
	z-index: 100;
	background-color: var(--wp--preset--color--dark);
}

/* Account for admin bar on mobile */

@media (max-width: 600px) {
	header:has(>.is-position-sticky),
	body.has-sticky-header .site-header {
		top: 0;
	}
}

/* Mobile helper classes */

@media (max-width: 781px) {
	.ollie-hide-on-mobile {
		display: none;
	}

	.ollie-unstick-mobile {
		position: static;
	}

	header:has(>.ollie-unstick-mobile) {
		position: static;
	}
}

/* Nos Projets — Layout sticky (images gauche / texte droite fixe)
---------------------------------------------------------------------------- */

/*
 * Le columns block étire les colonnes à la même hauteur par défaut (align-items: normal = stretch).
 * Pour que position: sticky fonctionne sur la colonne droite, la colonne doit être
 * plus courte que son conteneur — on force donc align-items: start.
 */
.cuny-sticky-layout {
	align-items: start !important;
}

.cuny-col-sticky {
	position: sticky;
	/* Ajustable via "headerHeight" dans settings.custom du theme.json */
	top: var(--wp--custom--header-height, 150px);
}

@media (max-width: 781px) {
	/* Sur mobile, les colonnes s'empilent : on désactive le sticky
	   et on remonte le texte au-dessus des images (meilleure lisibilité) */
	.cuny-col-sticky {
		position: static;
		order: -1;
	}
}