
html{
  font-family: "Poppins", sans-serif;
  overflow-x:hidden;
}

h2{
 justify-self: center;
}

.btn-cv {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #333;
  color: white;
  padding: 15px 30px; 
  font-size: 18px; 
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.btn-cv:hover {
  background-color: #2980b9;
}


body {
  line-height: 1;
  color: #fff;
  background-color: #1D1C22; 
  background-image: url('../img/header3.jpg');
  background-attachment: fixed;
  background-size: cover;
  margin : 0;
}

.competence_grid{
  display : flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1100px;
  justify-content: center;
}

section {
    margin-bottom: 100px; 
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; 
  background: linear-gradient(to bottom, rgba(29, 28, 34, 0) 20%, #1D1C22 30%);
}

.boxed {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}


.text {
  display: flex;
  flex-direction: column; 
  margin-top: 200px; 
}

.profile {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
}

.profile img {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  margin-right: 50px; 
  margin-top: 200px;
}

.profile h1 {
  font-weight: bold;
  font-size: 80px;
  margin: 0; 
}

.profile h2 {
  font-weight: bold;
  font-size: 50px;
  margin: 0; 
  margin-top: 10px; 
}

.profile h3 {
  font-weight: bold;
  font-size: 50px;
  margin: 0; 
  margin-top: 10px;
  margin-left: 300px; 
}


.infos {
  position: fixed;
  left: 20px; 
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px; 
  z-index: 9999; 
}

.infos a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
  padding: 10px;
  background-color: #333;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease, width 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
  font-size: 0px;
}

.infos a:nth-child(1) { background-image: url('../img/moi.png'); }
.infos a:nth-child(2) { background-image: url('../img/competence.png'); }
.infos a:nth-child(3) { background-image: url('../img/projet.png'); }
.infos a:nth-child(4) { background-image: url('../img/certif.png'); }
.infos a:nth-child(5) { background-image: url('../img/formation.png'); }
.infos a:nth-child(6) { background-image: url('../img/contact.png'); }


.infos a span {
  opacity: 0;
  width: 0;
  display: block; 
  text-align: center;
  transition: opacity 0.3s ease, width 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  visibility: hidden; 
}


.infos a:hover {
  width: 120px;
  background-image: none;
  background-color: #6C5CE7;
  justify-content: center;
  padding-left: 0;
  font-size: 12px;
}

.infos a:hover span {
  opacity: 1;
  width: auto;
  display: inline-block;
  text-align: center;
  visibility: visible; 
}

.Apropos {
  width: 100%;
  min-height: 400px;
  position: relative;
  z-index: 2;
  padding-top: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
}

.Apropos .boxed {
  display: flex;
  flex-direction: row;
  align-items: center; 
  max-width: 900px;
  width: 90%;
}

.Apropos img {
  width: 250px; 
  border-radius: 10px;
  margin-top : 200px;
  margin-right: 50px; 
  object-fit: cover;
  display: block;
}

.Apropos .text {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center; 
}


.Apropos p {
  font-size: 18px;
  line-height: 1.6;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.card {
  width: 200px;
  height: 250px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card-front {
  background: #333;
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.card-back {
  background: #333;
  color: #fff;
  transform: rotateY(180deg);
  font-size: 14px;
}

.card-front::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(8px); 
  opacity: 0.5; 
  border-radius: 10px;
}

.card:nth-child(1) .card-front::before {
  background-image: url('../img/HTML5.png');
}

.card:nth-child(2) .card-front::before {
  background-image: url('../img/CSS3.png');
}

.card:nth-child(3) .card-front::before {
  background-image: url('../img/javascript.png');
}
.card:nth-child(4) .card-front::before {
  background-image: url('../img/php-icon.svg');
}
.card:nth-child(5) .card-front::before {
  background-image: url('../img/mysql-icon.svg');
}
.card:nth-child(6) .card-front::before {
  background-image: url('../img/wordpress-icon.svg');
}

.card:nth-child(7) .card-front::before {
  background-image: url('../img/symfony-icon.svg');
}

.card:nth-child(8) .card-front::before {
  background-image: url('../img/C.png');
}
.card:nth-child(9) .card-front::before {
  background-image: url('../img/python-icon.svg');
}

.project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.project-card {
    width: 300px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 20px;
}

.project-card img {
    width: 100%;
    height: auto;
    border-bottom: 2px solid #ddd;
}

.project-card h3 {
    margin: 10px 0;
    font-size: 1.5em;
}

.project-card p {
    font-size: 1em;
    color: #666;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    cursor: pointer;
}

.project-card:nth-child(3) img {
  filter: blur(5px);
}


.formation {
    text-align: center;
    padding: 50px 20px;
}


.subtitle {
    font-style: italic;
    color: #666;
    margin-bottom: 40px;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.timeline-item .timeline-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.timeline-item .timeline-icon img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.timeline-item .timeline-content {
  width: 50%;
  padding: 20px;
  background: #222; 
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
  color: #fff;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.certification-grid {
  display: flex;
  gap: 20px;
  justify-items: center;
  margin-top: 20px;
}

.certification-card {
  background: #333;
  padding: 20px;
  width:  250px;
  max-width: 100%;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.certification-card:hover {
  transform: translateY(-5px);
}


.project-card img, .certification-card img {
  width: 100%;
  height: 200px; 
  object-fit: cover;
  border-radius: 8px; 
}

.certification-card img {
  width: 100%;
  height: 120px; 
  object-fit: contain; 
  margin-bottom: 15px; 
}

.certification-card h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 5px;
}

#Competence h2 a {
  color: inherit;         
  text-decoration: none;  
}

.certification-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.project-content {
  flex-grow: 1;
}

.voir-plus {
  background: #6C5CE7;
  color: white; 
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: auto; 
  align-self: center; 
}

.voir-plus:hover {
  background: #5946d2; 
}

.modal-content img {
  width: 60%; 
  height: auto;
  display: block;
  margin: 20px auto; 
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #666;
  padding: 20px;
  width: 50%;
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.contact-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 80px 20px;
  background: linear-gradient(to bottom, rgba(29, 28, 34, 0.8), #1D1C22);
}

.contact-container {
  background: #222;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  width: 400px;
  text-align: center;
}

.contact-container h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #6C5CE7;
}

.contact-container input,
.contact-container textarea {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: none;
  border-radius: 5px;
  background: #333;
  color: white;
  font-size: 16px;
}

.contact-container textarea {
  height: 120px;
  resize: none;
}

.contact-container button {
  background: #6C5CE7;
  color: white;
  border: none;
  padding: 12px;
  font-size: 18px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: background 0.3s ease;
}

.contact-container button:hover {
  background: #5A4BCF;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  background: #333;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.social-icons a:hover {
  background: #6C5CE7;
  transform: scale(1.1);
}

footer {
  text-align: center;
  padding: 10px;
  background-color: #222;
  color: white;
  bottom: 0;
  width: 100vw;
}
footer a {
  color: #6C5CE7;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .profile {
    flex-direction: column;
    text-align: center;
    margin-bottom: 30px;
  }

  .profile img {
    margin: 0 0 20px 0;
  }

  .profile h3 {
    margin-left: 0;
    font-size: 28px;
  }

  .boxed {
    flex-direction: column;
    gap: 10px;
  }

  .competence_grid {
    flex-direction: column;
    align-items: center;
  }

  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
  }

  .timeline-item .timeline-content {
    width: 100%;
  }

  .infos {
    position: static;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    transform: none;
  }

  .infos a {
    width: 35px;
    height: 35px;
    font-size: 0;
    background-size: 50%;
  }

  .infos a:hover {
    width: 100px;
    font-size: 10px;
  }

  .certification-grid {
    flex-direction: column;
    align-items: center;
  }

  .contact-container {
    width: 90%;
    padding: 20px;
  }
}
