styles.css 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. /* Styles pour Map Generator */
  2. /* Layout principal avec flexbox pour footer en bas */
  3. body {
  4. display: flex;
  5. flex-direction: column;
  6. min-height: 100vh;
  7. margin: 0;
  8. padding: 0;
  9. }
  10. #global-header {
  11. position: fixed;
  12. top: 0;
  13. left: 0;
  14. right: 0;
  15. z-index: 1030;
  16. }
  17. .sidebar {
  18. position: fixed;
  19. top: 56px; /* Hauteur de la navbar */
  20. left: 0;
  21. width: 250px;
  22. height: calc(100vh - 56px);
  23. background-color: #343a40;
  24. color: white;
  25. overflow-y: auto;
  26. z-index: 1000;
  27. }
  28. .main-content {
  29. margin-left: 250px;
  30. margin-top: 15px; /* Espace pour le header fixe + padding */
  31. padding-top: 20px;
  32. }
  33. /* Styles de la sidebar */
  34. .sidebar .nav-link {
  35. color: rgba(255, 255, 255, 0.75);
  36. padding: 10px 20px;
  37. }
  38. .sidebar .nav-link:hover {
  39. color: white;
  40. background-color: rgba(255, 255, 255, 0.1);
  41. }
  42. .sidebar .nav-link.active {
  43. color: white;
  44. background-color: #0d6efd;
  45. }
  46. .tool-group {
  47. border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  48. margin-bottom: 10px;
  49. padding-bottom: 10px;
  50. }
  51. .tool-group h6 {
  52. color: rgba(255, 255, 255, 0.6);
  53. text-transform: uppercase;
  54. font-size: 0.8rem;
  55. margin: 15px 20px 5px 20px;
  56. }
  57. .canvas-container {
  58. position: relative;
  59. border-radius: 8px;
  60. overflow: hidden;
  61. }
  62. .tool-active {
  63. background-color: #0d6efd !important;
  64. color: white !important;
  65. }
  66. .color-swatch.selected {
  67. border: 2px solid white !important;
  68. }
  69. .layer-item {
  70. background-color: rgba(255, 255, 255, 0.05);
  71. border-radius: 4px;
  72. margin-bottom: 2px;
  73. }
  74. .layer-item:hover {
  75. background-color: rgba(255, 255, 255, 0.1);
  76. }
  77. /* Styles du footer */
  78. #global-footer .text-center {
  79. color: #343a40;
  80. font-size: small;
  81. }
  82. #global-footer {
  83. margin-left: 250px; /* Même marge que main-content */
  84. background-color: transparent;
  85. padding: 30px 0 20px 0;
  86. }
  87. /* Styles pour l'éditeur de carte */
  88. .map-editor-container {
  89. position: relative;
  90. }
  91. .map-toolbar {
  92. background-color: #f8f9fa;
  93. border: 1px solid #dee2e6;
  94. border-radius: 0.375rem;
  95. padding: 0.75rem;
  96. }
  97. .map-canvas-container {
  98. position: relative;
  99. overflow: hidden;
  100. background-color: #f2f3f5; /* gris clair */
  101. }
  102. #mapCanvas {
  103. transform-origin: 0 0;
  104. transition: transform 0.1s ease-out;
  105. }
  106. .hexagon {
  107. transition: all 0.2s ease;
  108. user-select: none;
  109. /* Fond blanc franc et pas de bordure réelle pour éviter les interstices */
  110. background-color: #ffffff;
  111. border: none !important;
  112. box-sizing: border-box;
  113. }
  114. .hexagon:hover {
  115. /* Pas de scale pour éviter les décalages visuels entre hexagones */
  116. border-color: #007bff !important;
  117. background-color: rgba(0, 123, 255, 0.1);
  118. z-index: 10;
  119. }
  120. .hexagon.selected {
  121. box-shadow: 0 0 0 3px #2196f3, inset 0 0 0 2px #fff;
  122. border-color: #2196f3 !important;
  123. background-color: rgba(33, 150, 243, 0.2);
  124. z-index: 20;
  125. }
  126. /* Styles pour les informations de tuile */
  127. #tileInfo {
  128. border: 1px solid #dee2e6;
  129. }
  130. /* Classes utilitaires pour remplacer styles inline dans les vues */
  131. .map-canvas-container-custom {
  132. position: relative;
  133. overflow: hidden;
  134. height: 600px;
  135. background-color: #f8f9fa;
  136. }
  137. .map-canvas {
  138. position: absolute;
  139. top: 0;
  140. left: 0;
  141. cursor: grab;
  142. z-index: 1;
  143. }
  144. .map-loading-overlay {
  145. position: absolute;
  146. top: 0;
  147. left: 0;
  148. width: 100%;
  149. height: 100%;
  150. background-color: rgba(255,255,255,0.8);
  151. z-index: 10;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. }
  156. .tile-info-hidden {
  157. display: none;
  158. }
  159. .editor-empty-custom {
  160. width: 100%;
  161. height: 600px;
  162. background-color: #e9ecef;
  163. }
  164. /* Animation de chargement */
  165. .spinner-border {
  166. width: 3rem;
  167. height: 3rem;
  168. }
  169. /* Styles pour les boutons de zoom */
  170. .btn-group .btn {
  171. border-radius: 0.25rem !important;
  172. }
  173. .btn-group .btn:not(:last-child) {
  174. border-top-right-radius: 0 !important;
  175. border-bottom-right-radius: 0 !important;
  176. }
  177. .btn-group .btn:not(:first-child) {
  178. border-top-left-radius: 0 !important;
  179. border-bottom-left-radius: 0 !important;
  180. }
  181. /* Responsive pour l'éditeur de carte */
  182. @media (max-width: 768px) {
  183. .sidebar {
  184. width: 100%;
  185. height: auto;
  186. position: relative;
  187. top: 0;
  188. }
  189. .main-content {
  190. margin-left: 0;
  191. margin-top: 15px;
  192. }
  193. #global-footer {
  194. margin-left: 0;
  195. }
  196. .map-toolbar {
  197. flex-direction: column;
  198. gap: 0.5rem;
  199. }
  200. .map-toolbar .d-flex {
  201. justify-content: center;
  202. }
  203. }
  204. /* Forcer les dropdowns à rester visibles (ajustement de position)
  205. - .dropdown-menu-end sera utilisé par le JS si nécessaire
  206. - on ajoute une marge à droite pour éviter qu'il colle au bord
  207. */
  208. .dropdown-menu.dropdown-menu-end {
  209. right: 5px !important;
  210. left: auto !important;
  211. }
  212. /* Forcer tous les dropdowns à s'afficher vers la gauche pour éviter qu'ils sortent de l'écran */
  213. .dropdown-menu {
  214. left: auto !important;
  215. right: 0 !important;
  216. margin-right: 5px;
  217. }
  218. /* Fix: s'assurer que les dropdowns apparaissent au-dessus des éléments fixés (header/sidebar) */
  219. .dropdown-menu {
  220. z-index: 2050 !important;
  221. }
  222. /* Styles pour les options de type de tuile dans la sidebar */
  223. .tile-type-option {
  224. justify-content: flex-start;
  225. padding: 6px 8px;
  226. border: 1px solid transparent;
  227. }
  228. .tile-type-option svg {
  229. border-radius: 4px;
  230. background: white;
  231. box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  232. }
  233. .tile-type-option.active, .tile-type-option:focus, .tile-type-option:hover {
  234. border-color: rgba(0,0,0,0.08);
  235. background-color: rgba(255,255,255,0.06);
  236. }
  237. .tile-type-option span {
  238. font-size: 0.9rem;
  239. color: #fff;
  240. }