/* =============================================
   Gremaud Theme — Custom Styles
   Artiste de cirque · Fribourg
   ============================================= */

/* --- Supprimer les gaps blancs entre sections (WordPress blockGap override) --- */
:where(.wp-site-blocks) > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}
.wp-site-blocks > * + * {
	margin-block-start: 0 !important;
	margin-top: 0 !important;
}
.gremaud-homepage {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
	gap: 0 !important;
}

/* --- Hide default page title on Spectacles page --- */
.page-id-28947 > .wp-block-group > .wp-block-group:first-child {
	display: none !important;
}
/* Also remove extra padding on spectacles page main */
.page-id-28947 > .wp-block-group {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
/* Spectacles hero cover — extend behind header */
.page-id-28947 .wp-block-cover.alignfull:first-child {
	margin-top: -80px;
}
/* Force white text in spectacles hero cover */
.page-id-28947 .wp-block-cover h1,
.page-id-28947 .wp-block-cover p {
	color: #FFFFFF !important;
}
.page-id-28947 .wp-block-cover .has-accent-color {
	color: #F4A261 !important;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* --- Header sticky --- */
.gremaud-header {
	z-index: 1000;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	background-color: #0D1B2A !important;
}

.gremaud-header.scrolled {
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
	background-color: rgba(13, 27, 42, 0.97) !important;
}

.gremaud-tagline {
	margin: 0 !important;
	line-height: 1.2;
	color: #F4A261 !important;
}

/* Forcer le titre du site en blanc */
.gremaud-header .wp-block-site-title a {
	color: #FFFFFF !important;
}

/* --- Navigation --- */
.gremaud-nav .wp-block-navigation__responsive-container-open {
	color: #FFFFFF !important;
}

.gremaud-nav .wp-block-navigation-item a {
	position: relative;
	transition: color 0.2s ease;
	color: #FFFFFF !important;
}

.gremaud-nav .wp-block-navigation-item a:hover {
	color: #F4A261 !important;
}

.gremaud-nav .wp-block-navigation-item a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background: #F4A261;
	transition: width 0.3s ease;
}

.gremaud-nav .wp-block-navigation-item a:hover::after,
.gremaud-nav .wp-block-navigation-item.current-menu-item a::after {
	width: 100%;
}

/* --- Hero --- */
.gremaud-hero {
	position: relative;
	background-color: #0D1B2A;
	margin-top: -80px;
	padding-top: 0;
}

.gremaud-hero .wp-block-cover__background {
	background: linear-gradient(160deg, #0D1B2A 0%, #1D3557 40%, #E63946 100%) !important;
	opacity: 1 !important;
}

.gremaud-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* Quand une image est definie, revenir a un overlay semi-transparent */
.gremaud-hero .wp-block-cover__image-background ~ .wp-block-cover__background,
.gremaud-hero video ~ .wp-block-cover__background {
	background: linear-gradient(160deg, rgba(13,27,42,0.92) 0%, rgba(29,53,87,0.7) 40%, rgba(230,57,70,0.3) 100%) !important;
}

/* Forcer tous les textes du hero en blanc */
.gremaud-hero h1,
.gremaud-hero p,
.gremaud-hero .wp-block-button__link {
	color: #FFFFFF !important;
}

.gremaud-hero .gremaud-hero-label {
	color: #F4A261 !important;
}

.gremaud-hero-content {
	animation: heroFadeIn 1s ease 0.3s both;
}

.gremaud-hero-label {
	animation: heroFadeIn 0.8s ease 0.1s both;
}

@keyframes heroFadeIn {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Scroll indicator bounce */
.gremaud-scroll-indicator p {
	animation: bounceDown 2s ease infinite;
}

@keyframes bounceDown {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(8px); }
}

/* --- Cards --- */
.gremaud-card {
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.gremaud-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.gremaud-card .wp-block-image img {
	transition: transform 0.5s ease;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

.gremaud-card:hover .wp-block-image img {
	transform: scale(1.05);
}

.gremaud-card .wp-block-image {
	overflow: hidden;
}

/* --- Service cards --- */
.gremaud-service-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	background: #fff;
}

.gremaud-service-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.gremaud-icon {
	margin-bottom: 0 !important;
}

/* --- Stats banner --- */
.gremaud-stats {
	position: relative;
	overflow: hidden;
}

.gremaud-stats::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -10%;
	width: 40%;
	height: 200%;
	background: rgba(255, 255, 255, 0.04);
	transform: rotate(12deg);
	pointer-events: none;
}

.gremaud-stat-number {
	margin-bottom: 0.25rem !important;
}

/* --- Portfolio --- */
.gremaud-portfolio-filters {
	flex-wrap: wrap;
}

.gremaud-filter-btn {
	cursor: pointer;
	transition: all 0.2s ease;
	user-select: none;
	margin: 0 !important;
}

.gremaud-filter-btn:hover {
	border-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--primary) !important;
}

.gremaud-filter-btn.is-active {
	background-color: var(--wp--preset--color--primary) !important;
	color: #fff !important;
	border-color: var(--wp--preset--color--primary) !important;
}

.gremaud-portfolio-grid .wp-block-image {
	border-radius: 1rem;
	overflow: hidden;
	transition: transform 0.3s ease, opacity 0.4s ease;
}

.gremaud-portfolio-grid .wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.gremaud-portfolio-grid .wp-block-image:hover img {
	transform: scale(1.08);
}

.gremaud-portfolio-item.is-hidden {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* --- Scroll Reveal Animations --- */
.gremaud-reveal {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.gremaud-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger children */
.gremaud-reveal:nth-child(2) { transition-delay: 0.15s; }
.gremaud-reveal:nth-child(3) { transition-delay: 0.3s; }
.gremaud-reveal:nth-child(4) { transition-delay: 0.45s; }

/* --- Buttons --- */
.wp-block-button__link {
	transition: all 0.25s ease !important;
}

.gremaud-btn-primary .wp-block-button__link {
	background-color: #E63946 !important;
	color: #FFFFFF !important;
}

.gremaud-btn-primary .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
	background-color: #d42f3c !important;
}

.gremaud-btn-outline .wp-block-button__link {
	border: 2px solid #FFFFFF !important;
	color: #FFFFFF !important;
	background: transparent !important;
}

.gremaud-btn-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.15) !important;
	border-color: #FFFFFF !important;
	color: #FFFFFF !important;
}

