/*
Theme Name:     Twenty Twenty-Five Child
Description:    Child theme for the Twenty Twenty-Five theme
Template:       twentytwentyfive
Version:        1.0.0
Tags:           block-template
Text Domain:    twentytwentyfive-child
*/


/* ==========================================================================
   Formulaire de contact (Ninja Forms) — section sombre « Parlons de votre projet »
   ========================================================================== */
.nf-form-cont {
	--cake-sage: #c5cd97;
	--cake-cream: #fbfaf3;
	--cake-dark: #111111;
	color: var(--cake-cream);
	font-size: 16px;
}

/* Titre du formulaire */
.nf-form-cont .nf-form-title h3 {
	margin: 0 0 8px;
	font-family: Boldonse, system-ui, sans-serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--cake-cream);
}

/* Mention « champs obligatoires » */
.nf-form-cont .nf-form-fields-required {
	margin-bottom: 24px;
	font-size: 14px;
	color: rgba(251, 250, 243, 0.7);
}

.nf-form-cont .ninja-forms-req-symbol {
	color: var(--cake-sage);
}

/* Libellés */
.nf-form-cont .nf-field-container {
	margin-bottom: 20px;
}

.nf-form-cont .nf-field-label label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cake-sage);
}

/* Champs */
.nf-form-cont input.ninja-forms-field:not([type="submit"]):not([type="button"]),
.nf-form-cont textarea.ninja-forms-field {
	box-sizing: border-box;
	width: 100%;
	padding: 14px 16px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: var(--cake-cream);
	background-color: rgba(251, 250, 243, 0.06);
	border: 1px solid rgba(251, 250, 243, 0.3);
	border-radius: 12px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nf-form-cont textarea.ninja-forms-field {
	min-height: 160px;
	resize: vertical;
}

.nf-form-cont input.ninja-forms-field:not([type="submit"]):focus,
.nf-form-cont textarea.ninja-forms-field:focus {
	outline: 2px solid var(--cake-sage);
	outline-offset: 2px;
	border-color: var(--cake-sage);
	background-color: rgba(251, 250, 243, 0.1);
}

/* Bouton d'envoi — reprend le style du bouton du hero */
.nf-form-cont input[type="submit"].ninja-forms-field,
.nf-form-cont input[type="button"].ninja-forms-field {
	width: auto;
	padding: 16px 28px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--cake-dark);
	background-color: var(--cake-sage);
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.nf-form-cont input[type="submit"].ninja-forms-field:hover,
.nf-form-cont input[type="submit"].ninja-forms-field:focus-visible {
	background-color: var(--cake-cream);
	transform: translateY(-1px);
}

.nf-form-cont input[type="submit"].ninja-forms-field:focus-visible {
	outline: 2px solid var(--cake-cream);
	outline-offset: 2px;
}

/* Messages d'erreur et de confirmation */
.nf-form-cont .nf-error-msg,
.nf-form-cont .nf-error .nf-error-msg {
	margin-top: 6px;
	font-size: 14px;
	color: #ffb4a8;
}

.nf-form-cont .nf-error input.ninja-forms-field:not([type="submit"]),
.nf-form-cont .nf-error textarea.ninja-forms-field {
	border-color: #ffb4a8;
}

.nf-form-cont .nf-response-msg {
	font-size: 18px;
	color: var(--cake-cream);
}

/* ==========================================================================
   Carrousel « Toutes nos créations »
   Images toutes au même format ; celle du centre grossit pendant le défilement
   (l'échelle --cake-scale est calculée dans assets/js/carousel.js)
   ========================================================================== */
.cake-carousel {
	--cake-slide: clamp(220px, 26vw, 400px);
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: clamp(8px, 1.5vw, 24px);
	/* pleine largeur : on annule les marges intérieures de la section */
	margin-inline: calc(-1 * var(--wp--preset--spacing--50));
	/* espace sur les côtés pour pouvoir centrer la première et la dernière image */
	padding: 48px calc(50% + var(--wp--preset--spacing--50) - var(--cake-slide) / 2);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.cake-carousel::-webkit-scrollbar {
	display: none;
}

.cake-carousel:focus-visible {
	outline: 2px solid #111111;
	outline-offset: -4px;
}

.cake-carousel > figure.wp-block-image {
	flex: 0 0 var(--cake-slide);
	width: var(--cake-slide);
	max-width: none;
	margin: 0;
	aspect-ratio: 4 / 5;
	scroll-snap-align: center;
	border-radius: 16px;
	overflow: hidden;
	cursor: pointer;
	transform: scale(var(--cake-scale, 0.78));
	opacity: var(--cake-dim, 0.55);
	transition: transform 0.15s ease-out, opacity 0.15s ease-out, box-shadow 0.3s ease;
	will-change: transform;
}

.cake-carousel > figure.wp-block-image.is-center {
	cursor: default;
	box-shadow: 0 24px 48px rgba(17, 17, 17, 0.25);
	z-index: 1;
}

/* Même taille pour toutes les images, quel que soit leur format d'origine */
.cake-carousel > figure.wp-block-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: auto !important;
	object-fit: cover;
	border-radius: 0 !important;
}

/* Flèches */
.cake-carousel__nav {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 8px;
}

.cake-carousel__btn {
	width: 48px;
	height: 48px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	color: #ffffff;
	background-color: #111111;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.cake-carousel__btn:hover:not(:disabled) {
	transform: scale(1.08);
}

.cake-carousel__btn:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 3px;
}

