/**
 * Modules « cours » — moteur de recherche + cours populaires.
 * Les couleurs sont regroupées ici pour être ajustées facilement.
 */

.asc-cours,
.asc-populaires,
.asc-fiche,
.asc-fiche-entete,
.asc-fiche-hero,
.asc-fiche-contenu,
.asc-fiche-infos {
	--asc-bleu: #1550c5;
	--asc-bleu-fonce: #0f3f9e;
	--asc-bleu-nuit: #0a2c70;
	--asc-bleu-clair: #ebf2ff;
	--asc-orange: #D0FF7F;
	--asc-orange-clair: #d0ff7f97;
	/* Le lime plafonne à 1,15:1 sur blanc. Cette déclinaison sombre monte à
	   6,1:1 et garde la couleur de marque pour le texte sur fond clair. */
	--asc-vert-fonce: #4e6b18;
	--asc-encre: #1c1f26;
	--asc-gris-texte: #5b6472;
	--asc-gris-bord: #e6e8ec;
	--asc-gris-fond: #f6f6f6;
	--asc-blanc: #ffffff;
	--asc-rayon: 10px;
	--asc-ombre: 0 10px 30px rgba(16, 24, 40, .08);

	box-sizing: border-box;
	color: var(--asc-encre);
	font-family: inherit;
}

.asc-cours *,
.asc-populaires *,
.asc-fiche *,
.asc-fiche-entete *,
.asc-fiche-contenu *,
.asc-fiche-infos * {
	box-sizing: border-box;
}

/* Divi applique « p { padding-bottom: 1em } » et « h1-h6 { padding-bottom: 10px } »
   à tout le site. Sans ce garde-fou, les espacements des modules explosent en
   production alors qu'ils sont justes hors de Divi. */
.asc-cours :is(p, h1, h2, h3, h4, h5, h6, ul, ol),
.asc-populaires :is(p, h1, h2, h3, h4, h5, h6, ul, ol),
.asc-fiche :is(p, h1, h2, h3, h4, h5, h6, ul, ol),
.asc-fiche-entete :is(p, h1, h2, h3, h4, h5, h6, ul, ol),
.asc-fiche-hero :is(p, h1, h2, h3, h4, h5, h6, ul, ol),
.asc-fiche-contenu :is(p, h1, h2, h3, h4, h5, h6, ul, ol),
.asc-fiche-infos :is(p, h1, h2, h3, h4, h5, h6, ul, ol) {
	padding-bottom: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
ul.asc-fiche-points {
	padding-left: 0px!important;
}
/* ------------------------------------------------------------------ *
 * Module 1 — Barre de recherche
 * ------------------------------------------------------------------ */

.asc-cours-search {
	position: relative;
	z-index: 5;
	max-width: 1000px;
	margin: calc(var(--asc-overlap, 46px) * -1) auto 48px;
}

.asc-cours-search__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--asc-blanc);
	border-radius: var(--asc-rayon);
	box-shadow: var(--asc-ombre);
}

.asc-cours-search__query {
	position: relative;
	display: flex;
	flex: 1 1 160px;
	align-items: center;
	min-width: 0;
}

.asc-cours-search__icon {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	color: var(--asc-gris-texte);
	flex: none;
}

.asc-cours-search__query input[type="search"] {
	width: 100%;
	padding: 6px 0;
	font-size: 15px;
	color: var(--asc-encre);
	background: transparent;
	border: 0;
	outline: none;
	box-shadow: none;
}

.asc-cours-search__query input[type="search"]::placeholder {
	color: #9aa1ac;
}

.asc-cours-search__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
}

/* Un <select> se dimensionne sur son option la plus longue : sans ce plafond,
   un nom de cours à rallonge élargit la barre au-delà de l'écran. */
.asc-cours-select {
	min-width: 0;
	max-width: 100%;
}

.asc-cours-select select {
	max-width: 100%;
	appearance: none;
	-webkit-appearance: none;
	/* Pastilles serrées : six filtres + champ + loupe tiennent sur une ligne. */
	padding: 8px 28px 8px 12px;
	font-size: 13px;
	color: var(--asc-encre);
	background-color: var(--asc-blanc);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b6472' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	background-size: 10px;
	border: 1px solid var(--asc-gris-bord);
	border-radius: 999px;
	cursor: pointer;
	line-height: 1.4;
}

.asc-cours-select select:focus {
	border-color: var(--asc-bleu);
	outline: none;
}

/* Filtre à choix multiples : même pastille qu'un <select>, qui déroule une
   liste de cases à cocher. */
.asc-cours-multi {
	position: relative;
}

.asc-cours-multi__bouton {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 28px 8px 12px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--asc-encre);
	white-space: nowrap;
	list-style: none;
	background-color: var(--asc-blanc);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b6472' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	background-size: 10px;
	border: 1px solid var(--asc-gris-bord);
	border-radius: 999px;
	cursor: pointer;
	user-select: none;
}

.asc-cours-multi__bouton::-webkit-details-marker {
	display: none;
}

.asc-cours-multi[open] .asc-cours-multi__bouton,
.asc-cours-multi__bouton:focus-visible {
	border-color: var(--asc-bleu);
	outline: none;
}

.asc-cours-multi__compte {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-size: 11px;
	font-weight: 700;
	color: var(--asc-blanc);
	background: var(--asc-bleu);
	border-radius: 999px;
}

.asc-cours-multi__compte[hidden] {
	display: none;
}

.asc-cours-multi__panneau {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	min-width: 200px;
	max-height: 320px;
	padding: 6px;
	margin: 0;
	overflow-y: auto;
	background: var(--asc-blanc);
	border: 1px solid var(--asc-gris-bord);
	border-radius: 8px;
	box-shadow: var(--asc-ombre);
}

