/* ==========================================
   MY PRETTY FAMILY - Page Concept
   Styles + Animations modernes
   ========================================== */

/* ==================== VARIABLES ==================== */
:root {
  --primary: #6A8FB9;
  --primary-dark: #5a7fa9;
  --primary-light: #8bb0d4;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== PAGE HERO ==================== */
.page-hero {
  padding: 140px 48px 80px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Formes flottantes en arrière-plan */
.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(106, 143, 185, 0.08);
  animation: floatShape 20s ease-in-out infinite;
  pointer-events: none;
}

.page-hero::before {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.page-hero::after {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -80px;
  animation-delay: -10s;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -20px) rotate(5deg); }
  50% { transform: translate(0, 0) rotate(0deg); }
  75% { transform: translate(-20px, 20px) rotate(-5deg); }
}

.page-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6A8FB9;
  text-decoration: none;
  margin-bottom: 32px;
  transition: gap 0.2s;
}

.back-link:hover {
  gap: 12px;
}

.page-hero-label {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(106, 143, 185, 0.15);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: #6A8FB9;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  opacity: 0;
  animation: revealUp 0.8s ease forwards;
  animation-delay: 0.1s;
}

.page-hero-title {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.15;
  margin-bottom: 20px;
  opacity: 0;
  animation: revealUp 0.8s ease forwards;
  animation-delay: 0.3s;
}

.page-hero-subtitle {
  font-size: 18px;
  color: #666;
  line-height: 1.7;
  opacity: 0;
  animation: revealUp 0.8s ease forwards;
  animation-delay: 0.5s;
}

@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== INTRO BLOCK ==================== */
.intro-block {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.intro-icon {
  font-size: 48px;
  color: #6A8FB9;
  margin-bottom: 24px;
}

.intro-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.intro-text {
  font-size: 17px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 16px;
}

.intro-text strong {
  color: #1a1a1a;
}

/* ==================== ADN GRID ==================== */
.adn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  perspective: 1000px;
}

.adn-card {
  position: relative;
  background: white;
  padding: 36px 28px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.adn-card:nth-child(1) { animation-delay: 0.1s; }
.adn-card:nth-child(2) { animation-delay: 0.2s; }
.adn-card:nth-child(3) { animation-delay: 0.3s; }
.adn-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bordure gradient au hover */
.adn-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, #6A8FB9 0%, #a8c5e0 50%, #6A8FB9 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.adn-card:hover::before {
  opacity: 1;
}

/* Effet glow derrière la carte */
.adn-card::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, rgba(106, 143, 185, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  border-radius: 30px;
}

.adn-card:hover::after {
  opacity: 1;
}

.adn-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(106, 143, 185, 0.2);
}

.adn-number {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #6A8FB9;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.adn-card:hover .adn-number {
  opacity: 1;
  transform: scale(1.2);
}

.adn-icon {
  font-size: 36px;
  color: #6A8FB9;
  margin-bottom: 20px;
  transition: all 0.4s var(--transition-bounce);
}

.adn-card:hover .adn-icon {
  transform: scale(1.2) rotate(-10deg);
  color: #5a7fa9;
}

.adn-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.adn-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* ==================== NOT GRID ==================== */
.not-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.not-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Effet shine au hover */
.not-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(224, 112, 112, 0.05), transparent);
  transition: left 0.5s ease;
}

.not-item:hover::before {
  left: 100%;
}

.not-item:hover {
  background: #fff5f5;
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(224, 112, 112, 0.1);
}

.not-item i {
  flex-shrink: 0;
  font-size: 20px;
  color: #e07070;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.not-item:hover i {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.not-item strong {
  display: block;
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.not-item span {
  font-size: 13px;
  color: #666;
}

/* ==================== PRODUCTS GRID ==================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

/* .product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(106, 143, 185, 0.15);
} */

.product-card-featured {
  border: 2px solid #6A8FB9;
}

.product-image {
  position: relative;
  height: 280px; /* Un peu plus d'espace en hauteur */
  background: linear-gradient(135deg, #f0f4f8 0%, #eef2f7 100%); /* Fond subtil */
  padding: 40px; /* L'espace qui crée la "marge" autour de ton image */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* Important pour laisser l'ombre dépasser si besoin */
  z-index: 1;
}

.product-image::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  background: white;
  border-radius: 50%;
  opacity: 0.5;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.5s ease;
}

.product-card:hover .product-image::before {
  transform: translate(-50%, -50%) scale(1.2);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* LA CLÉ : On affiche tout le produit sans le couper */
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.12)); /* Ombre portée réaliste */
  transform: rotate(-3deg) scale(0.95); /* Petit effet "posé de travers" dynamique */
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Animation rebondie */
}

.product-card:hover .product-image img {
  transform: rotate(0deg) scale(1.05) translateY(-5px); /* Il se redresse et flotte */
  filter: drop-shadow(0 25px 35px rgba(106, 143, 185, 0.25)); /* L'ombre grandit */
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  background: #6A8FB9;
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
}

.product-badge-gold {
  background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
}

.product-content {
  padding: 28px;
}

