/* Hero Section Styles */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-gradient {
    background: linear-gradient(135deg, 
        #0f172a 0%,  /* Bleu marine très foncé */
        #1e293b 50%, /* Bleu légèrement plus clair */
        #0f172a 100% /* Retour au bleu foncé */
    );
    animation: gradientFlow 15s ease infinite;
    background-size: 200% 200%;
}


@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animations existantes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-fade-in-up {
    animation: slideUp 1s ease-out;
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.animated-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(41, 98, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 41, 111, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000000 100%);
    transform: rotate(-12deg);
    animation: bgFloat 20s ease-in-out infinite alternate;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(54, 54, 54, 0.8) 100%);
    z-index: 1;
}

.pattern-overlay {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.3;
    z-index: 2;
}

@keyframes bgFloat {
    0% {
        transform: rotate(-12deg) translateY(-2%);
    }
    100% {
        transform: rotate(-12deg) translateY(2%);
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-fade-in-up {
    animation: slideUp 1s ease-out;
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Project Cards */
.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-card img {
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                135deg,
                rgba(0, 0, 0, 0.4) 0%,
                rgba(0, 0, 0, 0.6) 50%,
                rgba(0, 0, 0, 0.4) 100%
            );
            z-index: 2;
            border-radius: 20px 20px 0 0;
        }

.project-card:hover .overlay {
    opacity: 1;
}

/* Background Styles */
.bg-projects {
    background-color: rgb(246, 246, 246);
    position: relative;
}

.bg-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(246,246,246,0) 100%);
}

/* Modal Styles */
        .modal {
            display: block;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            display: flex;
            align-items: center;
            justify-content: center;
        }
.modal.active {
    display: flex;
    opacity: 1;
}

        .modal-content {
            background: linear-gradient(135deg, #0f1729 0%, #0d111f 100%);
            width: 90%;
            max-width: 1200px;
            max-height: 90vh;
            border-radius: 20px;
            overflow: auto;
            position: relative;
            transform: scale(0.95) translateY(20px);
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.1);
            margin: 5vh auto;
        }

        .modal.active .modal-content {
            transform: scale(1) translateY(0);
        }

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

        .close-modal {
            position: absolute;
            top: 20px;
            right: 20px;
            background-color: white;
            color: black;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 24px;
            z-index: 1001;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            border: none;
        }

        .close-modal:hover {
            background-color: #f3f3f3;
            transform: rotate(90deg);
        }

.image-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.image-modal.active {
  display: flex;
  opacity: 1;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: white;
  color: black;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  z-index: 2001;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
  background-color: #f3f3f3;
  transform: rotate(90deg);
}



/* Responsive Design Improvements */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .close-modal,
    .close-btn {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Hero Section avec effet dynamique style Apple/Framer */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 100vh; /* Occupe tout l'écran */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

/* Gradient de fond dynamique */
.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, 
        rgba(66, 48, 128, 0.7) 0%,
        rgba(25, 25, 112, 0.5) 40%,
        rgba(0, 0, 0, 1) 90%
    );
    z-index: 1;
}

/* Effet de sphère lumineuse */
.hero-sphere {
    position: absolute;
    width: 80vw;
    height: 80vw;
    max-width: 1200px;
    max-height: 1200px;
    background: radial-gradient(circle at center,
        rgba(125, 90, 255, 0.4) 0%,
        rgba(80, 60, 200, 0.2) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(60px);
    animation: floatSphere 20s ease-in-out infinite alternate;
    z-index: 0;
}

/* Particules brillantes de fond */
.particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 0.5%),
        radial-gradient(circle at 90% 30%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 0.5%),
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 0.5%),
        radial-gradient(circle at 70% 85%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 0.5%),
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 0.5%);
    background-size: 200% 200%;
    animation: movingStars 60s linear infinite;
    opacity: 0.6;
    z-index: 2;
}

/* Mesh grid effect comme Framer */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 3;
}

/* Noise texture pour ajouter de la profondeur */
.noise {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCAwaDMwMHYzMDBIMHoiLz48L3N2Zz4=');
    z-index: 4;
    opacity: 0.4;
    pointer-events: none;
}

/* Content Container avec un effet de glassmorphism */
.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 2rem;
}

/* Animation du nom avec effet de type */
.name-animation {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #c4b5fd, #818cf8, #c4b5fd, #fff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 8s ease infinite;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    transform: translateZ(0);
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    letter-spacing: 0.05em;
    transform: translateZ(0);
}

