styles.scss 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. // /!\ Large Desktop first /!\
  2. // larger desktop variables (default)
  3. $animation_style: 0.3s ease-out;
  4. $global_margins: 1.5vh 1vw 2vh 1vw;
  5. $buttons_border_width: 1.2px;
  6. $buttons_padding: 10px 12px;
  7. $buttons_padding_collapsed: 10px 10px;
  8. $buttons_inner_margin: 0px 5px 0px 10px;
  9. $buttons_margin: 14px;
  10. $main_title_margin: 0px 0px 17px 5px;
  11. $search_box_height: 2rem;
  12. $search_icon_offset: -45px;
  13. $main_color: rgb(0, 0, 0);
  14. $bg_color: rgba(255, 255, 255);
  15. $grey_inactive: rgb(110, 110, 110);
  16. $grey_hover: rgb(50, 50, 50);
  17. $UI_main_font_size: 1rem;
  18. $large_picto_size: 2rem;
  19. $medium_picto_size: 1.3rem;
  20. // smaller desktop variables
  21. $buttons_padding--sm: 8px 10px 8px 7px;
  22. $buttons_padding_collapsed--sm: 8px 2px;
  23. $buttons_inner_margin--sm: 0px 3px 0px 5px;
  24. $main_title_margin--sm: 0px 0px 8px 5px;
  25. $search_box_height--sm: 1.5rem;
  26. $search_icon_offset--sm: -23px;
  27. $UI_main_font_size--sm: 0.7rem;
  28. $large_picto_size--sm: 1.2rem;
  29. $medium_picto_size--sm: 1rem;
  30. @font-face {
  31. font-family: 'Public';
  32. font-style: normal;
  33. font-weight: 400;
  34. src: url('assets/fonts/PublicSans-Regular.ttf') format('TrueType');
  35. }
  36. @font-face {
  37. font-family: 'Public';
  38. font-style: normal;
  39. font-weight: 300;
  40. src: url('assets/fonts/PublicSans-Light.ttf') format('TrueType');
  41. }
  42. @font-face {
  43. font-family: 'Ortica';
  44. font-style: bold;
  45. font-weight: 300;
  46. src: url('assets/fonts/Ortica-Bold.woff2') format('woff2');
  47. }
  48. * {
  49. margin: 0;
  50. padding: 0;
  51. }
  52. button {
  53. all: initial;
  54. }
  55. body {
  56. font-family: 'Public', sans-serif;
  57. font-weight: 400;
  58. color: $main_color;
  59. }
  60. #content {
  61. padding: $global_margins;
  62. position: fixed;
  63. top: 0;
  64. left: 0;
  65. width: 100vw;
  66. height: 100vh;
  67. display: flex;
  68. justify-content: center;
  69. align-items: center;
  70. z-index: 1;
  71. svg {
  72. position: absolute;
  73. height: 50%;
  74. path {
  75. cursor: pointer;
  76. }
  77. }
  78. svg#fill {
  79. fill: $bg_color;
  80. /* mix blend mode est dépendant du stacking context */
  81. mix-blend-mode: overlay;
  82. opacity: 0.4;
  83. }
  84. svg#stroke {
  85. position: absolute;
  86. fill: none;
  87. stroke: $main_color;
  88. stroke-width: 1px;
  89. }
  90. }
  91. #buttons_container {
  92. position: fixed;
  93. top: 0;
  94. left: 0;
  95. z-index: 1;
  96. display: flex;
  97. align-items: center;
  98. margin: $global_margins;
  99. font-size: $UI_main_font_size;
  100. .niveau_profondeur {
  101. display: flex;
  102. flex-direction: column;
  103. justify-content: space-between;
  104. height: 100%;
  105. margin-right: 30px;
  106. width: 5vw;
  107. p {
  108. font-weight: 300;
  109. cursor: pointer;
  110. }
  111. p.selected {
  112. font-weight: 400;
  113. text-decoration: underline;
  114. }
  115. p:hover {
  116. font-weight: 400;
  117. }
  118. }
  119. .arrow {
  120. margin-right: $buttons_margin;
  121. svg {
  122. height: $large_picto_size;
  123. width: auto;
  124. fill: $bg_color;
  125. stroke: $main_color;
  126. stroke-width: 0;
  127. cursor: pointer;
  128. margin-top: 4px;
  129. transition: fill $animation_style;
  130. }
  131. svg:hover {
  132. fill: $grey_inactive;
  133. }
  134. svg:active {
  135. fill: $grey_hover;
  136. }
  137. }
  138. .arrow:last-of-type {
  139. margin-right: 0;
  140. margin-left: $buttons_margin;
  141. }
  142. .mode {
  143. display: flex;
  144. align-items: center;
  145. justify-content: space-around;
  146. background-color: $bg_color;
  147. margin: 0;
  148. margin-right: $buttons_margin;
  149. padding: $buttons_padding;
  150. border-radius: 50px;
  151. cursor: pointer;
  152. border: solid 0.8px $grey_inactive;
  153. color: rgba(0, 0, 0, 0.5);
  154. transition: border 0.1s ease-out, color 0.1s ease-out, padding $animation_style;
  155. font-weight: 300;
  156. svg {
  157. height: $large_picto_size;
  158. .thick {
  159. transition: stroke-width $animation_style, fill $animation_style, stroke $animation_style;
  160. stroke-width: 0.8;
  161. stroke: $grey_inactive;
  162. }
  163. .thin {
  164. transition: stroke-width $animation_style, fill $animation_style, stroke $animation_style;
  165. stroke-width: 0.5;
  166. stroke: $grey_inactive;
  167. }
  168. .circle-fill {
  169. fill: $grey_inactive;
  170. }
  171. }
  172. .mode_container {
  173. overflow: hidden;
  174. width: auto;
  175. transition: max-width 0.4s ease-out, margin-left 0.4s ease-out, margin-right 0.4s ease-out;
  176. max-width: 0px;
  177. margin: $buttons_inner_margin;
  178. max-width: 200px;
  179. p {
  180. white-space: nowrap;
  181. height: fit-content;
  182. margin-bottom: 1.5px;
  183. }
  184. }
  185. }
  186. .mode.active {
  187. padding: $buttons_padding !important;
  188. font-weight: 400;
  189. border: solid $buttons_border_width $main_color;
  190. color: $main_color;
  191. svg .thick {
  192. stroke-width: 1.2;
  193. stroke: $main_color;
  194. }
  195. svg .thin {
  196. stroke-width: 0.6;
  197. stroke: $main_color;
  198. }
  199. svg .circle-fill {
  200. fill: $main_color;
  201. }
  202. .mode_container {
  203. max-width: 200px !important;
  204. margin: $buttons_inner_margin !important;
  205. }
  206. }
  207. .mode:hover {
  208. padding: $buttons_padding !important;
  209. color: $grey_hover;
  210. border-color: $grey_hover;
  211. svg .thick, svg .thin {
  212. stroke: $grey_hover;
  213. }
  214. svg .circle-fill {
  215. fill: $grey_hover;
  216. }
  217. .mode_container {
  218. max-width: 200px !important;
  219. margin: $buttons_inner_margin !important;
  220. }
  221. }
  222. .mode.collapsed {
  223. padding: $buttons_padding_collapsed;
  224. .mode_container {
  225. max-width: 0px;
  226. margin-left: 0px;
  227. margin-right: 0px;
  228. }
  229. }
  230. .mode:last-of-type {
  231. margin-right: 0;
  232. }
  233. }
  234. #global_nav {
  235. position: fixed;
  236. bottom: 0;
  237. left: 0;
  238. margin: $global_margins;
  239. z-index: 1;
  240. font-size: $UI_main_font_size;
  241. h1 {
  242. font-family: 'Ortica';
  243. font-size: 1.7em;
  244. margin: $main_title_margin;
  245. }
  246. #menu {
  247. display: flex;
  248. align-items: center;
  249. #search {
  250. display: flex;
  251. align-items: center;
  252. input[type="search"] {
  253. height: $search_box_height;
  254. width: 10vw;
  255. padding-left: 13px;
  256. padding-right: 30px;
  257. padding-bottom: 1px;
  258. font-family: 'Public';
  259. font-weight: 300;
  260. border-radius: 20px;
  261. border: solid $grey_inactive $buttons_border_width;
  262. color: $grey_inactive;
  263. background-color: $bg_color;
  264. transition: color $animation_style;
  265. }
  266. input[type="search"]:hover {
  267. color: $grey_hover;
  268. }
  269. input[type="search"]:active {
  270. color: $main_color;
  271. }
  272. button {
  273. background: none;
  274. border: none;
  275. cursor: pointer;
  276. svg {
  277. margin-top: 5px;
  278. margin-left: $search_icon_offset;
  279. height: $medium_picto_size;
  280. fill: $grey_inactive;
  281. transition: fill $animation_style;
  282. }
  283. svg:hover {
  284. fill: $grey_hover;
  285. }
  286. }
  287. }
  288. .menu_item {
  289. font-weight: 300;
  290. display: flex;
  291. align-items: center;
  292. cursor: pointer;
  293. margin: 0 10px;
  294. padding-bottom: 2px;
  295. svg {
  296. width: $medium_picto_size;
  297. height: $medium_picto_size;
  298. margin-right: 3px;
  299. fill: $main_color;
  300. }
  301. }
  302. .menu_item:hover {
  303. font-weight: 400;
  304. }
  305. }
  306. }
  307. // //
  308. // smaller desktop //
  309. // //
  310. @media only screen and (max-width: 1440px) {
  311. #buttons_container, #global_nav {
  312. font-size: $UI_main_font_size--sm;
  313. }
  314. #buttons_container {
  315. .arrow svg {
  316. height: $large_picto_size--sm;
  317. }
  318. .mode {
  319. padding: $buttons_padding--sm;
  320. svg {
  321. height: $large_picto_size--sm;
  322. }
  323. .mode_container {
  324. margin: $buttons_inner_margin--sm;
  325. }
  326. }
  327. .mode.active {
  328. padding: $buttons_padding--sm !important;
  329. .mode_container {
  330. margin: $buttons_inner_margin--sm !important;
  331. }
  332. }
  333. .mode:hover {
  334. padding: $buttons_padding--sm !important;
  335. .mode_container {
  336. margin: $buttons_inner_margin--sm !important;
  337. }
  338. }
  339. .mode.collapsed {
  340. padding: $buttons_padding_collapsed--sm;
  341. }
  342. }
  343. #global_nav {
  344. h1 {
  345. margin: $main_title_margin--sm;
  346. }
  347. #menu {
  348. #search {
  349. input[type="search"] {
  350. height: $search_box_height--sm;
  351. font-size: $UI_main_font_size--sm;
  352. }
  353. button {
  354. svg {
  355. margin-left: $search_icon_offset--sm;
  356. width: $medium_picto_size--sm;
  357. }
  358. }
  359. }
  360. .menu_item {
  361. svg {
  362. width: $medium_picto_size--sm;
  363. height: $medium_picto_size--sm;
  364. }
  365. }
  366. }
  367. }
  368. }