/* les regions permettent de structurer le fichier
on peut replier chaque region dans vscode
et accéder rapidement à une région avec le plugin Region Viewer */

/* #region VARIABLES GLOBALES */
:root {
  /* couleurs */
  --orange: #E95420;
  --half-aubergine: #993057;
  --light-aubergine: #77216F;
  --mid-aubergine: #5E2750;
  --dark-aubergine: #2C001E;
  --warm-grey: #AEA79F;
  --cool-grey: #333333;
  --text-grey: #111111;
  
  /* marges */
  --internal-margin: 1.6rem;
  --external-margin: 2rem;

  /* taille typo générale */
  font-size: min(18px,calc(13px + .5vw));

  /* largeur page max */
  --page-narrow: 1080px;
  --page-wide: 1600px;

  /* #region couleurs light */
  --html-text-color: var(--text-grey);
  --html-background: linear-gradient(150deg, var(--orange) -100%, var(--light-aubergine) 150%);
  --html-background-color: #993057;
  --main-background-color: white;
  --html-scrollbar-color: var(--mid-aubergine) #993057;
  --body-scrollbar-track: #993057;
  --code-background-color: #3a3a3a;
  --code-border: #444;
  --quote-background-color: var(--warm-grey);
  --quote-color: var(--text-grey);
  --quote-border: #807a73;
  --quote-pict-opacity: .4;
  --td-background-color: #eee;
  --check-background: #f9f9f9;
  --check-box-shadow: rgba(50, 50, 50, .5);
}
/*#endregion*/
/* #region couleurs dark */
@media screen {
  :root.dark {
    --html-text-color: white;
    --html-background: linear-gradient(150deg, #444 0%, #564641 60%,  #444 120%);
    --html-background-color: #4f4542;
    --main-background-color: var(--cool-grey);
    --html-scrollbar-color: var(--mid-aubergine) #4f4542;
    --body-scrollbar-track: #4f4542;
    --code-background-color: var(--text-grey);
    --code-border: #242424;
    --quote-background-color: #4b4443;
    --quote-color: white;
    --quote-border: #5d5655;
    --quote-pict-opacity: .1;
    --td-background-color: #222;
    --check-background: #555;
    --check-box-shadow: rgba(50, 50, 50, .8);
  }
}
/*#endregion*/
/*#endregion*/

/* #region FONT-FACES */
@font-face {
  font-family: ubuntu;
  src: url('../fonts/ubuntu-v15-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: ubuntu;
  src: url('../fonts/ubuntu-v15-latin-500.woff2') format('woff2');
  font-weight: bold;
}
@font-face {
  font-family: ubuntu;
  src: url('../fonts/ubuntu-v15-latin-500italic.woff2') format('woff2');
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: ubuntu;
  src: url('../fonts/ubuntu-v15-latin-italic.woff2') format('woff2');
  font-style: italic;
}

@font-face {
  font-family: ubuntu-mono;
  src: url('../fonts/ubuntu-mono-v10-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: font-awesome;
  src: url('../fonts/fa-solid-900.woff2') format('woff2');
}
/*#endregion*/

/* #region RESET */
*, ::before, ::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
img {
  display: block;
  max-width: 100%;
}
/*#endregion*/

/* #region GABARIT */
html {
  display: flex;
  align-items: center;
  flex-direction: column;
  background: var(--html-background);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--html-text-color);
  font-family: ubuntu, "Trebuchet MS", "Open Sans", sans-serif;
  /*** fix pour glitch android ***/
  background-color: var(--html-background-color);
}
body {
  /*** falkon fallback ***/
  max-width: var(--page-narrow);
  width: calc(100% - 2*var(--external-margin));
  max-width: min(100%);
  /*** fin falkon fallback ***/
  width: min(var(--page-narrow),calc(100% - 2*var(--external-margin)));
  box-shadow: 0 0 15px rgba(0,0,0,.4);
  transition: width .8s;
}
.wide body {
  /*** falkon fallback ***/
  max-width: var(--page-wide);
  width: 100%;
  max-width: min(100%);
  /*** fin falkon fallback ***/
  width: min(var(--page-wide), 100%);
}
main {
  background-color: var(--main-background-color);
  padding: var(--internal-margin);
  scroll-margin-top: calc(4.5rem + 1.2rem);
}
/*#endregion*/

/* #region ASCENSEURS */
html {
  scrollbar-color: var(--html-scrollbar-color);
}
::-webkit-scrollbar {
  width: calc(.6rem + 2px);
  height: calc(.6rem + 2px);
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-clip: padding-box;
  background-color: var(--mid-aubergine);
  border: 2px solid rgba(0, 0, 0, 0);
  border-radius: calc(.3rem + 2px);
}
body::-webkit-scrollbar-thumb {
  background-color: var(--mid-aubergine);
}
body::-webkit-scrollbar-track {
  background: var(--body-scrollbar-track);
}
body * {
  scrollbar-color: var(--mid-aubergine) transparent;
  scrollbar-width: thin;
}
/*#endregion*/

/* #region EDITORIAL */
*::selection {
  color: white;
  background: rgba(233, 84, 32, 0.99);
}
.dark *::selection {
  color: #3a3a3a;
}
body,
button,
input,
select,
optgroup,
textarea,
p,
pre,
blockquote {
  font-size: .9rem;
  line-height: 1.6em;
}
/* #region headers */
h1, h2, h3, h4, h5, h6 {
  color: var(--orange);
  font-family: ubuntu, "Trebuchet MS", "Open Sans", sans-serif;
  font-weight: bold;
  line-height: 1.4em;
  text-align: left;
}
h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
  margin-top: .5em;
}
h1 {
  font-size: 2rem;
  margin: 1.6em 0;
}
h2 {
  font-size: 1.55rem;
  margin: 1.3em 0;
}
h3 {
  font-size: 1.2rem;
  margin: 1.1em 0;
}
h4 {
  font-size: 1rem;
  margin: .9em 0;
}
h5 {
  font-size: 1rem;
  margin: .7em 0;
}
h6 {
  font-size: 1rem;
  margin: .5em 0;
}
/*#endregion*/
/* #region links */
a {
  color: var(--orange);
  transition: 0.2s;
  text-decoration: none;
}
a:hover {
  color: white;
  background-color: var(--orange);
}
/*#endregion*/
p {
  margin: .7em auto;
}
ul, ol {
  margin: .7em auto;
  padding-left: 1.2em;
  list-style: none;
}
/* #region lists */
li {
  position: relative;
}
li::before {
  opacity: .8;
  display: block;
  position: absolute;
  width: 1em;
  top: .1em;
  color: var(--orange);
}
ul > li::before {
  content: '•';
  left: -1em;
}
ol {
  counter-reset: li;
}
ol > li {
  counter-increment: li;
}
ol > li::before {
  content: counter(li);
  font-size: .8em;
  left: -1.8em;
  text-align: right;
  direction: rtl;
  font-weight: bold;
}
li > p:first-child {
  margin-top: 0;
}
/*#endregion*/
code {
  white-space: nowrap;
  padding: 0 .2rem;
}
pre, code {
  background-color: var(--code-background-color);
  color: white;
  font-family: ubuntu-mono, Consolas, Monaco, "Courier New", monospace;
}
pre {
  border-left: .5rem solid var(--code-border);
  overflow: auto hidden;
  white-space: pre;
}
blockquote {
  background-color: var(--quote-background-color);
  color: var(--quote-color);
  border-left: .5rem solid var(--quote-border);
  overflow: hidden;
}
pre, blockquote {
  position: relative;
  z-index: 1;
  padding: .8rem;
  margin: .7rem auto;
}
pre:before, blockquote:before {
  font-family: font-awesome;
  color: white;
  font-size: 4rem;
  padding-top: .7rem;
  transform: translateX(-.3rem);
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  position: sticky;
  display: block;
  float: left;
  z-index: -1;
  opacity: var(--quote-pict-opacity);
  content: "\f10e";
}
blockquote:before {
  content: "\f10e";
}
pre:before {
  opacity: 0.08;
  content: "\f120";
}
dfn, cite, em, i {
  font-style: italic;
}
address {
  margin: 0 0 1.5rem;
}
mark, ins {
  text-decoration: none;
  color: var(--orange);
}
abbr {
  text-decoration: underline rgba(125,125,125,.3) solid;
}
sup, sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
  font-size: .75em;
}
sub { 
  top: 0.4em; 
}
/* #region tables */
td {
  text-align: left;
  padding-right: 30px;
  vertical-align: top;
}
table {
  border-collapse: collapse;
}
th {
  background-color: var(--mid-aubergine);
  color: rgba(255,255,255,0.85);
  padding: 5px 10px;
  font-weight: normal;
  vertical-align: top;
}
td {
  padding: 5px 10px;
  background-color: var(--td-background-color);
}
hr {
  height: 1px;
  border-color: rgba(125,125,125,.3);
  border-style: solid none none;
  border-width: 1px 0 0;
  margin-top: 1rem;
}
/*#endregion*/
main section:not(:first-child) {
  margin-top: 2rem;
}
/*#endregion*/