.asc-cours-multi__option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	font-size: 13px;
	line-height: 1.3;
	color: var(--asc-encre);
	border-radius: 6px;
	cursor: pointer;
}

.asc-cours-multi__option:hover {
	background: var(--asc-bleu-clair);
}

.asc-cours-multi__option input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--asc-bleu);
	cursor: pointer;
}

.asc-cours-search__submit {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--asc-blanc);
	background: var(--asc-bleu);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color .2s ease;
}

.asc-cours-search__submit svg {
	width: 18px;
	height: 18px;
}

.asc-cours-search__submit:hover,
.asc-cours-search__submit:focus {
	background: var(--asc-bleu-fonce);
	color: var(--asc-blanc);
}

/* ------------------------------------------------------------------ *
 * Module 1 — Résultats
 * ------------------------------------------------------------------ */

.asc-cours-results__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--asc-gris-bord);
}

.asc-cours-results__title {
	margin: 0;
	font-size: 26px;
	font-weight: 700;
	color: var(--asc-encre);
}

.asc-cours-results__count {
	margin: 0;
	font-size: 13px;
	color: var(--asc-gris-texte);
}

.asc-cours-table-wrap {
	position: relative;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--asc-blanc);
	border: 1px solid var(--asc-gris-bord);
	border-radius: var(--asc-rayon);
	box-shadow: var(--asc-ombre);
}

/* « table-layout: fixed » : sans lui, une colonne au contenu long (deux
   créneaux horaires bout à bout) s'octroie toute la place et écrase les
   autres. Les largeurs ci-dessous sont réparties une fois pour toutes. */
.asc-cours-table {
	width: 100%;
	min-width: 980px;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 14px;
}

.asc-cours-table__langue {
	width: 9%;
}

.asc-cours-table__titre {
	width: 20%;
}

.asc-cours-table__niveau {
	width: 15%;
}

.asc-cours-table__horaires {
	width: 18%;
}

.asc-cours-table__prochain {
	width: 20%;
}

.asc-cours-table__tarif {
	width: 12%;
}

.asc-cours-table__actions {
	width: 6%;
}

.asc-cours-table thead th {
	padding: 14px 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: left;
	color: var(--asc-blanc);
	background: #2b2d33;
}

.asc-cours-table tbody td {
	padding: 16px 20px;
	color: var(--asc-gris-texte);
	border-bottom: 1px solid var(--asc-gris-bord);
	vertical-align: middle;
	line-height: 1.5;
}

/* Chaque cours occupe deux <tr> : la ligne visible et sa ligne dépliable.
   Les sélecteurs comptent donc de deux en deux. */
.asc-cours-table tbody tr:last-child td,
.asc-cours-table tbody tr:nth-last-child(2) td {
	border-bottom: 0;
}

.asc-cours-table tbody .asc-cours-table__row:nth-child(4n+3) {
	background: #fafbfc;
}

.asc-cours-table tbody .asc-cours-table__row {
	cursor: pointer;
}

.asc-cours-table tbody .asc-cours-table__row:hover,
.asc-cours-table tbody .asc-cours-table__row.is-open {
	background: #f2f6fd;
}

/* Pas de « nowrap » ici : une langue sans drapeau s'écrit en toutes lettres
   (« Autres langues ») et doit pouvoir passer à la ligne. */
.asc-cours-table tbody .asc-cours-table__langue {
	font-weight: 700;
	color: var(--asc-encre) !important;
}

