/**
 * WC Manual Account Approval — styles admin.
 *
 * Design system "Nova" v1 — uniformisation avec les autres plugins
 * admin maison (source : nova-product-scraper v2.14.1). Prefixe
 * conserve en "wcmaa-" (pas de collision avec un autre plugin nova-*).
 */

:root {
	--wcmaa-bg:       #f0f2f5;
	--wcmaa-card:     #ffffff;
	--wcmaa-border:   #dde1e7;
	--wcmaa-accent:   #2563eb;
	--wcmaa-accent2:  #1d4ed8;
	--wcmaa-lock:     #6b7280;
	--wcmaa-auto-bg:  #f8faff;
	--wcmaa-auto-bd:  #c7d9ff;
	--wcmaa-text:     #1e293b;
	--wcmaa-hint:     #64748b;
	--wcmaa-radius:   10px;
	--wcmaa-shadow:   0 1px 4px rgba(0,0,0,.08);
}

/* Boutons — arrondi standardise a 6px */
.wp-core-ui .button,
.wp-core-ui .button.wcmaa-btn-full,
.wcmaa-btn-create-inline,
.wcmaa-page-link {
	border-radius: 6px !important;
}

/* ---------- Wrap general ---------- */

.wcmaa-approbation-wrap {
	max-width: 100%;
	padding: 0 8px 40px;
	box-sizing: border-box;
}
.wcmaa-approbation-wrap h1 {
	font-size: 1.4rem;
	margin-bottom: 14px;
	color: var(--wcmaa-text);
}

/* ---------- Onglets (page "Approbation") ---------- */

.wcmaa-tabs {
	display: flex;
	gap: 6px;
	margin: 16px 0 20px;
	border-bottom: 2px solid var(--wcmaa-border);
	flex-wrap: wrap;
}

.wcmaa-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: var(--wcmaa-radius) var(--wcmaa-radius) 0 0;
	border: 1px solid transparent;
	font-size: .9rem;
	font-weight: 500;
	color: var(--wcmaa-hint);
	text-decoration: none;
	transition: background .15s, color .15s;
	margin-bottom: -2px;
}
.wcmaa-tab:hover {
	background: #e8efff;
	color: var(--wcmaa-accent);
}
.wcmaa-tab.active {
	background: var(--wcmaa-card);
	border-color: var(--wcmaa-border) var(--wcmaa-border) #fff;
	color: var(--wcmaa-accent);
	font-weight: 600;
}

.wcmaa-tab-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #d63638;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.wcmaa-section-title {
	margin: 4px 0 10px;
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--wcmaa-text);
	padding-bottom: 8px;
	border-bottom: 1px solid var(--wcmaa-border);
}

.wcmaa-section-divider {
	height: 1px;
	background: var(--wcmaa-border);
	margin: 32px 0;
}

.wcmaa-approbation-wrap h2 {
	margin-top: 28px;
}
.wcmaa-approbation-wrap h2:first-child {
	margin-top: 0;
}

@media screen and (max-width: 600px) {
	.wcmaa-tab {
		padding: 7px 12px;
		font-size: .85rem;
	}
}

/* ---------- Cartes generiques (.wcmaa-card) ---------- */

.wcmaa-card {
	background: var(--wcmaa-card);
	border: 1px solid var(--wcmaa-border);
	border-radius: var(--wcmaa-radius);
	padding: 18px 16px;
	margin-bottom: 16px;
	box-shadow: var(--wcmaa-shadow);
}

/* ---------- Page "Gestion des comptes" — cartes de statistiques ---------- */

.wcmaa-stats-row {
	display: flex;
	gap: 16px;
	margin: 20px 0;
	flex-wrap: wrap;
}

.wcmaa-stat-card {
	text-decoration: none;
	background: var(--wcmaa-card);
	border: 2px solid var(--wcmaa-border); /* la couleur est surchargee en inline (etat actif) */
	border-radius: var(--wcmaa-radius);
	padding: 14px 20px;
	min-width: 120px;
	text-align: center;
	box-shadow: var(--wcmaa-shadow);
}

.wcmaa-stat-value {
	font-size: 28px;
	font-weight: 700;
	/* couleur fixee en inline (depend du statut) */
}

.wcmaa-stat-label {
	font-size: 13px;
	color: var(--wcmaa-hint);
	margin-top: 4px;
}

