/* JMA Chataignier. Peu d'éléments, de grandes vues, du vide. */
@view-transition { navigation: auto; }
:root { --jaune: #ffe300; --vert: #a7cb42; --doux: cubic-bezier(.16, .84, .3, 1); --encre: #191a1a; --gris: #62645f; --craie: #fafaf8; --lin: #eceae5; --filet: #d3d1cb; --brun: #7a3e14; --marge: clamp(1.25rem, 4.5vw, 5.5rem); --titre: Ysabeau, Optima, Candara, sans-serif; --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E"); }
html { scroll-padding-top: 90px; }
body { background: var(--craie); color: var(--encre); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wp-site-blocks > *, main, main > *, .entry-content > * { margin-block: 0 !important; }
:where(.wp-block-group) > * { margin-block-start: 0; }
h1, h2, h3 { font-family: var(--titre); font-weight: 300; line-height: 1.06; letter-spacing: -.012em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(2.1rem, 4vw, 3.75rem); }
p { text-wrap: pretty; }
a { color: inherit; }
img { filter: contrast(1.03); }

/* Liens d'action : un filet, pas de bouton plein */
.wp-block-button__link { background: none !important; color: inherit !important; padding: 0 0 .4rem !important; border: 0 !important; border-bottom: 1px solid currentColor !important; border-radius: 0 !important; font-weight: 500; font-size: 1.0625rem; }
.wp-block-button__link::after { content: "→"; display: inline-block; margin-left: .7rem; transition: translate .4s var(--doux); }
.wp-block-button__link:hover::after { translate: .5rem 0; }
.wp-block-buttons { gap: 1rem 2.5rem; margin-top: 2rem; }

/* En-tête : posé sur l'image, puis sur fond clair au défilement */
.wp-site-blocks > header { position: fixed; inset: 0 0 auto; z-index: 50; }
.admin-bar .wp-site-blocks > header { top: 32px; }
.jma-entete { padding: 1.6rem var(--marge) !important; transition: padding .4s var(--doux); background: var(--jaune); color: var(--encre); }
.jma-entete > .alignwide { max-width: none !important; }
.jma-entete .wp-block-navigation { color: inherit !important; }
.defile .jma-entete { padding-block: .7rem !important; box-shadow: 0 1px 0 rgb(0 0 0 / .12); }
.jma-entete { padding-block: 1.1rem !important; }
.jma-logo { display: flex; align-items: center; text-decoration: none; flex: none; line-height: 1; }
.jma-logo img { height: 64px; width: auto; filter: none; transition: height .4s var(--doux); }
.defile .jma-logo img { height: 48px; }
.jma-entete .wp-block-navigation__container > li > a { text-decoration: none; position: relative; }
.jma-entete .wp-block-navigation__container > li > a::after { content: ""; position: absolute; inset: auto 0 -6px; height: 1px; background: currentColor; scale: 0 1; transform-origin: left; transition: scale .4s var(--doux); }
.jma-entete .wp-block-navigation__container > li > a:is(:hover, [aria-current=page])::after { scale: 1; }
.jma-entete .wp-block-navigation__submenu-container { background: var(--craie) !important; color: var(--encre) !important; border: 0 !important; padding: .6rem .4rem; box-shadow: 0 18px 50px rgb(0 0 0 / .14); }
.jma-entete .wp-block-navigation__submenu-container a { text-decoration: none; }
.jma-entete .wp-block-navigation__submenu-container a:hover { text-decoration: underline; }
.jma-entete .is-menu-open { background: var(--craie) !important; color: var(--encre) !important; padding: 1.6rem var(--marge) !important; }
.jma-entete .is-menu-open a { font-family: var(--titre); font-size: 1.9rem; font-weight: 300; }
.jma-entete .is-menu-open .wp-block-navigation__submenu-container { box-shadow: none; }
.jma-entete .is-menu-open .wp-block-navigation__submenu-container a { font-size: 1.35rem; }

/* Vues plein écran */
.jma-vue { position: relative; min-height: 78svh; display: grid; align-items: end; overflow: hidden; background: #111; color: #fff; isolation: isolate; }
.jma-vue > figure, .jma-diapos, .jma-diapos figure { position: absolute !important; inset: 0; margin: 0 !important; max-width: none !important; }
.jma-vue > figure, .jma-diapos { z-index: -2; }
.jma-vue img { width: 100%; height: 100%; object-fit: cover; }
.jma-vue::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / .66), rgb(0 0 0 / .04) 52%, rgb(0 0 0 / .36)); }
.jma-vue::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grain); mix-blend-mode: overlay; opacity: .16; pointer-events: none; }
.jma-vue__texte { padding: 9rem var(--marge) clamp(2.5rem, 6vh, 4.5rem); max-width: none !important; margin: 0 !important; }
.jma-vue h1 { font-size: clamp(2.9rem, 7.2vw, 7rem); max-width: 14ch; }
.jma-vue .jma-chapo { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); max-width: 34rem; margin: 1.4rem 0 0; color: rgb(255 255 255 / .9); }
.jma-ouverture { min-height: 100svh; }
.jma-diapos figure { opacity: 0; transition: opacity 1.8s ease; }
.jma-diapos figure:first-child, .js .jma-diapos figure.actif { opacity: 1; }
.js .jma-diapos.lance figure:not(.actif) { opacity: 0; }
.jma-controle { position: absolute; right: var(--marge); bottom: clamp(2.5rem, 6vh, 4.5rem); display: none; align-items: center; gap: 1.4rem; font-size: .9375rem; }
.js .jma-controle { display: flex; }
.jma-controle button { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid; padding: 0 0 .15rem; cursor: pointer; }
.jma-finale { min-height: 88svh; }
.jma-finale h2, .jma-interlude h2 { font-size: clamp(2.6rem, 6vw, 5.75rem); max-width: 15ch; }
.jma-finale .jma-tel { color: #fff; }
.jma-tel { font-family: var(--titre); font-weight: 300; font-size: clamp(1.8rem, 3vw, 2.75rem); text-decoration: none; }
.jma-tel:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* Rythme des sections */
.jma-bloc { padding: clamp(5rem, 10vw, 9.5rem) var(--marge); }
.jma-bloc:not(.jma-lin) + .jma-bloc:not(.jma-lin) { padding-top: 0; } /* deux sections claires : un seul vide */
.jma-suite { padding-top: clamp(1rem, 3vw, 3rem); }
.jma-lin { background: var(--lin); }
.jma-entame { padding: clamp(9rem, 15vw, 13rem) var(--marge) clamp(2rem, 4vw, 3.5rem); }
.jma-entame h1 { font-size: clamp(2.9rem, 6.4vw, 6rem); }

/* Déclaration */
.jma-manifeste { display: grid; grid-template-columns: 7fr 4fr; gap: 3rem clamp(3rem, 9vw, 10rem); align-items: end; }
.jma-manifeste > * { margin: 0 !important; }
.jma-manifeste h2 { font-size: clamp(2.1rem, 4.4vw, 4.25rem); }
.jma-manifeste p { margin: 0; color: var(--gris); }
.jma-reperes { display: flex; flex-wrap: wrap; gap: 1rem 4rem; margin-top: clamp(3.5rem, 7vw, 7rem) !important; padding-top: 1.4rem; border-top: 1px solid var(--filet); font-size: 1rem; }
.jma-reperes p { margin: 0; }

/* Réalisations choisies : grille décalée */
.jma-titre { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 5vw, 5rem) !important; }
.jma-titre .wp-block-buttons { margin: 0; }
.jma-choix { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(3rem, 7vw, 7.5rem) clamp(1.25rem, 2.6vw, 3rem); align-items: start; }
.jma-choix > figure { margin: 0 !important; }
.jma-choix > figure:nth-of-type(1) { grid-column: 1 / 9; }
.jma-choix > figure:nth-of-type(2) { grid-column: 9 / 13; margin-top: 9rem !important; }
.jma-choix > figure:nth-of-type(3) { grid-column: 1 / 5; margin-top: 4rem !important; }
.jma-choix > figure:nth-of-type(4) { grid-column: 6 / 13; }
.jma-choix > figure:nth-of-type(5) { grid-column: 2 / 8; }
.jma-choix > figure:nth-of-type(6) { grid-column: 9 / 13; margin-top: 7rem !important; }
.jma-choix img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; display: block; }
.jma-choix > figure:is(:nth-of-type(2), :nth-of-type(3), :nth-of-type(6)) img { aspect-ratio: 4/5; }
.jma-choix figcaption, .jma-planche figcaption { font-size: .9375rem !important; text-align: left !important; color: var(--gris) !important; margin: .8rem 0 0 !important; padding: 0 !important; position: static !important; inset: auto !important; width: auto !important; background: none !important; text-shadow: none !important; opacity: 1 !important; max-height: none !important; -webkit-mask: none !important; mask: none !important; }

