/* FONTS */
@font-face {
    font-family: 'Open Sans';
    src: local('Open Sans Regular'), local('OpenSans-Regular'), url('../font/open-sans/opensans-regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../font/open-sans/opensans-bold.ttf') format('truetype');
    font-style: bold;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: local('Open Sans Regular'), local('OpenSans-Regular'), url('../font/open-sans/opensans-italic.ttf') format('truetype');
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: local('Open Sans Light'), local('OpenSans-Light'), url('../font/open-sans/opensans-light.ttf') format('truetype');
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}

/* ROOT */
:root {
    --pink: #ff3860;
    --dark-grey: rgb(56,59,72);
    --grey: #222;
    --light-grey: #ccc;
    --black: #000;
    --white: #fff;
    --border-grey: #ccc;
    --menu-color: #fff;
   
}

[data-theme="dark"] {
    --pink: #ff3860;
    --dark-grey: rgb(56,59,72);
    --grey: #fff;
    --light-grey: #444;
    --black: white;
    --white: #222;
    --border-grey: #fff;
    --menu-color: rgb(56,59,72);  
}

html,
body {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    color: var(--grey);
    box-sizing: border-box;
    scroll-behavior: smooth;
    background-color: var(--white);
}

/* TITRES */
h1 {
    font-weight: 700;
    margin: 0 20px;
    line-height: 60px;
    color: var(--pink);
}

@media (max-width: 450px) {
	nav h1 {
		font-size: 1em;
	}
}

h2 {
    font-weight: 300;
    text-align: center;
    font-size: 2.2em;
    color: var(--pink);
}

h3 {
    color: var(--pink);
    text-align: center;
}

/* PARAGRAPHES */
p {
    text-align: justify;
}

.indentation {
    text-indent: 50px;
}

/* LIENS */
a {
    color: var(--black);
    cursor: pointer;
}

article:nth-child(odd) a {
    color: var(--grey);
}

/* ÉLÉMENTS */
main {
    position: relative;
    top: 60px;
}

header {
    padding: 20px 7% 50px 7%;
}

article {
    padding: 50px 7%;
}

iframe {
    border: none;
    margin: 0 auto;
}

/* YOUTUBE EMBED */
.youtube-embed {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}

.youtube-embed iframe {
    width: 100%;
}

/* ZONES GRISES */
article:nth-child(even),
article:nth-child(even) h3,
article:nth-child(even) a {
    background-color: var(--dark-grey);
    color: #fff;
}

/* IMAGES */
figure {
    text-align: center;
    width: 100%;
    margin: auto;
}

figure img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 0 auto;
}

figcaption {
    text-align: center;
    margin-top: 10px;
    padding-bottom: 10px;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: var(--menu-color);
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--grey);
    border-bottom: 1px solid var(--border-grey);
    height: 60px;
}

nav a {
    color: var(--black);
    text-decoration: none;
}

nav>div {
    display: flex;
    height: 100%;
    padding: 0 20px;
    text-align: center;
}

nav div div {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    height: 59px;
    z-index: 21;
    position: relative;
}

nav div div.selected {
    border-bottom: 2px solid var(--pink);
}

nav > div > div.selected > a {
    color: var(--pink);
}

nav > div > div:hover > a {
    color: var(--pink);
}

nav > div > div > a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

/* LOGO */
nav > div > a:first-child {
    display: none;
}

/* SOUS-MENUS */
nav div div div {
    display: none;
    position: absolute;
    top: 60px;
    flex-direction: column;
    width: 100%;
    min-width: 180px;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--light-grey);
    margin: 0;
    height: fit-content;
    padding: 10px;
    background-color: var(--menu-color);
}

nav div div:last-child div {
    right: 0;
    left: auto;
}

nav div div div a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    height: 1em;
    text-align: center;
    color: var(--black);
}

nav > div > div > div > a:hover {
    color: var(--pink);
}

nav div div:hover div {
    display: flex;
}

nav.displayed {
    display: flex;
}

/* MOBILE BAR */
.mobile-bar {
    display: none;
    height: 60px;
    width: 100vw;
    background-color: var(--menu-color);
    position: relative;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 12;
    border-bottom: 1px solid var(--border-grey);
}

.mobile-bar a svg {
    height: 40px;
    width: 40px;
}

.mobile-bar a svg path {
    fill: var(--black);
}

.mobile-bar a {
    position: absolute;
    top: 10px;
    left: 10px;
}

/* MENU MOBILE */
nav.displayed {
    animation: .2s fondu forwards, .7s leftAppear forwards;
}

nav.displayed div:first-child a:first-child {
    animation: 1s fondu;
}

