/* ==========================================================================
   Calendrier des Formations — front
   Couleurs pilotées par : --cdf-primary, --cdf-accent, --cdf-radius
   Couleur d'une session / d'un type : --c
   ========================================================================== */

.cdf {
	--cdf-primary: #0b5fff;
	--cdf-accent: #ff7a1a;
	--cdf-radius: 14px;
	--cdf-ink: #0f172a;
	--cdf-text: #334155;
	--cdf-muted: #64748b;
	--cdf-line: #e2e8f0;
	--cdf-soft: #f8fafc;
	--cdf-surface: #ffffff;
	--cdf-focus: 0 0 0 3px color-mix(in srgb, var(--cdf-primary) 35%, transparent);
	--cdf-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 2px 8px rgb(15 23 42 / .04);
	--cdf-shadow-lg: 0 10px 30px -8px rgb(15 23 42 / .18), 0 2px 6px rgb(15 23 42 / .06);
	--cdf-r-sm: calc(var(--cdf-radius) * .6);
	--cdf-ease: cubic-bezier(.2, .8, .2, 1);

	color: var(--cdf-text);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	container-type: inline-size;
	container-name: cdf;
}

.cdf *,
.cdf *::before,
.cdf *::after { box-sizing: border-box; }

.cdf button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; }
.cdf h3, .cdf h4, .cdf p, .cdf ul, .cdf dl, .cdf dd { margin: 0; padding: 0; }
/* Neutralise les puces imposées par les thèmes (list-style, ::marker ou ::before). */
.cdf ul,
.cdf ol,
.cdf ul > li,
.cdf ol > li { list-style: none !important; }
.cdf ul,
.cdf ol { padding-left: 0 !important; margin-left: 0 !important; }
.cdf ul > li,
.cdf ol > li { margin-left: 0 !important; padding-left: 0 !important; background-image: none !important; }
.cdf ul > li::marker,
.cdf ol > li::marker { content: none !important; }
.cdf ul > li::before,
.cdf ol > li::before { content: none !important; display: none !important; }
.cdf a { text-decoration: none; }
.cdf .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.cdf-i { flex: none; display: block; }

/* ---------- Intro ---------- */
.cdf-intro {
	color: var(--cdf-muted);
	font-size: 1.02em;
	margin-bottom: 1.5rem;
	max-width: 70ch;
}
.cdf-intro p { margin: 0 0 .5em; }

/* ---------- Barre d'outils ---------- */
.cdf-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: .625rem;
	align-items: center;
	margin-bottom: .875rem;
}

.cdf-search,
.cdf-select {
	position: relative;
	display: flex;
	align-items: center;
	height: 44px;
	background: var(--cdf-surface);
	border: 1px solid var(--cdf-line);
	border-radius: 999px;
	transition: border-color .15s, box-shadow .15s;
	margin: 0;
}
.cdf-search { flex: 1 1 260px; min-width: 0; }
.cdf-search:focus-within,
.cdf-select:focus-within { border-color: var(--cdf-primary); box-shadow: var(--cdf-focus); }
.cdf-search > .cdf-i,
.cdf-select > .cdf-i--pin { position: absolute; left: 14px; color: var(--cdf-muted); pointer-events: none; }
.cdf-select > .cdf-i--chevron { position: absolute; right: 12px; color: var(--cdf-muted); pointer-events: none; width: 16px; }

.cdf .cdf-search input,
.cdf .cdf-select select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	outline: 0;
	font: inherit;
	font-size: .95rem;
	color: var(--cdf-ink);
	padding: 0 16px 0 42px;
	border-radius: 999px;
	min-height: 0;
}
.cdf .cdf-select select { padding-right: 38px; cursor: pointer; max-width: 240px; }
.cdf .cdf-search input::placeholder { color: var(--cdf-muted); opacity: 1; }
.cdf .cdf-search input::-webkit-search-cancel-button { cursor: pointer; }

.cdf-views {
	display: inline-flex;
	padding: 4px;
	gap: 2px;
	background: var(--cdf-soft);
	border: 1px solid var(--cdf-line);
	border-radius: 999px;
	flex: none;
}
.cdf .cdf-views__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--cdf-muted);
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s var(--cdf-ease), color .2s, box-shadow .2s;
}
.cdf .cdf-views__btn:hover { color: var(--cdf-ink); }
.cdf .cdf-views__btn[aria-pressed="true"] {
	background: var(--cdf-surface);
	color: var(--cdf-ink);
	box-shadow: 0 1px 3px rgb(15 23 42 / .12);
}
.cdf .cdf-views__btn .cdf-i { width: 16px; height: 16px; }

