styles.scss 9.8 KB

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