.asc-cours-langue {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Le contour évite qu'un drapeau à bandes blanches (Suisse, Japon, Autriche)
   se fonde dans la ligne. */
.asc-cours-langue__drapeau {
	width: auto;
	height: 20px;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(16, 24, 40, .12);
}

/* Drapeau présent : le nom reste dans le HTML — lecteurs d'écran, recherche
   interne, copier-coller — mais sort du flux visuel. */
.asc-cours-langue--drapeau .asc-cours-langue__nom {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.asc-cours-table tbody td {
	overflow-wrap: break-word;
}

.asc-cours-table tbody .asc-cours-table__titre {
	font-weight: 700;
	color: var(--asc-encre) !important;
}

.asc-cours-table__titre a {
	color: inherit;
	text-decoration: none;
}

.asc-cours-table__titre a:hover,
.asc-cours-table__titre a:focus-visible {
	color: var(--asc-bleu);
	text-decoration: underline;
}

/* Le libellé « À partir de » reste une mention discrète : c'est le montant
   qui doit être lu en premier. */
.asc-cours-table__tarif {
	white-space: nowrap;
}

.asc-cours-table__tarif-valeur {
	display: block;
}

.asc-cours-table__tarif-mention {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.4;
	color: var(--asc-gris-texte);
}

.asc-cours-table__tarif-montant {
	display: block;
	font-weight: 700;
	color: var(--asc-encre);
}

/* Un créneau par bloc, jours au-dessus des heures : c'est court, ça tient dans
   une colonne étroite, et la plage horaire n'est jamais coupée en deux. */
.asc-cours-table__creneau {
	display: block;
}

.asc-cours-table__creneau + .asc-cours-table__creneau {
	margin-top: 8px;
}

.asc-cours-table__creneau-jours,
.asc-cours-table__creneau-heures {
	display: block;
}

.asc-cours-table__creneau-heures {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.asc-cours-table__niveaux {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

/* Un cours peut couvrir toute la grille CECR : des badges de gabarit
   « colonne » tiennent sur deux lignes au lieu de six. */
.asc-cours-table__niveaux .asc-badge {
	min-width: 34px;
	padding: 4px 8px;
	font-size: 12px;
}

.asc-cours-table__vide {
	color: #b6bcc6;
}

.asc-cours-table__actions {
	width: 56px;
	text-align: right;
}

/* ------------------------------------------------------------------ *
 * Module 1 — Ligne dépliable
 * ------------------------------------------------------------------ */

.asc-cours-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 6px;
	font: inherit;
	color: var(--asc-bleu);
	background: none;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.asc-cours-toggle:hover {
	background: var(--asc-bleu-clair);
}

.asc-cours-toggle__texte {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.asc-cours-toggle__chevron {
	width: 18px;
	height: 18px;
	transition: transform .25s ease;
}

.asc-cours-toggle[aria-expanded="true"] .asc-cours-toggle__chevron {
	transform: rotate(180deg);
}

.asc-cours-detail__cellule {
	padding: 0 !important;
	background: var(--asc-gris-fond);
}

/* Dépliage animé sans hauteur codée en dur : la grille passe de 0fr à 1fr,
   donc de « rien » à la hauteur réelle du contenu. */
.asc-cours-detail__anim {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .28s ease;
}

.asc-cours-detail.is-open .asc-cours-detail__anim {
	grid-template-rows: 1fr;
}

.asc-cours-detail__clip {
	min-height: 0;
	overflow: hidden;
}

/* « flex-start » et non « center » : la colonne de droite fait deux rangées
   quand le CAF est là, et le texte flotterait au milieu du vide. */
.asc-cours-detail__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px 28px;
	padding: 20px;
	border-top: 1px solid var(--asc-gris-bord);
}

/* Types de cours au-dessus de l'accroche. */
.asc-cours-detail__texte {
	display: flex;
	flex: 1 1 360px;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.asc-cours-detail__accroche {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--asc-encre);
}

/* Lien vers la fiche, mention CAF en dessous, calés à droite. */
.asc-cours-detail__colonne {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	margin-left: auto;
}

.asc-cours-detail__bloc {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.asc-cours-detail__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #98a0ac;
}

.asc-cours-detail__types {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.asc-cours-detail__type {
	padding: 5px 12px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--asc-bleu-nuit);
	background: var(--asc-bleu-clair);
	border-radius: 999px;
}

.asc-cours-detail__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-top: 5px;
	font-size: 14px;
	font-weight: 600;
	color: var(--asc-bleu);
	text-decoration: none;
	white-space: nowrap;
}

.asc-cours-detail__cta svg {
	width: 16px;
	height: 16px;
	transition: transform .2s ease;
}

.asc-cours-detail__cta:hover {
	text-decoration: underline;
}

.asc-cours-detail__cta:hover svg {
	transform: translateX(3px);
}

/* Chèque annuel de formation : le vrai logo remplace la pastille dès qu'un
   fichier assets/img/caf.svg (ou .png) est déposé dans le thème. */
.asc-caf {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px 8px 10px;
	text-decoration: none;
	background: var(--asc-blanc);
	border: 1px solid var(--asc-gris-bord);
	border-radius: 8px;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.asc-caf:hover,
.asc-caf:focus-visible {
	border-color: var(--asc-bleu);
	box-shadow: 0 4px 14px rgba(21, 80, 197, .12);
	outline: none;
}

.asc-caf__fleche {
	flex: none;
	width: 16px;
	height: 16px;
	margin-left: 6px;
	color: var(--asc-bleu);
}

/* Le logo de la Ville de Genève embarque le texte « VILLE DE GENÈVE » sous
   l'écusson : en dessous de ~45px il devient illisible. */
.asc-caf__logo {
	width: auto;
	height: 46px;
}

/* Dans la colonne latérale de la fiche (360px), l'encart occupe la largeur
   disponible et se détache du bloc « Tarifs » qui le précède. */
.asc-caf--fiche {
	margin-top: 16px;
}

.asc-caf__pastille {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 32px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--asc-vert-fonce);
	background: var(--asc-orange);
	border-radius: 6px;
}

.asc-caf__texte {
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--asc-encre);
}

.asc-caf__code {
	font-size: 12px;
	color: var(--asc-gris-texte);
}

.asc-badge {
	display: inline-block;
	min-width: 38px;
	padding: 6px 11px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.15;
	text-align: center;
	color: var(--asc-encre);
	background: var(--asc-orange);
	border-radius: 8px;
}

.asc-cours-empty {
	padding: 40px 20px;
	margin: 0;
	font-size: 15px;
	text-align: center;
	color: var(--asc-gris-texte);
}

.asc-cours-empty[hidden] {
	display: none;
}

.asc-cours-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: rgba(255, 255, 255, .75);
}

.asc-cours-loader[hidden] {
	display: none;
}

.asc-cours-loader__dot {
	width: 8px;
	height: 8px;
	background: var(--asc-bleu);
	border-radius: 50%;
	animation: asc-pulse 1s infinite ease-in-out;
}

.asc-cours-loader__dot:nth-child(2) {
	animation-delay: .15s;
}

.asc-cours-loader__dot:nth-child(3) {
	animation-delay: .3s;
}

@keyframes asc-pulse {

	0%,
	80%,
	100% {
		opacity: .25;
		transform: scale(.8);
	}

	40% {
		opacity: 1;
		transform: scale(1);
	}
}

.asc-cours-results__foot {
	margin-top: 28px;
	text-align: center;
}

.asc-cours-more {
	display: inline-block;
	padding: 12px 30px;
	font-size: 14px;
	font-weight: 600;
	color: var(--asc-bleu);
	text-decoration: none;
	background: var(--asc-blanc);
	border: 1px solid var(--asc-bleu);
	border-radius: 6px;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.asc-cours-more:hover {
	color: var(--asc-blanc);
	background: var(--asc-bleu);
}

.asc-cours-more[hidden] {
	display: none;
}

.asc-cours-erreur {
	margin: 16px 0 0;
	font-size: 14px;
	color: #b42318;
	text-align: center;
}

/* ------------------------------------------------------------------ *
 * Module 2 — Cours populaires
 * ------------------------------------------------------------------ */

.asc-populaires {
	padding: 64px 0;
	background: var(--asc-gris-fond);
}

.asc-populaires__inner {
	max-width: 1180px;
	padding: 0 20px;
	margin: 0 auto;
}

.asc-populaires__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 34px;
}

.asc-populaires__surtitre {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--asc-bleu);
}

