/* ============================================================
   booking.css - styles spécifiques à la page booking.php
   ----------------------------------------------------------
   Le formulaire principal s'appuie sur le multistep + les composants
   custom du projet (multiselect, datepicker, phone…). Tout ce qui
   est ici concerne UNIQUEMENT le layout de cette page : header
   (retour + titre + barre de progression), grid 2 colonnes
   (formulaire + sidebar prestataire), cartes sélectionnables sur
   l'écran "Demande envoyée".

   §1 - Layout général (section + grid 2 colonnes)
   §2 - Header (retour + titre + barre de progression)
   §3 - Carte formulaire & overrides multistep
   §4 - Sidebar (carte prestataire + carte équipe)
   §5 - Écran de succès "Demande envoyée" + cartes sélectionnables
   ============================================================ */

/* ---------- §1 - Layout général ---------- */
.booking-section {
	background: #F8F9FB;
	padding: 30px 15px 50px;
	min-height: calc(100vh - 80px);
	/* Filet de sécurité : tout élément interne qui déborderait (ex. carrousel
	   scroll-snap, bouton trop large) est clippé plutôt que de créer un scroll
	   horizontal du body. */
	overflow-x: hidden;
}

/* `min-width: 0` à chaque niveau du flux principal : sans ça, un flex item
   en column prend par défaut sa `min-content` largeur (= largeur totale de
   ses enfants flat), ce qui fait déborder le scroll-width interne d'un
   carrousel `overflow-x: auto` jusqu'au parent. C'est exactement ce qui se
   passait en mobile sur l'écran de succès : la grille des 6 cartes
   (scroll-width ≈ 6 × 80% = 480% de viewport) repoussait `.booking-main`
   au-delà du viewport via sa min-content. */
.booking-form,
.booking-shell,
.booking-grid,
.booking-main,
.booking-form-card,
.booking-success,
.booking-success-head,
.booking-success-actions {
	min-width: 0;
}
@media (min-width: 768px) {
	.booking-section { padding: 40px 30px 70px; }
}

.booking-shell {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.booking-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 25px;
	align-items: start;
}
@media (min-width: 1024px) {
	.booking-grid {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 30px;
	}
}

/* ---------- §2 - Header (retour + titre + progression) ---------- */
.booking-topbar {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* Barre de progression custom : 2 barres pleines en haut de page (1 par
   étape "vraie" du multistep - l'écran "Demande envoyée" qui suit est
   le data-multistep-success, donc la barre est cachée à ce moment-là
   par le JS multistep). Le JS pose `.is-current` et `.is-done` sur les
   éléments [data-multistep-dot] : on les style ici en barres pleines
   plutôt qu'en cercles (override du défaut `.multistep-dot` qu'on n'a
   pas ajouté sur ces éléments - markup volontairement neutre). */
.booking-progress {
	display: flex;
	align-items: center;
	gap: 6px;
}
.booking-progress-bar {
	flex: 1;
	height: 4px;
	border-radius: 40px;
	background: #E5E7EB;
	transition: background 200ms ease;
	cursor: default;
	border: 0;
	padding: 0;
}
.booking-progress-bar.is-current,
.booking-progress-bar.is-done {
	background: rgb(var(--brand));
}
.booking-progress-bar.is-done {
	cursor: pointer;
}

.booking-topbar-row {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
}

.booking-title {
	font-size: 18px;
	font-weight: 700;
	color: #0A0A0A;
	text-align: center;
	margin: 0;
}
@media (min-width: 768px) {
	.booking-title { font-size: 22px; }
}

/* ---------- §3 - Carte formulaire & overrides multistep ---------- */

/* Le <form> englobe TOUT (header + grid 2 colonnes) pour que le JS multistep
   trouve ses dots/lines via $$('[data-multistep-progress]', form). Il ne porte
   donc aucun style visuel : c'est `.booking-form-card` (la colonne de gauche
   dans la grille) qui est la card blanche, la sidebar à droite ayant ses
   propres cards (.booking-venue-card, .booking-team-card).
   Le `scroll-margin-top` du multistep et de ses wraps est mutualisé dans
   styles.css (`[data-multistep] { scroll-margin-top: 115px }` + `[data-multistep]
   .field-wrap { ... }`) - booking en bénéficie sans surcharge locale. */
