/* JS – Boutons — v1.0.0
 * 24 designs pilotés par variables, 5 effets au survol, 3 tailles, mode icône seule.
 * 100 % CSS. Palette Solarva : #7bb042 / #000101 / #9fd36d / #c6ea9e / #eaf2df.
 * Gardes : espacement icône/texte par margin !important (jamais gap), libellés en
 * break-word (jamais anywhere sur un élément qui suit son contenu), racine en clip.
 */

/* ---------- Conteneur ---------- */
.js-btns {
	--js-btns-gap: 14px;
	--js-pad-x: 0px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--js-btns-gap);
	padding-left: var(--js-pad-x);
	padding-right: var(--js-pad-x);
	max-width: 100%;
	overflow-x: clip;
}
.js-btns :where(*) { min-width: 0; }
.js-btns [hidden] { display: none !important; }

/* ---------- Base bouton ---------- */
.js-btns .js-btn {
	/* Variables par défaut (design plein-vert) — chaque design les redéfinit. */
	--js-btn-bg: #4a7326;
	--js-btn-bg2: #4a7326;
	--js-btn-txt: #ffffff;
	--js-btn-border: transparent;
	--js-btn-bg-h: #3e6d2c;
	--js-btn-bg2-h: #3e6d2c;
	--js-btn-txt-h: #ffffff;
	--js-btn-border-h: transparent;
	--js-btn-shadow: 0 2px 10px rgba(0,1,1, .10);
	--js-btn-shadow-h: 0 6px 18px rgba(0,1,1, .16);
	--js-btn-radius-d: 12px;
	--js-btn-py: 13px;
	--js-btn-px: 26px;
	--js-btn-fs: 15px;

	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	max-width: 100%;
	padding: var(--js-btn-py) var(--js-btn-px);
	border: 1px solid var(--js-btn-border);
	border-radius: var(--js-btn-radius, var(--js-btn-radius-d));
	background-image: linear-gradient(135deg, var(--js-btn-bg), var(--js-btn-bg2));
	color: var(--js-btn-txt);
	box-shadow: var(--js-btn-shadow);
	font-family: 'Montserrat', sans-serif;
	font-size: var(--js-btn-fs);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	overflow: hidden;
	transition: color .28s ease, border-color .28s ease, box-shadow .28s ease, transform .28s ease, background-color .28s ease;
	-webkit-tap-highlight-color: transparent;
}
/* Le dégradé au survol : couche ::before qui fond, pour transitionner deux dégradés. */
.js-btns .js-btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: linear-gradient(135deg, var(--js-btn-bg-h), var(--js-btn-bg2-h));
	opacity: 0;
	transition: opacity .28s ease, transform .34s cubic-bezier(.4, 0, .2, 1);
	pointer-events: none;
}
.js-btns .js-btn:hover, .js-btns .js-btn:focus-visible {
	color: var(--js-btn-txt-h);
	border-color: var(--js-btn-border-h);
	box-shadow: var(--js-btn-shadow-h);
}
.js-btns .js-btn:hover::before, .js-btns .js-btn:focus-visible::before { opacity: 1; }
.js-btns .js-btn:focus-visible { outline: 2px solid #000101; outline-offset: 3px; }
.js-btns--on-dark .js-btn:focus-visible { outline-color: #ffffff; }

.js-btns .js-btn__inner {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
}
.js-btns .js-btn__label {
	overflow-wrap: break-word; /* jamais anywhere : la largeur suit le contenu */
	min-width: 0;
}

/* Icônes : alignement blindé (em + inline-flex + line-height 1). */
.js-btns .js-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15em;
	height: 1.15em;
	flex: 0 0 auto;
}
.js-btns .js-btn__icon i,
.js-btns .js-btn__icon i::before,
.js-btns .js-btn__icon svg {
	line-height: 1 !important;
	vertical-align: middle;
	font-size: 1em;
}
.js-btns .js-btn__icon svg { width: 1em; height: 1em; fill: currentColor; }
/* Espacement icône/texte par MARGIN !important, jamais par gap (règle anti-thème). */
.js-btns .js-btn__icon:first-child { margin-right: .55em !important; }
.js-btns .js-btn__icon:last-child  { margin-left: .55em !important; }

/* ---------- Tailles ---------- */
.js-btns .js-btn--s-s { --js-btn-py: 10px; --js-btn-px: 20px; --js-btn-fs: 14px; }
.js-btns .js-btn--s-m { --js-btn-py: 13px; --js-btn-px: 26px; --js-btn-fs: 15px; }
.js-btns .js-btn--s-l { --js-btn-py: 16px; --js-btn-px: 34px; --js-btn-fs: 17px; }

/* ---------- Designs ---------- */
/* Pleins */
.js-btns .js-btn--d-plein-vert { /* défauts de base */ }
.js-btns .js-btn--d-plein-nuit {
	--js-btn-bg: #000101; --js-btn-bg2: #000101; --js-btn-bg-h: #101d0f; --js-btn-bg2-h: #101d0f;
}
.js-btns .js-btn--d-plein-or {
	--js-btn-bg: #9fd36d; --js-btn-bg2: #9fd36d; --js-btn-txt: #0d1a0b;
	--js-btn-bg-h: #8fc95a; --js-btn-bg2-h: #8fc95a; --js-btn-txt-h: #0d1a0b;
}
.js-btns .js-btn--d-blanc-pur {
	--js-btn-bg: #ffffff; --js-btn-bg2: #ffffff; --js-btn-txt: #000101; --js-btn-border: #e3e9dc;
	--js-btn-bg-h: #000101; --js-btn-bg2-h: #000101; --js-btn-txt-h: #ffffff; --js-btn-border-h: #000101;
}

/* Dégradés */
.js-btns .js-btn--d-degrade-vert {
	--js-btn-bg: #4a7326; --js-btn-bg2: #3e6d2c;
	--js-btn-bg-h: #3e6d2c; --js-btn-bg2-h: #2f5421;
}
.js-btns .js-btn--d-degrade-foret {
	--js-btn-bg: #4a7326; --js-btn-bg2: #000101;
	--js-btn-bg-h: #3e6d2c; --js-btn-bg2-h: #101d0f;
}
.js-btns .js-btn--d-degrade-aurore {
	--js-btn-bg: #c6ea9e; --js-btn-bg2: #9fd36d; --js-btn-txt: #2f5421;
	--js-btn-bg-h: #c6ea9e; --js-btn-bg2-h: #c6ea9e; --js-btn-txt-h: #2f5421;
}
.js-btns .js-btn--d-degrade-solaire {
	--js-btn-bg: #9fd36d; --js-btn-bg2: #c6ea9e; --js-btn-txt: #0d1a0b;
	--js-btn-bg-h: #8fc95a; --js-btn-bg2-h: #c6ea9e; --js-btn-txt-h: #0d1a0b;
}

/* Contours */
.js-btns .js-btn--d-contour-vert {
	--js-btn-bg: transparent; --js-btn-bg2: transparent; --js-btn-txt: #3e6d2c; --js-btn-border: #4a7326;
	--js-btn-bg-h: #4a7326; --js-btn-bg2-h: #4a7326; --js-btn-txt-h: #ffffff; --js-btn-border-h: #4a7326;
	--js-btn-shadow: none; border-width: 2px;
}
.js-btns .js-btn--d-contour-nuit {
	--js-btn-bg: transparent; --js-btn-bg2: transparent; --js-btn-txt: #000101; --js-btn-border: #000101;
	--js-btn-bg-h: #000101; --js-btn-bg2-h: #000101; --js-btn-txt-h: #ffffff; --js-btn-border-h: #000101;
	--js-btn-shadow: none; border-width: 2px;
}
.js-btns .js-btn--d-contour-double {
	--js-btn-bg: transparent; --js-btn-bg2: transparent; --js-btn-txt: #3e6d2c; --js-btn-border: #4a7326;
	--js-btn-bg-h: #4a7326; --js-btn-bg2-h: #4a7326; --js-btn-txt-h: #ffffff; --js-btn-border-h: #4a7326;
	--js-btn-shadow: 0 0 0 4px rgba(123,176,66, .14);
	--js-btn-shadow-h: 0 0 0 5px rgba(123,176,66, .22);
}

/* Fantôme — prévu pour image / fond sombre. */
.js-btns .js-btn--d-fantome {
	--js-btn-bg: transparent; --js-btn-bg2: transparent; --js-btn-txt: #ffffff; --js-btn-border: rgba(255, 255, 255, .85);
	--js-btn-bg-h: #ffffff; --js-btn-bg2-h: #ffffff; --js-btn-txt-h: #000101; --js-btn-border-h: #ffffff;
	--js-btn-shadow: none; border-width: 2px;
}

/* Verre dépoli — variante claire par défaut, sombre via on-dark. */
.js-btns .js-btn--d-verre {
	--js-btn-bg: rgba(0,1,1, .07); --js-btn-bg2: rgba(0,1,1, .07);
	--js-btn-txt: #000101; --js-btn-border: rgba(0,1,1, .18);
	--js-btn-bg-h: rgba(0,1,1, .14); --js-btn-bg2-h: rgba(0,1,1, .14);
	--js-btn-txt-h: #000101; --js-btn-border-h: rgba(0,1,1, .3);
	--js-btn-shadow: none;
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
}

/* Doux */
.js-btns .js-btn--d-doux-vert {
	--js-btn-bg: #eaf2df; --js-btn-bg2: #eaf2df; --js-btn-txt: #3e6d2c;
	--js-btn-bg-h: #4a7326; --js-btn-bg2-h: #4a7326; --js-btn-txt-h: #ffffff;
	--js-btn-shadow: none;
}
.js-btns .js-btn--d-doux-or {
	--js-btn-bg: #eaf2df; --js-btn-bg2: #eaf2df; --js-btn-txt: #3e6d2c;
	--js-btn-bg-h: #9fd36d; --js-btn-bg2-h: #9fd36d; --js-btn-txt-h: #0d1a0b;
	--js-btn-shadow: none;
}

/* Nuit à liseré or */
.js-btns .js-btn--d-nuit-lisere-or {
	--js-btn-bg: #000101; --js-btn-bg2: #0d1a0b; --js-btn-txt: #ffffff; --js-btn-border: #9fd36d;
	--js-btn-bg-h: #101d0f; --js-btn-bg2-h: #1b2f18; --js-btn-txt-h: #c6ea9e; --js-btn-border-h: #c6ea9e;
	--js-btn-shadow: 0 4px 14px rgba(0,1,1, .25), inset 0 0 12px rgba(159,211,109, .12);
	--js-btn-shadow-h: 0 6px 18px rgba(0,1,1, .32), inset 0 0 16px rgba(159,211,109, .2);
}

/* Nuit — reflet vert */
.js-btns .js-btn--d-nuit-verre-vert {
	--js-btn-bg: rgba(0,1,1, .94); --js-btn-bg2: rgba(13,26,11, .94);
	--js-btn-txt: #c6ea9e; --js-btn-border: rgba(123,176,66, .55);
	--js-btn-bg-h: rgba(13, 52, 80, .96); --js-btn-bg2-h: rgba(16, 64, 95, .96);
	--js-btn-txt-h: #d6efbf; --js-btn-border-h: rgba(116, 214, 100, .8);
	--js-btn-shadow: 0 4px 16px rgba(0,1,1, .3), 0 0 0 1px rgba(123,176,66, .12);
}

/* Capsule bicolore : icône sur fond vert, libellé sur fond nuit. */
.js-btns .js-btn--d-capsule {
	--js-btn-bg: #000101; --js-btn-bg2: #000101; --js-btn-txt: #ffffff;
	--js-btn-bg-h: #101d0f; --js-btn-bg2-h: #101d0f; --js-btn-txt-h: #ffffff;
	--js-btn-capsule: #4a7326;
	padding: 0;
}
.js-btns .js-btn--d-capsule .js-btn__inner { align-items: stretch; }
.js-btns .js-btn--d-capsule .js-btn__label {
	display: inline-flex;
	align-items: center;
	padding: var(--js-btn-py) var(--js-btn-px);
}
.js-btns .js-btn--d-capsule .js-btn__icon {
	width: auto;
	height: auto;
	align-self: stretch;
	padding: 0 calc(var(--js-btn-px) * .62);
	background: var(--js-btn-capsule);
	color: #ffffff;
	margin: 0 !important;
}
.js-btns .js-btn--d-capsule:hover .js-btn__icon,
.js-btns .js-btn--d-capsule:focus-visible .js-btn__icon { background: #3e6d2c; }

/* Icône en pastille séparée. */
.js-btns .js-btn--d-pastille-icone {
	--js-btn-bg: #ffffff; --js-btn-bg2: #ffffff; --js-btn-txt: #000101; --js-btn-border: #e3e9dc;
	--js-btn-bg-h: #f1f5ec; --js-btn-bg2-h: #f1f5ec; --js-btn-txt-h: #000101; --js-btn-border-h: #cfe0c0;
}
.js-btns .js-btn--d-pastille-icone .js-btn__icon {
	width: 2em;
	height: 2em;
	border-radius: 999px;
	background: linear-gradient(135deg, #4a7326, #3e6d2c);
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(46, 125, 36, .35);
}
.js-btns .js-btn--d-pastille-icone .js-btn__icon:first-child { margin-right: .7em !important; }
.js-btns .js-btn--d-pastille-icone .js-btn__icon:last-child  { margin-left: .7em !important; }

/* Relief 3D. */
.js-btns .js-btn--d-relief {
	--js-btn-bg: #4a7326; --js-btn-bg2: #4a7326;
	--js-btn-bg-h: #3e6d2c; --js-btn-bg2-h: #3e6d2c;
	--js-btn-shadow: 0 4px 0 #2f5421, 0 6px 14px rgba(0,1,1, .18);
	--js-btn-shadow-h: 0 4px 0 #2f5421, 0 8px 18px rgba(0,1,1, .24);
}
.js-btns .js-btn--d-relief:active { transform: translateY(3px); box-shadow: 0 1px 0 #2f5421, 0 3px 8px rgba(0,1,1, .18); }

/* Feuille — signature JS Élagage : garde sa forme quel que soit l'arrondi global. */
.js-btns .js-btn--d-feuille {
	--js-btn-bg: #4a7326; --js-btn-bg2: #2f5421;
	--js-btn-bg-h: #3e6d2c; --js-btn-bg2-h: #3e6d2c;
	border-radius: 26px 6px 26px 6px !important;
}
.js-btns .js-btn--d-feuille:hover, .js-btns .js-btn--d-feuille:focus-visible { border-radius: 6px 26px 6px 26px !important; }

/* Bois. */
.js-btns .js-btn--d-bois {
	--js-btn-bg: #7a5230; --js-btn-bg2: #5e3d20;
	--js-btn-bg-h: #8a6039; --js-btn-bg2-h: #6d4826;
}

/* Souligné minimal. */
.js-btns .js-btn--d-souligne {
	--js-btn-bg: transparent; --js-btn-bg2: transparent; --js-btn-txt: #000101;
	--js-btn-bg-h: transparent; --js-btn-bg2-h: transparent; --js-btn-txt-h: #3e6d2c;
	--js-btn-shadow: none; --js-btn-shadow-h: none;
	padding-left: 4px;
	padding-right: 4px;
	border-radius: 0 !important;
	background-image: none;
}
.js-btns .js-btn--d-souligne .js-btn__inner {
	background-image: linear-gradient(90deg, #7bb042, #3e6d2c);
	background-repeat: no-repeat;
	background-size: 100% 2px;
	background-position: 0 100%;
	padding-bottom: 5px;
	transition: background-size .3s ease;
}
.js-btns .js-btn--d-souligne:hover .js-btn__inner,
.js-btns .js-btn--d-souligne:focus-visible .js-btn__inner { background-size: 38% 2px; }

/* Urgence. */
.js-btns .js-btn--d-urgence {
	--js-btn-bg: #c2410c; --js-btn-bg2: #9a3412;
	--js-btn-bg-h: #b8390a; --js-btn-bg2-h: #8f2f10;
	--js-btn-shadow: 0 4px 14px rgba(154, 52, 18, .35);
	--js-btn-shadow-h: 0 6px 18px rgba(154, 52, 18, .45);
}

/* ---------- Adaptation fond sombre ---------- */
.js-btns--on-dark .js-btn--d-contour-vert  { --js-btn-txt: #c6ea9e; --js-btn-border: #8fc95a; }
.js-btns--on-dark .js-btn--d-contour-nuit  { --js-btn-txt: #ffffff; --js-btn-border: #ffffff; --js-btn-bg-h: #ffffff; --js-btn-bg2-h: #ffffff; --js-btn-txt-h: #000101; }
.js-btns--on-dark .js-btn--d-contour-double{ --js-btn-txt: #c6ea9e; --js-btn-border: #8fc95a; --js-btn-shadow: 0 0 0 4px rgba(198,234,158, .14); }
.js-btns--on-dark .js-btn--d-souligne      { --js-btn-txt: #ffffff; --js-btn-txt-h: #c6ea9e; }
.js-btns--on-dark .js-btn--d-verre {
	--js-btn-bg: rgba(255, 255, 255, .13); --js-btn-bg2: rgba(255, 255, 255, .13);
	--js-btn-txt: #ffffff; --js-btn-border: rgba(255, 255, 255, .3);
	--js-btn-bg-h: rgba(255, 255, 255, .22); --js-btn-bg2-h: rgba(255, 255, 255, .22);
	--js-btn-txt-h: #ffffff; --js-btn-border-h: rgba(255, 255, 255, .45);
}
.js-btns--on-dark .js-btn--d-doux-vert { --js-btn-bg: rgba(123,176,66, .2); --js-btn-bg2: rgba(123,176,66, .2); --js-btn-txt: #d6efbf; }
.js-btns--on-dark .js-btn--d-doux-or   { --js-btn-bg: rgba(159,211,109, .16); --js-btn-bg2: rgba(159,211,109, .16); --js-btn-txt: #c6ea9e; }
.js-btns--on-dark .js-btn--d-blanc-pur { --js-btn-border: transparent; }
.js-btns--on-dark .js-btn--d-pastille-icone { --js-btn-bg: rgba(255, 255, 255, .1); --js-btn-bg2: rgba(255, 255, 255, .1); --js-btn-txt: #ffffff; --js-btn-border: rgba(255, 255, 255, .22); --js-btn-bg-h: rgba(255, 255, 255, .18); --js-btn-bg2-h: rgba(255, 255, 255, .18); --js-btn-txt-h: #ffffff; }

/* ---------- Effets au survol ---------- */
/* Remplissage par la gauche : la couche survol se déploie. */
.js-btns--fx-fill .js-btn::before { opacity: 1; transform: scaleX(0); transform-origin: 0 50%; }
.js-btns--fx-fill .js-btn:hover::before,
.js-btns--fx-fill .js-btn:focus-visible::before { transform: scaleX(1); }
.js-btns--fx-fill .js-btn--d-souligne::before,
.js-btns--fx-fill .js-btn--d-verre::before { display: none; }

/* Reflet balayant. */
.js-btns .js-btn::after {
	content: '';
	position: absolute;
	top: -20%;
	bottom: -20%;
	left: -80%;
	width: 45%;
	background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .38), transparent);
	transform: skewX(-18deg);
	pointer-events: none;
	opacity: 0;
}
.js-btns--fx-sheen .js-btn:hover::after,
.js-btns--fx-sheen .js-btn:focus-visible::after {
	opacity: 1;
	animation: js-btn-sheen .7s ease forwards;
}
@keyframes js-btn-sheen { to { left: 135%; } }
.js-btns--fx-sheen .js-btn--d-souligne::after { display: none; }

/* Élévation. */
.js-btns--fx-lift .js-btn:hover,
.js-btns--fx-lift .js-btn:focus-visible { transform: translateY(-3px); }
.js-btns--fx-lift .js-btn--d-relief:hover { transform: translateY(-2px); }

/* Icône qui avance. */
.js-btns .js-btn__icon { transition: transform .28s ease; }
.js-btns--fx-icon .js-btn:hover .js-btn__icon:last-child,
.js-btns--fx-icon .js-btn:focus-visible .js-btn__icon:last-child { transform: translateX(4px); }
.js-btns--fx-icon .js-btn:hover .js-btn__icon:first-child,
.js-btns--fx-icon .js-btn:focus-visible .js-btn__icon:first-child { transform: translateX(-4px); }

/* ---------- Icône seule — APRÈS les règles de structure (règle d'or). ---------- */
.js-btns .js-btn.js-btn--icon-only {
	padding: var(--js-btn-py) !important;
	aspect-ratio: 1 / 1;
	align-self: center;
	flex: 0 0 auto;
	width: auto;
}
.js-btns .js-btn.js-btn--icon-only .js-btn__icon { margin: 0 !important; width: 1.25em; height: 1.25em; }
.js-btns .js-btn.js-btn--icon-only.js-btn--d-capsule .js-btn__icon { background: transparent; padding: 0; align-self: center; }
.js-btns .js-btn.js-btn--icon-only.js-btn--d-capsule { --js-btn-bg: #4a7326; --js-btn-bg2: #4a7326; padding: var(--js-btn-py) !important; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.js-btns--mobile-full .js-btn { width: 100%; }
	.js-btns--mobile-full .js-btn.js-btn--icon-only { width: auto; }
	.js-btns .js-btn--s-s { --js-btn-fs: 15px; } /* jamais sous 15px en mobile */
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
	.js-btns .js-btn, .js-btns .js-btn::before, .js-btns .js-btn::after, .js-btns .js-btn__icon {
		transition: none !important;
		animation: none !important;
	}
}
