@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # CSS commun à toutes les cartes */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

body {
	margin: 0;
	font-family: 'Roboto', sans-serif;
	font-size: 11px;
	line-height: 16px;
	color: #fff;
	background: #2b2a33;
	overflow: hidden;
}

body.crosshair #map svg {
	cursor: crosshair;
}
body.grabbing #background,
body.grabbing #map svg,
body.grabbing #map > svg > path[id^="area"] {
	cursor: grabbing !important;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Intitulés */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

h1,h2,h3,h4,h5,h6 {
	clear: both;
	font-weight: bold;
	margin-top: 0;
}
h1 {font-size:30px;line-height:36px;padding:10px;background:#000;color:#fff;text-transform:uppercase;}
h2 {font-size:18px;font-weight:normal;margin-bottom:10px;text-transform:uppercase;}
h3 {font-size:18px;line-height:25px;}
h4 {font-size:14px;line-height:20px;text-transform:uppercase;}
h5 {font-size:13px;}
h6 {font-size:12px;}
#text h1 {background:transparent;}

/* Séparateur "lire la suite" */
hr.readmore {
	display: none;  /* Masqué par défaut */
}
/* Afficher en pointillés dans l'éditeur WYSIWYG */
#description hr.readmore,
#zone-description hr.readmore {
	display: block;
	border: none;
	border-top: 2px dashed #666;
	margin: 12px 0;
	height: 0;
	cursor: pointer;
}


/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Éléments textuels */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

a {text-decoration:none;font-weight:bold;color:lightskyblue;cursor:pointer;}
a:hover, a:focus {color:#999}
p {margin:0 0 5px;padding:0;text-align:justify;}
ul {padding-left:15px;list-style-type:square;}
li {text-align:justify;}

::-webkit-scrollbar, scrollbar {
width: 8px;
height: 10px; }

::-webkit-scrollbar-thumb, scrollbar {
background-color: #000;
-webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07); }

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Entrées et boutons */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

button {
    color:#fff;
	width: 24px;
	height: 24px;
	padding: 0;
	font-family: "FontAwesome";
	font-size: 18px;
	font-weight: 300;
	border: 0;
	background: none;
	cursor: pointer;
}
#command_box button, 
#zoom button {color:#fff;}
#command_box .button-icon.active {color: lightskyblue; }
#command_box button:hover {color:#999;}

button:hover,
button:focus
{
	color: #999;
}
button[disabled] {
	cursor: default;
	color: #9999 !important;
}

#text button {
	font-family: arial !important;
	width: auto !important;
	font-size: 11px !important;
}

optgroup {background:#000;color:#fff;font-size:12px;}
option {background:#fff;color:#000;font-size:11px;}

input,
select {
	width: 100%;
	height: 24px;
	padding: 2px;
	border: unset;
	border-radius: 2px;
	box-sizing: border-box;
}

.custom-select-wrapper {
	position: relative;
	width: 100%;
}

.select-selected {
	border: 1px solid #bdc3c7;
	border-radius: 4px;
	background-color: white;
	min-height: 24px;
	position: relative;
	display: flex;
	align-items: center;
	padding-right: 30px;
}

#type-search {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
}

.select-clear {
	position: absolute;
	right: 12px;
	font-size: 20px;
	color: #999;
	cursor: pointer;
	padding: 0 5px;
}

.select-clear:hover {
	color: #e74c3c;
}

.select-items {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid #bdc3c7;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 280px;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	display: none;
}

.select-item {
	padding: 10px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.select-item:hover {
	background-color: #f8f9fa;
}

.icon {
	font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
	margin-right: 10px;
	text-align: center;
	color: #2c3e50;
}

#select-selected .icon {margin:0 0 0 10px;}

/* ── Mise en forme du formulaire ── */
#add-place-form {
	padding: 4px 8px 12px;
}
.field-group {
	margin-bottom: 12px;
}
.field-group label {
	display: block;
	font-weight: bold;
	margin-bottom: 4px;
}
.required { color: #c0392b; }

/* Affichage des coordonnées */
.coords-display {
	font-family: monospace;
	font-size: 13px;
	padding: 5px 8px;
	border: 1px solid #c7c7c7;
	border-radius: 4px;
	letter-spacing: .5px;
}

/* Champs texte / textarea */
#add-place-form input[type="text"],
#add-place-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	border: 1px solid #c7c7c7;
	border-radius: 4px;
	font-size: 14px;
}
#add-place-form textarea { resize: vertical; }

/* ── Éditeur WYSIWYG ── */
.wysiwyg-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1px;
    background: #f4f4f4;
    border: 1px solid #c7c7c7;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 3px 5px;
}
.wysiwyg-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #333;
    cursor: pointer;
    font-size: 11px;
    padding: 3px 6px;
    line-height: 1;
    transition: background .12s;
    flex-shrink: 0;
}
.wysiwyg-btn:hover,
.wysiwyg-btn.active { background: #ddd; border-color: #aaa; color: #000; }
.wysiwyg-sep {
    display: inline-block;
    width: 1px;
    height: 13px;
    background: #bbb;
    margin: 0 3px;
    flex-shrink: 0;
}
/* Bouton couleur : icône + input color superposé */
.wysiwyg-color-btn { position: relative; }
.wysiwyg-color-btn input[type="color"] {
    position: absolute;
    left: 0; top: 100%;
    width: 0; height: 0;
    opacity: 0; padding: 0; border: 0;
    pointer-events: none;
}
/* Zone de l'éditeur */
.wysiwyg-wrap { position: relative; }
.wysiwyg-editor {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 90px;
    height: 120px;
    overflow-y: auto;
    padding: 6px 8px;
    border: 1px solid #c7c7c7;
    border-bottom: none;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    color: #000;
    outline: none;
	cursor:text;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}
.wysiwyg-editor:focus { border-color: #777; }
.wysiwyg-editor img { max-width: 100%; height: auto; border-radius: 3px; margin: 2px 0; display: block; }
.wysiwyg-editor a { color: #2980b9; text-decoration: underline; }
.wysiwyg-editor p, .wysiwyg-editor li { text-align: left; }
.wysiwyg-editor[contenteditable]:empty::before {
    content: attr(placeholder);
    color: #aaa;
    pointer-events: none;
}
/* Textarea mode code */
.wysiwyg-code-editor {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 90px;
    height: 120px;
    padding: 6px 8px;
    border: 1px solid #555;
    border-bottom: none;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    background: #1e1e1e;
    color: #d4d4d4;
    outline: none;
    resize: none;
}
/* Poignée de redimensionnement */
.wysiwyg-resize-handle {
    height: 8px;
    border: 1px solid #c7c7c7;
    border-radius: 0 0 4px 4px;
    background: #eee;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wysiwyg-resize-handle::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    border-top: 2px dotted #aaa;
}
/* Upload en cours */
.wysiwyg-btn.uploading { opacity: .5; pointer-events: none; }

/* Resize d'image dans l'éditeur */
#wysiwyg-img-resizer {
    display: none;
    position: absolute;
    border: 2px solid #2980b9;
    pointer-events: none;
    z-index: 10010;
    box-sizing: border-box;
}
.wir-h {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #2980b9;
    border: 1px solid #fff;
    border-radius: 2px;
    pointer-events: all;
    box-sizing: border-box;
}
.wir-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.wir-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.wir-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.wir-se { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* Modal plein écran éditeur wysiwyg */
#wysiwyg-fs-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}
#wysiwyg-fs-inner {
    background: #fff;
    width: 92vw;
    height: 92vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px #0008;
}
#wysiwyg-fs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #1a1a2e;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    flex-shrink: 0;
}
#wysiwyg-fs-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
#wysiwyg-fs-close:hover { background: rgba(255,255,255,0.15); }
#wysiwyg-fs-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 0;
    overflow: hidden;
    min-height: 0;
}
#wysiwyg-fs-content .wysiwyg-toolbar { flex-shrink: 0; }
#wysiwyg-fs-content .wysiwyg-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#wysiwyg-fs-content .wysiwyg-editor,
#wysiwyg-fs-content .wysiwyg-code-editor {
    flex: 1;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    resize: none;
}
#wysiwyg-fs-content .wysiwyg-resize-handle { display: none; }

/* Zone Fullscreen Modal */
#wysiwyg-fs-modal-zone {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}
#wysiwyg-fs-inner-zone {
    background: #fff;
    width: 92vw;
    height: 92vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px #0008;
}
#wysiwyg-fs-bar-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #1a1a2e;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    flex-shrink: 0;
}
#wysiwyg-fs-content-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 0;
    overflow: hidden;
    min-height: 0;
}
#wysiwyg-fs-content-zone .wysiwyg-toolbar { flex-shrink: 0; }
#wysiwyg-fs-content-zone .wysiwyg-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#wysiwyg-fs-content-zone .wysiwyg-editor,
#wysiwyg-fs-content-zone .wysiwyg-code-editor {
    flex: 1;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    resize: none;
}
#wysiwyg-fs-content-zone .wysiwyg-resize-handle { display: none; }
#wysiwyg-fs-modal-note {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}
#wysiwyg-fs-inner-note {
    background: #fff;
    width: 92vw;
    height: 92vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px #0008;
}
#wysiwyg-fs-bar-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #1a1a2e;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    flex-shrink: 0;
}
#wysiwyg-fs-content-note {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 0;
    overflow: hidden;
    min-height: 0;
}
#wysiwyg-fs-content-note .wysiwyg-toolbar { flex-shrink: 0; }
#wysiwyg-fs-content-note .wysiwyg-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#wysiwyg-fs-content-note .wysiwyg-editor,
#wysiwyg-fs-content-note .wysiwyg-code-editor {
    flex: 1;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    resize: none;
}
#wysiwyg-fs-content-note .wysiwyg-resize-handle { display: none; }

