body, html{
  background-color: #e1e1de;
  font-family: "Montserrat-Medium", Helvetica, sans-serif;
  width: 100%;
  height: 100vh;
  margin: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  align-items: center;
  justify-content: center;
}

p {
  font-size: 20px;
  color: #000;
  margin: 0;
  padding: 0;
}

header, section, div {
  max-width: 100%;
  box-sizing: border-box;
}

.container {
  width: 100%;
  padding: 0 ;
  box-sizing: border-box;
}

/* ---------- HEADER ---------- */
.header {
  display: grid;
  grid-template-columns: auto 60% 10px;
  align-items: center;
  border-bottom: 3px solid black;
  padding: 2vh;
  width: 100%;
  box-sizing: border-box;
}

.text-wrapper {
  font-weight: 800;
  font-size: 25px;
}

.nav {
  font-weight: 500;
  font-size: 1.5rem;
  text-align: right;
}

.nav a {
  color: #000;
  text-decoration: none;
}

/* ----- ANIMATION FONT ---- */
.nav a:hover {
  animation: titre 1s infinite;
}

@keyframes titre {
  0%, 100% {
    font-family: "Goma", sans-serif;
    letter-spacing: 1px;
  }
  50% {
    font-family: "Blob", sans-serif;
    letter-spacing: -1px;
  }
}

/* ---------- HERO ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2vh;
  width: 100%;
  box-sizing: border-box;
}

.portfolio {
  text-align: left;
  font-weight: 800;
  margin-top: 10vh;
  margin-bottom: 2vh;
  overflow: hidden;
}

/* ----- ANIMATION FONT ---- */
/* ----- https://codepen.io/Juxtopposed/pen/OJrLZvb?editors=1100 ---- */
.key {
  font-size: 6.2rem;
  display: inline-block;
  letter-spacing: -1vw;
  transition: transform 0.2s;
}

@keyframes pressDown1 {
  30%, 40%, 100% {transform: translateY(0);}
  35% {transform: translateY(10px);}
}

@keyframes pressDown2 {
  70%, 80%, 100% {transform: translateY(0);}
  75% {transform: translateY(10px);}
}

@keyframes pressDown3 {
  30%, 40%, 100% {transform: translateY(0);}
  35% {transform: translateY(10px);}
}

@keyframes pressDown4 {
  40%, 50%, 100% {transform: translateY(0);}
  45% {transform: translateY(10px);}
}

@keyframes pressDown5 {
  20%, 30%, 100% {transform: translateY(0);}
  25% {transform: translateY(10px);}
}

@keyframes pressDown6 {
  60%, 70%, 100% {transform: translateY(0);}
  65% {transform: translateY(10px);}
}

@keyframes pressDown7 {
  10%, 20%, 100% {transform: translateY(0);}
  15% {transform: translateY(10px);}
}

@keyframes pressDown8 {
  35%, 45%, 100% {transform: translateY(0);}
  40% {transform: translateY(10px);}
}

.key:nth-child(1) {
  animation: pressDown1 2s infinite;
}

.key:nth-child(2) {
  animation: pressDown2 3s infinite;
}

.key:nth-child(3) {
  animation: pressDown3 4s infinite;
}

.key:nth-child(4) {
  animation: pressDown4 2.5s infinite;
}

.key:nth-child(5) {
  animation: pressDown5 2.5s infinite;
}

.key:nth-child(6) {
  animation: pressDown6 3.5s infinite;
}

.key:nth-child(7) {
  animation: pressDown7 2.2s infinite;
}

.key:nth-child(8) {
  animation: pressDown8 3.2s infinite;
}

.hero img {
  width: 100%;
  height: auto;
}

.name {
  margin: 5vh 0;
  text-align: right;
}

.name p:last-child {
  font-weight: 300;
  font-size: clamp(20px, 8vw, 55px);
  margin: 4vh 0;
}

/* ---------- PROJETS ---------- */
.projets {
  display: grid;
  grid-template-rows: auto 1fr;
  padding-left: 2vh;
  width: 100%;
  box-sizing: border-box;
}

.text-wrapper-projet {
  font-weight: 800;
  font-size: 45px;
  position: relative;
}

