/**
 * Diesel-Bec Formations — module public.
 *
 * Tout est préfixé .dbf- et les jetons sont portés par .dbf-board / .dbf-sheet
 * plutôt que par :root : le module vit dans une page du thème, il ne doit rien
 * imposer au reste de la feuille de styles.
 *
 * Les polices ne sont pas chargées ici — Archivo Black et Roboto Condensed
 * viennent déjà du thème.
 */

.dbf-board,
.dbf-sheet {
	--dbf-paper: #fff;
	--dbf-surface: #f6f6f6;
	--dbf-line: #dedede;
	--dbf-line-fort: #bfbfbf;
	--dbf-ink: #000;
	--dbf-ink-doux: #212529;
	--dbf-muted: #6c757d;

	--dbf-ambre: #eca73f;
	--dbf-ambre-fonce: #a9750f;

	--dbf-ok: #6c757d;
	--dbf-serre: #a9750f;
	--dbf-complet: #6c757d;

	--dbf-titre: "Archivo Black", "Arial Black", Impact, sans-serif;
	--dbf-texte: "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}

.dbf-board *,
.dbf-board *::before,
.dbf-board *::after,
.dbf-sheet *,
.dbf-sheet *::before,
.dbf-sheet *::after {
	box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
	.dbf-sheet-scrim,
	.dbf-sheet-panel {
		animation: none !important;
	}
}

/* ============================================================
   Enveloppe
   ============================================================ */

/*
 * container-type déclare le module comme référent des unités cqw utilisées
 * plus bas pour les tailles de police.
 *
 * cqw plutôt que vw : ce fichier sert trois sites — Diesel-Bec, Superior
 * Diesel, Bell Power — dont les gabarits n'accordent pas la même largeur au
 * module. Une échelle en vw le figerait sur la grille d'un seul d'entre eux ;
 * en cqw il se dimensionne d'après la largeur qu'on lui donne, quel que soit
 * le thème hôte.
 *
 * inline-size et non size : seule la largeur sert de référent, la hauteur
 * reste dictée par le contenu.
 */
.dbf-board {
	container-type: inline-size;

	/*
	 * Base volontairement en rem, pas en cqw : un élément n'est JAMAIS son
	 * propre conteneur de requête. Un cqw écrit ici se rapporterait à la
	 * fenêtre — ou au conteneur du thème hôte s'il en déclare un — et non au
	 * module, ce qui donnait 22 px pour un module large de 1220 px. Les
	 * descendants, eux, se rapportent bien à ce bloc : c'est là que l'échelle
	 * fluide opère. Cette base ne gouverne que le texte sans taille propre.
	 */
	border-top: 2px solid #000;
	background: var(--dbf-paper);
	color: var(--dbf-ink-doux);
	font-family: var(--dbf-texte);
	font-size: 1.1rem;
	line-height: 1.6;
}

.dbf-board :where(a, button, input, select, textarea, [tabindex]):focus-visible,
.dbf-sheet :where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--dbf-ambre);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- Barre d'outils ---------- */

.dbf-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem; /* repli */ gap: max(1rem, calc(1.7cqw - 13.4px)) max(1.5rem, calc(2.5cqw - 19.2px));
	align-items: center;
	justify-content: space-between;
	padding: 1.1rem 0; /* repli */ padding: max(1.1rem, calc(1.8cqw - 13.5px)) 0;
	border-bottom: 1px solid var(--dbf-line);
}

.dbf-filters {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.4rem; /* repli */ gap: max(0.4rem, calc(0.7cqw - 5.7px)) max(1.4rem, calc(2.4cqw - 19.1px));
	align-items: center;
}

.dbf-fgroup {
	display: flex;
	align-items: center;
	gap: .4rem; /* repli */ gap: max(0.4rem, calc(0.7cqw - 5.7px));
	flex-wrap: wrap;
}

.dbf-flabel {
	font-size: 0.76rem; /* repli */
	font-size: max(clamp(0.8rem, 0.3cqw + 0.6rem, 1rem), calc(1.3cqw - 7.7px));
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--dbf-muted);
	font-weight: 500;
}

.dbf-chip {
	cursor: pointer;
	background: transparent;
	border: 0;
	padding: .2rem 0; /* repli */ padding: max(0.2rem, calc(0.3cqw - 2px)) 0;
	margin: 0;
	color: var(--dbf-muted);
	font-family: inherit;
	font-size: 0.95rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px));
	line-height: 1.3;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color .14s, border-color .14s;
}

.dbf-chip:hover { color: #000; }

.dbf-chip[aria-pressed="true"] {
	color: #000;
	font-weight: 700;
	border-bottom-color: var(--dbf-ambre);
}

.dbf-switch {
	display: flex;
	align-items: center;
	gap: .4rem; /* repli */ gap: max(0.4rem, calc(0.7cqw - 5.7px));
	font-size: 0.95rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px));
	color: var(--dbf-muted);
	cursor: pointer;
	user-select: none;
	margin: 0;
}

