/* Styles spécifiques à la page de carte */
:root {
  --primary-color: #ff6b00;
  --secondary-color: #ff0033;
  --accent-color: #d70086;
  --success-color: #009944;
  --highlight-color: #c70064;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* Style pour le canvas des feux d'artifice */
.fireworks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Style pour la carte */
.card-page {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  overflow: visible;
}

.card-page::before {
  content: '🎉';
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 3em;
  opacity: 0.1;
  z-index: 0;
}

.card-page::after {
  content: '🎊';
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 3em;
  opacity: 0.8;
  z-index: 0;
}

.card-display {
  text-align: center;
  padding: 30px 0;
  position: relative;
  z-index: 1;
}

.card-theme {
  font-size: 4em;
  margin-bottom: 20px;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.card-theme::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-theme:hover::after {
  opacity: 0.5;
}

.card-to {
  font-size: 2em;
  color: #667eea;
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.card-to::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-to:hover::after {
  opacity: 0.5;
}

.card-message {
  font-size: 1.3em;
  line-height: 1.8;
  color: #333;
  margin: 0 auto 30px;
  max-width: 80%;
  white-space: pre-line;
  position: relative;
  z-index: 1;
}

.card-from {
  font-size: 1.4em;
  color: #764ba2;
  font-style: italic;
  font-weight: 600;
  margin-top: 40px;
  position: relative;
  display: inline-block;
}

.card-from::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-from:hover::after {
  opacity: 0.5;
}

/* Style pour le nom de l'expéditeur */
.sender-name {
  font-size: 5em;
  display: block;
  text-align: center;
  width: 100%;
  margin: 20px 0;
}

.gradient-text {
  font-size: 5em;
  font-weight: 700;
  background: linear-gradient(90deg, #ff6b00, #ff0033, #d70086, #009944, #c70064);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  animation: gradient 8s ease infinite;
  padding: 0 10px;
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.share-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.share-url {
  color: #333;
  background: rgba(255, 255, 255, 0.5);
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0 25px;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: relative;
  padding-right: 40px;
}

/* Animation pour les boutons */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Animation pulse seulement après le chargement */
.app.loaded .btn {
  animation: pulse 2s infinite;
}

.app.loaded .btn:hover {
  animation: none;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.btn-facebook {
  background: linear-gradient(135deg, #4267B2 0%, #3b5998 100%);
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

/* Zone publicitaire */
.ad-space {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin: 25px 0;
  text-align: center;
  border: 2px dashed #e9ecef;
}

.ad-placeholder {
  color: #6c757d;
  font-style: italic;
}

/* Animation d'apparition */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Les animations ne se déclenchent que quand la classe 'loaded' est présente */
.app.loaded .card-display > * {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.app.loaded .card-display > *:nth-child(1) { animation-delay: 0.2s; }
.app.loaded .card-display > *:nth-child(2) { animation-delay: 0.4s; }
.app.loaded .card-display > *:nth-child(3) { animation-delay: 0.6s; }
.app.loaded .card-display > *:nth-child(4) { animation-delay: 0.8s; }

/* Par défaut, les éléments sont invisibles sans animation */
.card-display > * {
  opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .card-page {
    padding: 20px 15px;
    margin: 10px;
  }
  
  .card-theme {
    font-size: 3em;
  }
  
  .card-to {
    font-size: 1.6em;
    margin-bottom: 20px;
  }
  
  .card-message {
    font-size: 1.1em;
    max-width: 95%;
    margin-bottom: 20px;
  }
  
  .card-from {
    font-size: 1.2em;
    margin-top: 30px;
  }
  
  .share-section {
    padding: 20px 15px;
    margin: 30px 0 20px;
  }
  
  .share-section h3 {
    font-size: 1.2em;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Styles pour la mise en page des vœux */
.wish-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
}

.hero-main {
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

.hero-main img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  display: block;
  animation: rubberBand 2.5s infinite;
  transform-origin: center;
}

@keyframes rubberBand {
  from {
    transform: scale3d(1, 1, 1);
  }

  30% {
    transform: scale3d(1.1, 0.9, 1);
  }

  40% {
    transform: scale3d(0.9, 1.1, 1);
  }

  50% {
    transform: scale3d(1.09898, 0.901018, 1);
  }

  65% {
    transform: scale3d(0.95, 1.05, 1);
  }

  75% {
    transform: scale3d(1.05, 0.95, 1);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.hero-side img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
  animation: tada 4s infinite;
  transform-origin: center;
}

@keyframes tada {
  from {
    transform: scale3d(1, 1, 1);
  }

  10%, 20% {
    transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
  }

  30%, 50%, 70%, 90% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 2.07805deg);
  }

  40%, 60%, 80% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -2.07805deg);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}

.hero-side img:hover {
  transform: scale(1.03);
}

.wish-message {
  font-size: 10px;
  margin: auto;
  max-width: 800px;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wish-line {
  font-size: 1.8em;
  margin: 10px auto;
  padding: 0 20px;
  font-weight: 600;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
  line-height: 1.4;
  width: auto;
  max-width: 100%;
  text-align: center;
  display: block;
  box-sizing: border-box;
}

.sender-name-container {
  width: 100%;
  text-align: center;
  margin: 200px 0;
}

.sender-name {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--primary-color);
  margin: 20px 0 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  animation: bounceIn 1.5s ease-out forwards, colorPulse 4s infinite alternate;
  width: 100%;
  text-align: center;
  display: block;
  margin: 20px auto;
  transform-origin: center bottom;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  60% {
    transform: translateY(-10px) scale(1.05);
    opacity: 1;
  }
  75% {
    transform: translateY(5px) scale(0.95);
  }
  90% {
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes colorPulse {
  0% {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
  }
  50% {
    color: var(--secondary-color);
    text-shadow: 0 0 15px rgba(255, 0, 51, 0.4);
  }
  100% {
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(215, 0, 134, 0.5);
  }
}

/* Délais d'animation pour chaque ligne */
.wish-line:nth-child(1) { animation-delay: 0.2s; }
.wish-line:nth-child(2) { animation-delay: 0.4s; }
.wish-line:nth-child(3) { animation-delay: 0.6s; }
.wish-line:nth-child(4) { animation-delay: 0.8s; }
.wish-line:nth-child(5) { animation-delay: 1.0s; }
.wish-line:nth-child(6) { animation-delay: 1.2s; }

/* Animation fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive pour la section des vœux */
@media (min-width: 768px) {
  .wish-container {
    padding: 30px;
  }

  .wish-message {
    max-width: 80%;
  }

  .wish-line {
    font-size: 2em;
  }

  .sender-name {
    font-size: 2.8em;
    text-align: center;
    width: 100%;
    display: block;
    margin: 20px auto;
  }
}