/* Panneaux déroulants WYSIWYG (titres, taille, lien carte) */
.wysiwyg-dropdown-panel {
    display: none;
    position: fixed;
    z-index: 99999;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 5px;
    box-shadow: 0 4px 16px #0003;
    padding: 4px 0;
    min-width: 140px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 12px;
    color: #222;
    scrollbar-width: thin;
    scrollbar-color: #aaa #f0f0f0;
}
.wysiwyg-dropdown-panel.wdp-open { display: block; }
.wdp-group {
    padding: 4px 10px 2px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: #777;
    letter-spacing: .05em;
    cursor: default;
    user-select: none;
}
.wdp-subgroup {
    padding: 2px 14px 2px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    cursor: default;
    user-select: none;
}
.wdp-item {
    padding: 5px 14px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
    transition: background .1s;
}
.wdp-item:hover { background: #e8f0fe; color: #1a73e8; }
.wdp-item.selected { background: #d2e3fc; color: #1a73e8; font-weight: 600; }
.wdp-item.wdp-h1 { font-size: 20px; font-weight: bold; }
.wdp-item.wdp-h2 { font-size: 17px; font-weight: bold; }
.wdp-item.wdp-h3 { font-size: 15px; font-weight: bold; }
.wdp-item.wdp-h4 { font-size: 13px; font-weight: bold; }
.wdp-item.wdp-h5 { font-size: 12px; font-weight: bold; }
.wdp-item.wdp-h6 { font-size: 11px; font-weight: bold; color: #555; }
/* Panneau lien carte : barre de recherche + liste */
.wysiwyg-maplink-panel { min-width: 240px; }
.wysiwyg-maplink-panel .wdp-search {
    display: block;
    width: calc(100% - 16px);
    margin: 6px 8px;
    padding: 4px 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}
.wysiwyg-maplink-panel .wdp-search:focus { border-color: #1a73e8; }
.wysiwyg-maplink-panel .wdp-list { max-height: 220px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #aaa #f0f0f0; }
/* Panneau icônes RPG Awesome */
.wysiwyg-icon-panel { width: 320px; padding: 6px; }
.wysiwyg-icon-panel #wysiwyg-icon-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    margin-bottom: 6px;
}
.wysiwyg-icon-panel #wysiwyg-icon-search:focus { border-color: #1a73e8; }
#wysiwyg-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #aaa #f0f0f0;
}
.wip-icon-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: background 0.1s;
}
.wip-icon-item:hover { background: #e8f0fe; color: #1a73e8; }

/* Panneau image : upload + URL */
.wysiwyg-img-panel { min-width: 230px; overflow: visible; }
.wdp-sep { border-top: 1px solid #ddd; margin: 4px 0; }
.wip-url-row { display: flex; align-items: center; gap: 4px; padding: 5px 8px 6px; }
.wip-url-row input[type=text] {
    flex: 1;
    padding: 4px 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    min-width: 0;
}
.wip-url-row input[type=text]:focus { border-color: #1a73e8; }
.wip-url-row button {
    flex-shrink: 0;
    background: #1a73e8;
    border: none;
    border-radius: 4px;
    color: #fff;
    padding: 4px 9px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
}
.wip-url-row button:hover { background: #1558b0; }


/* Select custom */
.custom-select { position: relative; }
#select-selected {
	display: flex;
	align-items: center;
	padding: 4px 6px;
	border: 1px solid #c7c7c7;
	border-radius: 4px;
	cursor: pointer;
	gap: 6px;
}
#select-selected .icon { font-family: FontAwesome; font-size: 14px; flex-shrink: 0; }
#select-selected #type-search {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 14px;
	outline: none;
	padding: 0;
}
.select-clear { cursor: pointer; color: #777; font-size: 16px; flex-shrink: 0; }
.select-clear:hover { color: #c0392b; }

.select-items {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	border: 1px solid #555;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 180px;
	overflow-y: auto;
	z-index: 1000;
	scrollbar-width: thin;
	scrollbar-color: #555 #222;
}
.select-item {
	padding: 7px 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}
.select-item:hover { background: #3a3a3a; }
.select-item .icon { font-family: FontAwesome;font-size: 14px; }

/* Boutons */
.form-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}
.submit {
	width: 100%;
	padding: 9px 14px;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition: opacity .2s;
}
.submit:disabled { opacity: .45; cursor: not-allowed; }

/* Bouton mail : style neutre */
.submit-mail {
	background: #3d5a80;
	color: #fff;
}
.submit-mail:hover:not(:disabled),
.submit-perso:hover:not(:disabled) 
 { background: #4d6d96; }

/* Bouton personnel : doré */
.submit-perso {
	background: #ffd700;
	color: #1a1a2e;
}
.submit-perso:hover:not(:disabled) { }

/* Message droits insuffisants */
#no-rights-msg {
	margin-bottom: 10px;
}


#addContent .content {
	max-width: 100%;
}
#addContent-inner {
}
/* with-form : masque la liste, affiche le formulaire dans le même espace */
#addContent.with-form #addContent-userlist {
	display: none;
}
#addContent-userlist {
	overflow-y: visible;
}
#addContent-userlist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}
#addContent-userlist-header h2 { margin: 0; }
.uml-header-actions { display: flex; align-items: center; gap: 4px; }
.uml-filter-wrap { position: relative; }
.uml-showall-btn {
	background: none;
	border: none;
	padding: 4px 0;
	cursor: pointer;
	font-size: 20px;
	color: #777;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.uml-showall-btn:hover:not(:disabled) { background: rgba(255,255,255,0.08); color: #ccc; }
.uml-showall-btn.active { color: lightskyblue; }
.uml-showall-btn:disabled { color: #444; cursor: default; }
.uml-shared-separator { border-top: 1px solid #555; margin: 14px 0 6px; }
.uml-others-title {margin: 16px 20px 10px;padding: 0;}
#user-filter-panel,
#zone-user-filter-panel {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	background: #252525;
	border: 1px solid #555;
	border-radius: 6px;
	width: 210px;
	z-index: 200;
	padding: 8px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.55);
}
#user-filter-search,
#zone-user-filter-search {
	width: 100%;
	box-sizing: border-box;
	padding: 5px 8px;
	background: #1a1a1a;
	border: 1px solid #555;
	border-radius: 4px;
	color: #ddd;
	font-size: 12px;
	outline: none;
	margin-bottom: 6px;
}
#user-filter-search:focus,
#zone-user-filter-search:focus { border-color: #777; }
#user-filter-list,
#zone-user-filter-list { max-height: 180px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 #1a1a1a; }
.uml-filter-item {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 5px 4px;
	cursor: pointer;
	border-radius: 3px;
	font-size: 12px;
	color: #ccc;
	user-select: none;
}
.uml-filter-item:hover { background: #383838; }
.uml-filter-item input[type=checkbox] { cursor: pointer; accent-color: lightskyblue; flex-shrink: 0; margin: 0; }
/* ── Section itinéraires sauvegardés (dans #path_panel) ─────────── */
.path-saved-section { margin-top: 14px; }
.path-saved-section > h2 {}
#savedPaths-content {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.spl-empty { font-size: 12px; color: #777; font-style: italic; }
.spl-section-title {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #999;
	margin: 8px 0 4px;
	padding: 0 2px;
}
.spl-color-dot {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	flex-shrink: 0;
	cursor: pointer;
	border: 1px solid rgba(0,0,0,0.15);
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
	transition: transform .15s, box-shadow .15s;
}
.spl-color-dot:hover {
	transform: scale(1.1);
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.spl-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 4px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
}
.spl-item-shared { background: #f0f0f8; border-color: #d8d8ee; }
.spl-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.spl-name { font-size: 13px; font-weight: bold; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spl-dist { font-size: 11px; color: #666; }
.spl-btns { display: flex; gap: 2px; flex-shrink: 0; }
.spl-btn-load, .spl-btn-del, .spl-btn-public, .spl-btn-edit, .spl-btn-rename {
	width: 28px;
	height: 28px;
	padding: 0;
	background: none;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
	font-family: inherit;
}
/* couleur du bouton load : gérée en inline style (dynamique selon l'id) */
.spl-btn-load:hover { filter: brightness(1.2); }
.spl-btn-public { color: #aaa; }
.spl-btn-public.active { color: #4caf50; }
.spl-btn-public:hover { background: rgba(0,0,0,0.06); }
.spl-btn-del { color: #c0392b; }
.spl-btn-del:hover { background: rgba(192,57,43,0.12); }
.spl-btn-edit { color: #2980b9 !important; }
.spl-btn-edit:hover { background: rgba(41,128,185,0.12); }
.spl-btn-rename { color: #777 !important; }
.spl-btn-rename:hover { background: rgba(0,0,0,0.06); }

/* Path panel — icônes des boutons sauvegarder et liste */
.path-save {color:#777 !important;}
.path-save::before  { content: "\f0c7";} /* floppy-disk */
.path-list::before  { content: "\f03a"; } /* list */
.path-cancel {color:#777 !important;}
.path-clear {color:#777 !important;}


/* ── Modale de sauvegarde d'itinéraire ──────────────────────────── */
#savePathModal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	z-index: 9999;
	align-items: center;
	justify-content: center;
}
#savePathModal-inner {
	background: #1e1e2e;
	border: 1px solid #7777aa;
	border-radius: 8px;
	padding: 20px 24px;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
#savePathModal-inner p { margin: 0; font-size: 13px; font-weight: bold; }
#savePathName {
	padding: 7px 10px;
	border: 1px solid #555;
	border-radius: 4px;
	background: #2a2a3e;
	color: #eee;
	font-size: 13px;
	width: 100%;
	box-sizing: border-box;
}
#savePathModal-btns { display: flex; gap: 8px; justify-content: flex-end; }
#savePathModal-btns button {
	width: auto;
	height: auto;
	padding: 7px 16px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	font-weight: bold;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
#savePathModal-btns button span { font-family: inherit; }
#savePathModal-btns button:first-child { background: #7777aa; color: #fff; }
#savePathModal-btns button:first-child:hover { background: #9999cc; color: #fff; }
#savePathModal-btns button:last-child { background: #555; color: #eee; }
#savePathModal-btns button:last-child:hover { background: #666; color: #fff; }

#addContent-share-link a {
	font-size: 12px;
	color: #7777aa;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
#addContent-share-link a:hover {
	text-decoration: underline;
}
#addZones-inner {
}
/* with-form : masque la liste zones, affiche le formulaire */
#addContent.with-form #addZones-userlist {
	display: none;
}
#addZones-userlist {
	overflow-y: visible;
}
#addZones-userlist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}
#addZones-userlist-header h2 { margin: 0; }

/* ── Formulaire addContent / addZones : colonne scrollable ──────── */
/* ── Header sticky global (onglets + actions formulaire) ────────── */
#addcontent-sticky-header {
	position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
    width: 100%;
}
#addcontent-scroll-body {
	padding-top: 8px;
}

/* ── Sous-header de formulaire dans le sticky ───────────────────── */
.addcontent-form-subheader {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 0;
	border-top: 1px solid #e0e0e0;
	background: #fff;
	border-bottom: 3px solid #e0e0e0;
}
.addcontent-form-subheader h2 {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.addcontent-form-header-btns {
	display: flex;
	gap: 5px;
	flex-shrink: 0;
}
.btn-form-save {
  width: auto;
  height: auto;
  background: #8a2be2;
  border: none;
  color: #fff !important;
  border-radius: 5px;
  padding: 4px 11px;
  font-size: 12px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}
.btn-form-save:hover:not(:disabled) {background:#791ad1;}
.btn-form-save:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-form-cancel {
  width: auto;
  height: auto;
  background: #192f4d;
  border: none;
  color: #fff !important;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  font-weight: bold;
}
.btn-form-cancel:hover { background: #170d2b;}
.btn-add-content {
	width: auto;
	height: auto;
	background: #808080;
	color: #fff !important;
	border-radius: 5px;
	margin:0 0 0 15px;
	padding: 4px 10px;
	font-size: 12px;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-add-content:hover {
	background: #606060;
	color: #fff;
}

#addContent-userlist h3 {
	font-size: 13px;
	font-weight: bold;
	color: #ffd700;
	margin: 0 0 10px 0;
	text-transform: uppercase;
	letter-spacing: .5px;
}
.uml-type-group {
	margin-bottom: 12px;
}
.uml-type-label {
	font-size: 11px;
	color: #aaa;
	text-transform: uppercase;
	margin-bottom: 5px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.uml-type-label .icon {
	font-family: FontAwesome;
	font-size: 13px;
}
.uml-item {
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 5px;
	padding: 5px 8px;
	margin-bottom: 4px;
	font-size: 12px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.uml-item-name {
	font-weight: bold;
	color: #222;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
.uml-item-coords {
	font-family: monospace;
	font-size: 11px;
	color: #777;
}
.uml-item-desc {
	font-size: 11px;
	color: #777;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
.uml-item-actions { display: flex; gap: 2px; }
.uml-btn-edit, .uml-btn-del, .uml-btn-public, .uml-btn-pub, .uml-btn-link {
	width: 28px;
	height: 28px;
	padding: 0;
	background: none;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
	font-family: inherit;
}
.uml-btn-link  { color: #7f8c8d; }
.uml-btn-link:hover { background: rgba(0,0,0,0.06); }
.uml-btn-edit  { color: #2980b9; }
.uml-btn-del   { color: #c0392b; }
.uml-btn-public { color: #aaa; }
.uml-btn-public.active { color: #4caf50; }
.uml-btn-edit:hover   { background: rgba(41,128,185,0.12); }
.uml-btn-del:hover    { background: rgba(192,57,43,0.12); }
.uml-btn-public:hover { background: rgba(0,0,0,0.06); }
.uml-empty {
	font-size: 12px;
	color: #777;
	font-style: italic;
	padding: 8px 0;
}

input[type="checkbox"] {width:auto;height:auto;margin:0;}
input:-moz-placeholder {color:#000;}
input::-webkit-input-placeholder {color:#000;}
/* Enlever le placeholder au focus */
input:focus::-webkit-input-placeholder {color:transparent;}
input:focus:-moz-placeholder {color:transparent;}

a:focus,
input:focus,
select:focus,
button:focus {outline:0;}
input[type="text"]{border: 2px solid transparent;}
input[type="text"]:hover {background:#eee;}
input[type="text"]:focus {border-color: lightskyblue;}

.close,
.toggle-location-types {
	padding:0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.close {
	float: right;
}
.toggle-location-types {
	float: left;
	width: 14px;
	font-size: 16px;
}

.highlight {color:#999;}
.buttonToggle {font-size: 12px;}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Spinner */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#spinner {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	font-size: 60px;
	color: #fff;
	background-color: #2b2a33;
	z-index: 9999;
}
#spinner::before,
#spinner::after {
	content: "";
	border: 12px solid #fff;
	border-left-color: transparent;
	border-bottom-color: transparent;
	border-radius: 100%;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	box-sizing: border-box;
}
#spinner::before {
	width: 96px;
	height: 96px;
	animation-name: rotation1;
}
#spinner::after {
	content: "";
	width: 60px;
	height: 60px;
	margin-left: -78px;
	animation-name: rotation2;
}
@keyframes rotation1 {
	from {transform: rotate(0deg);}
	to {transform: rotate(360deg);}
}
@keyframes rotation2 {
	from {transform: rotate(360deg);}
	to {transform: rotate(0deg);}
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Canvas */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#canvas {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.debug #canvas {
	background-color: rgba(255,255,0,.125);
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Arrière-plan */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#background {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

.debug #background {
	background-color: rgba(255,0,0,.125);
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Carte */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#map {
	display: block;
	position: absolute;
	left: 0;
	top: 0;
	margin: 0;
	font-size: 0;
	line-height: 0;
	background-repeat: no-repeat;
	background-color: #2b2a33; 
	transform-origin: 0 0;
	transform: scale(1.0);
	z-index: 0;
}
#map > svg > text {
	pointer-events: none;
	user-select: none;
}
#map > svg > [class^="loc-mark"] {
	cursor: pointer;
}
#map > svg > [class^="loc-mark"]:hover {
	stroke: #ff0;
}
#map > svg > [class^="user-mark"],
#map > svg > [class^="user-icon"],
#map > svg > [class^="shared-mark"],
#map > svg > [class^="shared-icon"] { cursor: pointer; }
#map > svg > [class^="user-mark"]:hover {
	stroke: red;
}
#map > svg > [class^="shared-mark"]:hover {
	stroke: #aaddff;
}
#map > svg .path-line {
	stroke-linejoin: round;
	stroke-linecap : round;
}
#map > svg .path-start,
#map > svg .path-end,
#map > svg .path-line {
	pointer-events: none;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Tableau de commandes */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#command_box {
	position: absolute;
	right: 10px;
	top: 10px;
	max-width: 520px;
	padding: 10px 10px 0 10px;
	border-radius: 10px;
	background: #000d;
	box-sizing: border-box;
}
.command-toggle {
	float: right;
	position: relative;
	width: 30px;
	height: 30px;
	font-size: 28px;
	margin-bottom: 10px;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau de commandes */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#command_panel {width: 500px;}
#search_toggle,
#search_panel,
#search_text,
#search_list,
#button_panel {
	display: inline-block;
	vertical-align: top;
}
#search_panel,
#button_panel {
	font-size: 0;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau de recherche */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#search_panel {}
#search_text,
#search_list {
	position: relative;
	width: 200px;
}
#search_text {}

/* Custom select dans #search_list */
.search-cs-wrap { position: relative; width: 100%; }
.search-cs-head {
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid transparent;
	border-radius: 2px;
	padding: 0 4px;
	cursor: pointer;
	transition: border-color 0.15s;
	height: 24px;
	box-sizing: border-box;
}
.search-cs-head::after {
	content: '\f078';
	font-family: FontAwesome;
	font-size: 9px;
	color: #999;
	flex-shrink: 0;
	margin-left: 2px;
}
.search-cs-head:hover, .search-cs-head:focus-within { border-color: lightskyblue; }
.search-cs-sel-icon {
	font-family: FontAwesome;
	font-size: 12px;
	opacity: 0.75;
	flex-shrink: 0;
	margin: 0 4px 0 2px;
	color: #444;
	line-height: 1;
}
#search-cs-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: #000 !important;
	font-size: 13px;
	height: 100%;
	padding: 0 2px;
	min-width: 0;
	cursor: pointer;
	box-sizing: border-box;
}
#search-cs-input:focus { cursor: text; }
.search-cs-clear {
	color: #999;
	cursor: pointer;
	padding: 0 2px;
	font-size: 14px;
	flex-shrink: 0;
	line-height: 1;
}
.search-cs-clear:hover { color: #c0392b; }
.search-cs-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 100%;
	width: max-content;
	max-width: 400px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	max-height: 280px;
	overflow-y: auto;
	z-index: 2000;
	box-shadow: 0 4px 12px #0003;
	scrollbar-width: thin;
	scrollbar-color: #000 #ccc;
}
.search-cs-group {
	margin:10px 0 5px;
	padding: 5px 10px 5px;
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	letter-spacing: .4px;
	background: #1a1a2e;
	white-space: nowrap;
}
.search-cs-group .icon {margin-right: 4px; font-size: 11px; color:#fff;}
.search-cs-subgroup {
	margin: 15px 5px 0 11px;
	font-size: 11px;
	font-weight: bold;
	color: #ccc;
	letter-spacing: .3px;
	white-space: nowrap;
	border-bottom: 1px solid #ccc;
}
.search-cs-subgroup .icon {margin-right: 4px; font-size: 10px; color:#aaa;}
.search-cs-item {
	display: flex;
	align-items: center;
	padding: 5px 10px;
	cursor: pointer;
	font-size: 13px;
	color: #222;
	white-space: nowrap;
}
.search-cs-item:hover { background: #e8f4fd; color: #000; }
.search-cs-item .icon { font-family: FontAwesome; margin-right: 5px; font-size: 12px; opacity: 0.8; }
/* Match via description : texte et icône grisés, indicateur à droite */
.search-cs-item.desc-match { color: #999; }
.search-cs-item.desc-match .icon { opacity: 0.4; }
.search-cs-item.desc-match::after {
	content: '\f036';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	font-size: 10px;
	color: #bbb;
	margin-left: auto;
	padding-left: 8px;
}
.search-cs-item.desc-match:hover { color: #555; }
/* Match via keyword/meta : texte et icône grisés, icône tag à droite */
.search-cs-item.meta-match { color: #999; }
.search-cs-item.meta-match .icon { opacity: 0.4; }
.search-cs-item.meta-match::after {
	content: '\f084';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	font-size: 10px;
	color: #bbb;
	margin-left: auto;
	padding-left: 8px;
}
.search-cs-item.meta-match:hover { color: #555; }
/* Match via source : texte et icône grisés, icône bookmark à droite */
.search-cs-item.src-match { color: #999; }
.search-cs-item.src-match .icon { opacity: 0.4; }
.search-cs-item.src-match::after {
	content: '\f02e';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	font-size: 10px;
	color: #bbb;
	margin-left: auto;
	padding-left: 8px;
}
.search-cs-item.src-match:hover { color: #555; }
.search-cs-item[data-value^="a"] { }
.search-cs-item[data-value^="a"] .icon { color: #3a7ecf; opacity: 1; }
.search-cs-item[data-value^="a"]:hover { }

.search-cs-item[data-value^="l"] .icon { color: #3a7ecf; opacity: 1; }
.search-cs-item[data-value^="l"].desc-match .icon,
.search-cs-item[data-value^="l"].meta-match .icon,
.search-cs-item[data-value^="l"].src-match .icon { color: #3a7ecf; opacity: 1; }

#search_text {
	position: relative;
}
#search_text .clear {
	position: absolute;
	width: 24px;
	right: 0;
	top: 0;
	color: #000;
}
#search_text .clear:hover,
#search_text .clear:focus {
	color: #0009;
}
#search_text .clear::after {
	content: "×";
}
#autocomplete {
	padding-right: 20px;
	font-size: 13px;
}
#search_list select {
	max-height: 300px;
	font-family: FontAwesome, sans-serif;
}
.ac-icon {
	font-family: FontAwesome;
	font-size: 11px;
	margin-right: 5px;
	opacity: 0.7;
}
#autocomplete_result > div[id^="a"] .ac-icon { color: #3a7ecf; opacity: 1; }
#search_list select,
#autocomplete_result {
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}
#autocomplete_result {
	display: none;
	position: absolute;
	font-size: 11px;
	color: #000;
	border: 1px solid #ccc;
	background-color: #fff;
	box-sizing: border-box;
	z-index: 1;
}
#autocomplete_result > div {
	cursor: pointer;
	padding: 5px 10px;
	font-size: 13px;
	color: #222;
	border: 1px solid transparent;
}
#autocomplete_result > div:hover { background: #e8f4fd; color: #000; }
#autocomplete_result > div.focus {
	background: #e8f4fd;
	color: #000;
	border-color: transparent;
}
#autocomplete_result > div.desc,
#autocomplete_result > div.meta {
	color: #777;
	font-size: 11px;
	padding-top: 1px;
	padding-bottom: 1px;
}
#autocomplete_result > div.desc::after {
	font-family: "FontAwesome";
	content: " \f036";
}
#autocomplete_result > div.meta {
	color: #777;
}
#autocomplete_result > div.meta::after {
	content: "";
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau de boutons */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#button_panel {
	margin-left: 10px;
}
#button_panel button {
	vertical-align: top;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau de l'itinéraire */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

/* ── Modal de l'itinéraire ────────────────────────────────────────── */
#path_panel {
	display: none;
	position: absolute;
	width: 380px;
	color: #fff;
	background: #000d;
	border-radius: 10px;
	cursor: move;
	z-index: 1;
}
#path_panel .grip {
	height: 40px;
	border-radius: 10px 10px 0 0;
	border: 1px solid #c3c3c3;
	background: linear-gradient(#e7e7e7, #fff);
	box-sizing: border-box;
	cursor: move;
}
#path_panel .close { color: #000; margin: 10px 10px 0 0; }
#path_panel .content {
	padding: 12px 14px 14px;
	color: #000;
	background: #fff;
	border: 1px solid #c3c3c3;
	border-top: 0;
	border-radius: 0 0 10px 10px;
	max-height: 70vh;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #777 #ddd;
	cursor: default;
	box-sizing: border-box;
}
.path-controls { overflow: visible; margin-bottom: 10px; height:90px;}
.path-controls button { float: right; margin-left: 4px;color:#000; }
#path_title { font-weight: bold; font-size: 13px; margin-bottom: 8px; color: #333; }
#path_output { display: block; }
#path_output.active {padding: 5px 0;font-size: 20px;}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau de texte */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#text_panel,
#extra_panel {
	margin-top: 10px;
}
#text_panel {
	position: relative;
	padding-bottom: 20px;
}
.loc-type-icon {
	font-family: FontAwesome;
	font-size: 0.85em;
	opacity: 0.75;
	margin-right: 5px;
}
#text p {
	padding:0 5px;
}
#text a {
	color: #fff;
	font-weight: normal;
	border-bottom: 1px dotted;
}
#text a:hover {
	color: lightskyblue;
}
#link,
#source {
	margin-top: 5px;
}
#link {
	float: left;
	margin-left: 5px;
}
#source {
	font-size: 10px;
	float: right;
}
#link a::before,
#source span::before {
	margin-right: 5px;
	font-family: "FontAwesome";
}
#link a::before {
	content:"\f70e"; /* scroll */
	font-weight: normal;
	font-size: 14px;
}
#source span::before {
	content:"\f02e"; /* bookmark */
	opacity: .5;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau des lieux d'intérêt */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

