/**
 * JOBS TAILWIND SUPPLEMENTS - LAYERED VERSION
 * Optimized, cleaned, and organized with Tailwind @layer directives
 *
 * EVOLUTION:
 * - Phase 3A: Cleaned obsolete sections (59 lines removed)
 * - Phase 3B: Converted CSS variables (704 variables → direct values)
 * - Phase 3C: Removed dead CSS (10,890 → 466 lines, 95.6% reduction)
 * - Phase 3D: Organized with @layer (THIS FILE)
 *
 * Date: 20 Octobre 2025
 * Final size: 466 lines
 *
 * TAILWIND LAYER ORGANIZATION:
 * - @layer components: Complex business components (deposit, cookie, etc.)
 * - @layer utilities: Simple utility classes (delays, effects)
 * - Keyframes: Outside layers (Tailwind best practice)
 */


/* =========================================
   🎨 TAILWIND LAYER: COMPONENTS
   Complex business components that combine multiple utilities
   ========================================= */

@layer components {

  /* ─────────────────────────────────────
     DEPOSIT FORM COMPONENTS
     Used in: companies/deposit.blade.php
     ───────────────────────────────────── */

  /* Step indicator active state */
  .st-deposit-step.active .w-10 {
    background: white !important;
    color: #e6705d !important;
  }

  .st-deposit-step:not(.active) .w-10 {
    background: rgba(255, 255, 255, 0.2) !important;
  }

  /* Field validation states */
  .st-field-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 1px #22c55e !important;
  }

  .st-field-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444 !important;
  }

  /* Skills tag styling */
  .skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #fee8e4;
    color: #d77366;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .skill-remove {
    background: none;
    border: none;
    color: #e6705d;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    margin-left: 0.25rem;
  }

  .skill-remove:hover {
    color: #c16853;
  }

  /* Content editable editor styling */
  [contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
  }

  [contenteditable="true"]:focus {
    outline: none;
  }

  /* Step transitions */
  #step-1.block, #step-2.block, #step-3.block, #step-4.block {
    display: block !important;
  }

  #step-1.active, #step-2.active, #step-3.active, #step-4.active {
    display: block !important;
  }


  /* ─────────────────────────────────────
     COOKIE CONSENT SYSTEM
     RGPD compliance - Used on all pages
     ───────────────────────────────────── */

  /* Cookie popup container */
  .cookie-popup {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(234, 143, 127, 0.2);
  }

  .cookie-popup.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
  }

  .cookie-popup h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #351c51;
    margin-bottom: 0.75rem;
  }

  .cookie-popup p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .cookie-popup-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .cookie-accept {
    flex: 1;
    background: #ea8f7f;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(234, 143, 127, 0.3);
  }

  .cookie-accept:hover {
    background: #d77366;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 143, 127, 0.4);
  }

  .cookie-decline {
    flex: 1;
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .cookie-decline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
  }

  .cookie-settings {
    width: 100%;
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 0.5rem;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
  }

  .cookie-settings:hover {
    color: #64748b;
  }

  /* Mobile responsive */
  @media (max-width: 640px) {
    .cookie-popup {
      bottom: 0;
      right: 0;
      left: 0;
      max-width: none;
      border-radius: 1rem 1rem 0 0;
      margin: 0;
    }
  }
}


/* =========================================
   ⚡ TAILWIND LAYER: UTILITIES
   Simple utility classes for animations and effects
   ========================================= */

@layer utilities {

  /* ─────────────────────────────────────
     ANIMATION DELAY UTILITIES
     Used for stagger animations in blog, listings, etc.
     ───────────────────────────────────── */

  /* Blog stagger classes */
  .st-blog-stagger {
    --animation-delay: 0s;
    animation-delay: var(--animation-delay);
  }

  .st-blog-article-card {
    --animation-delay: 0.1s;
    animation-delay: var(--animation-delay);
  }

  .st-blog-recent-item {
    --animation-delay: 0.4s;
    animation-delay: var(--animation-delay);
  }

  .st-blog-category-item {
    --animation-delay: 0.5s;
    animation-delay: var(--animation-delay);
  }

  /* Progressive delays (0.1s increments) */
  .st-delay-100 { animation-delay: 0.1s !important; }
  .st-delay-200 { animation-delay: 0.2s !important; }
  .st-delay-300 { animation-delay: 0.3s !important; }
  .st-delay-400 { animation-delay: 0.4s !important; }
  .st-delay-500 { animation-delay: 0.5s !important; }
  .st-delay-600 { animation-delay: 0.6s !important; }
  .st-delay-700 { animation-delay: 0.7s !important; }
  .st-delay-800 { animation-delay: 0.8s !important; }
  .st-delay-900 { animation-delay: 0.9s !important; }
  .st-delay-1000 { animation-delay: 1s !important; }

  /* Granular delays (50ms increments) for ultra-smooth stagger */
  .st-delay-50 { animation-delay: 0.05s !important; }
  .st-delay-150 { animation-delay: 0.15s !important; }
  .st-delay-250 { animation-delay: 0.25s !important; }
  .st-delay-350 { animation-delay: 0.35s !important; }
  .st-delay-450 { animation-delay: 0.45s !important; }
  .st-delay-550 { animation-delay: 0.55s !important; }
  .st-delay-650 { animation-delay: 0.65s !important; }
  .st-delay-750 { animation-delay: 0.75s !important; }
  .st-delay-850 { animation-delay: 0.85s !important; }
  .st-delay-950 { animation-delay: 0.95s !important; }


  /* ─────────────────────────────────────
     VISUAL EFFECT UTILITIES
     Complex visual effects not covered by Tailwind
     ───────────────────────────────────── */

  /* Glassmorphism effect */
  .glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* Text gradient */
  .text-gradient {
    background: linear-gradient(135deg, #ea8f7f 0%, #351c51 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Custom scrollbar styling */
  .custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
  }
}


/* =========================================
   🎬 ANIMATION KEYFRAMES
   Outside @layer (Tailwind best practice)
   Used throughout the application
   ========================================= */

/* Stagger fade in - Primary animation */
@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* Scale animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Shimmer loading animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Float animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Gradient shift animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


/* =========================================
   📝 END OF LAYERED CSS

   ORGANIZATION SUMMARY:
   - @layer components: 226 lines (deposit form, cookie consent)
   - @layer utilities: 88 lines (animation delays, visual effects)
   - Keyframes: 152 lines (13 animation keyframes)
   - Total: 466 lines

   BENEFITS:
   - ✅ Proper Tailwind layer organization
   - ✅ Easier CSS purging in production
   - ✅ Clear separation of concerns
   - ✅ Better maintainability
   - ✅ Follows Tailwind best practices

   Phase 3 Complete: 95.6% CSS reduction (10,890 → 466 lines)
   ========================================= */


/* =========================================
   🎨 SERVICES PAGE - GLASSMORPHISM CARDS
   HIGH SPECIFICITY - Outside @layer to prevent Tailwind override
   ========================================= */

/* Services Stats - Glassmorphism Cards */
.st-services-stats .st-stat-card {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.st-services-stats .st-stat-card:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .st-services-stats .st-stat-card {
    transition: none !important;
    transform: none !important;
  }

  .st-services-stats .st-stat-card:hover {
    transform: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .st-services-stats .st-stat-card {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #000 !important;
  }
}