.text-wrapper-projet::after {
  content: "➔"; 
  position: absolute;
  right: 0;
  padding-right: 2vw;
  transform: translateY(-50%);
  font-size: 5rem;
  color: black;
  animation: arrow 1.8s infinite;
}

@keyframes arrow {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(0%); }
}

/* ----- HORIZONTAL ---- */
.swiper.projets-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-left: 1vh;
}

.swiper-wrapper {
  display: flex;
  align-items: center; 
}

.swiper-slide {
  flex-shrink: 0;
  width: 60vw !important; /* pour écraser le style de base */
  margin-right: 20vw !important;
  scroll-snap-align: start;
}

.coup-de-coeur {
  display: none;
}

.projet {
  width: 80%;
  position: relative; 
  display: inline-block; 
  justify-items: start;
  padding-left: 2vw;
  gap: 1rem;
}

.projet img {
  width: auto;
  height: 40vw;
  display: block;
  margin-top: 4vh;
}

.button-projet {
  width: 60%;
  font-size: clamp(15px, 1.5vw, 22px);
  padding: clamp(10px, 1vw, 20px) clamp(20px, 2vw, 40px);
  margin-top: 2vh;        
  z-index: 2;  
  border: 2px solid black;
  color: black;
  background: #e1e1de;
  box-shadow: 3px 3px 0px black;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-projet:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 15px 0px black;
}

/* ---------- À PROPOS ---------- */
.a-propos {
  position: relative;
  display: grid;
  gap: 2rem;
  padding: 2vh;
  margin-top: 5vh;
  margin-bottom: 5vh;
  width: 100%;
  box-sizing: border-box;
  z-index: 1;
}

.text-wrapper-propos {
  font-weight: 800;
  font-size: 45px;
}

.a-propos-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.a-propos-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.a-propos-text p {
  font-weight: 300;
  font-size: 20px;
  text-align: right;
}

.a-propos-text .logiciels {
  text-align: right;
}