/* ---------- Tableau des comptes ---------- */

.wcmaa-muted-text {
	color: var(--wcmaa-hint);
}

.wcmaa-inline-form {
	display: inline-block;
}

.wcmaa-action-btn {
	margin: 2px;
	/* la couleur du texte est fixee en inline selon l'action */
}

.wcmaa-row {
	vertical-align: middle;
}

.wcmaa-note-cell {
	font-size: 12px;
	color: var(--wcmaa-hint);
}

.wcmaa-row-links {
	margin-top: 4px;
	display: inline-block;
}

.wcmaa-log-wrapper-cell {
	background: var(--wcmaa-auto-bg);
	padding: 14px 18px;
}

.wcmaa-pagination {
	margin-top: 16px;
	display: flex;
	gap: 8px;
	align-items: center;
}

.wcmaa-page-link {
	padding: 5px 10px;
	text-decoration: none;
	background: #f0f0f0;
	color: var(--wcmaa-text);
}

.wcmaa-page-link-active {
	background: var(--wcmaa-accent);
	color: #fff;
}

/* ---------- Journal d'activite (historique par compte) ---------- */

.wcmaa-log-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 8px;
	font-size: 12px;
}

.wcmaa-log-thead {
	background: var(--wcmaa-auto-bg);
}

.wcmaa-log-thead th {
	padding: 5px 10px;
	text-align: left;
}

.wcmaa-log-row {
	border-bottom: 1px solid var(--wcmaa-border);
}

.wcmaa-log-cell {
	padding: 5px 10px;
}

.wcmaa-log-cell-nowrap {
	padding: 5px 10px;
	white-space: nowrap;
}

/* ---------- Colonne "Statut compte" dans la liste des utilisateurs WP ---------- */

.wcmaa-status-badge {
	font-weight: 600;
	/* couleur fixee en inline selon le statut */
}

.wcmaa-status-badge-empty {
	color: #aaa;
}

/* ---------- Page de reglages ---------- */

.wcmaa-settings-form {
	max-width: 640px;
}

.wcmaa-settings-box {
	background: var(--wcmaa-card);
	border: 1px solid var(--wcmaa-border);
	border-radius: var(--wcmaa-radius);
	padding: 24px 28px;
	margin-top: 16px;
	box-shadow: var(--wcmaa-shadow);
}

.wcmaa-settings-box-title {
	margin: 0 0 6px;
	font-size: 15px;
}

.wcmaa-settings-box-desc {
	color: var(--wcmaa-hint);
	font-size: 13px;
	margin: 0 0 16px;
}

.wcmaa-field-label {
	font-weight: 600;
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	color: var(--wcmaa-text);
}

.wcmaa-field-label-spaced {
	margin: 16px 0 4px;
}

.wcmaa-text-group {
	border-top: 1px solid var(--wcmaa-border);
	padding-top: 14px;
	margin-top: 14px;
}

.wcmaa-text-group:first-of-type {
	border-top: none;
	padding-top: 0;
	margin-top: 0;
}

.wcmaa-text-group-title {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wcmaa-accent2);
}

.wcmaa-required {
	color: #b32d2e;
}

.wcmaa-field-desc {
	margin-top: 5px;
}

.wcmaa-recap-box {
	background: var(--wcmaa-auto-bg);
	border: 1px solid var(--wcmaa-auto-bd);
	border-radius: 6px;
	padding: 14px 18px;
	margin-top: 16px;
	font-size: 13px;
	color: var(--wcmaa-text);
}

.wcmaa-submit-row {
	margin-top: 20px;
}

.wcmaa-info-box {
	max-width: 640px;
	background: var(--wcmaa-auto-bg);
	border: 1px solid var(--wcmaa-auto-bd);
	border-radius: 6px;
	padding: 16px 24px;
	margin-top: 20px;
}

.wcmaa-info-box-title {
	margin-top: 0;
	font-size: 14px;
	color: var(--wcmaa-text);
}

.wcmaa-info-list {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	color: var(--wcmaa-text);
	line-height: 1.9;
}

/* ---------- Widget du tableau de bord ---------- */

