/* Onglet « Designs » du compte + espace graphiste. */
.ewd-account-designs .ewd-job {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1em 1.25em;
	margin: 0 0 1.5em;
}

.ewd-account-designs .ewd-job h3 {
	margin: 0 0 0.25em;
}

.ewd-account-designs .ewd-job h3 small {
	color: #888;
	font-weight: 400;
}

.ewd-job-status {
	color: #555;
	margin: 0 0 1em;
}

.ewd-muted {
	color: #777;
}

.ewd-proposals {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ewd-proposal {
	border-left: 3px solid #d0d0d0;
	padding: 0.6em 0.9em;
	margin: 0 0 0.75em;
	background: #fafafa;
}

.ewd-proposal.ewd-status-retained {
	border-left-color: #46b450;
}

.ewd-proposal.ewd-status-not_retained {
	opacity: 0.7;
}

.ewd-proposal-head {
	display: flex;
	gap: 0.75em;
	align-items: center;
	margin-bottom: 0.4em;
}

.ewd-badge {
	display: inline-block;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: #eee;
	padding: 0.15em 0.5em;
	border-radius: 3px;
}

.ewd-proposal-head time {
	color: #999;
	font-size: 0.85em;
}

.ewd-files {
	list-style: disc;
	margin: 0.5em 0 0 1.2em;
}

.ewd-refuse-box,
.ewd-topup-box {
	background: #f6f7f7;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1em;
	margin-top: 1em;
}

.ewd-refuse-box textarea,
.ewd-proposal-form textarea {
	width: 100%;
	margin-bottom: 0.5em;
}

.ewd-inline-error {
	color: #b32d2e;
	background: #fbeaea;
	border: 1px solid #e5b3b3;
	border-radius: 4px;
	padding: 0.5em 0.75em;
	margin: 0.5em 0;
}

.ewd-accept {
	margin-top: 0.5em;
}

.ewd-bat-box {
	background: #f0f6fc;
	border: 1px solid #cfe2f3;
	border-radius: 6px;
	padding: 1em;
	margin-top: 1em;
}

.ewd-signature-pad {
	border: 1px dashed #888;
	border-radius: 4px;
	background: #fff;
	touch-action: none;
	max-width: 100%;
	display: block;
	margin-bottom: 0.5em;
}

.ewd-signature-actions {
	display: flex;
	gap: 0.5em;
}

/* ===========================================================================
   Messagerie (conversation) — style « chat » temps réel.
=========================================================================== */
.ewd-back {
	margin-bottom: 1em;
}
.ewd-back a {
	text-decoration: none;
}

.ewd-conversation {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 1.25em;
	align-items: start;
}

/* ---- Colonne principale (chat) ---- */
.ewd-conv-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ececf1;
	border-radius: 16px;
	box-shadow: 0 6px 24px rgba(20, 20, 43, 0.06);
	overflow: hidden;
}

.ewd-conv-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
	padding: 0.9em 1.1em;
	border-bottom: 1px solid #f0f0f4;
}

.ewd-conv-peer {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.ewd-conv-name {
	font-weight: 700;
}

.ewd-presence {
	display: flex;
	align-items: center;
	gap: 0.35em;
	font-size: 0.8em;
	color: #8a8a99;
}

.ewd-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c4c4cf;
	display: inline-block;
}

.ewd-presence.is-online .ewd-dot {
	background: #23c552;
	box-shadow: 0 0 0 3px rgba(35, 197, 82, 0.18);
}

.ewd-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.8em;
	color: #fff;
	flex: 0 0 auto;
}

