@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

:root {
  --primary-color: #ff3366;
  --secondary-color: #6c5ce7;
  --accent-color: #00cec9;
  --dark-bg-color: #121212;
  --dark-surface-color: #1e1e1e;
  --dark-text-color: #ffffff;
  --light-bg-color: #f5f5f5;
  --light-surface-color: #ffffff;
  --light-text-color: #333333;
  --footer-bg-dark: #0a0a0a;
  --footer-bg-light: #e0e0e0;
  --instagram-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --snapchat-color: #fffc00;

  /* Couleurs pour les éléments qui tombent */
  --dark-falling-color-1: rgba(255, 51, 102, 0.6); /* Rouge vif pour mode sombre */
  --dark-falling-color-2: rgba(108, 92, 231, 0.6); /* Violet vif pour mode sombre */
  --dark-falling-color-3: rgba(0, 206, 201, 0.6); /* Cyan vif pour mode sombre */

  --light-falling-color-1: rgba(220, 20, 60, 0.5); /* Rouge foncé pour mode clair */
  --light-falling-color-2: rgba(75, 0, 130, 0.5); /* Indigo foncé pour mode clair */
  --light-falling-color-3: rgba(0, 139, 139, 0.5); /* Teal foncé pour mode clair */
}

.dark {
  --bg-color: var(--dark-bg-color);
  --surface-color: var(--dark-surface-color);
  --text-color: var(--dark-text-color);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --overlay-color: rgba(0, 0, 0, 0.7);
  --footer-bg: var(--footer-bg-dark);
  --falling-color-1: var(--dark-falling-color-1);
  --falling-color-2: var(--dark-falling-color-2);
  --falling-color-3: var(--dark-falling-color-3);
}

.light {
  --bg-color: var(--light-bg-color);
  --surface-color: var(--light-surface-color);
  --text-color: var(--light-text-color);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --overlay-color: rgba(255, 255, 255, 0.7);
  --footer-bg: var(--footer-bg-light);
  --falling-color-1: var(--light-falling-color-1);
  --falling-color-2: var(--light-falling-color-2);
  --falling-color-3: var(--light-falling-color-3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Changé de center à flex-start pour permettre le défilement */
}

.container {
  width: 100%;
  min-height: 100vh; /* Changé de height: 100% à min-height: 100vh pour permettre le défilement */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-color);
  position: relative;
  overflow-x: hidden; /* Permet le défilement vertical mais pas horizontal */
  overflow-y: auto;
}

/* Styles pour les éléments qui tombent */
#falling-elements-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.falling-element {
  position: absolute;
  top: -100px;
  width: 3px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--falling-color-1));
  border-radius: 50px;
  animation: fall linear infinite;
  filter: blur(1px);
  box-shadow: 0 0 10px var(--falling-color-1);
}

.falling-element.type-2 {
  background: linear-gradient(to bottom, transparent, var(--falling-color-2));
  box-shadow: 0 0 10px var(--falling-color-2);
}

.falling-element.type-3 {
  background: linear-gradient(to bottom, transparent, var(--falling-color-3));
  box-shadow: 0 0 10px var(--falling-color-3);
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(calc(100vh + 100px)) rotate(20deg);
    opacity: 0;
  }
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-switch-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  height: auto;
  padding: 10px 15px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px var(--shadow-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.toggle-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  position: relative;
}

#theme-toggle-btn i {
  font-size: 1.2rem;
  color: white;
  position: absolute;
  transition: all 0.3s ease;
}

.toggle-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.dark-mode-text,
.light-mode-text {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dark-mode-text {
  display: none;
}

.light-mode-text {
  display: none;
}

.dark .dark-mode-text {
  display: block;
}

.light .light-mode-text {
  display: block;
}

.dark-icon {
  opacity: 0;
  transform: translateY(10px);
}

.light-icon {
  opacity: 1;
  transform: translateY(0);
}

.dark .dark-icon {
  opacity: 1;
  transform: translateY(0);
}

.dark .light-icon {
  opacity: 0;
  transform: translateY(-10px);
}

#theme-toggle-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px var(--shadow-color);
}

#theme-toggle-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px var(--shadow-color);
}

/* Header Styles */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 80px;
  padding-bottom: 20px;
  position: relative;
  z-index: 2;
}

.profile-container {
  position: relative;
  width: 160px;
  height: 160px;
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.6);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-pic:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.8);
}

.profile-pic img {
  width: 96%;
  height: 123%;
  object-fit: cover;
  object-position: left center;
  transform: scale(1.1);
}

.name {
  font-size: 4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 5px 15px var(--shadow-color);
  transition: all 0.3s ease;
  margin-top: 20px;
  text-align: center;
}

.name:hover {
  letter-spacing: 4px;
  transform: scale(1.05);
}

/* Main Content */
main {
  width: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  position: relative;
  z-index: 2;
}

.buttons-container {
  display: flex;
  flex-direction: row;
  gap: 30px;
  width: 90%;
  max-width: 1200px;
  justify-content: center;
}

.btn {
  flex: 1;
  height: 180px;
  font-size: 1.8rem;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-size: 200% auto;
  color: white;
  box-shadow: 0 8px 20px var(--shadow-color);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  letter-spacing: 1px;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: all 0.8s ease;
  z-index: 0;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  -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.5s ease;
}

.btn-text {
  position: relative;
  z-index: 2;
  transition: all 0.5s ease;
}

.btn:hover .btn-text {
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  letter-spacing: 3px;
}

