/* ============================================================
   Figurants Piqo – Form Styles  (DM Sans)
   ============================================================ */

:root {
	--fp-primary:       #E8524A;
	--fp-primary-dark:  #d4443c;
	--fp-dark:          #0F1926;
	--fp-border:        #D1D5DB;
	--fp-border-focus:  #0F1926;
	--fp-placeholder:   #9CA3AF;
	--fp-text:          #0F1926;
	--fp-bg:            #FFFFFF;
	--fp-progress-bg:   #E5E7EB;
	--fp-error-bg:      #FEF2F2;
	--fp-error-border:  #FCA5A5;
	--fp-error-text:    #DC2626;
	--fp-font:          'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--fp-r-input:       12px;
	--fp-r-btn:         100px;
	--fp-r-toggle:      100px;
}

/* ─── Reset ──────────────────────────────────────────────── */

.fp-app *,
.fp-app *::before,
.fp-app *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.fp-app {
	font-family: var(--fp-font);
	color: var(--fp-text);
	width: 100%;
	/* max-width intentionally unset: inherits from WordPress theme container */
}

.fp-app a { color: inherit; }

/* Hidden utility */
.fp-screen[hidden],
.fp-step[hidden],
.fp-responsable[hidden],
.fp-error-msg[hidden],
.fp-modal[hidden] { display: none !important; }

/* ================================================================
   INTRO (page 1 mobile / page 8 desktop)
================================================================ */

.fp-intro-title {
	font-family: var(--fp-font);
	font-size: clamp(30px, 6vw, 52px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--fp-dark);
	margin-bottom: 28px;
}

.fp-intro-text {
	margin-bottom: 36px;
}

.fp-intro-text p {
	font-size: 16px;
	line-height: 1.75;
	color: var(--fp-text);
	margin-bottom: 16px;
}

.fp-intro-text p:last-child { margin-bottom: 0; }

.fp-intro-text em { font-style: italic; }

/* ================================================================
   PROGRESS BAR  (thin coral-fill bar, pages 2-7)
================================================================ */

.fp-progress-bar {
	width: 100%;
	height: 4px;
	background: var(--fp-progress-bg);
	border-radius: 100px;
	margin-bottom: 36px;
	overflow: hidden;
}

.fp-progress-fill {
	height: 100%;
	background: var(--fp-primary);
	border-radius: 100px;
	transition: width 0.35s ease;
	width: 20%;
}

/* ================================================================
   STEP HEADER
================================================================ */

.fp-step-title {
	font-size: clamp(24px, 4.5vw, 38px);
	font-weight: 700;
	color: var(--fp-dark);
	line-height: 1.15;
	margin-bottom: 2px;
}

.fp-step-subtitle {
	font-size: 15px;
	font-weight: 400;
	color: var(--fp-dark);
	margin-bottom: 28px;
}

/* ================================================================
   STEP 1 – Infos de base  (pages 2 / 9)
================================================================ */

/* Mobile default: 2 columns  */
.fp-grid-step1 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 20px;
}

/* email spans full width on mobile */
.fp-field-email { grid-column: 1 / -1; }

/* Desktop: 4 columns, reorder  */
@media (min-width: 768px) {
	.fp-grid-step1 {
		grid-template-columns: repeat(4, 1fr);
		gap: 12px;
	}
	.fp-field-nom    { order: 1; }
	.fp-field-prenom { order: 2; }
	.fp-field-tel    { order: 3; }
	.fp-field-date   { order: 4; }
	.fp-field-npa    { order: 5; }
	.fp-field-lieu   { order: 6; }
	/* email: col 3-4 on desktop */
	.fp-field-email  { order: 7; grid-column: span 2; }
}

/* 2-col sub-grid (responsible fields) */
.fp-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

/* ─── Inputs ─────────────────────────────────────────────── */

.fp-input {
	display: block;
	width: 100%;
	padding: 0 18px;
	height: 54px;
	border: 1.5px solid var(--fp-border);
	border-radius: var(--fp-r-input);
	font-family: var(--fp-font);
	font-size: 16px;
	font-weight: 400;
	color: var(--fp-text);
	background: var(--fp-bg);
	outline: none;
	transition: border-color 0.18s;
	-webkit-appearance: none;
	appearance: none;
}

.fp-input::placeholder      { color: var(--fp-placeholder); }
.fp-input:focus             { border-color: var(--fp-border-focus); }
.fp-input.fp-input-error    { border-color: var(--fp-error-text); }

