/* ==========================================================================
   Variables
   ========================================================================== */

:root {
  --primary: #7c49d8;
  --primary-dark: #5726af;
  --primary-light: #a988e6;
  --white: #fff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-700: #495057;
  --black: #000;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-heading: "Saira Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

  --sidebar-width: 17rem;
}

/* Breakpoints : 576px (2 colonnes de compétences), 768px (dates à droite), 992px (barre latérale) */

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--gray-100);
  background-color: var(--black);
}

@media (min-width: 992px) {
  body {
    padding-left: var(--sidebar-width);
  }
}

h1,
h2,
h3,
h5 {
  margin-top: 0;
  margin-bottom: .5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--gray-200);
}

h1 {
  margin-bottom: 0;
  font-size: 6rem;
  line-height: 5.5rem;
}

h2 {
  margin-bottom: 3rem;
  font-size: 3.5rem;
}

h3 {
  font-size: 2rem;
}

h5 {
  font-size: 1.25rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

a:hover,
a:focus,
a:active {
  color: var(--primary-dark);
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.text-primary {
  color: var(--primary);
}

.lead {
  font-size: 1.15rem;
}

.subheading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
}

.icon {
  display: inline-block;
  width: auto;
  height: 1em;
  overflow: visible;
  vertical-align: -.125em;
  fill: currentColor;
}

/* ==========================================================================
   Écran de chargement
   ========================================================================== */

.loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--black);
  transition: opacity .4s ease-in-out, visibility .4s;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  margin: 0 0 .5rem;
  font: 700 1.5rem/1.2 sans-serif;
  text-transform: uppercase;
  color: var(--gray-200);
}

/* ==========================================================================
   Navigation : barre du haut en mobile, barre latérale à partir de 992px
   ========================================================================== */

.sidenav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1rem;
  background-color: var(--primary);
}

.sidenav-avatar {
  display: block;
  border-radius: 50%;
}

.sidenav-avatar--small {
  background-color: var(--white);
}

.sidenav-avatar--large {
  display: none;
  max-width: 10rem;
  max-height: 10rem;
  margin-bottom: .5rem;
  filter: grayscale(50%);
}

.sidenav-toggler {
  padding: .25rem .75rem;
  font-family: inherit;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .25rem;
}

.sidenav-toggler:focus:not(:focus-visible) {
  outline: 0;
}

.sidenav-toggler:focus-visible {
  outline-color: var(--primary-light);
}

.sidenav-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") center / 100% 100% no-repeat;
}

.sidenav-menu {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidenav-link {
  display: block;
  padding: .5rem 0;
  font-weight: 800;
  letter-spacing: .05rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.sidenav-link:hover,
.sidenav-link:focus {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
}

.sidenav-link.active {
  color: var(--white);
}

@media (max-width: 991.98px) {
  .sidenav-brand {
    margin-right: 1rem;
  }

  /* Menu replié : la hauteur s'anime de 0 à son contenu */
  .sidenav-collapse {
    display: grid;
    flex-basis: 100%;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows .35s ease, visibility .35s;
  }

  .sidenav.is-open .sidenav-collapse {
    grid-template-rows: 1fr;
    visibility: visible;
  }

  .sidenav-menu {
    overflow: hidden;
  }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .sidenav-collapse {
    transition: none;
  }
}

@media (min-width: 992px) {
  .sidenav {
    right: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: var(--sidebar-width);
    height: 100vh;
    text-align: center;
  }

  .sidenav-brand {
    margin: auto auto 0;
    padding: .5rem;
  }

  .sidenav-avatar--small,
  .sidenav-toggler {
    display: none;
  }

  .sidenav-avatar--large {
    display: block;
  }

  .sidenav-collapse,
  .sidenav-menu {
    width: 100%;
  }

  .sidenav-collapse {
    margin-bottom: auto;
  }

  .sidenav-link {
    padding: .5rem;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.resume-section {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 5rem 1rem;
}

@media (min-width: 992px) {
  .resume-section {
    padding: 3rem;
  }
}

.resume-section-content {
  width: 100%;
}

.about .subheading,
.about .lead {
  margin-bottom: 3rem;
}

.social-icons a {
  display: inline-block;
  width: 3.5rem;
  height: 3.5rem;
  margin-right: 1rem;
  font-size: 1.5rem;
  line-height: 3.5rem;
  text-align: center;
  color: var(--white);
  background-color: var(--gray-700);
  border-radius: 100%;
}

.social-icons a:last-child {
  margin-right: 0;
}

.social-icons a:hover {
  background-color: var(--primary);
}

/* Expériences et formations */

.resume-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-item h3 {
  margin-bottom: 0;
}

.resume-item .subheading {
  margin-bottom: 1rem;
}

.resume-date {
  font-weight: 700;
  color: var(--primary);
}

@media (min-width: 768px) {
  .resume-item {
    flex-direction: row;
  }

  .resume-date {
    min-width: 18rem;
    text-align: right;
  }
}

/* Compétences */

.skills {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill {
  width: 100%;
  margin-bottom: 3rem;
  padding-right: 3rem;
}

@media (min-width: 576px) {
  .skill {
    width: 50%;
  }
}

.skill-label {
  margin: 1rem 0;
}

.skill-icon {
  margin-right: 1rem;
  font-size: 3rem;
}

.skill-name {
  display: inline;
}

.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  background-color: var(--gray-200);
  border-radius: .25rem;
}

.progress-bar {
  background-color: var(--primary);
}

/* ==========================================================================
   Animations d'apparition au défilement (voir js/app.js)
   ========================================================================== */

h2.reveal {
  opacity: 0;
  transform: translateX(30px);
}

h2.reveal-visible {
  opacity: 1;
  transform: translateX(0);
  transition: .7s cubic-bezier(.37, .03, .61, .96);
}

.progress-bar.reveal {
  width: 0;
}

.progress-bar.reveal-visible {
  width: 100%;
  transition: 1.2s cubic-bezier(.37, .03, .61, .96);
}

/* ==========================================================================
   Impression
   ========================================================================== */

@media print {
  body {
    padding-left: 0;
  }

  .loader,
  .sidenav {
    display: none;
  }
}