.button-icon.interest {position: absolute;background: #000d;color: #fff;margin: 0;padding: 0;width: 100px;border-radius: 10px 10px 0 0;top: -16px;height: 16px;left:calc(50% - 50px);font-size: 10px;border-left: 1px solid gray;border-right: 1px solid gray;border-top: 1px solid gray;border-bottom:0px solid #000d;}
.button-icon.interest::before {content:"\f102";} /* arrow up */
.button-icon.interest.active::before {content:"\f103";} /* arrow down */

#interest_box {
	position: absolute;
	bottom: -195px;
	height: 194px;
	width: calc(100% - 2px);
	background: #000d;
	color: #fff;
	padding: 0;
	border-radius: 5px 5px 0 0;
	border-top: 1px solid gray;
	border-left: 1px solid gray;
	border-right: 1px solid gray;
	z-index: 0;
}

#interest {
	/*width: 100%;*/
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	scrollbar-color: #000 #ccc;
	padding: 10px;
	display: flex;
	white-space: nowrap;
}

#interest img {height:117px;}
#interest_box ul {list-style-type:none;}
#interest_box li {display:inline-block;opacity:0.9;margin:0 5px;background:#fff;border-radius:5px;}
#interest_box li:hover {opacity:1;box-shadow: 1px 1px 15px 1px #fff;}
#interest_box li span{}

