/* Animation générale */
@keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
}

@keyframes slideUp {
    0% {
      transform: translateY(40px);
      opacity: 0;
    }
    100% {
      transform: translateY(0);
      opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
      transform: scale(0.5);
      opacity: 0;
    }
    60% {
      transform: scale(1.2);
      opacity: 1;
    }
    100% {
      transform: scale(1);
    }
}

@keyframes rotateIn {
    0% {
      transform: rotate(360deg);
      opacity: 0;
    }
    100% {
      transform: rotate(0deg);
      opacity: 1;
    }
}

@keyframes shake {
    0% {
      transform: translateX(-10px);
    }
    25% {
      transform: translateX(10px);
    }
    50% {
      transform: translateX(-10px);
    }
    75% {
      transform: translateX(10px);
    }
    100% {
      transform: translateX(0);
    }
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #F4F6F9;
    color: #444;
    line-height: 1.6;
    overflow-x: hidden;
    animation: fadeIn 1s ease-in;
}

/* Header */
header {
    background-color: #1E2A47;
    color: #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideUp 1.2s ease-out;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: inline-block;
    margin-right: 30px;
}

header nav ul li a {
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.3s ease;
    animation: bounceIn 1s ease-out;
}

header nav ul li a:hover {
    color: #E74C3C;
    transform: scale(1.05);
}

/* Hero Section */
#hero {
    background-color: #3498DB;
    color: white;
    padding: 100px 0;
    text-align: center;
    animation: fadeIn 1.2s ease-in;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: slideUp 1.5s ease-out;
}

#hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: slideUp 1.5s ease-out;
}

.cta-btn {
    background-color: #E74C3C;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
    animation: bounceIn 1.5s ease-out;
}

.cta-btn:hover {
    background-color: #C0392B;
}

/* Section des projets */
#projects {
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-top: 5px solid #3498DB;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    align-items: stretch; /* ← clé ici */
}

/* Titre de la section des projets */
#projects h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #3498DB;
    font-weight: bold;
    width: 100%; /* S'assurer que le titre occupe toute la largeur */
    text-align: center; /* Pour centrer le titre */
}

/* Cartes des projets */
.project-card {
    background-color: white;
    padding: 30px;
    margin: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    text-align: center;
    width: 48%;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    /* Étire la carte pour remplir la hauteur max */
    align-self: stretch;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.4s ease;
}

.project-card img:hover {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 2rem;
    margin-top: 20px;
    color: #333;
}

.project-card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    
}

.project-card a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498DB;
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.project-card a:hover {
    background-color: #E74C3C;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-card {
        width: 100%; /* Les cartes seront en une seule colonne sur les petits écrans */
    }
}


/* Liste des fonctionnalités dans la section des projets */
#projects ul {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    font-size: 1.1rem;
}

#projects ul li {
    color: #666;
    margin: 10px 0;
}

#projects ul li::before {
    content: '✔'; /* Utilisation du check */
    color: #3498DB;
    margin-right: 10px;
}

/* Amélioration de la mise en page des cartes */
@media (min-width: 768px) {
    #projects {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .project-card {
        width: 45%;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .project-card {
        width: 100%;
    }
}

/* Footer */
footer {
    background-color: #1E2A47;
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 1.2em;
    letter-spacing: 1px;
    animation: slideUp 1s ease-out;
}

footer p {
    font-size: 1.1em;
    font-weight: 300;
    margin-top: 10px;
}

.social-icons a {
    margin: 0 15px;
    color: white;
    font-size: 1.8rem;
    transition: color 0.3s ease, transform 0.3s ease;
    animation: shake 1s ease-out infinite;
}

.social-icons a:hover {
    color: #E74C3C;
    transform: scale(1.2);
}

/* Services Section */
#services {
    padding: 60px 0;
    text-align: center;
    background-color: #ECF0F1;
    animation: fadeIn 1s ease-in;
}

#services h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
    font-weight: bold;
    animation: slideUp 1s ease-out;
}

.service-card {
    background-color: white;
    padding: 30px;
    margin: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    animation: slideUp 0.8s ease-out;
    transform: translateY(30px);
    display: inline-block;
    width: calc(50% - 40px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: #3498DB;
    margin-bottom: 20px;
    animation: slideUp 1s ease-out;
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2C3E50;
    font-weight: bold;
}

.service-card p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-image:hover {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-card {
        width: 100%;
        margin: 20px 0;
    }

    #services h2 {
        font-size: 2rem;
    }
}