.logiciels img {
  width: 10%;
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.logiciels img:last-child {
  width: 8%;
}

.logiciels img:hover {
  filter: grayscale(0%);
  transform: translate(-2px, -2px);
  transition-delay: 0.1s;
}

.portrait {
  display: none;
}

/* ---------- COMPETENCES ---------- */
.competences {
  position: relative;
  background-color: #000;
  color: #fff;
  padding: 10vh 5vw;
  align-items: start;
  z-index: 2;
}

.competences-content {
  display: grid;
  grid-template-rows: auto auto auto;
  margin: 0 4vw 0 4vw;
}

.competence-item h3 {
  font-weight: 800;
  font-size: 45px;
  margin-bottom: 1rem;
  color: #ffffff;
  text-align: right;
}

.competence-item p {
  font-weight: 300;
  font-size: 20px;
  text-align: right;
  line-height: 1.6;
  color: #dcdcdc;
  text-align: right;
}

.competence-item:last-of-type {
  grid-area: 2/1/3/2;
}

.competences button {
  margin-top: 5vh;
  justify-self: right;
}

.button-cv {
  width: 40%;
  font-size: clamp(15px, 1.5vw, 22px);
  padding: clamp(10px, 1vw, 20px) clamp(20px, 2vw, 40px);          
  z-index: 2;  
  border: 2px solid white;
  color: white;
  background: black;
  box-shadow: 3px 3px 0px white;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-cv:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px white;
}

/* ---------- CONTACT ---------- */
.contact {
  display: grid;
  grid-template-columns: 35% 1fr;
  grid-template-rows: 1fr 1fr 10% 1fr;
  gap: 1rem;
  padding: 2vh;
  margin-top: 2vh;
  border-bottom: 3px solid black;  
  width: 100%;
  box-sizing: border-box;
}

.text-wrapper-contact {
  font-weight: 800;
  font-size: 45px;
  margin-bottom: 1vh;
}

.contact p:first-of-type {
  font-weight: 500;
  font-size: clamp(25px, 6vw, 50px);
  margin-bottom: 5vh;
  grid-area: 2/1/3/3;
}

.contact p:last-of-type {
  font-weight: 300;
  font-size: clamp(20px, 6vw, 40px);
  text-align: right;
  grid-area: 3/1/3/3;
}

.mail {
  font-weight: 800;
  font-size: clamp(20px, 6vw, 60px);
  text-align: right;
  text-transform: uppercase;
  grid-area: 4/1/4/3;
}

.espace {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 10vh;
  overflow-x: hidden;
}

.espace p {
  grid-area: 1/2/2/3;
  align-self: center;
  text-align: center;
  font-size: small;
}

.espace a {
  grid-area: 1/3/2/3;
  align-self: center;
  text-align: right;
  padding-right: 2vh;
  color: #000;
  font-weight: 500;
  font-size: x-small;
  text-decoration: none;
}

/* ---------- CURSEUR ---------- */

.cursor {
  position: fixed;
  pointer-events: none;
  width: 80px;
  height: 80px;
  background-color: black;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: sans-serif;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.1s ease, opacity 0.2s ease;
}

/* ---------- MOBILE ---------- */
@media (max-width: 390px) {

  .key {
    font-size: 5rem;
  }

  .projets {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 2vh 2vh;
    margin-bottom: 10vh;
  }

  .coup-de-coeur {
    display: none;
  }

  /* Désactivation du Swiper */
  .swiper.projets-container {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .swiper-wrapper {
    flex-direction: column;
    align-items: center;
    height: auto;
  }

  .swiper-slide {
    width: 100% !important;
    margin-bottom: 4rem;
  }

  .projet {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    position: relative;
  }

  .projet img {
    width: 80%;
    height: auto;
  }

  .button-projet {
    width: 50%;
    position: absolute;
    bottom: -30px;
    left: 45%;           
    z-index: 2;  
  }

  .portrait {
    display: none;
  }
}

/* ---------- GRAND ÉCRAN ---------- */
@media (min-width: 1000px) {

  .hero {
    grid-template-columns: 33% auto 33%;
    grid-template-rows: 20% auto auto auto;
    align-items: center;
    gap: 0.5rem;
  }

  .portfolio {
    grid-area: 1/1/4/4;
  }

  .key {
    font-size: 14rem;
  }

  .name {
    text-align: right;
    grid-area: 4/1/4/4;
  }

  .coup-de-coeur {
    display: unset;
    color: #e63946;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.6vw;
    margin-left: 1vw;
    animation: pulse 1.8s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1 }
    50% { opacity: 0.5 }
  }

  .swiper-slide {
    margin-right: 12vw !important;
  }
  
  .button-projet {
    width: 30vw;
    bottom: 10px;
    left: 60%;  
  }

  .a-propos-content {
    grid-template-columns: 1fr 1fr;
  }

  .a-propos-text p {
    text-align: right;
    font-size: 35px;
  }

  .a-propos .portrait {
    display: unset;
    width: 80%;
    height: auto;
    justify-self: end;
    filter: grayscale(100%);
    border: 2px solid black;
    box-shadow: 3px 3px 0px black;
  }

  .competences {
    grid-template-columns: 5% 3fr;
  }

  .competence-item p {
    font-size: 35px;
  }

  .text-wrapper-projet,
  .text-wrapper-propos,
  .text-wrapper-contact {
    font-size: 70px;
  }
}

/* ---------- TRÈS GRAND ÉCRAN ---------- */
@media (min-width: 1175px) {

  .hero {
    padding: 0vh 4vh 2vh 4vh;
  }

  .name {
    margin: 0;
    grid-area: 4/1/4/4;
  }

  .name p:last-child {
    margin-bottom: 20vh;
  }
  
  .projets {
    gap: 1rem;
    height: auto;
  }

  .swiper-slide {
    margin-right: -12vw !important;
  }
  
  .projet img {
    height: 22vw;
  }

  .button-projet {
    width: 20vw;
  }

  .contact {
    padding: 0 8vw 0 8vw;
  }

  .a-propos-content {
    grid-template-columns: 60% 1fr;
  }

  .a-propos-text p {
    text-align: right;
    font-size: 50px;
  }

  .a-propos .portrait {
    width: 60%;
    margin-right: 30%;
  }

  .logiciels {
    margin-bottom: 10vh;
  }

  .competence-item {
    margin-bottom: 10vh;
  }

}
