.cse-map {
	width: 100%;
	height: 560px;
	border-radius: 8px;
	margin: 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;
}


/* ================= Global Missions: map left, details right ================= */
.cse-wrapper {
	font-family: 'Raleway', sans-serif;
}
.cse-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
	gap: 16px;
	align-items: start;
	margin-top: 12px;
}
.cse-layout-map .cse-map {
	height: 640px;
}
.cse-panel {
	height: 640px;
	overflow-y: auto;
	border: 1px solid #e3cfa3;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.cse-panel-empty {
	padding: 40px 24px;
	text-align: center;
	color: #6b5a3c;
}
.cse-panel-empty-icon { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.cse-panel-empty h3 { margin: 0 0 8px; font-size: 18px; color: #4a3410; }
.cse-panel-empty p { font-size: 13.5px; margin: 0 0 14px; }
.cse-legend-line { text-align: left; display: flex; align-items: center; gap: 8px; margin: 6px 0 !important; max-width: 220px; margin-left: auto !important; margin-right: auto !important; }
.cse-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.cse-dot-urgent { background: #c62828; }
.cse-dot-mine { background: #c99b48; }
.cse-dot-other { background: #5a3e1b; }

.cse-detail { position: relative; }
.cse-detail-close {
	position: absolute; top: 8px; right: 8px; z-index: 3;
	width: 30px; height: 30px; border-radius: 50%;
	background: rgba(0,0,0,.55); color: #fff; border: none;
	font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.cse-gallery-main { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f0f0f0; }
.cse-gallery-thumbs { display: flex; gap: 6px; padding: 8px 14px 0; flex-wrap: wrap; }
.cse-gallery-thumb { width: 54px; height: 42px; object-fit: cover; border-radius: 5px; cursor: pointer; opacity: .65; border: 2px solid transparent; }
.cse-gallery-thumb.is-active, .cse-gallery-thumb:hover { opacity: 1; border-color: #d6b17b; }
.cse-detail-body { padding: 14px 16px 18px; }
.cse-detail-title { margin: 6px 0 8px; font-size: 20px; line-height: 1.25; color: #2b2013; }
.cse-detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px !important; }
.cse-detail-chips span { background: #f3e9da; color: #4a3410; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; }
.cse-detail-desc { font-size: 14px; line-height: 1.55; color: #333; margin-bottom: 12px; word-wrap: break-word; }
.cse-detail-author { font-size: 12px; color: #777; margin: 12px 0 !important; }

.cse-urgent-banner {
	display: flex; align-items: center; gap: 8px;
	background: #c62828; color: #fff; font-weight: 800; font-size: 12.5px;
	letter-spacing: .6px; padding: 7px 12px; border-radius: 6px;
}
.cse-urgent-pulse { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: cse-pulse 1.3s infinite; }
@keyframes cse-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.cse-detail-urgent { border-top: 4px solid #c62828; }
.cse-help-needed { background: #fdecea; border-left: 4px solid #c62828; padding: 10px 12px; border-radius: 4px; font-size: 13.5px; line-height: 1.5; margin-bottom: 10px; }
.cse-help-needed strong { display: block; color: #b32d2e; margin-bottom: 3px; text-transform: uppercase; font-size: 11.5px; letter-spacing: .4px; }
.cse-contact-direct { font-size: 13.5px; background: #f7f1e6; padding: 8px 12px; border-radius: 6px; margin: 0 0 10px !important; }

.cse-help-box { border-top: 1px solid #eee; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cse-help-open { width: 100%; padding: 11px 16px; font-size: 14px; }
.cse-help-open.cse-help-urgent { background: #c62828; color: #fff; text-shadow: none; }
.cse-help-form { border: 1px solid #e3cfa3; border-radius: 8px; padding: 10px; background: #fffaf2; }
.cse-help-ok { color: #2e7d32; font-weight: 700; font-size: 13.5px; margin: 4px 0 !important; }
.cse-help-msg { font-size: 12.5px; margin: 4px 0 0 !important; }
.cse-copy-link { width: 100%; margin-top: 0; }

.cse-popup p.cse-popup-urgent { color: #c62828 !important; font-weight: 800; font-size: 10px !important; text-transform: uppercase; letter-spacing: .4px; }
.cse-check { display: flex !important; align-items: center; gap: 6px; cursor: pointer; font-size: 13px !important; }
.cse-check input { width: auto !important; margin: 0; }
.cse-badge-urgent {
	position: absolute; top: 5px; right: 5px; z-index: 2;
	background: #c62828; color: #fff; font-size: .58em; font-weight: 800;
	padding: 3px 7px; border-radius: 10px; letter-spacing: .4px;
}

@media (max-width: 900px) {
	.cse-layout { grid-template-columns: 1fr; }
	.cse-layout-map .cse-map { height: 380px; }
	.cse-panel { height: auto; max-height: none; min-height: 140px; }
}

/* Photo picker: the native file input is visually hidden (themes often restyle or hide it);
   the label is the button. */
.cse-file-hidden {
	position: absolute !important;
	width: 1px !important; height: 1px !important;
	opacity: 0 !important; overflow: hidden !important;
	clip: rect(0 0 0 0) !important; pointer-events: none;
}
.cse-photo-picker { display: block; }
.cse-photo-btn { display: inline-block !important; margin: 0 !important; cursor: pointer; font-size: 13px !important; padding: 8px 14px !important; }
.cse-photo-previews { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cse-photo-preview { width: 62px; height: 50px; object-fit: cover; border-radius: 6px; border: 1px solid #e3cfa3; }

/* Numbered bubble for grouped markers */
.cse-cluster-wrap { background: none !important; border: none !important; }
.cse-cluster {
	width: 42px; height: 42px; border-radius: 50%;
	background: #d6b17b; border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.35);
	display: flex; align-items: center; justify-content: center;
	color: #3a280d; font-weight: 800; font-size: 15px; font-family: 'Raleway', sans-serif;
}
.cse-cluster-urgent { background: #c62828; color: #fff; }
.cse-gallery-main { image-rendering: auto; }