.wcmaa-widget-cards {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.wcmaa-widget-card {
	flex: 1;
	min-width: 120px;
	text-decoration: none;
	display: block;
	background: var(--wcmaa-card);
	border: 1px solid var(--wcmaa-border);
	border-left: 4px solid #ccc; /* surcharge en inline selon le statut */
	border-radius: 6px;
	padding: 14px 16px;
	box-shadow: var(--wcmaa-shadow);
}

.wcmaa-widget-card-label {
	font-size: 12px;
	color: var(--wcmaa-hint);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.wcmaa-widget-card-value {
	font-size: 26px;
	font-weight: 700;
	color: var(--wcmaa-text);
	margin-top: 4px;
}

.wcmaa-widget-alert {
	background: #fcf0f1;
	border-left: 4px solid #d63638;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 13px;
	margin-bottom: 10px;
}

/* ── Module 5.0.0 : indicateur de modification en attente (front + admin) ── */
.wcmaa-pending-hint {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	font-style: italic;
	color: #996800;
}

/* ══════════════════════════════════════════════════════════════════
   Module 5.0.0 — Tableaux responsives (mobile / tablette / PC)
   Cible uniquement .wcmaa-responsive-table pour ne rien casser
   ailleurs dans l'admin WordPress.
   ══════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 960px) and (min-width: 783px) {
	.wcmaa-responsive-table {
		table-layout: auto;
	}
	.wcmaa-responsive-table th,
	.wcmaa-responsive-table td {
		white-space: normal;
		word-break: normal;
		overflow-wrap: break-word;
	}
}

@media screen and (max-width: 782px) {
	.wcmaa-responsive-table,
	.wcmaa-responsive-table tbody,
	.wcmaa-responsive-table tr,
	.wcmaa-responsive-table td {
		display: block !important;
		width: 100% !important;
	}

	.wcmaa-responsive-table thead {
		display: none !important;
	}

	.wcmaa-responsive-table tr {
		margin-bottom: 14px !important;
		border: 1px solid var(--wcmaa-border) !important;
		border-radius: 6px !important;
		overflow: hidden !important;
		box-shadow: 0 1px 1px rgba(0,0,0,.03) !important;
	}

	.wcmaa-responsive-table td {
		padding: 10px 12px !important;
		border: none !important;
		border-bottom: 1px solid #f0f0f1 !important;
		box-sizing: border-box !important;
		text-align: left !important;
	}
	.wcmaa-responsive-table td:last-child {
		border-bottom: none !important;
	}

	.wcmaa-responsive-table td::before {
		content: attr(data-colname) !important;
		display: block !important;
		position: static !important;
		top: auto !important;
		left: auto !important;
		width: auto !important;
		height: auto !important;
		white-space: normal !important;
		font-weight: 600 !important;
		font-size: 12px !important;
		text-transform: uppercase !important;
		letter-spacing: .02em !important;
		color: #646970 !important;
		margin: 0 0 4px !important;
		padding: 0 !important;
	}

	.wcmaa-responsive-table td {
		position: static !important;
		padding-left: 12px !important;
	}
	.wcmaa-responsive-table .wcmaa-inline-form {
		display: block !important;
		margin: 0 0 6px !important;
	}
	.wcmaa-responsive-table .wcmaa-inline-form:last-child {
		margin-bottom: 0 !important;
	}

	.wcmaa-responsive-table td input[type="checkbox"] {
		width: 22px !important;
		height: 22px !important;
	}

	/* Switches (grille "Champs client") : cible tactile confortable. */
	.wcmaa-responsive-table td .wcmaa-switch-label {
		width: 42px;
		height: 24px;
	}
}

/* ══════════════════════════════════════════════════════════════════
   Module 5.1.1 — Volet "Approuver / Refuser / Suspendre".
   ══════════════════════════════════════════════════════════════════ */

.wcmaa-change-actions {
	margin-top: 10px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: flex-start;
}

.wcmaa-change-actions > form:not(.wcmaa-suspend-form) {
	flex: 0 0 auto;
}

.wcmaa-suspend-form {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: flex-start;
	flex: 1 1 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.wcmaa-suspend-form .wcmaa-suspend-presets {
	flex: 1 1 220px;
	max-width: 100%;
	box-sizing: border-box;
}
.wcmaa-suspend-form textarea {
	flex: 2 1 260px;
	max-width: 100%;
	box-sizing: border-box;
	resize: vertical;
}
.wcmaa-suspend-form button {
	flex: 0 0 auto;
}

@media screen and (max-width: 600px) {
	.wcmaa-suspend-form .wcmaa-suspend-presets,
	.wcmaa-suspend-form textarea,
	.wcmaa-suspend-form button {
		flex: 1 1 100%;
		width: 100%;
	}
}

/* ══════════════════════════════════════════════════════════════════
   Module 5.2.0 / 5.13.5 — Legendes asterisque (front-end).
   ══════════════════════════════════════════════════════════════════ */
.wcmaa-approval-legend,
.wcmaa-required-legend {
	font-size: 13px;
	color: #646970;
	font-style: italic;
	margin: 4px 0 16px;
}

/* ══════════════════════════════════════════════════════════════════
   Module 5.4.0 — Statut "À corriger" : panneau de motifs à cocher.
   ══════════════════════════════════════════════════════════════════ */

.wcmaa-correction-trigger {
	display: inline-block;
}

.wcmaa-correction-panel {
	margin-top: 8px;
	padding: 12px;
	border: 1px solid var(--wcmaa-border);
	border-radius: 6px;
	background: var(--wcmaa-auto-bg);
	max-width: 420px;
}

.wcmaa-correction-reasons-list {
	border: none;
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wcmaa-correction-reason {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-weight: normal;
}

.wcmaa-correction-panel textarea {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 8px;
}

@media screen and (max-width: 600px) {
	.wcmaa-correction-panel {
		max-width: 100%;
	}
}

/* ── Formulaire d'inscription adaptatif par pays (5.13.0) — front-end ── */
.wcmaa-registration .wcmaa-reg-title {
	margin: 28px 0 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
	font-size: 1.05em;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.wcmaa-registration .wcmaa-reg-title:first-child {
	margin-top: 0;
}
.wcmaa-registration .wcmaa-doc-row {
	padding: 10px 12px;
	margin-bottom: 10px;
	border: 1px dashed rgba(0, 0, 0, .18);
	border-radius: 6px;
}
.wcmaa-registration .wcmaa-doc-row .description {
	display: block;
	margin-top: 4px;
	font-size: .85em;
}
.wcmaa-registration input[type="file"] {
	max-width: 100%;
}
.wcmaa-vies-status {
	margin: 8px 0 0;
	padding: 8px 12px;
	border-left: 4px solid #2271b1;
	background: #f6f7f7;
}

/* ══════════════════════════════════════════════════════════════════
   v6.0.0 — Design system "Nova" : switch on/off (remplace les
   checkboxes de reglage dans la grille "Champs client" : Actif /
   Modifiable / Obligatoire / Validation requise). Les checkboxes de
   selection multiple (motifs de correction, etc.) restent natives.
   ══════════════════════════════════════════════════════════════════ */

.wcmaa-switch-label {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 22px;
	vertical-align: middle;
}
.wcmaa-switch-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.wcmaa-switch-slider {
	position: absolute;
	inset: 0;
	background: #c7ccd4;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s;
}
.wcmaa-switch-slider::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 3px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s;
	box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.wcmaa-switch-input:checked + .wcmaa-switch-slider {
	background: var(--wcmaa-accent);
}
.wcmaa-switch-input:checked + .wcmaa-switch-slider::before {
	transform: translateX(16px);
}
.wcmaa-switch-input:focus-visible + .wcmaa-switch-slider {
	outline: 2px solid var(--wcmaa-accent);
	outline-offset: 2px;
}
.wcmaa-switch-input:disabled + .wcmaa-switch-slider {
	opacity: .5;
	cursor: default;
}
/* iOS/Safari peut laisser transparaitre l'apparence native d'une
   checkbox meme en opacity:0 — on la neutralise explicitement. */
.wcmaa-switch-input {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   v6.0.1 — Grille de cartes "Champs client" (remplace le tableau
   large peu lisible en mobile).
   ══════════════════════════════════════════════════════════════════ */

.wcmaa-fields-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-bottom: 8px;
}
@media (min-width: 900px) {
	.wcmaa-fields-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.wcmaa-field-card {
	background: var(--wcmaa-card);
	border: 1px solid var(--wcmaa-border);
	border-radius: var(--wcmaa-radius);
	padding: 14px 16px;
	box-shadow: var(--wcmaa-shadow);
}

.wcmaa-field-card-head {
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--wcmaa-border);
}
.wcmaa-field-card-head strong {
	display: block;
	font-size: .95rem;
	color: var(--wcmaa-text);
	margin-bottom: 4px;
}

.wcmaa-field-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.wcmaa-field-source-badge,
.wcmaa-field-scope-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: var(--wcmaa-hint);
	background: var(--wcmaa-auto-bg);
	border: 1px solid var(--wcmaa-auto-bd);
	border-radius: 999px;
	padding: 2px 9px;
}

.wcmaa-field-switches {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px 16px;
}
@media (min-width: 480px) {
	.wcmaa-field-switches {
		grid-template-columns: repeat(4, 1fr);
	}
}

.wcmaa-switch-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.wcmaa-switch-item-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--wcmaa-hint);
}

.wcmaa-switch-locked {
	display: inline-flex;
	align-items: center;
	height: 22px;
	font-size: 14px;
	cursor: help;
}

.wcmaa-field-card-lock-note {
	margin: 10px 0 0;
	padding-top: 8px;
	border-top: 1px solid var(--wcmaa-border);
	font-size: 12px;
	color: var(--wcmaa-hint);
}

/* ---------- Onglet "Vérification" : pastilles de statut + panneau de test ---------- */
/* Couleurs sémantiques réutilisées telles quelles (succès/erreur/neutre/avertissement) —
   voir la palette additionnelle du design system : ne jamais inventer d'autres teintes. */
.wcmaa-status-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid;
}
.wcmaa-status-pill-success {
	background: #f0fdf4;
	border-color: #86efac;
	color: #16a34a;
}
.wcmaa-status-pill-error {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #dc2626;
}
.wcmaa-status-pill-neutral {
	background: #f8fafc;
	border-color: var(--wcmaa-border);
	color: var(--wcmaa-hint);
}
.wcmaa-status-pill-warning {
	background: #fffbeb;
	border-color: #fde68a;
	color: #d97706;
}
.wcmaa-verif-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
@media (min-width: 600px) {
	.wcmaa-verif-grid { grid-template-columns: 1fr 1fr; }
}
/* Securite anti "grid blowout" (cf. design system, section 10) : le
   tableau de trace a l'interieur de chaque colonne ne doit jamais
   forcer l'agrandissement de la grille parente. */