/* Buttons avec effet hover moderne */
.cta-button {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 100px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.primary-button {
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.primary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatSphere {
    0% { transform: translate(-5%, -5%) scale(0.9); }
    50% { transform: translate(0%, 0%) scale(1); }
    100% { transform: translate(5%, 5%) scale(0.9); }
}

@keyframes movingStars {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Mouse scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
    z-index: 20;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin-top: 10px;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 1; }
    75% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .name-animation {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-sphere {
        width: 100vw;
        height: 100vw;
    }
}


/* Section Projets avec Design Moderne */
#projects {
    position: relative;
    padding: 10rem 0 8rem;
    background: linear-gradient(180deg, #000 0%, #0a0a15 100%);
    overflow: hidden;
}

/* Titre de section élégant */
#projects h2 {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 5rem;
    color: white;
    position: relative;
    z-index: 10;
    background: linear-gradient(90deg, #fff, #c4b5fd, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#projects h2::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Background effects */
.projects-bg-sphere {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle at center,
        rgba(80, 60, 200, 0.15) 0%,
        rgba(60, 40, 150, 0.08) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    top: 10%;
    right: -20%;
}

.projects-bg-overlay {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCAwaDMwMHYzMDBIMHoiLz48L3N2Zz4=');
    opacity: 0.2;
    z-index: 1;
}

/* Cards modernes avec effet glassmorphism */
.projects-container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-card {
    position: relative;
    background: rgba(15, 15, 25, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                0 0 30px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.project-card .image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.project-card:hover img {
    transform: scale(1.08);
}

.project-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
                rgba(10, 10, 25, 0.95) 0%,
                rgba(10, 10, 25, 0) 100%);
    opacity: 0.7;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(0px);
    z-index: 5;
}

.project-card:hover .overlay {
    opacity: 0.3;
    backdrop-filter: blur(3px);
}

.view-project-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 20px));
    opacity: 0;
    padding: 0.8rem 2rem;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    color: white;
    border-radius: 100px;
    font-weight: 500;
    transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.project-card:hover .view-project-btn {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.project-content {
    padding: 2rem;
    color: white;
}

.project-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    background: linear-gradient(90deg, #fff, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.project-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    font-size: 0.8rem;
}

/* Contact section styling */
#contact {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(0deg, #000 0%, #0a0a15 100%);
    overflow: hidden;
}

.contact-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
}

#contact h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 4rem;
    background: linear-gradient(90deg, #fff, #c4b5fd, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-bg-sphere {
    position: absolute;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle at center,
        rgba(80, 60, 200, 0.1) 0%,
        rgba(60, 40, 150, 0.05) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    bottom: -40%;
    left: -20%;
}

.contact-btn {
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-btn-primary {
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.contact-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.contact-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 1.2rem;
}

/* Modal styles refined */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #0f1729 0%, #0d111f 100%);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: auto;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    position: relative;
    padding: 3rem 3rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem 3rem 3rem;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 1001;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #projects h2,
    #contact h2 {
        font-size: 2.5rem;
    }
    
    .project-content h3 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
}

/* Styles du formulaire de contact */
.contact-form-container {
    background: rgba(15, 15, 25, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Styles d'accessibilité pour la navigation au clavier */
:focus-visible {
    outline: 3px solid rgba(139, 92, 246, 0.6) !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}

.project-card {
    cursor: pointer;
}

/* Ajustement pour que l'outline soit visible sur les cartes */
.project-card:focus-visible {
    outline-offset: 4px !important;
}

/* Accessibilité pour les modals */
.modal-content {
    outline: none;
}

.close-modal:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5);
}

/* Styles pour l'état focus/hover des boutons et interactions */
.contact-btn:focus-visible {
    outline: 3px solid rgba(139, 92, 246, 0.6);
    outline-offset: 2px;
}

/* Skip link pour l'accessibilité - permet de sauter au contenu principal */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: #8b5cf6;
    color: white;
    padding: 10px 15px;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* État actif/focus des cartes projet */
.project-card.keyboard-focused {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 
                0 0 0 3px rgba(139, 92, 246, 0.5);
    border-color: rgba(139, 92, 246, 0.3);
}

/* Animation d'état actif */
@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.focus-pulse {
    animation: pulse-border 2s infinite;
}

/* Ajustements pour le mode contraste élevé */
@media (forced-colors: active) {
    .project-card,
    .contact-btn,
    .form-input,
    .form-textarea,
    .close-modal {
        border: 2px solid ButtonText;
    }
    
    :focus-visible {
        outline: 3px solid Highlight !important;
    }
}

/* Styles pour l'accessibilité par tab sans bordures blanches */

/* Style de focus personnalisé pour éviter les bordures blanches */
:focus-visible {
    outline: none !important;
}

/* Accessibilité pour le focus des cartes projet */
.project-card:focus {
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

/* Skip link pour l'accessibilité - permet de sauter au contenu principal */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: #8b5cf6;
    color: white;
    padding: 10px 15px;
    z-index: 9999;
    transition: top 0.3s ease;
    border-radius: 0 0 5px 0;
}

.skip-link:focus {
    top: 0;
}

