/**
 * Buttons and tables inside article content.
 *
 * The posts carry three generations of buttons: Gutenberg, Elementor and
 * Ultimate Addons. They are restyled here instead of being edited one by one,
 * so no published content has to be touched.
 */

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.af .af-body .wp-block-button__link,
.af .af-body .wp-element-button,
.af .af-body .elementor-button,
.af .af-body .uagb-buttons-repeater,
.af .af-body a.af-btn-contenu {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 54px;
	padding: 15px 30px !important;
	border: 0 !important;
	border-radius: var(--af-r-pill) !important;
	background: var(--af-accent) !important;
	background-image: none !important;
	box-shadow: 0 14px 30px -14px rgba(224, 174, 0, 0.9);
	font-family: var(--af-texte) !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.005em;
	text-align: center;
	text-decoration: none !important;
	text-transform: none !important;
	color: var(--af-navy) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.af .af-body .wp-block-button__link:hover,
.af .af-body .wp-element-button:hover,
.af .af-body .elementor-button:hover,
.af .af-body .uagb-buttons-repeater:hover,
.af .af-body a.af-btn-contenu:hover,
.af .af-body .wp-block-button__link:focus-visible,
.af .af-body .elementor-button:focus-visible,
.af .af-body .uagb-buttons-repeater:focus-visible {
	transform: translateY(-2px);
	background: var(--af-accent-fonce) !important;
	box-shadow: 0 20px 38px -16px rgba(224, 174, 0, 1);
	color: var(--af-navy) !important;
}

/* Les styles de couleur du thème d'origine, qui gagneraient autrement. */
.af .af-body .has-luminous-vivid-orange-background-color,
.af .af-body .has-vivid-red-background-color,
.af .af-body .has-white-color {
	background-color: var(--af-accent) !important;
	color: var(--af-navy) !important;
}

/* Variante sobre, pour un lien interne qui ne doit pas voler la vedette au
   bouton partenaire de la même page. */
.af .af-body .is-style-outline .wp-block-button__link,
.af .af-body a.af-btn-contenu--sobre {
	background: transparent !important;
	box-shadow: none;
	border: 2px solid var(--af-navy) !important;
	color: var(--af-navy) !important;
}

.af .af-body .is-style-outline .wp-block-button__link:hover,
.af .af-body a.af-btn-contenu--sobre:hover {
	background: var(--af-navy) !important;
	color: #ffffff !important;
	box-shadow: none;
}

/* Le texte interne des boutons Elementor porte ses propres règles. */
.af .af-body .elementor-button .elementor-button-text,
.af .af-body .elementor-button .elementor-button-content-wrapper {
	color: inherit !important;
	font-weight: inherit !important;
}

/* Un appel à l'action se centre : posé à gauche, il se confond avec le texte. */
.af .af-body .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin: 36px 0;
}

.af .af-body .wp-block-button { margin: 0; }

@media (max-width: 575px) {
	.af .af-body .wp-block-button,
	.af .af-body .wp-block-button__link,
	.af .af-body .elementor-button {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Tableaux dans le contenu
   -------------------------------------------------------------------------- */

.af .af-body table {
	width: 100%;
	margin: 32px 0;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--af-border);
	border-radius: var(--af-r-lg);
	overflow: hidden;
	font-size: 16px;
	background: var(--af-surface);
}

.af .af-body thead th {
	padding: 15px 18px;
	background: var(--af-navy);
	font-family: var(--af-titre);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-align: left;
	color: #ffffff;
	border: 0;
}

.af .af-body tbody td,
.af .af-body tbody th {
	padding: 14px 18px;
	border: 0;
	border-top: 1px solid var(--af-border-soft);
	line-height: 1.55;
	color: var(--af-text-soft);
	vertical-align: top;
}

.af .af-body tbody th { font-weight: 700; color: var(--af-navy); }

.af .af-body tbody tr:nth-child(even) { background: #fafbfd; }

.af .af-body .wp-block-table { overflow-x: auto; }

.af .af-body figure.wp-block-table table { margin: 0; }