/* ---------- Puces de types ---------- */
.cdf-chips {
	display: flex;
	gap: .5rem;
	overflow-x: auto;
	padding: 2px 2px 6px;
	margin: 0 -2px .5rem;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.cdf-chips::-webkit-scrollbar { display: none; }
.cdf-chips.is-end { -webkit-mask-image: none; mask-image: none; }
.cdf .cdf-chip {
	--c: var(--cdf-primary);
	flex: none;
	scroll-snap-align: start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 8px 0 14px;
	border: 1px solid var(--cdf-line);
	border-radius: 999px;
	background: var(--cdf-surface);
	color: var(--cdf-ink);
	font-size: .88rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.cdf .cdf-chip:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--cdf-line)); background: color-mix(in srgb, var(--c) 5%, #fff); }
.cdf .cdf-chip:active { transform: scale(.97); }
.cdf-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cdf-chip__count {
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--cdf-soft);
	color: var(--cdf-muted);
	font-size: .75rem;
	display: inline-grid;
	place-items: center;
	font-variant-numeric: tabular-nums;
}
.cdf .cdf-chip[aria-pressed="true"] {
	background: var(--c);
	border-color: var(--c);
	color: #fff;
}
.cdf .cdf-chip[aria-pressed="true"] .cdf-chip__dot { background: #fff; }
.cdf .cdf-chip[aria-pressed="true"] .cdf-chip__count { background: rgb(255 255 255 / .22); color: #fff; }

.cdf-subbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: .25rem 0 1.25rem;
}
.cdf-summary {
	font-size: .88rem;
	color: var(--cdf-muted);
	margin: 0 !important;
	font-weight: 500;
}

/* ---------- Focus ---------- */
.cdf button:focus-visible,
.cdf a:focus-visible,
.cdf summary:focus-visible,
.cdf select:focus-visible {
	outline: 0;
	box-shadow: var(--cdf-focus);
}

/* ---------- Boutons ---------- */
.cdf .cdf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: .92rem;
	font-weight: 600;
	line-height: 1.1;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.cdf .cdf-btn:active { transform: translateY(1px); }
.cdf .cdf-btn .cdf-i { width: 17px; height: 17px; }
.cdf .cdf-btn--primary { background: var(--cdf-accent); color: #fff; box-shadow: 0 4px 14px -6px var(--cdf-accent); }
.cdf .cdf-btn--primary:hover { background: color-mix(in srgb, var(--cdf-accent) 88%, #000); color: #fff; }
.cdf .cdf-btn--primary .cdf-i--arrow { transition: transform .2s var(--cdf-ease); }
.cdf .cdf-btn--primary:hover .cdf-i--arrow { transform: translateX(3px); }
.cdf .cdf-btn--ghost { background: var(--cdf-surface); border-color: var(--cdf-line); color: var(--cdf-ink); }
.cdf .cdf-btn--ghost:hover { border-color: var(--cdf-ink); color: var(--cdf-ink); }
.cdf .cdf-btn--block { width: 100%; }
.cdf .cdf-btn--sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }

.cdf .cdf-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--cdf-line);
	background: var(--cdf-surface);
	color: var(--cdf-ink);
	cursor: pointer;
	padding: 0;
	transition: background .15s, border-color .15s;
}
.cdf .cdf-icon-btn:hover { background: var(--cdf-soft); border-color: var(--cdf-muted); }

/* ---------- Groupes (liste) ---------- */
.cdf-group + .cdf-group { margin-top: 2rem; }
.cdf-group__title {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	margin: 0 0 .875rem !important;
	padding: 0 !important;
	font-size: 1.05rem !important;
	font-weight: 800 !important;
	line-height: 1.3 !important;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cdf-ink);
}
.cdf-group__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--cdf-line);
	align-self: center;
}
.cdf-group__count {
	order: 2;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cdf-muted);
}
.cdf-group--ongoing .cdf-group__title > span:first-child::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 8px;
	border-radius: 50%;
	background: #16a34a;
	box-shadow: 0 0 0 4px rgb(22 163 74 / .18);
	vertical-align: middle;
	animation: cdf-pulse 2s infinite;
}
@keyframes cdf-pulse { 50% { box-shadow: 0 0 0 7px rgb(22 163 74 / 0); } }