/* #region FORMULAIRES */
fieldset {
  padding: var(--internal-margin);
  box-shadow: inset 0 0 1rem rgba(0,0,0,.2);
  border: none;
  margin-bottom: var(--internal-margin);
}
label {
  display: block;
}
legend {
  font-weight: bold;
  color: var(--orange);
  font-size: 1.1rem;
}
textarea, input, button, .button {
  font-family: ubuntu, "Trebuchet MS", "Open Sans", sans-serif;
}
button, input[type=submit], .button {
  background: var(--mid-aubergine);
  border: none;
  color: rgba(255,255,255,0.7);
  text-align: center;
  text-decoration: none;
  padding: .5rem .9rem;
  z-index: 2;
  cursor: pointer;
  transition: .2s;
  font-size: .8rem;
}
button:hover, input[type=submit]:hover, .button:hover {
  /*background: linear-gradient(170deg, var(--orange), var(--light-aubergine));*/
  background: var(--light-aubergine); 
  box-shadow: inset 0 3rem 2rem -2rem var(--orange);
  color: white;
}
textarea,
select,
input {
  display: block;
  background: linear-gradient(170deg, var(--light-aubergine) -100%, var(--orange) 300%);
  /*background-color: var(--warm-grey);*/
  box-shadow: inset 0 0 .7rem rgba(50, 50, 50, .5);
  border: none;
  margin: .7rem auto;
  max-width: 100%;
  width: 100%;
  padding: .5rem;
  color: white;
  outline: none;
}
textarea::placeholder, input::placeholder {
  color: rgba(255,255,255,.7);
}
textarea {
  min-height: 4rem;
}
/* #region select */
option {
  background-color: #666;
  color: #eee;
}
optgroup {
  background-color: #555;
  color: #bbb;
}
select::-webkit-scrollbar-track {
  background: #666;
}
select::-webkit-scrollbar {
  box-sizing: border-box;
  width: .4rem;
  height: .4rem;
}
select::-webkit-scrollbar-thumb {
  border-radius: .2rem;
}
select {
  scrollbar-color: var(--mid-aubergine) #666;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  background-image: url('/img/drop-down-white-transparent.svg'), linear-gradient(170deg, var(--light-aubergine) -100%, var(--orange) 300%);
  background-repeat: no-repeat;
  background-position: center right .5rem, top left;
}
select:hover {
  background-image: url('/img/drop-down-white.svg'), linear-gradient(170deg, var(--light-aubergine) -100%, var(--orange) 300%);
}
/*#endregion*/
/* #region checkbox, radio */
@supports(-webkit-appearance: none) or (-moz-appearance: none) {
  input[type='checkbox'], input[type='radio'] {
    --active: linear-gradient(170deg, var(--light-aubergine) -100%, var(--orange) 300%);
    --active-inner: #fff;
    --border: none;
    --background: var(--check-background);
    --disabled: #F6F8FF;
    --disabled-inner: #E1E6F9;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: .9rem;
    width: .9rem;
    outline: none;
    display: inline-block;
    vertical-align: top;
    position: relative;
    margin: .2rem 0 0 0;
    cursor: pointer;
    background: var(--b, var(--background));
    box-shadow: inset 0 0 .2rem var(--check-box-shadow);
  }
  input[type='checkbox']:after, input[type='radio']:after {
    content: '';
    display: block;
    left: 0;
    top: 0;
    position: absolute;
    transition: .5s;
    box-sizing: content-box;
  }
  input[type='checkbox']:checked, input[type='radio']:checked {
    --b: var(--active);
    --bc: var(--active);
  }
  input[type='checkbox']:disabled, input[type='radio']:disabled {
    --b: var(--disabled);
    cursor: not-allowed;
    opacity: .9;
  }
  input[type='checkbox']:disabled:checked, input[type='radio']:disabled:checked {
    --b: var(--disabled-inner);
    --bc: var(--border);
  }
  input[type='checkbox']:disabled + label, input[type='radio']:disabled + label {
    cursor: not-allowed;
  }
  input[type='checkbox'] + label, input[type='radio'] + label {
    display: inline-block;
    cursor: pointer;
    padding-left: .5rem;
  }
  input[type='checkbox']:after, input[type='radio']:after {
    opacity: 0;
  }
  input[type='checkbox']:checked:after, input[type='radio']:checked:after {
    opacity: 1;
  }
  input[type='checkbox']:after {
    left: calc(50% - .2rem);
    top: calc(50% - .4rem);
    width: .3rem;
    height: .5rem;
    border: 2px solid var(--active-inner);
    border-top: 0;
    border-left: 0;
    transform: rotate(var(--r, 20deg));
  }
  input[type='checkbox']:checked {
    --r: 43deg;
  }
  input[type='radio'] {
    border-radius: 50%;
  }
  input[type='radio']:after {
    left: calc(50% - .2rem);
    top: calc(50% - .2rem);
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: var(--active-inner);
  }
  input[type='radio']:checked {
    --s: .5;
  }
}
/*#endregion*/
/*#endregion*/

