/*
 * Vide.Maison Boutons 1.3.0 : les boutons en étiquette de brocante.
 * Près de la pointe, un œillet cerclé de laiton : un vrai trou (masque), on voit la page à travers.
 * Autour du texte, une couture en pointillé (::after), comme un carton prédécoupé.
 * Trois sortes : principal (plein), secondaire (contour), icône. Plus l'action finale du dépôt.
 * Les !important l'emportent sur les styles des plugins et sur ceux du mode sombre.
 */

:root {
	--vmb-vert: #267a48;
	--vmb-vert-fonce: #1d5f38;
	--vmb-laiton: #c9a24a;
	--vmb-couture: rgba(255, 255, 255, 0.7);
	--vmb-contour: #267a48;
	--vmb-voile: rgba(38, 122, 72, 0.08);
}

html.vm-sombre {
	--vmb-vert: #2f9158;
	--vmb-vert-fonce: #267a48;
	--vmb-contour: #7fd1a0;
	--vmb-voile: rgba(127, 209, 160, 0.12);
}

/* Principal : pointe 22 px ; œillet de 16 px centré à 35 px (trou de 8 px) ; couture de 55 px à 5 px du bord. */
html body .vmj .vmj-bouton,
html body .vmd-departement .vmd-bouton,
html body .vmal-bouton,
html body .vman-modif-bouton:not(.awpcp-submit-listing-button),
html body .vmb-bouton.vmb-principal,
html body .wp-block-button__link,
html body .vman-rediger {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	box-sizing: border-box !important;
	min-height: 52px !important;
	height: auto !important;
	margin-left: 0;
	padding: 8px 23px 8px 67px !important;
	border: 0 !important;
	border-radius: 0 8px 8px 0 !important;
	background: radial-gradient(circle 8px at 35px 50%, transparent 3.5px, var(--vmb-laiton) 4px, var(--vmb-laiton) 7.5px, transparent 8px) no-repeat, var(--vmb-vert) !important;
	color: #ffffff !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	text-align: left !important;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
	clip-path: polygon(22px 0, 100% 0, 100% 100%, 22px 100%, 0 50%);
	-webkit-mask: radial-gradient(circle 4px at 35px 50%, transparent 3.5px, #000 4px);
	mask: radial-gradient(circle 4px at 35px 50%, transparent 3.5px, #000 4px);
	cursor: pointer;
}

html body .vmj .vmj-bouton::after,
html body .vmd-departement .vmd-bouton::after,
html body .vmal-bouton::after,
html body .vman-modif-bouton:not(.awpcp-submit-listing-button)::after,
html body .vmb-bouton.vmb-principal::after,
html body .wp-block-button__link::after,
html body .vman-rediger::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 5px;
	bottom: 5px;
	left: 55px;
	border: 1.5px dashed var(--vmb-couture);
	border-radius: 0 5px 5px 0;
	pointer-events: none;
}

html body .vmj .vmj-bouton:hover,
html body .vmd-departement .vmd-bouton:hover,
html body .vmal-bouton:hover,
html body .vman-modif-bouton:not(.awpcp-submit-listing-button):hover,
html body .vmb-bouton.vmb-principal:hover,
html body .wp-block-button__link:hover,
html body .vman-rediger:hover {
	background: radial-gradient(circle 8px at 35px 50%, transparent 3.5px, var(--vmb-laiton) 4px, var(--vmb-laiton) 7.5px, transparent 8px) no-repeat, var(--vmb-vert-fonce) !important;
	color: #ffffff !important;
}

/* Action finale du dépôt, plus grande : pointe 26 px ; œillet de 20 px centré à 41 px (trou de 10 px) ; couture de 65 px à 6 px du bord. */
html body .vman-modif-bouton.awpcp-submit-listing-button {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	box-sizing: border-box !important;
	min-height: 62px !important;
	height: auto !important;
	padding: 10px 32px 10px 79px !important;
	border: 0 !important;
	border-radius: 0 10px 10px 0 !important;
	background: radial-gradient(circle 10px at 41px 50%, transparent 4.5px, var(--vmb-laiton) 5px, var(--vmb-laiton) 9.5px, transparent 10px) no-repeat, var(--vmb-vert) !important;
	color: #ffffff !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	text-align: left !important;
	box-shadow: none !important;
	clip-path: polygon(26px 0, 100% 0, 100% 100%, 26px 100%, 0 50%);
	-webkit-mask: radial-gradient(circle 5px at 41px 50%, transparent 4.5px, #000 5px);
	mask: radial-gradient(circle 5px at 41px 50%, transparent 4.5px, #000 5px);
	cursor: pointer;
}

html body .vman-modif-bouton.awpcp-submit-listing-button::after {
	content: "";
	position: absolute;
	top: 6px;
	right: 6px;
	bottom: 6px;
	left: 65px;
	border: 1.5px dashed var(--vmb-couture);
	border-radius: 0 6px 6px 0;
	pointer-events: none;
}

html body .vman-modif-bouton.awpcp-submit-listing-button:hover {
	background: radial-gradient(circle 10px at 41px 50%, transparent 4.5px, var(--vmb-laiton) 5px, var(--vmb-laiton) 9.5px, transparent 10px) no-repeat, var(--vmb-vert-fonce) !important;
}

/*
 * Le contour des deux pentes de la pointe : la découpe (clip-path) mange le box-shadow sur les biais,
 * on redessine donc chaque pente par un dégradé posé sur sa diagonale. Le trait fait 4 px centré sur la
 * découpe, dont 2 px restent visibles : la même épaisseur que le reste du contour.
 */
html body .vmj .vmj-lien,
html body .vman-ecouter,
html body .vman-redaction-retour,
html body button.vmt-ajout,
html body .vmb-bouton.vmb-secondaire,
html body .vman-camera-bouton,
html body .vm-noter a,
html body .vman-trouver-bouton {
	--vmb-pointe-haut: linear-gradient(to bottom right, transparent calc(50% - 2.5px), var(--vmb-contour) calc(50% - 2px), var(--vmb-contour) calc(50% + 2px), transparent calc(50% + 2.5px));
	--vmb-pointe-bas: linear-gradient(to top right, transparent calc(50% - 2.5px), var(--vmb-contour) calc(50% - 2px), var(--vmb-contour) calc(50% + 2px), transparent calc(50% + 2.5px));
}

/* Secondaire : contour 2 px, pointe 20 px ;œillet de 14 px centré à 32 px (trou de 8 px) ; couture de 49 px à 6 px du bord. */
html body .vmj .vmj-lien,
html body .vman-ecouter,
html body .vman-redaction-retour,
html body button.vmt-ajout,
html body .vmb-bouton.vmb-secondaire,
html body .vman-camera-bouton,
html body .vm-noter a,
html body .vman-trouver-bouton {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	box-sizing: border-box !important;
	min-height: 48px !important;
	height: auto !important;
	padding: 8px 22px 8px 59px !important;
	border: 0 !important;
	border-radius: 0 8px 8px 0 !important;
	background: radial-gradient(circle 7px at 32px 50%, transparent 3.5px, var(--vmb-laiton) 4px, var(--vmb-laiton) 6.5px, transparent 7px) no-repeat, var(--vmb-pointe-haut) left top / 20px 50% no-repeat, var(--vmb-pointe-bas) left bottom / 20px 50% no-repeat, transparent !important;
	box-shadow: inset 0 0 0 2px var(--vmb-contour) !important;
	color: var(--vmb-contour) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	text-align: left !important;
	text-decoration: none !important;
	clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 50%);
	-webkit-mask: radial-gradient(circle 4px at 32px 50%, transparent 3.5px, #000 4px);
	mask: radial-gradient(circle 4px at 32px 50%, transparent 3.5px, #000 4px);
	cursor: pointer;
}

html body .vmj .vmj-lien::after,
html body .vman-ecouter::after,
html body .vman-redaction-retour::after,
html body button.vmt-ajout::after,
html body .vmb-bouton.vmb-secondaire::after,
html body .vman-camera-bouton::after,
html body .vm-noter a::after,
html body .vman-trouver-bouton::after {
	content: "";
	position: absolute;
	top: 6px;
	right: 6px;
	bottom: 6px;
	left: 49px;
	border: 1.5px dashed var(--vmb-contour);
	border-radius: 0 4px 4px 0;
	pointer-events: none;
}

html body .vmj .vmj-lien:hover,
html body .vman-ecouter:hover,
html body .vman-redaction-retour:hover,
html body button.vmt-ajout:hover,
html body .vmb-bouton.vmb-secondaire:hover,
html body .vman-camera-bouton:hover,
html body .vm-noter a:hover,
html body .vman-trouver-bouton:hover {
	background: radial-gradient(circle 7px at 32px 50%, transparent 3.5px, var(--vmb-laiton) 4px, var(--vmb-laiton) 6.5px, transparent 7px) no-repeat, var(--vmb-pointe-haut) left top / 20px 50% no-repeat, var(--vmb-pointe-bas) left bottom / 20px 50% no-repeat, var(--vmb-voile) !important;
	color: var(--vmb-contour) !important;
}

/* « Dans ma tournée » : la même étiquette, remplie, couture blanche. */
html body button.vmt-ajout.vmt-dedans,
html body button.vmt-ajout.vmt-dedans:hover {
	background: radial-gradient(circle 7px at 32px 50%, transparent 3.5px, var(--vmb-laiton) 4px, var(--vmb-laiton) 6.5px, transparent 7px) no-repeat, var(--vmb-vert) !important;
	box-shadow: none !important;
	color: #ffffff !important;
}

html body button.vmt-ajout.vmt-dedans::after {
	border-color: var(--vmb-couture);
}

/*
 * « Parcourir » / « Sélect. fichiers » : le bouton natif du champ photos, en secondaire.
 * Un pseudo-élément n'a pas de ::after : la couture y est tracée par quatre dégradés pointillés.
 */
html body input#vman-photos::file-selector-button {
	--vmb-pointe-haut: linear-gradient(to bottom right, transparent calc(50% - 2.5px), var(--vmb-contour) calc(50% - 2px), var(--vmb-contour) calc(50% + 2px), transparent calc(50% + 2.5px));
	--vmb-pointe-bas: linear-gradient(to top right, transparent calc(50% - 2.5px), var(--vmb-contour) calc(50% - 2px), var(--vmb-contour) calc(50% + 2px), transparent calc(50% + 2.5px));
	--vmb-pointille-h: repeating-linear-gradient(to right, var(--vmb-contour) 0 5px, transparent 5px 9px);
	--vmb-pointille-v: repeating-linear-gradient(to bottom, var(--vmb-contour) 0 5px, transparent 5px 9px);
	box-sizing: border-box;
	min-height: 48px;
	margin-right: 12px;
	padding: 8px 22px 8px 59px;
	border: 0;
	border-radius: 0 8px 8px 0;
	background:
		radial-gradient(circle 7px at 32px 50%, transparent 3.5px, var(--vmb-laiton) 4px, var(--vmb-laiton) 6.5px, transparent 7px) no-repeat,
		var(--vmb-pointille-h) 49px 6px / calc(100% - 55px) 1.5px no-repeat,
		var(--vmb-pointille-h) 49px calc(100% - 6px) / calc(100% - 55px) 1.5px no-repeat,
		var(--vmb-pointille-v) 49px 6px / 1.5px calc(100% - 12px) no-repeat,
		var(--vmb-pointille-v) calc(100% - 6px) 6px / 1.5px calc(100% - 12px) no-repeat,
		var(--vmb-pointe-haut) left top / 20px 50% no-repeat,
		var(--vmb-pointe-bas) left bottom / 20px 50% no-repeat,
		transparent;
	box-shadow: inset 0 0 0 2px var(--vmb-contour);
	color: var(--vmb-contour);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 50%);
	cursor: pointer;
}

html body input#vman-photos:hover::file-selector-button {
	background-color: var(--vmb-voile);
}

/* Icône : petite étiquette pleine, sans favicon (le pictogramme suffit). */
html body .site-header button.vms-bouton,
html body .vman-dictee {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	width: 56px !important;
	height: 46px !important;
	min-width: 56px !important;
	padding: 0 0 0 12px !important;
	border: 0 !important;
	border-radius: 0 8px 8px 0 !important;
	background: var(--vmb-vert) !important;
	color: #ffffff !important;
	box-shadow: none !important;
	clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%);
	cursor: pointer;
}