.cdf-list { display: grid; gap: .75rem; }
.cdf-list > li { margin: 0; padding: 0; }
.cdf-list > li[hidden],
.cdf-group[hidden] { display: none; }

/* ---------- Carte ---------- */
.cdf-card {
	--c: var(--cdf-primary);
	position: relative;
	background: var(--cdf-surface);
	border: 1px solid var(--cdf-line);
	border-radius: var(--cdf-radius);
	box-shadow: var(--cdf-shadow);
	overflow: hidden;
	transition: box-shadow .25s var(--cdf-ease), border-color .25s, transform .25s var(--cdf-ease);
}
.cdf-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--c);
}
.cdf-js .cdf-card:not(.cdf-card--dialog):hover {
	box-shadow: var(--cdf-shadow-lg);
	border-color: color-mix(in srgb, var(--c) 30%, var(--cdf-line));
}
.cdf-card.is-open { box-shadow: var(--cdf-shadow-lg); }

.cdf-card__head {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1.25rem;
	align-items: center;
	padding: 1.125rem 1.25rem 1.125rem 1.5rem;
}
.cdf-js .cdf-card:not(.cdf-card--dialog) .cdf-card__head { cursor: pointer; }

.cdf-card__date {
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: .6rem .75rem;
	border-radius: var(--cdf-r-sm);
	background: color-mix(in srgb, var(--c) 9%, #fff);
	color: color-mix(in srgb, var(--c) 75%, #000);
	min-width: 76px;
	justify-content: center;
}
.cdf-date { display: grid; justify-items: center; line-height: 1; }
.cdf-date__day { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cdf-date__month { margin-top: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cdf-date--end .cdf-date__day { font-size: 1.25rem; opacity: .8; }
.cdf-date__sep { opacity: .5; }
.cdf-date__sep .cdf-i { width: 14px; height: 14px; }

.cdf-card__main { min-width: 0; }
.cdf-card__tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .45rem; }
.cdf-card__tags:empty { display: none; }

.cdf-tag,
.cdf-badge {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 9px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	white-space: nowrap;
}
.cdf-tag { --c: var(--cdf-primary); background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); }
.cdf-badge--low { background: #fff4e5; color: #b45309; }
.cdf-badge--ok { background: #ecfdf3; color: #15803d; }
.cdf-badge--full { background: #fef2f2; color: #b91c1c; }
.cdf-badge--cancelled { background: #f1f5f9; color: #475569; text-decoration: line-through; }
.cdf-badge--postponed { background: #eef2ff; color: #4338ca; }
.cdf-badge--past { background: #f1f5f9; color: #64748b; }
.cdf-badge--live { background: #ecfdf3; color: #15803d; gap: 6px; }
.cdf-badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.cdf .cdf-card__title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--cdf-ink);
	letter-spacing: -.01em;
}
.cdf .cdf-card__toggle {
	all: unset;
	cursor: pointer;
	color: var(--cdf-ink);
	font-weight: 700;
	overflow-wrap: anywhere;
}
.cdf .cdf-card__toggle::after { content: ""; position: absolute; inset: 0; }
.cdf .cdf-card__toggle:focus-visible { box-shadow: none; }
.cdf .cdf-card__toggle:focus-visible::after { box-shadow: inset var(--cdf-focus); border-radius: var(--cdf-radius); }

.cdf-card__subtitle { margin-top: .15rem !important; color: var(--cdf-muted); font-size: .92rem; }

.cdf-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1.1rem;
	margin-top: .6rem !important;
	color: var(--cdf-text);
	font-size: .88rem;
}
.cdf-card__meta li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.cdf-card__meta .cdf-i { width: 16px; height: 16px; color: var(--cdf-muted); }

.cdf-card__chevron {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--cdf-soft);
	color: var(--cdf-muted);
	transition: transform .3s var(--cdf-ease), background .2s, color .2s;
}
.cdf-card:hover .cdf-card__chevron { background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.cdf-card.is-open .cdf-card__chevron { transform: rotate(180deg); background: var(--c); color: #fff; }
.cdf:not(.cdf-js) .cdf-card__chevron { display: none; }

/* États */
.cdf-card--cancelled .cdf-card__title,
.cdf-card--cancelled .cdf-card__toggle { text-decoration: line-through; text-decoration-color: rgb(15 23 42 / .35); }
.cdf-card--cancelled,
.cdf-card.is-past { --c: #94a3b8; }
.cdf-card--cancelled .cdf-card__head,
.cdf-card.is-past .cdf-card__head { opacity: .72; }

/* Détails (dépliables) */
.cdf-card__details {
	display: grid;
	grid-template-rows: 1fr;
}
.cdf-js .cdf-card:not(.cdf-card--dialog) .cdf-card__details {
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows .35s var(--cdf-ease), visibility 0s .35s;
}
.cdf-js .cdf-card.is-open .cdf-card__details {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows .35s var(--cdf-ease), visibility 0s 0s;
}
.cdf-card__details-inner { overflow: hidden; min-height: 0; }

.cdf-details {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 1.5rem;
	margin: 0 1.25rem 1.25rem 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px dashed var(--cdf-line);
}
.cdf-details__note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: .75rem !important;
	font-size: .9rem;
	color: var(--cdf-ink);
	font-weight: 600;
}
.cdf-details__note .cdf-i { width: 16px; color: var(--cdf-muted); }
.cdf-details__excerpt { color: var(--cdf-text); margin-bottom: 1rem !important; font-size: .95rem; }

.cdf-facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: .75rem;
}
.cdf-fact {
	padding: .75rem .875rem;
	background: var(--cdf-soft);
	border-radius: var(--cdf-r-sm);
}
.cdf-fact dt {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: .25rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cdf-muted);
}
.cdf-fact dt .cdf-i { width: 14px; height: 14px; }
.cdf-fact dd { margin: 0; font-size: .92rem; color: var(--cdf-ink); }

.cdf-details__side { display: grid; gap: 1rem; align-content: start; }

.cdf-seats__label { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; margin-bottom: .4rem; }
.cdf-seats__label strong { color: var(--cdf-ink); font-variant-numeric: tabular-nums; }
.cdf-seats__bar { height: 8px; border-radius: 999px; background: var(--cdf-line); overflow: hidden; }
.cdf-seats__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--cdf-primary); transition: width .6s var(--cdf-ease); }
.cdf-seats.is-low .cdf-seats__bar > span { background: #f59e0b; }

.cdf-place {
	display: flex;
	gap: 10px;
	padding: .875rem;
	border: 1px solid var(--cdf-line);
	border-radius: var(--cdf-r-sm);
	font-size: .9rem;
}
.cdf-place > .cdf-i { color: var(--c); margin-top: 2px; }
.cdf-place strong { display: block; color: var(--cdf-ink); }
.cdf-place address { font-style: normal; color: var(--cdf-muted); margin: 2px 0 6px; }
.cdf-place a { display: inline-flex; align-items: center; gap: 4px; color: var(--cdf-primary); font-weight: 600; font-size: .85rem; }
.cdf-place a .cdf-i { width: 13px; height: 13px; }
.cdf-place a:hover { text-decoration: underline; }

.cdf-actions { display: grid; gap: .5rem; }
.cdf-actions__row { display: flex; gap: .5rem; }
.cdf-actions__row > .cdf-btn { flex: 1; }
.cdf-actions--inline { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }

/* Ajout agenda (menu) */
.cdf-addcal { position: relative; }
.cdf-addcal > summary { list-style: none; }
.cdf-addcal > summary::-webkit-details-marker { display: none; }
.cdf-addcal__menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	z-index: 5;
	min-width: 210px;
	padding: 6px;
	background: var(--cdf-surface);
	border: 1px solid var(--cdf-line);
	border-radius: var(--cdf-r-sm);
	box-shadow: var(--cdf-shadow-lg);
	animation: cdf-pop .16s var(--cdf-ease);
}
.cdf-addcal__menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--cdf-ink);
	font-size: .9rem;
	font-weight: 500;
}
.cdf-addcal__menu a:hover { background: var(--cdf-soft); }
@keyframes cdf-pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }

/* ---------- État vide ---------- */
.cdf-empty {
	text-align: center;
	padding: 3rem 1.5rem;
	border: 1px dashed var(--cdf-line);
	border-radius: var(--cdf-radius);
	background: var(--cdf-soft);
}
.cdf-empty[hidden] { display: none; }
.cdf-empty__icon {
	display: inline-grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: .75rem;
	border-radius: 50%;
	background: var(--cdf-surface);
	color: var(--cdf-primary);
	box-shadow: var(--cdf-shadow);
}
.cdf-empty__icon .cdf-i { width: 26px; height: 26px; }
.cdf-empty__title { font-weight: 700; color: var(--cdf-ink); font-size: 1.05rem; }
.cdf-empty__text { color: var(--cdf-muted); max-width: 46ch; margin: .35rem auto 1.1rem !important; font-size: .92rem; }

/* ---------- Bandeau contact ---------- */
.cdf-contact {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	margin-top: 2rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--cdf-radius);
	background: linear-gradient(120deg, color-mix(in srgb, var(--cdf-primary) 8%, #fff), color-mix(in srgb, var(--cdf-accent) 8%, #fff));
	border: 1px solid color-mix(in srgb, var(--cdf-primary) 14%, var(--cdf-line));
}
.cdf-contact__text { display: grid; gap: 2px; }
.cdf-contact__text strong { color: var(--cdf-ink); font-size: 1.02rem; }
.cdf-contact__text span { color: var(--cdf-muted); font-size: .92rem; }
.cdf-contact__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Vue mensuelle ---------- */
.cdf-panel[hidden] { display: none !important; }

.cdf-cal__head {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-bottom: .875rem;
}
.cdf-cal__nav { display: flex; gap: .375rem; }
.cdf .cdf-cal__title {
	flex: 1;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.35rem !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	color: var(--cdf-ink);
	letter-spacing: -.01em;
}
.cdf .cdf-cal__title::first-letter { text-transform: uppercase; }

.cdf-cal {
	position: relative;
	border: 1px solid var(--cdf-line);
	border-radius: var(--cdf-radius);
	background: var(--cdf-surface);
	overflow: hidden;
	box-shadow: var(--cdf-shadow);
	transition: opacity .2s;
}
.cdf-cal.is-loading { opacity: .55; pointer-events: none; }
.cdf-cal.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 28px;
	height: 28px;
	margin: -14px 0 0 -14px;
	border: 3px solid var(--cdf-line);
	border-top-color: var(--cdf-primary);
	border-radius: 50%;
	animation: cdf-spin .7s linear infinite;
}
@keyframes cdf-spin { to { transform: rotate(360deg); } }