.wcmaa-verif-grid > div { min-width: 0; }
.wcmaa-verif-result {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px dashed var(--wcmaa-border);
}
.wcmaa-verif-result-title {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 8px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.wcmaa-verif-link {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 16px;
	border: 1px solid;
}
.wcmaa-verif-link-ok {
	background: #f0fdf4;
	border-color: #86efac;
	color: #16a34a;
}
.wcmaa-verif-link-ko {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #dc2626;
}
.wcmaa-verif-link code {
	background: rgba(0,0,0,.06);
	padding: 1px 5px;
	border-radius: 4px;
}
/* Le select "Pays" et les inputs du banc de test debordaient de la
   carte blanche : .regular-text (classe coeur WordPress) cible surtout
   les <input>, pas systematiquement les <select>, et ne force pas
   toujours box-sizing:border-box selon le theme admin. */
.wcmaa-settings-box select.regular-text,
.wcmaa-settings-box input.regular-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
/* Tableau de trace (onglet Verification) : le contenu peut inclure des
   URL longues sans espace (donc non coupables par le retour a la ligne
   normal) qui font deborder .wcmaa-log-table de la carte. Contrairement
   au tableau de donnees standard (section 10 du design system, scroll
   horizontal en media query), ici le bon comportement est de laisser le
   texte se casser a l'interieur de sa cellule plutot que de faire
   defiler horizontalement une trace qui doit rester lisible d'un coup
   d'oeil verticalement. */
.wcmaa-verif-result .wcmaa-log-table {
	table-layout: fixed;
	width: 100%;
}
.wcmaa-verif-result .wcmaa-log-cell {
	word-break: break-word;
	overflow-wrap: anywhere;
}
/* Colonne "Heure" du journal de trace uniquement (pas la fiche de
   synthèse ci-dessous, qui réutilise le même .wcmaa-log-table pour son
   apparence mais a besoin d'une colonne de libellé bien plus large). */
.wcmaa-verif-trace .wcmaa-log-cell-nowrap {
	width: 64px;
}
/* Fiche de synthèse (résultat TVA/SIRET lisible) : colonne de libellé
   à largeur fixe raisonnable, valeur qui prend le reste. */
.wcmaa-fiche-label {
	width: 160px;
	white-space: nowrap;
	vertical-align: top;
}

/* ══════════════════════════════════════════════════════════════════════
   FICHE CLIENT DEPLIABLE — page Approbation > Validation comptes
   Bloc <details> insere sous chaque ligne du tableau. Design system
   Nova : carte blanche opaque, pas de transparence, ombre uniquement
   sur la carte, couleurs semantiques reutilisees (pastilles de statut).
   ══════════════════════════════════════════════════════════════════ */

.wcmaa-fiche-row > .wcmaa-fiche-cell {
	background: var(--wcmaa-bg);
	padding: 0 12px 14px;
	border-top: none;
}

.wcmaa-fiche {
	background: var(--wcmaa-card);
	border: 1px solid var(--wcmaa-border);
	border-radius: var(--wcmaa-radius);
	box-shadow: var(--wcmaa-shadow);
	overflow: hidden;
}

/* Liseré de gauche : etat de completude du dossier, lisible d'un coup
   d'oeil meme fiche repliee. */
.wcmaa-fiche-ok      { border-left: 4px solid #16a34a; }
.wcmaa-fiche-partial { border-left: 4px solid #d97706; }
.wcmaa-fiche-ko      { border-left: 4px solid #dc2626; }

/* ---------- En-tete cliquable ---------- */
.wcmaa-fiche-summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding: 12px 14px;
	font-weight: 600;
	color: var(--wcmaa-text);
	user-select: none;
}
.wcmaa-fiche-summary::-webkit-details-marker { display: none; }
.wcmaa-fiche-summary:hover { background: var(--wcmaa-auto-bg); }
.wcmaa-fiche-summary:focus-visible {
	outline: 2px solid var(--wcmaa-accent);
	outline-offset: -2px;
}

/* Chevron indiquant l'etat plie/deplie. */
.wcmaa-fiche-summary-title::before {
	content: "\25B6";
	display: inline-block;
	margin-right: 8px;
	font-size: 10px;
	color: var(--wcmaa-hint);
	transition: transform .15s ease;
}
.wcmaa-fiche[open] .wcmaa-fiche-summary-title::before { transform: rotate(90deg); }
.wcmaa-fiche[open] .wcmaa-fiche-summary { border-bottom: 1px solid var(--wcmaa-border); }

/* ---------- Barre de progression du dossier ---------- */
.wcmaa-fiche-progress {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	min-width: 0;
}
.wcmaa-fiche-progress-bar {
	display: block;
	width: 120px;
	height: 8px;
	flex: none;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: hidden;
}
.wcmaa-fiche-progress-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--wcmaa-accent);
}
.wcmaa-fiche-ok      .wcmaa-fiche-progress-fill { background: #16a34a; }
.wcmaa-fiche-partial .wcmaa-fiche-progress-fill { background: #d97706; }
.wcmaa-fiche-ko      .wcmaa-fiche-progress-fill { background: #dc2626; }
.wcmaa-fiche-progress-text {
	font-size: 12px;
	font-weight: 500;
	color: var(--wcmaa-hint);
	white-space: nowrap;
}

/* ---------- Corps de la fiche ---------- */
.wcmaa-fiche-body { padding: 14px; }

.wcmaa-fiche-block + .wcmaa-fiche-block { margin-top: 16px; }

.wcmaa-fiche-block-title {
	margin: 0 0 10px;
	padding-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--wcmaa-text);
	border-bottom: 1px solid var(--wcmaa-border);
}

/* Grille des champs : 1 colonne mobile, 2 tablette, 3 desktop.
   minmax(0,1fr) protege du "grid blowout" avec une valeur longue. */
.wcmaa-fiche-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}
@media (min-width: 600px) {
	.wcmaa-fiche-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
	.wcmaa-fiche-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.wcmaa-fiche-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	padding: 8px 10px;
	background: #f8fafc;
	border: 1px solid var(--wcmaa-border);
	border-radius: 6px;
}
.wcmaa-fiche-item-missing {
	background: #fef2f2;
	border-color: #fca5a5;
}
.wcmaa-fiche-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--wcmaa-hint);
	overflow-wrap: break-word;
}
.wcmaa-fiche-value {
	font-size: 14px;
	color: var(--wcmaa-text);
	overflow-wrap: break-word;
	word-break: break-word;
}
.wcmaa-fiche-missing {
	font-size: 13px;
	font-weight: 600;
	color: #dc2626;
}

