/* ═══════════════════════════════════════════════
MATSUKAZE — Popup professeurs
═══════════════════════════════════════════════ */

/* ── Carte professeur ── */

.popup {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	width: 100%;
	max-width: 700px;
	box-sizing: border-box;
	padding: 16px 0;
}

/* Carte droite : image à droite, texte à gauche */
.popup.popup--right {
	flex-direction: row-reverse;
}

/* ── Photo ronde cliquable ── */

.prof-avatar {
	width: 130px;
	height: 130px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.prof-avatar:hover {
	opacity: 0.85;
}

/* ── Bloc nom + titre ── */

.popup__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

/* Texte aligné à droite pour les cartes "right" */
.popup--right .popup__meta {
	text-align: right;
}

.prof-nom {
	font-family: 'Calistoga', serif;
	font-size: 20px;
	margin: 0;
	line-height: 1.2;
}

.popup__meta p {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
}

/* ── Overlay fond gris ── */

.popup-overlay {
	position: fixed;
	inset: 0;
	background: rgb(128 128 128 / 70%);
	display: none;
	z-index: 98;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.popup-overlay.open {
	display: block;
	opacity: 1;
	overflow: hidden;
}

/* ── Boîte popup ── */

.popup-content {
	max-width: 700px;
	width: calc(100% - 40px);
	padding: 30px;
	box-sizing: border-box;
	background: white;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	transition: transform 0.3s ease;
}

.popup-open:hover {
	cursor: pointer;
}

.popup-description {
	margin: 20px 0;
	font-size: 15px;
	line-height: 1.6;
}

.popup-profil {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	float: right;
	margin: 0 0 12px 16px;
	display: inline-block;
}

/* ── Lien "Visitez son site" ── */
.popup-liens-profs {
	color: #2a4500;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	padding: 8px 16px;
	border: 1.5px solid #2a4500;
	border-radius: 999px;
	transition: background 0.2s ease, color 0.2s ease;
	margin-right: auto; /* pousse les icônes réseaux vers la droite */
}

.popup-liens-profs:hover {
	background: #2a4500;
	color: #fff;
}

/* ── Icônes réseaux sociaux ── */
.popup-reseaux-profs {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.popup-reseaux-profs:hover {
	background: #f2f7ec;
	transform: translateY(-2px);
}

.popup-reseaux-profs svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* ── Zone des liens (site + réseaux) ── */
.all-links {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.popup-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE MOBILE (≤ 782px)
   ═══════════════════════════════════════════════ */

@media screen and (max-width: 782px) {

	.popup {
		max-width: 100%;
		padding: 10px 15px;
		gap: 14px;
		/* Toujours image à gauche sur mobile */
		flex-direction: row !important;
	}

	.prof-avatar {
		width: 80px;
		height: 80px;
	}

	.prof-nom {
		font-size: 17px;
	}

	.popup__meta p {
		font-size: 13px;
	}

	/* Texte aligné à gauche même pour les cartes "right" */
	.popup--right .popup__meta {
		text-align: left;
	}

	/* Bottom sheet */
	.popup-content {
		max-width: 100%;
		width: 100%;
		max-height: 88vh;
		overflow-y: auto;
		padding: 24px 20px;
		border-radius: 20px 20px 0 0;
		top: auto;
		bottom: 0;
		left: 50%;
		transform: translate(-50%, 100%);
	}

	.popup-overlay.open .popup-content {
		transform: translate(-50%, 0);
	}

	.popup-content h2 {
		font-size: 20px;
		margin-top: 0;
	}

	.popup-description {
		font-size: 14px;
	}

	.popup-profil {
		float: none;
		display: block;
		margin: 0 auto 16px;
	}

	.all-links {
	  margin-top: 20px;
	  padding-top: 16px;
	  gap: 12px;
	}

	.popup-liens-profs {
	  margin-right: 0;
	  width: 100%;
	  text-align: center;
	  margin-bottom: 8px;
	}

	.popup-close {
		top: 12px;
		right: 12px;
		font-size: 22px;
		width: 36px;
		height: 36px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}