.booking-form {
	display: block;
}

.booking-form-card {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.10);
	padding: 25px 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
@media (min-width: 768px) {
	.booking-form-card {
		padding: 40px 30px;
		gap: 20px;
	}
}

/* En-tête du form : compteur d'étape ("Étape 1/2") collé au-dessus du titre.
   On les groupe pour que le `gap` de .booking-form-card (20px) s'applique au
   bloc entier, l'espacement compteur↔titre restant serré (4px). */
.booking-form-heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.booking-form-counter {
	font-size: 14px;
	font-weight: 600;
	/* Couleur de marque (rose privé / bleu PRO via --brand) - jamais en dur. */
	color: rgb(var(--brand));
	margin: 0;
}

.booking-form-title {
	font-size: 18px;
	font-weight: 700;
	color: #0A0A0A;
	margin: 0;
}

/* La barre de progression standard du multistep est masquée - on en
   utilise une custom au-dessus de la card (voir .booking-progress). */
.booking-form .multistep-progress { display: none; }

/* Actions : on retire le séparateur du haut (le form a déjà sa card).
   Le bouton "Effacer" et les boutons Retour/Suivant/Submit gardent leur
   alignement par défaut du multistep (Effacer à gauche, le reste à droite). */
.booking-form .multistep-actions {
	padding-top: 5px;
	border-top: 0;
}
.booking-form .multistep-actions-main { gap: 12px; }

/* Checkbox newsletter (étape 2) - alignée au layout, pas requise. */
.booking-newsletter {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #0A0A0A;
	line-height: 1.4;
	cursor: pointer;
	user-select: none;
}
.booking-newsletter input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: rgb(var(--brand));
	flex-shrink: 0;
}

/* Checkbox AppMariage (étape 2) - révélée uniquement si le type d'événement
   sélectionné à l'étape 1 vaut « Mariage » (toggle JS dans booking.js §9).
   Partage le style de .booking-newsletter ; le sélecteur classe+attribut
   l'emporte sur le display:flex de .booking-newsletter pour que [hidden] masque. */
.booking-appmariage { margin-top: 14px; }
.booking-appmariage[hidden] { display: none; }

