/**
 * Bloc contact et formulaires.
 *
 * Les champs sont stylés par classe utilitaire plutôt que par sélecteur de
 * balise : le jour où le formulaire de démonstration est remplacé par celui
 * d'une extension, il suffit de reporter la classe « ipd-champ » pour
 * retrouver l'habillage.
 */

/* ==========================================================================
   1. Carte de contact
   ========================================================================== */

.ipd-contact {
	overflow: hidden;
}

/* Le volet sombre doit remplir toute la hauteur de sa colonne. */
.ipd-contact__aside {
	display: flex;
	flex-direction: column;
}

.ipd-contact__aside .wp-block-social-links {
	margin-top: auto;
}

.ipd-contact__portrait img {
	width: 78px;
	height: 78px;
	border-radius: 999px;
	object-fit: cover;
	background: #2a2a2a;
}

/* --- Tableau de coordonnées ------------------------------------------------ */

.ipd-contact__coordonnees {
	background: rgba(234, 244, 252, 0.16);
	overflow: hidden;
}

.ipd-contact__ligne {
	background: var(--wp--preset--color--contrast);
}

.ipd-contact__icone {
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	border-radius: var(--wp--custom--rayon--sm);
	background: rgba(234, 244, 252, 0.1);
	color: var(--wp--preset--color--ciel);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ipd-contact__icone svg {
	width: 17px;
	height: 17px;
}

.ipd-contact__label {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #8b9aa8;
	margin: 0;
}

.ipd-contact__valeur {
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	color: var(--wp--preset--color--base);
	word-break: break-word;
	margin: 0;
}

.ipd-contact__valeur a {
	color: var(--wp--preset--color--base);
}

.ipd-contact__valeur a:hover,
.ipd-contact__valeur a:focus-visible {
	color: var(--wp--preset--color--ciel);
}

.ipd-contact__aside .wp-block-social-links .wp-social-link {
	width: 38px;
	height: 38px;
	background: rgba(234, 244, 252, 0.1);
	border-radius: var(--wp--custom--rayon--sm);
	color: var(--wp--preset--color--texte-clair);
}

.ipd-contact__aside .wp-block-social-links .wp-social-link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* ==========================================================================
   2. Étiquette « Réponse sous 24 h »
   ========================================================================== */

.ipd-etiquette--point {
	font-size: 11px;
	letter-spacing: 0.12em;
	padding: 6px 13px;
	gap: 9px;
}

.ipd-etiquette--point::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 99px;
	background: var(--wp--preset--color--primary);
	flex-shrink: 0;
}

/* ==========================================================================
   3. Formulaires
   ========================================================================== */

.ipd-formulaire {
	display: grid;
	gap: 16px;
	margin: 0;
}

.ipd-formulaire__duo {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
	gap: 16px;
}

.ipd-formulaire__duo--large {
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.ipd-formulaire__champ {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}

.ipd-formulaire__label {
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gris);
	padding: 0;
}

/* Le fond des champs du bloc contact est légèrement bleuté. */
.ipd-formulaire .ipd-champ {
	border-color: #dbe6f1;
	background: #fbfdff;
}

.ipd-formulaire .ipd-champ:focus {
	background: var(--wp--preset--color--base);
}

/* Champ téléphone avec indicatif accolé. */
.ipd-champ--prefixe {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px;
}

.ipd-champ--prefixe:focus-within {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--base);
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}

.ipd-champ__indicatif {
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--custom--texte--legende);
	flex-shrink: 0;
}

.ipd-champ--prefixe input {
	padding: 14px 0;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--base);
	width: 100%;
	min-width: 0;
	color: var(--wp--preset--color--contrast);
}

.ipd-champ--prefixe input:focus {
	outline: none;
}

/* --- Sélection de l'objet, en pilules -------------------------------------- */

.ipd-formulaire__objets {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.ipd-formulaire__pilules {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.ipd-pilule input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.ipd-pilule span {
	display: inline-block;
	padding: 10px 15px;
	border-radius: var(--wp--custom--rayon--pilule);
	border: 1px solid #dbe6f1;
	background: #fbfdff;
	color: var(--wp--custom--texte--fonce);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.ipd-pilule:hover span {
	border-color: var(--wp--preset--color--primary);
}

.ipd-pilule input:checked + span {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.ipd-pilule input:focus-visible + span {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* --- Consentements et envoi ------------------------------------------------ */

.ipd-formulaire .ipd-consentement {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--texte-bleute);
	gap: 11px;
	margin: 0;
}

.ipd-formulaire .ipd-consentement input {
	width: 17px;
	height: 17px;
	accent-color: var(--wp--preset--color--primary);
}

.ipd-formulaire__envoi,
.ipd-newsletter__envoi {
	padding: 17px 24px;
	border-radius: var(--wp--custom--rayon--lg);
	border: none;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--titre);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--lg);
	letter-spacing: -0.01em;
	cursor: pointer;
	width: 100%;
	transition: background-color 0.18s ease;
}

.ipd-formulaire__envoi:hover,
.ipd-newsletter__envoi:hover {
	background: var(--wp--preset--color--primary);
}

.ipd-formulaire__mention {
	margin: 0;
	font-size: var(--wp--preset--font-size--eyebrow);
	color: var(--wp--custom--texte--legende);
	text-align: center;
}

/* ==========================================================================
   4. Newsletter
   ========================================================================== */

.ipd-newsletter {
	display: grid;
	gap: 12px;
	margin: 0;
}

.ipd-newsletter p {
	margin: 0;
}

.ipd-newsletter__envoi {
	padding: 15px 20px;
	border-radius: var(--wp--custom--rayon--md);
	background: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--corps);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--base);
	letter-spacing: normal;
	line-height: normal;
}

.ipd-newsletter__envoi:hover {
	background: var(--wp--preset--color--primary-dark);
}

.ipd-newsletter__mention {
	font-size: var(--wp--preset--font-size--eyebrow);
	line-height: normal;
	color: var(--wp--custom--texte--legende);
}

/* L'étiquette « Réponse sous 24 h » est alignée à gauche dans ce volet. */
.ipd-etiquette-ligne--gauche {
	justify-content: flex-start;
}

/* Consentements : le label est le conteneur flex, comme dans la maquette. */
.ipd-formulaire label.ipd-consentement {
	display: flex;
	align-items: flex-start;
}

/*
 * Piège à robots des formulaires Brevo : le champ doit exister et rester vide.
 * Il sort du flux, du parcours au clavier et de la restitution vocale — mais
 * pas via `display: none`, que certains automates repèrent.
 */
.ipd-piege {
	position: absolute;
	left: -5000px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