/* ---------- Lien direct vers un document ---------- */
.wcmaa-fiche-doc {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	max-width: 100%;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--wcmaa-accent);
	background: var(--wcmaa-auto-bg);
	border: 1px solid var(--wcmaa-auto-bd);
	border-radius: 6px;
}
.wcmaa-fiche-doc:hover {
	color: #ffffff;
	background: var(--wcmaa-accent);
	border-color: var(--wcmaa-accent2);
}
.wcmaa-fiche-ext {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .5px;
	opacity: .75;
}

/* ---------- Bloc identification legale (SIRET / TVA) ---------- */
.wcmaa-fiche-ident-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}
@media (min-width: 782px) {
	.wcmaa-fiche-ident-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wcmaa-fiche-ident-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	min-width: 0;
	margin: 0;
	padding: 8px 10px;
	background: #f8fafc;
	border: 1px solid var(--wcmaa-border);
	border-radius: 6px;
}
.wcmaa-fiche-ident-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--wcmaa-hint);
}
.wcmaa-fiche-ident-value {
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 13px;
	padding: 2px 6px;
	background: #ffffff;
	border: 1px solid var(--wcmaa-border);
	border-radius: 4px;
	overflow-wrap: anywhere;
}
.wcmaa-fiche-ident-pill { margin-left: auto; }

