:root {
  /* Palette de couleurs principale */
  --primary-color: #007AFF;
  --secondary-color: #5AC8FA;
  --accent-color: #FF2D55;
  --success-color: #34C759;
  --warning-color: #FF9500;
  --danger-color: #FF3B30;
  --info-color: #5856D6;
  
  /* Couleurs de fond et de texte - Mode clair */
  --bg-color: #F2F2F7;
  --card-bg: #ffffff;
  --text-primary: #000000;
  --text-secondary: #8E8E93;
  --border-color: rgba(0, 0, 0, 0.1);
  
  /* Neumorphisme - Mode clair */
  --nm-shadow-light: rgba(255, 255, 255, 0.8);
  --nm-shadow-dark: rgba(0, 0, 0, 0.05);
  --nm-distance: 10px;
  --nm-blur: 15px;
  --nm-pressed-distance: 5px;
  --nm-pressed-blur: 10px;
}

/* Mode sombre */
[data-theme="dark"] {
  --bg-color: #1C1C1E;
  --card-bg: #2C2C2E;
  --text-primary: #FFFFFF;
  --text-secondary: #8E8E93;
  --border-color: rgba(255, 255, 255, 0.1);
  
  /* Neumorphisme - Mode sombre */
  --nm-shadow-light: rgba(40, 40, 45, 0.8);
  --nm-shadow-dark: rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  padding: 20px;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 30px 0;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-primary);
  transition: transform 0.3s ease;
  z-index: 10;
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

.main-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.app-card {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  
  /* Neumorphisme */
  box-shadow: 
    var(--nm-distance) var(--nm-distance) var(--nm-blur) var(--nm-shadow-dark),
    calc(-1 * var(--nm-distance)) calc(-1 * var(--nm-distance)) var(--nm-blur) var(--nm-shadow-light);
}

.app-card:hover {
  transform: translateY(-10px) scale(1.02);
}

.app-card:active {
  transform: scale(0.98);
  box-shadow: 
    var(--nm-pressed-distance) var(--nm-pressed-distance) var(--nm-pressed-blur) var(--nm-shadow-dark),
    calc(-1 * var(--nm-pressed-distance)) calc(-1 * var(--nm-pressed-distance)) var(--nm-pressed-blur) var(--nm-shadow-light);
}

.app-icon-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.app-card-discord .app-icon-container {
  background: #5865f2;
}

.app-icon {
  font-size: 36px;
  color: white;
  z-index: 2;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.app-icon-vipro {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.app-card:hover .app-icon {
  transform: scale(1.1);
}

.app-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  text-align: center;
}

.app-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  text-align: center;
  line-height: 1.5;
}

.app-link {
  display: block;
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.app-card-discord .app-link {
  background-color: #5865f2;
  box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.app-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: left 0.7s ease;
}

.app-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.4);
}

.app-link:hover::before {
  left: 100%;
}

.app-link.disabled {
  background-color: var(--text-secondary);
  cursor: not-allowed;
  box-shadow: none;
}

.app-link.disabled:hover {
  transform: none;
}

footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
}

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

.app-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }
.app-card:nth-child(5) { animation-delay: 0.5s; }
.app-card:nth-child(6) { animation-delay: 0.6s; }
.app-card:nth-child(7) { animation-delay: 0.7s; }

/* Responsive */
@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .main-title {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 16px;
  }
  
  .app-icon-container {
    width: 70px;
    height: 70px;
  }
  
  .app-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  
  .app-container {
    padding: 10px;
  }
  
  body {
    padding: 10px;
  }
}

/* Effet de pression pour les appareils tactiles */
@media (hover: none) {
  .app-card:active {
    transform: scale(0.98);
  }
  
  .app-link:active {
    transform: translateY(0);
  }
}
