/* ==========================================================================
   ARICS Members – Premium Form Design System
   ========================================================================== */

/* ---------- Typographie ---------- */
/* Jost est la police du site ARICS Tours, déjà chargée par le thème.
   Le sélecteur descend jusqu'aux enfants et porte !important : sans cela,
   Elementor réimpose sa typographie sur les titres, libellés et boutons. */
.arics-form-wrapper,
.arics-form-wrapper *,
.arics-member-area,
.arics-member-area *,
.arics-notice,
.arics-notice * {
	font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ---------- Card container ---------- */
.arics-form-wrapper {
	max-width: 480px;
	margin: 2.5em auto;
	padding: 2.6em 2.4em 2.2em;
	background: linear-gradient(160deg, #fbfdfc 0%, #eef3f1 100%);
	border: 1px solid rgba(45, 90, 82, 0.08);
	border-radius: 20px;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.02),
		0 4px 12px rgba(0, 0, 0, 0.04),
		0 16px 40px -8px rgba(45, 90, 82, 0.08);
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

/* Subtle decorative top accent line */
.arics-form-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #2d5a52 0%, #3d8b7a 50%, #2d5a52 100%);
	border-radius: 20px 20px 0 0;
}

/* ---------- Form header ---------- */
.arics-form-header {
	/* Marges négatives : le bandeau va d'un bord à l'autre de la carte,
	   malgré le padding du conteneur. */
	margin: -2.6em -2.4em 2em;
	padding: 2.6em 2.4em 1.4em;
	text-align: center;
	background: linear-gradient(180deg, rgba(45, 90, 82, 0.07) 0%, rgba(45, 90, 82, 0.015) 100%);
	border-bottom: 1px solid rgba(45, 90, 82, 0.1);
	position: relative;
}

.arics-form-header::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 50%;
	transform: translateX(-50%);
	width: 48px;
	height: 3px;
	background: linear-gradient(90deg, #2d5a52, #3d8b7a);
	border-radius: 3px;
}

.arics-form-title,
.arics-form-wrapper h3 {
	font-size: 1.55em;
	font-weight: 800;
	color: #111827;
	margin: 0 0 0.35em 0;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.arics-step-intro {
	margin: 0;
	color: #6b7280;
	font-size: 0.92em;
	line-height: 1.6;
}

.arics-step-intro strong {
	color: #2d5a52;
	font-weight: 600;
}

/* ---------- Fields ---------- */
.arics-form .arics-field {
	margin-bottom: 1.3em;
	display: flex;
	flex-direction: column;
}

.arics-form label {
	font-weight: 700;
	font-size: 0.85em;
	color: #374151;
	margin-bottom: 0.45em;
	letter-spacing: 0.02em;
	text-transform: none;
}

.arics-form input[type="text"],
.arics-form input[type="email"],
.arics-form input[type="tel"],
.arics-form input[type="password"],
.arics-form select {
	padding: 0.8em 1em;
	border: 1.5px solid #e0e4e8;
	border-radius: 10px;
	font-size: 0.95em;
	color: #111827;
	background-color: #ffffff;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
	outline: none;
	box-sizing: border-box;
}

.arics-form input[type="text"]:hover,
.arics-form input[type="email"]:hover,
.arics-form input[type="tel"]:hover,
.arics-form input[type="password"]:hover,
.arics-form select:hover {
	border-color: #b5c4c0;
}

.arics-form input[type="text"]:focus,
.arics-form input[type="email"]:focus,
.arics-form input[type="tel"]:focus,
.arics-form input[type="password"]:focus,
.arics-form select:focus {
	border-color: #2d5a52;
	box-shadow: 0 0 0 3px rgba(45, 90, 82, 0.1), 0 1px 3px rgba(45, 90, 82, 0.08);
	background-color: #fafffe;
}

.arics-form input::placeholder {
	color: #9ca3af;
}

/* ---------- Readonly field ---------- */
.arics-field input[readonly] {
	background-color: #f3f5f7;
	color: #6b7280;
	border-color: #e5e7eb;
	cursor: default;
}

.arics-field-note {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font-size: 0.82em;
	color: #059669;
	margin-top: 0.4em;
	font-weight: 500;
}

.arics-field-note::before {
	content: '✓';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	background: #059669;
	color: #fff;
	border-radius: 50%;
	font-size: 0.7em;
	font-weight: 700;
	flex-shrink: 0;
}

/* ---------- Submit button ---------- */
.arics-form .arics-submit {
	margin-top: 1.8em;
}

.arics-form button[type="submit"]:not(.arics-link-button) {
	width: 100%;
	padding: 0.9em 1.5em;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, #2d5a52 0%, #3d8b7a 100%);
	color: #ffffff;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 6px rgba(45, 90, 82, 0.25);
	letter-spacing: 0.01em;
	position: relative;
	overflow: hidden;
}

.arics-form button[type="submit"]:not(.arics-link-button)::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
	transition: left 0.5s ease;
}

.arics-form button[type="submit"]:not(.arics-link-button):hover {
	background: linear-gradient(135deg, #1e4a43 0%, #2d6b5e 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(45, 90, 82, 0.3);
}

.arics-form button[type="submit"]:not(.arics-link-button):hover::after {
	left: 100%;
}

.arics-form button[type="submit"]:not(.arics-link-button):active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(45, 90, 82, 0.2);
}

/* ---------- Form links ---------- */
.arics-form-link {
	margin-top: 1.25em;
	text-align: center;
}

.arics-form-link a {
	color: #2d5a52;
	font-weight: 500;
	text-decoration: none;
	font-size: 0.9em;
	transition: color 0.2s ease, border-color 0.2s ease;
	border-bottom: 1px solid rgba(45, 90, 82, 0.25);
	padding-bottom: 1px;
}

.arics-form-link a:hover {
	color: #1a3832;
	border-bottom-color: #1a3832;
}

/* ---------- Resend form / Link-button ---------- */
.arics-resend-form {
	margin-top: 0.6em;
}

.arics-link-button {
	background: none;
	border: none;
	padding: 0;
	color: #2d5a52;
	text-decoration: none;
	cursor: pointer;
	font-size: 0.9em;
	font-weight: 500;
	border-bottom: 1px solid rgba(45, 90, 82, 0.25);
	padding-bottom: 1px;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.arics-link-button:hover {
	color: #1a3832;
	border-bottom-color: #1a3832;
}

/* ---------- Verification code field ---------- */
.arics-single-code-field {
	margin-bottom: 1.5em;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.arics-single-code-field label {
	align-self: center;
	text-align: center;
}

.arics-code-single-input,
#arics-verification-code {
	width: 100%;
	max-width: 220px;
	height: 60px;
	padding: 0 0.5em !important;
	border: 2px solid #d1d5db !important;
	border-radius: 12px !important;
	/* Champ unique et lisse : plus aucun séparateur vertical. */
	background-color: #f7faf9;
	background-image: none !important;
	font-variant-numeric: tabular-nums;
	font-size: 2em !important;
	font-weight: 700 !important;
	color: #111827;
	text-align: center;
	letter-spacing: 0.45em;
	outline: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(0, 0, 0, 0.03);
	margin: 0.6em 0 0 0;
}

.arics-code-single-input:hover,
#arics-verification-code:hover {
	border-color: #9ca3af !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.arics-code-single-input:focus,
#arics-verification-code:focus {
	border-color: #2d5a52 !important;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(45, 90, 82, 0.12), 0 2px 8px rgba(45, 90, 82, 0.08);
	transform: translateY(-1px);
}

.arics-code-single-input.is-complete,
#arics-verification-code.is-complete {
	border-color: #059669 !important;
	background-color: #f0fdf4;
	color: #065f46;
}