/* Style pour le formulaire de contact */
.contact-form-container {
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Style pour l'erreur de validation */
.error-message {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

input.invalid,
textarea.invalid {
    border-color: #f87171 !important;
}

/* Support du mode contraste élevé sans modifier l'apparence normale */
@media (forced-colors: active) {
    .project-card:focus,
    .form-input:focus,
    .form-textarea:focus,
    button:focus,
    a:focus {
        outline: 2px solid Highlight !important;
        outline-offset: 2px;
    }
}

/* Amélioration de l'accessibilité des modals */
.modal-content:focus {
    outline: none;
}

.close-modal:focus {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

        .hero {
            position: relative;
            height: 100vh;
            width: 100%;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 20px 20px 0 0;
        }

        .hero video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: -1;
            border-radius: 20px 20px 0 0;
        }

        .cta {
            position: relative;
            z-index: 3;
            text-align: center;
            color: white;
            padding: 20px;
            max-width: 90%;
        }

        .cta a {
            display: block;
            font-size: 3.5rem;
            font-weight: bold;
            color: white;
            text-decoration: none;
            margin-bottom: 15px;
            text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
            letter-spacing: 0.1em;
            transition: all 0.3s ease;
            line-height: 1.1;
        }

        .cta a:hover {
            color: #f0f0f0;
            text-shadow: 2px 2px 12px rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .cta span {
            display: block;
            font-size: 1.3rem;
            color: rgba(255, 255, 255, 0.9);
            text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
            font-weight: 300;
            letter-spacing: 0.05em;
        }
        .stats-section {
            background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(31, 41, 55, 0.8));
            border-radius: 20px;
            padding: 30px;
            margin: 30px 0;
            border: 1px solid rgba(107, 114, 128, 0.2);
        }

        .stats-title {
            text-align: center;
            font-size: 2rem;
            color: #f9fafb;
            margin-bottom: 30px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 25px;
        }

        .stat-card {
            background: linear-gradient(135deg, rgba(31, 41, 55, 0.6), rgba(55, 65, 81, 0.4));
            border: 2px solid rgba(107, 114, 128, 0.4);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            transition: all 0.3s;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(107, 114, 128, 0.3);
            border-color: rgba(168, 85, 247, 0.5);
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: bold;
            color: #a855f7;
            margin-bottom: 10px;
            text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
        }

        .stat-label {
            color: #d1d5db;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 600;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
        }


        
        @media (max-width: 1024px) {
            .modal-content {
                width: 95%;
                max-height: 95vh;
            }

            .hero {
                height: 80vh;
                min-height: 400px;
            }

            .cta a {
                font-size: 3rem;
            }

            .cta span {
                font-size: 1.2rem;
            }

            .close-modal {
                width: 35px;
                height: 35px;
                font-size: 20px;
            }
        }

        @media (max-width: 768px) {
            .modal-content {
                width: 95%;
                max-height: 95vh;
                border-radius: 15px;
            }

            .hero {
                height: 70vh;
                min-height: 350px;
                border-radius: 15px 15px 0 0;
            }

            .hero video {
                border-radius: 15px 15px 0 0;
            }

            .overlay {
                border-radius: 15px 15px 0 0;
            }

            .cta {
                padding: 15px;
            }

            .cta a {
                font-size: 2.5rem;
                margin-bottom: 12px;
            }

            .cta span {
                font-size: 1.1rem;
            }

            .close-modal {
                top: 15px;
                right: 15px;
                width: 35px;
                height: 35px;
                font-size: 18px;
            }

            .modal-body {
                padding: 25px;
            }
        }

@media (max-width: 480px) {
    .modal {
        align-items: flex-start; /* Enlève le centrage vertical */
        padding: 10vh 0 10vh 0;       /* Ajoute un espace en haut pour rendre le bouton visible */
    }

    .modal-content {
        width: 98%;
        max-height: 80vh;
        border-radius: 10px;
        margin: 0 auto;           /* Centré horizontalement uniquement */
    }

    .hero {
        height: 60vh;
        min-height: 300px;
        border-radius: 10px 10px 0 0;
    }

    .hero video {
        border-radius: 10px 10px 0 0;
    }

    .overlay {
        border-radius: 10px 10px 0 0;
    }

    .cta a {
        font-size: 2rem;
        margin-bottom: 10px;
        letter-spacing: 0.05em;
    }

    .cta span {
        font-size: 1rem;
        line-height: 1.4;
    }

    .close-modal {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
    }
}


        @media (max-width: 360px) {
            .cta a {
                font-size: 1.8rem;
            }

            .cta span {
                font-size: 0.9rem;
            }

            .close-modal {
                width: 28px;
                height: 28px;
                font-size: 14px;
            }
        }

        /* Orientation paysage sur mobile */
        @media (max-height: 500px) and (orientation: landscape) {
            .modal-content {
                max-height: 98vh;
            }

            .hero {
                height: 100vh;
                min-height: 100vh;
            }

            .cta a {
                font-size: 2.5rem;
            }

            .cta span {
                font-size: 1rem;
            }
        }

        /* Très grands écrans */
        @media (min-width: 1920px) {
            .cta a {
                font-size: 4rem;
            }

            .cta span {
                font-size: 1.5rem;
            }

            .close-modal {
                width: 45px;
                height: 45px;
                font-size: 26px;
            }
        }

body.modal-open .project-card .overlay {
    display: none;
}