/* Mobile-specific styles for Portfolio */

/* Condensed accueil section to fit without scrolling */
#accueil {
  min-height: 100vh;
  padding-top: 4.5rem;
  padding-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#accueil .flex {
  transform: scale(0.95);
}

/* Agrandir la photo de profil */
#accueil .w-32, 
#accueil .w-32.h-32,
#accueil .rounded-full {
  width: 12rem !important;
  height: 12rem !important;
}

/* Styles pour la nouvelle carte de contact */
.contact-card {
  background-color: rgba(49, 46, 129, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(67, 56, 202, 0.5) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
  width: 100% !important;
  overflow: hidden;
}

.contact-item {
  border-bottom: 1px solid rgba(79, 70, 229, 0.2);
  padding: 1rem 0.75rem !important;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.contact-item:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-item:hover:before {
  opacity: 1;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-icon-wrapper {
  background-color: rgba(55, 48, 163, 0.8) !important;
  border-radius: 0.75rem !important;
  width: 3.5rem !important;
  height: 3.5rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 10;
}

/* Animation 3D pour les icônes */
.contact-3d-icon {
  transform-style: preserve-3d;
  perspective: 800px;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
}

.contact-3d-icon:hover {
  transform: translateZ(20px) rotateY(15deg);
}

.contact-3d-icon:hover .contact-icon-wrapper {
  box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.3);
  background-color: rgba(79, 70, 229, 0.8) !important;
}

.contact-icon-wrapper i {
  font-size: 1.5rem !important;
  color: white !important;
  transition: transform 0.3s ease, color 0.3s ease;
}

.contact-3d-icon:hover i {
  transform: scale(1.2);
  color: #22d3ee !important; /* cyan-400 */
}

.contact-info {
  color: white !important;
  font-size: 1.25rem !important;
  font-weight: 500 !important;
  word-break: break-word;
  transition: color 0.3s ease;
}

.contact-info:hover {
  color: #22d3ee !important; /* cyan-400 */
}

/* Animation de pulsation subtile */
@keyframes subtle-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.contact-3d-icon {
  animation: subtle-pulse 3s infinite;
}

/* Styles pour le menu avec icônes alignées */
.menu-icon-container {
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  perspective: 800px;
  position: relative;
}

.menu-icon-container:hover {
  transform: translateZ(10px) scale(1.1);
  background-color: rgba(79, 70, 229, 0.7);
}

.menu-icon-container:hover i {
  transform: scale(1.2);
}

li a.nav-link {
  transition: all 0.3s ease;
}

li:hover a.nav-link {
  transform: translateY(5px);
}

/* Maximiser l'utilisation de l'espace */
#accueil .neo-brutalist {
  padding: 0.75rem !important;
  margin-top: 0.5rem;
  width: 95% !important;
  border-radius: 0.75rem;
}

/* Améliorer la disposition globale */
#accueil .flex-col {
  gap: 0.5rem;
}

/* Base mobile adjustments */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }
  
  /* Improve vertical spacing */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Make hero content more compact */
  .hero-content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Better mobile touch interactions */
  .hover-effect {
    /* Disable hover effects that don't work well on touch devices */
    transition: none;
  }
  
  /* Improve form elements for mobile */
  input, textarea, select, button {
    font-size: 16px !important; /* Prevent iOS zoom on focus */
    max-width: 100%;
  }
  
  /* Fix for modal scrolling issues */
  .modal {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Improve gallery layouts */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  
  /* Better mobile cards */
  .card {
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
  }
  
  /* Full-width containers on mobile */
  .mobile-full-width {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  /* Even smaller text for very small screens */
  html {
    font-size: 14px;
  }
  
  /* Simplify complex layouts */
  .grid {
    display: block !important;
  }
  
  /* Reduce padding further */
  .px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Optimize buttons for fat fingers */
  button, .button, a.button {
    min-height: 48px;
    margin-bottom: 0.75rem;
  }
  
  /* Better spacing for small screens */
  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem;
  }
  
  /* Force proper image sizing */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Make modals fully-responsive */
  .modal-content {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
  }
}

/* Landscape orientation specific fixes */
@media (max-height: 480px) and (orientation: landscape) {
  .header {
    height: auto;
    min-height: 60px;
  }
  
  .mobile-menu {
    max-height: 100vh;
    overflow-y: auto;
  }
  
  /* Adjust hero section for landscape */
  .hero-section {
    min-height: 450px;
    padding-top: 60px;
  }
  
  /* Smaller modals in landscape */
  .modal-content {
    max-height: 80vh;
    margin: 10vh auto;
  }
}

/* Fix for iOS Safari viewport height issue */
@supports (-webkit-touch-callout: none) {
  .min-h-screen {
    min-height: -webkit-fill-available;
  }
  
  .h-screen {
    height: -webkit-fill-available;
  }
}

/* Better scrolling behavior on iOS */
* {
  -webkit-overflow-scrolling: touch;
}

/* Remove tap highlight color on iOS */
* {
  -webkit-tap-highlight-color: transparent;
}