.cdf-cal__weekdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	background: var(--cdf-soft);
	border-bottom: 1px solid var(--cdf-line);
}
.cdf-cal__weekdays span {
	padding: .6rem .5rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cdf-muted);
	text-align: center;
}

.cdf-week { position: relative; }
.cdf-week + .cdf-week { border-top: 1px solid var(--cdf-line); }
.cdf-week__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

.cdf .cdf-day {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	min-height: calc(40px + var(--lanes, 1) * 27px + 22px);
	padding: 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	transition: background .15s;
}
.cdf .cdf-day + .cdf-day { box-shadow: inset 1px 0 0 var(--cdf-line); }
.cdf .cdf-day:hover { background: var(--cdf-soft); }
.cdf .cdf-day.is-other .cdf-day__num { color: #cbd5e1; }
.cdf .cdf-day.is-weekend { background: color-mix(in srgb, var(--cdf-soft) 60%, #fff); }
.cdf-day__num {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: .85rem;
	font-weight: 600;
	color: var(--cdf-ink);
	font-variant-numeric: tabular-nums;
}
.cdf .cdf-day.is-today .cdf-day__num { background: var(--cdf-primary); color: #fff; }
.cdf .cdf-day.is-selected { background: color-mix(in srgb, var(--cdf-primary) 7%, #fff); }
.cdf .cdf-day.is-selected .cdf-day__num { box-shadow: 0 0 0 2px var(--cdf-primary); }
.cdf .cdf-day:focus-visible { box-shadow: inset var(--cdf-focus); }
.cdf-day__more {
	font-size: .72rem;
	font-weight: 700;
	color: var(--cdf-primary);
	padding: 1px 4px;
}

.cdf-week__bars {
	position: absolute;
	inset: 40px 0 auto 0;
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	grid-auto-rows: 24px;
	row-gap: 3px;
	pointer-events: none;
}
.cdf .cdf-bar {
	--c: var(--cdf-primary);
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	margin: 0 5px;
	padding: 0 8px;
	border: 0;
	border-radius: 6px;
	background: color-mix(in srgb, var(--c) 15%, #fff);
	box-shadow: inset 3px 0 0 var(--c);
	color: color-mix(in srgb, var(--c) 70%, #000);
	font-size: .76rem;
	font-weight: 600;
	line-height: 24px;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	transition: filter .15s, transform .1s;
}
.cdf .cdf-bar > span { overflow: hidden; text-overflow: ellipsis; }
.cdf .cdf-bar b { font-weight: 800; }
.cdf .cdf-bar:hover { filter: brightness(.96) saturate(1.2); }
.cdf .cdf-bar.is-cont-left { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: none; }
.cdf .cdf-bar.is-cont-right { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cdf .cdf-bar.is-cancelled { text-decoration: line-through; filter: grayscale(1); opacity: .7; }
.cdf .cdf-bar.is-full { opacity: .75; }

/* Agenda sous la grille */
.cdf-agenda { margin-top: 1.25rem; }
.cdf .cdf-agenda__title {
	margin: 0 0 .625rem !important;
	padding: 0 !important;
	font-size: .8rem !important;
	font-weight: 700 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cdf-muted);
}
.cdf .cdf-agenda__title::first-letter { text-transform: uppercase; }
.cdf-agenda__list { display: grid; gap: .5rem; }
.cdf .cdf-row {
	--c: var(--cdf-primary);
	display: grid;
	grid-template-columns: 10px minmax(110px, auto) 1fr auto;
	align-items: center;
	gap: .875rem;
	width: 100%;
	padding: .75rem 1rem;
	border: 1px solid var(--cdf-line);
	border-radius: var(--cdf-r-sm);
	background: var(--cdf-surface);
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.cdf .cdf-row:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--cdf-line)); box-shadow: var(--cdf-shadow); }
.cdf-row__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cdf-row__date { font-size: .82rem; font-weight: 600; color: var(--cdf-muted); white-space: nowrap; }
.cdf-row__title { font-weight: 700; color: var(--cdf-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdf-row__go { color: var(--cdf-muted); }
.cdf-row__go .cdf-i { width: 16px; }
.cdf-agenda__empty { color: var(--cdf-muted); font-size: .92rem; padding: .5rem 0; }

/* ---------- Fenêtre modale ---------- */
.cdf-dialog {
	width: min(860px, calc(100vw - 32px));
	max-height: min(88vh, 900px);
	padding: 0;
	border: 0;
	border-radius: calc(var(--cdf-radius) + 4px);
	background: var(--cdf-surface);
	color: var(--cdf-text);
	box-shadow: 0 30px 80px -20px rgb(15 23 42 / .45);
	overflow: hidden;
}
.cdf-dialog::backdrop { background: rgb(15 23 42 / .5); backdrop-filter: blur(3px); }
.cdf-dialog[open] { animation: cdf-dialog-in .28s var(--cdf-ease); }
.cdf-dialog[open]::backdrop { animation: cdf-fade .28s ease; }
@keyframes cdf-dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes cdf-fade { from { opacity: 0; } }
.cdf-dialog__inner { container: cdf / inline-size; position: relative; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.cdf .cdf-dialog__close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.cdf-dialog .cdf-card { border: 0; box-shadow: none; border-radius: 0; }
.cdf-dialog .cdf-card::before { width: 100%; height: 5px; inset: 0 0 auto 0; }
.cdf-dialog .cdf-card__head { padding: 1.75rem 4rem 1.25rem 1.75rem; align-items: start; grid-template-columns: auto 1fr; }
.cdf-dialog .cdf-card__title { font-size: 1.4rem !important; }
.cdf-dialog .cdf-details { margin: 0 1.75rem 1.75rem; }

/* ---------- Page d'une session ---------- */
.cdf-single { margin-bottom: 2rem; }
.cdf-single__box {
	--c: var(--cdf-primary);
	position: relative;
	padding: 1.5rem 1.5rem 1.5rem 1.75rem;
	border: 1px solid var(--cdf-line);
	border-radius: var(--cdf-radius);
	background: var(--cdf-surface);
	box-shadow: var(--cdf-shadow);
	overflow: hidden;
}
.cdf-single__box::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.cdf-single__subtitle { font-size: 1.1rem; color: var(--cdf-ink); font-weight: 600; margin: .25rem 0 1rem !important; }
.cdf-facts--single { margin-top: 1rem; }

/* ---------- Responsive (selon la largeur du conteneur) ---------- */
@container cdf (max-width: 760px) {
	.cdf-details { grid-template-columns: 1fr; }
	.cdf-dialog .cdf-card__head { padding: 1.5rem 3.5rem 1rem 1.25rem; }
}

@container cdf (max-width: 620px) {
	.cdf-search { flex-basis: 100%; }
	.cdf-select { flex: 1; }
	.cdf .cdf-select select { max-width: none; }
	.cdf .cdf-views__btn span { display: none; }
	.cdf .cdf-views__btn { padding: 0 12px; }

	.cdf-card__head { grid-template-columns: 1fr auto; gap: .75rem; padding: 1rem 1rem 1rem 1.25rem; }
	.cdf-card__date {
		grid-column: 1 / -1;
		justify-self: start;
		min-width: 0;
		padding: .35rem .6rem;
		gap: .5rem;
	}
	.cdf-date { display: flex; align-items: baseline; gap: 4px; }
	.cdf-date__day,
	.cdf-date--end .cdf-date__day { font-size: 1rem; opacity: 1; }
	.cdf-date__month { margin: 0; }
	.cdf-card__chevron { grid-row: 2; grid-column: 2; align-self: start; }
	.cdf-card__main { grid-row: 2; }
	.cdf-details { margin: 0 1rem 1rem 1.25rem; }
	.cdf-card__meta { gap: .3rem .9rem; font-size: .85rem; }

	.cdf .cdf-day { min-height: 58px; padding: 4px; align-items: center; }
	.cdf-day__num { width: 26px; height: 26px; font-size: .8rem; }
	.cdf-day__more { display: none; }
	.cdf-week__bars { inset: 34px 0 auto 0; grid-auto-rows: 5px; row-gap: 3px; }
	.cdf .cdf-bar { margin: 0 3px; padding: 0; font-size: 0; line-height: 0; border-radius: 3px; background: var(--c); box-shadow: none; }
	.cdf .cdf-bar.is-cont-left { margin-left: 0; }
	.cdf .cdf-bar.is-cont-right { margin-right: 0; }
	.cdf .cdf-bar > * { display: none; }
	.cdf .cdf-cal__title { font-size: 1.1rem !important; }
	.cdf-cal__weekdays span { font-size: .65rem; letter-spacing: .02em; padding: .5rem 0; }

	.cdf .cdf-row { grid-template-columns: 10px 1fr auto; row-gap: 2px; }
	.cdf-row__date { grid-column: 2; grid-row: 1; }
	.cdf-row__title { grid-column: 2; grid-row: 2; white-space: normal; }
	.cdf-row__go { grid-column: 3; grid-row: 1 / 3; }
	.cdf-row__dot { grid-row: 1 / 3; }

	.cdf-contact { padding: 1.1rem; }
	.cdf-contact__actions { width: 100%; }
	.cdf-contact__actions .cdf-btn { flex: 1; }
}

/* La modale s'affiche dans la couche supérieure : on se base sur l'écran. */
@media (max-width: 640px) {
	.cdf-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
	.cdf-dialog[open] { animation-name: cdf-sheet-in; }
	.cdf-dialog .cdf-card__head { padding: 1.5rem 3.5rem 1rem 1.25rem; grid-template-columns: 1fr; }
	.cdf-dialog .cdf-card__date { grid-column: auto; }
	.cdf-dialog .cdf-card__main { grid-row: auto; }
	.cdf-dialog .cdf-details { margin: 0 1.25rem 1.5rem; grid-template-columns: 1fr; }
}
@keyframes cdf-sheet-in { from { transform: translateY(40px); opacity: 0; } }

/* Aperçu dans l'éditeur (pas de JS) : détails repliés */
.editor-styles-wrapper .cdf-card__details,
.block-editor-block-list__layout .cdf-card__details { display: none; }

@media (prefers-reduced-motion: reduce) {
	.cdf *,
	.cdf *::before,
	.cdf *::after,
	.cdf-dialog,
	.cdf-dialog::backdrop { animation: none !important; transition: none !important; }
}

@media print {
	.cdf-toolbar, .cdf-chips, .cdf-card__chevron, .cdf-actions, .cdf-contact, .cdf-panel--month { display: none !important; }
	.cdf-card__details { grid-template-rows: 1fr !important; visibility: visible !important; }
	.cdf-card { break-inside: avoid; box-shadow: none; }
}
