/* =====================================================================
   ERC — surcharges du thème enfant (chargées après style-custom.css)
   Vague du 23 octobre 2026 : ergonomie, accessibilité, performance perçue
   ===================================================================== */

:root {
	--erc-red: #d53535;
	--erc-red-dark: #b52a2a;
	--erc-text: #4d4d4d;
	--erc-text-light: #6b6b6b;
	--erc-doctolib: #0596de;
}

/* ---------- Accessibilité : lien d'évitement, focus visible, zoom autorisé ---------- */

.erc-skip-link {
	position: absolute;
	left: -999em;
	top: 0;
	z-index: 100000;
	padding: 0.75em 1.25em;
	background: var(--erc-red);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.erc-skip-link:focus {
	left: 1em;
	top: 1em;
	outline: 3px solid #fff;
	outline-offset: 2px;
}
.erc-skip-target {
	display: block;
	height: 0;
	outline: none;
}

.erc a:focus-visible,
.erc button:focus-visible,
.erc input:focus-visible,
.erc textarea:focus-visible,
.erc [tabindex]:focus-visible {
	outline: 3px solid var(--erc-red);
	outline-offset: 2px;
}

/* Bandeau du haut : contraste suffisant (l'ancien gris #a3a3a3 était illisible) */
.erc .header-intro-text {
	color: var(--erc-text-light);
	font-size: 12px;
}
.erc .header-intro-text a.erc-tel,
.erc .content a.erc-tel {
	color: var(--erc-red);
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	border-bottom: 1px solid rgba(213, 53, 53, 0.35);
}
.erc .header-intro-text a.erc-tel:hover,
.erc .content a.erc-tel:hover {
	border-bottom-color: var(--erc-red);
}

/* Animations d'apparition : respect de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.erc .omsc-animation,
	.erc .omsc-animation * {
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		animation: none !important;
		transition: none !important;
	}
	.erc .ls-wp-container,
	.erc .ls-wp-container * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ---------- Bouton Doctolib flottant ---------- */

.erc-doctolib {
	position: fixed;
	right: 16px;
	bottom: 0;
	z-index: 1000;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border-radius: 6px 6px 0 0;
	background: var(--erc-doctolib);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 44px;
	text-decoration: none;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, background-color 0.15s ease;
}
.erc-doctolib:hover,
.erc-doctolib:focus-visible {
	background: #0479b4;
	transform: translateY(-2px);
	color: #fff !important;
	outline-color: #fff;
}
.erc-doctolib img {
	height: 16px;
	width: auto;
	display: block;
}
.erc-doctolib .erc-doctolib-short {
	display: none;
}

/* ---------- Grille des motifs de consultation (page Pathologies) : titres toujours visibles ---------- */

.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb .ompf-desc-wrapper {
	position: static;
	opacity: 1;
	background: #fff;
	color: #666;
	transition: none;
}
.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb .ompf-desc {
	padding: 0.9em 1em 1em;
	text-align: left;
}
.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb .ompf-title {
	display: block;
	font-size: 1.1em;
	font-weight: 600;
	color: var(--erc-text);
	margin-bottom: 0.25em;
}
.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb .ompf-text {
	display: block;
	font-size: 0.95em;
	color: #777;
}
.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb a:hover .ompf-title {
	color: var(--erc-red);
}
.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb {
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
/* Le masonry Isotope recalculera la hauteur, mais on sécurise la pile */
.erc .ompf-preview-layout-full-hover .ompf-portfolio-thumb a {
	display: block;
	position: relative;
}

/* ---------- Carte Google Maps à la demande ---------- */

.erc-map {
	margin: 1em auto;
	padding: 1.25em 1.5em;
	border: 1px dashed #c9c9c9;
	border-radius: 6px;
	background: #fafafa;
	text-align: left;
}
.erc-map-address {
	font-weight: 600;
	color: var(--erc-text);
	margin: 0 0 0.35em;
}
.erc-map-address .fa {
	color: var(--erc-red);
	margin-right: 0.35em;
}
.erc-map-note {
	font-size: 0.9em;
	color: #888;
	margin: 0 0 0.9em;
}
.erc-map-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em 1.25em;
	margin: 0;
}
.erc-map-load {
	cursor: pointer;
	border: 2px solid var(--erc-red);
	background: var(--erc-red);
	color: #fff;
	font: inherit;
	font-weight: 600;
	padding: 0.6em 1.2em;
	border-radius: 4px;
	min-height: 44px;
}
.erc-map-load:hover {
	background: var(--erc-red-dark);
	border-color: var(--erc-red-dark);
}
.erc .content .erc-map-open {
	color: var(--erc-text);
	text-decoration: underline;
}
.erc-map.erc-map-loaded {
	padding: 0;
	border: 0;
	background: none;
	aspect-ratio: 16 / 9;
	max-height: 420px;
}
.erc-map.erc-map-loaded iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 6px;
}

/* ---------- Confort de lecture ---------- */

.erc .content p,
.erc .content li {
	max-width: 70ch;
}
.erc .content .omsc-one-third p,
.erc .content .omsc-one-fourth p,
.erc .content .omsc-one-half p,
.erc .content .omsc-recent-posts p,
.erc .content .erc-map p,
.erc .content [style*="text-align: center"] p {
	max-width: none;
}

/* Boutons : zone de clic confortable (44 px) */
.erc .omsc-button {
	min-height: 44px;
	line-height: 1.3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Mobile ---------- */

@media only screen and (max-width: 767px) {
	body.erc {
		padding-bottom: 52px; /* place pour la barre Doctolib */
	}
	.erc-doctolib {
		left: 0;
		right: 0;
		border-radius: 0;
		justify-content: center;
		height: 52px;
		line-height: 52px;
		font-size: 15px;
	}
	.erc-doctolib:hover,
	.erc-doctolib:focus-visible {
		transform: none;
	}
	.erc-doctolib .erc-doctolib-long {
		display: none;
	}
	.erc-doctolib .erc-doctolib-short {
		display: inline;
	}
	.erc .header-intro-text {
		font-size: 13px;
		line-height: 1.5;
		padding: 0 1em;
	}
	.erc .mobile-header-menu-control {
		min-height: 44px;
		line-height: 44px;
	}
	.erc .header-menu-mobile a {
		display: block;
		padding-top: 0.6em;
		padding-bottom: 0.6em;
	}
	.erc .ls-wp-container .ls-l {
		font-size: 90% !important;
	}
}