@media (max-width: 700px) {
    nav {
        position: fixed;
        flex-direction: column;
        height: 100vh;
        width: 50%;
        display: none;
    }

    nav > div:first-child a:first-child {
        display: block;
        position: absolute;
        top: 27px;
        left: 15px;
    }

    nav > div:first-child a:first-child svg {
        height: 36px;
        width: 36px;
    }

    nav > div:first-child a:first-child svg path {
        fill: var(--black);
    }

    nav > div:first-child {
        height: fit-content;
        font-size: 1.5em;
        padding-top: 15px;
    }

    nav > div:last-child {
        padding: 50px 0;
        flex-direction: column;
        position: relative;
        align-items: center;
    }

    nav > div:last-child > div:first-child {
        position: absolute;
        bottom: 20px;
        order: 5;
    }

    nav > div > div:hover > div {
        display: none;
    }

    .mobile-bar {
        display: flex;
    }
}

@media (max-width: 500px) {
	nav {
		width: 70vw;
	}
	nav > div:first-child > a:first-child {
		left: 10px;
		top: 33px;
	}
	
	nav > div:first-child > a:first-child svg {
		width: 25px;
		height: 25px;

	}
}

@keyframes fondu {
    0% {
        opacity: 0;
    }
    
    100% {
        opacity: 1;
    }
}

@keyframes leftAppear {
    0% {
        width: 0%;
    }

    100% {
        width: 50%;
    }
}

@keyframes leftAppear700 {
    0% {
        width: 0%;
    }

    100% {
        width: 70%;
    }
}

/* PROGRESS SCROLL */
.progress-container {
    position: fixed;
    bottom: 0;
    z-index: 10;
    width: 100%;
    height: 4px;
    background: #ccc;
}

.progress-bar {
    transition: width 0.3s;
    height: 4px;
    background: var(--pink);
    width: 0%;
}

/* SCROLL TO TOP */
.scroll-to-top {
    position: fixed;
    height: 50px;
    width: 50px;
    bottom: 50px;
    right: 50px;
    z-index: 30;
    transition: opacity 0.5s;
    opacity: 0;
}

.scroll-to-top a {
    display: block;
    background-color: var(--pink);
    height: 50px;
    width: 50px;
    border-radius: 50%;
    position: relative;
}

.scroll-to-top svg {
    position: absolute;
    left: 10px;
    top: 10px;
    height: 30px;
    width: 30px;
}



/* FOOTER */
footer {
    padding: 50px 7%;
}

footer a {
    color: var(--pink);
}

/* 3D IMAGE */
.image-3d {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 50px;
}

.image-3d div {
    background-position: -75px;
    background-repeat: no-repeat;
    height: 300px;
    width: 350px;
    margin: 0 auto;
}

.coeur-3d {
    background-image: url('../img/coeur.png');
}

.cadenas-3d {
    background-image: url('../img/cadenas.png');
}

.watch-3d {
    background-image: url('../img/watch-3d.png');
}

@keyframes playHeart {
    0% {
        margin: 0;
    }

    100% {
        margin: 0 0 0 7%;
    }
}

@keyframes playReverseHeart {
    0% {
        margin: 0 0 0 7%;
    }

    100% {
        margin: 0;
    }
}

@keyframes playMobile {
    0% {
        background-position: -75px;
    }

    100% {
        background-position: -14500px;
    }
}

@keyframes playMobileReverse {
    0% {
        background-position: -14500px;
    }

    100% {
        background-position: -75px;
    }
}

@media (max-width: 700px) {
    .hidden-3d {
        animation: 0.5s playMobileReverse forwards steps(29);
    }

    .displayed-3d {
        animation: 0.5s playMobile forwards steps(29);
    }

    .hidden-3d.coeur-3d {
        animation: playMobileReverse 0.5s forwards steps(29), playHeartReverse 0.5s forwards;
    }

    .displayed-3d.coeur-3d {
        animation: playMobile 0.5s forwards steps(29), playHeart 0.5s forwards;
    }
}

@media (max-width: 400px) {
	.image-3d {
		display: none;
	}
}

/* CHECKBOX DARK MODE */
.checkbox {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.checkbox input {
  display: none;
}

.checkbox label {
  display: block;
  width: 45px;
  height: 24px;
  background: #CCC;
  border-radius: 3em;
  position: relative;
}

.checkbox label::before {
  position: absolute;
  top: 2px;
  left: 2px;
  display: block;
  content: "";
  height: 20px;
  width: 20px;
  background-color: #FFF;
  border-radius: 50%;

  transition: 0.2s left, 0.2s background;
}

.checkbox input:checked + label {
  background: var(--pink);
}

.checkbox input:checked + label::before {
  left: 22px;
}

.checkbox img {
    margin-right: 10px;
    width: 26px;
    height: auto;
}

/* SÉCURITÉ*/
.chiffrement-mobile {
    display: none;
}

@media screen and (max-width: 750px) {
    .chiffrement {
        display: none;
    }

    .chiffrement-mobile {
        display: block;
    }
}

/* APPLICATIONS */
.linear-regression {
    max-width: 500px;
}

[data-theme="dark"] .linear-regression img {
    display: none;
}

[data-theme="dark"] .linear-regression .dark {
    display: block;
}

.linear-regression img {
    display: none;
}

.linear-regression .light {
    display: block;
}

.google-fit img, .piconet img, .linear-regression img {
    max-width: 300px;
}

/* OBJETS */
#utilisation li {
    margin-top: 10px;
}