/* ==================== MOCKUP.CSS - MOCKUPS SMARTPHONE ==================== */
/* Composant CSS pour afficher des screenshots dans des cadres iPhone */

/* ==================== CONTAINER PRINCIPAL ==================== */

.mockup-section {
  width: 100%;
  padding: var(--spacing-2xl) 0;
  background: var(--color-bg-secondary);
}

/* ==================== VARIANTE INLINE (dans un account-block) ==================== */

.mockup-section--inline {
  background: transparent !important; /* Garde transparent pour ne pas cacher account-block */
  padding: 0; /* Pas de padding sur la section */
}

/* Donner à mockup-container les mêmes styles que account-box */
.mockup-section--inline .mockup-container {
  background: var(--color-bg); /* Fond gris comme account-box */
  border: 1px solid var(--color-border); /* Bordure comme account-box */
  border-radius: var(--radius); /* Coins arrondis comme account-box */
  padding: var(--spacing-md); /* Padding comme account-box */
  margin: 0; /* Pas de margin */
  width: 100%; /* Pleine largeur */
  max-width: none; /* Pas de max-width */
}

.mockup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ==================== TITRE DE LA SECTION ==================== */

.mockup-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.mockup-subtitle {
  font-size: var(--font-size-lg);
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: var(--line-height-relaxed);
}

/* ==================== GRILLE DE MOCKUPS ==================== */

.mockup-grid {
  display: grid;
  gap: var(--spacing-xl);
  width: 100%;
}

/* 1 mockup centré */
.mockup-grid--single {
  grid-template-columns: 1fr;
  place-items: center;
}

/* 2 mockups côte à côte */
.mockup-grid--dual {
  grid-template-columns: repeat(2, 1fr);
}

/* 3 mockups */
.mockup-grid--triple {
  grid-template-columns: repeat(3, 1fr);
}

/* ==================== MOCKUP ITEM (avec texte) ==================== */

.mockup-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  text-align: center;
}

.mockup-item__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.mockup-item__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  max-width: 280px;
  line-height: var(--line-height-normal);
}

/* ==================== IPHONE MOCKUP ==================== */

.iphone-mockup {
  perspective: 1200px;
  position: relative;
}

.iphone-frame {
  width: 280px;
  height: 570px;
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
  border-radius: 42px;
  padding: 14px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  transform: rotateY(-8deg) rotateX(2deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.iphone-mockup:hover .iphone-frame {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

/* Encoche (notch) iPhone */
.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 28px;
  background: #1c1c1e;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

/* Bouton power (côté droit) */
.iphone-button-power {
  position: absolute;
  right: -2px;
  top: 120px;
  width: 3px;
  height: 60px;
  background: linear-gradient(90deg, #2c2c2e 0%, #1c1c1e 100%);
  border-radius: 0 2px 2px 0;
}

/* Boutons volume (côté gauche) */
.iphone-button-volume {
  position: absolute;
  left: -2px;
  top: 100px;
  width: 3px;
  height: 30px;
  background: linear-gradient(270deg, #2c2c2e 0%, #1c1c1e 100%);
  border-radius: 2px 0 0 2px;
}

.iphone-button-volume::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50px;
  width: 3px;
  height: 50px;
  background: linear-gradient(270deg, #2c2c2e 0%, #1c1c1e 100%);
  border-radius: 2px 0 0 2px;
}

/* Écran */
.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) inset;
}

/* Image à l'intérieur */
.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ==================== VARIANTES DE COULEURS ==================== */

/* iPhone blanc */
.iphone-frame--white {
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ea 100%);
}

.iphone-frame--white .iphone-notch,
.iphone-frame--white .iphone-button-power,
.iphone-frame--white .iphone-button-volume,
.iphone-frame--white .iphone-button-volume::after {
  background: #d1d1d6;
}

/* iPhone bleu */
.iphone-frame--blue {
  background: linear-gradient(135deg, #2c5f8d 0%, #1c4966 100%);
}

/* iPhone or */
.iphone-frame--gold {
  background: linear-gradient(135deg, #d4af6a 0%, #b8935a 100%);
}

/* ==================== RESPONSIVE MOBILE ==================== */

@media (max-width: 768px) {
  /* Tous les mockups s'empilent verticalement */
  .mockup-grid--dual,
  .mockup-grid--triple {
    grid-template-columns: 1fr;
  }
  
  /* Réduire la taille des mockups sur mobile */
  .iphone-frame {
    width: 240px;
    height: 490px;
    border-radius: 38px;
    padding: 12px;
  }
  
  .iphone-notch {
    width: 120px;
    height: 24px;
  }
  
  /* Retirer la perspective 3D sur mobile */
  .iphone-frame {
    transform: none;
  }
  
  .iphone-mockup:hover .iphone-frame {
    transform: scale(1.02);
  }
  
  /* Titres plus petits */
  .mockup-title {
    font-size: var(--font-size-2xl);
  }
  
  .mockup-subtitle {
    font-size: var(--font-size-base);
  }
}

/* ==================== ANIMATIONS ==================== */

@keyframes float {
  0%, 100% {
    transform: rotateY(-8deg) rotateX(2deg) translateY(0);
  }
  50% {
    transform: rotateY(-8deg) rotateX(2deg) translateY(-10px);
  }
}

/* Animation flottante au survol (optionnelle) */
.iphone-mockup:hover .iphone-frame {
  animation: float 3s ease-in-out infinite;
}

/* ==================== DARK MODE ==================== */

:root[data-theme="dark"] .mockup-section {
  background: var(--color-bg);
}

:root[data-theme="dark"] .iphone-frame {
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* Fond plus clair pour mockup-container en dark mode (comme account-box) */
:root[data-theme="dark"] .mockup-section--inline .mockup-container {
  background: rgba(255, 255, 255, 0.03);
}

/* ==================== CHANGEMENT D'IMAGE SELON LE THÈME ==================== */

/* Par défaut, afficher l'image light et masquer dark */
.mockup-img--light {
  display: block;
}

.mockup-img--dark {
  display: none;
}

/* En mode sombre, inverser */
:root[data-theme="dark"] .mockup-img--light {
  display: none;
}

:root[data-theme="dark"] .mockup-img--dark {
  display: block;
}

/* Transition fluide lors du changement */
.mockup-img {
  transition: opacity 0.3s ease;
}