/* Blog Section */
#blog {
    padding: 80px 20px;
    background-color: #FDFEFE;
    text-align: center;
    animation: fadeIn 1.2s ease-in;
}
  
#blog h2 {
    font-size: 2.8rem;
    margin-bottom: 40px;
    color: #1E2A47;
    position: relative;
}
  
#blog h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: #E74C3C;
    margin: 10px auto;
    border-radius: 4px;
}
  
.blog-post {
    max-width: 800px;
    background-color: white;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    text-align: left;
    animation: slideUp 1s ease-out, fadeIn 1.2s ease-in;
    transition: transform 0.3s ease;
}
  
.blog-post:hover {
    transform: translateY(-5px);
}
  
.blog-post h3 {
    font-size: 2rem;
    color: #2C3E50;
    margin-bottom: 15px;
}
  
.blog-post .date {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 20px;
    display: block;
}
  
.blog-post p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}
  
.blog-post a {
    color: #3498DB;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post a:hover {
    color: #E74C3C;
}
/* Animation de zoom pour les images */
@keyframes zoomInHover {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* Animation de rotation pour les icônes */
@keyframes rotateHover {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Animation de pulsation pour les boutons */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(231, 76, 60, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    }
}

/* Animation de glissement pour les sections */
@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Application des animations */

/* Images dans les cartes de projet */
.project-card img:hover {
    animation: zoomInHover 0.6s ease-in-out forwards;
}

/* Icônes dans le footer */
.social-icons a:hover {
    animation: rotateHover 0.8s ease-in-out;
}

/* Boutons d'appel à l'action */
.cta-btn:hover {
    animation: pulse 1s infinite;
}

/* Sections qui glissent */
#services {
    animation: slideInLeft 1s ease-in-out;
}

#blog {
    animation: slideInRight 1s ease-in-out;
}
/* Section About */
#about {
    padding: 60px 20px;
    background-color: #f9f9f9;
    text-align: center;
    animation: fadeIn 1.2s ease-in;
  }
  
  #about h2 {
    font-size: 2.8rem;
    margin-bottom: 40px;
    color: #3498DB;
    position: relative;
  }
  
  #about h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: #E74C3C;
    margin: 10px auto;
    border-radius: 4px;
  }
  
  .about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }
  
  .about-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
  }
  
  .about-image {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;

  }
  
.about-image {
    position: relative;
    width: 100%;
    max-width: 400px; /* Augmente la largeur maximale */
    height: auto;
    overflow: hidden; /* Masque les parties en dehors du conteneur */
}

.about-image img {
    width: 100%;
    max-width: 350px; /* Augmente la taille de l'image */
    height: auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    clip-path: inset(0 0 25% 0); /* Réduit la partie masquée en bas pour augmenter la hauteur visible */
    margin-top: 30px; /* Ajoute un léger décalage vers le bas */
}

.about-image img:hover {
    transform: scale(1.1); /* Zoom plus important au survol */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Accentuation de l'ombre */
    clip-path: inset(0 0 20% 0); /* Ajuste légèrement pour un effet dynamique */
}
  /* Section Skills */
  #skills {
    padding: 60px 20px;
    background-color: #ECF0F1;
    text-align: center;
    animation: fadeIn 1.2s ease-in;
  }
  
  #skills h2 {
    font-size: 2.8rem;
    margin-bottom: 40px;
    color: #3498DB;
    position: relative;
  }
  
  #skills h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: #E74C3C;
    margin: 10px auto;
    border-radius: 4px;
  }
  
  .skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
  
  .skill-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }
  
  .skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2C3E50;
  }
  
  .skill-card p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
  }
  /* Animation pour les sections */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Application des animations à la section "À propos" */
#about {
    animation: fadeInUp 1s ease-in-out;
}

.about-text {
    animation: fadeInUp 1.2s ease-in-out;
}

.about-image img {
    animation: scaleIn 1.5s ease-in-out;
}

/* Application des animations à la section "Compétences" */
#skills {
    animation: fadeInUp 1s ease-in-out;
}

.skill-card {
    animation: fadeInUp 1.2s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: scale(1.05); /* Zoom léger au survol */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Accentuation de l'ombre */
}