/* ================================

   RESPONSIVE OPTIMISÉ - VERSION COMPLÈTE

================================ */



/* Reset du navbar-fix.css précédent */

@media (min-width: 969px) and (max-width: 1050px) {

  .navbar-link span {

    display: inline !important; /* On garde les textes */

  }

  

  .navbar-link::after {

    display: none !important; /* On retire les tooltips */

  }

}



/* ================================

   NAVBAR RESPONSIVE - SOLUTION SIMPLE

================================ */



/* Desktop large */

@media (min-width: 1400px) {

  .navbar-container {

    max-width: 1400px;

  }

  

  .navbar-link {

    padding: 0.75rem 1.25rem;

    font-size: 1rem;

  }

}



/* Desktop normal */

@media (min-width: 1200px) and (max-width: 1399px) {

  .navbar-link {

    padding: 0.65rem 1rem;

    font-size: 0.95rem;

  }

}



/* Laptop */

@media (min-width: 969px) and (max-width: 1199px) {

  .navbar-container {

    padding: 0 1rem;

  }

  

  .navbar-link {

    padding: 0.6rem 0.75rem;

    font-size: 0.9rem;

  }

  

  .navbar-link svg {

    width: 16px;

    height: 16px;

  }

  

  .logo-text {

    font-size: 1.3rem;

  }

  

  .logo-img {

    width: 45px;

    height: 45px;

  }

}



/* Tablette et mobile */

