/* ==========================================================================
   Toutella – styles complémentaires à theme.json
   ========================================================================== */

:root {
	--t-encre: var(--wp--preset--color--contrast, #33291F);
	--t-orange: var(--wp--preset--color--orange, #FF6600);
	--t-orange-fonce: var(--wp--preset--color--orange-fonce, #B84300);
	--t-vert: var(--wp--preset--color--vert, #44AD3C);
	--t-vert-fonce: var(--wp--preset--color--vert-fonce, #2E7D28);
	--t-violet: var(--wp--preset--color--violet, #9900CC);
	--t-sable: var(--wp--preset--color--base-2, #F7EEDF);
	--t-creme: var(--wp--preset--color--base, #FFFBF4);
	--t-rayon: var(--wp--custom--radius--medium, 18px);
	--t-ombre: var(--wp--custom--shadow, 0 10px 30px -12px rgba(51,41,31,.25));
}

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

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: var(--wp--preset--color--orange-pale, #FFE9D6); color: var(--t-encre); }

:where(a):focus-visible,
:where(button):focus-visible {
	outline: 2px solid var(--t-violet);
	outline-offset: 3px;
	border-radius: 4px;
}

.toutella-main > .wp-block-post-content > *:first-child { margin-block-start: 0; }
.toutella-main { overflow-x: clip; }

/* --- Titres et textes manuscrits --------------------------------------- */

.toutella-kicker,
.wp-block-post-terms.toutella-kicker,
.wp-block-post-date.toutella-kicker {
	font-family: var(--wp--preset--font-family--caveat);
	font-size: 1.55rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--t-orange-fonce);
	margin-bottom: 0.2rem;
}
.toutella-kicker a { color: inherit; text-decoration: none; }

.is-style-manuscrit,
h1.is-style-manuscrit, h2.is-style-manuscrit, h3.is-style-manuscrit, h4.is-style-manuscrit {
	font-family: var(--wp--preset--font-family--caveat);
	font-weight: 700;
	letter-spacing: 0;
}
h2.is-style-manuscrit { font-size: 2.3rem; }
h3.is-style-manuscrit { font-size: 2rem; }
p.is-style-manuscrit { font-size: 1.45rem; line-height: 1.3; color: var(--t-orange-fonce); }

.wp-block-heading a { text-decoration: none; color: inherit; }
.wp-block-heading a:hover { color: var(--t-orange-fonce); }

/* --- Ruban et en-tête --------------------------------------------------- */

.toutella-ruban p { margin: 0; }
.toutella-ruban a { color: inherit; text-decoration: none; }
.toutella-ruban a:hover { text-decoration: underline; color: var(--wp--preset--color--orange-pale); }
.toutella-ruban__devise { opacity: .85; }

.toutella-entete {
	border-bottom: 1px solid rgba(51, 41, 31, .08);
	position: relative;
	z-index: 20;
}
.toutella-marque .wp-block-site-title { line-height: 1; }
.toutella-marque .wp-block-site-title a { text-decoration: none; color: var(--t-encre); }
.toutella-marque .wp-block-site-title a:hover { color: var(--t-orange-fonce); }
.toutella-marque__devise {
	margin: 0;
	font-family: var(--wp--preset--font-family--caveat);
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--t-orange-fonce);
	line-height: 1.1;
}
.toutella-marque__logo, .toutella-marque .wp-block-site-logo { margin: 0; flex-shrink: 0; }
.toutella-marque__logo img, .toutella-marque .wp-block-site-logo img { border-radius: 50%; transition: transform .4s ease; }
.toutella-marque:hover img { transform: rotate(-8deg); }

/* Navigation */
.toutella-nav .wp-block-navigation-item__content { text-decoration: none; color: var(--t-encre); padding: .35rem 0; position: relative; }
.toutella-nav .wp-block-navigation-item__content:hover,
.toutella-nav .current-menu-item > .wp-block-navigation-item__content,
.toutella-nav .current-menu-ancestor > .wp-block-navigation-item__content { color: var(--t-orange-fonce); }
@media (min-width: 600px) {
	.toutella-nav > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
		content: "";
		position: absolute; left: 0; right: 0; bottom: -2px;
		height: 3px; border-radius: 3px;
		background: var(--t-orange);
		transform: scaleX(0); transform-origin: left;
		transition: transform .25s ease;
	}
	.toutella-nav > .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
	.toutella-nav > .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content::after,
	.toutella-nav > .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content::after { transform: scaleX(1); }
}
.toutella-nav .wp-block-navigation__submenu-container {
	border: 0 !important;
	border-radius: var(--t-rayon);
	box-shadow: var(--t-ombre);
	padding: .5rem !important;
	background: #fff !important;
	min-width: 230px !important;
}
.toutella-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: .45rem .8rem !important;
	border-radius: 10px;
	font-weight: 600;
}
.toutella-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--t-sable); }
.toutella-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem 1.5rem;
}
.toutella-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.15rem; }
.toutella-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	box-shadow: none; background: transparent !important; padding: 0 0 0 1rem !important;
}