.dbf-switch input {
	accent-color: var(--dbf-ambre);
	/* Repère cliquable : il doit rester lisible et visable au doigt comme à
	   la souris, donc il grandit avec le module plutôt que de rester à 16 px. */
	width: 20px; /* repli */
	width: max(20px, calc(1.8cqw - 11.1px));
	height: 20px; /* repli */
	height: max(20px, calc(1.8cqw - 11.1px));
	margin: 0;
}

.dbf-switch:hover { color: #000; }

.dbf-viewsw {
	display: flex;
	border: 1px solid #000;
}

.dbf-viewsw button {
	display: flex;
	align-items: center;
	gap: .45rem; /* repli */ gap: max(0.5rem, calc(0.8cqw - 5.8px));
	background: #fff;
	border: 0;
	cursor: pointer;
	padding: .45rem 1rem; /* repli */ padding: max(0.5rem, calc(0.8cqw - 5.8px)) max(1rem, calc(1.7cqw - 13.4px));
	font-family: inherit;
	font-size: 0.86rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.5cqw - 9.5px));
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 500;
	color: #000;
}

.dbf-viewsw button + button { border-left: 1px solid #000; }
.dbf-viewsw button[aria-pressed="true"] { background: var(--dbf-ambre); font-weight: 700; }
/* L'icône suit la taille du libellé : 19 px jusqu'à 1920, 28 px à 2560. */
.dbf-viewsw svg {
	width: 19px; height: 19px; /* repli */
	width: max(19px, calc(1.6cqw - 8.6px));
	height: max(19px, calc(1.6cqw - 8.6px));
	flex: none;
}

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

.dbf-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem; /* repli */ gap: max(0.5rem, calc(0.8cqw - 5.8px));
	cursor: pointer;
	font-family: var(--dbf-texte);
	font-weight: 700;
	font-size: 0.94rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.6cqw - 9.7px));
	text-transform: uppercase;
	letter-spacing: .06em;
	text-decoration: none;
	padding: .8rem 1.5rem; /* repli */ padding: max(0.8rem, calc(1.3cqw - 9.7px)) max(1.5rem, calc(2.5cqw - 19.2px));
	border-radius: 0;
	border: 1px solid transparent;
	transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.dbf-btn-primary { background: var(--dbf-ambre); color: #000; border-color: #000; }
.dbf-btn-primary:hover { background: #f2b65c; border-color: #000; color: #000; }
.dbf-btn-outline { background: transparent; color: var(--dbf-ink); border-color: var(--dbf-line-fort); }
.dbf-btn-outline:hover { border-color: var(--dbf-ink); background: var(--dbf-surface); }
/* Mêmes métriques que .dbf-viewsw button : les deux se lisent à la même taille. */
.dbf-btn-sm { padding: .45rem 1rem; /* repli */ padding: max(0.5rem, calc(0.8cqw - 5.8px)) max(1rem, calc(1.7cqw - 13.4px)); font-size: 0.86rem; /* repli */ font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.5cqw - 9.5px)); }
.dbf-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- État vide ---------- */

.dbf-empty {
	padding: 3.5rem 1rem; /* repli */ padding: max(3.5rem, calc(5.9cqw - 46px)) max(1rem, calc(1.7cqw - 13.4px));
	text-align: center;
	color: var(--dbf-muted);
}

.dbf-empty strong {
	display: block;
	font-family: var(--dbf-titre);
	font-weight: 400;
	color: #000;
	font-size: 1.05rem; /* repli */
	font-size: max(clamp(1.1rem, 0.4cqw + 0.8rem, 1.4rem), calc(1.8cqw - 11.4px));
	margin-bottom: .4rem; /* repli */ margin-bottom: max(0.4rem, calc(0.7cqw - 5.7px));
}

.dbf-empty p { margin: 0 0 1rem; /* repli */ margin: 0 0 max(1rem, calc(1.7cqw - 13.4px)); }

/* ============================================================
   Vue liste
   ============================================================ */

.dbf-list { display: flex; flex-direction: column; }

.dbf-card {
	padding: 1.9rem 0; /* repli */ padding: max(1.9rem, calc(3.2cqw - 24.9px)) 0;
	border-bottom: 1px solid var(--dbf-line);
}

.dbf-card:last-child { border-bottom: 0; }
.dbf-card[hidden] { display: none; }

.dbf-card-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0 1.15rem; /* repli */ gap: 0 max(1.1rem, calc(1.9cqw - 15.2px));
	align-items: start;
}

.dbf-brand { align-self: start; }

.dbf-logoplate {
	background: #fff;
	border: 1px solid var(--dbf-line);
	padding: .5rem .6rem; /* repli */ padding: max(0.5rem, calc(0.8cqw - 5.8px)) max(0.6rem, calc(1cqw - 7.7px));
	display: grid;
	place-items: center;
	/*
	 * Largeur fluide : 96 px jusqu'à 1920 px de fenêtre — la valeur
	 * d'origine — puis croissance avec le module, jusqu'à 153 px à
	 * 2560 px. Un logo figé se perd sur un grand écran.
	 */
	width: 250px; /* repli */
	width: max(250px, calc(32.1cqw - 304.6px));
}