@media (max-width: 968px) {

  .section {

    padding: 2rem 0 !important;

    min-height: auto !important;

    display: block !important;

  }

  

  /* Navbar container */

  .navbar {

    padding: 0.75rem 0;

  }

  

  .navbar-container {

    padding: 0 1.5rem;

  }

  

  /* Logo */

  .logo-text {

    font-size: 1.4rem;

  }

  

  .logo-img {

    width: 45px;

    height: 45px;

  }

  

  /* Menu burger - Design amélioré */

  .mobile-menu-toggle {

    display: flex !important;

    z-index: 1002;

    position: relative;

    padding: 0.5rem;

    border-radius: 8px;

    transition: all 0.3s ease;

  }

  

  .mobile-menu-toggle:hover {

    background: rgba(0, 123, 255, 0.1);

    transform: scale(1.05);

  }

  

  .mobile-menu-toggle.active .menu-icon span {

    background: var(--primary-color);

  }

  

  /* Menu latéral plein écran - Design moderne */

  .navbar-menu {

    position: fixed;

    top: 0;

    right: 0;

    width: 100%;

    height: 100vh;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    background: linear-gradient(135deg, 

      rgba(2, 5, 9, 0.98) 0%, 

      rgba(7, 10, 18, 0.98) 50%,

      rgba(2, 5, 9, 0.98) 100%

    );

    backdrop-filter: blur(30px) saturate(150%);

    -webkit-backdrop-filter: blur(30px) saturate(150%);

    padding: 5rem 2rem 3rem;

    gap: 0.5rem;

    transform: translateX(100%);

    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    z-index: 1001;

    overflow-y: auto;

  }

  

  .navbar-menu.active {

    transform: translateX(0);

  }

  

  /* Barre latérale néon */

  .navbar-menu::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    width: 4px;

    height: 100%;

    background: linear-gradient(180deg, 

      transparent 0%,

      var(--primary-color) 20%,

      var(--secondary-color) 50%,

      var(--primary-color) 80%,

      transparent 100%

    );

    box-shadow: 0 0 20px var(--primary-color),

                0 0 40px var(--primary-color);

    animation: pulseGlow 3s ease-in-out infinite;

  }

  

  @keyframes pulseGlow {

    0%, 100% { opacity: 0.6; }

    50% { opacity: 1; }

  }

  

  /* Effet fond animé */

  .navbar-menu::after {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: 

      radial-gradient(circle at 10% 20%, rgba(0, 123, 255, 0.05) 0%, transparent 40%),

      radial-gradient(circle at 90% 80%, rgba(108, 99, 255, 0.05) 0%, transparent 40%),

      radial-gradient(circle at 50% 50%, rgba(0, 123, 255, 0.02) 0%, transparent 60%);

    pointer-events: none;

    z-index: -1;

    animation: floatBackground 20s ease-in-out infinite;

  }

  

  @keyframes floatBackground {

    0%, 100% { transform: translate(0, 0); }

    50% { transform: translate(20px, -20px); }

  }

  

  /* Items du menu */

  .navbar-item {

    width: 100%;

    max-width: 500px;

    opacity: 0;

    transform: translateY(20px);

    transition: opacity 0.3s ease, transform 0.3s ease;

  }

  

  .navbar-menu.active .navbar-item {

    opacity: 1;

    transform: translateY(0);

  }

  

  /* Animation progressive des items */

  .navbar-menu.active .navbar-item:nth-child(1) { transition-delay: 0.1s; }

  .navbar-menu.active .navbar-item:nth-child(2) { transition-delay: 0.15s; }

  .navbar-menu.active .navbar-item:nth-child(3) { transition-delay: 0.2s; }

  .navbar-menu.active .navbar-item:nth-child(4) { transition-delay: 0.25s; }

  .navbar-menu.active .navbar-item:nth-child(5) { transition-delay: 0.3s; }

  .navbar-menu.active .navbar-item:nth-child(6) { transition-delay: 0.35s; }

  .navbar-menu.active .navbar-item:nth-child(7) { transition-delay: 0.4s; }

  

  /* Liens du menu mobile - Design latéral */

  .navbar-link {

    width: 100%;

    max-width: 500px;

    padding: 1.4rem 2.5rem;

    font-size: 1.3rem;

    font-weight: 500;

    justify-content: flex-start;

    gap: 1.5rem;

    border-radius: 0 50px 50px 0;

    margin-bottom: 1rem;

    background: rgba(255, 255, 255, 0.03);

    border-left: 3px solid transparent;

    border-right: 1px solid rgba(255, 255, 255, 0.05);

    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;

    overflow: hidden;

  }

  

  /* Effet de lumière au survol */

  .navbar-link::before {

    content: '';

    position: absolute;

    left: -100%;

    top: 0;

    width: 100%;

    height: 100%;

    background: linear-gradient(90deg, 

      transparent 0%,

      rgba(0, 123, 255, 0.1) 50%,

      transparent 100%

    );

    transition: left 0.6s ease;

  }

  

  .navbar-link:hover::before {

    left: 100%;

  }

  

  .navbar-link svg {

    width: 24px;

    height: 24px;

    transition: all 0.3s ease;

    filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.3));

  }

  

  .navbar-link.active {

    background: linear-gradient(90deg, 

      rgba(0, 123, 255, 0.2), 

      rgba(108, 99, 255, 0.1)

    );

    border-left-color: var(--primary-color);

    border-right-color: rgba(0, 123, 255, 0.3);

    box-shadow: 0 0 30px rgba(0, 123, 255, 0.3),

                inset 0 0 30px rgba(0, 123, 255, 0.05);

    transform: translateX(10px);

  }

  

  .navbar-link.active svg {

    filter: drop-shadow(0 0 10px var(--primary-color));

    transform: scale(1.15);

  }

  

  .navbar-link:hover {

    background: rgba(0, 123, 255, 0.15);

    border-left-color: var(--primary-color);

    border-right-color: rgba(0, 123, 255, 0.4);

    transform: translateX(15px);

    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.2);

  }

  

  .navbar-link:hover svg {

    transform: scale(1.2) rotate(5deg);

    filter: drop-shadow(0 0 12px rgba(0, 123, 255, 0.8));

  }

  

  .navbar-link:active {

    transform: translateX(15px) scale(0.97);

  }

  

  /* Overlay sombre - Transition améliorée */

  body.menu-open::after {

    content: '';

    position: fixed;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: radial-gradient(circle at center, 

      rgba(0, 0, 0, 0.7) 0%, 

      rgba(0, 0, 0, 0.9) 100%

    );

    backdrop-filter: blur(5px);

    z-index: 1000;

    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  }

  

  @keyframes fadeIn {

    from { 

      opacity: 0;

      backdrop-filter: blur(0px);

    }

    to { 

      opacity: 1;

      backdrop-filter: blur(5px);

    }

  }

  

  /* Empêcher le scroll */

  body.menu-open {

    overflow: hidden;

  }

}