figure {
	border: thin #c0c0c0 solid;
	display: inline-table;
	padding: 1px;
	max-width: 220px;
	margin: auto;
	border-radius: 5px;
}

figcaption {
	background-color: #222;
	color: #fff;
	font: italic smaller sans-serif;
	padding: 3px;
	text-align: center;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Panneau additionnel */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#extra_panel {display:none;color:#fff;}
#extra_panel a {display:inline-block;padding:4px 0;color:#fff;font-weight:normal;}
#extra_panel a:hover,
#extra_panel a:focus {color:#999;}
#extra_panel i {font-size:15px;margin-right:5px;}
#extra_panel .fa-solid {width:20px;}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Fenêtre des lieux */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#locations {
	display: none;
	position: fixed;
	background: #000d;
	color: #fff;
	padding: 10px;
	border-radius: 5px;
	width: fit-content;
	height: fit-content;
	white-space: nowrap;
	cursor: move;
	z-index: 1;
}
#locations h2 {
	clear: none;
	margin-bottom: 6px;
	line-height: 24px;
	text-align: center;
}
#locations input[type="checkbox"] {pointer-events:none;vertical-align:top;}
#locations label {
	user-select: none;
	display: inline-block;
	position: relative;
	margin-left: -14px;
	padding: 0px 0px 4px 20px;
	vertical-align: top;
	z-index: 1;
	cursor: pointer;
}
#locations label:hover,
#locations label:focus {
	color: #999;
}
#locations i.fa:before {
	content: attr(data-before);
	margin-right: 5px;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Fenêtre des zones */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#areas {
	display: none;
	position: fixed;
	width: fit-content;
	height: fit-content;
	padding: 10px;
	color: #fff;
	border-radius: 5px;
	background: #000d;
	cursor: move;
}
#areas h2 {
	clear: none;
	margin-bottom: 6px;
	line-height: 24px;
}
#areas .color,
#areas .name {
	vertical-align: top;
}
#areas .color {
	display: inline-block;
	width: 15px;
	height: 15px;
	margin: 5px 5px 5px 0;
	border: 1px solid #000;
	box-sizing: border-box;
	}
#areas .name {
	line-height:25px;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Fenêtre des images */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#pictures {
	display: none;
	position: absolute;
	width: fit-content;
	line-height: 20px;
	padding: 10px;
	color: #fff;
	border-radius: 10px;
	background: #000d;
	cursor: move;
	z-index: 1;
}
#pictures h2 {
	clear:none;
}
#pictures > div {
	display: flex;
	align-items: start;
	justify-content: space-between;
	margin-top: 10px;
	line-height: 0;
	font-size: 0;
}
#pictures a {
	display: inline-block;
}
#pictures img {
	margin:0 2px;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Fenêtre des articles */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#article,
#helpArticle {
	display: none;
	position: absolute;
	color: #fff;
	background: #000d;
	border-radius: 10px;
	cursor: move;
	z-index: 1;
}
#article .grip,
#helpArticle .grip {
	height: 40px;
	border-radius: 10px 10px 0 0;
	border: 1px solid #c3c3c3;
	background: linear-gradient(#e7e7e7, #fff);
	box-sizing: border-box;
	cursor: move;
}
#article .close,
#helpArticle .close {
	color: #000;
	margin: 10px 10px 0px 0px;
}
#article .content,
#helpArticle .content {
	display: none;
	min-width: 300px;
	max-width: 500px;
	max-height: 500px;
	padding: 10px;
	color: #000;
	border: 1px solid #c3c3c3;
	border-top: 0;
	border-radius: 0 0 10px 10px;
	background-color: #fff;
	cursor: text;
	overflow-y: auto;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}
#article h2,
#helpArticle h2 {font-size:28px;margin:20px 0 10px;font-weight:bold;line-height: 30px;}
#article h3,
#helpArticle h3 {margin:25px 0 10px;font-weight:normal;clear:both;}
#article .content p,
#helpArticle .content p {
	margin-bottom: 7px;
}
#article .content img,
#helpArticle .content img {
	max-width: 97%;
	height: auto;
	margin: 10px !important;
}
#article .content a,
#helpArticle .content a {
	color: blueviolet;
}



/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Modal Profil utilisateur */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#profileModal {
	display: none;
	position: absolute;
	width: 325px;
	color: #fff;
	background: #000d;
	border-radius: 10px;
	cursor: move;
	z-index: 1;
}
#profileModal .grip {
	height: 40px;
	border-radius: 10px 10px 0 0;
	border: 1px solid #c3c3c3;
	background: linear-gradient(#e7e7e7, #fff);
	box-sizing: border-box;
	cursor: move;
}
#profileModal .close { color: #000; margin: 10px 10px 0 0; }
#profileModal .content {
	padding: 12px 14px 14px;
	color: #000;
	background: #fff;
	border: 1px solid #c3c3c3;
	border-top: 0;
	border-radius: 0 0 10px 10px;
	cursor: default;
	max-height: 70vh;
	overflow-y: auto;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}

#profileModal a {color:#000;font-weight:normal;}
#profileModal a i::before {color:#777;font-weight:bold;}
#profileModal a:hover {color:#777;}

#profileModal button {color: #777;}

/* Onglets du profil */
#profileModal-tabs {
	display: flex;
	border-bottom: 1px solid #ddd;
	border-left: 1px solid #c3c3c3;
    border-right: 1px solid #c3c3c3;
	margin-bottom: 0;
	background: #fff;
	border-radius: 0;
}

