* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*::selection {
  background: var(--primary-color);
  color: var(--background-color);
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

/* Colors */

:root {
  --primary-color: #4bff96;
  --secondary-color: #0ceb69;
  --accent-color: #18c761;
  --background-color: #101014;
  --text-color: #fffdf5;
}

/* Fonts */

@font-face {
  font-family: 'Eras-Bold';
  src: url('../fonts/eras-itc-bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Eras-Demi';
  src: url('../fonts/ITCErasStd-Demi.ttf') format('truetype');
}

@font-face {
  font-family: 'Eras-Medium';
  src: url('../fonts/ITCErasStd-Medium.ttf') format('truetype');
}

/* Span */

span {
  color: var(--primary-color);
  font-weight: bold;
  text-shadow: #0ceb69 0px 0px 6px;
}

/* Animations */

@keyframes slide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Style général */

body {
  background-color: var(--background-color);
  color: var(--text-color);
}

::-webkit-scrollbar {
  display: none;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

h1,
h2 {
  font-family: 'Eras-Bold', sans-serif;
}

h3,
h4 {
  font-family: 'Eras-Demi', sans-serif;
}

p {
  font-family: 'Eras-Medium', sans-serif;
}

main {
  height: auto;
}

/* Header */

header {
  position: relative;
  text-align: center;
  height: 100vh;
  background: var(--background-color);
  overflow: hidden;
  z-index: auto;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* NavBar */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(16, 16, 20, 0.42);
  /* correspond à #101014 */
  backdrop-filter: blur(10px);
  z-index: 9999;
}

.burger {
  display: none;
}

nav img {
  height: 50px;
  margin: 1.2% 10%;
  float: left;
}

nav img:hover {
  cursor: pointer;
  transform: scale(1.05);
  transition: transform 0.3s;
}

nav ul {
  display: flex;
  list-style: none;
  float: right;
  margin: 1.2% 10%;
  padding: 0;
  align-items: center;
  height: 50px;
}

nav ul li {
  margin-left: 60px;
  font-family: 'Eras-Demi', sans-serif;
  font-size: 1.3rem;
  transition: color 0.3s;
  color: var(--text-color);
}

nav ul li a {
  text-decoration: none;
  color: inherit;
}

nav ul li a:hover {
  color: var(--primary-color);
  text-shadow: #0ceb69 0px 0px 6px;
  cursor: pointer;
  margin-left: 6%;
  transition: color 0.3s, margin-left 0.3s;
}

/* Soulignage nav */

nav ul li::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
  margin-left: 6%;
  margin-top: 6%;
  box-shadow: #0ceb69 0px 0px 10px;
}

nav ul li:hover::after {
  width: 100%;
  padding: 0 2%;

}

/* Footer */

footer {
  text-align: center;
  padding: 2%;
  background-color: rgba(16, 16, 20, 0.42);
  /* correspond à #101014 */
  backdrop-filter: blur(10px);
  color: var(--text-color);
  font-family: 'Eras-Medium', sans-serif;
  margin-top: 8%;
}

#footer-separation {
  width: 69%;
  height: 2px;
  margin: 0 auto 4% auto;
  background: var(--primary-color);
  box-shadow: #0ceb69 0px 0px 12px;
}

footer p {
  margin: 1% 0;
  font-size: 1.4rem;
}

#footer-copyright {
  margin-top: 3%;
  font-size: 1rem;
  color: var(--text-color);
}

footer span {
  color: var(--primary-color);
  font-weight: bold;
  text-shadow: #0ceb69 0px 0px 6px;
  font-size: 2rem;
}

footer img {
  width: 52px;
  margin: 0 1.2%;
  transition: transform 0.3s;
}

footer img:hover {
  transform: scale(1.2);
  cursor: pointer;
  transition: transform 0.3s;
}

/* Titre */

#titreHeader {
  position: absolute;
  margin-top: 12%;
  z-index: 1;
  color: var(--primary-color);
  font-family: 'Eras-Bold', sans-serif;
}

#titreHeader h1 {
  font-size: 4.7rem;
  text-shadow: #0ceb69 0px 0px 6px;
  margin-bottom: 6%;
}

#titreHeader h2 {
  color: var(--text-color);
  font-size: 2.7rem;
}