/* Métiers : une liste, une vue */
.jma-metiers { position: relative; border-top: 1px solid var(--filet); margin-top: clamp(2.5rem, 5vw, 4.5rem) !important; }
.jma-metier { border-bottom: 1px solid var(--filet); padding: clamp(1.4rem, 2.6vw, 2.4rem) 0; width: 55%; margin: 0 !important; transition: padding .5s var(--doux), color .3s; }
.jma-metier h3 { font-size: clamp(2rem, 4vw, 3.6rem); }
.jma-metier h3 a { text-decoration: none; }
.jma-metier p { margin: .5rem 0 0; color: var(--gris); }
.jma-metier figure { position: absolute !important; inset: 0 0 0 62%; margin: 0 !important; opacity: 0; transition: opacity .6s; pointer-events: none; }
.jma-metier figure img { width: 100%; height: 100%; object-fit: cover; }
.jma-metier:first-child figure, .jma-metier:is(:hover, :focus-within) figure { opacity: 1; z-index: 1; }
.jma-metier:is(:hover, :focus-within) { padding-left: 1.2rem; color: var(--brun); }

/* Déroulé, texte en deux colonnes, questions */
.jma-etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 3.5rem); counter-reset: e; margin-top: clamp(2.5rem, 5vw, 4.5rem) !important; }
.jma-etape { counter-increment: e; margin: 0 !important; border-top: 1px solid var(--encre); padding-top: 1.1rem; }
.jma-etape::before { content: counter(e); color: var(--gris); font-size: 1rem; }
.jma-etape h3 { font-size: 1.75rem; margin: 2.5rem 0 .6rem; }
.jma-etape p { margin: 0; color: var(--gris); }
.jma-duo { display: grid; grid-template-columns: 5fr 6fr; gap: 3rem clamp(3rem, 9vw, 10rem); align-items: start; }
.jma-duo > * { margin: 0 !important; }
.jma-duo p { margin: 0 0 1.1rem; }
.jma-grand > p:first-child { font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.5; }
.jma-liste { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--filet); }
.jma-liste li { padding: .9rem 0; border-bottom: 1px solid var(--filet); }
.jma-faq { border-top: 1px solid var(--filet); }
.jma-faq details { border-bottom: 1px solid var(--filet); padding: 1.3rem 0; margin: 0 !important; }
.jma-faq summary { font-family: var(--titre); font-size: 1.5rem; font-weight: 400; line-height: 1.25; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1.5rem; }
.jma-faq summary::-webkit-details-marker { display: none; }
.jma-faq summary::after { content: "+"; font-weight: 300; transition: rotate .4s var(--doux); }
.jma-faq details[open] summary::after { rotate: 45deg; }
.jma-faq details p { color: var(--gris); margin: .8rem 0 0; max-width: 38rem; }