/* Legacy wrapper kept for mineur fields */
.fp-input-wrap {
	position: relative;
}

/* ─── Mineur section ─────────────────────────────────────── */

.fp-mineur-wrap {
	margin-top: 4px;
}

.fp-responsable {
	margin-top: 14px;
	padding: 18px;
	border: 1.5px solid var(--fp-border);
	border-radius: 14px;
}

.fp-responsable-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--fp-placeholder);
	margin-bottom: 14px;
}

/* ─── Checkboxes ─────────────────────────────────────────── */

.fp-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
}

.fp-checkbox {
	-webkit-appearance: none;
	appearance: none;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border: 1.5px solid var(--fp-dark);
	border-radius: 4px;
	background: var(--fp-bg);
	cursor: pointer;
	position: relative;
	transition: background 0.15s;
}

.fp-checkbox:checked { background: var(--fp-dark); }

.fp-checkbox:checked::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M4 10l4 4 8-8'/%3E%3C/svg%3E") no-repeat center / 13px;
}

.fp-checkbox-text {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
}

/* ─── Field error ────────────────────────────────────────── */

.fp-field-error {
	display: block;
	font-size: 12px;
	color: var(--fp-error-text);
	margin-top: 4px;
}

/* ================================================================
   STEPS 2-4 – Two-column layout  (pages 3-5 / 10-12)
================================================================ */

.fp-two-col {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

@media (min-width: 768px) {
	.fp-two-col {
		flex-direction: row;
		align-items: flex-start;
		gap: 64px;
	}
	.fp-two-col .fp-col { flex: 1; }
}

/* ─── Field group ────────────────────────────────────────── */

.fp-field-group {
	margin-bottom: 32px;
}

.fp-field-group:last-child { margin-bottom: 0; }

.fp-label {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: var(--fp-dark);
	margin-bottom: 14px;
}

.fp-field-hint {
	font-size: 13px;
	color: var(--fp-placeholder);
	margin-top: -8px;
	margin-bottom: 12px;
	line-height: 1.5;
}

/* ─── Toggle buttons ─────────────────────────────────────── */

.fp-toggle-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fp-toggle {
	padding: 10px 22px;
	border: 1.5px solid var(--fp-dark);
	border-radius: var(--fp-r-toggle);
	background: transparent;
	color: var(--fp-dark);
	font-family: var(--fp-font);
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	user-select: none;
	white-space: nowrap;
}

.fp-toggle:hover:not(.active) {
	background: rgba(15, 25, 38, 0.05);
	color: var(--fp-dark) !important;
}

.fp-toggle.active {
	background: var(--fp-dark);
	color: #fff;
}

/* Full-width toggle (Figuration silencieuse) */
.fp-toggle-block {
	width: 100%;
	text-align: left;
}

/* ─── Sliders ────────────────────────────────────────────── */

.fp-slider-wrap {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fp-slider-value {
	font-size: 26px;
	font-weight: 700;
	color: var(--fp-dark);
	text-align: center;
	line-height: 1;
}

.fp-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	background: var(--fp-dark);
	border-radius: 100px;
	outline: none;
	cursor: pointer;
}

.fp-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--fp-dark);
	cursor: pointer;
	transition: box-shadow 0.2s;
}

.fp-slider::-moz-range-thumb {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--fp-dark);
	cursor: pointer;
	border: none;
}

.fp-slider:focus::-webkit-slider-thumb,
.fp-slider:hover::-webkit-slider-thumb {
	box-shadow: 0 0 0 6px rgba(15, 25, 38, 0.12);
}

/* 3-position labeled slider (aisance caméra) */
.fp-slider-labels {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 700;
	color: var(--fp-dark);
}

/* ─── Textarea ───────────────────────────────────────────── */

.fp-textarea {
	display: block;
	width: 100%;
	padding: 14px 18px;
	border: 1.5px solid var(--fp-border);
	border-radius: var(--fp-r-input);
	font-family: var(--fp-font);
	font-size: 15px;
	font-weight: 400;
	color: var(--fp-text);
	background: var(--fp-bg);
	outline: none;
	resize: vertical;
	min-height: 108px;
	transition: border-color 0.18s;
	line-height: 1.6;
}

.fp-textarea::placeholder { color: var(--fp-placeholder); }
.fp-textarea:focus        { border-color: var(--fp-border-focus); }
.fp-textarea-lg           { min-height: 148px; }

/* ================================================================
   STEP 5 – Consentements  (pages 6 / 13)
================================================================ */

