/*
 * BMD · Fiche de cours MEC
 *
 * Mise en page des fiches de session. Part du gabarit Elementor « Détail du
 * cours » (mec_esb 35376) de l'ancien addon Elementor Single Builder for MEC,
 * retouché pour la lecture le 27.10.2026 : titre resserré, date et tarif en
 * bandeau, horaires en liste alignée, horaires et réservation dans une seule
 * carte, colonnes qui ne s'étirent plus.
 *
 * Couleurs et polices passent par les variables globales du kit Elementor du
 * site (28835), avec en secours les valeurs relevées le 26.10.2026. Points de
 * rupture du kit : 1330 px et 855 px.
 */

.mec-wrap.bmd-fiche {
	--bmd-bleu: var(--e-global-color-primary, #004eff);
	--bmd-vert: var(--e-global-color-secondary, #caf6d4);
	--bmd-texte: var(--e-global-color-text, #495a59);
	--bmd-blanc: var(--e-global-color-accent, #fff);
	--bmd-bord: #e8ebed;
	--bmd-police-titre: var(--e-global-typography-8b6f6bf-font-family, "Scandium"), sans-serif;
	--bmd-police: var(--e-global-typography-8c4f7e3-font-family, "Scandium"), sans-serif;
	--bmd-largeur: 1140px;
	--bmd-icone: 70px;
}

/* La fiche occupe toute la largeur, comme avec l'ancien addon. Sans cette
   règle, MEC fixe son conteneur à 300, 420, 768 ou 960 px selon l'écran. */
body.single-mec-events .mec-container {
	width: auto !important;
}

/* Bandeau
   -------------------------------------------------------------------------- */

.mec-wrap.bmd-fiche .bmd-fiche__hero {
	position: relative;
	min-height: 540px;
	background: url("/wp-content/uploads/2024/02/Auto-ecole-pas-cher-L-Performance-Geneve.webp") center top / cover no-repeat;
}

.mec-wrap.bmd-fiche .bmd-fiche__hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("/wp-content/uploads/2024/01/Header_icon2.svg") left bottom / 60% auto no-repeat;
	pointer-events: none;
}

.mec-wrap.bmd-fiche .bmd-fiche__hero-titre {
	position: absolute;
	z-index: 1;
	left: 11vw;
	bottom: 7%;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	font-family: var(--e-global-typography-a91742a-font-family, "Scandium"), sans-serif;
	font-size: var(--e-global-typography-a91742a-font-size, 53px);
	font-weight: var(--e-global-typography-a91742a-font-weight, 700);
	line-height: var(--e-global-typography-a91742a-line-height, 1.2em);
	color: var(--bmd-blanc);
}

/* Pastille livre : cercle vert, pictogramme bleu (SVG du gabarit d'origine) */
.mec-wrap.bmd-fiche .bmd-fiche__hero-icone {
	flex: 0 0 auto;
	width: calc(var(--bmd-icone) * 1.25);
	height: var(--bmd-icone);
	margin-right: 5px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70'%3E%3Ccircle cx='35' cy='35' r='35' fill='%23caf6d4'/%3E%3Cpath fill='%23004eff' d='M15.91 52.22V23.33h2.73v-5.56L35 22.47l16.36-4.7v5.56h2.73v28.89H15.91Zm16.92-4.9V26.31l-10.05-2.83v21.06l10.05 2.78Zm4.34 0 10.05-2.78V23.48l-10.05 2.83v21.01Z'/%3E%3C/svg%3E") left center / var(--bmd-icone) var(--bmd-icone) no-repeat;
}

/* Retour au calendrier
   -------------------------------------------------------------------------- */

.mec-wrap.bmd-fiche .bmd-fiche__retour {
	box-sizing: content-box;
	max-width: var(--bmd-largeur);
	margin: 140px auto 30px;
}

.mec-wrap.bmd-fiche .bmd-fiche__retour a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--bmd-police);
	font-size: 16px;
	font-weight: 300;
	line-height: 24px;
	color: var(--bmd-texte);
	text-decoration: none;
	box-shadow: none;
	transition: color .3s;
}

/* Chevron Font Awesome, teinté par currentColor, calé à gauche d'une case de
   17,5 px comme l'icône d'une liste Elementor. */
.mec-wrap.bmd-fiche .bmd-fiche__retour a::before {
	content: "";
	flex: 0 0 auto;
	width: 17.5px;
	height: 14px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z'/%3E%3C/svg%3E") left center / 14px 14px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z'/%3E%3C/svg%3E") left center / 14px 14px no-repeat;
}

.mec-wrap.bmd-fiche .bmd-fiche__retour a:hover,
.mec-wrap.bmd-fiche .bmd-fiche__retour a:focus {
	color: var(--bmd-bleu);
}

/* Corps : le cours à gauche, horaires et réservation à droite
   -------------------------------------------------------------------------- */

/* Les deux cartes gardent leur hauteur naturelle : plus de grand vide en bas
   de la carte la plus courte. */
.mec-wrap.bmd-fiche .bmd-fiche__corps {
	box-sizing: content-box;
	display: flex;
	align-items: flex-start;
	gap: 50px;
	max-width: var(--bmd-largeur);
	margin: 0 auto 100px;
}

/* La colonne du cours est plus large : on la lit d'abord, la carte de droite
   sert à agir. */
.mec-wrap.bmd-fiche .bmd-fiche__principal {
	flex: 1.45 1 0%;
	min-width: 0;
	padding: 40px;
	border: 1px solid var(--bmd-bord);
}

.mec-wrap.bmd-fiche .bmd-fiche__laterale {
	flex: 1 1 0%;
	min-width: 0;
	padding: 32px;
	border: 1px solid var(--bmd-bord);
}

/* Titre du cours (H1) */
.mec-wrap.bmd-fiche .bmd-fiche__titre {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--bmd-police-titre);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-wrap: balance;
	color: var(--bmd-bleu);
}

