/* ========================================
   MEDILIB - COMPOSANTS
   ======================================== */

/* --- INFO CARDS --- */
.cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: -15px;
  padding: 40px 20px 50px;
}

.card {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  width: 300px;
  padding: 25px 20px;
  text-align: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
}

.card-icon {
  font-size: 2em;
  color: #00A5A7;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

/* Animation de rebond pour les icônes au survol */
.card:hover .card-icon {
  animation: bounce 1.2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

.card h3 {
  color: #00A5A7;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.card p {
  font-size: 0.95em;
  color: #555;
  line-height: 1.5em;
}

.card a {
  display: inline-block;
  margin-top: 15px;
  color: #00A5A7;
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* STATISTIQUES SECTION */
.stats-section {
  background-color: #f8f9fa;
  padding: 80px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.stats-section h2 {
  color: #002B40;
  font-size: 2.5em;
  margin-bottom: 60px;
  font-weight: 600;
  margin-top: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1000px;
  align-self: center;
  width: 100%;
}

.stat-item {
  background: white;
  padding: 30px 15px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.stat-item:hover {
  transform: scale(1.25) translateZ(30px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  z-index: 10;
}

/* Effet de recul pour les autres éléments */
.stats-grid:hover .stat-item:not(:hover) {
  transform: scale(0.9) translateZ(-15px);
  opacity: 0.6;
}

.stat-number {
  font-size: 3em;
  font-weight: 700;
  color: #00A5A7;
  margin-bottom: 10px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.stat-item:hover .stat-number {
  transform: scale(1.1) translateY(-5px);
  color: #00898b;
  text-shadow: 0 2px 8px rgba(0, 165, 167, 0.3);
}

.stat-label {
  font-size: 1.1em;
  color: #555;
  font-weight: 500;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover .stat-label {
  transform: translateY(-3px);
  color: #333;
  font-weight: 600;
}

/* FONCTIONNALITÉS SECTION */
.features-section {
  padding: 60px 0;
  background: white;
  position: relative;
  margin-top: -40px;
  z-index: 10;
  border-radius: 20px 20px 0 0;
}

.features-section h2 {
  text-align: center;
  color: #002B40;
  font-size: 2.3em;
  margin-bottom: 45px;
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
}

.feature-item {
  text-align: center;
  padding: 30px 25px;
}

.feature-icon {
  font-size: 3em;
  color: #00A5A7;
  margin-bottom: 25px;
}

.feature-item h3 {
  color: #002B40;
  font-size: 1.4em;
  margin-bottom: 20px;
  font-weight: 600;
}

.feature-item p {
  color: #666;
  line-height: 1.6;
  font-size: 1em;
}

/* SECTION APPLICATION */
.app-section {
  background: linear-gradient(135deg, #00A5A7 0%, #EAF9F8 100%);
  padding: 100px 0;
}

.app-content {
  display: flex;
  align-items: center;
  gap: 80px;
}

.app-text {
  flex: 1;
  color: white;
}

.app-text h2 {
  font-size: 2.5em;
  margin-bottom: 25px;
  font-weight: 600;
  line-height: 1.3;
}

.app-text p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #f5fdfc;
}

.app-rating {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
}

.stars {
  display: flex;
  gap: 5px;
}

.stars i {
  color: #ffd700;
  font-size: 1.2em;
}

.app-rating span {
  color: #f5fdfc;
  font-weight: 500;
}

.app-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.app-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.app-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.app-btn i {
  font-size: 2em;
}

.app-btn div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.app-btn span {
  font-size: 0.8em;
  opacity: 0.8;
}

.app-btn strong {
  font-size: 1.1em;
  font-weight: 600;
}

.app-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.phone-mockup:hover {
  transform: rotateY(-10deg) rotateX(5deg) translateY(-10px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  position: relative;
}

/* Conteneur vidéo dans le téléphone */
.app-video-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 25px;
}

.app-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
  transition: all 0.5s ease;
}

/* Fallback si la vidéo ne charge pas */
.app-preview-fallback {
  padding: 30px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
}

/* Overlay avec indicateur de lecture */
.video-overlay-mobile {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 25px;
}

.app-video-container:hover .video-overlay-mobile {
  opacity: 1;
}

.play-indicator {
  width: 50px;
  height: 50px;
  background: rgba(0, 165, 167, 0.9);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.play-indicator:hover {
  transform: scale(1.1);
  background: rgba(0, 165, 167, 1);
}

.play-indicator i {
  color: white;
  font-size: 1.2em;
  margin-left: 3px;
}

.app-preview {
  padding: 30px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app-header {
  text-align: center;
  font-size: 1.5em;
  font-weight: 600;
  color: #00A5A7;
  margin-bottom: 40px;
}

.app-content-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.preview-item i {
  font-size: 1.5em;
  color: #00A5A7;
}

.preview-item span {
  font-weight: 500;
  color: #333;
}

/* SECTION PROFESSIONNELS DE SANTÉ */
.healthcare-section {
  padding: 100px 0;
  background: white;
}

.healthcare-content {
  display: flex;
  align-items: center;
  gap: 80px;
}

.healthcare-text {
  flex: 1;
}

.healthcare-text h2 {
  color: #002B40;
  font-size: 2.5em;
  margin-bottom: 25px;
  font-weight: 600;
}

.healthcare-text p {
  color: #666;
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
}

.healthcare-benefits {
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}

.healthcare-benefits li {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  color: #555;
  font-size: 1em;
}

.healthcare-benefits i {
  color: #00A5A7;
  font-size: 1.2em;
}

.btn-primary {
  background: #00A5A7;
  color: white;
  padding: 15px 35px;
  border-radius: 35px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #00898b;
  transform: translateY(-2px);
}

.healthcare-image {
  flex: 1;
  text-align: center;
  position: relative;
}

.healthcare-image img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Conteneur vidéo avec effets flip flap */
.healthcare-video-container {
  position: relative;
  display: inline-block;
  perspective: 1200px;
}

.video-frame-healthcare {
  width: 400px;
  height: 300px;
  background: white;
  border-radius: 25px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  overflow: hidden;
  position: relative;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.video-frame-healthcare:hover {
  transform: rotateY(-15deg) rotateX(10deg) scale(1.08);
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}

.video-frame-healthcare video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
}

.video-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
}

/* Overlay avec bouton play */
.video-overlay-healthcare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 25px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.video-frame-healthcare:hover .video-overlay-healthcare {
  opacity: 1;
}

.play-button-healthcare {
  width: 90px;
  height: 90px;
  background: rgba(0, 165, 167, 0.9);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s ease;
  backdrop-filter: blur(15px);
  border: 3px solid rgba(255,255,255,0.3);
}

.play-button-healthcare:hover {
  transform: scale(1.15) rotate(5deg);
  background: rgba(0, 165, 167, 1);
  box-shadow: 0 10px 30px rgba(0, 165, 167, 0.4);
}

.play-button-healthcare i {
  color: white;
  font-size: 2.2em;
  margin-left: 5px;
}

/* Décorations flip flap spectaculaires */
.flip-flap-decoration {
  position: absolute;
  background: linear-gradient(45deg, #00A5A7, #EAF9F8, #00A5A7);
  border-radius: 20px;
  opacity: 0.9;
  animation: flipFlapSpectacular 8s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.decoration-1 {
  width: 70px;
  height: 70px;
  top: -35px;
  left: -35px;
  animation-delay: 0s;
  transform: rotate(45deg);
  background: linear-gradient(45deg, #00A5A7, #00898b);
}

.decoration-2 {
  width: 50px;
  height: 50px;
  top: 20%;
  right: -25px;
  animation-delay: 2s;
  transform: rotate(-30deg);
  background: linear-gradient(45deg, #EAF9F8, #00A5A7);
}

.decoration-3 {
  width: 60px;
  height: 60px;
  bottom: -30px;
  left: 30px;
  animation-delay: 4s;
  transform: rotate(60deg);
  background: linear-gradient(45deg, #00A5A7, #EAF9F8, #00898b);
}

.decoration-4 {
  width: 40px;
  height: 40px;
  top: 60%;
  right: 20px;
  animation-delay: 6s;
  transform: rotate(-45deg);
  background: linear-gradient(45deg, #EAF9F8, #00A5A7);
}

@keyframes flipFlapSpectacular {
  0%, 100% {
    transform: translateY(0px) rotate(var(--rotation, 0deg)) scale(1);
  }
  12.5% {
    transform: translateY(-25px) rotate(calc(var(--rotation, 0deg) + 45deg)) scale(1.1);
  }
  25% {
    transform: translateY(-15px) rotate(calc(var(--rotation, 0deg) + 90deg)) scale(0.9);
  }
  37.5% {
    transform: translateY(-35px) rotate(calc(var(--rotation, 0deg) + 135deg)) scale(1.2);
  }
  50% {
    transform: translateY(-20px) rotate(calc(var(--rotation, 0deg) + 180deg)) scale(1);
  }
  62.5% {
    transform: translateY(-30px) rotate(calc(var(--rotation, 0deg) + 225deg)) scale(1.1);
  }
  75% {
    transform: translateY(-10px) rotate(calc(var(--rotation, 0deg) + 270deg)) scale(0.8);
  }
  87.5% {
    transform: translateY(-40px) rotate(calc(var(--rotation, 0deg) + 315deg)) scale(1.3);
  }
}