/* #region HEADER */
body > header {
  position: sticky;
  top: 0;
  z-index:100;
}
body > header:after {
  content:"";
  position:absolute;
  width:100%;
  bottom:1px;
  z-index:-1;
  transform:scale(.99);
  box-shadow: 0 0 8px 2px rgba(53, 42, 42, 1);
}
body > header a {
  color: white;
}
body > header a:hover {
  color: var(--text-grey);
}
body > header .topbar {
  background-color: var(--mid-aubergine);
  display: flex;
  justify-content: space-between;
  height: 4.5rem;
  align-items: center;
  position: relative;
  z-index: 120;
}
body > header .navbar {
  display: flex;
  background: linear-gradient(150deg, var(--dark-aubergine) -150%, var(--cool-grey) 200%);
}
body > header nav {
  display: flex;
}
body > header nav a, body > header .switcher {
  display: block;
  transition: color .4s, background-color .4s;
  color: rgba(220, 220, 220, .85);
  height: 3rem;
  line-height: 3rem;
}
body > header nav a {
  font-size: 1.1rem;
  padding: 0 .8rem;
}
body > header nav a:hover, body > header .switcher:hover {
  color: white;
}
body > header nav a:hover {
  background-color: var(--mid-aubergine);
}
#logo {
  width: 12rem;
  display: block;
  padding: 1rem;
}
a#logo:hover {
  background-color: transparent;
}
#logo img {
  width: 100%;
}
.navbar .download::before, .navbar .resellers:before {
  font-family: font-awesome;
  opacity: .7;
  padding: 0 .2rem;
}
.navbar .download:before {
  content: '\f019';
}
.navbar .resellers:before {
  content: '\f109';
}
/* #region switchers */
.navbar .switchers {
  align-items: center;
}
body > header .switcher:hover {
  background-color: transparent;
}
body > header .switchers {
  display: flex;
  flex-grow: 2;
  justify-content: flex-end;
  margin-right: var(--internal-margin);
}
body > header .switcher {
  padding: 0 .5rem;
  font-family: font-awesome;
  cursor: pointer;
}
#switcher-light {
  display: none;
}
#switcher-light::before {
  content: "\f185";
}
#switcher-dark::before {
  content: "\f186";
}
#switcher-wide {
  display: flex;
  align-items: center;
  width: 2rem;
  cursor: pointer;
}
#switcher-wide div {
  --size: .4rem;
  --color: rgba(220, 220, 220, .85);
  height: 0;
  width: 0;
  border-top: var(--size) solid transparent;
  border-bottom: var(--size) solid transparent;
  transition: .4s;
}
#switcher-wide:hover div {
  --color: white;
}
#switcher-wide div:first-child {
  border-right: var(--size) solid var(--color);
  margin-right: .1rem;
}
#switcher-wide div:last-child {
  border-left: var(--size) solid var(--color);
  margin-left: .1rem;
}
.wide #switcher-wide div:first-child {
  margin-right: -.5rem;
  margin-left: .55rem;
}
.wide #switcher-wide div:last-child {
  margin-right: .5rem;
  margin-left: -.45rem;
}
/*#endregion*/
/*#endregion*/