.btn-1 {
  background-image: linear-gradient(45deg, #ff416c 0%, #ff4b2b 50%, #ff416c 100%);
  background-size: 200% auto;
}

.btn-2 {
  background-image: linear-gradient(45deg, #ff416c 0%, #ff4b2b 50%, #ff416c 100%);
  background-size: 200% auto;
}

.btn-3 {
  background-image: linear-gradient(45deg, #11998e 0%, #38ef7d 50%, #11998e 100%);
  background-size: 200% auto;
}

/* Nouvel effet de survol amélioré */
.btn:hover {
  background-position: right center;
  transform: translateY(-15px) scale(1.08);
  box-shadow: 0 25px 50px var(--shadow-color), 0 0 30px rgba(255, 255, 255, 0.4);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.dark .btn:hover {
  box-shadow: 0 25px 50px var(--shadow-color), 0 0 40px rgba(255, 255, 255, 0.2), inset 0 0 20px
    rgba(255, 255, 255, 0.2);
}

.light .btn:hover {
  box-shadow: 0 25px 50px var(--shadow-color), 0 0 40px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.btn-1:hover {
  /*! transform: translateY(-15px) scale(1.08) rotateX(5deg) rotateY(-5deg); */
}

.btn-2:hover {
  /*! transform: translateY(-9px) scale(1.08) rotateX(5deg); */
}

.btn-3:hover {
  /*! transform: translateY(-9px) scale(1.08) rotateX(5deg) rotateY(5deg); */
}

.btn:hover::before {
  left: 100%;
  animation: shimmer 1.5s infinite;
}

.btn:hover::after {
  opacity: 1;
}

@keyframes shimmer {
  0% {
    left: -100%;
    opacity: 0.5;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 25px 50px var(--shadow-color), 0 0 5px rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 0 25px 50px var(--shadow-color), 0 0 30px rgba(255, 255, 255, 0.6);
  }
  100% {
    box-shadow: 0 25px 50px var(--shadow-color), 0 0 5px rgba(255, 255, 255, 0.3);
  }
}

.btn:hover {
  animation: pulse-glow 2s infinite;
}

.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 5px 15px var(--shadow-color);
  animation: none;
}

/* Styles pour le blog mobile */
.mobile-blog {
  display: none;
  flex-direction: column;
  gap: 20px;
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
}

.blog-item {
  background-color: var(--surface-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.blog-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  z-index: -1;
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.blog-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px var(--shadow-color);
}

.blog-item:hover::before {
  transform: translateX(100%);
}

.blog-header {
  padding: 15px 20px;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.blog-item:hover .blog-header::after {
  width: 50%;
}

.blog-content {
  padding: 15px 20px;
  background-color: var(--surface-color);
  color: var(--text-color);
}

.blog-content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* Appliquer les couleurs des boutons aux en-têtes de blog */
.blog-header.btn-1 {
  background-image: linear-gradient(to right, #ff416c 0%, #ff4b2b 100%);
}

.blog-header.btn-2 {
  background-image: linear-gradient(to right, #4776e6 0%, #8e54e9 100%);
}

.blog-header.btn-3 {
  background-image: linear-gradient(to right, #11998e 0%, #38ef7d 100%);
}

/* Footer Styles */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: var(--footer-bg);
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
  margin-top: 20px; /* Ajout d'une marge en haut pour assurer l'espace */
}

footer h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: all 0.3s ease;
}

footer h2:hover {
  transform: scale(1.05);
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}

.contact-underline {
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  margin-bottom: 20px;
  border-radius: 10px;
  transition: all 0.5s ease;
}

footer:hover .contact-underline {
  width: 150px;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.6);
}

.social-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  border-radius: 50px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link::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: all 0.8s ease;
  z-index: 0;
}

.social-link:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.social-link:hover::before {
  left: 100%;
  animation: shimmer 1.5s infinite;
}

.instagram-link {
  background: var(--instagram-gradient);
  color: white;
}

.instagram-link:hover {
  box-shadow: 0 15px 30px rgba(220, 39, 67, 0.5);
}

.snapchat-link {
  background-color: var(--snapchat-color);
  color: black;
}

.snapchat-link:hover {
  box-shadow: 0 15px 30px rgba(255, 252, 0, 0.5);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.social-link:hover .social-icon {
  transform: rotate(360deg) scale(1.2);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.social-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.social-link:hover .social-icon::after {
  width: 150%;
  height: 150%;
}

.social-link i {
  font-size: 1.8rem;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-link:hover i {
  transform: scale(1.2);
}

.social-link span {
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.social-link:hover span {
  letter-spacing: 1px;
  font-weight: 700;
}

/* Responsive design */
@media (max-width: 992px) {
  .buttons-container {
    width: 95%;
  }

  .btn {
    height: 150px;
    font-size: 1.5rem;
  }

  .name {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  /* Cacher les boutons et afficher le blog */
  .buttons-container {
    display: none;
  }

  .mobile-blog {
    display: flex;
  }

  #theme-toggle-btn {
    padding: 8px 12px;
  }

  .toggle-text {
    font-size: 0.8rem;
  }

  .name {
    font-size: 3rem;
  }

  .profile-container {
    width: 140px;
    height: 140px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
  }

  #theme-toggle-btn {
    padding: 8px 12px;
  }

  .toggle-icons {
    width: 20px;
    height: 20px;
  }

  #theme-toggle-btn i {
    font-size: 1rem;
  }

  .toggle-text {
    font-size: 0.75rem;
  }

  .social-link {
    width: 100%;
    justify-content: center;
  }

  .name {
    font-size: 2.5rem;
  }

  .profile-container {
    width: 120px;
    height: 120px;
  }

  .social-links {
    flex-direction: column;
    width: 90%;
  }

  footer h2 {
    font-size: 1.8rem;
  }
}