.wcmaa-fiche-empty { margin: 0 0 12px; }

/* ---------- Mobile ---------- */
@media screen and (max-width: 782px) {
	/* La table passe en cartes empilees (regle generique plus haut) :
	   la cellule de la fiche ne doit pas heriter du padding des <td>. */
	.wcmaa-responsive-table tr.wcmaa-fiche-row {
		border: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		/* Remonte la fiche contre la carte du compte auquel elle
		   appartient, dont la marge basse est de 14px. */
		margin-top: -14px !important;
		margin-bottom: 14px !important;
	}
	.wcmaa-fiche-row > .wcmaa-fiche-cell {
		padding: 0 !important;
		background: transparent !important;
	}
	.wcmaa-fiche {
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}
	.wcmaa-fiche-summary { padding: 11px 12px; }
	.wcmaa-fiche-progress {
		width: 100%;
		margin-left: 0;
	}
	.wcmaa-fiche-progress-bar { flex: 1 1 auto; width: auto; }
	.wcmaa-fiche-ident-pill { margin-left: 0; }
}

/* Pastille pays dans l'en-tete de fiche : rappelle le referentiel
   applique (c'est le pays, pas le reglage global, qui determine les
   champs exiges — cf. wcmaa_fiche_fields_for_user()). */
.wcmaa-fiche-country {
	display: inline-block;
	padding: 2px 9px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .3px;
	color: var(--wcmaa-accent);
	background: var(--wcmaa-auto-bg);
	border: 1px solid var(--wcmaa-auto-bd);
	border-radius: 999px;
}