.dbf-logoplate img {
	display: block;
	max-width: 100%;
	height: 68px; /* repli */
	height: max(68px, calc(8.6cqw - 80.6px));
	width: auto;
	object-fit: contain;
}

.dbf-brandname {
	font-size: 0.8rem; /* repli */
	font-size: max(clamp(0.8rem, 0.3cqw + 0.6rem, 1rem), calc(1.4cqw - 9.4px));
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--dbf-muted);
	font-weight: 700;
}

.dbf-card-titre {
	font-family: var(--dbf-titre);
	font-weight: 400;
	font-size: 1.2rem; /* repli */
	font-size: max(clamp(1.2rem, 0.4cqw + 1rem, 1.6rem), calc(2.1cqw - 13.4px));
	line-height: 1.25;
	margin: 0 0 .65rem; /* repli */ margin: 0 0 max(0.7rem, calc(1.1cqw - 7.8px));
	color: #000;
}

.dbf-card-desc {
	color: var(--dbf-muted);
	font-size: 0.97rem; /* repli */
	font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px));
	margin: 0 0 .5rem; /* repli */ margin: 0 0 max(0.5rem, calc(0.8cqw - 5.8px));
}

.dbf-meta {
	display: flex;
	flex-wrap: wrap;
	margin-top: .45rem; /* repli */ margin-top: max(0.5rem, calc(0.8cqw - 5.8px));
	gap: .2rem .5rem; /* repli */ gap: max(0.2rem, calc(0.3cqw - 2px)) max(0.5rem, calc(0.8cqw - 5.8px));
	/* Même expression que .dbf-s-date, à l'identique : la ligne de méta et
	   les lignes de dates se lisent à la même taille. Toute retouche de
	   l'une doit être reportée sur l'autre. */
	font-size: 1rem; /* repli */
	font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px));
	color: var(--dbf-ink-doux);
}

.dbf-meta span { display: inline-flex; align-items: center; gap: .35rem; /* repli */ gap: max(0.3rem, calc(0.6cqw - 5.6px)); }
.dbf-meta span + span::before { content: "·"; color: var(--dbf-line-fort); margin-right: .5rem; }
.dbf-meta .dbf-prix { font-weight: 700; color: #000; }
.dbf-meta .dbf-prix-suffixe { font-weight: 400; color: var(--dbf-muted); }

@media (max-width: 640px) {
	.dbf-card-head { grid-template-columns: 1fr; }

	/*
	 * Le doublement du logo ne vaut que pour le bureau : sur un téléphone
	 * une plaque de 250 px mangerait presque toute la largeur.
	 */
	.dbf-logoplate { width: 125px; }
	.dbf-logoplate img { height: 34px; }
	.dbf-brand { margin-bottom: .9rem; /* repli */ margin-bottom: max(0.9rem, calc(1.5cqw - 11.5px)); }
}

/* ---------- Lignes de dates ---------- */

.dbf-sessions {
	margin-top: 1.15rem; /* repli */ margin-top: max(1.1rem, calc(1.9cqw - 15.2px));
	border-top: 1px solid var(--dbf-line);
}

.dbf-srow {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, .9fr) auto;
	gap: .75rem 1.25rem; /* repli */ gap: max(0.8rem, calc(1.3cqw - 9.7px)) max(1.2rem, calc(2.1cqw - 17.1px));
	align-items: center;
	padding: .85rem 0; /* repli */ padding: max(0.8rem, calc(1.4cqw - 11.4px)) 0;
	border-bottom: 1px solid var(--dbf-line);
}

.dbf-srow:last-child { border-bottom: 0; }
.dbf-srow[hidden] { display: none; }

.dbf-s-date { font-size: 1rem; /* repli */ font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px)); color: #000; font-weight: 500; }
.dbf-s-format { font-size: 0.95rem; /* repli */ font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px)); color: var(--dbf-ink-doux); }
.dbf-s-lieu { color: var(--dbf-muted); }
.dbf-s-lieu::before { content: " · "; }
.dbf-s-places { font-size: 0.95rem; /* repli */ font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px)); color: var(--dbf-muted); }
.dbf-s-act { text-align: right; }

.dbf-pill { font: inherit; }
.dbf-pill-tight { color: var(--dbf-serre); font-weight: 700; }
.dbf-pill-full { color: var(--dbf-complet); }
.dbf-pill-ok { color: var(--dbf-muted); }

.dbf-srow[data-etat="full"] .dbf-s-date,
.dbf-srow[data-etat="full"] .dbf-s-format { color: var(--dbf-muted); }