.product-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.product-tagline {
  font-size: 14px;
  color: #6A8FB9;
  font-weight: 500;
  margin-bottom: 20px;
}

.product-features {
  list-style: none;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.product-features li:last-child {
  margin-bottom: 0;
}

.product-features li i {
  color: #5a9a6a;
  font-size: 12px;
  margin-top: 3px;
}

.product-features li strong {
  color: #1a1a1a;
}

/* ==================== FORMULE BLOCKS ==================== */
.formule-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.formule-block.revealed {
  opacity: 1;
  transform: translateY(0);
}

.formule-block:last-child {
  margin-bottom: 0;
}

.formule-block-reverse {
  direction: rtl;
}

.formule-block-reverse > * {
  direction: ltr;
}

.formule-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(106, 143, 185, 0.1);
  color: #6A8FB9;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.formule-badge:hover {
  transform: scale(1.05);
}

.formule-badge-popular {
  background: #6A8FB9;
  color: white;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(106, 143, 185, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(106, 143, 185, 0); }
}

.formule-popular-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 12px;
  color: #5a9a6a;
  font-weight: 600;
}

.formule-popular-tag::before {
  content: '★';
  animation: starTwinkle 1.5s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.formule-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.formule-tagline {
  font-size: 16px;
  color: #6A8FB9;
  font-weight: 500;
  margin-bottom: 16px;
}

.formule-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 24px;
}

.formule-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formule-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #555;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.formule-detail:hover {
  background: rgba(106, 143, 185, 0.08);
  transform: translateX(8px);
}

.formule-detail i {
  width: 20px;
  color: #6A8FB9;
  transition: all 0.3s var(--transition-bounce);
}

.formule-detail:hover i {
  transform: scale(1.3);
}

.formule-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease;
  position: relative;
}

.formule-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(106, 143, 185, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 20px;
}

.formule-block:hover .formule-image {
  transform: scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.formule-block:hover .formule-image::after {
  opacity: 1;
}

.formule-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==================== COMPARE TABLE ==================== */
.compare-table-wrapper {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.compare-table th,
.compare-table td {
  padding: 20px 24px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.compare-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #1a1a1a;
  vertical-align: top;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
}

.compare-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.compare-tagline {
  display: block;
  font-size: 12px;
  color: #888;
  font-weight: 400;
}

.compare-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #5a9a6a;
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.compare-badge:hover {
  transform: scale(1.1);
}

.compare-popular {
  background: rgba(106, 143, 185, 0.05);
  position: relative;
}

/* Ligne gradient sur colonne populaire */
.compare-table thead th.compare-popular::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6A8FB9, #8bb0d4, #6A8FB9);
  background-size: 200% auto;
  animation: gradientMove 3s linear infinite;
  border-radius: 4px 4px 0 0;
}

@keyframes gradientMove {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.compare-feature {
  font-weight: 600;
  color: #333;
}

.compare-table td {
  font-size: 14px;
  color: #555;
}

.compare-table td i {
  color: #5a9a6a;
  font-size: 16px;
  transition: all 0.3s var(--transition-bounce);
}

.compare-table tbody tr {
  transition: all 0.3s ease;
}

.compare-table tbody tr:hover {
  background: rgba(106, 143, 185, 0.05);
}

.compare-table tbody tr:hover td {
  color: #1a1a1a;
}

.compare-table tbody tr:hover td i.fa-check {
  transform: scale(1.3);
  color: #4a8a5a;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* Colonne hover highlight */
.compare-table .column-hover {
  background: rgba(106, 143, 185, 0.08) !important;
}

/* ==================== CTA FINAL ==================== */
.cta-final {
  padding: 100px 48px;
  background: linear-gradient(135deg, #6A8FB9 0%, #5a7fa9 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Fond rotatif */
.cta-final::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cta-final-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-final-title {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.cta-final-text {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline-white {
  display: inline-block;
  background: transparent;
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

/* Effet shine */
.btn-outline-white::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-outline-white:hover::before {
  left: 100%;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .adn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .formule-block {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .formule-block-reverse {
    direction: ltr;
  }
  
  .formule-image {
    order: -1;
  }
  
  .formule-block:hover .formule-image {
    transform: none;
  }
}

@media (max-width: 768px) {
  .page-hero {
  padding: 140px 48px 80px;
  background: 
    radial-gradient(circle at 10% 20%, rgba(106, 143, 185, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(106, 143, 185, 0.05) 0%, transparent 20%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
  
  .page-hero::before,
  .page-hero::after {
    display: none;
  }
  
  .adn-grid {
    grid-template-columns: 1fr;
  }
  
  .adn-card:hover {
    transform: translateY(-5px);
  }
  
  .not-grid {
    grid-template-columns: 1fr;
  }
  
  .formule-title {
    font-size: 26px;
  }
  
  .cta-final {
    padding: 80px 24px;
  }
  
  .cta-final-title {
    font-size: 28px;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-outline-white {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .adn-card,
  .formule-block,
  .not-item,
  .page-hero-label,
  .page-hero-title,
  .page-hero-subtitle {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .formule-badge-popular,
  .cta-final::before {
    animation: none;
  }
  
  .formule-block {
    opacity: 1;
    transform: none;
  }
}