.asc-populaires__titre {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	color: var(--asc-encre);
}

.asc-populaires__texte {
	max-width: 260px;
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--asc-gris-texte);
}

.asc-populaires__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.asc-carte {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--asc-blanc);
	border-radius: var(--asc-rayon);
	box-shadow: 0 4px 16px rgba(16, 24, 40, .06);
	transition: transform .2s ease, box-shadow .2s ease;
}

.asc-carte:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(16, 24, 40, .12);
}

.asc-carte__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #e9ecf1;
}

.asc-carte__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.asc-carte__corps {
	flex: 1 1 auto;
	padding: 20px 20px 18px;
}

/* Le titre du cours peut tenir sur plusieurs lignes : le badge de niveau
   reste calé en haut à droite. */
.asc-carte__entete {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.asc-carte__entete .asc-badge {
	flex: none;
}

.asc-carte__titre {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--asc-encre);
}

.asc-carte__titre a {
	color: inherit;
	text-decoration: none;
}

.asc-carte__accroche {
	margin: 12px 0 0;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--asc-vert-fonce);
}

.asc-carte__horaires {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--asc-gris-texte);
}

/* Sur deux lignes, un icône centré décroche du texte : on le cale en haut. */
.asc-carte__horaires svg {
	width: 14px;
	height: 14px;
	flex: none;
	margin-top: 2px;
}

/* Les plages horaires peuvent être très longues : deux lignes au maximum,
   le texte complet reste accessible via l'attribut title. */