@media (max-width: 820px) {
	.dbf-srow {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: .35rem 1rem; /* repli */ gap: max(0.3rem, calc(0.6cqw - 5.6px)) max(1rem, calc(1.7cqw - 13.4px));
		padding: 1rem 0; /* repli */ padding: max(1rem, calc(1.7cqw - 13.4px)) 0;
	}
	.dbf-s-date { grid-column: 1; font-weight: 700; }
	.dbf-s-act { grid-column: 2; grid-row: 1 / span 3; }
	.dbf-s-format,
	.dbf-s-places { grid-column: 1; }
}

/* ============================================================
   Vue calendrier
   ============================================================ */

.dbf-calhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem; /* repli */ gap: max(1rem, calc(1.7cqw - 13.4px));
	padding: 1.1rem 0; /* repli */ padding: max(1.1rem, calc(1.8cqw - 13.5px)) 0;
	border-bottom: 1px solid var(--dbf-line);
}

.dbf-calnav { display: flex; align-items: center; gap: .75rem; /* repli */ gap: max(0.8rem, calc(1.3cqw - 9.7px)); }

.dbf-calnav button {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	cursor: pointer;
	font-size: 1.1rem; /* repli */
	font-size: max(clamp(1.1rem, 0.4cqw + 0.9rem, 1.4rem), calc(1.9cqw - 11.5px));
	background: #fff;
	border: 1px solid #000;
	color: #000;
	line-height: 1;
	font-family: inherit;
}

.dbf-calnav button:hover:not([disabled]) { background: var(--dbf-ambre); }
.dbf-calnav button[disabled] { border-color: var(--dbf-line-fort); color: var(--dbf-line-fort); cursor: not-allowed; }

.dbf-calmois {
	font-family: var(--dbf-titre);
	font-weight: 400;
	/*
	 * Les noms de mois arrivent en minuscules du catalogue de chaînes, comme
	 * le veut l'usage français. En tête de bloc, celui-ci se lit comme un
	 * titre : capitalize met l'initiale sans toucher aux chaînes traduites,
	 * et reste sans effet en anglais, où elles sont déjà capitalisées.
	 * Appliqué à toutes les largeurs : un mois capitalisé en mobile et
	 * minuscule en desktop serait une incohérence, pas un choix.
	 */
	text-transform: capitalize;
	font-size: 1.15rem; /* repli */
	font-size: max(clamp(1.1rem, 0.4cqw + 0.9rem, 1.5rem), calc(2cqw - 13.2px));
	min-width: 12ch;
	text-align: center;
	color: #000;
}

.dbf-calgrid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-left: 1px solid var(--dbf-line);
}

.dbf-caldow {
	font-size: 0.76rem; /* repli */
	font-size: max(clamp(0.8rem, 0.3cqw + 0.6rem, 1rem), calc(1.3cqw - 7.7px));
	letter-spacing: .1em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--dbf-muted);
	text-align: center;
	padding: .6rem .25rem; /* repli */ padding: max(0.6rem, calc(1cqw - 7.7px)) max(0.2rem, calc(0.4cqw - 3.7px));
	border-right: 1px solid var(--dbf-line);
	border-bottom: 1px solid var(--dbf-line);
}

.dbf-cell {
	min-height: 112px;
	padding: .45rem .45rem .55rem; /* repli */ padding: max(0.5rem, calc(0.8cqw - 5.8px)) max(0.5rem, calc(0.8cqw - 5.8px)) max(0.6rem, calc(0.9cqw - 6px));
	border-right: 1px solid var(--dbf-line);
	border-bottom: 1px solid var(--dbf-line);
	display: flex;
	flex-direction: column;
	gap: .3rem; /* repli */ gap: max(0.3rem, calc(0.5cqw - 3.8px));
	background: #fff;
}