.cake-carousel__btn:disabled {
	opacity: 0.3;
	cursor: default;
}

@media (max-width: 600px) {
	.cake-carousel {
		--cake-slide: 68vw;
		padding-block: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cake-carousel > figure.wp-block-image {
		transition: none;
	}
}

/* ==========================================================================
   Responsive — hero, chiffres clés et étapes
   ========================================================================== */

/* Le grand titre s'adapte à la largeur de l'écran (6.4rem au maximum) */
h1.wp-block-heading.has-boldonse-font-family {
	font-size: clamp(2.75rem, 8.5vw, 6.4rem) !important;
}

@media (max-width: 781px) {
	/* Hero : le titre passe au-dessus du texte et du bouton */
	.wp-block-group.is-nowrap:has(> h1) {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: var(--wp--preset--spacing--30);
	}

	.wp-block-group.is-nowrap:has(> h1) > * {
		flex-basis: auto;
		width: 100%;
		max-width: none;
	}

	h1.wp-block-heading.has-boldonse-font-family {
		font-size: clamp(2.25rem, 12.5vw, 5rem) !important;
		line-height: 1.35 !important;
		letter-spacing: -2px !important;
		text-align: left;
	}

	/* Chiffres clés : chaque chiffre reste sur une seule ligne */
	.wp-block-column .wp-block-group.is-nowrap > .wp-block-group > .has-boldonse-font-family.has-x-large-font-size {
		font-size: clamp(1.125rem, 5.5vw, 1.75rem) !important;
		white-space: nowrap;
	}

	.wp-block-column .wp-block-group.is-nowrap:has(> .wp-block-group > .has-boldonse-font-family) {
		gap: 16px;
		justify-content: space-between;
	}

	/* Étapes 01 à 04 : une seule colonne */
	.wp-block-group.is-layout-grid:has(> .wp-block-group.is-nowrap) {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 781px) {
	/* Hero : marge sur les côtés pour que le texte ne colle pas au bord */
	.wp-block-group.is-nowrap:has(> h1) {
		padding-inline: var(--wp--preset--spacing--50);
		box-sizing: border-box;
	}
}

/* ==========================================================================
   En-tête — respiration autour du logo
   ========================================================================== */
.wp-block-template-part .wp-block-site-logo {
	padding-block: 20px;
}

.wp-block-template-part .wp-block-site-logo img {
	display: block;
}

@media (max-width: 600px) {
	.wp-block-template-part .wp-block-site-logo img {
		width: 180px;
		height: auto;
	}
}

/* ==========================================================================
   Étapes 01 à 04 — titre de chaque étape
   ========================================================================== */
.wp-block-group.is-layout-grid > .wp-block-group.is-nowrap p strong {
	display: inline-block;
	margin-bottom: 4px;
	font-size: 1.1em;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* ==========================================================================
   Témoignages — « Ce qu'ils en disent »
   ========================================================================== */
.cake-testimonials .cake-eyebrow {
	margin: 0;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	opacity: 0.75;
}

.cake-testimonials h2 {
	margin: 0;
	line-height: 1;
}

.cake-testimonial {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.cake-testimonial p {
	margin: 0;
}

.cake-testimonial__stars {
	letter-spacing: 0.3em;
}

.cake-testimonial__quote {
	font-weight: 300;
	line-height: 1.7;
	flex-grow: 1;
}

.cake-testimonial__author {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid rgba(251, 250, 243, 0.12);
}

.cake-testimonial__name {
	font-weight: 700;
	line-height: 1.2;
}

.cake-testimonial__meta {
	margin-top: 4px !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.6;
}

/* ==========================================================================
   En-tête avec menu d'ancres
   ========================================================================== */
html {
	scroll-behavior: smooth;
}

/* Les sections ne se collent pas tout en haut quand on clique dans le menu */
#a-propos,
#creations,
#processus,
#temoignages,
#contact {
	scroll-margin-top: 32px;
}

.cake-header {
	align-items: center;
	gap: 16px 32px;
}

.cake-header .wp-block-site-logo {
	padding-block: 8px;
	margin: 0;
}

.cake-header .wp-block-navigation {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.cake-header .wp-block-navigation .wp-block-navigation__container {
	gap: 28px;
}

.cake-header .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 6px;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.cake-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.cake-header .wp-block-navigation .wp-block-navigation-item__content:focus-visible {
	color: #c5cd97;
	border-bottom-color: #c5cd97;
	text-decoration: none;
}

@media (max-width: 600px) {
	.cake-header .wp-block-site-logo img {
		width: 150px;
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* ==========================================================================
   Formulaire de démonstration (remplace Ninja Forms pour la version en ligne)
   ========================================================================== */
.cake-form {
	--cake-sage: #c5cd97;
	--cake-cream: #fbfaf3;
	--cake-dark: #111111;
	color: var(--cake-cream);
	font-size: 16px;
}

.cake-form__title {
	margin: 0 0 8px;
	font-family: Boldonse, system-ui, sans-serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--cake-cream);
}

.cake-form__note {
	margin: 0 0 24px;
	font-size: 14px;
	color: rgba(251, 250, 243, 0.7);
}

.cake-form__field {
	margin-bottom: 20px;
}

.cake-form__field label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cake-sage);
}

.cake-form__field input,
.cake-form__field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 14px 16px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: var(--cake-cream);
	background-color: rgba(251, 250, 243, 0.06);
	border: 1px solid rgba(251, 250, 243, 0.3);
	border-radius: 12px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cake-form__field textarea {
	min-height: 160px;
	resize: vertical;
}

.cake-form__field input:focus,
.cake-form__field textarea:focus {
	outline: 2px solid var(--cake-sage);
	outline-offset: 2px;
	border-color: var(--cake-sage);
	background-color: rgba(251, 250, 243, 0.1);
}

.cake-form__field.has-error input,
.cake-form__field.has-error textarea {
	border-color: #ffb4a8;
}

.cake-form__submit {
	padding: 16px 28px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--cake-dark);
	background-color: var(--cake-sage);
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.cake-form__submit:hover,
.cake-form__submit:focus-visible {
	background-color: var(--cake-cream);
	transform: translateY(-1px);
}

.cake-form__submit:focus-visible {
	outline: 2px solid var(--cake-cream);
	outline-offset: 2px;
}

.cake-form__message {
	margin: 20px 0 0;
	padding: 16px 20px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--cake-cream);
	background-color: rgba(197, 205, 151, 0.15);
	border: 1px solid var(--cake-sage);
	border-radius: 12px;
}

.cake-form__message.is-error {
	background-color: rgba(255, 180, 168, 0.12);
	border-color: #ffb4a8;
}

/* ==========================================================================
   Témoignages — texte plus grand et plus lisible
   ========================================================================== */
.cake-testimonial .cake-testimonial__quote {
	font-size: 17px !important;
	line-height: 1.6;
}

.cake-testimonial .cake-testimonial__stars {
	font-size: 18px !important;
	letter-spacing: 0.15em;
}

.cake-testimonial p.has-small-font-size:not(.cake-testimonial__quote):not(.cake-testimonial__stars) {
	font-size: 15px !important;
}

/* ==========================================================================
   Corrections mobile (captures du 11/11) — titres qui se chevauchent,
   chiffres clés désalignés, pied de page
   ========================================================================== */

/* La police Boldonse est haute : il lui faut plus d'interligne quand un titre passe sur deux lignes */
.wp-site-blocks h2.wp-block-heading,
.wp-site-blocks h3.wp-block-heading {
	line-height: 1.3 !important;
}

/* Le sur-titre « Témoignages » ne touche plus le titre */
.cake-testimonials h2.wp-block-heading {
	margin-top: 12px;
}

/* Chiffres clés : les trois colonnes s'alignent par le haut */
.wp-block-column .wp-block-group.is-nowrap:has(> .wp-block-group > .has-boldonse-font-family) {
	align-items: flex-start;
}

@media (max-width: 781px) {
	/* Pied de page : de la place sous le texte pour qu'il ne soit pas masqué par la pastille de l'hébergeur */
	.wp-block-group.is-style-section-5 > p.has-text-align-center:last-child {
		padding-bottom: 64px;
	}
}

/* Nom du site en pied de page : même interligne que les autres titres */
.wp-site-blocks .wp-block-site-title {
	line-height: 1.3 !important;
}