#titreHeader h3 {
  color: var(--text-color);
  font-size: 1.6rem;
  margin-top: 6%;
}

#titreHeader button {
  margin-top: 8%;
  padding: 1.1% 2.2%;
  font: 1.2rem 'Eras-Demi', sans-serif;
  background-color: var(--primary-color);
  color: var(--background-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, margin-left 0.3s;
}

#titreHeader button:hover {
  box-shadow: #0ceb69 0px 0px 12px;
  margin-left: 3%;
  background-color: var(--secondary-color);
  transition: background 0.3s, margin-left 0.3s;
}

#titreHeader button a {
  text-decoration: none;
  color: inherit;
}

/* Main */

/* Timeline*/

#timeline h2 {
  position: absolute;
  left: 0;
  margin: 16% 0;
  font-size: 5.4rem;
  z-index: 2;
  transform: rotate(-90deg);
  text-shadow: #fffdf5 0px 0px 3.6px;
  text-align: right;
}

/* Conteneurs de la timeline */

#timeline {
  margin: 4% 0;
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.timeline-wrapper {
  display: flex;
  position: relative;
  width: max-content;
  padding-left: 16rem; /* ↓ ancien 24rem, trop large */
  padding-right: 20%;  /* ↓ ancien 32%, trop large */
}
/* Ligne de temps */

.timeline-line {
  position: absolute;
  margin-top: 12.4%;
  left: 0;
  width: 100%;
  height: 4px;
  box-shadow: #0ceb69 0px 0px 12px;
  background: var(--primary-color);
  transform: translateY(-50%);
  z-index: 0;
}

/* Cartes */

.timeline-card {
  position: relative;
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  background-color: var(--background-color);
  min-width: 420px;
  max-width: 420px;
  max-height: fit-content;
  padding: 2% 2%;
  will-change: transform;
  transform-origin: center center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 8;
  overflow: hidden;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 12px #0ceb69;
  /* important pour contenir le texte déroulant */
}

.timeline-card:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px var(--primary-color);
  cursor: pointer;
  z-index: 9;
}

/* Alternance Haut/Bas */

.timeline-card.odd {
  margin: 6% 2%;
}

.timeline-card.even {
  margin: 18% 2%;
}

/* ---- */

.timeline-card h3 {
  font-size: 1.6rem;
  margin-bottom: 6%;
  color: var(--primary-color);
}

.timeline-card p {
  font-size: 0rem;
  line-height: 1.2;
  hyphens: auto;
  text-align: justify;  
}

.timeline-card:hover p {
  font-size: 1rem;
  transition: font-size 0.3s;
}

.timeline-date {
  font-size: 1rem;
  margin-bottom: 4%;
  font-family: "Eras-Medium", sans-serif;
}

.timeline-card img {
  width: 40px;
  float: right;
}

#timeline,
.timeline-wrapper {
  overflow: visible;
}

/*******Défilement infini de logos**********/

#logoSlider {
  overflow: hidden;
  background: #242323bb;
  box-shadow: 0 0 32px var(--primary-color);
  white-space: nowrap;
  padding: 1.2% 0;
  position: relative;
  user-select: none;
  margin-top: -2%;
  z-index: 1;
}

#logoSlider:before,
#logoSlider:after {
  position: absolute;
  top: 0;
  width: 500px;
  height: 100%;
  content: '';
  z-index: 2;
}

#logoSlider:before {
  left: 0;
  background: linear-gradient(to right, #1b1b1b, transparent);
}

#logoSlider:after {
  right: 0;
  background: linear-gradient(to left, #1b1b1b, transparent);
}

#logo-slide {
  animation: 30s slide infinite linear;
  display: inline-block;
}

#logo-slide img {
  height: 52px;
  margin: 0 36px;
}

/* Compétences Section */

#competencesLink {
  margin-top: 2.6%;
}

#competences {
  position: relative;
  overflow: visible;
  height: auto;
  margin: 8% 8% 0 8%;
  z-index: 10;
  isolation: isolate;
}

#competences h2 {
  font-size: 4.2rem;
  margin-bottom: 6%;
  text-align: center;
  text-shadow: #fffdf5 0px 0px 3.6px;
}

.competences-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3%;
  position: relative;
  overflow: visible;
  z-index: 0;
}