.dbf-cell.is-out { background: #fafafa; }
.dbf-cell .dbf-dnum { font-size: 0.82rem; /* repli */ font-size: max(clamp(0.8rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.4cqw - 7.8px)); color: var(--dbf-muted); }
.dbf-cell.is-today .dbf-dnum { color: #000; font-weight: 700; }
.dbf-cevs { display: flex; flex-direction: column; gap: .3rem; /* repli */ gap: max(0.3rem, calc(0.5cqw - 3.8px)); }

.dbf-cev {
	display: block;
	width: 100%;
	text-align: left;
	cursor: pointer;
	border: 0;
	background: transparent;
	padding: .25rem .3rem .3rem; /* repli */ padding: max(0.2rem, calc(0.4cqw - 3.7px)) max(0.3rem, calc(0.5cqw - 3.8px)) max(0.3rem, calc(0.5cqw - 3.8px));
	line-height: 1.25;
	border-left: 2px solid var(--dbf-ambre);
	font-family: inherit;
}

.dbf-cev:hover { background: #faf6ee; }

.dbf-cev-t {
	display: block;
	font-size: 0.82rem; /* repli */
	font-size: max(clamp(0.8rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.4cqw - 7.8px));
	font-weight: 500;
	color: #000;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dbf-cev-m { display: block; font-size: 0.76rem; /* repli */ font-size: max(clamp(0.8rem, 0.3cqw + 0.6rem, 1rem), calc(1.3cqw - 7.7px)); color: var(--dbf-muted); }
.dbf-cev[data-etat="full"] { border-left-color: var(--dbf-line-fort); }
.dbf-cev[data-etat="full"] .dbf-cev-t { color: var(--dbf-muted); text-decoration: line-through; }

@media (max-width: 760px) {

	/* ---- Navigation des mois : flèches aux deux bords, mois au centre ---- */

	/*
	 * La navigation prend toute la largeur et répartit ses trois enfants :
	 * flèche gauche au bord gauche, flèche droite au bord droit, mois au
	 * milieu. C'est plus sûr au pouce que trois cibles groupées au centre —
	 * on vise un coin, pas un bouton de 34 px voisin de son jumeau.
	 *
	 * 44 px est la cible tactile minimale recommandée par Apple comme par
	 * Google ; les flèches y étaient nettement en dessous.
	 */
	.dbf-calhead { justify-content: stretch; }

	.dbf-calnav {
		width: 100%;
		justify-content: space-between;
		gap: .5rem;
	}

	.dbf-calnav button {
		width: 44px;
		height: 44px;
		font-size: 1.6rem;
	}

	/* Le mois occupe tout l'espace restant et s'y centre. */
	.dbf-calmois { flex: 1; }

	/* ---- Bascule liste / calendrier : pleine largeur ---- */

	.dbf-viewsw { width: 100%; }

	.dbf-viewsw button {
		flex: 1;
		justify-content: center;
		min-height: 44px;
	}

	/* ---- Filtres ---- */

	/*
	 * En desktop les filtres sont une ligne de mots soulignés : dense, lisible
	 * à la souris. Au doigt, c'était une cible de 0,2 rem de haut sans contour,
	 * et trois groupes se disputaient la même ligne.
	 *
	 * Ici chaque groupe prend sa propre bande : l'étiquette occupe une ligne
	 * entière — c'est le rôle du « flex: 0 0 100% », qui pousse les choix à la
	 * ligne suivante sans rien changer au HTML — et les choix deviennent de
	 * vraies pastilles cliquables, cadrées et hautes de 44 px.
	 */
	.dbf-filters {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 1.1rem;
	}

	.dbf-fgroup {
		flex-wrap: wrap;
		gap: .5rem;
	}

	.dbf-flabel { flex: 0 0 100%; }

	.dbf-chip {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: .5rem .9rem;
		background: #fff;
		color: #000;
		/* Le soulignement ambre de 2 px cède la place à un cadre complet. */
		border: 1px solid var(--dbf-line-fort);
	}

	.dbf-chip[aria-pressed="true"] {
		background: var(--dbf-ambre);
		border-color: #000;
		color: #000;
	}

	/* La case « places disponibles » devient une bande au même gabarit. */
	.dbf-switch {
		width: 100%;
		min-height: 44px;
		padding: .5rem .9rem;
		border: 1px solid var(--dbf-line);
		color: #000;
	}

	/* ---- Calendrier ---- */

	.dbf-calgrid { grid-template-columns: 1fr; border-left: 0; }
	.dbf-caldow { display: none; }
	.dbf-cell {
		min-height: 0;
		flex-direction: row;
		align-items: flex-start;
		gap: .9rem; /* repli */ gap: max(0.9rem, calc(1.5cqw - 11.5px));
		border-right: 0;
		padding: .7rem .2rem; /* repli */ padding: max(0.7rem, calc(1.2cqw - 9.5px)) max(0.2rem, calc(0.3cqw - 2px));
	}
	.dbf-cell.is-out,
	.dbf-cell.is-empty { display: none; }
	/*
	 * En une colonne, le chiffre est la seule ancre de lecture de la
	 * ligne : il porte la date à lui seul, l'en-tête des jours étant
	 * masqué à cette largeur. Il passe donc de 0,82 à 1,5 rem.
	 * min-width tient deux chiffres sans que les titres se décalent
	 * entre le 9 et le 10.
	 */
	.dbf-cell .dbf-dnum {
		min-width: 2.6rem;
		font-size: 1.5rem;
		line-height: 1.1;
		padding-top: 0;
		font-weight: 700;
		color: #000;
	}
	/*
	 * min-width: 0 est la pièce maîtresse.
	 *
	 * Un élément flex refuse par défaut de se réduire sous la taille de son
	 * contenu (min-width: auto). Le titre étant en white-space: nowrap, la
	 * colonne s'étirait à la longueur de la plus longue ligne et débordait du
	 * cadre, au lieu de laisser l'ellipse ou le repli opérer. C'est le piège
	 * classique de flexbox, et il ne se voit qu'une fois le contenu long.
	 */
	.dbf-cell .dbf-cevs { flex: 1; min-width: 0; }

	/*
	 * En une colonne, la largeur ne manque plus : le titre se replie sur
	 * plusieurs lignes plutôt que d'être tronqué. L'ellipse n'a de sens que
	 * dans la grille à sept colonnes du desktop, où chaque case est étroite.
	 */
	.dbf-cev-t {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		/*
		 * Le titre est le contenu utile de la ligne, et non plus une étiquette
		 * serrée dans une case de grille : il monte de 0,8 à 1,05 rem. La ligne
		 * de format et de places suit à 0,9 rem pour rester lisible sans lui
		 * disputer l'attention.
		 */
		font-size: 1.05rem;
		line-height: 1.35;
	}

	.dbf-cev-m { font-size: 0.9rem; }

	/* Un peu d'air : trois lignes de titre collées se lisent mal. */
	.dbf-cev { padding: .5rem .4rem .55rem; }
}

/* ============================================================
   Panneau d'inscription
   ============================================================ */

.dbf-sheet[hidden] { display: none; }

/*
 * Le panneau est en position fixe : il sort du flux du module et ne peut donc
 * pas se rapporter à son conteneur. Il devient le sien, dont la largeur vaut
 * celle de la fenêtre.
 */
.dbf-sheet {
	position: fixed;
	inset: 0;
	z-index: 10000;
	container-type: inline-size;
	font-family: var(--dbf-texte);
	font-size: 1.1rem;
	line-height: 1.6;
}

.dbf-sheet-scrim {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	animation: dbf-fade .2s ease;
}

@keyframes dbf-fade { from { opacity: 0; } to { opacity: 1; } }

.dbf-sheet-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(100%, 820px);
	background: #000;
	color: #fff;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .6);
	/* Fondu simple, aligné sur le panneau du gabarit. */
	animation: dbf-apparait .24s ease;
}

@keyframes dbf-apparait { from { opacity: 0; } to { opacity: 1; } }

.dbf-sheet-close {
	position: absolute;
	top: 1.1rem;
	right: 1.4rem;
	z-index: 2;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 1.9rem; /* repli */
	font-size: max(clamp(1.9rem, 0.6cqw + 1.5rem, 2.5rem), calc(3.3cqw - 22.7px));
	line-height: 1;
	cursor: pointer;
	padding: .2rem .4rem; /* repli */ padding: max(0.2rem, calc(0.3cqw - 2px)) max(0.4rem, calc(0.7cqw - 5.7px));
	font-family: inherit;
}

.dbf-sheet-close:hover { color: var(--dbf-ambre); }

.dbf-sheet-in { padding: clamp(2.6rem, 5vw, 3.6rem) clamp(1.4rem, 4vw, 3.4rem) 2.4rem; }

.dbf-sheet-in h2 {
	font-family: var(--dbf-titre);
	font-weight: 400;
	font-size: 1.9rem; /* repli, navigateurs sans unités de conteneur */
	font-size: max(clamp(1.9rem, 4cqw, 2.6rem), calc(3.9cqw - 25.8px));
	color: #fff;
	margin: 0 0 .5rem; /* repli */ margin: 0 0 max(0.5rem, calc(0.8cqw - 5.8px));
	line-height: 1.1;
}

.dbf-sheet-lede {
	color: #a9a9a9;
	font-size: 0.95rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px));
	margin: 0 0 2.2rem; /* repli */ margin: 0 0 max(2.2rem, calc(3.7cqw - 28.7px));
}

/* ---------- Champs sur fond noir ---------- */

.dbf-fset { margin: 0 0 2rem; /* repli */ margin: 0 0 max(2rem, calc(3.4cqw - 26.8px)); padding: 0; border: 0; }

.dbf-fset > legend {
	font-size: 0.76rem; /* repli */
	font-size: max(clamp(0.8rem, 0.3cqw + 0.6rem, 1rem), calc(1.3cqw - 7.7px));
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--dbf-ambre);
	padding: 0 0 .7rem; /* repli */ padding: 0 0 max(0.7rem, calc(1.2cqw - 9.5px));
	width: 100%;
	border-bottom: 1px solid #2e2e2e;
	margin-bottom: 1.3rem; /* repli */ margin-bottom: max(1.3rem, calc(2.2cqw - 17.2px));
	font-weight: 700;
}

