/* ==========================================================================
   Éditions ATP — Formulaire Multi-Étapes Soumission de Manuscrit [atp_manuscript_form]
   Territoire : FEATURES / FORMULAIRES
   ========================================================================== */

.atp-multistep-form-wrapper {
	max-width: 820px;
	margin: 30px auto;
}

.atp-multistep-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 40px;
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.05);
}

.atp-multistep-header {
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 2px solid #f1f5f9;
}

.atp-multistep-title {
	font-size: 26px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 6px;
}

.atp-multistep-subtitle {
	font-size: 14.5px;
	color: #64748b;
	margin: 0 0 24px;
}

/* Barre des étapes (Step Indicators) */
.atp-step-indicators {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	position: relative;
}

.atp-step-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 50px;
	transition: all 0.25s ease;
}

.atp-step-item.is-active {
	background: #fffbeb;
	border-color: #f59e0b;
	box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.atp-step-item.is-complete {
	background: #f0fdf4;
	border-color: #22c55e;
}

.atp-step-num {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #cbd5e1;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.atp-step-item.is-active .atp-step-num {
	background: #f59e0b;
	color: #000000;
}

.atp-step-item.is-complete .atp-step-num {
	background: #22c55e;
	color: #ffffff;
}

.atp-step-label {
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	white-space: nowrap;
}

.atp-step-item.is-active .atp-step-label {
	color: #0f172a;
}

/* Panneaux d'étapes */
.atp-form-step-content {
	display: none;
	flex-direction: column;
	gap: 20px;
}

.atp-form-step-content.is-active {
	display: flex;
	animation: atpFadeIn 0.3s ease;
}

@keyframes atpFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.atp-step-section-title {
	font-size: 16px;
	font-weight: 600;
	color: #d97706;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 8px;
	padding-bottom: 8px;
	border-bottom: 1.5px solid #fef3c7;
}

/* Disposition des champs en 2 colonnes */
.atp-form-row--2cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

/* Groupes de Champs & Libellés */
.atp-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	box-sizing: border-box;
}

.atp-form-label {
	font-size: 13.5px;
	font-weight: 600;
	color: #0f172a;
	display: flex;
	align-items: center;
	gap: 4px;
}

.atp-form-label .required {
	color: #ef4444;
}

/* Champs de Formulaire (Inputs, Selects, Textareas) */
.atp-form-input,
.atp-form-select,
.atp-form-textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	color: #0f172a;
	background: #f8fafc;
	font-family: inherit;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.atp-form-input:focus,
.atp-form-select:focus,
.atp-form-textarea:focus {
	outline: none;
	border-color: #f59e0b;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.atp-form-textarea {
	min-height: 110px;
	resize: vertical;
	line-height: 1.5;
}

/* Zone de Téléversement de Fichiers */
.atp-form-file {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px dashed #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
	font-size: 13.5px;
	color: #334155;
	cursor: pointer;
	box-sizing: border-box;
	transition: all 0.2s ease;
}

.atp-form-file:hover,
.atp-form-file:focus {
	border-color: #f59e0b;
	background: #fffbeb;
}

.atp-form-help {
	font-size: 12px;
	color: #64748b;
	margin-top: 2px;
	line-height: 1.4;
	display: block;
}

/* Alertes & Retours de Soumission */
.atp-form-feedback {
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	margin-top: 16px;
	box-sizing: border-box;
}

.atp-form-feedback--success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.atp-form-feedback--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Actions d'étapes (Suivant / Précédent) */
.atp-step-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 16px;
	padding-top: 20px;
	border-top: 1.5px solid #f1f5f9;
}

.atp-btn-prev {
	padding: 12px 22px;
	background: #ffffff;
	color: #334155;
	border: 1.5px solid #cbd5e1;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.atp-btn-prev:hover {
	background: #f8fafc;
	border-color: #0f172a;
	color: #0f172a;
}

