* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-list {
  margin: 15px 20px;
}

.div-list {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.ul-list {
  list-style: none;
  display: flex;
  gap: 3rem;
  background-color: white;
  padding: 12px 30px;
  border-radius: 25px;
  border: 1px solid #f0f0f0;
}

.ul-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 25px;
  transition: background-color 0.3s ease;
  padding: 4px 8px;
}

.ul-list li:hover {
  background-color: #f8f9fa;
}

.ul-list li a {
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.ul-list li.active {
  background-color: #007bff;
  padding: 10px 15px;
  box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.ul-list li.active a,
.ul-list li.active i {
  color: white;
}

/* fine header  */

.home {
  margin: 160px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px 0;
}

.home-container {
  display: flex;
  gap: 6rem;
  align-items: center;
  max-width: 1200px;
}

.home-p {
  color: #666;
  background-color: #f0f0f0;
  display: inline-block;
  border-radius: 20px;
  padding: 6px 12px;
  margin-bottom: 30px;
  font-size: 14px;
  font-weight: 500;
}

.home-s {
  font-weight: bold;
  color: #28a745;
}

.info-home h1 {
  font-size: 70px;
  font-family: "Unbounded", sans-serif;
  margin-bottom: 20px;
  max-width: 500px;
  color: #2c3e50;
}

.info-home h3 {
  font-size: 40px;
  font-family: "Playfair Display", serif;
  margin-bottom: 20px;
  color: #495057;
}

.info-p {
  color: #666;
  font-family: "Open Sans", sans-serif;
  padding-bottom: 20px;
  max-width: 600px;
  line-height: 1.7;
}

.info-p p {
  padding-bottom: 8px;
}

.info-p2 {
  display: flex;
  gap: 2rem;
  color: #777;
  font-size: 16px;
  padding-bottom: 20px;
  align-items: center;
}

.btnn {
  display: flex;
  gap: 1rem;
  padding-bottom: 30px;
}

.btn-home {
  background-color: #007bff;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.btn-home:hover {
  background-color: white;
  color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

hr {
  width: 80%;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd, transparent);
  margin: 20px 0;
}

.hhr {
  padding-bottom: 30px;
}

.follow {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.follow p {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.follow ul {
  display: flex;
  gap: 2rem;
  font-size: 20px;
}

.follow ul li {
  list-style: none;
  transition: transform 0.2s ease;
}

.follow ul li:hover {
  transform: translateY(-3px);
}

.follow ul a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.follow ul a:hover {
  color: #007bff;
}

.portrait {
  height: 470px;
  width: 400px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.portrait:hover {
  transform: scale(1.02);
}

/* fine home  */

.card{
    display: flex;
    gap: 2rem;
}

.c1{
    display: flex;
    align-content: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border: 2px solid black;
    padding: 5px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.c1 h3{
    padding-top: 10px;
    padding-bottom: 10px;
}

.c1:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: #ff3333;               
  background-color: #fff5f5;               
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);  
  cursor: pointer;                         
}


.project {
  margin: 160px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px 0;
}

.project p {
  padding-bottom: 20px;
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.project h1 {
  font-family: "Unbounded", sans-serif;
  padding-bottom: 10px;
  font-size: 48px;
  color: #2c3e50;
}

.project hr {
  width: 10%;
  height: 2px;
  background: #007bff;
  border: none;
  margin-bottom: 40px;
}

.filter-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  color: #495057;
}

.filter-btn:hover,
.filter-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.project-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.project-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.02);
}

.project-card h3 {
  color: #007bff;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
}

.project-card p {
  color: #666;
  font-size: 15px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.project-card.hidden {
  display: none;
}

.skills {
  margin-bottom: 15px;
}

.skills a {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  text-decoration: none;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  margin: 2px;
  transition: background 0.3s ease;
  font-weight: 500;
}

.skills a:hover {
  background: #bbdefb;
}

.btns {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn {
  background: #007bff;
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.contact {
  margin: 160px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px 0;
}

.contact p {
  padding-bottom: 20px;
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.contact h1 {
  font-family: "Unbounded", sans-serif;
  padding-bottom: 10px;
  font-size: 48px;
  color: #2c3e50;
}

.contact hr {
  width: 10%;
  height: 2px;
  background: #007bff;
  border: none;
  margin-bottom: 40px;
}

.contact-content {
  padding-top: 50px;
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1000px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info p {
  font-size: 18px;
  margin-bottom: 25px;
  color: #555;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #333;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.contact-item:hover {
  background: #e9ecef;
}

.contact-item i {
  font-size: 20px;
  color: #007bff;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 50px;
  height: 50px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-link[href*="github"]:hover {
  background: #333;
  color: white;
}

.social-link[href*="linkedin"]:hover {
  background: #0077b5;
  color: white;
}

.social-link[href*="wa.me"]:hover {
  background: #25d366;
  color: white;
}

/* Form */
.contact-form {
  flex: 1;
  min-width: 300px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  background: #fafafa;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #007bff;
  background: white;
}

.btn-send {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.btn-send:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Keyframes for slide animations */
@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animation classes */
.slide-in-left {
  opacity: 0;
  animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
  opacity: 0;
  animation: slideInRight 0.8s ease-out forwards;
}

.slide-in-up {
  opacity: 0;
  animation: slideInUp 0.8s ease-out forwards;
}


.footer {
  background-color: #000;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  overflow-x: hidden;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
}

.footer-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links li a:hover {
  color: #474af0;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-social a {
  color: black;
  font-size: 18px;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: #474af0;
}

.footer-copy {
  font-size: 12px;
  color: #aaa;
}

body {
  margin:0;
  padding:0;
  font-family: sans-serif;
}

#loading-screen {
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background-color: #000;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  z-index:9999;
  overflow:hidden;
  color:#00f0ff;
  text-align:center;
}

.hidden {
  opacity: 0;
  transform: translateY(-200px);
}

.fall {
  animation: fall 0.9s forwards;
}

@keyframes fall {
  0% {
    opacity:0;
    transform: translateY(-200px);
  }
  60% {
    opacity:1;
    transform: translateY(20px);
  }
  100% {
    transform: translateY(0);
  }
}

.loading-content h1,
.loading-content h2,
.loading-content i {
  margin: 20px 0;
}

.sub-icons {
  display:flex;
  justify-content:center;
  gap: 25px;
  margin-bottom: 20px;
}

/* Responsive for tablets and phones */
@media (max-width: 1024px) {
  .home, .about, .project, .services, .contact {
    margin: 120px 50px;
  }

  .home-container, .about-container {
    flex-direction: column;
    gap: 3rem;
  }

  .home img, .about img {
    width: 100%;
    height: auto;
  }

  .ul-list {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 8px 15px;
  }
}

/* Phone layout */
@media (max-width: 768px) {
  header {
    display: none;
  }

  .home, .about, .project, .services, .contact {
    margin: 100px 20px;
  }

  .home-container, .about-container, .contact-content {
    flex-direction: column;
    gap: 2rem;
  }

  .projects-container, .services-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home img, .about img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .btn-home1, .btn-home2, .btn, .btn-send {
    width: 100%;
    text-align: center;
  }
  
  .follow ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 1024px) {

  header {
    display: none;
  }

  .home, .about, .project, .services, .contact {
    margin: 20px auto;
    padding: 0 15px;
    text-align: center;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .home-container,
  .about-container,
  .services-container,
  .projects-container,
  .contact-content,
  .card {
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }

  .about img {
    width: 100%;
    max-width: 220px; 
    height: auto;
    margin-bottom: 20px;
    position: relative;
    z-index: 1; 
  }

  .card .c1 {
    width: 100%;
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
  }

  .home img,
  .project-card img,
  .service-card img {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    object-fit: cover;
  }

  .info-home h1 { font-size: 26px; }
  .info-home h3 { font-size: 18px; }
  .info-p, .info-p2, .home-p, .about p, .project p, .service-card p, .contact p {
    font-size: 14px;
  }
  .project-card h3, .service-card h3 { font-size: 16px; }

  .contact-content {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .contact-info, .contact-form {
    width: 100%;
    max-width: 400px;
  }

  html, body {
    overflow-x: hidden;
  }

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Remplace le "- 80" que tu avais en JS pour ne pas cacher le haut des sections sous ta navbar */
}
}