.dbf-fline { margin-bottom: 1.4rem; /* repli */ margin-bottom: max(1.4rem, calc(2.4cqw - 19.1px)); }

.dbf-fline > label {
	display: block;
	font-size: 0.95rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px));
	font-weight: 700;
	color: #fff;
	margin-bottom: .15rem; /* repli */ margin-bottom: max(0.1rem, calc(0.3cqw - 3.6px));
}

.dbf-req { color: #e23a3a; }

.dbf-fline input,
.dbf-fline select,
.dbf-fline textarea {
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #4a4a4a;
	border-radius: 0;
	color: #fff;
	font-family: var(--dbf-texte);
	font-size: 1rem; /* repli */
	font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px));
	padding: .6rem 0; /* repli */ padding: max(0.6rem, calc(1cqw - 7.7px)) 0;
	-webkit-appearance: none;
	appearance: none;
}

.dbf-fline input::placeholder { color: #7e7e7e; }
.dbf-fline input:focus,
.dbf-fline select:focus { border-bottom-color: var(--dbf-ambre); outline: 2px solid transparent; }
.dbf-fline input[readonly] { color: var(--dbf-ambre); border-bottom-style: dashed; cursor: default; }
.dbf-fline input[aria-invalid="true"] { border-bottom-color: #e23a3a; }

.dbf-hint { display: block; font-size: 0.82rem; /* repli */ font-size: max(clamp(0.8rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.4cqw - 7.8px)); color: #8a8a8a; margin-top: .35rem; /* repli */ margin-top: max(0.3rem, calc(0.6cqw - 5.6px)); }
.dbf-erreur-champ { display: block; font-size: 0.82rem; /* repli */ font-size: max(clamp(0.8rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.4cqw - 7.8px)); color: #ff8a8a; margin-top: .35rem; /* repli */ margin-top: max(0.3rem, calc(0.6cqw - 5.6px)); }

.dbf-fpair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; /* repli */ gap: max(1.4rem, calc(2.4cqw - 19.1px)); }

@media (max-width: 620px) {
	.dbf-fpair { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Participants ---------- */

.dbf-parts { display: flex; flex-direction: column; gap: 1.1rem; /* repli */ gap: max(1.1rem, calc(1.8cqw - 13.5px)); }
.dbf-part { position: relative; }

.dbf-plabel {
	display: block;
	font-size: 0.95rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px));
	font-weight: 700;
	color: #fff;
	margin-bottom: .4rem; /* repli */ margin-bottom: max(0.4rem, calc(0.7cqw - 5.7px));
}

.dbf-pfields {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: .6rem; /* repli */ gap: max(0.6rem, calc(1cqw - 7.7px));
	align-items: center;
}

@media (max-width: 620px) {
	.dbf-pfields { grid-template-columns: 1fr auto; }
}

.dbf-part input {
	background: #fff;
	color: #111;
	border: 0;
	border-radius: 0;
	width: 100%;
	font-family: var(--dbf-texte);
	font-size: 0.98rem; /* repli */
	font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px));
	padding: .7rem .8rem; /* repli */ padding: max(0.7rem, calc(1.2cqw - 9.5px)) max(0.8rem, calc(1.3cqw - 9.7px));
}

.dbf-part input::placeholder { color: #8a8a8a; }
.dbf-part input:focus { outline: 2px solid var(--dbf-ambre); outline-offset: -2px; }

.dbf-part-rm {
	background: transparent;
	border: 1px solid #4a4a4a;
	color: #b5b5b5;
	width: 38px;
	height: 40px;
	cursor: pointer;
	display: grid;
	place-items: center;
	font-size: 1rem; /* repli */
	font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px));
	font-family: inherit;
}

