/**
 * Styles des pages comptes MaWilaya.
 * Cohérent avec le design system (tokens --mwl-* de shared.css).
 */

body.mwl-account-template {
	margin: 0;
	background: var(--mwl-bg, #F8FAFC);
	color: var(--mwl-text, #0F172A);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.6;
}

body.mwl-account-template *,
body.mwl-account-template *::before,
body.mwl-account-template *::after {
	box-sizing: border-box;
}

body.mwl-account-template .content-area,
body.mwl-account-template #primary {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.mwl-account-template .widget-area,
body.mwl-account-template #right-sidebar,
body.mwl-account-template #left-sidebar {
	display: none !important;
}

body.mwl-account-template a {
	color: var(--mwl-green, #0F8A4C);
	text-decoration: none;
}
body.mwl-account-template a:hover {
	text-decoration: underline;
}

.mwl-account-page {
	width: min(1100px, calc(100% - 40px));
	margin: 0 auto;
	padding: 48px 0 64px;
}

.mwl-account {
	display: flex;
	justify-content: center;
}

.mwl-account--wide .mwl-account__card {
	max-width: 980px;
}

.mwl-account__card {
	width: 100%;
	max-width: 460px;
	background: #FFFFFF;
	border: 1px solid var(--mwl-border, #E2E8F0);
	border-radius: 18px;
	box-shadow: var(--mwl-shadow, 0 8px 24px rgba(15, 23, 42, .06));
	padding: 36px 36px 32px;
}

.mwl-account__head {
	text-align: center;
	margin-bottom: 24px;
}

.mwl-account__logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 14px;
	background: var(--mwl-green-soft, #A7F3D0);
	margin-bottom: 14px;
}
.mwl-account__logo svg {
	width: 28px;
	height: 28px;
}

.mwl-account__head h1 {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 800;
	color: var(--mwl-text, #0F172A);
}

.mwl-account__subtitle {
	margin: 0;
	color: var(--mwl-muted, #475569);
	font-size: 14px;
}

/* Alerts */
.mwl-alert {
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 14px;
	border: 1px solid transparent;
}
.mwl-alert--success {
	background: #ECFDF5;
	border-color: #A7F3D0;
	color: #065F46;
}
.mwl-alert--error {
	background: #FEF2F2;
	border-color: #FECACA;
	color: #991B1B;
}

/* Form */
.mwl-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.mwl-form--inline {
	margin-top: 12px;
}
.mwl-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.mwl-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.mwl-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--mwl-text, #0F172A);
}
.mwl-req {
	color: #DC2626;
}
.mwl-field input,
.mwl-field select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--mwl-border, #E2E8F0);
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	background: #FFFFFF;
	color: var(--mwl-text, #0F172A);
	transition: border-color .15s, box-shadow .15s;
}
.mwl-field input:focus,
.mwl-field select:focus {
	outline: none;
	border-color: var(--mwl-green, #0F8A4C);
	box-shadow: 0 0 0 3px rgba(15, 138, 76, .12);
}
.mwl-field input:disabled,
.mwl-field select:disabled {
	background: #F1F5F9;
	color: #94A3B8;
	cursor: not-allowed;
}
.mwl-field small {
	font-size: 12px;
	color: var(--mwl-muted-2, #6B7280);
}

.mwl-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--mwl-muted, #475569);
}
.mwl-checkbox input {
	width: 16px;
	height: 16px;
}

.mwl-fieldset {
	border: 1px solid var(--mwl-border, #E2E8F0);
	border-radius: 12px;
	padding: 16px;
	margin: 0;
}
.mwl-fieldset legend {
	font-size: 13px;
	font-weight: 600;
	padding: 0 8px;
	color: var(--mwl-muted, #475569);
}

/* Buttons (réutilise mwl-btn de shared.css mais auto-suffisant ici) */
.mwl-account-template .mwl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
	transition: transform .12s, box-shadow .12s, background .12s;
	text-decoration: none;
}
.mwl-account-template .mwl-btn:hover {
	transform: translateY(-1px);
	text-decoration: none;
}
.mwl-account-template .mwl-btn--primary {
	background: var(--mwl-green, #0F8A4C);
	color: #FFFFFF;
}
.mwl-account-template .mwl-btn--primary:hover {
	background: var(--mwl-green-dark, #064E3B);
}
.mwl-account-template .mwl-btn--secondary {
	background: #FFFFFF;
	color: var(--mwl-green, #0F8A4C);
	border-color: var(--mwl-border, #E2E8F0);
}
.mwl-account-template .mwl-btn--wide {
	width: 100%;
}

.mwl-form__legal {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--mwl-muted-2, #6B7280);
	text-align: center;
}

/* Honeypot : invisible mais présent dans le DOM */
.mwl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Resend */
.mwl-resend {
	margin-top: 18px;
	font-size: 14px;
}
.mwl-resend summary {
	cursor: pointer;
	color: var(--mwl-green, #0F8A4C);
	font-weight: 600;
}

/* Liens bas de carte */
.mwl-account__links {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--mwl-border, #E2E8F0);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	font-size: 14px;
}

/* Message validation */
.mwl-account__message {
	color: var(--mwl-muted, #475569);
	font-size: 15px;
}
.mwl-account__message p {
	margin: 0 0 12px;
}

/* Dashboard mon-compte */
.mwl-account__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 28px;
	align-items: start;
}
.mwl-account__section h2 {
	margin: 0 0 18px;
	font-size: 18px;
	font-weight: 700;
}
.mwl-account__aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.mwl-account__panel {
	background: var(--mwl-bg-soft, #F9FAFB);
	border: 1px solid var(--mwl-border, #E2E8F0);
	border-radius: 14px;
	padding: 18px;
}
.mwl-account__panel h3 {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
}
.mwl-account__empty {
	margin: 0;
	font-size: 13px;
	color: var(--mwl-muted-2, #6B7280);
}

@media (max-width: 780px) {
	.mwl-account__grid {
		grid-template-columns: 1fr;
	}
	.mwl-field-row {
		grid-template-columns: 1fr;
	}
	.mwl-account__card {
		padding: 28px 22px 24px;
	}
}