.ewd-avatar-studio {
	background: linear-gradient(135deg, #0029ff, #3b5bff);
}

.ewd-avatar-client {
	background: #d9d9e3;
	color: #6a6a78;
}

.ewd-avatar .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

/* ---- Fil ---- */
.ewd-thread {
	display: flex;
	flex-direction: column;
	gap: 0.7em;
	padding: 1.1em;
	max-height: 60vh;
	overflow-y: auto;
}

.ewd-thread-empty {
	text-align: center;
	padding: 2em 0;
}

.ewd-row {
	display: flex;
	align-items: flex-end;
	gap: 0.5em;
	max-width: 82%;
}

.ewd-row-them {
	align-self: flex-start;
}

.ewd-row-me {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.ewd-row .ewd-avatar {
	width: 30px;
	height: 30px;
	font-size: 0.7em;
}

.ewd-msg {
	padding: 0.7em 0.9em;
	border-radius: 16px;
	line-height: 1.45;
}

.ewd-row-them .ewd-msg {
	background: #f4f4f8;
	color: #1c1c28;
	border-bottom-left-radius: 5px;
}

.ewd-row-me .ewd-msg {
	background: linear-gradient(135deg, #0029ff 0%, #3b5bff 100%);
	color: #fff;
	border-bottom-right-radius: 5px;
}

.ewd-msg-meta {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 0.35em;
	font-size: 0.72em;
	opacity: 0.85;
}

.ewd-msg-author {
	font-weight: 700;
}

.ewd-msg-meta time {
	margin-left: auto;
}

.ewd-msg-body {
	white-space: pre-line;
}

.ewd-row-me .ewd-msg a {
	color: #fff;
	text-decoration: underline;
}

.ewd-badge {
	display: inline-block;
	font-size: 0.72em;
	padding: 0.1em 0.5em;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.08);
}

.ewd-row-me .ewd-badge {
	background: rgba(255, 255, 255, 0.22);
}

.ewd-badge-ok {
	background: #d8f0dc;
	color: #1a7a2e;
}

.ewd-badge-warn {
	background: #fdeccf;
	color: #8a5a00;
}

.ewd-msg-actions {
	margin-top: 0.55em;
}

.ewd-msg-actions .button {
	background: #fff;
	color: #0029ff;
	border: none;
}

/* ---- Pièces jointes / aperçus ---- */
.ewd-attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-top: 0.55em;
}

.ewd-thumb {
	display: block;
	width: 110px;
	height: 110px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
}

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

.ewd-file-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.35em 0.6em;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	font-size: 0.85em;
	color: #333;
}

/* ---- Composer ---- */
.ewd-composer {
	border-top: 1px solid #f0f0f4;
	padding: 0.9em 1.1em;
	position: relative;
}

.ewd-composer textarea {
	width: 100%;
	border: 1px solid #e2e2ea;
	border-radius: 12px;
	padding: 0.6em 0.8em;
	resize: vertical;
	font: inherit;
}

.ewd-composer .button-primary,
.ewd-composer .ewd-refuse,
.ewd-composer .ewd-topup {
	background: linear-gradient(135deg, #0029ff, #3b5bff);
	border: none;
	color: #fff;
	border-radius: 10px;
}

.ewd-emoji-wrap {
	position: relative;
	display: inline-block;
}

.ewd-emoji-btn {
	border: 1px solid #e2e2ea;
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
	padding: 0.2em 0.45em;
	font-size: 1.1em;
	margin: 0.3em 0;
}

.ewd-emoji-palette {
	position: absolute;
	bottom: 110%;
	left: 0;
	z-index: 20;
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 2px;
	background: #fff;
	border: 1px solid #e2e2ea;
	border-radius: 12px;
	padding: 6px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
	width: 280px;
}

.ewd-emoji {
	border: none;
	background: none;
	cursor: pointer;
	font-size: 1.15em;
	padding: 3px;
	border-radius: 6px;
}

.ewd-emoji:hover {
	background: #e6ecff;
}

.ewd-file-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin: 0.5em 0;
}

.ewd-preview-item img {
	width: 54px;
	height: 54px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #e2e2ea;
}

.ewd-preview-item {
	font-size: 0.8em;
	color: #555;
}

/* ---- Barre latérale (Détails) ---- */
.ewd-conv-side {
	display: flex;
	flex-direction: column;
	gap: 1em;
	position: sticky;
	top: 1em;
}

.ewd-side-card {
	border: 1px solid #ececf1;
	border-radius: 16px;
	padding: 1.1em;
	background: #fff;
	box-shadow: 0 6px 24px rgba(20, 20, 43, 0.05);
}

.ewd-side-image img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin-bottom: 0.6em;
}

.ewd-side-title {
	margin: 0 0 0.6em;
	font-size: 1.05em;
}

