/* resources/css/app.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Charte graphique CD2C */
@layer base {
  :root {
    --cd2c-marine:  #1A3557;
    --cd2c-primary: #2563EB;
    --cd2c-success: #16A34A;
    --cd2c-action:  #EA580C;
  }

  html { scroll-behavior: smooth; }

  body {
    @apply text-gray-900;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
  }
}

@layer components {
  /* Navigation links */
  .nav-link {
    @apply text-gray-700 hover:text-blue-700 transition-colors font-medium py-1;
  }

  /* Boutons principaux */
  .btn-primary {
    @apply bg-blue-700 hover:bg-blue-800 text-white font-semibold px-5 py-2.5 rounded-xl transition-colors inline-flex items-center gap-2;
  }

  .btn-secondary {
    @apply bg-gray-100 hover:bg-gray-200 text-gray-700 font-semibold px-5 py-2.5 rounded-xl transition-colors inline-flex items-center gap-2;
  }

  .btn-cta {
    @apply bg-orange-500 hover:bg-orange-600 text-white font-bold px-6 py-3 rounded-xl transition-colors inline-flex items-center gap-2;
  }

  /* Cards */
  .card {
    @apply bg-white rounded-2xl border border-gray-100 shadow-sm p-6;
  }

  .card-hover {
    @apply card hover:shadow-md transition-all;
  }

  /* Badges IGS */
  .badge-igs-low {
    @apply bg-green-100 text-green-700 text-xs font-bold px-2.5 py-1 rounded-full;
  }

  .badge-igs-high {
    @apply bg-blue-100 text-blue-700 text-xs font-bold px-2.5 py-1 rounded-full;
  }

  .badge-igs-exo {
    @apply bg-gray-100 text-gray-600 text-xs font-bold px-2.5 py-1 rounded-full;
  }

  /* Formulaires */
  .input-field {
    @apply w-full border border-gray-200 rounded-xl px-4 py-2.5 text-sm
           focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent
           transition-shadow;
  }

  .input-label {
    @apply block text-xs font-bold text-gray-600 uppercase tracking-wide mb-1.5;
  }

  .input-error {
    @apply text-red-500 text-xs mt-1;
  }

  /* Alerte reclassement */
  .alert-reclassement {
    @apply bg-orange-50 border-2 border-orange-300 rounded-2xl p-4 flex items-start gap-3;
  }

  /* Section hero */
  .hero-gradient {
    background: linear-gradient(135deg, #1A3557 0%, #2563EB 60%, #1e40af 100%);
  }

  /* Timeline échéances */
  .timeline-item {
    @apply flex items-start gap-3 pb-4 border-b border-gray-100 last:border-0 last:pb-0;
  }

  /* Table barème IGS */
  .bareme-table th {
    @apply bg-blue-800 text-white px-4 py-3 text-left text-xs font-bold uppercase tracking-wide;
  }

  .bareme-table td {
    @apply px-4 py-2.5 text-sm;
  }

  .bareme-table tr:nth-child(even) td {
    @apply bg-gray-50;
  }

  /* Section stats */
  .stat-card {
    @apply bg-white rounded-2xl p-5 border border-gray-100;
  }

  .stat-value {
    @apply text-3xl font-black;
  }

  .stat-label {
    @apply text-sm text-gray-500 mt-1;
  }
}

@layer utilities {
  /* Animations */
  .animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
  }

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

  /* Gradients CD2C */
  .gradient-cd2c {
    background: linear-gradient(135deg, #1A3557, #2563EB);
  }

  .gradient-igs {
    background: linear-gradient(135deg, #059669, #2563EB);
  }

  /* Text responsive */
  .text-balance {
    text-wrap: balance;
  }
}