/* ── Réglages : grille des pays sélectionnables ───────────────────── */
.wcmaa-countries-actions {
	margin: 0 0 12px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.wcmaa-countries-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: 4px 16px;
	margin-bottom: 10px;
}

.wcmaa-country-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 6px;
	border-radius: 4px;
	line-height: 1.4;
}

.wcmaa-country-item:hover {
	background: #f0f0f1;
}

.wcmaa-country-item span {
	flex: 1 1 auto;
}

.wcmaa-country-item code {
	font-size: 11px;
	color: #646970;
	background: transparent;
	padding: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   MODULE 6.9.0 — DEMANDE DE SUPPRESSION DE COMPTE
   ══════════════════════════════════════════════════════════════════════
   Cote client, le parti pris est l'effacement : un simple lien sous le
   bouton « Enregistrer les modifications », qui deplie le formulaire au
   clic. Aucune propriete de forme (arrondi, hauteur, typographie, hover)
   n'est imposee au bouton de soumission : il porte la classe .button du
   theme et herite donc integralement du style Woodmart, exactement comme
   le bouton « Enregistrer ». Seule la couleur est redefinie — et sans
   !important, pour rester surchargeable depuis un theme enfant. */

.wcmaa-delete-account {
	margin: 28px 0 0;
}

/* Le declencheur est un <button> (et non un <a href="#">) pour rester
   correct sans JavaScript et accessible au clavier, mais il est habille
   en lien afin de ne pas ressembler a une action principale.
   Les selecteurs sont deliberement portes par le conteneur parent : les
   themes WooCommerce (Woodmart en particulier) stylisent les <button>
   de la page « Mon compte » avec une specificite superieure a une classe
   isolee, ce qui transformait sinon ce lien en gros bouton gris. */
.wcmaa-delete-account .wcmaa-delete-link,
.wcmaa-delete-account .wcmaa-delete-link:hover,
.wcmaa-delete-account .wcmaa-delete-link:focus {
	display: inline;
	width: auto;
	min-height: 0;
	height: auto;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: inherit;
	font-size: .88em;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: #8a8a8a;
	cursor: pointer;
}

.wcmaa-delete-account .wcmaa-delete-link:hover,
.wcmaa-delete-account .wcmaa-delete-link:focus {
	color: #b32d2e;
}

/* Masquage uniquement si le script a pu poser la classe .wcmaa-js (voir
   wcmaa_del_toggle_script()) : sans JavaScript, le panneau reste visible
   et le formulaire utilisable. */
.wcmaa-delete-account.wcmaa-js .wcmaa-delete-panel {
	display: none;
}

.wcmaa-delete-account.wcmaa-js.is-open .wcmaa-delete-panel {
	display: block;
}

.wcmaa-delete-panel {
	margin-top: 18px;
	max-width: 640px;
}

.wcmaa-delete-intro,
.wcmaa-delete-pending {
	margin: 0 0 16px;
	font-size: .9em;
	line-height: 1.6;
	color: #767676;
}

.wcmaa-delete-reason {
	margin: 0 0 16px;
	font-size: .9em;
	line-height: 1.6;
	color: #555;
}

.wcmaa-delete-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Une fois le panneau ouvert, le lien declencheur s'efface : il ne sert
   plus a rien et deux libelles proches se faisaient concurrence. */
.wcmaa-delete-account.wcmaa-js.is-open .wcmaa-delete-link {
	display: none;
}

/* Le bouton d'envoi porte les memes classes que « Enregistrer les
   modifications » (.woocommerce-Button.button), mais Woodmart applique
   sa forme « pilule » via une classe ajoutee dynamiquement au chargement
   (btn-style-*), que notre bouton ne recoit pas. L'heritage seul ne
   suffit donc pas : la forme est redefinie ici explicitement pour
   reproduire celle du bouton bleu situe juste au-dessus. Si la charte du
   theme evolue, ce sont ces quatre proprietes (rayon, padding, casse,
   graisse) qu'il faudra reajuster. */
.wcmaa-delete-account .wcmaa-delete-submit {
	display: inline-block;
	width: auto;
	padding: 1.05em 2.2em;
	border: 0;
	border-radius: 50em;
	background-color: #b32d2e;
	color: #fff;
	font-size: .82em;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	box-shadow: none;
	transition: background-color .2s ease;
}

.wcmaa-delete-account .wcmaa-delete-submit:hover,
.wcmaa-delete-account .wcmaa-delete-submit:focus,
.wcmaa-delete-account .wcmaa-delete-submit:active {
	background-color: #8f2324;
	color: #fff;
}

/* Retrait applique AU SEUL lien « Supprimer mon compte » : le texte
   explicatif, le champ motif et le bouton d'envoi restent alignes sur le
   reste de la page, comme les autres sections du compte. Un margin-left
   sur le lien (et non un padding sur le conteneur) evite de decaler ses
   enfants. Valeur unique, a ajuster ici seule si besoin. */
.wcmaa-delete-account .wcmaa-delete-link {
	margin-left: 14px;
}

/* Cote administration : rappel du volume de commandes impactees avant
   de valider une suppression irreversible. */
.wcmaa-delete-orders-warning {
	margin: 12px 0;
	padding: 10px 14px;
	background: #fcf9e8;
	border-left: 4px solid #dba617;
	border-radius: 3px;
	font-size: .92em;
	color: #674e00;
}
