/* Reset et variables CSS */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #666666;
  --accent-primary: #ff4757;
  --accent-secondary: #ff3742;
  --accent-hover: #ff1e2d;
  --border-radius: 12px;
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.5);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Corps et structure principale */
body {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Effet de grain subtil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -1;
}

/* Conteneur principal */
.container {
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: var(--shadow-heavy);
  max-width: 500px;
  width: 100%;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  animation: fadeInUp 0.6s ease-out;
}

/* Animation d'entrée */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  top: 20px;
  margin-bottom: 20px;
}

.logo img {
  width: 31%;
  height: 100%;
  border-radius: 16%;
  background-color: #555;
  padding: 5px;
}

/* Titre principal */
h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

/* Sous-titre */
.container > p:first-of-type {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  font-weight: 400;
}

/* Menu des boutons */
.menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

/* Wrapper des boutons avec tags */
.btn-wrapper {
  position: relative;
  display: block;
  animation: slideIn 0.5s ease-out;
  animation-fill-mode: both;
}

.btn-wrapper:nth-child(1) { animation-delay: 0.1s; }
.btn-wrapper:nth-child(2) { animation-delay: 0.2s; }
.btn-wrapper:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Tags de notification */
.btn-wrapper .tag {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  z-index: 2;
  animation: pulse 2s infinite;
  min-width: 20px;
  text-align: center;
  rotate: 5deg;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Boutons principaux */
button,
a.back-button {
  width: 100%;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

/* Effet de survol */
button::before,
a.back-button::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: var(--transition-smooth);
}

button:hover::before,
a.back-button:hover::before {
  left: 100%;
}

button:hover,
a.back-button:hover {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-hover) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.container > a.back-button {
    margin-bottom: 10px;
    margin-top: 10px;
}

button:active,
a.back-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-light);
}

/* Zone de texte */
textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  margin: 16px 0;
  font-size: 1rem;
  font-family: var(--font-primary);
  background: var(--bg-tertiary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  resize: vertical;
  transition: var(--transition-fast);
}

textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

textarea::placeholder {
  color: var(--text-muted);
}

/* Liste */
ul {
  list-style: none;
  padding: 0;
  text-align: left;
  margin-top: 24px;
}

ul li {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
  padding: 16px;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
  position: relative;
}

ul li:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
}

/* Crédit en bas */
.container > p:last-of-type {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 32px 24px;
    margin: 16px;
    border-radius: 20px;
  }
  
  button,
  a.back-button {
    padding: 16px 20px;
    font-size: 1rem;
  }
  
  .menu {
    gap: 14px;
  }
}

/* Mode sombre amélioré pour les appareils qui le supportent */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #111111;
  }
}

/* Animations pour les utilisateurs qui préfèrent moins de mouvement */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Support pour les écrans haute résolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .container {
    border-width: 0.5px;
  }
}