@media (max-width: 781px) {
	.toutella-ruban__contact { display: none; }
	.toutella-ruban .wp-block-group { justify-content: center; }
}

/* --- Bandeau de titre des pages ---------------------------------------- */

.toutella-bandeau { position: relative; isolation: isolate; overflow: hidden; }
.toutella-bandeau::after {
	content: "";
	position: absolute; z-index: -1;
	right: -4%; top: 50%;
	width: min(560px, 55vw); aspect-ratio: 1.45;
	transform: translateY(-50%);
	background: url("../images/chevaux-farandole.webp") no-repeat center / contain;
	opacity: .28;
	pointer-events: none;
}
.toutella-bandeau--evenements::after { display: none; }
.toutella-bandeau__titre { margin-top: 0; }
.toutella-bandeau .wp-block-post-title, .toutella-bandeau h1 { font-size: var(--wp--preset--font-size--huge); }
.toutella-page-image img { box-shadow: var(--t-ombre); }

.toutella-contenu > h2 { margin-top: var(--wp--preset--spacing--50); }

/* --- Styles de blocs ---------------------------------------------------- */

.is-style-carte {
	background: #fff;
	border-radius: var(--t-rayon);
	box-shadow: var(--t-ombre);
	padding: clamp(1.25rem, 3vw, 2rem) !important;
}
.is-style-carte > :first-child { margin-top: 0; }

.wp-block-image.is-style-rond img {
	border-radius: 50%;
	aspect-ratio: 1;
	object-fit: cover;
}
.wp-block-image.is-style-affiche img,
.wp-block-post-featured-image.is-style-affiche img {
	border-radius: 6px;
	background: #fff;
	padding: 10px;
	box-shadow: var(--t-ombre);
	transform: rotate(-1.2deg);
	transition: transform .3s ease;
}
.wp-block-image.is-style-affiche:hover img,
.wp-block-post-featured-image.is-style-affiche:hover img { transform: rotate(0); }

ul.is-style-feuilles, .toutella-infos { list-style: none; padding-left: 0; }
ul.is-style-feuilles > li, .toutella-infos > li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
ul.is-style-feuilles > li::before, .toutella-infos > li::before {
	content: "";
	position: absolute; left: 0; top: .5em;
	width: .75rem; height: .75rem;
	background: var(--t-vert);
	border-radius: 0 70% 0 70%;
	transform: rotate(-10deg);
}

.toutella-etiquette {
	display: inline-block;
	font-weight: 800;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #fff;
	background: var(--t-orange-fonce);
	padding: .3rem .8rem;
	border-radius: 999px;
	margin-bottom: 0;
	white-space: nowrap;
}
.toutella-etiquette--violet { background: var(--t-violet); }
.toutella-etiquette--vert { background: var(--t-vert-fonce); }

