/* ===== TFO Tunnel de vente + popin RDV ===== */

.tfo-tunnel {
	--tfo-primaire: var(--wp--preset--color--primary, #05546d);
	--tfo-secondaire: var(--wp--preset--color--secondary, #2696af);
	--tfo-cta: var(--wp--preset--color--accent-cta, #f39200);
	--tfo-doux: var(--wp--preset--color--base-soft, #f2f8fa);
}

/* --- Étapes --- */
.tfo-etape {
	margin: 2.2rem auto;
	max-width: 860px;
	scroll-margin-top: 96px; /* laisse la place au header sticky */
	animation: tfo-apparition 0.35s ease both;
}
@keyframes tfo-apparition {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.tfo-etape { animation: none; }
}

.tfo-etape-question {
	font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
	margin-bottom: 0.4rem;
}
.tfo-etape-aide { color: #6a6a6a; font-size: 0.9rem; margin: 0 0 0.8rem; }

/* --- Cartes de choix --- */
.tfo-cartes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 0.9rem;
}
.tfo-carte {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	text-align: left;
	padding: 1rem 1.1rem;
	background: #fff;
	border: 2px solid #d8e8ee;
	border-radius: 12px;
	cursor: pointer;
	font: inherit;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tfo-carte:hover { border-color: var(--tfo-secondaire, #2696af); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(5, 84, 109, 0.12); }
.tfo-carte.est-choisie { border-color: var(--tfo-primaire, #05546d); background: var(--tfo-doux, #f2f8fa); box-shadow: inset 0 0 0 1px var(--tfo-primaire, #05546d); }
.tfo-carte-icone { font-size: 1.6rem; line-height: 1; }
.tfo-carte-label { font-weight: 700; color: var(--tfo-primaire, #05546d); }
.tfo-carte-hint { font-size: 0.82rem; color: #6a6a6a; line-height: 1.35; }

/* --- Carte « à part » (confrères avocats) --- */
.tfo-separateur-apart {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin: 1.4rem 0 0.8rem;
	color: var(--tfo-primaire, #05546d);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.tfo-separateur-apart::before,
.tfo-separateur-apart::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--tfo-secondaire, #2696af), transparent);
}
.tfo-cartes--apart { grid-template-columns: 1fr; }
.tfo-carte--apart {
	flex-direction: row;
	align-items: center;
	gap: 0.9rem;
	background: linear-gradient(135deg, #f7fbfc 0%, #eaf4f7 100%);
	border-style: solid;
	border-color: var(--tfo-primaire, #05546d);
}
.tfo-carte--apart .tfo-carte-icone { font-size: 1.9rem; }
.tfo-carte--apart:hover { border-color: var(--tfo-secondaire, #2696af); }
.tfo-etape.est-repondue .tfo-separateur-apart { display: none; }

/* Étape répondue : on compacte les cartes non choisies */
.tfo-etape.est-repondue .tfo-carte:not(.est-choisie) { opacity: 0.45; }
.tfo-etape.est-repondue .tfo-carte-hint { display: none; }
.tfo-etape.est-repondue .tfo-cartes { gap: 0.5rem; }
.tfo-etape.est-repondue .tfo-carte { padding: 0.55rem 0.9rem; flex-direction: row; align-items: center; }

/* --- Puces multi-choix --- */
.tfo-puces { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1rem; }
.tfo-puce {
	font: inherit;
	font-size: 0.92rem;
	padding: 0.45em 1em;
	border: 2px solid #d8e8ee;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.tfo-puce:hover { border-color: var(--tfo-secondaire, #2696af); }
.tfo-puce.est-choisie {
	border-color: var(--tfo-primaire, #05546d);
	background: var(--tfo-primaire, #05546d);
	color: #fff;
}

/* --- Liste informative (non interactive) --- */
.tfo-puces-liste {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}
.tfo-puces-liste li {
	font-size: 0.92rem;
	padding: 0.45em 1em;
	border: 2px solid #d8e8ee;
	border-radius: 999px;
	background: #fff;
}

/* --- Boutons --- */
.tfo-btn {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700;
	font-size: 1rem;
	border: none;
	border-radius: 8px;
	padding: 0.7em 1.6em;
	cursor: pointer;
	background: var(--tfo-primaire, #05546d);
	color: #fff;
	transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.tfo-btn:hover { background: var(--tfo-secondaire, #2696af); transform: translateY(-1px); }
.tfo-btn-cta { background: var(--tfo-cta, #f39200); font-size: 1.05rem; }
.tfo-btn-cta:hover { background: #d98200; box-shadow: 0 4px 14px rgba(243, 146, 0, 0.35); }

/* --- Résultat --- */
.tfo-resultat {
	background: var(--tfo-doux, #f2f8fa);
	border-left: 4px solid var(--tfo-secondaire, #2696af);
	border-radius: 12px;
	padding: 1.4rem 1.6rem;
}
.tfo-prestations { margin: 0.6rem 0 0.9rem; padding-left: 0; list-style: none; }
.tfo-prestations li { padding: 0.3rem 0 0.3rem 1.7rem; position: relative; }
.tfo-prestations li::before {
	content: "✓";
	position: absolute; left: 0;
	color: var(--tfo-secondaire, #2696af);
	font-weight: 700;
}
.tfo-prix { font-size: 0.95rem; color: #444; border-top: 1px dashed #c4dde5; padding-top: 0.8rem; }
.tfo-resultat-cta { margin-top: 1rem; text-align: center; }
.tfo-resultat-cta p { margin-bottom: 0.7rem; }

/* =========================================================
 * Popin RDV
 * ========================================================= */

.tfo-rdv-overlay[hidden] { display: none; }
/* L'attribut hidden doit toujours gagner sur les display des classes (flex, grid…). */
.tfo-rdv-modal [hidden] { display: none !important; }
.tfo-rdv-overlay {
	position: fixed; inset: 0;
	background: rgba(5, 84, 109, 0.55);
	backdrop-filter: blur(2px);
	z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	padding: 1rem;
}
body.tfo-rdv-ouverte { overflow: hidden; }

.tfo-rdv-modal {
	position: relative;
	background: #fff;
	border-radius: 14px;
	max-width: 560px; width: 100%;
	max-height: 92vh; overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.tfo-rdv-corps { padding: 1.8rem 1.9rem 1.4rem; }
.tfo-rdv-modal h2 { margin: 0 0 0.2rem; font-size: 1.45rem; color: #05546d; }
.tfo-rdv-sous-titre { margin: 0 0 1rem; color: #555; }
.tfo-rdv-fermer {
	position: absolute; top: 0.6rem; right: 0.8rem;
	background: none; border: none; font-size: 1.9rem; line-height: 1;
	color: #888; cursor: pointer;
}
.tfo-rdv-fermer:hover { color: #05546d; }

.tfo-rdv-contexte {
	background: #f2f8fa; border-radius: 10px;
	padding: 0.8rem 1rem; margin-bottom: 1.1rem;
	font-size: 0.88rem;
}
.tfo-rdv-contexte-titre { margin: 0 0 0.3rem; font-weight: 700; color: #05546d; }
.tfo-rdv-contexte ul { margin: 0; padding-left: 1.1rem; }

.tfo-champ { margin-bottom: 0.85rem; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.tfo-champ-duo { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.tfo-champ label { font-size: 0.88rem; font-weight: 600; color: #343434; }
.tfo-champ input, .tfo-champ select, .tfo-champ textarea {
	font: inherit;
	padding: 0.55em 0.75em;
	border: 1.5px solid #c9dde4;
	border-radius: 8px;
}
.tfo-champ input:focus, .tfo-champ select:focus, .tfo-champ textarea:focus {
	outline: 2px solid #2696af; outline-offset: 1px; border-color: #2696af;
}
.tfo-hp { position: absolute; left: -9999px; height: 1px; width: 1px; opacity: 0; }

/* --- Sélecteur de créneaux (Bookings) --- */
.tfo-creneaux { margin-bottom: 1rem; }
.tfo-creneaux-titre { font-size: 0.88rem; font-weight: 600; color: #343434; margin: 0 0 0.45rem; }
.tfo-creneaux-nav { display: flex; align-items: center; gap: 0.4rem; }
.tfo-creneaux-prec, .tfo-creneaux-suiv {
	background: none; border: 1.5px solid #c9dde4; border-radius: 8px;
	font-size: 1.1rem; line-height: 1; padding: 0.35em 0.55em;
	cursor: pointer; color: #05546d; flex-shrink: 0;
}
.tfo-creneaux-prec:hover, .tfo-creneaux-suiv:hover { border-color: #2696af; }
.tfo-jours { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.2rem; flex: 1; }
.tfo-jour {
	font: inherit; font-size: 0.85rem; white-space: nowrap;
	padding: 0.4em 0.8em; border: 1.5px solid #c9dde4; border-radius: 8px;
	background: #fff; cursor: pointer;
}
.tfo-jour:hover { border-color: #2696af; }
.tfo-jour.est-choisi { background: #05546d; border-color: #05546d; color: #fff; }
.tfo-heures { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; max-height: 132px; overflow-y: auto; }
.tfo-heure {
	font: inherit; font-size: 0.9rem;
	padding: 0.35em 0.75em; border: 1.5px solid #c9dde4; border-radius: 999px;
	background: #fff; cursor: pointer;
}
.tfo-heure:hover { border-color: #2696af; }
.tfo-heure.est-choisie { background: #f39200; border-color: #f39200; color: #fff; font-weight: 700; }
.tfo-creneaux-etat { font-size: 0.85rem; color: #666; margin: 0.5rem 0 0; }
.tfo-rdv-erreur { color: #b3261e; font-size: 0.9rem; }
.tfo-rdv-form .tfo-btn-cta { width: 100%; margin-top: 0.3rem; }
.tfo-rdv-rgpd { font-size: 0.78rem; color: #777; margin: 0.7rem 0 0; text-align: center; }

.tfo-rdv-succes { text-align: center; padding: 1rem 0; }
.tfo-rdv-succes-icone {
	width: 62px; height: 62px; margin: 0 auto 0.6rem;
	display: flex; align-items: center; justify-content: center;
	background: #e6f4ee; color: #1d7a4f;
	font-size: 2rem; font-weight: 700; border-radius: 50%;
}
