/**
 * Formulaires partagés (contact + devis) — composant utilisé par les deux
 * sites du réseau (Ebrioo, Ebrioo Digit) via les blocs ebrioo/contact-form
 * et ebrioo/devis-form (voir class-formdev-forms.php). Palette pilotée par
 * les variables --ebf-* définies sur .ebrioo-form-wrap : valeurs par défaut
 * ici (charte Ebrioo), surchargées par forms-digit.css sur le site Digit —
 * même principe que --eb2-* dans formations.css/formations-digit.css.
 */
.ebrioo-form-wrap {
	--ebf-accent: #E5239C;      /* Rose Magenta — requis (*), case de consentement */
	--ebf-focus: #46B5AA;       /* Turquoise — focus des champs, liens RGPD, légendes */
	--ebf-focus-shadow: rgba(70, 181, 170, .22);
	--ebf-muted: #829696;       /* Gris vert — texte secondaire */
	--ebf-submit-bg: #501E96;   /* Violet — bouton d'envoi */
	--ebf-submit-shadow: rgba(80, 30, 150, .22);
}

.ebrioo-form {
	background: #fff;
	border-radius: 18px;
	padding: 2rem 2rem 1.75rem;
	box-shadow: 0 14px 38px rgba(50, 53, 50, .10);
}
.ebrioo-form__section { border: 0; margin: 0 0 1.5rem; padding: 0; }
.ebrioo-form__section legend {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700; font-size: 1.05rem;
	color: var(--eb-gris-fonce, #323532);
	padding: 0 0 .35rem; margin-bottom: .85rem;
	width: 100%; border-bottom: 2px solid var(--ebf-focus);
}
.ebrioo-form__grid {
	display: grid; grid-template-columns: 1fr 1fr;
	gap: 1.35rem 1.5rem;
	align-items: start;
}
.ebrioo-field { margin: 0; display: flex; flex-direction: column; }
.ebrioo-field--file, .ebrioo-form__section .ebrioo-field:only-child { grid-column: 1 / -1; }
.ebrioo-field label {
	font-size: .9rem; font-weight: 600; color: #3a3d3a; margin-bottom: .4rem;
	min-height: 1.25em; line-height: 1.25;
}
.ebrioo-req { color: var(--ebf-accent); }
.ebrioo-opt { color: var(--ebf-muted); font-weight: 400; }
.ebrioo-form input[type="text"],
.ebrioo-form input[type="email"],
.ebrioo-form input[type="tel"],
.ebrioo-form select,
.ebrioo-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: .7rem .85rem;
	border: 1px solid #d4d8d9;
	border-radius: 10px;
	font: inherit; line-height: 1.4; color: #222; background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
/* Hauteur identique input / select (le navigateur rend le select différemment) */
.ebrioo-form input[type="text"],
.ebrioo-form input[type="email"],
.ebrioo-form input[type="tel"],
.ebrioo-form select { height: 2.95rem; }
.ebrioo-form textarea { resize: vertical; min-height: 140px; height: auto; }
.ebrioo-form input:focus,
.ebrioo-form select:focus,
.ebrioo-form textarea:focus {
	outline: 0;
	border-color: var(--ebf-focus);
	box-shadow: 0 0 0 3px var(--ebf-focus-shadow);
}
.ebrioo-form input:user-invalid,
.ebrioo-form textarea:user-invalid {
	border-color: #e0526a; box-shadow: 0 0 0 3px rgba(224, 82, 106, .18);
}
.ebrioo-field--file input[type="file"] {
	width: 100%; padding: .55rem; border: 1px dashed #c3c8cc; border-radius: 10px;
	background: #fafbfc; font-size: .9rem;
}
/* Honeypot : hors écran, jamais affiché à l'humain */
.ebrioo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Menus en cours de chargement / désactivés (catalogue dynamique du devis) */
.ebrioo-form select:disabled { background: #f6f7f8; color: #8b9094; cursor: progress; }
/* Message d'état sous les menus catégorie/formation */
.ebrioo-field-msg { margin: .6rem 0 0; font-size: .85rem; color: var(--ebf-muted); min-height: 1px; }
.ebrioo-field-msg.is-error { color: #b3304b; }
.ebrioo-field-msg:empty { margin: 0; }

.ebrioo-form__consent { margin: .5rem 0 1rem; }
.ebrioo-form__consent label { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.ebrioo-form__consent input { margin-top: .2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ebf-accent); }
.ebrioo-form__rgpd { font-size: .78rem; line-height: 1.5; color: var(--ebf-muted); margin: 0 0 1.25rem; }
.ebrioo-form__rgpd a { color: var(--ebf-focus); }

.ebrioo-form__submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ebrioo-btn-submit {
	border: 0; cursor: pointer;
	background: var(--ebf-submit-bg); color: #fff;
	font-family: var(--wp--preset--font-family--heading, inherit); font-weight: 700; font-size: 1.02rem;
	padding: .85rem 2rem; border-radius: 10px;
	box-shadow: 0 6px 18px var(--ebf-submit-shadow);
	transition: filter .2s ease, transform .15s ease;
}
.ebrioo-btn-submit:hover { filter: brightness(.93); transform: translateY(-1px); }
.ebrioo-form__micro { font-size: .85rem; color: var(--ebf-muted); }
.ebrioo-form__shield { margin: 1.1rem 0 0; font-size: .8rem; color: var(--ebf-muted); }

.ebrioo-form__notice { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; font-size: .95rem; }
.ebrioo-form__notice--ok { background: #e6f7f3; color: #11614f; border: 1px solid #9fe0d2; }
.ebrioo-form__notice--error { background: #fdecef; color: #8a1f3a; border: 1px solid #f3c0cb; }

@media (max-width: 781px) {
	.ebrioo-form__grid { grid-template-columns: 1fr; }
	.ebrioo-form { padding: 1.5rem 1.25rem; }
}