/* Planches de photos, au format d'origine */
.jma-filtres { display: none; flex-wrap: wrap; gap: .6rem 2rem; margin-bottom: 3rem; }
.js .jma-filtres { display: flex; }
.jma-filtres button { font: inherit; background: none; border: 0; border-bottom: 1px solid transparent; padding: .3rem 0; color: var(--gris); cursor: pointer; transition: color .3s; }
.jma-filtres button:is(:hover, [aria-pressed=true]) { color: var(--encre); border-color: currentColor; }
.jma-planche.wp-block-gallery { display: block !important; columns: 2; column-gap: clamp(1.25rem, 2.6vw, 3rem); max-width: none !important; margin: 0 !important; }
.jma-planche.wp-block-gallery figure.wp-block-image { display: block !important; width: 100% !important; margin: 0 0 clamp(2rem, 4vw, 4rem) !important; break-inside: avoid; position: relative; }
.jma-planche.wp-block-gallery figure.wp-block-image[hidden] { display: none !important; }
.jma-planche.wp-block-gallery figure.wp-block-image img { width: 100% !important; height: auto !important; display: block; }
.jma-planche.wp-block-gallery figure.wp-block-image::before { display: none !important; }

/* Contact et carte */
.jma-carte { position: relative; min-height: clamp(380px, 60vh, 620px); background: var(--lin); overflow: hidden; display: grid; }
.jma-carte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
.jma-carte__apercu { place-self: center; text-align: center; padding: 2rem 1.25rem; max-width: 30rem; }
.jma-carte__apercu p { font-family: var(--titre); font-size: 1.75rem; font-weight: 300; line-height: 1.25; margin: 0 0 1.5rem; }
.jma-carte button { font: inherit; background: none; border: 0; border-bottom: 1px solid; padding: 0 0 .3rem; cursor: pointer; color: inherit; }
.jma-carte small { display: block; margin-top: 1.5rem; color: var(--gris); }
html:not(.js) .jma-carte button { display: none; }
.jma-form { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; position: relative; }
.jma-form > * { grid-column: 1 / -1; }
.jma-form > label:nth-of-type(2), .jma-form > label:nth-of-type(3) { grid-column: span 1; }
.jma-form label { display: grid; font-size: 1rem; color: var(--gris); }
.jma-form :is(input:not([type=submit]), select, textarea) { font: inherit; font-size: 1.125rem; color: var(--encre); padding: .6rem 0; border: 0; border-bottom: 1px solid #85867f; background: none; width: 100%; box-sizing: border-box; border-radius: 0; transition: border-color .3s, box-shadow .3s; }
.jma-form :is(input:not([type=submit]), select, textarea):focus { outline: 2px solid transparent; border-color: var(--brun); box-shadow: 0 1px 0 var(--brun); }
.jma-form .wpcf7-form-control-wrap { display: block; }
.jma-form .hidden-fields-container, .jma-form .wpcf7-response-output:empty { display: none; }
.jma-form input[type=submit] { justify-self: start; font: inherit; font-weight: 500; background: var(--encre); color: #fff; border: 0; border-radius: 0; padding: 1rem 2.2rem; cursor: pointer; transition: background-color .3s; }
.jma-form input[type=submit]:hover { background: var(--brun); }
.jma-form .wpcf7-spinner { position: absolute; }
.jma-form .jma-avalider { color: var(--gris); font-size: .9375rem; }
.jma-form .wpcf7-response-output { margin: 0 !important; }
.jma-texte { max-width: 44rem; }
.jma-texte h2 { font-size: 1.75rem; margin: 2.5rem 0 .6rem; }
.jma-texte .jma-avalider { background: #fff1b8; color: #4a3800; padding: .1rem .5rem; }

/* Pied de page */
.jma-pied { background: var(--encre); color: #d9d8d3; padding: clamp(4rem, 8vw, 7rem) var(--marge) 2rem; }
.jma-pied a { text-decoration: none; }
.jma-pied a:hover { text-decoration: underline; }
.jma-pied__grille { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.jma-pied__grille > * { margin: 0 !important; }
.jma-pied__nom { font-family: var(--titre); font-weight: 300; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1; color: #fff; margin: 0; }
.jma-pied ul { list-style: none; padding: 0; display: grid; gap: .45rem; align-content: start; }
.jma-labels { display: flex; gap: 1.2rem; align-items: center; margin-top: 2rem; }
.jma-labels img { background: #fff; padding: 6px; height: 56px; width: auto; filter: none; }
.jma-labels img[src*=decennale] { background: none; padding: 0; }
.jma-bas { border-top: 1px solid #3b3c3b; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.3rem; font-size: .9375rem; display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; }
.jma-appel { display: none; }

/* Mouvement */
@media (prefers-reduced-motion: no-preference) {
	.js .jma-vue:first-child h1 { animation: jma-monte 1.3s .15s var(--doux) both; }
	.js .jma-vue:first-child :is(.jma-chapo, .wp-block-buttons), .js .jma-controle { animation: jma-fondu 1.2s .7s both; }
	.js .jma-vue:first-child > figure img { animation: jma-recul 2.4s var(--doux) both; }
	.js .jma-diapos figure.actif img { animation: jma-lent 9s linear both; }
	.js .reveler { opacity: 0; translate: 0 40px; transition: opacity 1.1s var(--doux), translate 1.1s var(--doux); }
	.js .reveler.vu { opacity: 1; translate: none; }
	.js figure.reveler { opacity: 1; translate: none; }
	.js figure.reveler img { clip-path: inset(100% 0 0); transition: clip-path 1.3s var(--doux); }
	.js figure.reveler.vu img { clip-path: inset(0 0 0 0); }
	@supports (animation-timeline: view()) {
		.jma-vue:not(:first-child) > figure img { animation: jma-parallaxe linear both; animation-timeline: view(); }
	}
}
@keyframes jma-monte { from { opacity: 0; translate: 0 60px; } }
@keyframes jma-fondu { from { opacity: 0; } }
@keyframes jma-recul { from { scale: 1.1; } }
@keyframes jma-lent { from { scale: 1; } to { scale: 1.07; } }
@keyframes jma-parallaxe { from { scale: 1.16; translate: 0 -6%; } to { scale: 1.16; translate: 0 6%; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } @view-transition { navigation: none; } }
@media print { .js .reveler { opacity: 1; translate: none; } .js figure.reveler img { clip-path: none; } }

/* Menu : toujours sur une ligne ; en dessous de 1024 px, il passe en menu replié. */
.jma-entete .wp-block-navigation-item, .jma-entete .wp-block-navigation-item__content { white-space: nowrap; }
@media (max-width: 1200px) { .jma-entete .wp-block-buttons { display: none; } }
@media (min-width: 600px) and (max-width: 1023px) {
	.jma-entete .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.jma-entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.jma-vue--contact { min-height: 68svh; }
.jma-coord h3 { font-size: 1.6rem; margin: clamp(3rem, 5vw, 4.5rem) 0 0; }
.jma-coord .jma-liste { margin-top: 1.2rem; }
@media (max-width: 800px) {
	.jma-entete { padding-block: 1.1rem !important; }
	.jma-logo img, .defile .jma-logo img { height: 46px; }
	.jma-manifeste, .jma-duo, .jma-etapes, .jma-pied__grille { grid-template-columns: minmax(0, 1fr); }
	.jma-choix > figure.wp-block-image:nth-of-type(n) { grid-column: 1 / -1; margin-top: 0 !important; }
	.jma-choix > figure.wp-block-image:nth-of-type(3n+2) { grid-column: 3 / -1; }
	.jma-choix { gap: 3rem 1rem; }
	.jma-metier { width: auto; }
	.jma-metier figure { position: static !important; opacity: 1; margin-top: 1.1rem !important; aspect-ratio: 16/10; }
	.jma-metier:is(:hover, :focus-within) { padding-left: 0; }
	.jma-planche.wp-block-gallery { columns: 1; }
	.jma-etape h3 { margin-top: 1rem; }
	.jma-controle { position: static; padding: 0 var(--marge) 1.75rem; }
	.jma-legende { display: none; }
	.jma-ouverture .jma-vue__texte { padding-bottom: 1.75rem; }
	.jma-appel { display: grid; grid-template-columns: 1fr 1fr; position: fixed; inset: auto 0 0; z-index: 40; background: var(--encre); color: #fff; }
	.jma-appel a { text-align: center; padding: 1.05rem .5rem; text-decoration: none; }
	.jma-appel a + a { border-left: 1px solid #454645; }
	body { padding-bottom: 60px; }
}
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header { top: 46px; } }
@media (max-width: 560px) { .jma-form > label:nth-of-type(n) { grid-column: 1 / -1; } }
/* Touches de vert du logo : des filets, jamais de texte vert sur fond clair. */
::selection { background: var(--vert); color: var(--encre); }
.wp-block-button__link { border-bottom: 2px solid var(--vert) !important; }
.jma-etape { border-top: 2px solid var(--vert); }
.jma-reperes { border-top-color: var(--vert); }
.jma-filtres button[aria-pressed=true] { border-bottom: 2px solid var(--vert); }
.jma-metier:is(:hover, :focus-within) { color: inherit; box-shadow: inset 3px 0 0 var(--vert); }
.jma-form input[type=submit]:hover { background: var(--vert); color: var(--encre); }
.jma-form :is(input:not([type=submit]), select, textarea):focus { border-color: var(--vert); box-shadow: 0 1px 0 var(--vert); }
.jma-pied { border-top: 6px solid var(--vert); }
.jma-devise { color: var(--vert); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; margin: 1rem 0 0; }
.jma-reseaux a::after { content: " ↗"; }
.jma-entete .wp-block-button__link { border-bottom-color: var(--encre) !important; }
.jma-vue__texte { text-shadow: 0 2px 28px rgb(0 0 0 / .45); }
.jma-interlude { min-height: 100svh; }
.jma-interlude img { object-position: 50% 100%; }
.jma-planche.wp-block-gallery figure.wp-block-image figcaption { box-sizing: border-box; padding-left: 0 !important; left: 0 !important; text-indent: 0; }
