/*
Theme Name: Tempo
Theme URI: https://tempo-evenementiel.fr/
Author: Tempo Évènementiel
Description: Thème bloc sur mesure pour Tempo Évènementiel. Remplace Appointment Pro et son thème enfant.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tempo
*/

/* Le design est dans theme.json. Ici uniquement ce que theme.json ne sait pas faire. */

/* Cartes : légère élévation au survol */
.is-style-tempo-card {
	transition: transform .2s ease, box-shadow .2s ease;
}
.is-style-tempo-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--natural);
}

/* En-tête fixé en haut au défilement */
.wp-block-template-part:has(> .tempo-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
.tempo-header {
	transition: background .3s ease, box-shadow .3s ease;
}
.tempo-scrolled .tempo-header {
	box-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

/* Accueil : en-tête transparent posé sur le héro, noir dès qu'on défile */
.home .wp-block-template-part:has(> .tempo-header) {
	position: fixed;
	left: 0;
	right: 0;
}
.home:not(.tempo-scrolled) .tempo-header {
	background: linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, 0)) !important;
}
.tempo-hero {
	padding-top: calc(var(--wp--preset--spacing--60) + 90px);
}

/* Bandeau de confiance sous le héro */
.tempo-trust .tempo-stat p {
	margin: 0;
}
.tempo-awards figure {
	margin: 0;
	background: #fff;
	border-radius: 999px;
}

/* Barre d'actions mobile (appel + devis) */
.tempo-mobile-cta {
	display: none !important;
}
@media (max-width: 781px) {
	.tempo-mobile-cta {
		display: flex !important;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		margin: 0 !important;
		padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--contrast);
		box-shadow: 0 -2px 12px rgba(0, 0, 0, .3);
	}
	.tempo-mobile-cta .wp-block-button {
		flex: 1;
	}
	.tempo-mobile-cta .wp-block-button__link {
		width: 100%;
	}
	body {
		padding-bottom: calc(6rem + env(safe-area-inset-bottom));
	}
}

/* Menu : élément courant en orange */
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .current-menu-ancestor > a {
	color: var(--wp--preset--color--primary);
}

/* Logos partenaires : gris, couleur au survol */
.tempo-partners img {
	filter: grayscale(1);
	opacity: .8;
	transition: filter .2s ease, opacity .2s ease;
}
.tempo-partners a:hover img {
	filter: none;
	opacity: 1;
}

/* Contact Form 7 : deux colonnes, une seule sur mobile */
.tempo-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 0 1.5rem;
}
.tempo-form p {
	margin: 0 0 1rem;
}
.tempo-form .tempo-form-full {
	grid-column: 1 / -1;
}

/* Contact Form 7 : champs alignés sur le thème */
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: .7em .9em;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	font: inherit;
	box-sizing: border-box;
}
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 999px;
	padding: .8em 2em;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-dark);
}