/* ---------- Notices ---------- */
.arics-notice {
	padding: 0.9em 1.1em;
	border-radius: 10px;
	margin-bottom: 1.4em;
	font-size: 0.9em;
	line-height: 1.5;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 0.6em;
	position: relative;
	border-left-width: 4px;
	border-left-style: solid;
}

.arics-notice::before {
	flex-shrink: 0;
	font-size: 1.1em;
	line-height: 1.4;
}

.arics-notice-success {
	background-color: #f0fdf4;
	color: #166534;
	border-color: #a7f3d0;
	border-left-color: #22c55e;
}

.arics-notice-success::before {
	content: '✓';
}

.arics-notice-error {
	background-color: #fef2f2;
	color: #991b1b;
	border-color: #fecaca;
	border-left-color: #ef4444;
}

.arics-notice-error::before {
	content: '!';
	font-weight: 700;
}

.arics-notice-info {
	background-color: #eff6ff;
	color: #1e40af;
	border-color: #bfdbfe;
	border-left-color: #3b82f6;
}

.arics-notice-info::before {
	content: 'ℹ';
}

/* ---------- Member area (charte ARICS Tours : vert profond + or + crème) ---------- */
.arics-member-area {
	max-width: 620px;
	margin: 2.5em auto;
}

.arics-member-card {
	background: linear-gradient(160deg, #fdfcf9 0%, #f4f1e9 100%);
	border: 1px solid rgba(201, 169, 97, 0.55);
	border-radius: 14px;
	padding: 2.4em 2.2em 2em;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.02),
		0 10px 30px -12px rgba(45, 90, 82, 0.12);
	box-sizing: border-box;
}