/* Petits mobiles */

@media (max-width: 480px) {

  .navbar-container {

    padding: 0 1rem;

  }

  

  .logo-text {

    font-size: 1.2rem;

  }

  

  .logo-img {

    width: 40px;

    height: 40px;

  }

  

  .navbar-link {

    font-size: 1.1rem;

    padding: 1rem 1.5rem;

  }

  

  .navbar-link svg {

    width: 20px;

    height: 20px;

  }

}



/* ================================

   SECTIONS RESPONSIVE

================================ */



/* Hero Section */

@media (max-width: 968px) {

  .hero-section .container {

    grid-template-columns: 1fr;

    gap: 2rem;

  }

  

  .hero-image {

    order: -1;

  }

  

  .hero-content {

    text-align: center;

  }

  

  .hero-title {

    font-size: 2.5rem;

  }

  

  .hero-description {

    font-size: 1.1rem;

  }

  

  .hero-buttons {

    justify-content: center;

  }

  

  .hero-social {

    justify-content: center;

  }

  

  .image-wrapper {

    width: 300px;

    height: 300px;

    margin: 0 auto;

  }

  

  .status-badge {

    justify-content: center;

  }

}



@media (max-width: 640px) {

  .hero-title {

    font-size: 2rem;

    line-height: 1.3;

  }

  

  .hero-description {

    font-size: 1rem;

  }

  

  .image-wrapper {

    width: 250px;

    height: 250px;

  }

  

  .hero-buttons {

    flex-direction: column;

    width: 100%;

  }

  

  .btn {

    width: 100%;

    justify-content: center;

  }

}



/* Stats Section */

@media (max-width: 968px) {

  .stats-grid {

    grid-template-columns: repeat(2, 1fr);

    gap: 1rem;

  }

}



@media (max-width: 480px) {

  .stats-grid {

    grid-template-columns: 1fr;

  }

  

  .stat-number {

    font-size: 2.5rem;

  }

}



/* About Section */

@media (max-width: 968px) {

  .about-content {

    grid-template-columns: 1fr;

    gap: 2rem;

  }

  

  .about-image {

    order: -1;

  }

  

  .about-card img {

    height: 350px;

  }

  

  .about-text {

    text-align: center;

  }

  

  .about-highlights {

    grid-template-columns: 1fr;

  }

  

  .highlight-item {

    justify-content: center;

  }

}



@media (max-width: 640px) {

  .about-card img {

    height: 300px;

  }

  

  .about-text h3 {

    font-size: 1.5rem;

  }

}



/* Timeline */

@media (max-width: 640px) {

  .timeline {

    padding-left: 30px;

  }

  

  .timeline::before {

    left: 10px;

  }

  

  .timeline-dot {

    left: -28px;

    width: 12px;

    height: 12px;

  }

  

  .timeline-content {

    padding: 1rem;

  }

}



/* Skills Section */

@media (max-width: 968px) {

  .skills-grid {

    grid-template-columns: 1fr;

    gap: 1.5rem;

  }

}



/* Services Section */

@media (max-width: 968px) {

  .services-grid {

    grid-template-columns: 1fr;

    gap: 1.5rem;

  }

}



@media (max-width: 640px) {

  .service-card {

    padding: 1.5rem;

  }

}



/* Technologies Section */

@media (max-width: 968px) {

  .tech-icons {

    grid-template-columns: repeat(3, 1fr);

  }

}



@media (max-width: 640px) {

  .tech-icons {

    grid-template-columns: repeat(2, 1fr);

  }

}



/* Projects Section */

@media (max-width: 968px) {

  .projects-grid {

    grid-template-columns: 1fr;

  }

}



/* Testimonials Section */

@media (max-width: 968px) {

  .testimonials-grid {

    grid-template-columns: 1fr;

  }

}



/* Contact Section */

