/* widget-call-projects.css — « DP – Appel à projets »
   Le texte d'un côté, le calendrier de l'autre, le formulaire dessous quand il
   est intégré. Une seule marque de couleur : le liseré de la prochaine date.
   Un seul bouton plein : la candidature. */

.dp-cfp {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--dp-cfp-aside, 300px);
	align-items: start;
	gap: var(--dp-cfp-gap, clamp(32px, 5vw, 72px));
	padding: clamp(28px, 4vw, 56px);
	border-radius: var(--dp-cfp-radius, var(--dp-radius-lg, 20px));
	background: var(--dp-cfp-surface, var(--dp-color-surface-grey, #f4f6f6));
	color: var(--dp-cfp-text, var(--dp-cfp-on-muted, var(--dp-nc-text, var(--dp-color-text-muted, #5b5b5b))));
	font-family: var(--dp-font-base, inherit);
	box-sizing: border-box;
}

.dp-cfp--no-calendar {
	grid-template-columns: minmax(0, 1fr);
}

/* ── Fonds ──
   Le panneau profond est le seul fond sombre : c'est lui qui pose le blanc,
   par deux jetons `on` que les règles de texte lisent avant la charte. Le
   jeton `-deep` garantit le contraste du blanc (cf. dp-charte §4e). */
.dp-cfp--surface-white {
	--dp-cfp-surface: var(--dp-color-surface, #ffffff);
	border: 1px solid var(--dp-cfp-rule, var(--dp-color-border, #dedede));
}

.dp-cfp--surface-tint {
	--dp-cfp-surface: var(--dp-color-primary-soft, #ecf8f9);
}

.dp-cfp--surface-deep {
	--dp-cfp-surface: var(--dp-color-primary-deep, #325f66);
	--dp-cfp-on: #ffffff;
	--dp-cfp-on-muted: rgba(255, 255, 255, 0.84);
}

/* ── Le texte ── */
.dp-cfp__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.dp-cfp__main > * {
	margin: 0;
}

.dp-cfp .dp-cfp__eyebrow {
	margin-bottom: 14px;
	font-family: var(--dp-font-heading, inherit);
	font-weight: 700;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: var(--dp-tracking-caps, 0.12em);
	text-transform: uppercase;
	color: var(--dp-cfp-eyebrow, var(--dp-cfp-on, var(--dp-nc-eyebrow, var(--dp-color-primary-strong, #417e88))));
}

.dp-cfp .dp-cfp__title {
	font-family: var(--dp-font-heading, inherit);
	font-weight: var(--dp-font-heading-weight, 700);
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--dp-cfp-title, var(--dp-cfp-on, var(--dp-nc-title, var(--dp-color-text, #303030))));
}

/* L'état : une ligne de texte, pas une pastille de couleur — la couleur est
   déjà portée par le calendrier. Le point ne revient que sans calendrier. */
.dp-cfp .dp-cfp__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-top: 18px;
	font-family: var(--dp-font-heading, inherit);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.4;
	color: var(--dp-cfp-title, var(--dp-cfp-on, var(--dp-nc-title, var(--dp-color-text, #303030))));
}

.dp-cfp__dot {
	display: none;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--dp-cfp-status, var(--dp-color-text-faint, #8a8a8a));
}

.dp-cfp--no-calendar .dp-cfp__dot {
	display: inline-block;
}

.dp-cfp--open .dp-cfp__dot {
	background: var(--dp-cfp-status, var(--dp-color-primary, #61c2d0));
}

.dp-cfp__countdown {
	font-weight: 400;
	color: var(--dp-cfp-text, var(--dp-cfp-on-muted, var(--dp-color-text-muted, #5b5b5b)));
}

.dp-cfp__countdown::before {
	content: '·';
	margin-inline-end: 10px;
}

.dp-cfp .dp-cfp__text {
	max-width: 62ch;
	margin-top: 12px;
	font-size: 16px;
	line-height: 1.65;
}

.dp-cfp__text > * {
	margin: 0;
}

.dp-cfp__text > * + * {
	margin-top: 0.8em;
}

/* ── Les actions ── */
.dp-cfp .dp-cfp__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 28px;
	margin-top: 28px;
}

/* Le bouton par défaut du design system est en encre ; l'aplat de marque
   reste un réglage (Couleurs → Bouton). */
.dp-cfp .dp-cfp__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--dp-btn-min-h, 48px);
	padding: var(--dp-btn-pad, 13px 26px);
	border-radius: var(--dp-radius-pill, 999px);
	background: var(--dp-btn-bg, var(--dp-color-text, #303030));
	color: var(--dp-btn-text, #ffffff);
	font-family: var(--dp-font-heading, inherit);
	font-weight: 700;
	font-size: var(--dp-btn-font-size, 15px);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background var(--dp-duration, 0.2s) ease, color var(--dp-duration, 0.2s) ease, transform var(--dp-duration, 0.2s) ease;
}

.dp-cfp .dp-cfp__button:hover,
.dp-cfp .dp-cfp__button:focus-visible {
	background: var(--dp-btn-bg-hover, var(--dp-color-primary-deep, #325f66));
	color: var(--dp-btn-text-hover, var(--dp-btn-text, #ffffff));
	transform: var(--dp-lift-hover, translateY(-2px));
}

.dp-cfp .dp-cfp__button:focus-visible {
	outline: none;
	box-shadow: var(--dp-focus-ring, 0 0 0 2px #fff, 0 0 0 4px #325f66);
}

/* Sur le panneau profond, l'encre se perdrait : le bouton passe au blanc. */
.dp-cfp--surface-deep .dp-cfp__button {
	background: var(--dp-btn-bg, #ffffff);
	color: var(--dp-btn-text, var(--dp-color-text, #303030));
}

.dp-cfp--surface-deep .dp-cfp__button:hover,
.dp-cfp--surface-deep .dp-cfp__button:focus-visible {
	background: var(--dp-btn-bg-hover, var(--dp-color-primary-soft, #ecf8f9));
	color: var(--dp-btn-text-hover, var(--dp-color-text, #303030));
}

/* Dans l'éditeur, un bouton sans lien : visible, mais qui dit qu'il manque. */
.dp-cfp .dp-cfp__button--draft {
	outline: 2px dashed var(--dp-color-border, #dedede);
	outline-offset: 3px;
}

/* Le lien d'action de la charte : capitales suivies et flèche, sans bouton. */
.dp-cfp .dp-cfp__link {
	position: relative;
	font-family: var(--dp-font-heading, inherit);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: var(--dp-tracking-caps, 0.12em);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--dp-cfp-link, var(--dp-cfp-on, var(--dp-nc-link, var(--dp-color-link, #417e88))));
}

/* Zone de toucher de 44 px sans toucher à la mise en page. */
.dp-cfp .dp-cfp__link::before {
	content: '';
	position: absolute;
	inset: -14px 0;
}

.dp-cfp .dp-cfp__link:hover {
	color: var(--dp-cfp-link, var(--dp-cfp-on, var(--dp-nc-link-hover, var(--dp-color-link-hover, #325f66))));
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* ── Le calendrier ──
   Un filet continu, et la prochaine date en grand sur son liseré de 6 px :
   c'est elle qu'on vient chercher. Les dates passées s'estompent. */
.dp-cfp .dp-cfp__calendar {
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dp-cfp__date {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding-inline-start: 20px;
	border-inline-start: 2px solid var(--dp-cfp-rule, var(--dp-nc-rule, var(--dp-color-border, #dedede)));
}

.dp-cfp--surface-deep .dp-cfp__date {
	border-inline-start-color: var(--dp-cfp-rule, rgba(255, 255, 255, 0.32));
}

.dp-cfp__date.is-next {
	padding-inline-start: 16px;
	border-inline-start: 6px solid var(--dp-cfp-status, var(--dp-color-primary, #61c2d0));
}

.dp-cfp .dp-cfp__date-label {
	font-size: 14px;
	line-height: 1.4;
	color: var(--dp-cfp-label, var(--dp-cfp-on-muted, var(--dp-color-text-muted, #5b5b5b)));
}

.dp-cfp .dp-cfp__date-value {
	font-family: var(--dp-font-heading, inherit);
	font-weight: var(--dp-font-heading-weight, 700);
	font-size: 19px;
	line-height: 1.2;
	color: var(--dp-cfp-date, var(--dp-cfp-on, var(--dp-nc-title, var(--dp-color-text, #303030))));
}

.dp-cfp .is-next .dp-cfp__date-value {
	font-size: clamp(26px, 2.4vw, 32px);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.dp-cfp .is-past .dp-cfp__date-value,
.dp-cfp .is-past .dp-cfp__date-label {
	color: var(--dp-cfp-label, var(--dp-cfp-on-muted, var(--dp-color-text-faint, #8a8a8a)));
}

/* ── Le formulaire intégré ── */
.dp-cfp__form {
	grid-column: 1 / -1;
}

.dp-cfp .dp-cfp__frame {
	display: block;
	width: 100%;
	height: var(--dp-cfp-frame-h, 900px);
	border: 0;
	border-radius: var(--dp-cfp-frame-radius, var(--dp-radius-md, 16px));
	background: var(--dp-color-surface, #ffffff);
}

.dp-cfp__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 16px;
	border: 1px dashed var(--dp-color-border, #dedede);
	border-radius: 12px;
	font-size: 13px;
	color: var(--dp-color-text-muted, #5b5b5b);
}

@media (max-width: 860px) {
	.dp-cfp {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.dp-cfp .dp-cfp__actions {
		width: 100%;
	}

	.dp-cfp .dp-cfp__button {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dp-cfp .dp-cfp__button:hover,
	.dp-cfp .dp-cfp__button:focus-visible {
		transform: none;
	}
}
