/* =========================================================================

   Variables de marque — valeurs par défaut, surchargées par instance via

   les attributs couleur_bleu / couleur_vert du shortcode (voir le <style>

   inline généré par class-shortcode.php pour chaque #ce-wrapper-N).

   ========================================================================= */

:root {

	--ce-blue:        #0E4796;

	--ce-blue-dark:   #0b3d82;

	--ce-green:       #FF7900;

	--ce-green-dark:  #277a68;

	--ce-text:        #14203a;

	--ce-text-muted:  #5b6b81;

	--ce-border:      #d7dde6;



	--ce-font-heading: 'Barlow', sans-serif;

	--ce-font-body:     'Roboto', sans-serif;



	--ce-radius-input: 6px;

	--ce-radius-btn:   6px;

	--ce-radius-card:  10px;

}



.ce-wrapper {

	max-width: 100%;

	margin: 0;

	font-family: var(--ce-font-body);

}



/* ---------- Filtres (domaine / niveau / région) ---------- */



.ce-filtres {

	display: flex;

	flex-wrap: wrap;

	gap: 12px;

	margin-bottom: 20px;

	position: absolute;

	z-index: 999;

	right: 70px;

	top: 30px;

}



.ce-select-wrap {

	position: relative;

}



.ce-select {

	appearance: none;

	-webkit-appearance: none;

	min-width: 190px;

	padding: 12px 40px 12px 16px;

	font-family: var(--ce-font-heading);

	font-size: 15px;

	font-weight: 700;

	color: var(--ce-blue);

	background-color: #fff;

	border: 1.5px solid var(--ce-blue);

	border-radius: var(--ce-radius-btn);

	cursor: pointer;

	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%230E4796' stroke-width='1.8' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

	background-repeat: no-repeat;

	background-position: right 14px center;

	transition: border-color 0.15s ease, box-shadow 0.15s ease;

}



.ce-select:hover,

.ce-select:focus {

	border-color: var(--ce-green);

	outline: none;

	box-shadow: 0 0 0 3px rgba(53, 156, 133, 0.15);

}



/* Variante : si le shortcode est intégré dans un bloc à fond coloré (ex.

   bandeau bleu/vert de la maquette), ajoutez la classe "ce-wrapper--on-dark"

   sur le wrapper (ou un parent) pour des filtres blancs/outline adaptés au

   fond foncé. */

.ce-wrapper--on-dark .ce-select {

	background-color: transparent;

	color: #fff;

	border-color: rgba(255, 255, 255, 0.7);

	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23ffffff' stroke-width='1.8' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

}



.ce-wrapper--on-dark .ce-select option {

	color: #14203a; /* les <option> du menu déroulant natif restent lisibles sur fond blanc */

}



/* ---------- Carte ---------- */



.ce-map {

	width: 100%;

	border-radius: var(--ce-radius-card);

	overflow: hidden;

	z-index: 1;

	border: 1px solid var(--ce-border);

}

@media(max-width: 768px) {
	.ce-map {
		max-height: 425px!important;
	}
}

.maplibregl-ctrl-group {

	border-radius: 6px !important;

	overflow: hidden;

	box-shadow: 0 2px 10px rgba(20, 32, 58, 0.18) !important;

}



/* ---------- Popup d'établissement ---------- */



.maplibregl-popup {

	max-width: 340px !important;

}



.maplibregl-popup-content {

	padding: 0;

	border-radius: var(--ce-radius-card);

	overflow: hidden;

	box-shadow: 0 10px 32px rgba(20, 32, 58, 0.25);

	backface-visibility: hidden;

	-webkit-font-smoothing: antialiased;

}



.maplibregl-popup-close-button {

	font-size: 20px;

	color: #fff;

	right: 10px;

	top: 8px;

	width: 26px;

	height: 26px;

	line-height: 24px;

}



.maplibregl-popup-close-button:hover {

	background: rgba(255, 255, 255, 0.2);

	border-radius: 4px;

}



.ce-popup,

.ce-popup * {

	text-shadow: none !important;

	filter: none !important;

	backdrop-filter: none !important;

	-webkit-font-smoothing: antialiased;

	-moz-osx-font-smoothing: grayscale;

	text-rendering: optimizeLegibility;

	transform: none !important;

}



.ce-popup {

	width: 300px;

	font-family: var(--ce-font-body);

	font-size: 15px;

	color: var(--ce-text);

}



.ce-popup-header {

	background: var(--ce-blue);

	padding: 18px 20px;

}



.ce-popup-img {

	width: 100%;

	max-height: 200px!important;

	display: block;

	padding: 30px;

	width: initial !important;

	margin: auto;

}



.ce-popup h3 {

	margin: 0;

	font-family: var(--ce-font-heading);

	font-size: 19px;

	font-weight: 700;

	color: #fff;

	line-height: 1.25;

}



.ce-popup-body {

	padding: 18px 20px 20px;

}



.ce-popup-body p {

	display: flex;

	align-items: flex-start;

	gap: 10px;

	margin: 0 0 12px;

	color: var(--ce-text-muted);

	line-height: 1.4;

}



.ce-popup-body p:last-of-type {

	margin-bottom: 0;

}



.ce-popup-icon {

	flex: 0 0 auto;

	width: 20px;

	text-align: center;

	color: var(--ce-green);

}



.ce-popup a {

	color: var(--ce-blue-dark);

	text-decoration: none;

	font-weight: 500;

}



.ce-popup a:hover {

	text-decoration: underline;

}



.ce-popup-lien {

	display: block;

	margin-top: 16px;

	padding: 11px 18px;

	background: var(--ce-green);

	color: #fff !important;

	font-family: var(--ce-font-heading);

	font-weight: 700;

	font-size: 14px;

	text-align: center;

	border-radius: var(--ce-radius-btn);

	text-decoration: none !important;

	transition: background 0.15s ease;

}



.ce-popup-lien:hover {

	background: var(--ce-green-dark);

}



/* Filtres : une seule ligne, compacts, au-dessus de la carte sur mobile */
.ce-filtres {
  flex-wrap: nowrap;
  gap: 8px;
}

.ce-select {
  min-width: 150px;
  padding: 10px 34px 10px 14px;
  font-size: 14px;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .ce-filtres {
    position: static;           /* ne recouvre plus la carte */
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 10px;
  }

  .ce-select-wrap { min-width: 0; }

  .ce-select {
    width: 100%;
    min-width: 0;
    padding: 10px 24px 10px 10px;
    font-size: 13px;
  }
}