.asc-carte__horaires span {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* Filet de séparation calé sur la gouttière du corps, comme sur la maquette. */
.asc-carte__pied {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	margin: 0 20px;
	padding: 16px 0 20px;
	border-top: 1px solid var(--asc-gris-bord);
}

.asc-carte__tarif {
	margin-right: auto;
	font-size: 18px;
	font-weight: 700;
	color: var(--asc-encre);
}

.asc-carte__cta {
	padding: 11px 24px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1;
	color: var(--asc-blanc);
	text-decoration: none;
	background: var(--asc-bleu-fonce);
	border-radius: 4px;
	transition: background-color .2s ease;
}

.asc-carte__cta:hover {
	color: var(--asc-blanc);
	background: var(--asc-bleu-nuit);
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1100px) {
	.asc-populaires__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.asc-populaires__texte {
		max-width: none;
	}
}

@media (max-width: 980px) {
	.asc-cours-search {
		margin-top: 0;
	}

	.asc-cours-search__bar {
		align-items: stretch;
	}

	.asc-cours-search__query {
		flex: 1 1 100%;
		padding-bottom: 10px;
		border-bottom: 1px solid var(--asc-gris-bord);
	}

	.asc-cours-search__filters {
		flex: 1 1 auto;
	}
}

@media (max-width: 860px) {
	.asc-cours-results__head {
		flex-wrap: wrap;
		gap: 4px 16px;
	}

	.asc-cours-table-wrap {
		max-width: 100%;
		overflow-x: visible;
		background: transparent;
		border: 0;
		box-shadow: none;
	}

	/* Les lignes deviennent des cartes. On quitte le modèle « table », sinon
	   la largeur du tableau reste calée sur son contenu le plus long et
	   déborde de l'écran au lieu de le suivre. */
	.asc-cours-table,
	.asc-cours-table tbody {
		display: block;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.asc-cours-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.asc-cours-table tbody tr {
		display: grid;
		grid-template-columns: minmax(0, auto) minmax(0, 1fr);
		gap: 4px 14px;
		padding: 16px 18px;
		margin-bottom: 12px;
		background: var(--asc-blanc);
		border: 1px solid var(--asc-gris-bord);
		border-radius: var(--asc-rayon);
	}

	.asc-cours-table tbody .asc-cours-table__row:nth-child(4n+3) {
		background: var(--asc-blanc);
	}

	.asc-cours-table tbody td {
		display: contents;
		padding: 0;
		border: 0;
	}

	/* En carte, le contenu doit pouvoir revenir à la ligne : les « nowrap »
	   de la vue tableau (langue, horaires, tarif) poussent sinon la carte
	   au-delà de la largeur du mobile. */
	.asc-cours-table tbody td,
	.asc-cours-table__langue,
	.asc-cours-table__tarif {
		white-space: normal;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	/* Les largeurs de colonnes n'ont plus de sens une fois les lignes
	   transformées en cartes. */
	.asc-cours-table tbody td {
		width: auto;
	}

	/* En carte, la place ne manque plus : drapeau ET nom de la langue. */
	.asc-cours-langue--drapeau .asc-cours-langue__nom {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}

	.asc-cours-table tbody td::before {
		content: attr(data-label);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: .06em;
		line-height: 1.5;
		text-transform: uppercase;
		color: #98a0ac;
	}

	/* Le td est en « display: contents » : ses enfants sont donc des enfants
	   directs de la grille et s'étireraient sur toute la colonne. */
	.asc-cours-table tbody .asc-badge,
	.asc-cours-table tbody .asc-cours-table__niveaux,
	.asc-cours-table tbody .asc-cours-table__tarif-valeur {
		justify-self: start;
	}

	/* Le bouton de dépliage devient une barre pleine largeur en bas de carte :
	   une flèche de 18px est trop petite pour être visée au doigt. */
	.asc-cours-table tbody .asc-cours-table__actions {
		display: block;
		grid-column: 1 / -1;
		width: auto;
		margin-top: 14px;
		text-align: left;
	}

	.asc-cours-table tbody .asc-cours-table__actions::before {
		content: none;
	}

	.asc-cours-toggle {
		width: 100%;
		justify-content: space-between;
		padding: 10px 14px;
		font-size: 13px;
		font-weight: 600;
		background: var(--asc-bleu-clair);
	}

	.asc-cours-toggle__texte {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}

	/* La ligne dépliable se colle sous sa carte : bord haut supprimé et coins
	   arrondis répartis entre les deux. */
	.asc-cours-table tbody .asc-cours-detail {
		display: block;
		padding: 0;
		margin: 0 0 12px;
		background: var(--asc-blanc);
		border: 1px solid var(--asc-gris-bord);
		border-top: 0;
		border-radius: 0 0 var(--asc-rayon) var(--asc-rayon);
	}

	.asc-cours-table tbody .asc-cours-table__row.is-open {
		margin-bottom: 0;
		border-bottom-right-radius: 0;
		border-bottom-left-radius: 0;
	}

	.asc-cours-table tbody .asc-cours-detail td {
		display: block;
		padding: 0;
	}

	.asc-cours-table tbody .asc-cours-detail td::before {
		content: none;
	}

	.asc-cours-detail__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		padding: 16px 18px;
	}

	/* En colonne, une base flexible devient une hauteur : le texte
	   réserverait 360px de vide sous lui. */
	.asc-cours-detail__texte,
	.asc-cours-detail__colonne {
		flex: 0 0 auto;
		width: 100%;
	}

	.asc-cours-detail__colonne {
		align-items: flex-start;
		margin-left: 0;
	}

	.asc-cours-detail__cta {
		padding-top: 0;
	}

	.asc-populaires__grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ *
 * En-têtes figés au défilement
 *
 * La ligne des titres de colonnes reste visible juste sous le header Divi,
 * lui-même déjà figé : 114px, 94px sous 1280px.
 * ------------------------------------------------------------------ */

.asc-cours {
	--asc-header-h: 114px;
}

@media (max-width: 1279px) {
	.asc-cours {
		--asc-header-h: 94px;
	}
}

@media (min-width: 783px) {
	.admin-bar .asc-cours {
		--asc-header-h: calc(114px + 32px);
	}
}

@media (min-width: 783px) and (max-width: 1279px) {
	.admin-bar .asc-cours {
		--asc-header-h: calc(94px + 32px);
	}
}

/* Le JavaScript de Divi pose en style inline « overflow-y: hidden » sur
   #page-container et « overflow-x: hidden » sur body, ce qui neutralise tout
   « position: sticky » en dessous. D'où le !important, seul moyen de passer
   devant un style inline. « clip » rogne pareil sans casser le sticky.
   Limité aux pages qui contiennent le moteur de recherche. */
body:has(.asc-cours) {
	overflow-x: clip !important;
}

#page-container:has(.asc-cours) {
	overflow: clip !important;
}

/* Au-delà de 980px on fige les titres de colonnes. En dessous, le tableau
   garde son défilement horizontal (incompatible avec le sticky) et devient
   une liste de cartes sous 860px. */
@media (min-width: 981px) {
	/* Aucun « overflow » autre que « visible » sur les parents du tableau :
	   même « clip » empêche le sticky dans certains navigateurs. Les coins
	   arrondis passent donc sur les cellules d'angle. */
	.asc-cours-table-wrap {
		overflow: visible;
	}

	/* Le tableau suit la largeur de la page au lieu d'imposer 980px. */
	.asc-cours-table {
		min-width: 0;
		border-collapse: separate;
		border-spacing: 0;
	}

	.asc-cours-table thead th {
		position: sticky;
		top: var(--asc-header-h);
		z-index: 3;
	}

	.asc-cours-table thead th:first-child {
		border-top-left-radius: calc(var(--asc-rayon) - 1px);
	}

	.asc-cours-table thead th:last-child {
		border-top-right-radius: calc(var(--asc-rayon) - 1px);
	}

	/* Dernier cours : sa ligne, ou sa ligne dépliée quand elle est ouverte. */
	.asc-cours-table tbody tr:last-child td:first-child,
	.asc-cours-table tbody tr:nth-last-child(2):not(.is-open) td:first-child {
		border-bottom-left-radius: calc(var(--asc-rayon) - 1px);
	}

	.asc-cours-table tbody tr:last-child td:last-child,
	.asc-cours-table tbody tr:nth-last-child(2):not(.is-open) td:last-child {
		border-bottom-right-radius: calc(var(--asc-rayon) - 1px);
	}
}

/* Entre 981 et 1224px, le tableau est plus étroit que ses 980px d'origine :
   on resserre les marges internes pour laisser la place au contenu. */
@media (min-width: 981px) and (max-width: 1224px) {
	.asc-cours-table thead th,
	.asc-cours-table tbody td {
		padding-right: 12px;
		padding-left: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.asc-cours-detail__anim,
	.asc-cours-toggle__chevron {
		transition: none;
	}
}

/* Sous 480px, deux colonnes ne laissent plus assez de place à la valeur :
   on empile le libellé au-dessus de son contenu. */
@media (max-width: 480px) {
	.asc-cours-table tbody tr {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding: 14px 16px;
	}

	.asc-cours-table tbody td::before {
		margin-top: 10px;
	}

	.asc-cours-table tbody td:first-child::before {
		margin-top: 0;
	}
}

/* ------------------------------------------------------------------ *
 * Module 3 — Fiche cours
 * ------------------------------------------------------------------ */

/* Le module est autoportant : il ne dépend d'aucun réglage de la section Divi
   qui l'accueille (fond, couleur de texte, largeur, colonnes). */
.asc-fiche {
	display: block;
	color: var(--asc-encre);
}

/* Garde-fou : sans cette règle, un SVG sans feuille de style s'étale. */
.asc-fiche svg,
.asc-fiche-entete svg,
.asc-fiche-contenu svg,
.asc-fiche-infos svg {
	flex: none;
	max-width: 100%;
	vertical-align: middle;
}

/* --- Bannière ------------------------------------------------------ */

.asc-fiche-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #23272f 0%, #16181d 100%);
	color: #ffffff;
	margin-top: -114px !important;
    padding: 90px 0px 30px 0px !important;
}

.asc-fiche-hero::after {
	content: "";
	position: absolute;
	top: -140px;
	right: -120px;
	width: 420px;
	height: 420px;
	background: radial-gradient(circle, rgba(231, 156, 31, .16) 0%, rgba(231, 156, 31, 0) 70%);
	z-index: 1;
	pointer-events: none;
}

/* Image de fond : à la une du cours, sinon le visuel générique du thème.
   Balise <img> plutôt que background-image, pour le srcset responsive. */
.asc-fiche-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.asc-fiche-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Voile sombre : garantit la lisibilité du texte quelle que soit l'image.
   Plus dense à gauche, là où vivent le sur-titre, le titre et les chips. */
.asc-fiche-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(18, 20, 25, .9) 0%, rgba(18, 20, 25, .78) 42%, rgba(18, 20, 25, .5) 100%),
		linear-gradient(180deg, rgba(18, 20, 25, .2) 0%, rgba(18, 20, 25, .6) 100%);
}

