/* ===== SECTION FONCTIONNALITÉS - LAYOUT VERTICAL AVEC MOCKUP IPAD ===== */

.features-section {
  background: linear-gradient(135deg, #2E86DE 0%, #1e40af 100%);
  padding: var(--spacing-3xl) 0 var(--spacing-4xl) 0;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Formes minimalistes blanches */
.features-section::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 3%;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: pulseShape 7s ease-in-out infinite;
}

.features-container::before {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.03);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: hexagonFloat 9s ease-in-out infinite;
}

.features-container::after {
  content: '';
  position: absolute;
  top: 25%;
  right: 20%;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  animation: squareRotate 12s linear infinite;
}

@keyframes pulseShape {
  0%, 100% { transform: scale(1); opacity: 0.04; }
  50% { transform: scale(1.2); opacity: 0.07; }
}

@keyframes hexagonFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.03; }
  50% { transform: translateY(-15px) rotate(180deg); opacity: 0.06; }
}

@keyframes squareRotate {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(1); }
  75% { transform: rotate(270deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}

.features-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4xl);
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Override pour nouveau layout centré */
.features-container-centered {
  display: flex !important;
  flex-direction: column !important;
}

/* Ordre inversé : iPad à gauche, contenu à droite */
.features-content-left {
  order: 1;
  width: 100%;
}

.features-mockup-right,
.features-mockup-centered {
  order: 2;
  width: 100%;
}

/* ===== CONTENU FONCTIONNALITÉS À GAUCHE ===== */
.features-content-left {
  color: var(--white);
  padding: var(--spacing-xl);
}

.features-header {
  margin-bottom: var(--spacing-3xl);
}

.features-header h2 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.features-subtitle {
  font-size: 1.3rem;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.6;
}

.features-grid-new {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  width: 100%;
  max-width: 1200px;
}

.feature-card-new {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.feature-card-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.feature-card-new:hover::before {
  opacity: 1;
}

.feature-icon-new {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--white);
  margin: 0 auto var(--spacing-md);
  position: relative;
  z-index: 2;
}

.feature-card-new h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--white);
  position: relative;
  z-index: 2;
}

.feature-card-new p {
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* ===== MOCKUP IPAD À DROITE ===== */
.features-mockup-right {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-xl);
}

.ipad-mockup {
  position: relative;
  transform: scale(1.1);
  animation: floatIpad 6s ease-in-out infinite;
}

@keyframes floatIpad {
  0%, 100% { 
    transform: scale(1.1) translateY(0px) rotate(0deg); 
  }
  50% { 
    transform: scale(1.1) translateY(-15px) rotate(1deg); 
  }
}

.ipad-frame {
  width: 600px;
  height: 450px;
  background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 25px;
  padding: 12px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.ipad-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.ipad-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.ipad-video-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  background: linear-gradient(135deg, #2E86DE 0%, #1e40af 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.ipad-home-button {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
  border-radius: 50%;
  border: 2px solid #333;
  box-shadow: 
    0 5px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* ===== ANIMATIONS ===== */
@keyframes ipadFloat {
  0%, 100% {
    transform: scale(1.1) translateY(0px) rotateX(5deg);
  }
  50% {
    transform: scale(1.1) translateY(-8px) rotateX(5deg);
  }
}

.ipad-mockup {
  animation: ipadFloat 8s ease-in-out infinite;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
  .features-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-3xl);
    text-align: center;
  }
  
  .features-content-left {
    order: 1;
  }
  
  .features-mockup-right {
    order: 2;
  }
  
  .ipad-mockup {
    transform: scale(0.9);
  }
  
  .features-header h2 {
    font-size: 2.5rem;
  }
  
  .features-grid-new {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .features-section {
    padding: var(--spacing-3xl) 0;
  }
  
  .features-container {
    padding: 0 var(--spacing-lg);
    gap: var(--spacing-2xl);
  }
  
  .ipad-frame {
    width: 300px;
    height: 225px;
  }
  
  .features-header h2 {
    font-size: 2rem;
  }
  
  .features-subtitle {
    font-size: 1.1rem;
  }
  
  .feature-card-new {
    padding: var(--spacing-md);
  }
  
  .feature-icon-new {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .feature-card-new h3 {
    font-size: 1rem;
  }
  
  .feature-card-new p {
    font-size: 0.85rem;
  }
}

/* iPhone SE et petits écrans */
@media (max-width: 375px) {
  .features-container {
    padding: 0 var(--spacing-md);
  }
  
  .ipad-frame {
    width: 250px;
    height: 188px;
  }
  
  .features-header h2 {
    font-size: 1.8rem;
  }
}
