/*
 * Source Oméga : demande de prix.
 *
 * Les boutons reprennent le style du bouton « Ajouter au panier » des fiches produits :
 * couleur primaire et police d'accent d'Elementor (elles suivent donc les réglages globaux du site),
 * coins arrondis, 44 px de haut, couleurs inversées au survol.
 * Pour ajuster, modifier les trois variables ci-dessous.
 */

button.soddp-btn.button,
a.soddp-btn.button {
	--soddp-couleur: var(--e-global-color-primary, #0024ce);
	--soddp-couleur-texte: #fff;
	--soddp-rayon: 35px;

	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	float: none;
	width: auto;
	min-width: 0;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 6px 24px;
	font-family: var(--e-global-typography-accent-font-family, "DM Sans"), sans-serif;
	font-size: 17px;
	font-style: normal;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: normal;
	color: var(--soddp-couleur-texte);
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	background: var(--soddp-couleur);
	border: 2px solid var(--soddp-couleur);
	border-radius: var(--soddp-rayon);
	box-shadow: none;
	transition: all 0.3s ease-out;
	-webkit-appearance: none;
	appearance: none;
}

/* États imposés face au thème : sans survol réel, le bouton garde ses couleurs (pas de survol « collé » sur mobile). */
button.soddp-btn.button:hover,
button.soddp-btn.button:focus,
button.soddp-btn.button:active,
a.soddp-btn.button:hover,
a.soddp-btn.button:focus,
a.soddp-btn.button:active {
	color: var(--soddp-couleur-texte);
	text-decoration: none;
	background: var(--soddp-couleur);
	border-color: var(--soddp-couleur);
	box-shadow: none;
}

/* Survol à la souris : couleurs inversées, comme le bouton « Ajouter au panier ». */
@media (hover: hover) {
	button.soddp-btn.button:hover,
	a.soddp-btn.button:hover {
		color: var(--soddp-couleur);
		background: var(--soddp-couleur-texte);
	}
}

/* Navigation au clavier : contour visible. */
button.soddp-btn.button:focus-visible,
a.soddp-btn.button:focus-visible {
	outline: 2px solid var(--soddp-couleur);
	outline-offset: 2px;
}

button.soddp-btn.button[disabled] {
	cursor: progress;
	opacity: 0.7;
}

@media (max-width: 1024px) {
	button.soddp-btn.button,
	a.soddp-btn.button {
		font-size: 16px;
	}
}

/* Dans les listes de produits (UAEL) : le bouton garde le style du gabarit, on ajuste seulement le retour à la ligne. */
.uael-woo-add-to-cart .soddp-bouton {
	max-width: 100%;
	text-align: center;
	white-space: normal;
	cursor: pointer;
}

html.soddp-ouvert {
	overflow: hidden;
}

.soddp-zone-bouton {
	display: block;
	margin: 1em 0;
}

/* Dans un widget Elementor, c'est le gabarit qui gère les espacements. */
.elementor-widget-container > .soddp-zone-bouton {
	margin: 0;
}

/* ----- Fenêtre ----- */

/*
 * Centrage explicite : plusieurs thèmes (dont The7) remettent toutes les marges à zéro
 * avec « * { margin: 0 } », ce qui annule le centrage par défaut de la balise dialog.
 */
dialog.soddp-fenetre {
	position: fixed;
	inset: 0;
	box-sizing: border-box;
	width: min(92vw, 560px);
	max-width: 560px;
	height: fit-content;
	max-height: min(92vh, 92dvh);
	margin: auto;
	padding: 0;
	overflow: auto;
	/* Police du site (Elementor). Sans Elementor, la variable est absente et la police du thème est héritée. */
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	color: #1d1d1d;
	text-align: left;
	background: #fff;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

dialog.soddp-fenetre::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

dialog.soddp-fenetre:not([open]) {
	display: none;
}

/* Repli pour les navigateurs sans <dialog> : la fenêtre passe au-dessus du reste. */
dialog.soddp-fenetre[open] {
	z-index: 100000;
}

.soddp-fenetre *,
.soddp-fenetre *::before,
.soddp-fenetre *::after {
	box-sizing: border-box;
}

.soddp-fenetre .soddp-formulaire,
.soddp-fenetre .soddp-succes {
	position: relative;
	display: block;
	margin: 0;
	padding: 24px 28px 24px;
}

.soddp-fenetre [hidden] {
	display: none !important;
}

.soddp-fenetre button.soddp-fermer {
	position: absolute;
	top: 8px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-width: 0;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	color: #444;
	cursor: pointer;
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
}

.soddp-fenetre button.soddp-fermer:hover,
.soddp-fenetre button.soddp-fermer:focus-visible {
	color: #000;
	background: #f0f0f0;
}

.soddp-fenetre .soddp-titre {
	margin: 0 44px 8px 0;
	padding: 0;
	font-family: var(--e-global-typography-accent-font-family), sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: #1d1d1d;
	text-align: left;
	text-transform: none;
}

.soddp-fenetre .soddp-produit {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.4;
	color: #1d1d1d;
}

.soddp-fenetre .soddp-intro {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #555;
}

.soddp-fenetre .soddp-grille {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 16px;
}

.soddp-fenetre .soddp-champ {
	margin: 0;
	padding: 0;
}

/* Rangées : Prénom | Nom, Courriel, Téléphone | Poste, Entreprise, Message. */
.soddp-fenetre .soddp-champ-courriel,
.soddp-fenetre .soddp-champ-entreprise,
.soddp-fenetre .soddp-champ-message {
	grid-column: 1 / -1;
}

.soddp-fenetre .soddp-champ label {
	display: block;
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #1d1d1d;
}

.soddp-fenetre .soddp-asterisque {
	color: #b3261e;
}

/* Sélecteurs volontairement précis : ils doivent passer devant les règles de formulaire du thème. */
dialog.soddp-fenetre .soddp-grille .soddp-champ input,
dialog.soddp-fenetre .soddp-grille .soddp-champ textarea {
	display: block;
	width: 100%;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: #1d1d1d;
	background: #fff;
	border: 1px solid #8c8c8c;
	border-radius: 8px;
	box-shadow: none;
}

dialog.soddp-fenetre .soddp-grille .soddp-champ textarea {
	min-height: 88px;
	resize: vertical;
}

dialog.soddp-fenetre .soddp-grille .soddp-champ input:focus,
dialog.soddp-fenetre .soddp-grille .soddp-champ textarea:focus {
	border-color: var(--e-global-color-primary, #0024ce);
	outline: 2px solid var(--e-global-color-primary, #0024ce);
	outline-offset: 1px;
}

dialog.soddp-fenetre .soddp-grille .soddp-champ [aria-invalid="true"] {
	border-color: #b3261e;
	box-shadow: 0 0 0 1px #b3261e;
}

/* Pot de miel : hors écran pour les personnes, visible pour les robots. */
.soddp-fenetre .soddp-piege {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.soddp-fenetre .soddp-note {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #555;
}

.soddp-fenetre .soddp-message {
	margin: 14px 0 0;
	padding: 10px 12px;
	font-size: 15px;
	line-height: 1.4;
	color: #7a1712;
	background: #fdecea;
	border-left: 4px solid #b3261e;
	border-radius: 4px;
}

.soddp-fenetre .soddp-actions {
	margin: 16px 0 0;
}

.soddp-fenetre .soddp-succes:focus {
	outline: none;
}

.soddp-fenetre .soddp-succes-texte {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: #1d1d1d;
}

@media (max-width: 520px) {
	.soddp-fenetre .soddp-formulaire,
	.soddp-fenetre .soddp-succes {
		padding: 22px 18px 18px;
	}

	.soddp-fenetre .soddp-grille {
		grid-template-columns: 1fr;
	}
}