.dbf-part-rm:hover { border-color: #e23a3a; color: #e23a3a; }

@media (max-width: 620px) {
	.dbf-part-rm { grid-column: 2; grid-row: 1 / span 2; }
}

.dbf-addpart {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem; /* repli */ gap: max(1rem, calc(1.7cqw - 13.4px));
	margin-top: 1.2rem; /* repli */ margin-top: max(1.2rem, calc(2cqw - 15.4px));
	flex-wrap: wrap;
}

.dbf-addpart .dbf-cnt { font-size: 0.88rem; /* repli */ font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.5cqw - 9.5px)); color: #8a8a8a; }

.dbf-btn-onblack { background: transparent; color: #fff; border: 1px solid #5a5a5a; }
.dbf-btn-onblack:hover { border-color: var(--dbf-ambre); color: var(--dbf-ambre); }
.dbf-btn-onblack[disabled] { opacity: .4; }

/* ---------- Termes et consentement ---------- */

.dbf-tc { border: 1px solid #2e2e2e; margin-top: .4rem; /* repli */ margin-top: max(0.4rem, calc(0.7cqw - 5.7px)); }

.dbf-tc summary {
	cursor: pointer;
	padding: .7rem .9rem; /* repli */ padding: max(0.7rem, calc(1.2cqw - 9.5px)) max(0.9rem, calc(1.5cqw - 11.5px));
	font-size: 0.92rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.2rem), calc(1.6cqw - 11.3px));
	color: #cfcfcf;
	list-style: none;
}

.dbf-tc summary::-webkit-details-marker { display: none; }
.dbf-tc summary::before { content: "+ "; color: var(--dbf-ambre); font-weight: 700; }
.dbf-tc[open] summary::before { content: "– "; }

.dbf-tctext {
	padding: 0 1rem 1rem; /* repli */ padding: 0 max(1rem, calc(1.7cqw - 13.4px)) max(1rem, calc(1.7cqw - 13.4px));
	font-size: 0.88rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.5cqw - 9.5px));
	color: #9a9a9a;
	max-height: 230px;
	overflow-y: auto;
}

.dbf-tctext p { margin: 0 0 .7rem; /* repli */ margin: 0 0 max(0.7rem, calc(1.2cqw - 9.5px)); }