.ewd-side-meta {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ewd-side-meta li {
	display: flex;
	justify-content: space-between;
	gap: 0.5em;
	padding: 0.35em 0;
	border-bottom: 1px solid #f2f2f6;
}

.ewd-side-meta li span {
	color: #8a8a99;
}

.ewd-side-bat {
	margin-top: 0.7em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

.ewd-graphist-row {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.ewd-graphist-row img {
	border-radius: 50%;
}

.ewd-brief-list dt {
	font-weight: 600;
	margin-top: 0.5em;
}

.ewd-brief-list dd {
	margin: 0 0 0.3em;
	color: #55555f;
}

/* ---- Étoiles / avis ---- */
.ewd-stars {
	display: inline-flex;
	gap: 1px;
}

.ewd-star {
	color: #d5d5dd;
	font-size: 1.05em;
	line-height: 1;
}

.ewd-star.is-on {
	color: #ffb400;
}

.ewd-review-avg {
	display: flex;
	align-items: center;
	gap: 0.4em;
	font-weight: 700;
	margin-bottom: 0.6em;
}

.ewd-review-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ewd-review-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.25em 0;
}

.ewd-review-comment {
	margin: 0.6em 0 0;
	padding: 0.5em 0.8em;
	background: #f7f7fb;
	border-radius: 10px;
	border-left: 3px solid #3b5bff;
	font-style: italic;
}

/* ---- Formulaire d'avis (composer) ---- */
.ewd-review-form .ewd-rate-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.35em 0;
	border-bottom: 1px solid #f2f2f6;
}

.ewd-rate-stars .ewd-rate-star {
	cursor: pointer;
	font-size: 1.5em;
	color: #d5d5dd;
	background: none;
	border: none;
	padding: 0 1px;
}

.ewd-rate-stars .ewd-rate-star.is-on {
	color: #ffb400;
}

/* ---- Boîtes actions ---- */
.ewd-refuse-box,
.ewd-topup-box,
.ewd-bat-box,
.ewd-proposal-form,
.ewd-review-form {
	background: #f5f7ff;
	border: 1px solid #dfe6ff;
	border-radius: 12px;
	padding: 0.9em;
}

.ewd-signature-pad {
	border: 1px dashed #9db0ff;
	border-radius: 10px;
	background: #fff;
	touch-action: none;
	max-width: 100%;
	display: block;
	margin-bottom: 0.5em;
}

.ewd-signature-actions {
	display: flex;
	gap: 0.5em;
}

.ewd-inline-error {
	color: #b32d2e;
	background: #fbeaea;
	border: 1px solid #e5b3b3;
	border-radius: 8px;
	padding: 0.5em 0.75em;
	margin: 0.5em 0;
}

.ewd-muted {
	color: #8a8a99;
}

.woocommerce-MyAccount-content.ewd-loading {
	opacity: 0.5;
	transition: opacity 0.15s;
}

/* ---- Liste designs ---- */
.ewd-graphist-list th,
.ewd-graphist-list td {
	vertical-align: middle;
}

@media (max-width: 900px) {
	.ewd-conversation {
		grid-template-columns: 1fr;
	}
	.ewd-conv-side {
		position: static;
		order: -1;
	}
	.ewd-row {
		max-width: 92%;
	}
}

/* ---- Voies post-BAT (§8) ---- */
.ewd-postbat {
	margin-top: 1em;
}
.ewd-postbat-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
	gap: 0.9em;
	margin-top: 0.6em;
}
.ewd-postbat-card {
	border: 1px solid #e4e4e6;
	border-radius: 12px;
	padding: 0.9em 1em;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 0.4em;
}
.ewd-postbat-card .button {
	margin-top: auto;
}
.ewd-postbat-card .ewd-radio {
	display: block;
	font-weight: 400;
	margin: 0.1em 0;
}
.ewd-subdomain-row {
	display: flex;
	align-items: center;
	gap: 0.3em;
	margin: 0.4em 0;
}
.ewd-subdomain-row input {
	flex: 1 1 auto;
	min-width: 0;
}
.ewd-team-roster {
	width: 100%;
}
