/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin-top: 56px; /* Adjust for fixed navbar */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 150px 0;
    position: relative;
    overflow: hidden;
    min-height: 500px; /* Add minimum height */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.hero-section h1, .hero-section .lead {
    position: relative;
    z-index: 2;
}

/* Typed.js container */
#typed-output {
    min-height: 2em; /* Set minimum height for typed text */
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typed-cursor {
    font-size: 1.5rem;
    opacity: 1;
    animation: typedjsBlink 0.7s infinite;
}
@keyframes typedjsBlink {
    50% { opacity: 0.0; }
}

/* Projects Hero Section */
.projects-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    margin-top: -56px;
    position: relative;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.projects-hero .container {
    position: relative;
    z-index: 2;
}

.projects-hero h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Sections */
section {
    padding: 80px 0;
}

/* Skills */
.skill-card {
    background-color: #f4f4f4;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: scale(1.05);
}

/* Projects */
.project-card {
    margin-bottom: 30px;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: #ffffff;
    overflow: hidden;
}

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

.project-card .card-img-top {
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.project-card .card-body {
    padding: 1.5rem;
}

.project-card .card-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.project-card .card-text {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-card .technologies {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-card .badge {
    padding: 0.5em 1em;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: #4a5568;
    transition: all 0.2s ease;
}

.project-card .badge:hover {
    transform: translateY(-2px);
}

.project-card .project-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.project-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.project-card .btn i {
    margin-right: 0.5rem;
}

.project-card .btn-outline-dark:hover {
    background-color: #2d3748;
    border-color: #2d3748;
}

.project-card .btn-primary {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

.project-card .btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
}

/* Projects Section */
.project-card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.project-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-tags .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5em 1em;
    margin-right: 0.5rem;
}

.project-links a {
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: #4a90e2 !important;
}

.card-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-footer {
    padding: 1rem;
}

/* Responsive adjustments for projects */
@media (max-width: 768px) {
    .project-card {
        margin-bottom: 2rem;
    }
    
    .project-card:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .project-card .card-img-top {
        height: 200px;
    }
    
    .project-card .project-links {
        flex-direction: column;
    }
}

/* Projects Section Styles */
.projects-section {
    padding-top: 120px;
    padding-bottom: 60px;
}

.project-card {
    height: 100%;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.project-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.project-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.technology-badge {
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-links {
    display: flex;
    gap: 1.5rem;
}

.card-links a {
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.card-links a:hover {
    color: #0d6efd;
}

.card-links i {
    margin-right: 0.5rem;
}

/* Responsive layout adjustments */
@media (max-width: 992px) {
    .project-card .card-img-top {
        height: 180px;
    }
    
    .project-card .card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .projects-section {
        padding-top: 100px;
    }
    
    .project-card .card-img-top {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    .project-card .card-img-top {
        height: 180px;
    }
    
    .card-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Responsive adjustments for projects */
@media (max-width: 768px) {
    .project-card {
        margin-bottom: 2rem;
    }
    
    .project-card:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .project-card .card-img-top {
        height: 200px;
    }
    
    .project-card .project-links {
        flex-direction: column;
    }
}

/* Navigation Styles */
.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    position: relative;
    overflow: hidden;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.navbar-brand:hover::after {
    width: 100%;
}

.nav-item {
    position: relative;
    margin: 0 5px;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active::before {
    width: 80%;
}

/* Make sure dropdown menus don't cause overflow */
.navbar-collapse {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #343a40;
        padding: 1rem;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-link::before {
        left: 0;
        transform: none;
    }

    .nav-link:hover::before {
        width: 100%;
    }

    .nav-link.active::before {
        width: 100%;
    }
}

/* Call to Action Button */
.btn-primary.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary.btn-lg i {
    transition: transform 0.3s ease;
}

.btn-primary.btn-lg:hover i {
    transform: translateX(5px);
}

/* Contact */
.contact-links .btn {
    margin: 10px;
    padding: 10px 20px;
}

/* Contact Page Styles */
.contact-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    margin-top: -56px;
    position: relative;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.contact-hero .container {
    position: relative;
    z-index: 2;
}

.contact-form-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.contact-form-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn-primary {
    background-color: #4a90e2;
    border-color: #4a90e2;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
    transform: translateY(-2px);
}

/* Social Links Section */
.social-links-section {
    background-color: #f8f9fa;
}

.social-links .btn {
    padding: 1rem 2rem;
    margin: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-links .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.social-links .btn i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.social-links .btn-outline-primary {
    color: #0077b5;
    border-color: #0077b5;
}

.social-links .btn-outline-primary:hover {
    background-color: #0077b5;
    color: white;
}

.social-links .btn-outline-dark:hover {
    background-color: #24292e;
    border-color: #24292e;
    color: white;
}

/* About Section */
.about-content {
    padding-right: 2rem;
}

.about-content h3 {
    color: #2d3748;
    font-weight: 600;
}

.about-content p {
    color: #4a5568;
    line-height: 1.8;
}

.about-image {
    position: relative;
    padding: 1rem;
}

.about-image img {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: translate(-8px, -8px);
}

.about-image-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 90%;
    height: 90%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    z-index: 1;
    transition: transform 0.3s ease;
}

.about-image:hover .about-image-bg {
    transform: translate(8px, 8px);
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    color: #4a90e2;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-text {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Responsive Adjustments for About Section */
@media (max-width: 768px) {
    .about-content {
        padding-right: 0;
        text-align: center;
    }
    
    .about-image {
        margin-top: 2rem;
    }
    
    .about-image-bg {
        width: 95%;
        height: 95%;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0;
    }
    
    .contact-form-section {
        padding: 2rem 1rem;
    }
    
    .social-links .btn {
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* Animated Background for Home Section */
.animated-bg {
  pointer-events: none;
  background: #232526;
  overflow: hidden;
}
.animated-bg::before, .animated-bg::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  left: -50%;
  top: -50%;
  z-index: 0;
  opacity: 0.2;
  background: repeating-linear-gradient(120deg, #00ffe7 0 2px, transparent 2px 40px),
              repeating-linear-gradient(240deg, #00ffe7 0 2px, transparent 2px 40px);
  animation: moveLines 8s linear infinite;
}
.animated-bg::after {
  background: repeating-linear-gradient(60deg, #ff00c8 0 2px, transparent 2px 40px),
              repeating-linear-gradient(300deg, #ff00c8 0 2px, transparent 2px 40px);
  opacity: 0.15;
  animation-direction: reverse;
}
@keyframes moveLines {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-40px) rotate(1deg); }
}

/* Animated Background for Projects Section */
.animated-bg-projects {
  pointer-events: none;
  background: #181a1b;
  overflow: hidden;
}
.animated-bg-projects::before, .animated-bg-projects::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  left: -50%;
  top: -50%;
  z-index: 0;
  opacity: 0.08; /* Opacité réduite pour améliorer la lisibilité du texte */
  background: repeating-linear-gradient(100deg, #00c3ff 0 2px, transparent 2px 40px),
              repeating-linear-gradient(260deg, #00c3ff 0 2px, transparent 2px 40px);
  animation: moveLinesProjects 12s linear infinite;
}
.animated-bg-projects::after {
  background: repeating-linear-gradient(80deg, #ff7e5f 0 2px, transparent 2px 40px),
              repeating-linear-gradient(280deg, #ff7e5f 0 2px, transparent 2px 40px);
  opacity: 0.05; /* Opacité réduite pour la couche secondaire */
  animation-direction: reverse;
}
@keyframes moveLinesProjects {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-60px) rotate(2deg); }
}

.projects-section h1,
.projects-section .lead {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

#projects h2,
.projects-section h2 {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