.profile-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.profile-avatar-wrap {
	position: relative;
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	cursor: pointer;
	border-radius: 50%;
}
.profile-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ddd;
	display: block;
}
.profile-avatar-placeholder {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #ddd;
	color: #777;
	font-size: 20px;
}
.profile-avatar-overlay {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 16px;
	opacity: 0;
	transition: opacity .2s;
}
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }
.profile-avatar-wrap.loading .profile-avatar-overlay {
	opacity: 1;
	animation: avatar-spin .8s linear infinite;
}
.profile-avatar-wrap.loading .profile-avatar-overlay i {
	animation: avatar-spin .8s linear infinite;
}
@keyframes avatar-spin { to { transform: rotate(360deg); } }
.profile-greeting {
	font-weight: bold;
}
.profile-link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #333;
	padding: 3px 0;
}
.profile-link:hover { color: blueviolet; }
.profile-link i { width: 16px; text-align: center; opacity: 0.75; }
#avatar_carac {
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding-top: 8px;
}
#avatar_carac p {
    margin: 4px 0;
    font-size: 13px;
    color: #ddd;
}
#avatar_carac p i {
    width: 16px;
    text-align: center;
    opacity: 0.75;
}
.profile-avatar-marker-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0 2px;
    cursor: pointer;
    user-select: none;
    margin-top: 4px;
	font-weight:normal;
}
.profile-avatar-bio {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.profile-avatar-bio textarea {
    flex: 1;
    resize: vertical;
    min-height: 40px;
    padding: 6px;
    border: 1px solid #c7c7c7;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
}
.profile-avatar-bio textarea::placeholder {
    color: #777;
    font-size: 11px;
}
.profile-avatar-bio button {
    padding: 5px;
    border-radius: 4px;
    color: #c7c7c7;
    cursor: pointer;
}
.profile-avatar-bio button:hover {}

/* ── Extra Avatar Markers ───────────────────────────────────────────────── */
#profile-tab-characters {
    padding: 10px;
}
.extra-avatar-add-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
#extra-avatar-form {
    margin-bottom: 10px;
}
.extra-avatar-form-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.extra-avatar-upload-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #2a2a3a;
    border: 2px solid #444;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.extra-avatar-upload-wrap:hover .extra-avatar-overlay {
    opacity: 1;
}
.extra-avatar-upload-wrap.loading {
    opacity: 0.6;
}
.extra-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
}
.extra-avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.extra-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}
.extra-avatar-form-fields {
    flex: 1;
}
.extra-avatar-form-fields input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #444;
    border-radius: 4px;
    color: #c7c7c7;
    font-size: 13px;
}
.extra-avatar-form-fields input::placeholder {
    color: #666;
}
.extra-avatar-form-actions {
    display: flex;
    gap: 4px;
}
.extra-avatar-form-actions .button-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#extra-avatars-list {
    margin-top: 10px;
}
.extra-avatar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
	border-bottom:1px solid #c7c7c7;
    border-radius: 4px;
    margin-bottom: 6px;
}
.extra-avatar-item:hover {}
.extra-avatar-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #1a1a2a;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.extra-avatar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.extra-avatar-thumb i {
    color: #555;
    font-size: 14px;
}
.extra-avatar-name {
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.extra-avatar-link {
    color: #777;
    font-size: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.extra-avatar-link:hover {
    color: #fff;
}
.extra-avatar-edit-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Marqueur avatar sur la carte ───────────────────────────────────────── */
#avatar-marker {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    user-select: none;
    z-index: 500;
    transform: translate(-50%, -100%);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}
#avatar-marker:active { cursor: grabbing; }
.avatar-mkr-circle {
    width: 54px; /* taille initiale — remplacée par JS via _avatarMkrUpdateScale() */
    height: 54px;
    border-radius: 50%;
    border: 3px solid #000;
    overflow: hidden;
    background: #bbb;
    flex-shrink: 0;
}
.avatar-mkr-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.avatar-mkr-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    pointer-events: none;
}
.avatar-mkr-pin {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 16px solid #000;
    margin-top: -3px;
}
.avatar-mkr-star {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 12px;
    color: yellow;
    -webkit-text-stroke: 1px #000;
    text-shadow: 0 0 2px #000;
    z-index: 10;
    pointer-events: none;
}
/* ── Popup info avatar ───────────────────────────────────────────────────── */
.avatar-popup {
    position: absolute;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 10px 12px 10px 12px;
    min-width: 160px;
    max-width: 240px;
    width: 200px;
    box-sizing: border-box;
    z-index: 600;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    transform: translate(-50%, -100%);
}
.avatar-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1a1a1a;
}
.avatar-popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: #fff !important;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.avatar-popup-close:hover { color: #fff; }
.avatar-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding-right: 16px;
    min-width: 0;
}
.avatar-popup-name {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.avatar-popup-link {
    color: #777 !important;
    font-size: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.avatar-popup-link:hover {
    color: #fff;
}
.avatar-popup-owner {
    font-size: 11px;
    color: #777;
    margin-bottom: 6px;
}
.avatar-popup-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #555;
    flex-shrink: 0;
}
.avatar-popup-img-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    flex-shrink: 0;
}
.avatar-popup-carac {
    border-top: 1px solid #333;
    padding-top: 6px;
}
.avatar-popup-carac p {
    margin: 3px 0;
    font-size: 12px;
    color: #ccc;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}
.avatar-popup-carac p i {
    width: 14px;
    text-align: center;
    opacity: 0.75;
}
.avatar-popup-bio {
    font-style: italic;
    color: #aaa;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.avatar-marker-other {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    pointer-events: auto;
    cursor: pointer;
    z-index: 499;
    transform: translate(-50%, -100%);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}
.avatar-marker-other .avatar-mkr-circle {
    border-color: #000;
}
.avatar-marker-other .avatar-mkr-pin {
    border-top-color: #000;
}
/* Personnages (extra avatars) - keep white border */
.avatar-marker-other.extra .avatar-mkr-circle {
    border-color: #fff;
}
.avatar-marker-other.extra .avatar-mkr-pin {
    border-top-color: #fff;
}

/* ── Modal Notes ─────────────────────────────────────────────────────────── */

#notesModal {
    display: none;
    position: absolute;
    width: 325px;
    background: #000d;
    border-radius: 10px;
    cursor: move;
    z-index: 1;
}
#notesModal .grip {
    height: 40px;
    border-radius: 10px 10px 0 0;
    border: 1px solid #c3c3c3;
    background: linear-gradient(#e7e7e7, #fff);
    box-sizing: border-box;
    cursor: move;
}
#notesModal .close { color: #000; margin: 10px 10px 0 0; }
#notesModal .content {
    padding: 12px 14px 14px;
    background: #fff;
    border: 1px solid #c3c3c3;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    cursor: default;
    max-height: 60vh;
    overflow-y: auto;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}

#notesModal .content button {width:auto;height:auto;font-family:"Roboto"}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}
.notes-header strong { font-size: 13px; color: #333; }
.notes-header .ra { margin-right: 5px; color: #777; }
.notes-autoshow-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
    cursor: pointer;
    user-select: none;
}

.notes-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.notes-action-btn:hover { background: #e8e8e8; }
.notes-action-btn.notes-save { background: #2ecc71; border-color: #27ae60; color: #fff; }
.notes-action-btn.notes-save:hover { background: #27ae60; }
.notes-action-btn.notes-cancel { background: #fff; }

#notes-form {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fafafa;
}
#notes-title-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
}
#notes-title-input:focus { border-color: #777; }

/* ── Notes - champ "Lier à un élément" ─── */
.notes-link-wrap {
    margin-bottom: 8px;
}
.notes-link-label-text {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
}
.notes-link-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 4px 6px;
    background: #fff;
    font-size: 12px;
    min-height: 30px;
}
#notes-link-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-width: 0;
}
.notes-link-none {
    color: #999;
    font-style: italic;
    font-size: 12px;
}
.notes-link-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 12px;
    padding: 2px 6px 2px 9px;
    font-size: 11px;
    max-width: 180px;
    overflow: hidden;
}
.notes-link-tag-rm {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0 2px;
    color: #5a8dee;
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
}
.notes-link-tag-rm:hover { color: #c00; }
#notes-link-pick-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #555;
    font-size: 13px;
    flex-shrink: 0;
    line-height: 1;
}
#notes-link-pick-btn:hover { color: #000; }

/* ── Notes - badge lien dans la liste ─── */
.notes-item-link {
    font-size: 11px;
    color: #777;
    margin-top: 2px;
}
.notes-item-link i { margin-right: 3px; }

/* ── Modal note liée (affichée en bas de page lors d'une nav. vers l'élément) ─── */
#noteViewModal {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* La position gauche/droite est gérée dynamiquement selon le layout (côté opposé à #command_box) */
    width: 300px;
    max-height: 260px;
    background: #fff;
	color:#000;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 1200;
    overflow: hidden;
    display: none;
}
.nvm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
    gap: 8px;
    cursor: move;
}
#nvm-title {
    font-weight: 600;
    font-size: 13px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nvm-close {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 17px;
    color: #777;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
}
.nvm-close:hover { color: #000; }
#nvm-body {
    padding: 10px 12px;
    font-size: 13px;
    overflow-y: auto;
    max-height: 190px;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}
.nvm-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 6px;
}
.nvm-note-title {
    font-weight: 600;
    font-size: 12px;
    flex: 1;
}
.nvm-note-txt { }
.nvm-note-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}
.nvm-edit-btn, .nvm-del-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}
.nvm-edit-btn:hover { background: #e8f0fe; color: #2563eb; }
.nvm-del-btn:hover  { background: #fee2e2; color: #dc2626; }
hr.nvm-sep {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

#wysiwyg-wrap-note { margin-bottom: 8px; }
#note-description {
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 6px 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
    cursor: text;
}
#note-description:empty::before {
    content: attr(placeholder);
    color: #aaa;
    pointer-events: none;
}
#note-description:focus { border-color: #777; }
#note-description-code {
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
    max-height: 200px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 6px 8px;
    font-size: 12px;
    font-family: monospace;
    resize: vertical;
}

.notes-form-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.notes-loading, .notes-empty {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    padding: 12px 0;
}

.notes-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
}
.notes-item:last-child { border-bottom: none; }
.notes-item-body { flex: 1; min-width: 0; cursor: pointer; }
.notes-item-body:hover .notes-item-title { text-decoration: underline; }
.notes-item-title {
    font-size: 13px;
    font-weight: bold;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notes-item-preview {
    font-size: 11px;
    color: #777;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notes-item-date {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}
.notes-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.notes-edit-btn, .notes-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 12px;
    color: #777;
}
.notes-edit-btn:hover { color: #2980b9; background: #eaf4fb; }
.notes-del-btn:hover  { color: #c0392b; background: #fdecea; }

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Fenêtre du formulaire d'ajout de nouveau lieu	*/
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#addContent {
	display: none;
	position: absolute;
	width:430px;
	color: #fff;
	background: #000d;
	border-radius: 10px;
	cursor: move;
	z-index: 1;
}
#addContent .grip {
	height: 40px;
	border-radius: 10px 10px 0 0;
	border: 1px solid #c3c3c3;
	background: linear-gradient(#e7e7e7, #fff);
	box-sizing: border-box;
	cursor: move;
}
#addContent .close {
	color: #000;
	margin: 10px 10px 0px 0px;
}
#addContent .content {
	display: none;
	min-width: 300px;
	max-height: 70vh;
	padding: 0 5px 0px;
	color: #000;
	border: 1px solid #c3c3c3;
	border-top: 0;
	border-radius: 0 0 10px 10px;
	background-color: #fff;
	cursor: default;
	overflow-y: auto;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}