/* #region SANDWICH */
#sandwich {
  display: none;
  position: relative;
  width: 1.8rem;
  height: 1.8rem;
  margin-right: 1.5rem;
  cursor: pointer;
  flex-shrink:0;
}
#sandwich > div {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25%;
  background-color: rgba(255, 255, 255, .5);
  transition: 0.4s;
  pointer-events: none;
}
#sandwich > div:first-child {
  transform: translate(0, 25%) scale(.85, .5);
}
#sandwich > div:nth-child(2){
  transform: translate(0, 150%) scale(.85, .5);
}
#sandwich > div:last-child {
  transform: translate(0, 275%) scale(.85, .5);
}
.opened #sandwich > div:first-child {
  transform: translate(0, 150%) rotate(45deg) scale(1, .666);
}
.opened #sandwich > div:nth-child(2){
  opacity: 0;
}
.opened #sandwich > div:last-child {
  transform: translate(0, 150%) rotate(-45deg) scale(1, .666);
}
/*#endregion*/

/* #region CONTRÔLE SIDEBAR */
.sidebar-control {
  display: none;
  position: relative;
  background-color: rgba(255,255,255,0.3);
  cursor: pointer;
}
.sidebar-control:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 33%;
  height: 100%;
  background-color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: .4s;
}
.open .sidebar-control:after {
  width: 66%;
}
.topbar .sidebar-control {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  margin-right: 1rem;
  order: 3;
}
.topbar:before {
  content: '';
  order: 2;
  flex-grow: 2;
}
.topbar #logo {
  order: 1;
}
.topbar #sandwich {
  order: 4;
}
.navbar .sidebar-control {
  width: 1.4rem;
  height: 1.4rem;
  margin-left: 1rem;
}
/*#endregion*/