.competence {
  position: relative;
  background-color: #1b1b1b;
  border: 1px solid var(--primary-color);
  margin: 2% 0;
  border-radius: 24px;
  width: 460px;
  padding: 2% 2%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 12px #0ceb69;
  transition: background-color 0.3s, box-shadow 0.3s;
  z-index: 1;
}

.competence:hover {
  box-shadow: 0 0 25px var(--primary-color);
  cursor: pointer;
  z-index: 999;
}

.competence img {
  width: 100%;
  border-radius: 24px;
  margin-bottom: 4%;
}

.competence:hover img {
  width: 0;
  transition: width 0.3s;
}

.competence h3 {
  text-align: center;
  font-size: 2.2rem;
  align-items: center;
  transition: font-size 0.3s, text-align 0.3s, color 0.3s;
}

.competence:hover h3 {
  text-align: left;
  margin-bottom: 2%;
  font-size: 1.8rem;
  transition: font-size 0.3s, text-align 0.3s, color 0.3s;
  color: var(--primary-color);
}

.competence p {
  font-size: 0rem;
  line-height: 1.3;
  hyphens: auto;
  text-align: justify;
  margin-bottom: 2%;
}

.competence:hover p {
  font-size: 1.1rem;
  transition: font-size 0.2s;
}

.competence strong {
  color: var(--primary-color);
}

/* ------------- Page PROJETS ------------- */

/* Header */

#headerProjets {
  height: 50vh;
  background-image: url('../img/projectBG.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 32px #000000;
}

#headerProjFilter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(16, 16, 20, 0.29);
  z-index: 1;
}

#headerProjets h2 {
  margin-top: 69%;
  font-size: 4.6rem;
  width: 100%;
  height: 100%;
  color: var(--text-color);
  text-shadow: #101014 0px 0px 8px;
  z-index: 2;
}

#imgfondHeader {
  width: 100%;
  object-fit: cover;
  filter: brightness(0.4);
  z-index: 1;
}

/* SECTION PROJETS */
#projets {
  padding: 6% 10%;
  background-color: var(--background-color);
}

.projets-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Chaque bloc projet */
.projet-row {
  display: grid;
  grid-template-columns: 60% 40%;
  /* 👈 Carte 60% / Image 40% */
  gap: 2rem;
  align-items: center;
}

/* Pour inverser l'ordre des colonnes sur les projets pairs */
.projet-row.right {
  direction: rtl;
}

.projet-card {
  background-color: var(--background-color);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 2.6rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.projet-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--primary-color);
}

.projet-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-shadow: #0ceb69 0px 0px 4px;
}

.projet-card p {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
}

.projet-card .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  font: 1.1rem 'Eras-Demi', sans-serif;
  background-color: var(--primary-color);
  color: var(--background-color);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s, margin-left 0.3s, box-shadow 0.3s;
}

.projet-card .btn:hover {
  background-color: var(--secondary-color);
  margin-left: 2%;
  transition: background 0.3s, margin-left 0.3s, box-shadow 0.2s;
  box-shadow: #0ceb69 0px 0px 8px;
  cursor: pointer;
}

.projet-row img {
  width: 82%;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  transition: transform 0.3s;
}

.projet-row img:hover {
  transform: scale(1.26);
  transition: transform 0.3s;
  box-shadow: 0 0 25px var(--primary-color);
}

.categorie-titre {
  text-align: center;
  font-size: 2rem;
  margin: 6rem 0 2rem;
  color: var(--primary-color);
  text-transform: uppercase;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 0.3rem;
  text-shadow: #0ceb69 0px 0px 6px;
}

/* Filtre par compétences */

#projets label {
  font-family: 'Eras-Medium', sans-serif;
  font-size: 1.2rem;
  margin-right: 1.5rem;
  color: var(--text-color);
}

#projets select {
  font-family: 'Eras-Medium', sans-serif;
  font-size: 1.1rem;
  padding: 0.4rem;
  border-radius: 6px;
  border: 2px solid var(--primary-color);
  background-color: var(--background-color);
  color: var(--text-color);
  box-shadow: #0ceb69 0px 0px 6px;
}

#projets select:hover {
  box-shadow: #0ceb69 0px 0px 12px;
  cursor: pointer;
  transition: box-shadow 0.3s;
}