#addContent h3 {margin:0 0 10px;font-weight:normal;clear:none;}
#addContent .content p {
	margin-bottom: 7px;
}
#addContent .content img {
	max-width: 97%;
	height: auto;
	margin: 10px !important;
}
#addContent .content a {color: blueviolet;}

.form-group {margin-bottom: 10px;}
label {
	display: block;
	margin-bottom: 6px;
	font-weight: bold;
}
input[type="text"],

textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #c7c7c7;
	border-radius: 4px;
	box-sizing: border-box;
}
textarea {
	height: 60px;
	resize: vertical;
}
button.submit {
	font-family:unset;
	background:#24222a;
	color: white;
	padding: 5px;
	border: none;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	width: 100%;
}
button.submit:hover {background:#000;}



/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Boîte de zoom */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 40px;
}
#zoom button:not(:first-of-type) {
	display: inline-block;
	width: 40px;
	height: 40px;
	font-size: 20px;
	border: 1px solid #fff9;
	background: #000d;
}
#zoom button:last-of-type {
	margin-top: -1px;
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
}
#zoom button:hover:not([disabled]),
#zoom button:focus:not([disabled]) {
	color: lightskyblue;
	border-width: 2px;
	border-color: lightskyblue;
}
#zoom_level,
#zoom_scale,
#zoom_scale::after {
	display: inline-block;
	position: absolute;
	box-sizing: border-box;
}
#zoom_level,
#zoom_scale {
	height: 20px;
	padding: 2px 4px;
	font-size: 10px;
	font-family: sans-serif;
	text-align: center;
	color: #fff;
	background-color: #000d;
}
#zoom_level {
	right: 0;
	top: -20px;
	width: 40px;
	cursor: pointer;
}
#zoom #zoom_level:hover,
#zoom #zoom_level:focus {
	color: lightskyblue;
}
#zoom_scale {
	width: 110px;
	line-height: 12px;
	font-weight: bold;
	cursor: move;
}
#zoom_scale::after {
	content: "";
	left: 4px;
	top: 5px;
	width: 102px;
	height: 12px;
	border: 2px solid #fff;
	border-top: 0;
}

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Affichage des coordonnées */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#coords {}


/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Icônes des boutons */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

.close::before, .close_item::before {content:"\f057";} /* circle-x-mark */

#command_box .command-toggle::before {content:"\f104";} /* angle-left */
#command_box.active .command-toggle::before {content:"\f105"; } /* angle-right */

/* Path */
.path-clear::before {content:"\f1f8";} /* trash */
.path-cancel::before {content:"\f056";} /* circle-minus */

/* Zoom */
.zoom-in::before {content:"\f067";} /* plus */
.zoom-out::before {content:"\f068";} /* minus */

/* Search */
.search-toggle::before {content:"\f002";} /* magnifying-glass */
.search-toggle.active::before {content:"\f03a";} /* list */

/* Location Types */
.toggle-location-types::before {content:"\f0c8";} /* square */
.toggle-location-types.active::before {content:"\f14a";} /* square-check */

/* Buttons */
.button-icon.home::before {content:"\f015";} /* home-dot */
.button-icon.locations::before {content:"\f3c5";} /* location-dot */
.button-icon.locations.active::before {content:"\f5a0";} /* map-location-dot */
.button-icon.areas::before {content:"\f5cb";} /* vector-square */
.button-icon.areas.active::before {content:"\f5ee";} /* draw-polygon */
.button-icon.path::before {content:"\f4d7";} /* ruler */
.button-icon.pictures::before {content:"\f03e";} /* image */
.button-icon.pictures.active::before {content:"\e209";} /* panomara */
.button-icon.extra::before {content:"\f07b";} /* folder */
.button-icon.extra.active::before {content:"\f07c";} /* folder-open */
.button-icon.fullscreen::before {content:"\f065";font-weight:900;} /* expand */
.button-icon.fullscreen.active::before {content:"\f066";font-weight:900;} /* compress */
.button-icon.add_marker::before {content:"\f055";} /* add */
.button-icon.add_marker.active::before {content:"\f055";} /* add */
.button-icon.admin_marker::before {content:"\f509";} /* users-gear */
.button-icon.admin_marker.active::before {content:"\f509";} /* users-gear */
.button-icon:focus { color: lightskyblue; }

/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Tootips */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

/* Widgets tooltips (opaque white background with border and arrow) */
.tooltip {position:relative;outline:none;cursor:pointer;}
.tooltip span {display:none;border:1px solid #fff;font-family:sans-serif;font-size:11px;pointer-events:none;}
.tooltip:hover span {display:block;position:absolute;top:35px;width:auto;white-space:nowrap;background:#fff;color:#000;border-radius:6px;padding:6px 8px;font-weight:bold;z-index:10;}
.tooltip:hover::after {content:"";position:absolute;top:25px;border-width:5px;border-style:solid;border-color:transparent transparent #fff transparent;}
.tooltip:not(.right):hover span {left:-10px;}
.tooltip:not(.right):hover::after {left:10px;}
.tooltip.right:hover span {right:-10px;}
.tooltip.right:hover::after {right:6px;}
.toggle-location-types.tooltip:hover span {top:30px;left:-20px;}
.toggle-location-types.tooltip:hover::after {top:20px;left:2px;}

/* Tooltips dans #path_panel : fond noir, texte blanc */
#path_panel .tooltip span { border-color: #000; }
#path_panel .tooltip:hover span { background: #000; color: #fff; }
#path_panel .tooltip:hover::after { border-color: transparent transparent #000 transparent; }

/* Locations and Path tooltips (translucid black background without arrow) */
#location_tooltip,
#path_tooltip {
	pointer-events: none;
	user-select: none;
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	padding: 0 5px;
	color: #fff;
	border-radius: 5px;
	background-color: #000d;
}
#path_tooltip{
	z-index: 1; /* TEMP: Path tooltip before location tooltip */
}


/************************************************/
/*************** Panneau admin ******************/
/************************************************/


#panelAdmin {
	display:none; 
	position:absolute; 
	top:20%;
	left:calc(50% - 280px);
	background:#1a1a2e; 
	color:#ddd; 
	border:1px solid #444; 
	border-radius:10px; 
	z-index:3;
	width:580px; 
	max-width:95vw; 
	flex-direction:column;
	cursor:move;
}

#panelAdmin-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	max-height:70vh;
	overflow-y: auto;
	scrollbar-color: #000 #ccc;
	scrollbar-width: thin;
}

/* Scrollbar webkit pour #panelAdmin-content (desktop) */
#panelAdmin-content::-webkit-scrollbar {
	width: 10px;
	background-color: transparent;
}
#panelAdmin-content::-webkit-scrollbar-thumb {
	background-color: #555;
	border-radius: 5px;
	border: 2px solid #222;
	background-clip: padding-box;
}
#panelAdmin-content::-webkit-scrollbar-track {
	background-color: transparent;
}

/* Styles pour #adm-users-content (onglet utilisateurs) */
#adm-users-content {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: auto;
	scrollbar-color: #555 #222;
	scrollbar-width: thin;
}

/* Scrollbar webkit pour #adm-users-content (desktop) */
#adm-users-content::-webkit-scrollbar {
	width: 10px;
	background-color: transparent;
}
#adm-users-content::-webkit-scrollbar-thumb {
	background-color: #555;
	border-radius: 5px;
	border: 2px solid #222;
	background-clip: padding-box;
}
#adm-users-content::-webkit-scrollbar-track {
	background-color: transparent;
}
#panelAdmin .close {
	float:none;
	position: absolute;
	top: 10px;
	right: 10px;
}