@media (max-width: 968px) {

  .contact-wrapper {

    grid-template-columns: 1fr;

    gap: 2rem;

  }

  

  .contact-info {

    text-align: center;

  }

  

  .contact-items {

    align-items: center;

  }

  

  .contact-social {

    justify-content: center;

  }

}



@media (max-width: 640px) {

  .contact-info h3 {

    font-size: 1.5rem;

  }

  

  .form-group input,

  .form-group textarea {

    font-size: 0.95rem;

  }

}



/* Section Titles */

@media (max-width: 968px) {

  .section-title {

    font-size: 2rem;

  }

}



@media (max-width: 640px) {

  .section-title {

    font-size: 1.75rem;

  }

}



/* Container */

@media (max-width: 640px) {

  .container {

    padding: 0 1rem;

  }

  

  .section {

    padding: 3rem 0;

  }

}



/* Scroll to Top Button */

@media (max-width: 640px) {

  .scroll-top-btn {

    width: 45px;

    height: 45px;

    bottom: 20px;

    right: 20px;

  }

  

  .scroll-top-btn svg {

    width: 20px;

    height: 20px;

  }

}



/* ================================

   CORRECTIONS SUPPLÉMENTAIRES

================================ */



/* Fix du menu burger */

.mobile-menu-toggle {

  position: relative;

  z-index: 1002;

  cursor: pointer;

  -webkit-tap-highlight-color: transparent;

}



.mobile-menu-toggle span {

  display: block;

}



/* Animation du menu burger */

.mobile-menu-toggle.active span:nth-child(1) {

  transform: rotate(45deg) translate(6px, 6px);

}



.mobile-menu-toggle.active span:nth-child(2) {

  opacity: 0;

  transform: translateX(20px);

}



.mobile-menu-toggle.active span:nth-child(3) {

  transform: rotate(-45deg) translate(6px, -6px);

}



/* Amélioration du touch sur mobile */

@media (max-width: 968px) {

  .navbar-link {

    -webkit-tap-highlight-color: transparent;

    user-select: none;

  }

  

  .btn {

    -webkit-tap-highlight-color: transparent;

  }

}



/* Fix des images responsive */

img {

  max-width: 100%;

  height: auto;

}



/* Fix du débordement horizontal */

body {

  overflow-x: hidden;

}



.navbar-menu {

  width: 100%;

}



/* Amélioration de la lisibilité sur mobile */

@media (max-width: 640px) {

  body {

    font-size: 15px;

    line-height: 1.7;

  }

  

  p {

    margin-bottom: 1rem;

  }

}



/* Fix de la hauteur du viewport sur mobile */

@media (max-width: 968px) {

  .section {

    min-height: auto;

  }

  

  .hero-section {

    min-height: auto !important;

    padding-top: 2rem;

  }

}



/* Performance - Réduction des animations sur mobile */

@media (prefers-reduced-motion: reduce) {

  * {

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

  }

}

/* ===================================
   AMÉLIORATIONS MOBILE - OPTIMISATIONS
   =================================== */

/* Désactiver animations image profil sur mobile */
@media (max-width: 968px) {
  .image-wrapper,
  .image-wrapper img {
    animation: none !important;
    transform: none !important;
  }
  
  .image-wrapper::before,
  .image-wrapper::after {
    display: none !important;
  }
  
  /* Désactiver effets lourds */
  .orb,
  .matrix-rain,
  .rising-particles {
    display: none !important;
  }
  
  /* Background simplifié */
  .navbar-menu {
    background: rgba(2, 5, 9, 0.98) !important;
  }
}

/* Mobile - 1 colonne pour projets */
@media (max-width: 640px) {
  .section {
    padding: 2rem 0 !important;
    min-height: auto !important;
    display: block !important;
  }
  
  .projects-grid-modern {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  
  .project-image-modern {
    height: 200px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr !important;
  }
  
  .footer-links {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    text-align: center;
  }
  
  .modal-tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Petit mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem !important;
  }
  
  .image-wrapper {
    width: 220px !important;
    height: 220px !important;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .project-image-modern {
    height: 180px;
  }
}