.atp-btn-next {
	margin-left: auto;
	padding: 12px 24px;
	background: #1d2327;
	color: #ffffff;
	border: none;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.atp-btn-next:hover {
	background: #f59e0b;
	color: #000000;
}

.atp-btn-submit-final {
	margin-left: auto;
	padding: 14px 28px;
	background: #f59e0b;
	color: #000000;
	border: none;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
	transition: all 0.2s ease;
}

.atp-btn-submit-final:hover {
	background: #d97706;
	color: #ffffff;
	box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.atp-form-checkbox-group {
	margin-top: 10px;
}

.atp-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13.5px;
	color: #334155;
	line-height: 1.45;
	cursor: pointer;
}

.atp-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: #f59e0b;
}

/* ── Responsive Tablette (769px - 1023px) ── */
@media (min-width: 769px) and (max-width: 1023px) {
	.atp-multistep-card {
		padding: 32px 24px;
	}

	.atp-step-indicators {
		gap: 8px;
	}

	.atp-step-item {
		padding: 8px 12px;
	}

	.atp-step-label {
		font-size: 12px;
	}
}

/* ── Responsive Mobile (<= 768px) ── */
@media (max-width: 768px) {
	.atp-multistep-form-wrapper {
		padding: 0 16px !important;
		margin: 16px auto !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}

	.atp-multistep-card {
		padding: 22px 16px !important;
		border-radius: 14px !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}

	.atp-form-row--2cols {
		grid-template-columns: 1fr !important;
		gap: 14px !important;
	}

	.atp-step-indicators {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 8px !important;
	}

	.atp-step-item {
		padding: 8px 10px !important;
	}

	.atp-step-label {
		font-size: 11.5px !important;
	}

	/* Police 16px pour bloquer le zoom iOS Safari */
	.atp-form-input,
	.atp-form-select,
	.atp-form-textarea {
		font-size: 16px !important;
		padding: 12px 14px !important;
	}

	.atp-step-actions {
		gap: 10px !important;
	}

	.atp-btn-prev,
	.atp-btn-next,
	.atp-btn-submit-final {
		min-height: 48px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 12px 18px !important;
		font-size: 14px !important;
	}
}

/* ==========================================================================
   Modale Popup de Confirmation de Soumission (Succès)
   ========================================================================== */

.atp-modal-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.atp-modal-popup.is-open {
	display: flex !important;
	animation: atpFadeIn 0.25s ease-out forwards;
}

.atp-modal-popup__overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

.atp-modal-popup__card {
	position: relative;
	z-index: 10;
	background: #ffffff;
	border-radius: 18px;
	padding: 38px 32px 32px 32px;
	max-width: 480px;
	width: 100%;
	box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
	border: 1px solid #e2e8f0;
	text-align: center;
	transform: scale(0.94) translateY(12px);
	animation: atpCardSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes atpFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes atpCardSlideUp {
	to {
		transform: scale(1) translateY(0);
		opacity: 1;
	}
}

.atp-modal-popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #f1f5f9;
	color: #64748b;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.atp-modal-popup__close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.atp-modal-popup__icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #ecfdf5;
	border: 2px solid #a7f3d0;
	color: #10b981;
	margin-bottom: 18px;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.atp-modal-popup__title {
	font-family: var(--atp-font-family-heading, 'Inter Tight', sans-serif);
	font-size: 21px;
	font-weight: 700;
	color: #1d2327;
	margin: 0 0 10px 0;
	line-height: 1.35;
}

.atp-modal-popup__message {
	font-size: 14px;
	color: #475569;
	line-height: 1.6;
	margin: 0 0 20px 0;
}

.atp-modal-popup__details {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 22px;
	text-align: left;
	font-size: 12.5px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.atp-modal-popup__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
}

.atp-modal-popup__item span {
	color: #64748b;
}

.atp-modal-popup__item strong {
	color: #0f172a;
	font-weight: 600;
}

.atp-modal-popup__item a {
	color: #c5a059;
	font-weight: 600;
	text-decoration: none;
	word-break: break-all;
	transition: color 0.2s ease;
}

.atp-modal-popup__item a:hover {
	color: #9a7630;
	text-decoration: underline;
}

.atp-btn-modal-close {
	width: 100%;
	background: #1d2327;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	padding: 13px 24px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
	display: inline-block;
}

.atp-btn-modal-close:hover {
	background: #2d3a42;
}

.atp-btn-modal-close:active {
	transform: scale(0.99);
}

