/**
 * Pixel-Deco Design Service : fiche produit.
 * Reprend les variables et les classes de boutons du configurateur
 * existant (pd-btn, pd-btn-primary, pd-btn-ghost) : aucun nouveau
 * systeme de design n est introduit.
 */

.pdds-switch,
.pdds-brief {
	--pdds-accent: #FF6900;
	--pdds-accent-ink: #111111;
	--pdds-panel: #161b22;
	--pdds-line: rgba(255, 255, 255, .12);
	--pdds-text: #ffffff;
	--pdds-muted: #a7adb4;

	color: var(--pdds-text);
	font-size: .95rem;
	line-height: 1.5;
}

.pdds-switch {
	margin: 18px 0 14px;
}

.pdds-switch-title {
	margin: 0 0 10px;
	font-weight: 800;
	font-size: .82rem;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--pdds-muted);
}

.pdds-switch-options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.pdds-option {
	display: block;
	padding: 14px 16px;
	background: var(--pdds-panel);
	border: 1px solid var(--pdds-line);
	border-radius: 14px;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.pdds-option:hover {
	border-color: rgba(255, 105, 0, .5);
}

.pdds-option.is-active {
	border-color: var(--pdds-accent);
	box-shadow: 0 0 0 3px rgba(255, 105, 0, .22);
}

.pdds-option:focus-within {
	outline: 3px solid var(--pdds-accent);
	outline-offset: 2px;
}

.pdds-option input[type="radio"] {
	margin-right: 8px;
	accent-color: var(--pdds-accent);
}

.pdds-option-title {
	display: block;
	font-weight: 800;
	margin-bottom: 4px;
}

.pdds-option-text {
	display: block;
	font-size: .85rem;
	color: var(--pdds-muted);
}

.pdds-testmode {
	margin: 0 0 12px;
	padding: 9px 12px;
	border-radius: 10px;
	background: rgba(255, 105, 0, .14);
	border: 1px dashed var(--pdds-accent);
	color: var(--pdds-accent);
	font-weight: 800;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .4px;
}

/*
 * Masquage du configurateur classique en mode service.
 *
 * L attribut hidden seul ne suffit pas : n importe quelle regle display du
 * theme ou d un autre plugin le bat en specificite. Cette classe, posee par
 * le JavaScript en meme temps que hidden, ferme la porte. Le masquage reste
 * une commodite d affichage : les champs sont DESACTIVES en plus, et le
 * serveur ignore de toute facon le payload de l editeur en mode service.
 */
.pdds-editor-off {
	display: none !important;
}

.pdds-badge {
	display: inline-block;
	margin-left: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--pdds-accent);
	color: var(--pdds-accent-ink);
	font-size: .8rem;
	font-weight: 800;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ */

.pdds-brief {
	margin: 4px 0 18px;
	padding: 18px;
	background: var(--pdds-panel);
	border: 1px solid var(--pdds-line);
	border-radius: 14px;
}

.pdds-brief-intro {
	margin: 0 0 16px;
	color: var(--pdds-muted);
}

.pdds-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 14px;
}

.pdds-field {
	margin: 0 0 14px;
}

.pdds-field label {
	display: block;
	font-weight: 700;
	margin-bottom: 5px;
	font-size: .9rem;
}

.pdds-req {
	color: var(--pdds-accent);
}

.pdds-brief input[type="text"],
.pdds-brief input[type="email"],
.pdds-brief select,
.pdds-brief textarea {
	width: 100%;
	max-width: 100%;
	padding: 11px 12px;
	background: rgba(255, 255, 255, .06);
	color: var(--pdds-text);
	border: 1px solid var(--pdds-line);
	border-radius: 10px;
	font: inherit;
}

.pdds-brief textarea {
	resize: vertical;
}

.pdds-brief input:focus,
.pdds-brief select:focus,
.pdds-brief textarea:focus,
.pdds-brief button:focus,
.pdds-upload-btn:focus-within {
	outline: 3px solid var(--pdds-accent);
	outline-offset: 2px;
}

.pdds-help {
	display: block;
	margin-top: 4px;
	font-size: .82rem;
	color: var(--pdds-muted);
}

/* ------------------------------------------------------------------ */

.pdds-uploader {
	margin: 4px 0 16px;
	padding: 14px;
	border: 1px dashed var(--pdds-line);
	border-radius: 12px;
}

.pdds-uploader-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.pdds-uploader-title {
	font-weight: 800;
}

.pdds-counter {
	font-size: .85rem;
	color: var(--pdds-muted);
}

.pdds-thumbs {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
}

.pdds-thumbs li {
	position: relative;
	width: 96px;
	height: 96px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--pdds-line);
}

.pdds-thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pdds-thumb-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.pdds-uploader-actions {
	margin: 12px 0 0;
}

.pdds-upload-btn {
	display: inline-block;
	cursor: pointer;
}

.pdds-upload-btn.is-disabled {
	opacity: .45;
	pointer-events: none;
}

.pdds-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.pdds-status {
	margin: 8px 0 0;
	font-size: .85rem;
	color: var(--pdds-muted);
	min-height: 1em;
}

.pdds-status.pdds-is-error,
.pdds-error {
	color: #ff8c66;
}

.pdds-error {
	margin: 10px 0 0;
	font-weight: 700;
}

/* ------------------------------------------------------------------ */

.pdds-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: .88rem;
	line-height: 1.45;
}

.pdds-consent input[type="checkbox"] {
	margin-top: 3px;
	accent-color: var(--pdds-accent);
	flex: 0 0 auto;
}

/*
 * Encadre unique des conditions de la creation. En orange : c est la seule
 * information tarifaire du formulaire, elle doit se voir sans relire tout
 * le bloc. Le texte porte l accent, le fond reste discret pour que la
 * lecture ne fatigue pas.
 */
.pdds-terms-refund {
	margin-top: 12px;
	padding: 12px 14px;
	border-left: 3px solid var(--pdds-accent);
	background: rgba(255, 105, 0, .10);
	border-radius: 0 8px 8px 0;
	color: var(--pdds-accent);
	font-size: .85rem;
	line-height: 1.55;
}

.pdds-terms-refund strong {
	color: var(--pdds-accent);
}

.pdds-reference {
	margin: 10px 0 0;
	font-size: .88rem;
	color: var(--pdds-muted);
}

/* Prix recomposé quand le service de création est choisi. */

.pdds-price {
	display: block;
}

.pdds-price-total {
	display: block;
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.2;
	color: #FF6900;
}

.pdds-price-detail {
	display: block;
	margin-top: 2px;
	font-size: .85rem;
	font-weight: 400;
	color: #a7adb4;
}

.pdds-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */

@media (max-width: 720px) {
	.pdds-switch-options,
	.pdds-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.pdds-brief {
		padding: 14px;
	}

	.pdds-thumbs li {
		width: 84px;
		height: 84px;
	}
}