/* Date et tarif : un bandeau entre deux filets, intitulé discret au-dessus de
   chaque valeur. */
.mec-wrap.bmd-fiche .bmd-fiche__infos {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 48px;
	margin: 24px 0 0;
	padding: 18px 0;
	border-top: 1px solid var(--bmd-bord);
	border-bottom: 1px solid var(--bmd-bord);
}

.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-event-meta,
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-single-event-date,
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-event-cost,
.mec-wrap.bmd-fiche .bmd-fiche__infos dl,
.mec-wrap.bmd-fiche .bmd-fiche__infos dd,
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-events-abbr {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	text-decoration: none;
}

.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-date,
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-cost {
	margin: 0 0 4px;
	padding: 0;
	font-family: var(--bmd-police-titre);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bmd-bleu);
}

.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-start-date-label,
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-end-date-label,
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-events-event-cost {
	padding: 0;
	font-family: var(--bmd-police);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--bmd-texte);
}

/* Description */
.mec-wrap.bmd-fiche .bmd-fiche__description {
	margin-top: 24px;
}

.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content {
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	border-radius: 0;
	text-align: left;
}

.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content,
.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content p,
.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content li {
	font-family: var(--bmd-police);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--bmd-texte);
}

.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content p {
	margin: 0 0 16px;
}

.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content > :last-child {
	margin-bottom: 0;
}