.fp-consents {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.fp-link {
	color: var(--fp-text);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.fp-link:hover { color: var(--fp-primary); }

.fp-consents .fp-link {
	color: var(--fp-primary) !important;
	text-decoration: underline !important;
	text-underline-offset: 2px !important;
	text-decoration-thickness: 1.5px !important;
}
.fp-consents .fp-link:hover {
	color: var(--fp-primary-dark) !important;
}

.fp-note {
	font-size: 13px;
	color: var(--fp-placeholder);
	line-height: 1.55;
	margin-top: 14px;
}

/* ================================================================
   WIDTH EXPANSION – break out of narrow WordPress content column
================================================================ */


/* ================================================================
   CUSTOM DATE PICKER
================================================================ */

/* Trigger wrapper */
.fp-dp {
	position: relative;
}

.fp-dp-trigger {
	position: relative;
}

.fp-dp-input {
	cursor: pointer;
	padding-right: 50px; /* room for calendar icon */
}

/* Calendar icon inside the input */
.fp-dp-icon {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--fp-placeholder);
	display: flex;
	align-items: center;
}

.fp-dp-icon svg {
	width: 18px;
	height: 18px;
}

/* ─── Popup ──────────────────────────────────────────────── */

.fp-dp-popup {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 9900;
	background: #fff;
	border: 1.5px solid var(--fp-border);
	border-radius: 18px;
	padding: 16px;
	box-shadow: 0 12px 40px rgba(15, 25, 38, 0.14), 0 2px 8px rgba(15, 25, 38, 0.06);
	width: 310px;
	user-select: none;
	animation: fp-dp-in 0.18s ease;
}

@keyframes fp-dp-in {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Mobile: bottom sheet so the calendar never overflows the viewport */
@media (max-width: 767px) {
	.fp-dp-popup {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		border-radius: 20px 20px 0 0;
		box-shadow: 0 -8px 32px rgba(15, 25, 38, 0.18);
		max-height: 80vh;
		overflow-y: auto;
	}
}

/* ─── Header (month/year selects + nav arrows) ────────────── */

.fp-dp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	gap: 4px;
}

.fp-dp-nav {
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	border: none;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--fp-dark);
	transition: background 0.15s;
}

.fp-dp-nav:hover { background: var(--fp-progress-bg); }

.fp-dp-nav svg {
	width: 17px;
	height: 17px;
}

.fp-dp-caption {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 1;
	justify-content: center;
}

/* Month & Year dropdowns – look like styled text, not selects */
.fp-dp-sel {
	-webkit-appearance: none;
	appearance: none;
	border: none;
	background: transparent;
	font-family: var(--fp-font);
	font-size: 16px;
	font-weight: 700;
	color: var(--fp-dark);
	cursor: pointer;
	outline: none;
	padding: 5px 6px;
	border-radius: 8px;
	text-align: center;
	transition: background 0.15s;
}

.fp-dp-sel:hover,
.fp-dp-sel:focus { background: var(--fp-progress-bg); }

/* ─── Weekday labels ─────────────────────────────────────── */

.fp-dp-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--fp-placeholder);
	padding-bottom: 8px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--fp-progress-bg);
}

/* ─── Days grid ──────────────────────────────────────────── */

.fp-dp-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.fp-dp-day {
	height: 36px;
	width: 100%;
	border: none;
	background: transparent;
	font-family: var(--fp-font);
	font-size: 13px;
	font-weight: 400;
	color: var(--fp-dark);
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.12s, color 0.12s;
	position: relative;
	line-height: 1;
}

/* Hover */
.fp-dp-day:hover:not(:disabled):not(.fp-dp-day--selected) {
	background: var(--fp-progress-bg);
}

/* Days from adjacent months */
.fp-dp-day--other {
	color: #C8CDD5;
}

/* Today – coral dot indicator */
.fp-dp-day--today {
	color: var(--fp-primary);
	font-weight: 700;
}

.fp-dp-day--today::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--fp-primary);
}

/* Selected day – dark navy fill */
.fp-dp-day--selected {
	background: var(--fp-dark) !important;
	color: #fff !important;
	font-weight: 700;
}

.fp-dp-day--selected.fp-dp-day--today::after {
	background: rgba(255,255,255,0.6);
}

/* Disabled (future) */
.fp-dp-day--disabled {
	color: #D8DCE3;
	cursor: not-allowed;
}

/* ─── Comment box (Quelque chose à ajouter?) ─────────────── */
/* Title inside the border, matches PDF pages 6/13 */