/* Onglets panelAdmin */
#panelAdmin-tabs {
	display: flex;
	border-bottom: 1px solid #444;
}
.adm-tab {
	flex: 1;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	color: #aaa;
	cursor: pointer;
	padding: 8px;
	font-size: 12px;
	font-family: inherit;
	transition: color 0.15s, border-color 0.15s;
}
.adm-tab:hover { color: #fff; }
.adm-tab.active { color: #ffd700; border-bottom-color: #ffd700; }
.adm-tab i { font-size: 11px; margin-right: 4px; }
/* Onglet Debug */
#admin-debug-panel { padding: 12px 10px; }
#dbg-run-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: #2d5a8e;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 14px;
    transition: background 0.15s;
}
#dbg-run-btn:hover { background: #3a72b5; }
.dbg-section { margin-bottom: 14px; }
.dbg-section-title {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #ffd700;
    margin-bottom: 5px;
    padding-bottom: 3px;
    border-bottom: 1px solid #333;
}
.dbg-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 0;
    font-size: 12px;
    line-height: 1.5;
}
.dbg-icon { flex-shrink: 0; font-size: 11px; }
.dbg-label { flex-shrink: 0; color: #aaa; min-width: 160px; }
.dbg-value { color: #ddd; word-break: break-all; }
/* Boutons panelAdmin */
.adm-btn-load, .adm-btn-edit, .adm-btn-del {
	width: 28px;
	height: 28px;
	padding: 0;
	background: none;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
	font-family: inherit;
	vertical-align: middle;
}
.adm-btn-load  { color: #7ec8a0; }
.adm-btn-edit  { color: #f0c040; }
.adm-btn-del   { color: #c0392b; }
.adm-btn-load:hover { background: rgba(126,200,160,0.15); }
.adm-btn-edit:hover { background: rgba(240,192,64,0.15); }
.adm-btn-del:hover  { background: rgba(192,57,43,0.12); }
.adm-btn-pub { width: 28px; height: 28px; padding: 0; background: none; border: none; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s; font-family: inherit; vertical-align: middle; }
.adm-btn-pub:hover  { background: rgba(0,0,0,0.08); }
/* Boutons de tri pour les utilisateurs */
.adm-sort-btn {
	background: none;
	border: 1px solid #666;
	color: #aaa;
	padding: 4px 8px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 11px;
	font-family: inherit;
	transition: all 0.15s;
}
.adm-sort-btn:hover { color: #fff; border-color: #999; }
.adm-sort-btn.active { color: #ffd700; border-color: #ffd700; background: rgba(255,215,0,0.08); }
/* Boutons Modifier/Supprimer dans le panneau #text — plus grands */
#text .uml-btn-edit, #text .uml-btn-del, #text .uml-btn-link { width: 20px; height: 20px; font-size: 15px; }

/* ── FAB restauration #addContent ── */
#addContent-fab {
    display: none;
    position: fixed;
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #222;
    border: 2px solid #555;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px #0008;
    transition: background 0.15s, border-color 0.15s;
}
#addContent-fab:hover { background: #333; border-color: #aaa; }

/* ── FAB restauration #path_panel ── */
#path_panel-fab {
    display: none;
    position: fixed;
    bottom: 18px;
    right: 76px; /* décalé à gauche du FAB addContent */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #222;
    border: 2px solid #555;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px #0008;
    transition: background 0.15s, border-color 0.15s;
}
#path_panel-fab:hover { background: #333; border-color: #aaa; }

/* ── Footer réduire/agrandir de #command_box ── */
#text-collapse-footer {
    display: flex;
    align-items: center;
    margin-top: 6px;
    border-top: 1px solid #555555;
	color:lightblue;
	clear:both;
}
#footer-greeting {
	color:transparent;
    flex: 1;
    font-size: 10px;
}
#text-collapse-btn {
    background: none;
    border: none;
    color: lightblue;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 10px;
    border-radius: 3px;
    line-height: 1.4;
    transition: color 0.15s;
    flex-shrink: 0;
}
#text-collapse-btn:hover { color: #ccc; }
#command_box:not(.active) #text-collapse-footer { display: none; }
#app-version { flex: 1; text-align: right; font-size: 10px; }

/* État réduit : cacher tout dans #text sauf le premier enfant (titre h2 ou son conteneur) */
#command_box.text-collapsed #text > *:not(:first-child) { display: none !important; }
#command_box.text-collapsed #link,
#command_box.text-collapsed #source { display: none !important; }



/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # CSS pour fond de page blanc 
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

body.white-bg {}
body.white-bg #map {} 

body.white-bg #text h1 {color:#000;}

body.white-bg #command_box {background:#fff;border:1px solid #777;}
body.white-bg #command_box .button-icon.active { color: #0060df; }
body.white-bg #command_box button:hover { color: #999; }

body.white-bg #text-collapse-footer {border-top: 1px solid #d7d7d7;color:#555555;}
body.white-bg button.close {color:#000;}
body.white-bg button.toggle-location-types {color:#000;}

body.white-bg #command_box button, 
body.white-bg .command-toggle,
body.white-bg #pictures,
body.white-bg #areas,
body.white-bg #locations,
body.white-bg #text_panel,
body.white-bg #extra_panel,
body.white-bg #extra_panel a,
body.white-bg #zoom button,
body.white-bg #zoom_level,
body.white-bg #zoom_scale {background:#fff;color:#000;}

body.white-bg #zoom_scale::after {border-color:#000;}
body.white-bg #search_list {border:1px solid #c7c7c7;border-radius:2px;}
body.white-bg #search_list select {color: #000;background-color: #0002;}
body.white-bg #search_list select:hover,
body.white-bg #search_list select:focus {color:#0060df;border-color:#0060df;}

body.white-bg a,
body.white-bg .button-icon.active {color:#0060df;}
body.white-bg #text a {color: #000;}

body.white-bg a:hover,
body.white-bg a:focus,
body.white-bg .button-icon.active:hover,
body.white-bg .button-icon.active:focus {color:#999}

body.white-bg #locations .label_type:hover,
body.white-bg #locations .label_type:focus,
body.white-bg #extra_panel a:hover,
body.white-bg #extra_panel a:focus,
body.white-bg button:hover,
body.white-bg button:focus,
body.white-bg #zoom button:hover,
body.white-bg #zoom button:focus {color:#777;}
body.white-bg #zoom button,
body.white-bg #locations {border:1px solid #777;}
body.white-bg #pictures {border:1px solid #777}
body.white-bg #zoom button:nth-of-type(2) {margin-top: -1px;}
body.white-bg #zoom button:hover:not([disabled]),
body.white-bg #zoom button:focus:not([disabled]) {color: #4076c8;border-width: 2px;border-color:#0060df;}
body.white-bg #zoom #zoom_level:hover,
body.white-bg #zoom #zoom_level:focus {color: #000;}

body.white-bg input[type="text"]:hover {background:#eee;}
body.white-bg input[type="text"]:focus {color:#0060df;border-color:#0060df;}

body.white-bg .tooltip {}
body.white-bg .tooltip span {border:1px solid #000;}
body.white-bg .tooltip:hover span {background:#000;color:#fff;}
body.white-bg .tooltip:hover::after {border-color:transparent transparent #000 transparent;}
body.white-bg #tooltip {background:#fff;color:#000;}

body.white-bg .button-icon.interest {background: #fff;color: #000;border-bottom:1px solid #fff;}
body.white-bg #interest_box {background: #fff;color: #000;}

body.white-bg .adm-btn-edit  { color: #b8860b !important; }
body.white-bg .adm-btn-del   { color: #c0392b !important; }
body.white-bg .adm-btn-pub   { color: #777 !important; }
body.white-bg #panelAdmin button:not([disabled]) {color: rgb(170, 170, 170);}

body.white-bg #settingsModal { background: #f5f5f5; color: #222; border-color: #ccc; }
body.white-bg .settings-head { background: #e5e5f0; border-color: #ccc; }
body.white-bg .stt-btn-close,
body.white-bg .stt-btn-reset { color: #555 !important; border-color: #bbb !important; }
body.white-bg .stt-save-btn { color: #fff !important; }
body.white-bg .stt-cancel-btn { color: #555 !important; border-color: #bbb !important; }
body.white-bg #stt-custom-css { background: #f5f5f5; color: #222; border-color: #ccc; }
body.white-bg .stt-section { border-color: #ddd; }
body.white-bg .stt-label { color: #444; }
body.white-bg .stt-section-h { color: #667; }
body.white-bg .stt-subsec-h { color: #889; }
body.white-bg .stt-number input[type=number],
body.white-bg .stt-num { background: #fff; border-color: #bbb; color: #333; }
body.white-bg .stt-grid-col-head { color: #889; }
body.white-bg .stt-font-select { background: #fff; border-color: #bbb; color: #333; }
body.white-bg .stt-font-preview { background: #fff; border-color: #ddd; color: #333; }
body.white-bg .stt-bg-btn { background: #eee; border-color: #bbb; color: #555; }
body.white-bg .stt-bg-btn.active { color: #1a56b0 !important; border-color: #1a56b0 !important; }
body.white-bg #settings-color-panel { background: #f0f0f0; border-color: #ccc; }
body.white-bg .stt-range-val { color: #667; }


/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Système d'onglets (Tabs) */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

#addContent-tabs {
	display: flex;
	border-bottom: 1px solid #ddd;
	margin-bottom: 0;
	background: #fff;
}

.tab-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 12px;
	border: none;
	border-bottom: 2px solid transparent;
	background: none;
	color: #999;
	cursor: pointer;
	width: auto;
	height: auto;
	font-size: 14px;
	font-weight: 400;
	transition: color .2s, border-color .2s;
	text-align: center;
}
.tab-btn:hover { color: #555; }
.tab-btn.active {
	color: #333;
	border-bottom-color: #555;
}
.tab-icon {
	font-family: "Font Awesome 6 Free", "FontAwesome";
	font-weight: 900;
	font-style: normal;
	font-size: 15px;
	line-height: 1;
}
.tab-label {
	font-family: Roboto, 'Segoe UI', Arial, sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.tab-pane {
	display: none;
}

.tab-pane.active {
	display: block;
}

/* Onglet Utilisateurs du profileModal */
#profile-tab-others {
	padding: 4px 0;
}
.others-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.others-table thead th {
	text-align: center;
	padding: 4px 6px;
	color: #777;
	border-bottom: 1px solid #ddd;
	font-weight: normal;
}
.others-table thead th:first-child { text-align: left; }
.others-table tbody tr:nth-child(even) { background: #f9f9f9; }
.others-table tbody td {
	padding: 5px 6px;
	text-align: center;
	border-bottom: 1px solid #f0f0f0;
}
.others-table tbody td.others-name {
	text-align: left;
	font-weight: bold;
	color: #333;
	white-space: nowrap;
}
.others-cb { cursor: pointer; accent-color: #7777aa; }



/* CSS pour le sélecteur de couleur des zones */
.color-picker-group {
	display: flex;
	gap: 8px;
	align-items: center;
}

.color-picker-group input[type="color"] {
	width: 50px;
	height: 36px;
	border: 1px solid #555;
	border-radius: 4px;
	cursor: pointer;
}

.zone-path-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #a0a0a0;
  font-weight: 600;
  border: 1px solid #e0e0e0;
}

#zone-points-count {
	display: flex;
	align-items: center;
	gap: 8px;
}

#zone-points-count::before {
	content: "●";
	animation: pulse 1.5s ease-in-out infinite;
	color: #ff6b9d;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.zone-path-buttons {
	display: flex;
	gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  background: #808080;
  border: none;
  border-radius: 4px;
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-small:hover {
	background: #606060;
}


/* ── Bouton de connexion ──────────────────────────────────────────────────── */
button.btn-login {
	display: inline-block;
	width: auto;
	height: auto;
	margin-top: 10px;
	padding: 8px 20px;
	background: #7777aa !important;
	color: #fff !important;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-weight: bold;
	font-size: 14px;
	font-family: Arial, sans-serif;
}
button.btn-login:hover {
	background: #9999cc !important;
	color: #fff;
}

/* Modal de connexion requis (utilisateur non connecté) */
#login-required-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#login-required-box {
	background: #fff;
	border-radius: 10px;
	padding: 28px 32px 24px;
	max-width: 320px;
	width: 90%;
	text-align: center;
	position: relative;
	box-shadow: 0 6px 32px rgba(0,0,0,0.28);
}
#login-required-box p {
	margin: 8px 0 18px;
	font-size: 15px;
	color: #333;
	line-height: 1.5;
}
#login-required-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #777;
	line-height: 1;
	padding: 0 4px;
}
#login-required-close:hover { color: #333; }

/* ============================================================
   # Modal Paramètres
   ============================================================ */
#settingsModal {
    display: none;
    position: fixed;
    top: 50px;
    right: 10px;
    width: 360px;
    max-height: calc(100vh - 100px);
    background: #1e1e2e;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.6);
    z-index: 600;
    flex-direction: column;
    font-size: 12px;
    line-height: normal;
    color: #ddd;
}
.settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #2a2a3e;
    border-radius: 8px 8px 0 0;
    cursor: move;
    border-bottom: 1px solid #444;
    font-weight: bold;
    font-size: 13px;
    gap: 8px;
}
.settings-head > span { flex: 1; }
.settings-head > div { display: flex; gap: 6px; align-items: center; }
.stt-btn-close, .stt-btn-reset {
    background: none;
    border: 1px solid #555;
    border-radius: 4px;
    color: #aaa;
    cursor: pointer;
    padding: 3px 7px;
    font-size: 11px;
    transition: background .15s, color .15s;
}
.stt-btn-close:hover, .stt-btn-reset:hover { background: rgba(255,255,255,.08); color: #fff; }
.settings-body {
    overflow-y: auto;
    flex: 1;
    padding: 12px 14px;
    scrollbar-width: thin;
}
.settings-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #444;
    justify-content: flex-end;
}
.stt-save-btn {
    background: #3a6ecf;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background .15s;
}
.stt-save-btn:hover { background: #2d5fb8; }
.stt-cancel-btn {
    background: none;
    color: #aaa;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background .15s, color .15s;
}
.stt-cancel-btn:hover { background: rgba(255,255,255,.06); color: #ccc; }
.stt-section { margin-bottom: 16px; border-bottom: 1px solid #333; padding-bottom: 12px; }
.stt-section:last-child { border-bottom: none; margin-bottom: 0; }
.stt-section-h {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: bold;
    color: #aab;
    text-transform: uppercase;
    letter-spacing: .06em;
}
/* Grille états (Normal / Survol / Focus) */
.stt-grid {
    display: grid;
    grid-template-columns: 1fr 42px 42px 42px;
    gap: 6px 4px;
    align-items: center;
    margin-bottom: 4px;
}
.stt-grid-col-head {
    text-align: center;
    font-size: 9px;
    color: #778;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.stt-grid > .stt-swatch { display: block; margin: 0 auto; }
.stt-num {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: #1a1a2e;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ddd;
    font-size: 11px;
    padding: 2px 2px;
    -moz-appearance: textfield;
}
.stt-num::-webkit-outer-spin-button,
.stt-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Héritage grille pour .stt-label et .stt-row */
.stt-subsec { margin-bottom: 10px; }
.stt-subsec:last-child { margin-bottom: 0; }
.stt-subsec-h { margin: 0 0 6px; font-size: 11px; color: #778; font-weight: bold; }
.stt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; min-height: 24px; }
.stt-label { color: #bbb; font-size: 11px; }
.stt-swatch {
    width: 26px;
    height: 20px;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
    transition: border-color .15s;
}
.stt-swatch:hover { border-color: #aaa; }
.stt-number { display: flex; align-items: center; gap: 4px; }
.stt-number input[type=number] {
    width: 52px;
    background: #2a2a3e;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ddd;
    padding: 2px 5px;
    font-size: 11px;
    text-align: center;
}
.stt-unit { color: #777; font-size: 11px; }
.stt-bg-group { display: flex; gap: 6px; }
.stt-bg-btn {
    background: #2a2a3e;
    border: 1px solid #555;
    border-radius: 5px;
    color: #aaa;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 11px;
    transition: background .15s, color .15s, border-color .15s;
}
.stt-bg-btn:hover { background: rgba(255,255,255,.07); color: #ccc; }
.stt-bg-btn.active { color: lightskyblue; border-color: lightskyblue; background: rgba(135,206,250,.08); }
.stt-font-select {
    flex: 1;
    background: #2a2a3e;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ddd;
    padding: 3px 5px;
    font-size: 11px;
    max-width: 200px;
}
.stt-font-preview {
    font-size: 14px;
    color: #ccc;
    background: #161622;
    border-radius: 4px;
    padding: 6px 10px;
    margin: 6px 0;
    border: 1px solid #333;
    min-height: 28px;
}

/* Color picker (settings) */
#settings-color-panel {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #1e1e2e;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.6);
}
.stt-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 22px);
    gap: 3px;
    margin-bottom: 6px;
}
.stt-picker-swatch {
    width: 22px;
    height: 18px;
    border: 1px solid #444;
    border-radius: 3px;
    cursor: pointer;
    display: block;
    transition: transform .1s;
}
.stt-picker-swatch:hover { transform: scale(1.15); border-color: #aaa; }
#stt-picker-custom {
    width: 100%;
    height: 22px;
    border: none;
    padding: 0;
    border-radius: 3px;
    cursor: pointer;
    display: block;
}


#stt-custom-css {
	display: block;
	width: 100%;
	min-height: 120px;
	resize: vertical;
	background: #111;
	color: #e0e0e0;
	border: 1px solid #444;
	border-radius: 6px;
	padding: 8px;
	font-family: monospace;
	font-size: 12px;
	line-height: 1.5;
	box-sizing: border-box;
	margin-bottom: 8px;
}
.stt-css-apply-btn {
	border: none;
	color:#a7a7a7;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	transition: color .15s;
}
.stt-css-apply-btn:hover {color:#878787; }

/* --- Curseur de taille (stt-range) --- */
.stt-range {
    flex: 1;
    height: 4px;
    accent-color: lightskyblue;
    cursor: pointer;
    min-width: 0;
}
.stt-range-val {
    min-width: 34px;
    text-align: right;
    color: #aaa;
    font-size: 11px;
    font-family: monospace;
}

/* --- Layout gauche/droite --- */
body.layout-left #command_box {
    right: auto;
    left: 10px;
    margin-left: 0;
    margin-right: 10px;
}
body.layout-left #zoom {
    right: auto;
    left: 10px;
}

body.layout-left #settingsModal {
    right: auto;
    left: 10px;
}
body.layout-left .command-toggle {
    float: left;
}
body.layout-left #command_box .command-toggle::before     { content: "\f105"; } /* angle-right */
body.layout-left #command_box.active .command-toggle::before { content: "\f104"; } /* angle-left */
body.layout-left #search_text,
body.layout-left #search_list {
    margin-left: 0;
    margin-right: 10px;
}

/* ────────────────────────────────────────────────────────────────── */
/* Zone Points List */
/* ────────────────────────────────────────────────────────────────── */

/* Curseur quand Ctrl est enfoncé en mode traçage : indique que le drag déplacera la zone */
body.zone-tracing-mode.zone-ctrl-held .zone-trace-path {
    cursor: grab !important;
}
body.zone-tracing-mode.zone-dragging-mode .zone-trace-path,
body.zone-tracing-mode.zone-dragging-mode {
    cursor: grabbing !important;
}

#zone-points-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 10px;
  background: #fcfcfc;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  scrollbar-width: thin;
  scrollbar-color: #555 #1a1a1a;
}

.zone-point-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	background: rgba(255, 107, 157, 0.05);
	border-radius: 3px;
	border: 1px solid rgba(255, 107, 157, 0.15);
	font-size: 12px;
}

.point-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  background: #808080;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  flex-shrink: 0;
}

.point-coords {
	flex: 1;
	color: #aaa;
	font-family: monospace;
}

.btn-point-insert-before,
.btn-point-insert-after,
.btn-point-delete {
	flex-shrink: 0;
	padding: 4px 8px;
	background: rgba(255, 107, 157, 0.1);
	border: 1px solid rgba(255, 107, 157, 0.3);
	color: #ff6b9d;
	border-radius: 3px;
	cursor: pointer;
	font-size: 10px;
	transition: all .2s;
}

.btn-point-insert-before:hover,
.btn-point-insert-after:hover {
	background: rgba(255, 200, 150, 0.2);
	border-color: rgba(255, 200, 150, 0.5);
	color: #ffc896;
}

.btn-point-delete:hover {
	background: rgba(200, 100, 100, 0.2);
	border-color: rgba(200, 100, 100, 0.5);
	color: #ff8080;
}





/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* # Media Queries */
/* -------------------------------------------------------------------------- */
/* ========================================================================== */

@media screen and (max-width: 767px) {
	/* #addContent toujours full-width sur mobile */
	#addContent {
		width: 95vw;
		max-width: 95vw;
		max-height: 80vh;
	}
	#addContent-form,
	#addZones-form {
		width: 100%;
		overflow: visible;
	}
	#panelAdmin {
		max-height: 70vh;
		overflow-y: auto;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
		display: none !important;
	}
	/* Quand le panelAdmin est ouvert, appliquer flex */
	#panelAdmin[style*="display: flex"],
	#panelAdmin.active {
		display: flex !important;
	}
	#panelAdmin-content {
		display: flex;
		flex-direction: column;
		flex: 1;
		min-height: 0;
		max-height: 70vh;
		overflow-y: auto;
		overflow-x: hidden;
		touch-action: pan-y;
		-webkit-overflow-scrolling: touch;
	}

	#adm-users-content {
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		overflow-x: auto;
		scrollbar-width: thin;
		scrollbar-color: #555 #1a1a1a;
	}
	/* Scrollbar visible sur webkit (iOS, Chrome mobile) */
	#panelAdmin-content::-webkit-scrollbar,
	#adm-users-content::-webkit-scrollbar {
		width: 10px;
		background-color: transparent;
	}
	#panelAdmin-content::-webkit-scrollbar-thumb,
	#adm-users-content::-webkit-scrollbar-thumb {
		background-color: #555;
		border-radius: 5px;
		border: 2px solid #1a1a1a;
		background-clip: padding-box;
	}
	#panelAdmin-content::-webkit-scrollbar-track,
	#adm-users-content::-webkit-scrollbar-track {
		background-color: transparent;
	}
	/* Sécurité taille max pour tous les modaux */
	#panelAdmin,
	#addContent,
	#locations,
	#areas,
	#pictures,
	#article,
	#helpArticle {
		max-width: 95vw !important;
		box-sizing: border-box;
	}
}

@media screen and (max-width: 540px) {
	#command_box {
	right: 0;
	top: 0;
	max-width: 100%;
	margin-left: 0;
	border-radius: 0 0 0 5px;
	}
	#command_box.active {
	width: 100%;
	border-radius: 0;
	}
	body.layout-left #command_box {left:0;}
	#command_panel {
	width: auto;
	}
	#search_panel,
	#button_panel {
	display: block;
	}
	#button_panel {margin:10px 0;}	
	#button_panel .button-icon {margin:0 3px;}
	#search_text,
	#search_list {
	width: calc(100% - 70px);
	}
	#zoom {
	right: 0;
	bottom: 0;
	}
	body.layout-left #zoom {left:0;}
	#zoom button {
	border-right: 0;
	}
	#zoom button:last-of-type {
	border-radius: 0;
	border-bottom: 0;
	}
	#button_panel .tooltip.right:hover span {left:-10px; right:auto;}
	#button_panel .tooltip.right:hover::after {left:10px; right:auto;}
	
}

@media screen and (max-height: 600px) {
	#article .content, #helpArticle .content {max-height: 400px;}
}

@media screen and (max-height: 500px) {
	#article .content, #helpArticle .content {max-height: 300px;}
}

@media screen and (max-height: 400px) {
	#article .content, #helpArticle .content {max-height: 200px;}
}

@media screen and (max-height: 300px) {
	#article .content, #helpArticle .content {max-height: 100px;}
}