/* Boutons contour */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--t-orange-fonce);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--t-orange-fonce); color: #fff; border-color: var(--t-orange-fonce); }
.toutella-bouton-contour-clair > .wp-block-button__link { color: #fff !important; }
.toutella-bouton-contour-clair > .wp-block-button__link:hover { background: #fff !important; color: var(--t-vert-fonce) !important; border-color: #fff !important; }
.toutella-bouton-clair > .wp-block-button__link:hover { background: var(--wp--preset--color--orange-pale) !important; color: var(--t-encre) !important; }

/* --- Page d'accueil : l'arbre ------------------------------------------ */

.toutella-une { position: relative; }
.toutella-une h1 { margin-top: .2rem; max-width: 13ch; }
.toutella-une__arbre { margin: 0 auto; max-width: 520px; }
.toutella-une__arbre img { border-radius: 0 !important; width: 100%; height: auto; }

/* Raccourcis sous l'introduction */
.toutella-raccourcis { margin-top: var(--wp--preset--spacing--50) !important; gap: var(--wp--preset--spacing--30) !important; }
.toutella-raccourci {
	--accent: var(--t-orange-fonce);
	position: relative;
	background: #fff;
	border-radius: var(--t-rayon);
	box-shadow: var(--t-ombre);
	padding: 1.4rem 1.5rem 1.5rem;
	border-top: 6px solid var(--accent);
	transition: transform .2s ease, box-shadow .2s ease;
}
.toutella-raccourci--violet { --accent: var(--t-violet); }
.toutella-raccourci--vert { --accent: var(--t-vert-fonce); }
.toutella-raccourci--encre { --accent: var(--t-encre); }
.toutella-raccourci > * { margin: 0; }
.toutella-raccourci__surtitre {
	font-family: var(--wp--preset--font-family--caveat);
	font-weight: 700;
	font-size: 1.35rem;
	line-height: 1.1;
	color: var(--accent);
}
.toutella-raccourci__titre { font-size: 1.35rem; margin-top: .25rem !important; }
.toutella-raccourci__titre a { color: var(--t-encre); text-decoration: none; }
.toutella-raccourci__titre a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.toutella-raccourci__titre a::before { content: "→"; position: absolute; right: 1.3rem; top: 1.2rem; color: var(--accent); transition: transform .2s ease; }
.toutella-raccourci__texte { margin-top: .5rem !important; font-size: .95rem; color: var(--wp--preset--color--contrast-2); }
.toutella-raccourci:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(51,41,31,.35); }
.toutella-raccourci:hover .toutella-raccourci__titre a { color: var(--accent); }
.toutella-raccourci:hover .toutella-raccourci__titre a::before { transform: translateX(4px); }
.toutella-raccourci:focus-within { outline: 2px solid var(--t-violet); outline-offset: 3px; }
.toutella-raccourci__titre a:focus-visible { outline: none; }

@media (max-width: 781px) {
	.toutella-une h1 { max-width: none; }
	.toutella-une__arbre { max-width: 200px; }
}

/* --- Piliers ------------------------------------------------------------ */

.toutella-pilier { border-top: 6px solid var(--t-orange); }
.toutella-pilier h3 { margin-bottom: .3rem; font-size: 2.4rem; }
.toutella-pilier--art { border-top-color: var(--t-violet); }
.toutella-pilier--art h3 { color: var(--t-violet); }
.toutella-pilier--chevaux h3 { color: var(--t-orange-fonce); }
.toutella-pilier--nature { border-top-color: var(--t-vert); }
.toutella-pilier--nature h3 { color: var(--t-vert-fonce); }

/* --- Rendez-vous réguliers --------------------------------------------- */

.toutella-rdv__carte { position: relative; }
.toutella-rdv__carte h3 { margin-top: .8rem; }

/* --- Événements --------------------------------------------------------- */

.toutella-carte-evenement {
	background: #fff;
	border-radius: var(--t-rayon);
	box-shadow: var(--t-ombre);
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease;
}
.toutella-carte-evenement:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(51,41,31,.35); }
.toutella-carte-evenement__image { margin: 0 !important; background: var(--t-sable); border-radius: 0 !important; }
.toutella-carte-evenement__image img { border-radius: 0 !important; padding: 12px; }
.toutella-carte-evenement__texte { padding: 1rem 1.25rem 1.4rem; margin-top: 0 !important; }
.toutella-carte-evenement__texte > * { margin-top: .3rem; margin-bottom: 0; }
.toutella-carte-evenement .wp-block-post-title { font-size: 1.25rem; }
.toutella-carte-evenement .wp-block-post-title a { text-decoration: none; }
.toutella-carte-evenement .wp-block-post-title a:hover { color: var(--t-orange-fonce); }
.toutella-carte-evenement .wp-block-post-excerpt { font-size: .95rem; }
.toutella-carte-evenement .wp-block-post-excerpt__more-link { font-weight: 700; }