.gremaud-cta-btn .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

/* --- Post cards (blog) --- */
.gremaud-post-card {
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.gremaud-post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* --- Footer --- */
.gremaud-footer {
	background-color: #0D1B2A !important;
}

.gremaud-footer a {
	transition: color 0.2s ease;
	color: #FFFFFF;
}

.gremaud-footer a:hover {
	color: #F4A261 !important;
}

.gremaud-footer h3,
.gremaud-footer h4 {
	color: #FFFFFF !important;
}

.gremaud-footer p {
	color: rgba(255, 255, 255, 0.75) !important;
}

/* Footer nav list — flat, no bullets */
.gremaud-footer-nav {
	list-style: none !important;
	padding-left: 0 !important;
	margin: 0;
}

.gremaud-footer-nav li {
	list-style: none !important;
}

.gremaud-footer-nav a {
	color: rgba(255, 255, 255, 0.8) !important;
	text-decoration: none;
}

.gremaud-footer-nav a:hover {
	color: #F4A261 !important;
}

/* Stats banner force white text */
.gremaud-stats h3,
.gremaud-stats p {
	color: #FFFFFF !important;
}

/* --- CTA section --- */
.gremaud-cta-section {
	position: relative;
	overflow: hidden;
	background: linear-gradient(160deg, #0D1B2A 0%, #1D3557 60%, #2a4a7f 100%) !important;
}

.gremaud-cta-section h2,
.gremaud-cta-section p {
	color: #FFFFFF !important;
}

.gremaud-cta-section .gremaud-cta-btn .wp-block-button__link {
	background-color: #FFFFFF !important;
	color: #E63946 !important;
	font-weight: 700;
}

.gremaud-cta-section .gremaud-cta-btn .wp-block-button__link:hover {
	background-color: #F4A261 !important;
	color: #0D1B2A !important;
}

.gremaud-cta-section::before {
	content: '';
	position: absolute;
	top: -30%;
	right: -15%;
	width: 50%;
	height: 160%;
	background: radial-gradient(circle, rgba(230, 57, 70, 0.2) 0%, transparent 70%);
	pointer-events: none;
}

/* =============================================
   RESPONSIVE — Tablette (max 781px)
   ============================================= */
@media (max-width: 781px) {

	/* --- Header --- */
	.gremaud-header {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
		padding-top: 0.75rem !important;
		padding-bottom: 0.75rem !important;
	}

	.gremaud-header .wp-block-site-title {
		font-size: 1.1rem !important;
	}

	.gremaud-tagline {
		font-size: 0.6rem !important;
	}

	/* --- Hero section --- */
	.gremaud-hero {
		margin-top: -60px;
	}

	.gremaud-hero .wp-block-cover {
		min-height: 85vh !important;
	}

	/* Boutons hero : empiler verticalement */
	.gremaud-hero .wp-block-buttons {
		flex-direction: column !important;
		align-items: center !important;
		gap: 0.75rem !important;
	}

	.gremaud-hero .wp-block-button {
		width: 100%;
		max-width: 300px;
	}

	.gremaud-hero .wp-block-button__link {
		width: 100%;
		text-align: center;
		justify-content: center;
	}

	/* Indicateur de scroll */
	.gremaud-scroll-indicator {
		display: none !important;
	}

	/* --- Sections : reduire le padding lateral --- */
	.gremaud-spectacles,
	.gremaud-services,
	.gremaud-cta-section,
	.gremaud-stats {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
	}

	/* --- Section heading spacing --- */
	.gremaud-spectacles h2,
	.gremaud-services h2 {
		font-size: clamp(1.5rem, 5vw, 2rem) !important;
		margin-bottom: 1rem !important;
	}

	/* --- Spectacle cards : empiler --- */
	.gremaud-spectacles .wp-block-columns {
		flex-direction: column !important;
		gap: 1.5rem !important;
	}

	.gremaud-spectacles .wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.gremaud-card {
		margin-bottom: 1.5rem;
	}

	/* --- Service cards : empiler --- */
	.gremaud-services .wp-block-columns {
		flex-direction: column !important;
		gap: 1.5rem !important;
	}

	.gremaud-services .wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.gremaud-service-card {
		margin-bottom: 1.5rem;
		padding: 2rem 1.5rem !important;
	}

	/* --- Stats banner --- */
	.gremaud-stats .wp-block-columns {
		flex-wrap: wrap !important;
	}

	.gremaud-stats .wp-block-column {
		flex-basis: 50% !important;
		margin-bottom: 1.5rem;
	}

	.gremaud-stat-number {
		font-size: clamp(2rem, 6vw, 3rem) !important;
	}

	/* --- CTA section --- */
	.gremaud-cta-section {
		padding-top: 3rem !important;
		padding-bottom: 3rem !important;
	}

	.gremaud-cta-section h2 {
		font-size: clamp(1.5rem, 5vw, 2rem) !important;
	}

	/* --- Footer : empiler les colonnes --- */
	.gremaud-footer .wp-block-columns {
		flex-direction: column !important;
		gap: 2rem !important;
	}

	.gremaud-footer .wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.gremaud-footer {
		padding-left: 1.5rem !important;
		padding-right: 1.5rem !important;
		text-align: center;
	}

	.gremaud-footer .wp-block-social-links {
		justify-content: center !important;
	}

	.gremaud-footer-nav {
		text-align: center;
	}

	/* Footer bottom bar : empiler */
	.gremaud-footer > .wp-block-group:last-child {
		flex-direction: column !important;
		text-align: center;
		gap: 0.5rem !important;
	}

	/* --- Portfolio --- */
	.gremaud-portfolio-grid {
		columns: 2 !important;
	}

	.gremaud-portfolio-filters {
		gap: 0.5rem !important;
	}

	/* --- Page Spectacles --- */
	.page-id-28947 .wp-block-cover.alignfull:first-child {
		margin-top: -60px;
		min-height: 50vh !important;
	}

	.page-id-28947 .wp-block-cover h1 {
		font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
	}

	/* Spectacles page cards : empiler */
	.page-id-28947 .wp-block-columns {
		flex-direction: column !important;
	}

	.page-id-28947 .wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	/* --- Navigation overlay mobile --- */
	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 2rem 1.5rem !important;
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
		font-size: 1.1rem !important;
		padding: 0.75rem 0 !important;
	}
}

/* =============================================
   RESPONSIVE — Mobile (max 480px)
   ============================================= */
@media (max-width: 480px) {

	/* --- Header compact --- */
	.gremaud-header {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	.gremaud-header .wp-block-site-title {
		font-size: 1rem !important;
	}

	.gremaud-header .wp-block-site-logo img {
		width: 36px !important;
		height: 36px !important;
	}

	/* --- Hero --- */
	.gremaud-hero {
		margin-top: -56px;
	}

	.gremaud-hero .wp-block-cover {
		min-height: 90vh !important;
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	.gremaud-hero .wp-block-button__link {
		font-size: 0.9rem !important;
		padding: 0.75rem 1.5rem !important;
	}

	/* --- Stats : 1 colonne --- */
	.gremaud-stats .wp-block-column {
		flex-basis: 100% !important;
	}

	.gremaud-stats {
		padding-top: 2.5rem !important;
		padding-bottom: 2.5rem !important;
	}

	/* --- Sections padding --- */
	.gremaud-spectacles,
	.gremaud-services,
	.gremaud-cta-section {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	/* --- Cards padding --- */
	.gremaud-service-card {
		padding: 1.5rem 1.25rem !important;
	}

	.gremaud-card .wp-block-group {
		padding: 1.25rem !important;
	}

	/* --- CTA --- */
	.gremaud-cta-section {
		padding-top: 2.5rem !important;
		padding-bottom: 2.5rem !important;
	}

	.gremaud-cta-section h2 {
		font-size: 1.4rem !important;
	}

	/* --- Footer --- */
	.gremaud-footer {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
		padding-top: 2.5rem !important;
		padding-bottom: 1.5rem !important;
	}

	/* --- Portfolio --- */
	.gremaud-portfolio-grid {
		columns: 1 !important;
	}

	.gremaud-filter-btn {
		font-size: 0.75rem !important;
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	/* --- Page Spectacles --- */
	.page-id-28947 .wp-block-cover.alignfull:first-child {
		margin-top: -56px;
		min-height: 45vh !important;
		padding-top: 4rem !important;
		padding-bottom: 2rem !important;
	}

	.page-id-28947 .wp-block-cover h1 {
		font-size: 1.6rem !important;
	}

	.page-id-28947 .gremaud-cta-section {
		padding: 2rem 1rem !important;
	}
}

/* --- Print --- */
@media print {
	.gremaud-header,
	.gremaud-footer,
	.gremaud-scroll-indicator,
	.gremaud-portfolio-filters {
		display: none !important;
	}
}