/* En-tête centré : pastille d'initiales, titre capitales, filet doré */
.arics-member-card-header {
	text-align: center;
	padding-bottom: 1.6em;
	margin-bottom: 1.8em;
	border-bottom: 1px solid rgba(201, 169, 97, 0.4);
	position: relative;
}

.arics-member-card-header::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 50%;
	transform: translateX(-50%);
	width: 56px;
	height: 2px;
	background: #c9a961;
}

.arics-member-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2d5a52 0%, #3d8b7a 100%);
	color: #ffffff;
	font-size: 1.4em;
	font-weight: 700;
	letter-spacing: 0.06em;
	box-shadow: 0 4px 14px rgba(45, 90, 82, 0.22);
}

.arics-member-area .arics-member-title {
	margin: 0.9em 0 0.3em !important;
	font-size: 1.1em !important;
	font-weight: 700 !important;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #2d5a52 !important;
	line-height: 1.4;
}

.arics-member-name {
	margin: 0 0 0.7em !important;
	font-size: 1.4em;
	font-weight: 700;
	color: #1f2937;
	line-height: 1.3;
}

.arics-member-badge {
	display: inline-block;
	padding: 0.3em 0.9em;
	border-radius: 999px;
	background: rgba(45, 90, 82, 0.09);
	color: #2d5a52;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Fiche d'informations : lignes fines, libellé en capitales, valeur à droite */
.arics-member-info {
	margin: 0 0 1.8em;
}

.arics-member-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.2em;
	padding: 0.85em 0;
	border-bottom: 1px solid rgba(45, 90, 82, 0.09);
}

.arics-member-row:last-child {
	border-bottom: none;
}

.arics-member-info dt {
	margin: 0;
	flex-shrink: 0;
	font-size: 0.76em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6f7f7b;
}

.arics-member-info dd {
	margin: 0;
	text-align: right;
	font-size: 0.98em;
	font-weight: 600;
	color: #1f2937;
	word-break: break-word;
}

/* Déconnexion : bouton vert de la charte, centré */
.arics-member-area .arics-logout {
	margin: 0;
	text-align: center;
}

.arics-logout-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.75em 2em;
	background: linear-gradient(135deg, #2d5a52 0%, #3d8b7a 100%) !important;
	color: #ffffff !important;
	text-decoration: none !important;
	border: none;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9em;
	letter-spacing: 0.02em;
	transition: all 0.25s ease;
	box-shadow: 0 2px 8px rgba(45, 90, 82, 0.25);
}

.arics-logout-link:hover,
.arics-logout-link:focus {
	background: linear-gradient(135deg, #1e4a43 0%, #2d6b5e 100%) !important;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(45, 90, 82, 0.3);
}

/* ---------- Variante bandeau paysage : [arics_member_area layout="bar"] ---------- */
.arics-member-area-bar {
	max-width: none;
	margin: 0 0 2em;
}

.arics-member-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.2em 1.8em;
	padding: 1.1em 1.6em;
	border-radius: 12px;
}

.arics-member-identity {
	display: flex;
	align-items: center;
	gap: 0.85em;
	min-width: 0;
}