.asc-fiche-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1180px;
	padding: 72px 24px 64px;
	margin: 0 auto;
}

.asc-fiche-hero__surtitre {
	margin: 0 0 14px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--asc-orange);
}

.asc-fiche-hero__titre {
	max-width: 20ch;
	margin: 0;
	font-size: clamp(30px, 4.4vw, 50px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.01em;
	color: #ffffff;
}

.asc-fiche-hero__formule {
	max-width: 46ch;
	margin: 16px 0 0;
	font-size: 17px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .78);
}

.asc-fiche-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	margin: 26px 0 0;
	list-style: none;
}

.asc-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	color: rgba(255, 255, 255, .9);
	background: rgba(255, 255, 255, .09);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 999px;
}

.asc-chip--niveau {
	min-width: 44px;
	justify-content: center;
	font-weight: 700;
	letter-spacing: .03em;
	color: var(--asc-orange);
    background: #d0ff7f42;
    border-color: #d0ff7f;
}

.asc-fiche-hero__financement {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding-top: 22px;
	margin: 26px 0 0;
	font-size: 14px;
	color: rgba(255, 255, 255, .72);
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.asc-fiche-hero__financement-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .45);
}

.asc-fiche-hero__financement a {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.asc-fiche-hero__financement a:hover {
	color: var(--asc-orange);
}

/* --- Corps : descriptif + colonne collante -------------------------- */

.asc-fiche-corps {
	background: var(--asc-blanc);
}

.asc-fiche-corps__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 56px;
	max-width: 1180px;
	padding: 64px 24px 72px;
	margin: 0 auto;
	align-items: start;
}

.asc-fiche-lateral {
	position: sticky;
	top: 100px;
}

/* --- Chapeau -------------------------------------------------------- */

.asc-fiche-chapeau__titre {
	margin: 0 0 16px;
	font-size: clamp(22px, 2.6vw, 32px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--asc-encre);
}

.asc-fiche-chapeau__texte {
	font-size: 16.5px;
	line-height: 1.75;
	color: var(--asc-gris-texte);
}

.asc-fiche-chapeau__texte p {
	margin: 0 0 16px;
}

.asc-fiche-chapeau__texte p:last-child {
	margin-bottom: 0;
}

/* --- Sections dépliables -------------------------------------------- */

.asc-fiche-sections {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 40px;
}

.asc-fiche-section {
	overflow: hidden;
	background: var(--asc-blanc);
	border: 1px solid var(--asc-gris-bord);
	border-radius: var(--asc-rayon);
	transition: border-color .2s ease, box-shadow .2s ease;
}

.asc-fiche-section:hover {
	border-color: #d3d7de;
}

.asc-fiche-section[open] {
	border-color: #d3d7de;
	box-shadow: 0 6px 22px rgba(16, 24, 40, .07);
}

/* Suppression du marqueur natif ▶ sur tous les moteurs. */
.asc-fiche-section__titre {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 22px;
	cursor: pointer;
	list-style: none;
}

.asc-fiche-section__titre::-webkit-details-marker {
	display: none;
}

.asc-fiche-section__titre::marker {
	content: "";
}

.asc-fiche-section__titre:focus-visible {
	outline: 2px solid var(--asc-bleu);
	outline-offset: -2px;
}