/* #region SPINNER */
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--half-aubergine);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}
/*#endregion*/

/* #region BREAKPOINTS */
@media (max-width: 1000px) {
  /** tablettes + smartphones **/
  body {
    margin: 0;
    width: 100%;
  }
  #switcher-wide {
    display: none;
  }
}
@media (max-width: 570px) {
  /** smartphone **/
  #sandwich {
    display: block;
  }
  body > header.opened .navbar {
    top: 4.5rem;
  }
  body > header .navbar {
    display: block;
    position: fixed;
    top: calc(-100vh + 8.8rem);
    width: 100%;
    height: calc(100% - 4.5rem);
    flex-direction: column;
    transition: .4s;
    z-index: 110;
    background: linear-gradient(150deg, var(--orange) -100%, var(--mid-aubergine) 150%);
  }
  body > header .navbar nav {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 4.5rem);
  }
  body > header .switchers {
    margin-right: 0;
    justify-content: center;
  }
  body > header nav a, header .switcher {
    color: white;
    font-size: 1.2rem;
  }
  body main * {
    scroll-margin-top: calc(4.5rem + 1.2rem);
  }
}
@media (min-width: 571px) {
  /** tout sauf smartphone **/
  body > header nav a.active {
    color: white;
    background: linear-gradient(170deg, var(--orange), var(--light-aubergine));
  }
}
@media (min-width: 571px) and (max-height: 800px) {
  /** smartphone paysage **/
  body > header {
    top: -4.5rem;
  }
  body main * {
    scroll-margin-top: calc(3rem + 1.2rem);
  }
}
/*#endregion*/

/* #region FIX ANCHOR OFFSET */
main * {
  scroll-margin-top: calc(4.5rem + 3rem + 1.2rem);
}
/*#endregion*/