html body .site-header button.vms-bouton:hover,
html body .vman-dictee:hover {
	background: var(--vmb-vert-fonce) !important;
	color: #ffffff !important;
}

html body .site-header button.vms-bouton svg,
html body .vman-dictee svg {
	color: #ffffff;
	stroke: currentColor;
}

/* Dictée en cours d'écoute : rouge, pour qu'on voie que le micro est ouvert. */
html body .vman-dictee.vman-ecoute,
html body .vman-dictee.vman-ecoute:hover {
	background: #b3261e !important;
}

/* Clavier : un anneau blanc à l'intérieur, la découpe empêchant tout contour extérieur. */
html body .vmj .vmj-bouton:focus-visible,
html body .vmd-departement .vmd-bouton:focus-visible,
html body .vmal-bouton:focus-visible,
html body .vman-modif-bouton:focus-visible,
html body .vmb-bouton.vmb-principal:focus-visible,
html body .wp-block-button__link:focus-visible,
html body .vman-rediger:focus-visible,
html body .site-header button.vms-bouton:focus-visible,
html body .vman-dictee:focus-visible {
	outline: none !important;
	box-shadow: inset 0 0 0 3px #ffffff, inset 0 0 0 5px var(--vmb-vert-fonce) !important;
}

html body .vmj .vmj-lien:focus-visible,
html body .vman-ecouter:focus-visible,
html body .vman-redaction-retour:focus-visible,
html body button.vmt-ajout:focus-visible,
html body .vmb-bouton.vmb-secondaire:focus-visible,
html body .vman-camera-bouton:focus-visible,
html body .vm-noter a:focus-visible,
html body .vman-trouver-bouton:focus-visible {
	outline: none !important;
	box-shadow: inset 0 0 0 4px var(--vmb-contour) !important;
}

/* En attente (envoi en cours) : la même étiquette, atténuée. */
html body .vmj .vmj-bouton:disabled,
html body .vmal-bouton:disabled,
html body .vman-modif-bouton:disabled,
html body .vmb-bouton.vmb-principal:disabled,
html body .wp-block-button__link:disabled,
html body .vman-rediger:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* « Revenir à ma liste » (vm-annonces, redaction.js) reste caché tant qu'aucun texte n'a été rédigé. */
html body .vman-redaction-retour[hidden] {
	display: none !important;
}