.asc-fiche-section__intitule {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	padding-bottom: 0px;
	line-height: 1.35;
	color: var(--asc-encre);
	transition: color .2s ease;
}

.asc-fiche-section__titre:hover .asc-fiche-section__intitule {
	color: var(--asc-bleu);
}

.asc-fiche-section__signe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex: none;
	color: var(--asc-bleu);
	background: var(--asc-bleu-clair);
	border-radius: 50%;
	transition: transform .25s ease, background-color .2s ease;
}

.asc-fiche-section__signe svg {
	width: 14px;
	height: 14px;
}

.asc-fiche-section[open] .asc-fiche-section__signe {
	transform: rotate(135deg);
}

.asc-fiche-section__contenu {
	padding: 0 22px 22px;
	font-size: 15.5px;
	line-height: 1.75;
	color: var(--asc-gris-texte);
}

.asc-fiche-section__contenu > :first-child {
	margin-top: 0;
}

.asc-fiche-section__contenu p {
	margin: 0 0 14px;
}

.asc-fiche-section__contenu p:last-child {
	margin-bottom: 0;
}

.asc-fiche-section__contenu h3,
.asc-fiche-section__contenu h4 {
	margin: 22px 0 8px;
	font-size: 16px;
	font-weight: 700;
	color: var(--asc-encre);
}

.asc-fiche-section__contenu ul {
	padding-left: 20px;
	margin: 0 0 14px;
}

/* --- Encadré -------------------------------------------------------- */

.asc-fiche-infos {
	overflow: hidden;
	background: var(--asc-blanc);
	border: 1px solid var(--asc-gris-bord);
	border-radius: 0px;
	box-shadow: var(--asc-ombre);
}

.asc-fiche-achat {
	padding: 24px 24px 22px;
	background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
	border-bottom: 1px solid var(--asc-gris-bord);
}

.asc-fiche-prix {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0 0 16px;
}

.asc-fiche-prix__prefixe,
.asc-fiche-prix__suffixe {
	font-size: 14px;
	color: var(--asc-gris-texte);
}

.asc-fiche-prix__montant {
	font-size: 36px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.02em;
	color: var(--asc-encre);
}

.asc-fiche-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 15px 20px;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .05em;
	text-align: center;
	text-transform: uppercase;
	color: var(--asc-blanc);
	text-decoration: none;
	background: var(--asc-bleu-fonce);
	border-radius: 8px;
	transition: background-color .2s ease, transform .15s ease;
}

.asc-fiche-cta:hover,
.asc-fiche-cta:focus {
	color: var(--asc-blanc);
	background: var(--asc-bleu-nuit);
	transform: translateY(-1px);
}

.asc-fiche-cta svg {
	transition: transform .2s ease;
}

.asc-fiche-cta:hover svg {
	transform: translateX(3px);
}

.asc-fiche-bloc {
	padding: 22px 24px;
	border-bottom: 1px solid var(--asc-gris-bord);
}

.asc-fiche-bloc:last-child {
	border-bottom: 0;
}

.asc-fiche-bloc__titre {
	margin: 0 0 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #98a0ac;
}

/* Informations pratiques : libellé au-dessus, valeur en dessous —
   les valeurs longues (« du 22.09.2026 au 08.12.2026 ») restent lisibles. */
.asc-fiche-infos-liste {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}

.asc-fiche-infos-liste__ligne {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.asc-fiche-infos-liste dt {
	font-size: 12px;
	font-weight: 600;
	color: var(--asc-gris-texte);
}

.asc-fiche-infos-liste dd {
	margin: 0;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--asc-encre);
}

.asc-fiche-points {
	padding: 0;
	margin: 0;
	list-style: none;
}

.asc-fiche-points li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--asc-gris-texte);
}

.asc-fiche-points li:last-child {
	margin-bottom: 0;
}

.asc-fiche-points svg {
	margin-top: 2px;
	color: var(--asc-bleu);
}

.asc-fiche-tarifs {
	margin: 0;
}

.asc-fiche-tarifs__ligne {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px dashed var(--asc-gris-bord);
}

.asc-fiche-tarifs__ligne:last-child {
	border-bottom: 0;
}

.asc-fiche-tarifs dt {
	font-size: 13.5px;
	color: var(--asc-gris-texte);
}

.asc-fiche-tarifs dd {
	margin: 0;
	font-size: 13.5px;
	font-weight: 700;
	text-align: right;
	color: var(--asc-encre);
}

.asc-fiche-notes {
	padding: 14px 0 0;
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: #8a929e;
	list-style: none;
	border-top: 1px solid var(--asc-gris-bord);
}

.asc-fiche-notes li {
	margin: 0 0 4px;
}

/* --- Responsive ----------------------------------------------------- */

@media (max-width: 1080px) {
	.asc-fiche-corps__inner {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 36px;
	}
}

@media (max-width: 900px) {
	.asc-fiche-hero__inner {
		padding: 52px 20px 44px;
	}

	/* Le texte prend toute la largeur : le voile ne peut plus s'alléger à droite. */
	.asc-fiche-hero__media::after {
		background: linear-gradient(180deg, rgba(18, 20, 25, .8) 0%, rgba(18, 20, 25, .9) 100%);
	}

	.asc-fiche-corps__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
		padding: 40px 20px 52px;
	}

	/* Prix et bouton d'abord sur mobile : la décision d'achat avant le détail. */
	.asc-fiche-lateral {
		position: static;
		order: -1;
	}

	.asc-fiche-section__titre {
		padding: 16px 18px;
	}

	.asc-fiche-section__contenu {
		padding: 0 18px 18px;
	}
}

