/* =====================================================================
 * Comparatif appareils photo — sélecteur (page mère)
 *
 * Direction visuelle : « duel photographique »
 *  - custom-header : conserve l'orange ALP par défaut (le menu site est
 *    conçu pour ce fond), avec H1 blanc en gros.
 *  - intro + hero : pleine largeur navy ALP, typo Neris XL,
 *    cartes glassmorphique, badge VS central, CTA XXL.
 * ===================================================================== */

/* ---------- Layout du thème ---------- */

.page-template-page-comparatif-appareils-photo #wrap {
	padding: 0;
	background: #212E40;
}

.page-template-page-comparatif-appareils-photo #main {
	padding: 0;
}

/* H1 : single line, conserve le fond orange par défaut. */
.page-template-page-comparatif-appareils-photo .custom-header .page-title {
	font-family: "Neris", sans-serif;
	font-weight: 900;
	font-size: 4.6rem;
	line-height: 1.05;
	letter-spacing: -0.01em;
	white-space: nowrap;
	text-align: center;
}

.page-template-page-comparatif-appareils-photo article.entry {
	background: #212E40;
}

.page-template-page-comparatif-appareils-photo .wbg {
	background: transparent;
}

/* ---------- Intro (lede) — pleine largeur navy ---------- */

.alp-comparatif-intro {
	background: #212E40;
	padding: 32px 0 0;
}

.alp-comparatif-intro .container {
	max-width: 920px;
}

.alp-comparatif-intro .entry-content {
	color: rgba(255, 255, 255, 0.94);
	font-family: "Neris", sans-serif;
	font-size: 1.85rem;
	line-height: 1.45;
	text-align: center;
	font-weight: 500;
	hyphens: none;
	-webkit-hyphens: none;
	word-break: normal;
	overflow-wrap: break-word;
}

.alp-comparatif-intro .entry-content > p {
	margin: 0.6em 0 0;
	font-size: 1.85rem;
	line-height: 1.45;
	hyphens: none;
	-webkit-hyphens: none;
}