.fp-comment-box {
	border: 1.5px solid var(--fp-border);
	border-radius: var(--fp-r-input);
	padding: 16px 18px 14px;
	transition: border-color 0.18s;
}

.fp-comment-box:focus-within {
	border-color: var(--fp-border-focus);
}

.fp-comment-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--fp-dark);
	margin-bottom: 8px;
	line-height: 1;
}

.fp-comment-textarea {
	display: block;
	width: 100%;
	min-height: 110px;
	border: none;
	outline: none;
	background: transparent;
	font-family: var(--fp-font);
	font-size: 16px;
	font-weight: 400;
	color: var(--fp-text);
	line-height: 1.6;
	resize: vertical;
	padding: 0;
}

.fp-comment-textarea::placeholder { color: var(--fp-placeholder); }

/* ─── Error block ────────────────────────────────────────── */

.fp-error-msg {
	background: var(--fp-error-bg);
	border: 1px solid var(--fp-error-border);
	color: var(--fp-error-text);
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	margin-top: 20px;
}

/* ================================================================
   NAVIGATION  (Suivant / Précédent)
   Mobile: Suivant on top (full width), Précédent below (full width)
   Desktop: side by side, centered, auto width
================================================================ */

.fp-nav {
	display: flex;
	flex-direction: column-reverse; /* Précédent in DOM → bottom; Suivant → top */
	gap: 12px;
	margin-top: 40px;
}

@media (min-width: 560px) {
	.fp-nav {
		flex-direction: row;
		justify-content: center;
		align-items: center;
		gap: 16px;
	}
}

/* ================================================================
   BUTTONS
================================================================ */

.fp-btn-primary,
.fp-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 17px 40px;
	border-radius: var(--fp-r-btn);
	font-family: var(--fp-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background 0.18s, color 0.18s, opacity 0.18s;
	white-space: nowrap;
}

@media (min-width: 560px) {
	.fp-btn-primary,
	.fp-btn-secondary {
		width: auto;
	}
}

/* Primary – coral */
.fp-btn-primary {
	background: var(--fp-primary);
	color: #fff !important;
	border-color: var(--fp-primary);
}

.fp-btn-primary:hover:not(:disabled),
.fp-btn-primary:focus:not(:disabled) {
	background: var(--fp-primary-dark) !important;
	border-color: var(--fp-primary-dark) !important;
	color: #fff !important;
}

.fp-btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Secondary – outlined dark */
.fp-btn-secondary {
	background: transparent;
	color: var(--fp-dark);
	border-color: var(--fp-dark);
}

.fp-btn-secondary:hover,
.fp-btn-secondary:focus {
	background: rgba(15, 25, 38, 0.05) !important;
	border-color: var(--fp-dark) !important;
	color: var(--fp-dark) !important;
}

/* ================================================================
   CONFIRMATION  (pages 7 / 14)
================================================================ */

#fp-confirmation .fp-progress-bar {
	margin-bottom: 40px;
}

.fp-confirm-title {
	font-size: clamp(28px, 5.5vw, 48px);
	font-weight: 700;
	color: var(--fp-dark);
	line-height: 1.2;
	margin-bottom: 14px;
}

.fp-confirm-sub {
	font-size: 18px;
	font-weight: 400;
	color: var(--fp-dark);
	margin-bottom: 32px;
}

.fp-confirm-text {
	font-size: 16px;
	line-height: 1.75;
	color: var(--fp-text);
	margin-bottom: 48px;
}

/* ================================================================
   MODALS
================================================================ */

.fp-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.fp-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 25, 38, 0.55);
	backdrop-filter: blur(3px);
}

.fp-modal-box {
	position: relative;
	background: var(--fp-bg);
	border-radius: 20px;
	max-width: 700px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	scroll-behavior: smooth;
}

.fp-modal-close {
	position: sticky;
	top: 16px;
	float: right;
	margin: 16px 16px 0 0;
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 50%;
	border: none;
	background: var(--fp-progress-bg);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	transition: background 0.18s;
	font-family: var(--fp-font);
}

.fp-modal-close:hover { background: var(--fp-border); }

.fp-modal-body {
	padding: 8px 32px 36px;
	clear: both;
}

.fp-modal-body h2 {
	font-family: var(--fp-font);
	font-size: 22px;
	font-weight: 700;
	color: var(--fp-dark);
	margin-bottom: 20px;
}

.fp-modal-body p {
	font-family: var(--fp-font);
	font-size: 14px;
	line-height: 1.7;
	color: var(--fp-text);
	margin-bottom: 10px;
}
