/*
 * Page Contact (page-specific sections)
 * Spec: Figma nodes 8115:4844 (form section), 8115:4845 (form card),
 *       8115:4886 (right column = info card + map card).
 */

/* --- Section wrapper --------------------------------------------- */

.tdn-contact-section {
	background: var(--tdn-color-surface-subtle, #fef6f9);
	padding: 96px 24px;
}

.tdn-contact-section__container {
	max-width: 1336px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 848fr) minmax(0, 448fr);
	gap: 32px;
	align-items: stretch; /* both columns share the same height */
}

/* --- Form card (left) ------------------------------------------- */

.tdn-contact-section__form {
	background: #fff;
	border-top: 4px solid var(--tdn-color-pink-primary, #C06D80);
	border-radius: 48px;
	padding: 60px 52px;
	box-shadow: 0 14px 32px 0 rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.tdn-contact-section__form-title {
	margin: 0;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-h2-weight);
	font-size: 32px;
	line-height: 36px;
	letter-spacing: -0.04em;
	color: var(--tdn-color-midnight, #1a1a2e);
}

.tdn-contact-section__form-divider {
	width: 303px;
	max-width: 100%;
	height: 2px;
	border-radius: 99px;
	background: linear-gradient(to right, var(--tdn-color-pink-primary, #C06D80), rgba(192, 109, 128, 0));
	margin: 0;
	border: 0;
}

.tdn-contact-section__rgpd {
	margin: 0;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-size: 14px;
	line-height: 1.5;
	color: #4d4d4c;
}

/* --- Fluent Forms grid layout (scoped to .tdn-contact-section) -- */
/* FF wraps its fields in a <fieldset> — that's the actual grid container.
 * The fieldset contains 7 .ff-el-group children:
 *   1: names (text)         — col 1
 *   2: request_type (select) — col 2
 *   3: event_date (text)     — col 1
 *   4: budget (select)       — col 2
 *   5: message (textarea)    — full width
 *   6: microcopy (custom_html) — col 1, vertically centered
 *   7: submit (.ff_submit_btn_wrapper) — col 2, right aligned
 */

.tdn-contact-section__form .frm-fluent-form fieldset {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 32px;
	row-gap: 28px;
	align-items: start;
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

/* Take FF's screen-reader legend OUT of the grid flow (FF uses inline styles
 * with !important; we need !important to win). */
.tdn-contact-section__form .frm-fluent-form .ff_screen_reader_title {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.tdn-contact-section__form .frm-fluent-form .ff-el-group {
	margin: 0;
}

/* Textarea (message) — full width */
.tdn-contact-section__form .frm-fluent-form .ff-el-group:has(textarea) {
	grid-column: 1 / -1;
}

/* Microcopy (custom HTML) — col 1, centered with submit row */
.tdn-contact-section__form .frm-fluent-form .tdn-form-html-microcopy {
	grid-column: 1;
	align-self: center;
}

/* Submit wrapper — col 2, right aligned */
.tdn-contact-section__form .frm-fluent-form .ff_submit_btn_wrapper {
	grid-column: 2;
	justify-self: end;
	align-self: center;
	display: flex;
	margin: 0;
}

/* --- Labels ----------------------------------------------------- */

.tdn-contact-section__form .ff-el-input--label label {
	display: block;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-eyebrow-weight);
	font-size: 16px;
	line-height: 16px;
	letter-spacing: 0.075em;
	color: var(--tdn-color-midnight, #1a1a2e);
	margin: 0 0 12px;
}

/* Required asterisk — FF injects "*" via .ff-el-is-required.asterisk-right
 * label::after by default. We override its color to pink-primary. */
.tdn-contact-section__form .ff-el-is-required.asterisk-right label::after {
	color: var(--tdn-color-pink-primary, #C06D80) !important;
}

/* --- Form controls (text, select, textarea) -------------------- */

.tdn-contact-section__form .ff-el-form-control {
	width: 100%;
	box-sizing: border-box;
	background: var(--tdn-color-neutral-50, #fafafa);
	border: 1px solid #ebebeb;
	border-radius: 32px;
	padding: 17px 24px;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-font-weight-regular, 400);
	font-size: 16px;
	line-height: 1.5;
	color: var(--tdn-color-midnight, #1a1a2e);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.tdn-contact-section__form .ff-el-form-control::placeholder {
	color: #999;
	opacity: 1;
}

.tdn-contact-section__form .ff-el-form-control:focus {
	outline: none;
	border-color: var(--tdn-color-pink-primary, #C06D80);
	box-shadow: 0 0 0 3px rgba(192, 109, 128, 0.12);
}

/* Select with custom chevron */
.tdn-contact-section__form select.ff-el-form-control {
	padding: 16px 56px 16px 24px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a1a2e'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 24px center;
	background-size: 24px 24px;
	cursor: pointer;
}

/* Textarea — extra bottom padding to give visual height */
.tdn-contact-section__form textarea.ff-el-form-control {
	min-height: 140px;
	padding: 24px 24px 88px 24px;
	resize: vertical;
}

/* --- Microcopy "24h" -------------------------------------------- */

.tdn-form-microcopy {
	margin: 0;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-font-weight-bold, 700);
	font-size: 14px;
	line-height: 20px;
	color: #c06d80;
}

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

.tdn-contact-section__form .ff-btn-submit {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	height: 48px !important;
	padding: 6px 8px 6px 24px !important;
	background: var(--tdn-color-pink-primary, #C06D80) !important;
	color: #fff !important;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-button-weight);
	font-size: 16px;
	line-height: 1;
	text-transform: none;
	border: 0 !important;
	border-radius: 40px !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color 0.2s ease, transform 0.15s ease;
	min-width: max-content !important;
	max-width: max-content !important;
	width: auto !important;
	letter-spacing: 0;
	overflow: visible !important;
	position: relative !important;
	background-image: none !important;
}

.tdn-contact-section__form .ff-btn-submit:hover {
	background: var(--tdn-color-action-primary-hover, #C06D80) !important;
	transform: scale(1.02);
}

.tdn-contact-section__form .ff-btn-submit:active {
	transform: scale(0.98);
}

.tdn-contact-section__form .ff-btn-submit::after {
	content: '' !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	height: 36px !important;
	flex-shrink: 0;
	box-sizing: border-box;
	background-color: var(--tdn-color-midnight, #1a1a2e) !important;
	background-image: url("../../images/icons/arrow-up-right.svg") !important;
	background-position: 50% 50% !important;
	background-repeat: no-repeat !important;
	background-size: 16px 16px !important;
	border-radius: 40px !important;
	position: static !important;
	margin: 0 !important;
	right: auto !important;
	top: auto !important;
	transform: none !important;
}

/* Neutralise le ::before éventuel de Fluent Forms qui peut créer un doublon */
.tdn-contact-section__form .ff-btn-submit::before {
	content: none !important;
	display: none !important;
}

/* --- Right column wrapper (info + map cards) ------------------- */
/* Stretches to match the form column height. Info card keeps its
 * natural height; map card grows to fill the remaining space. */

.tdn-contact-section__right {
	display: flex;
	flex-direction: column;
	gap: 40px;
	height: 100%;
	min-height: 100%;
}

/* --- Info card "Où nous trouver" ------------------------------- */

.tdn-contact-section__info {
	background: #fff;
	border-top: 4px solid var(--tdn-color-pink-primary, #C06D80);
	border-radius: 32px;
	padding: 48px;
	box-shadow: 0 14px 32px 0 rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	gap: 32px;
	flex: 0 0 auto; /* natural height, no stretch */
}

.tdn-contact-section__info-title {
	margin: 0;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-h2-weight);
	font-size: 32px;
	line-height: 36px;
	letter-spacing: -0.04em;
	color: var(--tdn-color-midnight, #1a1a2e);
}

.tdn-contact-section__info-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.tdn-contact-section__info-block {
	display: flex;
	gap: 16px;
	align-items: center;
}

.tdn-contact-section__info-block--multiline {
	align-items: flex-start;
}

.tdn-contact-section__info-icon {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 999px;
	background: #c06d80;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tdn-contact-section__info-icon img {
	width: 20px;
	height: 20px;
	display: block;
}

.tdn-contact-section__info-content {
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-size: 16px;
	line-height: 26px;
	color: var(--tdn-color-midnight, #1a1a2e);
}

.tdn-contact-section__info-content strong {
	display: block;
	font-weight: var(--tdn-font-weight-bold);
}

.tdn-contact-section__info-content--single {
	font-weight: var(--tdn-font-weight-medium);
	line-height: 24px;
}

.tdn-contact-section__info-content--hours {
	font-weight: var(--tdn-eyebrow-weight);
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.075em;
	text-transform: uppercase;
}

.tdn-contact-section__info-content a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.tdn-contact-section__info-content a:hover {
	color: var(--tdn-color-pink-primary, #C06D80);
}

/* --- Map card --------------------------------------------------- */
/* Grows to fill the remaining height of the right column so info+map
 * together match the form column height. min-height kicks in only if
 * the right column collapses below the threshold (mobile / short form). */

.tdn-contact-section__map {
	background: #fff;
	border-radius: 32px;
	overflow: hidden;
	box-shadow: 0 14px 32px 0 rgba(0, 0, 0, 0.1);
	flex: 1 1 auto;
	min-height: 300px;
}

.tdn-contact-section__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- Photos des locaux ------------------------------------------ */
/* Spec: Figma node 8115:4745 — bg pink-50-deep, 4 polaroid cards
 * with alternating ±5° rotation + 17px stagger, watermark cool-shapes
 * banner (decorative SVG, native fill-opacity 0.2). Container max-width
 * 1440 (exception vs 1336 standard) per validated spec. */

.tdn-photos-section {
	background: var(--tdn-color-pink-50-deep, #fbe9ec);
	padding: 100px 0 150px;
	overflow: hidden; /* clip extreme overflow only on small viewports */
	position: relative;
}

.tdn-photos-section__container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 60px;
}

/* --- Header (title + subtitle) ----------------------------------- */

.tdn-photos-section__header {
	width: 100%;
	max-width: 993px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	text-align: center;
}

.tdn-photos-section__title {
	margin: 0;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-h2-weight);
	font-size: 60px;
	line-height: 1.2;
	letter-spacing: -1.8px;
	color: var(--tdn-color-midnight, #1a1a2e);
}

.tdn-photos-section__title-accent {
	color: var(--tdn-color-pink-primary, #C06D80);
}

.tdn-photos-section__subtitle {
	margin: 0;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-font-weight-regular, 400);
	font-size: 24px;
	line-height: 1.5;
	color: var(--tdn-color-midnight, #1a1a2e);
}

/* --- Watermark cool-shapes banner ------------------------------- */
/* Native SVG fill-opacity is 0.2 — no additional CSS opacity needed.
 * Width 1766px overflows the 1440 container by ~163px on each side. */

.tdn-photos-section__watermark {
	position: absolute;
	bottom: 126.78px;
	left: 50%;
	transform: translateX(-50%);
	width: 1766.288px;
	height: 123.202px;
	pointer-events: none;
	user-select: none;
	z-index: 0;
	max-width: none;
}

/* --- Polaroid grid --------------------------------------------- */

.tdn-photos-section__grid {
	position: relative;
	width: 1431.53px;
	height: 446px; /* 428.98 (cell h) + 17 (max top offset) */
	z-index: 1;
}

.tdn-photos-section__item {
	position: absolute;
	width: 350px;
	height: 400px;
	background: #fff;
	padding: 16px;
	border-radius: 24px;
	box-shadow: 0 14px 16px rgba(0, 0, 0, 0.1);
	box-sizing: border-box;
	transition: transform 0.4s ease;
}

.tdn-photos-section__item:nth-child(1) {
	left: 0;
	top: 14.5px;
	transform: rotate(5deg);
}

.tdn-photos-section__item:nth-child(2) {
	left: 348px;
	top: 31.5px;
	transform: rotate(-5deg);
}

.tdn-photos-section__item:nth-child(3) {
	left: 700px;
	top: 14.5px;
	transform: rotate(5deg);
}

.tdn-photos-section__item:nth-child(4) {
	left: 1048px;
	top: 31.5px;
	transform: rotate(-5deg);
}

.tdn-photos-section__item:hover {
	transform: rotate(0deg) scale(1.03);
	z-index: 2;
}

.tdn-photos-section__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 24px;
}

/* --- Responsive scale-down ------------------------------------- */

@media (max-width: 1488px) {
	/* On viewports < 1488px (1440 + 48 padding), scale the polaroid grid
	 * proportionally so the rotated cards stay within the container. */
	.tdn-photos-section__grid {
		transform: scale(calc((100vw - 48px) / 1431.53));
		transform-origin: top center;
	}
}

@media (max-width: 1024px) {
	.tdn-photos-section {
		padding: 64px 0 96px;
	}

	.tdn-photos-section__container {
		gap: 40px;
	}

	.tdn-photos-section__title {
		font-size: 40px;
		letter-spacing: -1.2px;
	}

	.tdn-photos-section__subtitle {
		font-size: 18px;
	}

	.tdn-photos-section__watermark {
		display: none;
	}
}

@media (max-width: 767px) {
	/* CAR0 horizontal full-screen : la section pose padding-inline 0 pour que
	 * le viewport CAR0 occupe TOUTE la largeur écran (sinon le padding 16px
	 * section + 16px viewport CAR0 cumulent et cassent le peek). Le header
	 * (titre + subtitle) garde un padding-inline 16 pour rester lisible. */
	.tdn-photos-section.gk-carousel {
		padding-inline: 0;
		--gk-carousel-card-width: calc(100vw - 80px);
		--gk-carousel-gap: 16px;
		--gk-carousel-peek: 24px;
		--gk-carousel-arrow-color: var(--tdn-color-pink-500, #C06D80);
	}

	.tdn-photos-section__container {
		padding-inline: 0;
	}

	.tdn-photos-section__header {
		padding-inline: 16px;
	}

	.tdn-photos-section__grid.gk-carousel__viewport {
		position: static;
		width: 100%;
		height: auto;
		display: flex;
		grid-template-columns: none;
		flex-direction: row;
		align-items: stretch;
		gap: var(--gk-carousel-gap);
		scroll-padding-inline-start: 40px;
		padding-block: 8px 32px;
		transform: none;
	}

	/* Item = card CAR0 : reset position absolute desktop + rotation. Force
	 * portrait via aspect-ratio 4/5 (sinon photo 1 paysage / photo 2 portrait =
	 * incohérent). L'img object-fit: cover crop pour remplir le cadre portrait. */
	.tdn-photos-section__item {
		position: static;
		width: auto;
		height: auto;
		aspect-ratio: 4 / 5;
		top: auto;
		left: auto;
		margin-top: 0 !important;
		transform: none !important;
	}

	.tdn-photos-section__item img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}

	/* Indicators compacts 28×28 + gap 0 */
	.tdn-photos-section .gk-carousel__indicators {
		gap: 0;
	}

	.tdn-photos-section .gk-carousel__dot {
		width: 28px;
		height: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdn-photos-section__item {
		transition: none;
	}

	.tdn-photos-section__item:hover {
		transform: none;
	}
}

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

@media (max-width: 1024px) {
	.tdn-contact-section__container {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.tdn-contact-section__form,
	.tdn-contact-section__info {
		padding: 40px 32px;
	}

	.tdn-contact-section__form-title,
	.tdn-contact-section__info-title {
		font-size: 28px;
		line-height: 32px;
	}

	.tdn-photos-section__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tdn-photos-section__item:nth-child(2),
	.tdn-photos-section__item:nth-child(4) {
		margin-top: 32px;
	}
}

@media (max-width: 767px) {
	/* Stack 1 col : la grid 2 cols desktop est sur fieldset (pas frm-fluent-form),
	 * donc il faut override sur fieldset. Sinon les champs Nom + Type restent
	 * sur la même ligne. Ordre DOM = Nom → Type → Date → Message → microcopy →
	 * submit, donc 1fr respecte ce que veut Morgan. */
	.tdn-contact-section__form .frm-fluent-form fieldset {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}

	.tdn-contact-section__form .frm-fluent-form .tdn-form-html-microcopy,
	.tdn-contact-section__form .frm-fluent-form .ff_submit_btn_wrapper {
		grid-column: 1;
		justify-self: stretch;
		align-self: stretch;
	}

	.tdn-contact-section__form .ff-btn-submit {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.tdn-contact-section {
		padding: 64px 16px;
	}

	/* photos-section : padding-inline 0 pour que le CAR0 viewport occupe la
	 * largeur écran complète (peek visible des 2 côtés). Le header garde son
	 * padding 16 via @767 ci-dessus. */
	.tdn-photos-section {
		padding: 64px 0;
	}

	.tdn-contact-section__form {
		padding: 32px 24px;
		border-radius: 32px;
	}

	.tdn-contact-section__info {
		padding: 32px 24px;
	}

	.tdn-photos-section__grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	/* Override : conserver le chevauchement -50px sur items 2+, ne reset que
	 * le 1er. Sinon la pile polaroïd se désagrège sur écrans <600px. */
	.tdn-photos-section__item:first-child {
		margin-top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdn-photos-section__item img,
	.tdn-contact-section__form .ff-btn-submit {
		transition: none;
	}

	.tdn-photos-section__item:hover img,
	.tdn-contact-section__form .ff-btn-submit:hover,
	.tdn-contact-section__form .ff-btn-submit:active {
		transform: none;
	}
}
