/*
Theme Name: L'Atelier du Végétal
Template: twentytwentyfive
Description: Thème enfant de Twenty Twenty-Five pour atelier-du-vegetal.com : couleurs, police Montserrat, en-tête, pied de page, animations et réservation Calendly.
Author: Gaultier Levent
Version: 1.0.8
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atelier-du-vegetal
*/

/* ---------- Généralités ---------- */
html { scroll-behavior: smooth; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content [id] { scroll-margin-top: 110px; }
.wp-block-post-content p a { color: inherit; text-underline-offset: 3px; }

/* ---------- En-tête fixe qui se réduit ---------- */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}
.av-header.is-position-sticky { position: relative; top: auto; }
.av-header { transition: box-shadow .4s ease; }
.av-header.is-small { box-shadow: inset 0 -1px 0 #e0e0e0, 0 6px 24px rgba(32, 31, 29, .08); }
.av-header__inner { transition: padding .4s cubic-bezier(.22, .61, .36, 1); }
.av-header.is-small .av-header__inner { padding-top: 12px !important; padding-bottom: 12px !important; }
.av-logo { margin: 0; }
.av-logo img { display: block; height: auto; }
.av-header .av-logo img { transition: width .4s cubic-bezier(.22, .61, .36, 1); }
.av-header.is-small .av-logo img { width: 160px !important; }
.av-nav a { text-decoration: none; }
.av-nav a:hover, .av-nav a:focus { color: var(--wp--preset--color--accent-1); }
.av-header__cta .wp-block-button__link { transition: padding .4s ease, transform .25s ease, background-color .25s ease; white-space: nowrap; }
.av-header.is-small .av-header__cta .wp-block-button__link { padding: 11px 20px !important; }

@media (max-width: 781px) {
	.av-header__inner { padding-top: 14px !important; padding-bottom: 14px !important; }
	.av-header .av-logo img { width: 160px !important; }
}
@media (max-width: 599px) {
	.av-header .av-header__cta { display: none !important; }
	.av-header .av-logo img { width: 140px !important; }
}

/* ---------- Boutons ---------- */
.wp-element-button { transition: transform .25s ease, background-color .25s ease, filter .25s ease; }
.wp-element-button:hover { transform: translateY(-2px); }
.wp-element-button:hover { filter: brightness(1.07); }

/* ---------- « Un outil pensé pour… » ---------- */
.av-illustration img { max-width: 100%; height: auto; }
.av-badges .wp-block-image, .av-badge-icon { margin: 0; }
.av-badge-icon img { display: block; }

/* ---------- Étapes : pastilles reliées par une ligne ---------- */
.av-step-num { width: 48px; height: 48px; padding: 0 !important; align-items: center; }
.av-steps { position: relative; }
@media (min-width: 782px) {
	.av-steps::before {
		content: "";
		position: absolute;
		top: 23px;
		left: calc(12.5% - 12px);
		right: calc(12.5% - 12px);
		height: 2px;
		background: var(--wp--preset--color--accent-3);
	}
	.av-steps > .wp-block-column { position: relative; z-index: 1; }
}

/* ---------- Cartes bio / conventionnel ---------- */
.av-bio-card { position: relative; overflow: hidden; }
.av-bio-card::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .07);
	pointer-events: none;
}
.av-bio-card > * { position: relative; z-index: 1; }
.av-bio-card .av-bio-ic { margin: 0 0 6px; }
.av-bio-card-g .av-bio-ic + p { color: #cfdda8; }
.av-bio-card-a .av-bio-ic + p { color: #e6ddf1; }
.av-bio-card h3 { font-size: 1.5rem !important; line-height: 1.25 !important; max-width: 440px; }
.av-bio-card ul { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 12px; }
.av-bio-card li { position: relative; padding-left: 32px; font-weight: 500; line-height: 1.5; }
.av-bio-card li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.av-bio-card li::after { content: ""; position: absolute; left: 7px; top: 5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Carte « Un autre format ? » cliquable ---------- */
.av-card-link { cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; }
.av-card-link:hover, .av-card-link:focus-within { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(94, 71, 124, .18); }
.av-card-link a { text-decoration: none; }

/* ---------- Encart tarif ---------- */
.av-price { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.av-price p { margin: 0; }
.av-pr-main, .av-pr-hours { flex: none; white-space: nowrap; }
.av-pr-mid { flex: 1 1 340px; min-width: 0; }
.av-pr-list { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; font-size: .875rem; font-weight: 500; line-height: 1.35; }
.av-pr-list li { display: flex; align-items: center; gap: 10px; margin: 0; }
.av-pr-list li::before { content: ""; flex: none; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23cfdda8'/%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%235e477c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; }
@media (max-width: 781px) {
	.av-pr-mid { border: 0 !important; padding: 0 !important; flex-basis: 100%; }
	.av-pr-list { grid-template-columns: 1fr; }
}

/* ---------- Calendly intégré ---------- */
.av-calendly .calendly-inline-widget { max-width: none !important; width: 100%; min-width: 320px; height: 720px; }

/* ---------- Contact ---------- */
.av-ct-info .av-ct-ic { margin: 0; flex: none; }
.av-ct-line p { margin: 0; }
.av-ct-mail { color: inherit; text-decoration: none !important; border-bottom: 1px solid rgba(94, 71, 124, .35); transition: border-color .2s; }
.av-ct-mail:hover { border-color: #5e477c; }
.av-ct-go { gap: 8px; }
.av-go .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 13px !important;
	border-radius: 99px;
	border: 1.5px solid rgba(94, 71, 124, .28);
	background: #fff !important;
	color: #5e477c !important;
	font-size: 13px;
	font-weight: 700;
	transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.av-go .wp-block-button__link::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--av-ico) no-repeat center / contain; mask: var(--av-ico) no-repeat center / contain; }
.av-go-maps { --av-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M10 18s6-5.2 6-10A6 6 0 004 8c0 4.8 6 10 6 10z'/%3E%3Ccircle cx='10' cy='8' r='2.2'/%3E%3C/svg%3E"); }
.av-go-waze { --av-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 11.5V9a7 7 0 0114 0v1a4 4 0 01-4 4H8l-2.5 2v-2.2A3.5 3.5 0 013 11.5z'/%3E%3Ccircle cx='8' cy='9' r='.6' fill='%23000'/%3E%3Ccircle cx='12' cy='9' r='.6' fill='%23000'/%3E%3C/svg%3E"); }
.av-go-copy { --av-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='7' y='7' width='10' height='10' rx='2'/%3E%3Cpath d='M13 4.5V4a1 1 0 00-1-1H4a1 1 0 00-1 1v8a1 1 0 001 1h.5'/%3E%3C/svg%3E"); }
.av-go .wp-block-button__link:hover, .av-go .wp-block-button__link:focus { background: #f2eef8 !important; border-color: #5e477c; transform: translateY(-1px); }
.av-go.is-copied .wp-block-button__link { background: #617240 !important; border-color: #617240; color: #fff !important; }

/* Formulaire (Jetpack) aux couleurs de la maquette */
.av-ct-form label, .av-ct-form .grunion-field-label { font-size: 14px; font-weight: 700; color: #201f1d; }
.av-ct-form .grunion-label-required { font-size: 0; }
.av-ct-form .grunion-label-required::after { content: " *"; font-size: 14px; }
.av-ct-form input[type="text"], .av-ct-form input[type="email"], .av-ct-form input[type="tel"], .av-ct-form input[type="url"],
.av-ct-form select, .av-ct-form textarea, .av-ct-form .jetpack-field__input-phone-wrapper {
	font-family: inherit;
	font-size: 15px;
	color: #201f1d;
	background-color: #fff;
	border: 1.5px solid #dfe6d2 !important;
	border-radius: 10px !important;
	min-height: 50px;
	padding: 0 16px;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}
.av-ct-form .jetpack-field__input-phone-wrapper input { border: 0 !important; min-height: 46px; }
.av-ct-form textarea { padding: 14px 16px; line-height: 1.5; }
.av-ct-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none' stroke='%23617240' stroke-width='2.4'%3E%3Cpath d='M5 8l5 5 5-5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; cursor: pointer; }
.av-ct-form input:focus, .av-ct-form select:focus, .av-ct-form textarea:focus { border-color: #617240 !important; box-shadow: 0 0 0 3px rgba(97, 114, 64, .15); outline: none; }
.av-ct-form input[type="checkbox"] { accent-color: #617240; width: 18px; height: 18px; }
.av-ct-form .grunion-checkbox-label, .av-ct-form .contact-form-field label.checkbox { font-size: 13px; font-weight: 400; line-height: 1.55; color: #55564f; }
.av-ct-form .wp-block-jetpack-button { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.av-ct-form .wp-block-jetpack-button::after { content: "* Champs obligatoires"; font-size: 13px; color: #8f9089; }
.av-ct-form .wp-block-jetpack-button .wp-block-button__link, .av-ct-form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 0 30px !important;
	border: 0;
	border-radius: 8px !important;
	background-color: #617240 !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
}
.av-ct-form .wp-block-jetpack-button .wp-block-button__link::after, .av-ct-form button[type="submit"]::after { content: ""; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M4 10h12M11 5l5 5-5 5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; }
@keyframes av-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(94, 71, 124, 0); } 30% { box-shadow: 0 0 0 6px rgba(94, 71, 124, .25); } }
.av-ct-form.av-flash { animation: av-flash 1.4s ease; }

/* ---------- Questions fréquentes ---------- */
.wp-block-post-content .wp-block-details summary {
	position: relative;
	padding-left: 38px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.wp-block-post-content .wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-post-content .wp-block-details summary::before {
	content: "+";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-6);
	color: var(--wp--preset--color--accent-2);
	font-weight: 700;
	line-height: 1;
}
.wp-block-post-content .wp-block-details[open] > summary::before { content: "–"; }
.wp-block-post-content .wp-block-details > summary ~ * { padding-left: 38px; }

/* ---------- Formulaire de contact ---------- */
.wp-block-jetpack-contact-form input:not([type="checkbox"]):not([type="radio"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea { border-radius: 8px; }
.wp-block-jetpack-contact-form .wp-block-button__link,
.wp-block-jetpack-contact-form button[type="submit"] {
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	border-radius: 8px;
}

/* ---------- Pied de page ---------- */
.av-footer a { color: inherit; text-decoration: none; }
.av-footer a:hover, .av-footer a:focus { text-decoration: underline; text-underline-offset: 3px; }
.av-footer .wp-block-separator { border: 0; height: 1px; opacity: 1; width: 100%; max-width: 1200px; margin-left: auto !important; margin-right: auto !important; }

/* ---------- Animations (activées par atelier.js, désactivées si le visiteur réduit les animations) ---------- */
.av-anim .av-rv {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .9s cubic-bezier(.22, .61, .36, 1) var(--av-delay, 0ms), transform .9s cubic-bezier(.22, .61, .36, 1) var(--av-delay, 0ms);
}
.av-anim .av-rv.is-in { opacity: 1; transform: none; }

.av-anim .av-zoom { overflow: hidden; }
.av-anim .av-zoom img { transform: scale(1.035); transition: transform 1.2s cubic-bezier(.22, .61, .36, 1); }
.av-anim .av-zoom.is-in img { transform: none; }

@keyframes av-hop {
	0% { transform: none; color: #201f1d; }
	40% { transform: translateY(-.28em); }
	70% { transform: translateY(.03em); }
	100% { transform: none; color: var(--av-hop-color, currentColor); }
}
.av-anim .av-hop { display: inline-block; }
.av-anim .av-hop.is-on { animation: av-hop .8s cubic-bezier(.3, .7, .4, 1) var(--av-hop-delay, 550ms) both; }

/* Mots qui défilent (« pour les maraîchers… ») : toujours 2 lignes, hauteur fixe */
.av-publics { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start; column-gap: .27em; white-space: nowrap; }
.av-publics mark { display: block; flex: none; }
.av-roll { display: block; position: relative; height: 1.22em; overflow: hidden; text-align: left; transition: width .6s cubic-bezier(.65, 0, .35, 1); }
.av-roll > span {
	position: absolute;
	left: 0;
	top: 0;
	white-space: nowrap;
	opacity: 0;
	transform: translateY(-100%);
	transition: transform .65s cubic-bezier(.65, 0, .35, 1), opacity .65s ease;
}
.av-roll > span.is-on { opacity: 1; transform: none; }
.av-roll > span.is-out { opacity: 0; transform: translateY(100%); }
/* Petits écrans : « pour » sur sa ligne, rouleau à hauteur réservée (pas de saut de page) */
.av-publics.is-stack { flex-wrap: wrap; white-space: normal; }
.av-publics.is-stack mark { flex-basis: 100%; }
.av-publics.is-stack .av-roll { width: 100% !important; transition: none; }
.av-publics.is-stack .av-roll > span { white-space: normal; width: 100%; text-align: center; }

.screen-reader-text-av {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Ajustements maquette (v1.0.4) ---------- */
.av-ic { margin: 0 !important; flex: none; }
.av-ic img { display: block; }
.av-pill p, .av-pill .av-ic { margin: 0; }
.av-pill { line-height: 1.2; }
.av-pill .av-pill-ic { margin: 0 !important; flex: none; width: 16px; height: 16px; line-height: 0; }
.av-pill .av-pill-ic img { display: block; width: 16px !important; height: 16px !important; }
.wp-block-image.av-ic { line-height: 0; }
.wp-block-image.av-ic img { display: block; }
.av-head { text-align: center; }
.av-hero-txt > * + * { margin-block-start: 24px !important; }
.av-hero-txt > .wp-block-heading { margin-block-start: 22px !important; }
.av-stack-12 > * + * { margin-block-start: 12px !important; }
.av-stack-14 > * + * { margin-block-start: 14px !important; }
.av-stack-18 > * + * { margin-block-start: 18px !important; }
.av-stack-20 > * + * { margin-block-start: 20px !important; }
.av-stack-24 > * + * { margin-block-start: 24px !important; }
.av-stack-26 > * + * { margin-block-start: 26px !important; }
.av-stack-36 > * + * { margin-block-start: 36px !important; }
.wp-block-post-content .wp-block-group.is-layout-flex > p,
.wp-block-post-content .wp-block-group.is-layout-flex > .wp-block-image { margin: 0; }

/* Cartes bio : pied de carte */
.av-bio-card .av-bio-foot { margin-top: auto; }
.av-bio-card-g .av-note { color: rgba(255, 255, 255, .72); }
.av-bio-card-a .av-note { color: rgba(255, 255, 255, .72); }
.av-bio-card { display: flex; flex-direction: column; }
.av-bio-card > * + * { margin-block-start: 14px; }
.av-bio-card > .av-kicker { margin-block-start: 6px; }

/* Bandeau certifications */
.av-cert-title { padding-right: 28px; border-right: 1px solid #e6e8df; }
.av-logo-ph { width: 56px; height: 56px; flex: none; padding: 4px; }
.av-cert p { margin: 0; }
@media (max-width: 781px) { .av-cert-title { border-right: 0; padding-right: 0; } }

/* L'atelier : cartes avec photo */
.av-space { overflow: hidden; }
.av-space .wp-block-image { margin: 0; }
.av-space > .wp-block-group { margin-block-start: 0 !important; }
.av-photo-ph { aspect-ratio: 3 / 2; margin: 0 !important; }

/* Conditionnements */
.av-pack > .wp-block-heading { margin-block-start: 18px; }
.av-pack > p { margin-block-start: 6px; }

/* Carte des clients */
.av-map { display: block; width: 100%; height: 380px; border: 2px solid var(--wp--preset--color--accent-3); border-radius: 14px; }
.av-client-logo { height: 72px; }
.av-logos { margin-block-start: 12px !important; }
.av-legend mark { font-size: 15px; }

/* Témoignages et questions */
.av-quote p { margin: 0; }
.av-faq .av-ic { margin-top: -2px !important; }
.av-link { color: var(--wp--preset--color--accent-2) !important; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.av-pay-note { margin-top: -16px !important; }

@media (max-width: 781px) {
	.av-map { height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- v1.0.6 : capsules et icônes reprises de la maquette (SVG en ligne) ---------- */
.av-pill { width: fit-content !important; max-width: 100%; box-sizing: border-box; }
.av-pill-svg, .av-check-svg, .av-badge-svg { display: flex; flex: none; align-items: center; justify-content: center; line-height: 0; }
.av-pill-svg svg, .av-check-svg svg, .av-badge-svg svg { display: block; overflow: visible; }
.av-pill > .av-pill-svg + p { margin: 0; }
/* Capsules arrondies « pilule » comme la maquette */
#accueil .av-pill { border-radius: 100px !important; padding: 9px 19px !important; box-shadow: inset 0 0 0 1px #cfdda8; letter-spacing: .03em; }
#atelier .av-pill, #conditionnements .av-pill, #references .av-pill, #temoignages .av-pill { border-radius: 99px !important; padding: 0 16px !important; height: 36px; column-gap: 8px !important; }
#atelier .av-pill p, #conditionnements .av-pill p, #references .av-pill p, #temoignages .av-pill p { letter-spacing: .04em !important; }
#accueil .av-pill, #concept .av-pill, #comment-ca-marche .av-pill, #faq .av-pill { min-height: 36px; }
/* Badges « Sans investissement lourd… » : mesures de la maquette */
.av-badges > .wp-block-group { padding: 10px 15px !important; border-radius: 10px !important; column-gap: 10px !important; }
.av-badges > .wp-block-group p { font-size: 17px !important; line-height: 1.2; margin: 0; }
.av-badge-svg svg { margin: -1px; }

/* ---------- Bandeau partenaires (pied de page) ---------- */
.av-partners { width: 100%; }
.av-partners-logos { row-gap: 28px !important; }
.av-partners .av-partner { margin: 0 !important; line-height: 0; }
.av-partners .av-partner img { display: block; width: auto !important; max-width: 200px; opacity: .78; transition: opacity .2s ease; }
.av-partners .av-partner a:hover img, .av-partners .av-partner a:focus-visible img { opacity: 1; }
.av-partner-wide img { height: 30px !important; }
.av-partner-mid img { height: 42px !important; }
.av-partner-tall img { height: 60px !important; }
@media (max-width: 600px) {
	.av-partners-logos { column-gap: 28px !important; }
	.av-partner-wide img { height: 24px !important; }
	.av-partner-mid img { height: 34px !important; }
	.av-partner-tall img { height: 48px !important; }
}