/* ------------------------------------------------------------------ *
 * Barre de recherche seule — [asc_cours_barre]
 *
 * Même barre que le catalogue, sans la marge basse de 48px qui la sépare
 * du tableau. Remontée sur la section précédente via l'attribut
 * « chevauchement » du shortcode (0 par défaut).
 * ------------------------------------------------------------------ */

.asc-cours--barre .asc-cours-search {
	margin-bottom: 0;
}

@media (max-width: 980px) {
	.asc-cours--barre .asc-cours-search {
		margin-top: 0;
	}
}

/* ------------------------------------------------------------------ *
 * Barre fixée en bas de l'écran — [asc_cours_barre fixe="oui"]
 *
 * Grand écran uniquement : carte flottante centrée, détachée du bord.
 * Sous 981px, la barre redevient une barre normale, à sa place dans la page.
 * ------------------------------------------------------------------ */

@media (min-width: 981px) {
	.asc-cours--fixe {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		/* Au-dessus des sections et modules Divi (z-index jusqu'à 99999 pour le header). */
		z-index: 999990;
		padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
		pointer-events: none; /* Les marges latérales laissent cliquer la page dessous. */
		animation: asc-barre-entree .45s cubic-bezier(.2, .8, .2, 1) both;
	}

	.asc-cours--fixe .asc-cours-search {
		max-width: 1000px;
		margin: 0 auto;
		pointer-events: auto;
	}

	.asc-cours--fixe .asc-cours-search__bar {
		padding: 10px 10px 10px 18px;
		border: 1px solid rgba(21, 80, 197, .12);
		border-radius: 16px;
		box-shadow: 0 18px 50px rgba(10, 44, 112, .22), 0 2px 8px rgba(10, 44, 112, .08);
	}

	.asc-cours--fixe .asc-cours-search__submit {
		width: 44px;
		height: 44px;
		border-radius: 12px;
	}

	/* En bas de l'écran, les listes à cocher s'ouvrent vers le haut. */
	.asc-cours--fixe .asc-cours-multi__panneau {
		top: auto;
		bottom: calc(100% + 8px);
	}

	/* Place réservée en bas de page : le pied de page reste lisible. */
	body:has(.asc-cours--fixe) {
		padding-bottom: calc(var(--asc-barre-fixe-h, 80px) + 8px);
	}

	/* Bouton « haut de page » de Divi : remonté au-dessus de la barre. */
	body:has(.asc-cours--fixe) .et_pb_scroll_top {
		bottom: calc(var(--asc-barre-fixe-h, 80px) + 24px) !important;
	}
}

@keyframes asc-barre-entree {
	from {
		opacity: 0;
		transform: translateY(24px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asc-cours--fixe {
		animation: none;
	}
}

/* ------------------------------------------------------------------ *
 * Grande barre « moteur de recherche » — [asc_cours_barre grand="oui"]
 *
 * Pour une section de la page d'accueil : grand champ et bouton
 * « Rechercher » sur la première ligne, filtres répartis sur toute la
 * largeur en dessous. Même formulaire, même envoi vers le catalogue.
 * ------------------------------------------------------------------ */

.asc-cours--grand .asc-cours-search {
	max-width: 100%;
}

.asc-cours--grand .asc-cours-search__bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"query submit"
		"filters filters";
	gap: 16px;
	padding: 24px;
	border: 1px solid rgba(21, 80, 197, .1);
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(10, 44, 112, .16), 0 2px 8px rgba(10, 44, 112, .06);
}

.asc-cours--grand .asc-cours-search__query {
	grid-area: query;
	height: 64px;
	padding: 0 22px;
	background: var(--asc-gris-fond);
	border: 1px solid var(--asc-gris-bord);
	border-radius: 14px;
	transition: border-color .2s ease, background-color .2s ease;
}

.asc-cours--grand .asc-cours-search__query:focus-within {
	background: var(--asc-blanc);
	border-color: var(--asc-bleu);
}

.asc-cours--grand .asc-cours-search__query input[type="search"] {
	font-size: 20px;
}

.asc-cours--grand .asc-cours-search__submit {
	grid-area: submit;
	gap: 10px;
	width: auto;
	height: 64px;
	padding: 0 32px;
	font-size: 17px;
	font-weight: 600;
	border-radius: 14px;
}

.asc-cours--grand .asc-cours-search__submit svg {
	width: 20px;
	height: 20px;
}

/* Filtres en colonnes égales sur toute la largeur. */
.asc-cours--grand .asc-cours-search__filters {
	grid-area: filters;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}

.asc-cours--grand .asc-cours-select select,
.asc-cours--grand .asc-cours-multi__bouton {
	width: 100%;
	padding: 13px 36px 13px 18px;
	font-size: 15px;
	background-position: right 16px center;
	background-size: 11px;
}

.asc-cours--grand .asc-cours-multi__panneau {
	min-width: 100%;
}

.asc-cours--grand .asc-cours-multi__option {
	font-size: 15px;
}

@media (max-width: 980px) {
	.asc-cours--grand .asc-cours-search__bar {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"query"
			"filters"
			"submit";
		gap: 12px;
		padding: 16px;
		border-radius: 16px;
	}

	/* Annule le séparateur de la barre normale sur mobile. */
	.asc-cours--grand .asc-cours-search__query {
		height: 56px;
		padding: 0 18px;
		border-bottom: 1px solid var(--asc-gris-bord);
	}

	.asc-cours--grand .asc-cours-search__query input[type="search"] {
		font-size: 17px;
	}

	.asc-cours--grand .asc-cours-search__filters {
		grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	}

	.asc-cours--grand .asc-cours-search__submit {
		width: 100%;
		height: 56px;
	}
}