.mec-wrap.bmd-fiche .bmd-fiche__description .mec-events-content a {
	color: var(--bmd-bleu);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Carte de droite : programme horaire, puis réservation sous un filet
   -------------------------------------------------------------------------- */

/* 16 px + les 12 px sous la dernière séance : même écart de part et d'autre
   du filet. */
.mec-wrap.bmd-fiche .bmd-fiche__resa {
	margin-top: 16px;
	padding-top: 28px;
	border-top: 1px solid var(--bmd-bord);
}

.mec-wrap.bmd-fiche .bmd-fiche__laterale > :first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* Intitulés de la carte, plus petits que le titre du cours */
.mec-wrap.bmd-fiche .bmd-fiche__titre-bloc,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-frontbox-title {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	font-family: var(--bmd-police-titre);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-align: left;
	color: var(--bmd-bleu);
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-frontbox-title::before,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-frontbox-title::after {
	display: none;
}

/* Programme horaire : une ligne par séance, le jour à gauche, les heures à
   droite, le bloc en dessous. Les enveloppes de MEC passent en display:
   contents pour que jour, heures et bloc se rangent dans une même grille. */
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-event-schedule {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-frontbox-title {
	grid-column: 1 / -1;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-event-schedule-content,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-event-schedule-content dl {
	display: contents;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-event-schedule-content dl::before {
	content: none;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-part,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-time {
	margin: 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--bmd-bord);
	font-family: var(--bmd-police);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-part {
	grid-column: 1;
	padding-right: 16px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--bmd-texte);
}

/* Filets entre les séances seulement, pas sous l'intitulé */
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-frontbox-title + .mec-schedule-part,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-frontbox-title + .mec-schedule-part + .mec-event-schedule-content .mec-schedule-time {
	padding-top: 0;
	border-top: 0;
}

/* Le trait d'union que MEC met entre les heures est masqué (taille 0) et
   remplacé par un tiret demi-cadratin. */
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-time {
	grid-column: 2;
	font-size: 0;
	white-space: nowrap;
	text-align: right;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-start-time,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-end-time {
	padding: 0;
	font-family: var(--bmd-police);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	font-variant-numeric: tabular-nums;
	color: var(--bmd-bleu);
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-end-time::before {
	content: "–";
	margin: 0 .3em;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-title,
.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-description {
	grid-column: 1 / -1;
	margin: 0;
	padding: 2px 0 12px;
	font-family: var(--bmd-police);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.4;
	color: var(--bmd-texte);
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-description {
	padding-top: 0;
}

.mec-wrap.bmd-fiche .bmd-fiche__horaires .mec-schedule-description:empty {
	display: none;
}

/* Réservation */
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking .mec-booking h4,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking form > h4 {
	display: none !important;
	margin: 0 !important;
}

/* Pictogramme de billet masqué : la carte est étroite et le nom du cours
   suffit. MEC le masque déjà sur mobile. */
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-ticket-style-row-section-1 {
	display: none !important;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-event-ticket {
	margin: 0;
	padding: 0;
	border: 0;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-ticket-style-row {
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	border: 0;
}

/* Nom et prix à gauche, quantité calée à droite. Sous 480 px, MEC force
   chaque partie à 100 % de large (sélecteur en 0,4,1), d'où le « > » qui
   donne à ces règles une classe de plus. */
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-ticket-style-row > .mec-ticket-style-row-section-2 {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-ticket-style-row > .mec-ticket-style-row-section-3 {
	flex: 0 0 auto;
	width: auto;
	max-width: 50%;
	margin: 0 0 0 auto;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-event-ticket-name,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-event-ticket-price {
	display: block;
	margin: 0;
	padding: 0;
	font-family: var(--bmd-police);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--bmd-texte);
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-event-ticket-price {
	margin-top: 2px;
	color: var(--bmd-bleu);
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-ticket-style-row-section-3 p,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-event-ticket-available,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-event-ticket-available span {
	margin: 0;
	font-family: var(--bmd-police);
	font-size: 13px;
	font-weight: 300;
	line-height: 1.4;
	color: var(--bmd-texte);
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking input[type="text"],
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking input[type="date"],
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking input[type="number"],
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking input[type="email"],
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking input[type="password"],
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking input[type="tel"],
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking textarea,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking select {
	margin: 0;
	padding: 0;
	border-style: none;
	border-radius: 0 !important;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-book-form-btn-wrap {
	margin: 20px 0 0;
	padding: 0;
	border: 0;
}

/* Bouton pleine largeur. MEC style ses boutons avec un sélecteur très
   spécifique (une série de :not()), d'où les !important. */
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking button.mec-book-form-next-button {
	display: block !important;
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 14px 20px !important;
	border-style: none !important;
	border-radius: 48px !important;
	font-family: var(--e-global-typography-49454f0-font-family, "Scandium"), sans-serif !important;
	font-size: var(--e-global-typography-49454f0-font-size, clamp(.875rem, .5733rem + .5639vw, 1.25rem)) !important;
	font-weight: var(--e-global-typography-49454f0-font-weight, 600) !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	color: var(--bmd-vert) !important;
	background: var(--bmd-bleu) !important;
	transition: color .3s, background-color .3s;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking button.mec-book-form-next-button:hover,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking button.mec-book-form-next-button:focus-visible {
	color: var(--bmd-bleu) !important;
	background: var(--bmd-vert) !important;
}

.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group .mec-error,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group .mec-success,
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group .info-msg {
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
}

/* « Complet ! » : MEC garde ses couleurs d'avertissement, avec de l'air */
.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-sold-tickets {
	margin: 0 !important;
	padding: 12px 16px !important;
	border-radius: 6px !important;
	font-family: var(--bmd-police);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

/* « Expiré! » sous la date d'une session passée */
.mec-wrap.bmd-fiche .bmd-fiche__infos .mec-holding-status {
	display: inline-block;
	margin-top: 4px;
	font-family: var(--bmd-police);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

/* Écrans jusqu'à 1330 px
   -------------------------------------------------------------------------- */

@media (max-width: 1330px) {
	.mec-wrap.bmd-fiche {
		--bmd-icone: 46px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__hero {
		min-height: 280px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__hero::before {
		background-size: 65% auto;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__retour {
		padding: 0 30px;
	}

	/* Sans les 60 px du haut repris d'Elementor : le lien de retour reste
	   collé aux cartes. */
	.mec-wrap.bmd-fiche .bmd-fiche__corps {
		gap: 40px;
		padding: 0 30px 90px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__principal {
		padding: 32px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__laterale {
		padding: 28px;
	}
}

/* Mobile, jusqu'à 855 px
   -------------------------------------------------------------------------- */

@media (max-width: 855px) {
	.mec-wrap.bmd-fiche {
		--bmd-icone: 40px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__hero::before {
		background-size: 120% auto;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__hero-titre {
		left: 21vw;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__retour {
		margin: 80px 0 0;
		padding: 0 15px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__corps {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		margin: 30px 0 80px;
		padding: 0 15px 60px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__principal,
	.mec-wrap.bmd-fiche .bmd-fiche__laterale {
		flex: 0 0 auto;
		padding: 20px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__titre {
		font-size: 22px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__infos {
		gap: 12px 32px;
		margin-top: 18px;
		padding: 14px 0;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__description {
		margin-top: 18px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__resa {
		margin-top: 10px;
		padding-top: 22px;
	}

	.mec-wrap.bmd-fiche .bmd-fiche__resa .mec-events-meta-group-booking button.mec-book-form-next-button {
		padding: 16px 20px !important;
	}
}