.toutella-a-suivre__image img { transform: rotate(-4deg); }

.toutella-evenement__affiche { align-self: flex-start; }
@media (min-width: 782px) {
	.toutella-evenement__affiche { position: sticky; top: 2rem; }
}
.wp-block-post-navigation-link { margin: .3rem 0; }
.wp-block-post-navigation-link .post-navigation-link__label { font-weight: 700; margin-right: .3rem; }

/* --- Appel à soutien ---------------------------------------------------- */

.toutella-appel a:not(.wp-block-button__link) { color: #fff; }
.toutella-appel__illustration img { filter: brightness(0) invert(1); opacity: .85; }
@media (max-width: 781px) { .toutella-appel__illustration { display: none; } }

/* --- Pied de page ------------------------------------------------------- */

.toutella-pied { margin-top: 0 !important; }
.toutella-pied a { color: #fff; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }
.toutella-pied a:hover { color: var(--wp--preset--color--orange-pale); text-decoration-color: currentColor; }
.toutella-pied__farandole { margin: 0 auto var(--wp--preset--spacing--30) !important; max-width: 460px !important; padding-top: var(--wp--preset--spacing--40); }
.toutella-pied__farandole img { border-radius: 0 !important; filter: brightness(0) invert(1); opacity: .55; }
.toutella-pied p.is-style-manuscrit { color: var(--wp--preset--color--orange-pale); }
.toutella-pied__titre {
	font-family: var(--wp--preset--font-family--caveat);
	font-size: 1.7rem;
	color: var(--wp--preset--color--orange-pale);
	margin-bottom: .4rem;
	font-weight: 700;
}
.toutella-pied__liens { list-style: none; padding: 0; }
.toutella-pied__liens li { margin-bottom: .35rem; }
.toutella-pied__ligne { border-color: rgba(255,255,255,.15) !important; opacity: 1; }
.toutella-pied p { margin-top: .6rem; }

/* --- Galerie ------------------------------------------------------------ */

.wp-block-gallery.toutella-galerie .wp-block-image img { border-radius: 12px; }
.wp-block-gallery.toutella-galerie .wp-block-image { transition: transform .25s ease; }
.wp-block-gallery.toutella-galerie .wp-block-image:hover { transform: scale(1.02); }

/* --- Divers -------------------------------------------------------------- */

.toutella-a-completer {
	border: 2px dashed var(--t-orange);
	background: var(--wp--preset--color--orange-pale);
	border-radius: 12px;
	padding: .8rem 1rem !important;
	font-size: .95rem;
}
.toutella-a-completer::before { content: "✎ À compléter : "; font-weight: 800; color: var(--t-orange-fonce); }

.toutella-equipe .wp-block-image { margin-bottom: .3rem; }
.toutella-equipe figcaption { text-align: center; font-family: var(--wp--preset--font-family--caveat); font-size: 1.4rem; color: var(--t-encre); }

.wp-block-search__input { border-radius: 999px; border: 2px solid rgba(51,41,31,.2); padding: .6rem 1rem; }
.wp-block-search__button { border-radius: 999px; }
