/*
 * Page publique « État des services ».
 *
 * Le bandeau du haut est sombre, comme la carte d'annonce : même famille
 * visuelle pour tout ce qui parle de l'état du service. Le visiteur doit avoir
 * sa réponse avant même de lire la liste.
 *
 * @since 0.15.82
 */

.jdp-etat {
	background: var(--bg-soft, #F9F6F1);
}

/* ---------- Bandeau d'état global ---------- */

.jdp-etat-tete {
	background: var(--bg-dark-alt, #0A0A0A);
	color: #E8E8E8;
	padding: 46px 0 40px;
}

.jdp-etat-titre {
	display: flex;
	align-items: center;
	gap: 13px;
	font-size: var(--fs-h1, 40px);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: #FFFFFF;
	margin: 0 0 10px;
	text-wrap: balance;
}

.jdp-etat-point {
	position: relative;
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
}

.jdp-etat-point i,
.jdp-etat-point em {
	position: absolute;
	inset: 0;
	display: block;
	border-radius: 50%;
	background: var(--accent-cool, #2baab1);
}

.jdp-etat-point em {
	animation: jdp-etat-onde 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

@keyframes jdp-etat-onde {
	0%   { transform: scale(1);   opacity: 0.5; }
	70%  { transform: scale(3.2); opacity: 0; }
	100% { transform: scale(3.2); opacity: 0; }
}

.jdp-etat[data-global="degrade"] .jdp-etat-point i,
.jdp-etat[data-global="degrade"] .jdp-etat-point em {
	background: var(--accent, #E68A1C);
}

.jdp-etat[data-global="panne"] .jdp-etat-point i,
.jdp-etat[data-global="panne"] .jdp-etat-point em {
	background: #E0574F;
}

.jdp-etat-soustitre {
	font-size: 15px;
	line-height: 1.65;
	color: #B9BDC3;
	margin: 0;
	max-width: 62ch;
}

.jdp-etat-maj {
	margin: 16px 0 0;
	font-size: 12.5px;
	color: #8A8F96;
	font-variant-numeric: tabular-nums;
}

/* ---------- Annonce en cours, même source que la carte flottante ---------- */

.jdp-etat-annonce {
	margin-top: 32px;
	padding: 18px 0;
	background: #14131A;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: #D8DADE;
	font-size: 14px;
	line-height: 1.65;
}

.jdp-etat-annonce .jdp-container {
	display: flex;
	gap: 13px;
	align-items: flex-start;
}

.jdp-etat-puce {
	margin-top: 7px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent, #E68A1C);
	flex: 0 0 auto;
}

.jdp-etat-annonce b {
	color: #FFFFFF;
	font-weight: 600;
}

/* Même règle que sur la carte flottante : le message garde ses retours à la ligne
   et ses espaces. L'enveloppe est collée à l'echo dans le gabarit, sinon c'est
   l'indentation du fichier PHP qui s'afficherait. */
.jdp-etat-annonce-msg {
	white-space: pre-wrap;
}

.jdp-etat-echeance {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #8A8F96;
	font-variant-numeric: tabular-nums;
}

/* ---------- Liste des services ---------- */

.jdp-etat-corps {
	padding: 40px 0 64px;
}

.jdp-etat-groupe + .jdp-etat-groupe {
	margin-top: 32px;
}

.jdp-etat-groupe h2 {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--fg2, #69727D);
	margin: 0 0 11px;
}

.jdp-etat-liste {
	background: var(--bg, #FFFFFF);
	border: 1px solid var(--border, #E9E6ED);
	border-radius: 12px;
	overflow: hidden;
}

.jdp-etat-ligne {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	border-top: 1px solid var(--border, #E9E6ED);
}

.jdp-etat-ligne:first-child {
	border-top: 0;
}

.jdp-etat-nom {
	font-size: 15px;
	font-weight: 500;
	min-width: 0;
}

.jdp-etat-note {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	font-weight: 400;
	color: var(--fg2, #69727D);
}

.jdp-etat-pilule {
	margin-left: auto;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 500;
	padding: 5px 13px 5px 11px;
	border-radius: 999px;
	white-space: nowrap;
}

.jdp-etat-pilule i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	display: block;
}

.jdp-etat-pilule--ok      { color: #1C6E73; background: #EAF6F6; }
.jdp-etat-pilule--degrade { color: #8A5108; background: #FDF3E4; }
.jdp-etat-pilule--panne   { color: #8E2C2C; background: #FBECEC; }

.jdp-etat-texte {
	margin-top: 30px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--fg2, #69727D);
	max-width: 70ch;
}

.jdp-etat-pied {
	margin: 28px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--border, #E9E6ED);
	font-size: 14px;
	line-height: 1.7;
	color: var(--fg2, #69727D);
	max-width: 70ch;
}

.jdp-etat-pied a {
	color: var(--fg1, #000000);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(0, 0, 0, 0.25);
	transition: text-decoration-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.jdp-etat-pied a:hover {
		text-decoration-color: currentColor;
	}
}

/* ---------- Téléphone : la pilule passe sous le nom, rien ne déborde ---------- */

@media (max-width: 620px) {
	.jdp-etat-tete {
		padding: 30px 0 26px;
	}

	.jdp-etat-titre {
		font-size: 24px;
		gap: 11px;
		align-items: flex-start;
	}

	.jdp-etat-point {
		margin-top: 8px;
	}

	.jdp-etat-soustitre {
		font-size: 14px;
	}

	.jdp-etat-annonce {
		margin-top: 24px;
		font-size: 13.5px;
	}

	.jdp-etat-corps {
		padding: 28px 0 48px;
	}

	.jdp-etat-ligne {
		flex-wrap: wrap;
		gap: 9px;
		padding: 13px 15px;
	}

	.jdp-etat-nom {
		width: 100%;
		font-size: 14.5px;
	}

	.jdp-etat-pilule {
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jdp-etat-point em {
		animation: none;
		opacity: 0.4;
	}
}