/* ---------- §4 - Sidebar (carte prestataire + carte équipe) ---------- */
.booking-sidebar {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.booking-venue-card {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding-bottom: 25px;
}
.booking-venue-photo {
	position: relative;
	width: 100%;
	aspect-ratio: 343 / 152;
	overflow: hidden;
}
.booking-venue-photo img,
.booking-venue-photo picture {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.booking-venue-body {
	padding: 18px 25px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.booking-venue-name {
	font-size: 18px;
	font-weight: 700;
	color: #0A0A0A;
	margin: 0;
}
.booking-venue-address {
	font-size: 13px;
	color: #757575;
	margin: 0;
}
.booking-venue-stats {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.booking-venue-stats li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #0A0A0A;
}
.booking-venue-stats i {
	font-size: 14px;
	width: 18px;
	text-align: center;
	color: #0A0A0A;
}
.booking-venue-description {
	font-size: 13px;
	line-height: 1.5;
	color: #757575;
	margin: 5px 0 0;
}

.booking-team-card {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.10);
	padding: 20px 25px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.booking-team-row {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 10px 0;
}
.booking-team-avatar {
	width: 71px;
	height: 71px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: rgb(var(--brand));
}
.booking-team-avatar img,
.booking-team-avatar picture {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.booking-team-text {
	font-size: 13px;
	line-height: 1.4;
	color: #0A0A0A;
	flex: 1;
}
.booking-team-text strong {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

.booking-trust-row {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	padding-top: 15px;
	border-top: 1px solid #E5E7EB;
}
.booking-trust-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	padding: 0 4px;
}
.booking-trust-item i {
	font-size: 22px;
	color: #0A0A0A;
}
.booking-trust-item span {
	font-size: 13px;
	line-height: 1.3;
	color: #0A0A0A;
	text-align: center;
}
.booking-trust-divider {
	width: 1px;
	background: #E5E7EB;
	margin: 5px 0;
	flex-shrink: 0;
}

/* ---------- §5 - Écran "Demande envoyée" ---------- */
.booking-success {
	display: flex;
	flex-direction: column;
	gap: 25px;
	padding: 5px 0;
}
.booking-success.hidden { display: none; }

/* Bascule de layout sur les écrans post-formulaire (succès lieux similaires
   OU écran "autres prestataires") : la card form devient transparente, la
   topbar disparaît, la sidebar aussi, le shell se resserre. Les deux écrans
   partagent ces transformations - on les regroupe avec une liste de sélecteurs. */
.booking-form:has([data-multistep-success]:not(.hidden)) .booking-form-card,
.booking-form:has([data-booking-pros]:not(.hidden))    .booking-form-card {
	background: transparent;
	box-shadow: none;
	padding: 0;
}
.booking-form:has([data-multistep-success]:not(.hidden)) .booking-topbar,
.booking-form:has([data-booking-pros]:not(.hidden))    .booking-topbar {
	display: none;
}
/* Le bloc en-tête (compteur "Étape" + titre) n'a plus de sens hors du
   formulaire : on le masque comme la topbar sur les écrans post-soumission. */
.booking-form:has([data-multistep-success]:not(.hidden)) .booking-form-heading,
.booking-form:has([data-booking-pros]:not(.hidden))    .booking-form-heading {
	display: none;
}
.booking-form:has([data-multistep-success]:not(.hidden)) .booking-sidebar,
.booking-form:has([data-booking-pros]:not(.hidden))    .booking-sidebar {
	display: none;
}
@media (min-width: 1024px) {
	.booking-form:has([data-multistep-success]:not(.hidden)) .booking-grid,
	.booking-form:has([data-booking-pros]:not(.hidden))    .booking-grid {
		grid-template-columns: 1fr;
	}
	/* Page post-formulaire plus aérée : on resserre la largeur max du shell
	   (1100px par défaut → 860px). */
	.booking-form:has([data-multistep-success]:not(.hidden)) .booking-shell,
	.booking-form:has([data-booking-pros]:not(.hidden))    .booking-shell {
		max-width: 860px;
	}
}

.booking-success-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
	/* Marge supplémentaire sous le head (en plus du gap 25px de .booking-success)
	   pour aérer la transition titre/sous-titre → grille de propositions. */
	margin-bottom: 15px;
}
.booking-success-title {
	font-size: 22px;
	font-weight: 700;
	color: #0A0A0A;
	margin: 0;
}
/* Check vert en gros cercle 56px, au-dessus du titre (le `.booking-success-head`
   est en flex-direction: column align-items: center, donc l'enchaînement
   icône → titre → sous-titre se fait verticalement et centré). */
.booking-success-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #16A34A;
	color: #fff;
	font-size: 22px;
	margin-bottom: 6px;
}
.booking-success-sub {
	font-size: 15px;
	color: #0A0A0A;
	margin: 0;
}

/* Grille de propositions :
   - Mobile (< md) : carrousel scroll-snap horizontal (.scroll-snap est posé
     dans le markup → snap mandatory + scrollbars masquées via styles.css).
     Les cards prennent 80% de la viewport pour qu'on aperçoive la suivante.
   - md+ : grille 2 colonnes
   - lg+ : grille 3 colonnes */
.booking-suggest-grid {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	/* Pas de margin négatif (créerait un scroll horizontal du body en mobile).
	   Le padding bottom donne juste de l'air sous le scroll. */
	padding-bottom: 5px;
	min-width: 0;
}
.booking-suggest-grid > * {
	flex: 0 0 80%;
	max-width: 320px;
}
@media (min-width: 768px) {
	.booking-suggest-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		overflow: visible;
		padding: 0;
	}
	.booking-suggest-grid > * {
		flex: initial;
		max-width: none;
	}
}
@media (min-width: 1024px) {
	.booking-suggest-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Carte de proposition : reprend le pattern visuel de `.list-card` en mode
   grille (cf. list.php) - chrome blanc, radius 15px, shadow douce, photo en
   haut, contenu en dessous. Toute la card est un <label> qui toggle la
   checkbox masquée ; la bordure rose + le check overlay donnent le feedback
   visuel de sélection. Le `.list-card` du markup hérite déjà du `bg-white
   rounded-[15px]` Tailwind ; on ajoute juste la bordure d'état et la shadow. */
.booking-suggest-card {
	border: 2px solid transparent;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: border-color 150ms ease, box-shadow 150ms ease;
}
.booking-suggest-card:hover { border-color: rgb(var(--brand-light)); }
.booking-suggest-card:has(input[type="checkbox"]:checked) {
	border-color: rgb(var(--brand));
}
.booking-suggest-card input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* Indicateur de sélection : pastille circulaire en haut à droite de la photo
   (même position et même taille que le bouton bookmark de `.list-card` dans
   list.php - 34px, cercle, fond blanc, ring gris). Au :checked, devient un
   disque rose plein avec un check blanc. */
.booking-suggest-check {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #D6D9DD;
	color: transparent;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.booking-suggest-card:has(input[type="checkbox"]:checked) .booking-suggest-check {
	background: rgb(var(--brand));
	border-color: rgb(var(--brand));
	color: #fff;
}

.booking-success-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding-top: 10px;
}
.booking-send-btn {
	min-width: 280px;
	max-width: 100%;
}
@media (max-width: 639.98px) {
	/* Sur petit écran, on retire le min-width et on prend toute la largeur
	   pour ne pas déborder du viewport (le label "Envoyer votre demande à
	   X lieux" + padding btn-primary fait facilement > 320px). */
	.booking-send-btn {
		min-width: 0;
		width: 100%;
	}
}
.booking-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.booking-decline-link {
	font-size: 13px;
	color: #0A0A0A;
	text-decoration: underline;
}
.booking-decline-link:hover { color: rgb(var(--brand)); }

/* ---------- §6 - Écran "Autres prestataires" ---------- */

/* Affiché APRÈS le success écran, au clic sur "Envoyer à X lieux" ou
   "Non merci". Le titre/sous-titre changent selon la source (data-booking-pros-source
   posé par booking.js), et un check vert s'affiche uniquement si la
   demande a effectivement été envoyée. */
.booking-pros {
	display: flex;
	flex-direction: column;
	gap: 25px;
	padding: 5px 0;
}
.booking-pros.hidden { display: none; }

.booking-pros-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
	margin-bottom: 15px;
}
/* Titre seul, identique au pattern de l'écran de succès. */
.booking-pros-title {
	font-size: 22px;
	font-weight: 700;
	color: #0A0A0A;
	margin: 0;
}
/* Check vert en gros cercle 56px, au-dessus du titre. Le check n'apparaît
   que si la demande a été effectivement envoyée (source = 'send') - sur la
   branche "Non merci", le titre "Pour aller plus loin" s'affiche seul. */
.booking-pros-check {
	display: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #16A34A;
	color: #fff;
	font-size: 22px;
	margin-bottom: 6px;
}
.booking-pros[data-booking-pros-source="send"] .booking-pros-check {
	display: inline-flex;
}
.booking-pros-sub {
	font-size: 15px;
	color: #0A0A0A;
	margin: 0;
	max-width: 560px;
}

.booking-pros-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
@media (min-width: 640px) {
	.booking-pros-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 768px) {
	.booking-pros-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

.booking-pros-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 22px 12px;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 14px;
	color: #0A0A0A;
	text-align: center;
}
.booking-pros-card:hover {
	border-color: rgb(var(--brand));
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.booking-pros-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgb(var(--brand) / 0.10);
	color: rgb(var(--brand));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
}
.booking-pros-label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.booking-pros-actions {
	display: flex;
	justify-content: center;
	padding-top: 10px;
}
.booking-finish-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 280px;
	max-width: 100%;
}
@media (max-width: 639.98px) {
	/* Pleine largeur sur petit écran, cohérent avec .booking-send-btn. */
	.booking-finish-btn { min-width: 0; width: 100%; }
}
