/* 
 * Styles CSS pour l'application fitness - Reproduction fidèle du design React/Tailwind
 * Couleurs principales : #00F0FF (primary), #0A0A0A (dark), #1A1A1A (dark-light)
 */

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  overflow: hidden;
}

body {
  background: #0A0A0A;
  color: #fff;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Variables CSS */
:root {
  --primary: #00F0FF;
  --primary-dark: #00D6E4;
  --dark: #0A0A0A;
  --dark-light: #1A1A1A;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --red-400: #F87171;
  --green-400: #34D399;
  --yellow-400: #FBBF24;
  --blue-400: #60A5FA;
  --border-primary: rgba(0, 240, 255, 0.1);
  --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.15);
}

/* Utilitaires de base */
.hidden { display: none !important; }
.block { display: block !important; }
.flex { display: flex; }
.grid { display: grid; }
.inline-flex { display: inline-flex; }

/* Layout */
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-md { max-width: 28rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Spacing */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-4 { padding-top: 1rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-24 { padding-bottom: 6rem; }

.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-3 { margin-left: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mx-3 { margin-left: 0.75rem; margin-right: 0.75rem; }

/* Gaps */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Flexbox */
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }

/* Grid */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Dimensions */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.h-1 { height: 0.25rem; }
.h-1-5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { width: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.h-64 { height: 16rem; }

/* Backgrounds */
.bg-dark { background-color: var(--dark); }
.bg-dark-light { background-color: var(--dark-light); }
.bg-primary { background-color: var(--primary); }
.bg-primary-dark { background-color: var(--primary-dark); }
.bg-red-900-20 { background-color: rgba(127, 29, 29, 0.2); }
.bg-green-500 { background-color: #10B981; }
.bg-black-80 { background-color: rgba(0, 0, 0, 0.8); }
.bg-blue-900-20 { background-color: rgba(30, 58, 138, 0.2); }
.bg-transparent { background-color: transparent; }

/* Gradient backgrounds */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-primary { --tw-gradient-from: var(--primary); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.to-blue-500 { --tw-gradient-to: #3B82F6; }

/* Colors */
.text-white { color: #fff; }
.text-primary { color: var(--primary); }
.text-primary-dark { color: var(--primary-dark); }
.text-dark { color: var(--dark); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: #4B5563; }
.text-red-400 { color: var(--red-400); }
.text-green-400 { color: var(--green-400); }
.text-yellow-400 { color: var(--yellow-400); }
.text-blue-400 { color: var(--blue-400); }
.border-blue-500-20 { border-color: rgba(59, 130, 246, 0.2); }

/* Text utilities */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-8xl { font-size: 6rem; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-pre-line { white-space: pre-line; }

/* Borders */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-primary-10 { border-color: var(--border-primary); }
.border-red-500-20 { border-color: rgba(239, 68, 68, 0.2); }
.divide-y > * + * { border-top-width: 1px; }
.divide-primary-10 > * + * { border-top-color: var(--border-primary); }

/* Border radius */
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }

/* Shadows */
.shadow-neon { box-shadow: var(--shadow-neon); }

/* Transitions */
.transition-colors { 
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-all { 
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-transform { 
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* Transforms */
.rotate-180 { transform: rotate(180deg); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Backdrop */
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Opacity */
.opacity-50 { opacity: 0.5; }

/* Clip path */
.bg-clip-text {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
button {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--dark);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-primary:disabled {
  background-color: rgba(0, 240, 255, 0.5);
  cursor: not-allowed;
}

.btn-dark {
  background-color: var(--dark);
  color: white;
  border: 1px solid var(--border-primary);
}

.btn-dark:hover,
.btn-dark:active {
  background-color: rgba(10, 10, 10, 0.5);
}

.btn-dark:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cards */
.card {
  background-color: var(--dark-light);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-neon);
  border: 1px solid var(--border-primary);
  backdrop-filter: blur(24px);
}

.card:active {
  background-color: rgba(26, 26, 26, 0.8);
}

/* Inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input, textarea, select {
  background: var(--dark-light) !important;
  color: white !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.15s ease;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(0, 240, 255, 0.3) !important;
}

input::placeholder, textarea::placeholder {
  color: #666 !important;
}

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes scale-up {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes check-mark {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-scale-up { animation: scale-up 0.3s ease-out; }
.animate-check-mark { animation: check-mark 0.2s ease-out 0.1s both; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Loading states */
.loading-spinner {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid var(--primary);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 1s linear infinite;
}

/* Progress bars */
.progress-bar {
  background-color: var(--dark);
  border-radius: 9999px;
  height: 0.375rem;
  overflow: hidden;
}

.progress-fill {
  background-color: var(--primary);
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Effort colors */
.effort-facile { color: var(--green-400); }
.effort-neutre { color: var(--yellow-400); }
.effort-difficile { color: var(--red-400); }

/* Special utilities */
.pointer-events-none { pointer-events: none; }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-content {
  background-color: var(--dark-light);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 28rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-neon);
  border: 1px solid var(--border-primary);
}

/* Success animation */
.success-check {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
}

.success-circle {
  background-color: #10B981;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scale-up 0.3s ease-out;
}

.success-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: white;
  animation: check-mark 0.2s ease-out 0.1s both;
}

/* Hover states and transitions */
.hover\:bg-dark:hover { background-color: var(--dark); }
.hover\:bg-dark-light:hover { background-color: var(--dark-light); }
.transition-colors { transition: background-color 0.15s ease, color 0.15s ease; }
.transition-transform { transition: transform 0.15s ease; }

/* Border radius */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .text-8xl {
    font-size: 4rem;
  }
  
  .w-24 {
    width: 5rem;
  }
  
  .h-24 {
    height: 5rem;
  }
  
  /* Classes responsive pour mobile */
  .sm\:gap-2 {
    gap: 0.5rem;
  }
  
  .sm\:p-3 {
    padding: 0.75rem;
  }
  
  .sm\:rounded-xl {
    border-radius: 0.75rem;
  }
  
  .sm\:text-sm {
    font-size: 0.875rem;
  }
}