.dbf-consent {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .7rem; /* repli */ gap: max(0.7rem, calc(1.2cqw - 9.5px));
	margin-top: 1.2rem; /* repli */ margin-top: max(1.2rem, calc(2cqw - 15.4px));
	font-size: 0.94rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.6cqw - 9.7px));
	color: #dedede;
}

.dbf-consent input {
	accent-color: var(--dbf-ambre);
	width: 1.1rem;
	height: 1.1rem;
	margin-top: .2rem; /* repli */ margin-top: max(0.2rem, calc(0.3cqw - 2px));
}

/* ---------- Avis liste d'attente ---------- */

.dbf-wl {
	display: flex;
	gap: .7rem; /* repli */ gap: max(0.7rem, calc(1.2cqw - 9.5px));
	padding: .9rem 1rem; /* repli */ padding: max(0.9rem, calc(1.5cqw - 11.5px)) max(1rem, calc(1.7cqw - 13.4px));
	background: #1a1409;
	border-left: 3px solid var(--dbf-ambre);
	font-size: 0.94rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.6cqw - 9.7px));
	color: #dedede;
	margin-bottom: 1.8rem; /* repli */ margin-bottom: max(1.8rem, calc(3cqw - 23px));
}

.dbf-wl b { color: var(--dbf-ambre); }

/* ---------- Pied du panneau ---------- */

.dbf-sheet-foot {
	margin-top: 2rem; /* repli */ margin-top: max(2rem, calc(3.4cqw - 26.8px));
	padding-top: 1.6rem; /* repli */ padding-top: max(1.6rem, calc(2.7cqw - 21.1px));
	border-top: 1px solid #2e2e2e;
}

.dbf-sheet-foot .dbf-note {
	display: block;
	font-size: 0.88rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.1rem), calc(1.5cqw - 9.5px));
	color: #8a8a8a;
	margin-bottom: 1rem; /* repli */ margin-bottom: max(1rem, calc(1.7cqw - 13.4px));
}

.dbf-sheet-foot .dbf-btn {
	width: 100%;
	justify-content: center;
	padding: 1rem 1.5rem; /* repli */ padding: max(1rem, calc(1.7cqw - 13.4px)) max(1.5rem, calc(2.5cqw - 19.2px));
	font-size: 1rem; /* repli */
	font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px));
}

.dbf-erreur {
	background: #2a1010;
	border-left: 3px solid #e23a3a;
	color: #ffd7d7;
	padding: .8rem 1rem; /* repli */ padding: max(0.8rem, calc(1.3cqw - 9.7px)) max(1rem, calc(1.7cqw - 13.4px));
	font-size: 0.92rem; /* repli */
	font-size: max(clamp(0.9rem, 0.3cqw + 0.7rem, 1.2rem), calc(1.6cqw - 11.3px));
	margin-bottom: 1rem; /* repli */ margin-bottom: max(1rem, calc(1.7cqw - 13.4px));
}

/* ---------- Confirmation ---------- */

.dbf-success { padding: 1rem 0 0; /* repli */ padding: max(1rem, calc(1.7cqw - 13.4px)) 0 0; }

.dbf-success .dbf-mark {
	width: 52px;
	height: 52px;
	margin-bottom: 1.4rem; /* repli */ margin-bottom: max(1.4rem, calc(2.4cqw - 19.1px));
	display: grid;
	place-items: center;
	background: var(--dbf-ambre);
	color: #000;
	font-size: 1.6rem; /* repli */
	font-size: max(clamp(1.6rem, 0.5cqw + 1.3rem, 2.1rem), calc(2.8cqw - 18.9px));
	font-weight: 700;
}

.dbf-success p { color: #a9a9a9; margin: 0 0 1.6rem; /* repli */ margin: 0 0 max(1.6rem, calc(2.7cqw - 21.1px)); font-size: 0.98rem; /* repli */ font-size: max(clamp(1rem, 0.3cqw + 0.8rem, 1.3rem), calc(1.7cqw - 11.4px)); }

.dbf-recap { border-top: 1px solid #2e2e2e; font-size: 0.95rem; /* repli */ font-size: max(clamp(0.9rem, 0.3cqw + 0.8rem, 1.2rem), calc(1.7cqw - 11.4px)); }

.dbf-recap div {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem; /* repli */ gap: max(1.5rem, calc(2.5cqw - 19.2px));
	padding: .75rem 0; /* repli */ padding: max(0.8rem, calc(1.3cqw - 9.7px)) 0;
	border-bottom: 1px solid #2e2e2e;
}

.dbf-recap span:first-child { color: #8a8a8a; }
.dbf-recap span:last-child { text-align: right; color: #fff; }

/* Annonce aux lecteurs d'écran, invisible à l'œil. */
.dbf-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	margin: -1px;
	padding: 0;
	border: 0;
}

/* Honeypot : hors écran, jamais display:none — certains robots l'ignoreraient. */
.dbf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
