.cse-map {
	width: 100%;
	height: 500px;
	border-radius: 8px;
	margin: 15px 0;
	z-index: 1;
}
.cse-pick-map {
	height: 200px;
	margin: 4px 0 2px;
}

/* Sécurité anti-conflit avec le CSS du thème : force l'affichage au-dessus de tout. */
.leaflet-tooltip {
	z-index: 700 !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: none;
}
.leaflet-container {
	z-index: 1;
}

/* Infobulle compacte façon "petite carte" — corrige le comportement par défaut de Leaflet
   (white-space: nowrap) qui étirait la bulle sur toute la largeur du texte. */
.leaflet-tooltip.cse-tooltip {
	width: 160px;
	max-width: 160px;
	white-space: normal !important;
	word-wrap: break-word;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	overflow: hidden;
}
.leaflet-tooltip.cse-tooltip::before {
	border-top-color: #fff;
}

.cse-popup {
	display: flex;
	flex-direction: column;
}
.cse-popup p {
	margin: 0 !important;
	padding: 0 !important;
}
.cse-tooltip-photo-wrap {
	position: relative;
}
.cse-tooltip-photo {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
}
.cse-popup p.cse-tooltip-title-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	margin: 0 !important;
	padding: 5px 7px 12px !important;
	background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0) 100%);
	color: #fff !important;
	font-size: 11.5px !important;
	font-weight: 700;
	line-height: 1.2 !important;
}
.cse-popup-body {
	padding: 5px 7px 5px;
}
.cse-popup-title {
	margin: 0 !important;
	font-size: 12px !important;
	font-weight: 700;
	color: #1c1c1c;
	line-height: 1.15 !important;
}
.cse-popup-meta {
	margin: 1px 0 0 !important;
	font-size: 9px !important;
	font-weight: 600;
	color: #8a5a1c;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	line-height: 1.15 !important;
}
.cse-popup-addr {
	color: #888;
	text-transform: none;
	font-weight: 500;
}
.cse-popup-desc {
	margin: 3px 0 0 !important;
	font-size: 10px !important;
	line-height: 1.2 !important;
	color: #555;
}
.cse-photo-count {
	margin: 1px 0 0 !important;
	font-size: 8.5px !important;
	color: #999;
}
.cse-owner-hint {
	margin: 3px 0 0 !important;
	font-size: 9px !important;
	font-style: italic;
	color: #8a5a1c;
}

.cse-legend {
	color: #8a5a1c;
	font-size: 0.85em;
}