.alp-comparatif-intro .entry-content a {
	color: #FB9936;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

/* ---------- Zone de contenu après le sélecteur (SEO copy) ---------- */

.alp-comparatif-aftercontent {
	background: #fff;
	padding: 80px 0 96px;
	color: #212E40;
}

.alp-comparatif-aftercontent .container {
	max-width: 820px;
}

.alp-comparatif-aftercontent .entry-content {
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: #212E40;
	hyphens: none;
	-webkit-hyphens: none;
	word-break: normal;
	overflow-wrap: break-word;
}

.alp-comparatif-aftercontent .entry-content h2 {
	font-family: "Neris", sans-serif;
	font-weight: 900;
	font-size: 2.6rem;
	line-height: 1.15;
	color: #212E40;
	margin: 1.8em 0 0.45em;
}

.alp-comparatif-aftercontent .entry-content h2:first-child {
	margin-top: 0;
}

.alp-comparatif-aftercontent .entry-content h3 {
	font-family: "Neris", sans-serif;
	font-weight: 800;
	font-size: 1.85rem;
	line-height: 1.3;
	color: #212E40;
	margin: 1.5em 0 0.35em;
}

.alp-comparatif-aftercontent .entry-content p {
	margin: 0.9em 0;
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	line-height: 1.6;
}

.alp-comparatif-aftercontent .entry-content a {
	color: #212E40;
	text-decoration: underline;
	text-decoration-color: #FB9936;
	text-underline-offset: 0.18em;
	font-weight: 600;
}

.alp-comparatif-aftercontent .entry-content a:hover {
	color: #FB9936;
	text-decoration-color: #FB9936;
}

@media (max-width: 640px) {
	.alp-comparatif-aftercontent {
		padding: 48px 0 64px;
	}
	.alp-comparatif-aftercontent .entry-content,
	.alp-comparatif-aftercontent .entry-content p {
		font-size: 17px;
		line-height: 1.55;
	}
	.alp-comparatif-aftercontent .entry-content h2 {
		font-size: 1.85rem;
		margin-top: 1.4em;
	}
	.alp-comparatif-aftercontent .entry-content h3 {
		font-size: 1.4rem;
	}
}

/* ---------- Hero ---------- */

.alp-comparatif-hero {
	position: relative;
	background: #212E40;
	color: #fff;
	padding: 32px 24px 140px;
	overflow: hidden;
	font-family: "Neris", sans-serif;
}

.alp-comparatif-inner {
	position: relative;
	max-width: 1280px;
	margin: 0 auto;
}

/* ---------- Form ---------- */

.alp-comparatif-form {
	margin: 64px 0 0;
	position: relative;
}

.alp-comparatif-fields {
	position: relative;
	z-index: 10;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: stretch;
	gap: 32px;
}

.alp-comparatif-field {
	position: relative;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	padding: 44px 32px 32px;
	backdrop-filter: blur(8px);
	transition: border-color 0.25s ease, background 0.25s ease;
	opacity: 0;
	transform: translateY(24px);
	animation: alpComparatifFieldIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.alp-comparatif-field[data-side="left"]  { animation-delay: 80ms;  }
.alp-comparatif-field[data-side="right"] { animation-delay: 240ms; }

.alp-comparatif-field:focus-within {
	border-color: #FB9936;
	background: rgba(255, 255, 255, 0.07);
}

.alp-comparatif-step {
	position: absolute;
	top: -28px;
	left: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 76px;
	height: 56px;
	padding: 0 22px;
	background: #FB9936;
	color: #fff;
	font-family: "Neris", sans-serif;
	font-weight: 900;
	font-size: 1.65rem;
	letter-spacing: 0.04em;
	border-radius: 999px;
	box-shadow: 0 8px 22px rgba(251, 153, 54, 0.45);
}

/* ---------- VS badge ---------- */

.alp-comparatif-vs {
	position: relative;
	z-index: 11;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	min-height: 96px;
	opacity: 0;
	animation: alpComparatifVsIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 360ms forwards;
}

.alp-comparatif-vs-circle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: #FB9936;
	box-shadow:
		0 0 0 6px rgba(33, 46, 64, 1),
		0 0 0 9px rgba(251, 153, 54, 0.25),
		0 14px 32px rgba(251, 153, 54, 0.45);
}

.alp-comparatif-vs-circle::before {
	content: "";
	position: absolute;
	inset: -10px;
	border-radius: 50%;
	border: 1px dashed rgba(251, 153, 54, 0.35);
	animation: alpComparatifVsRing 12s linear infinite;
}

.alp-comparatif-vs-text {
	font-family: "Neris", sans-serif;
	font-weight: 900;
	font-size: 2.55rem;
	line-height: 1;
	letter-spacing: 0.02em;
	color: #fff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

@keyframes alpComparatifVsIn {
	from { opacity: 0; transform: scale(0.6) rotate(-20deg); }
	to   { opacity: 1; transform: scale(1)   rotate(0); }
}

@keyframes alpComparatifVsRing {
	to { transform: rotate(360deg); }
}

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

/* ---------- Tom Select : harmonisation forte ---------- */

.alp-comparatif-hero .ts-wrapper {
	position: relative;
	z-index: 5;
	font-family: "Neris", sans-serif;
	font-size: 1.75rem;
	font-weight: 700;
}

.alp-comparatif-hero .ts-control {
	min-height: 86px;
	padding: 22px 26px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: #fff;
	color: #212E40;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	align-items: center;
}

.alp-comparatif-hero .ts-control input {
	font-size: 1.75rem !important;
	font-family: inherit !important;
	font-weight: 700 !important;
	color: #212E40 !important;
	line-height: 1.2 !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: auto !important;
}

.alp-comparatif-hero .ts-control input::placeholder {
	color: rgba(33, 46, 64, 0.45);
	font-weight: 500;
}

.alp-comparatif-hero .ts-wrapper.focus .ts-control,
.alp-comparatif-hero .ts-control:focus-within {
	border-color: #FB9936;
	box-shadow: 0 0 0 4px rgba(251, 153, 54, 0.25), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.alp-comparatif-hero .ts-wrapper.single .ts-control .item {
	display: flex;
	align-items: center;
	color: #212E40;
	font-weight: 800;
	line-height: 1.2;
	font-size: 1.75rem;
}

/* Custom dropdown */
.alp-comparatif-hero .ts-dropdown {
	z-index: 100;
	border-radius: 16px;
	border: 1px solid rgba(33, 46, 64, 0.12);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
	margin-top: 8px;
	overflow: hidden;
	font-family: "Neris", sans-serif;
}

.alp-comparatif-hero .ts-dropdown .option {
	padding: 18px 26px;
	color: #212E40;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.25;
	border-bottom: 1px solid rgba(33, 46, 64, 0.04);
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6em;
}

.alp-comparatif-hero .ts-dropdown .option:last-child { border-bottom: 0; }

.alp-comparatif-hero .ts-dropdown .active {
	background: #FB9936;
	color: #fff;
}

.alp-comparatif-hero .ts-dropdown .option .alp-brand {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(33, 46, 64, 0.08);
	color: rgba(33, 46, 64, 0.65);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.alp-comparatif-hero .ts-dropdown .active .alp-brand {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* Tom Select highlight (mots cherchés) — désactivé visuellement (pas de surligne). */
.alp-comparatif-hero .ts-dropdown .highlight {
	background: transparent;
	color: inherit;
	border-radius: 0;
	padding: 0;
}

.alp-comparatif-hero .ts-dropdown .no-results {
	padding: 20px 26px;
	color: rgba(33, 46, 64, 0.6);
	font-style: italic;
	font-size: 1.15rem;
}

/* Clear button */
.alp-comparatif-hero .ts-wrapper .clear-button {
	right: 18px;
	color: rgba(33, 46, 64, 0.4);
	font-size: 1.6rem;
	line-height: 1;
	transition: color 0.15s ease, transform 0.15s ease;
}

.alp-comparatif-hero .ts-wrapper .clear-button:hover {
	color: #FB9936;
	transform: scale(1.1);
}

/* ---------- Error ---------- */

.alp-comparatif-error {
	display: block;
	margin: 28px auto 0;
	max-width: 640px;
	padding: 16px 24px;
	background: rgba(220, 53, 69, 0.18);
	border: 1px solid rgba(220, 53, 69, 0.45);
	border-radius: 14px;
	color: #ffd6db;
	font-size: 1.15rem;
	font-weight: 600;
	text-align: center;
}

.alp-comparatif-error[hidden] {
	display: none;
}

/* ---------- Submit ---------- */

.alp-comparatif-actions {
	position: relative;
	z-index: 1;
	margin-top: 64px;
	text-align: center;
	opacity: 0;
	transform: translateY(16px);
	animation: alpComparatifFieldIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 480ms forwards;
}

.alp-comparatif-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 1.15em 2.8em;
	background: #FB9936;
	color: #fff;
	font-family: "Neris", sans-serif;
	font-weight: 900;
	font-size: 1.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 16px 40px rgba(251, 153, 54, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.25s ease;
	line-height: 1.1;
}

.alp-comparatif-submit:hover,
.alp-comparatif-submit:focus-visible {
	background: #ffaf57;
	transform: translateY(-2px);
	box-shadow: 0 24px 52px rgba(251, 153, 54, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
	outline: none;
}

.alp-comparatif-submit:active {
	transform: translateY(0);
}

.alp-comparatif-submit-arrow {
	display: inline-block;
	font-size: 1.4em;
	line-height: 1;
	transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.alp-comparatif-submit:hover .alp-comparatif-submit-arrow {
	transform: translateX(6px);
}

.alp-comparatif-submit.is-loading,
.alp-comparatif-submit:disabled {
	opacity: 0.78;
	cursor: progress;
}

.alp-comparatif-noscript {
	margin: 32px auto 0;
	max-width: 580px;
	padding: 16px 22px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	color: #fff;
	font-size: 1.1rem;
	text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.page-template-page-comparatif-appareils-photo .custom-header .page-title {
		font-size: 3.6rem;
		white-space: normal;
	}
	.alp-comparatif-intro .entry-content,
	.alp-comparatif-intro .entry-content > p {
		font-size: 1.5rem;
	}
}

@media (max-width: 991px) {
	.alp-comparatif-hero {
		padding: 24px 20px 80px;
	}
	.alp-comparatif-form {
		margin-top: 32px;
	}
	.alp-comparatif-fields {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.alp-comparatif-vs {
		justify-self: center;
		margin: -8px 0;
	}
	.alp-comparatif-hero .ts-wrapper,
	.alp-comparatif-hero .ts-control,
	.alp-comparatif-hero .ts-control input,
	.alp-comparatif-hero .ts-wrapper.single .ts-control .item {
		font-size: 1.4rem;
	}
}

@media (max-width: 640px) {
	/* Custom-header compact + breadcrumb masqué pour libérer le viewport.
	   padding-top ~170px pour passer SOUS la search bar du header mobile (logo + menu + search empilés). */
	.page-template-page-comparatif-appareils-photo .custom-header {
		padding: 168px 0 14px !important;
	}
	.page-template-page-comparatif-appareils-photo .custom-header .breadcrumb {
		display: none;
	}
	.page-template-page-comparatif-appareils-photo .custom-header .page-title {
		font-size: 2.2rem;
		white-space: normal;
		line-height: 1.05;
	}

	/* Intro lede : très peu d'espace au-dessus, typo réduite. */
	.alp-comparatif-intro {
		padding-top: 10px;
	}
	.alp-comparatif-intro .entry-content,
	.alp-comparatif-intro .entry-content > p {
		font-size: 1.05rem;
		line-height: 1.35;
	}

	/* Hero serré pour single-screen viewport. */
	.alp-comparatif-hero {
		padding: 8px 16px 32px;
	}
	.alp-comparatif-form {
		margin-top: 14px;
	}
	.alp-comparatif-fields {
		gap: 28px;
	}
	.alp-comparatif-actions {
		margin-top: 20px;
	}

	.alp-comparatif-field {
		padding: 30px 18px 16px;
	}
	.alp-comparatif-step {
		min-width: 56px;
		height: 40px;
		font-size: 1.1rem;
		padding: 0 14px;
		top: -20px;
	}
	.alp-comparatif-hero .ts-wrapper,
	.alp-comparatif-hero .ts-control input,
	.alp-comparatif-hero .ts-wrapper.single .ts-control .item {
		font-size: 1.05rem !important;
	}
	.alp-comparatif-hero .ts-control {
		min-height: 52px;
		padding: 10px 14px;
	}
	.alp-comparatif-hero .ts-dropdown .option {
		font-size: 1rem;
		padding: 12px 16px;
	}
	.alp-comparatif-vs,
	.alp-comparatif-vs-circle {
		width: 60px;
		height: 60px;
		min-height: 0;
	}
	.alp-comparatif-vs-text {
		font-size: 1.55rem;
	}
	.alp-comparatif-submit {
		width: 100%;
		justify-content: center;
		font-size: 1.15rem;
		padding: 0.85em 1.4em;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.alp-comparatif-field,
	.alp-comparatif-vs,
	.alp-comparatif-actions {
		opacity: 1;
		transform: none;
		animation: none;
	}
	.alp-comparatif-vs-circle::before {
		animation: none;
	}
}
