/* ==========================================================================
   COMMANDE : détail d'une commande (Mon compte et confirmation après paiement).
   Synthèse, frise de suivi, abonnement acheté, articles en cartes, totaux, adresses.
   Couleurs de la charte uniquement ; mouvement discret (transform et opacité), coupé si « réduire les animations ».
   ========================================================================== */

/* ---------- Titres de section ---------- */
.bdp-cmd-titre {
	display: flex;
	align-items: center;
	gap: var(--esp-3, 0.75rem);
	margin: 0 0 var(--esp-4, 1rem);
	font-size: var(--fs-xl, 1.5rem);
}

.bdp-cmd-titre::before {
	content: "";
	flex: none;
	width: 0.5rem;
	height: 1.4em;
	background: var(--c-accent, #3cc4ad);
}

/* ---------- Synthèse (Mon compte) ---------- */
.bdp-cmd-hero {
	display: grid;
	gap: var(--esp-5, 1.5rem);
	margin-bottom: var(--esp-5, 1.5rem);
	padding: var(--esp-5, 1.5rem);
	border: var(--filet, 1px) solid var(--c-ligne, #ccd);
	border-top: 4px solid var(--c-accent, #3cc4ad);
	background: var(--c-surface, #fff);
}

.bdp-cmd-hero__haut {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--esp-3, 0.75rem);
}

.bdp-cmd-hero__sur {
	margin: 0;
	color: var(--c-texte-doux, #555);
	font-size: var(--fs-xs, 0.75rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bdp-cmd-hero__titre {
	margin: 0;
	font-size: var(--fs-xl, 1.6rem);
	line-height: 1.1;
}

.bdp-cmd-chiffres {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: var(--esp-4, 1rem);
	margin: 0;
	padding-block: var(--esp-4, 1rem);
	border-block: var(--filet, 1px) solid var(--c-ligne, #ccd);
}

.bdp-cmd-chiffres__item dt {
	color: var(--c-texte-doux, #555);
	font-size: var(--fs-xs, 0.75rem);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.bdp-cmd-chiffres__item dd {
	margin: 0.15rem 0 0;
	font-family: var(--f-titre, inherit);
	font-size: var(--fs-lg, 1.2rem);
	font-weight: 700;
}

/* ---------- Frise de suivi ---------- */
.bdp-frise {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bdp-frise__etape {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 0.2rem;
	padding-top: 0.25rem;
	text-align: center;
}

.bdp-frise__etape::before {
	content: "";
	position: absolute;
	top: 1.1rem;
	right: 50%;
	left: -50%;
	height: 3px;
	background: var(--c-ligne, #ccd);
}

.bdp-frise__etape:first-child::before {
	display: none;
}

.bdp-frise__etape--fait::before,
.bdp-frise__etape--courant::before {
	background: var(--c-accent, #3cc4ad);
}

.bdp-frise__etape--erreur::before {
	background: var(--c-erreur, #b3261e);
}

.bdp-frise__point {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	border: 3px solid var(--c-ligne, #ccd);
	border-radius: var(--r-pill, 999px);
	background: var(--c-surface, #fff);
	color: var(--c-primaire-texte, #fff);
}

.bdp-frise__point .bdp-icone {
	width: 1.05rem;
	height: 1.05rem;
	stroke-width: 2.6;
}

.bdp-frise__etape--fait .bdp-frise__point {
	border-color: var(--c-accent, #3cc4ad);
	background: var(--c-accent, #3cc4ad);
	color: var(--c-accent-texte, #062431);
}

.bdp-frise__etape--courant .bdp-frise__point {
	border-color: var(--c-accent, #3cc4ad);
	animation: bdp-pouls 2.2s ease-in-out infinite;
}

.bdp-frise__etape--erreur .bdp-frise__point {
	border-color: var(--c-erreur, #b3261e);
	background: var(--c-erreur, #b3261e);
}

.bdp-frise__titre {
	margin-top: 0.3rem;
	font-size: var(--fs-sm, 0.9rem);
	font-weight: 700;
}

.bdp-frise__texte {
	color: var(--c-texte-doux, #555);
	font-size: var(--fs-xs, 0.78rem);
}

@keyframes bdp-pouls {
	0%,
	100% {
		box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-accent, #3cc4ad) 45%, transparent);
	}

	50% {
		box-shadow: 0 0 0 0.45rem color-mix(in srgb, var(--c-accent, #3cc4ad) 0%, transparent);
	}
}

/* ---------- Abonnement acheté ---------- */
.bdp-cmd-abo {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--esp-4, 1rem);
	margin-bottom: var(--esp-5, 1.5rem);
	padding: var(--esp-4, 1rem) var(--esp-5, 1.5rem);
	background: var(--c-primaire, #0b2a3a);
	color: var(--c-primaire-texte, #fff);
}

.bdp-cmd-abo__icone {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: var(--r-pill, 999px);
	background: var(--c-accent, #3cc4ad);
	color: var(--c-accent-texte, #062431);
}

.bdp-cmd-abo__texte {
	display: grid;
	gap: 0.15rem;
}

.bdp-cmd-abo__texte span {
	color: var(--c1-sur-fonce-doux, #cfe0e8);
	font-size: var(--fs-sm, 0.9rem);
}

.bdp-cmd-abo .bdp-btn--primaire {
	border-color: var(--c-accent, #3cc4ad);
	background: var(--c-accent, #3cc4ad);
	color: var(--c-accent-texte, #062431);
}

@media (max-width: 40rem) {
	.bdp-cmd-abo {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.bdp-cmd-abo .bdp-btn {
		grid-column: 1 / -1;
		justify-self: stretch;
		text-align: center;
	}
}

/* ---------- Historique ---------- */
.bdp-commande-suivi {
	margin-bottom: var(--esp-5, 1.5rem);
}

.bdp-commande-suivi__liste {
	display: grid;
	gap: var(--esp-3, 0.75rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bdp-commande-suivi__item {
	padding: var(--esp-3, 0.75rem) var(--esp-4, 1rem);
	border: var(--filet, 1px) solid var(--c-ligne, #ccd);
	border-left: 4px solid var(--c-accent, #3cc4ad);
	background: var(--c-surface, #fff);
}

/* ---------- Détail de la commande ---------- */
.bdp-cmd-detail {
	margin-bottom: var(--esp-5, 1.5rem);
	padding: var(--esp-5, 1.5rem);
	border: var(--filet, 1px) solid var(--c-ligne, #ccd);
	background: var(--c-surface, #fff);
}

.bdp-cmd-articles {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bdp-cmd-article {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr) auto;
	align-items: start;
	gap: var(--esp-4, 1rem);
	padding-block: var(--esp-4, 1rem);
	border-bottom: var(--filet, 1px) solid var(--c-ligne, #ccd);
}

.bdp-cmd-article:first-child {
	padding-top: 0;
}

.bdp-cmd-article__image {
	position: relative;
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	border: var(--filet, 1px) solid var(--c-ligne, #ccd);
	background: var(--c-bg, #f3f6f8);
}

.bdp-cmd-article__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bdp-cmd-article__quantite {
	position: absolute;
	top: -0.5rem;
	right: -0.5rem;
	display: grid;
	place-items: center;
	min-width: 1.4rem;
	height: 1.4rem;
	padding-inline: 0.3rem;
	border-radius: var(--r-pill, 999px);
	background: var(--c-primaire, #0b2a3a);
	color: var(--c-primaire-texte, #fff);
	font-size: 0.72rem;
	font-weight: 700;
}

.bdp-cmd-article__nom {
	margin: 0 0 0.4rem;
	font-weight: 700;
	line-height: 1.3;
}

.bdp-cmd-article__nom a {
	color: inherit;
	text-decoration: none;
}

.bdp-cmd-article__nom a:hover {
	text-decoration: underline;
}

.bdp-cmd-article__prix {
	margin: 0;
	font-family: var(--f-titre, inherit);
	font-size: var(--fs-lg, 1.2rem);
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

.bdp-cmd-article__note {
	grid-column: 1 / -1;
	color: var(--c-texte-doux, #555);
}

/* Caractéristiques en pastilles. */
.bdp-pastilles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bdp-pastilles__item {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	padding: 0.2rem 0.6rem;
	border: var(--filet, 1px) solid var(--c-ligne, #ccd);
	background: var(--c-bg, #f3f6f8);
	font-size: var(--fs-xs, 0.78rem);
	font-weight: 600;
}

.bdp-pastilles__libelle {
	color: var(--c-texte-doux, #555);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

@media (max-width: 36rem) {
	.bdp-cmd-article {
		grid-template-columns: 3.6rem minmax(0, 1fr);
	}

	.bdp-cmd-article__image {
		width: 3.6rem;
		height: 3.6rem;
	}

	.bdp-cmd-article__prix {
		grid-column: 2;
		text-align: left;
	}
}

/* ---------- Totaux ---------- */
.bdp-cmd-totaux {
	display: grid;
	gap: 0;
	max-width: 26rem;
	margin: var(--esp-4, 1rem) 0 0 auto;
}

.bdp-cmd-totaux__ligne {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--esp-4, 1rem);
	padding-block: 0.55rem;
	border-bottom: var(--filet, 1px) solid var(--c-ligne, #ccd);
}

.bdp-cmd-totaux__ligne dt {
	color: var(--c-texte-doux, #555);
}

.bdp-cmd-totaux__ligne dd {
	margin: 0;
	font-weight: 700;
	text-align: right;
}

.bdp-cmd-totaux__ligne--total {
	align-items: center;
	margin-top: 0.4rem;
	padding: var(--esp-3, 0.75rem) var(--esp-4, 1rem);
	border: 0;
	background: var(--c-primaire, #0b2a3a);
	color: var(--c-primaire-texte, #fff);
}

.bdp-cmd-totaux__ligne--total dt {
	color: var(--c1-sur-fonce-doux, #cfe0e8);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bdp-cmd-totaux__ligne--total dd {
	font-family: var(--f-titre, inherit);
	font-size: var(--fs-xl, 1.6rem);
}

.bdp-cmd-note,
.bdp-cmd-actions {
	margin: var(--esp-4, 1rem) 0 0;
}

.bdp-cmd-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--esp-3, 0.75rem);
}

/* ---------- Adresses ---------- */
.bdp-cmd-adresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: var(--esp-4, 1rem);
}

.bdp-cmd-adresse {
	padding: var(--esp-5, 1.5rem);
	border: var(--filet, 1px) solid var(--c-ligne, #ccd);
	background: var(--c-surface, #fff);
}

.bdp-cmd-adresse__titre {
	display: flex;
	align-items: center;
	gap: var(--esp-3, 0.75rem);
	margin: 0 0 var(--esp-3, 0.75rem);
	font-size: var(--fs-lg, 1.2rem);
}

.bdp-cmd-adresse__icone {
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: var(--r-pill, 999px);
	background: var(--c-surface-2, #e7edf1);
	color: var(--c-primaire, #0b2a3a);
}

.bdp-cmd-adresse__icone .bdp-icone {
	width: 1.1rem;
	height: 1.1rem;
}

/* ---------- Apparition douce ---------- */
@media (prefers-reduced-motion: no-preference) {
	.bdp-cmd-hero,
	.bdp-cmd-abo,
	.bdp-cmd-detail,
	.bdp-cmd-adresse {
		animation: bdp-cmd-entree 0.6s var(--ease, ease) both;
	}

	.bdp-cmd-abo {
		animation-delay: 0.08s;
	}

	.bdp-cmd-detail {
		animation-delay: 0.14s;
	}

	.bdp-cmd-adresse:nth-child(2) {
		animation-delay: 0.1s;
	}
}

@keyframes bdp-cmd-entree {
	from {
		opacity: 0;
		transform: translateY(0.9rem);
	}

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

@media (prefers-reduced-motion: reduce) {
	.bdp-frise__etape--courant .bdp-frise__point {
		animation: none;
	}
}