/* Tableau de bord personnel — cartes réduites */
.cse-dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.cse-dash-card {
	border: 1px solid #e3cfa3;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.cse-dash-photo-wrap {
	position: relative;
}
.cse-dash-photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	object-fit: cover;
	display: block;
}
.cse-dash-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: #f0f0f0;
	font-size: 26px;
	color: #bbb;
}
.cse-dash-body {
	padding: 6px 7px 7px;
}
.cse-badge {
	position: absolute;
	top: 5px;
	left: 5px;
	z-index: 2;
	display: inline-block;
	font-size: 0.58em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	padding: 3px 7px;
	border-radius: 10px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.cse-badge-published {
	background: linear-gradient(180deg, #f3dda4, #d9b56a 55%, #b98b3e);
	color: #4a3410;
}
.cse-badge-hidden {
	background: rgba(70, 70, 70, 0.8);
	color: #fff;
}
.cse-date-overlay {
	position: absolute;
	bottom: 5px;
	left: 5px;
	z-index: 2;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 0.6em;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 8px;
}
.cse-dash-title {
	margin: 0 0 2px;
	font-size: 12px;
	line-height: 1.2;
}
.cse-dash-meta {
	margin: 0 0 5px;
	font-size: 0.68em;
	color: #777;
}
.cse-dash-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px;
}
.cse-dash-actions button {
	width: 100%;
	text-align: center;
	box-sizing: border-box;
	padding: 3px 5px;
	line-height: 1.15;
	font-size: 0.78em;
	font-weight: 700;
	margin-top: 0;
}
.cse-dash-actions .cse-delete-btn {
	grid-column: 1 / -1;
}
.cse-btn-danger {
	background: #fdecea;
	border: 1px solid #f3b3ae;
	color: #b32d2e;
	padding: 4px 9px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.72em;
}
.cse-edit-panel {
	margin-top: 10px;
	border-top: 1px solid #eee;
	padding-top: 9px;
}
.cse-existing-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 3px;
}
.cse-existing-photo {
	position: relative;
	display: inline-block;
	line-height: 0;
}
.cse-existing-photo img {
	width: 56px;
	height: 50px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	transition: opacity 0.15s;
}
.cse-photo-remove-btn {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #b32d2e;
	color: #fff;
	border: 2px solid #fff;
	font-size: 12px;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.cse-existing-photo.cse-photo-marked img {
	opacity: 0.35;
}
.cse-existing-photo.cse-photo-marked .cse-photo-remove-btn {
	background: #777;
}

.cse-map.cse-adding-cursor {
	cursor: crosshair;
}
.cse-popup h4 {
	margin: 0 0 5px;
}
.cse-popup .cse-date {
	color: #777;
	font-size: 0.9em;
	margin: 0 0 5px;
}

/* Formulaires compacts (ajout ET modification) */
.cse-form .cse-field {
	margin-bottom: 7px;
}
.cse-form label {
	display: block;
	font-weight: 600;
	font-size: 11.5px;
	margin-bottom: 2px;
}
.cse-form input[type="text"],
.cse-form input[type="date"],
.cse-form input[type="tel"],
.cse-form input[type="file"],
.cse-form textarea {
	width: 100%;
	padding: 5px 7px;
	font-size: 12.5px;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-sizing: border-box;
}
.cse-form h4 {
	font-size: 12.5px;
	margin: 10px 0 5px;
}
.cse-hint {
	font-size: 0.78em;
	color: #777;
	margin: 4px 0;
}
.cse-private-badge {
	display: inline-block;
	background: #eef1f3;
	color: #5a6773;
	font-size: 0.68em;
	padding: 1px 7px;
	border-radius: 9px;
	margin-left: 6px;
	vertical-align: middle;
}

.cse-rencontre-row {
	border: 1px solid #e2e2e2;
	background: #fafafa;
	border-radius: 5px;
	padding: 7px;
	margin-bottom: 6px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 5px;
}
.cse-rencontre-row input,
.cse-rencontre-row textarea {
	font-size: 11.5px;
	padding: 4px 6px;
}
.cse-rencontre-row textarea {
	grid-column: 1 / -1;
}
.cse-remove-rencontre {
	grid-column: 1 / -1;
	justify-self: start;
	background: none;
	border: none;
	color: #b32d2e;
	cursor: pointer;
	font-size: 11px;
	padding: 2px 0;
}

.cse-btn-primary {
	background: linear-gradient(180deg, #f3dda4, #d9b56a 55%, #b98b3e);
	color: #4a3410;
	text-shadow: 0 1px 0 rgba(255,255,255,.45);
	border: none;
	padding: 7px 16px;
	font-size: 12.5px;
	border-radius: 5px;
	cursor: pointer;
	font-weight: 600;
}
.cse-btn-secondary {
	background: #f3e9da;
	color: #4a3410;
	border: 1px solid #d9b56a;
	padding: 5px 10px;
	font-size: 12px;
	border-radius: 5px;
	cursor: pointer;
	margin-top: 4px;
}

.cse-notice {
	background: #fff8e1;
	border-left: 4px solid #f9a825;
	padding: 8px 12px;
	font-size: 13px;
	border-radius: 4px;
}

/* Petit effet visuel "d'appui" sur tous les boutons du plugin, pour confirmer qu'on a bien
   touché le bon élément (utile sur tactile). */
.cse-btn-primary,
.cse-btn-secondary,
.cse-btn-danger,
.cse-modal-close,
.cse-photo-remove-btn,
.cse-remove-rencontre,
.cse-delete-btn,
.cse-dash-actions button {
	transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, opacity 0.08s ease-out;
}
.cse-btn-primary:active,
.cse-btn-secondary:active,
.cse-btn-danger:active,
.cse-modal-close:active,
.cse-photo-remove-btn:active,
.cse-remove-rencontre:active,
.cse-delete-btn:active,
.cse-dash-actions button:active {
	transform: scale(0.93);
	opacity: 0.85;
}

/* Pop-up centrée (ajout ET modification) : couvre tout l'écran, la boîte reste au centre,
   ce qui est superposé par-dessus la carte / les petites cartes du tableau de bord. */
.cse-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 20, 0.6);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.cse-modal {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 100%;
	max-width: 440px;
	max-height: 88vh;
	overflow-y: auto;
	padding: 34px 18px 18px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.cse-modal-close {
	position: absolute;
	top: 6px;
	right: 8px;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	color: #888;
	cursor: pointer;
	padding: 6px 10px;
}
.cse-modal-close:hover {
	color: #222;
}
.cse-modal-title {
	margin: 0 0 10px;
	font-size: 15px;
}
@media (max-width: 480px) {
	.cse-modal {
		max-width: 100%;
		padding: 32px 14px 14px;
	}
}

/* Gold look for the dashboard action buttons */
.cse-dash-actions button:not(.cse-delete-btn):not(.cse-btn-danger) {
	background: #f3e9da;
	color: #4a3410;
	border: 1px solid #d9b56a;
}