.arics-member-bar .arics-member-avatar {
	width: 46px;
	height: 46px;
	flex-shrink: 0;
	font-size: 1em;
}

.arics-member-identity-text {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	min-width: 0;
}

.arics-member-bar .arics-member-name {
	margin: 0 !important;
	font-size: 1.02em;
	line-height: 1.25;
}

.arics-member-bar .arics-member-badge {
	align-self: flex-start;
	padding: 0.25em 0.7em;
	font-size: 0.64em;
}

/* Les informations passent en colonnes côte à côte, séparées de l'identité
   par un filet doré vertical. */
.arics-member-bar .arics-member-info {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em 2em;
	margin: 0;
	padding-left: 1.8em;
	border-left: 1px solid rgba(201, 169, 97, 0.5);
	min-width: 0;
}

.arics-member-bar .arics-member-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15em;
	padding: 0;
	border-bottom: none;
	min-width: 0;
}

.arics-member-bar .arics-member-info dt {
	font-size: 0.68em;
}

.arics-member-bar .arics-member-info dd {
	text-align: left;
	font-size: 0.92em;
}

.arics-member-bar .arics-logout {
	margin-left: auto;
}

.arics-member-bar .arics-logout-link {
	padding: 0.6em 1.5em;
	font-size: 0.85em;
}

/* ---------- Écran de confirmation d'inscription ---------- */
.arics-success-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	margin-bottom: 0.5em;
	border-radius: 50%;
	background: linear-gradient(135deg, #2d5a52 0%, #3d8b7a 100%);
	color: #ffffff;
	font-size: 1.5em;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(45, 90, 82, 0.22);
}

.arics-done-text {
	margin: 0;
	text-align: center;
	color: #4b5563;
	font-size: 0.92em;
	line-height: 1.7;
}

/* ---------- Admin statuses ---------- */
.arics-status {
	display: inline-block;
	padding: 0.25em 0.7em;
	border-radius: 6px;
	font-size: 0.82em;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.arics-status-pending {
	background-color: #fef3c7;
	color: #92400e;
}

.arics-status-approved {
	background-color: #d1fae5;
	color: #065f46;
}

.arics-status-rejected {
	background-color: #fee2e2;
	color: #991b1b;
}

.arics-protected-pages-list {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 1em 1.25em;
	max-width: 480px;
	margin-bottom: 1.5em;
}

.arics-protected-page-item {
	display: block;
	padding: 0.3em 0;
}

.arics-actions .button {
	margin-right: 0.5em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.arics-member-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 1.1em;
	}

	.arics-member-bar .arics-member-info {
		padding-left: 0;
		padding-top: 1.1em;
		border-left: none;
		border-top: 1px solid rgba(201, 169, 97, 0.5);
		gap: 1.2em 1.8em;
	}

	.arics-member-area-bar .arics-logout {
		margin: 0;
	}

	.arics-member-bar .arics-logout-link {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 520px) {
	.arics-form-wrapper {
		margin: 1.5em 1em;
		padding: 2em 1.4em 1.8em;
		border-radius: 16px;
	}

	.arics-form-header {
		margin: -2em -1.4em 1.6em;
		padding: 2em 1.4em 1.2em;
	}

	.arics-form-title,
	.arics-form-wrapper h3 {
		font-size: 1.35em;
	}

	.arics-member-card {
		padding: 2em 1.4em 1.8em;
	}

	.arics-member-row {
		flex-direction: column;
		gap: 0.3em;
	}

	.arics-member-info dd {
		text-align: left;
	}
}

/* Bandeau : repli vertical sur écrans étroits (placé en dernier pour primer). */
@media (max-width: 860px) {
	.arics-member-bar {
		align-items: stretch;
		flex-direction: column;
		gap: 1.1em;
		padding: 1.3em 1.4em;
	}

	.arics-member-bar .arics-member-info {
		padding-left: 0;
		padding-top: 1.1em;
		border-left: none;
		border-top: 1px solid rgba(201, 169, 97, 0.5);
		gap: 0.8em 1.8em;
	}

	.arics-member-bar .arics-logout {
		margin-left: 0;
	}

	.arics-member-bar .arics-logout-link {
		width: 100%;
		justify-content: center;
	}
}
