/* Custom CSS for Compare-paiement.fr */
/* Version 2.0 - Optimized */

/* ===== BUTTON STYLES ===== */
.btn {
  @apply inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2;
  font-size: 0.9rem;
}

.btn-primary {
  @apply bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500;
}

.btn-secondary {
  @apply bg-white text-blue-600 border-blue-600 hover:bg-blue-50 focus:ring-blue-500;
}

.btn-success {
  @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;
}

.btn-purple {
  @apply bg-purple-600 text-white hover:bg-purple-700 focus:ring-purple-500;
}

.btn-warning {
  @apply bg-orange-600 text-white hover:bg-orange-700 focus:ring-orange-500;
}

.btn-outline {
  @apply bg-transparent text-gray-700 border-gray-300 hover:bg-gray-50 focus:ring-gray-500;
}

.btn-outline-white {
  @apply bg-transparent text-white border-white hover:bg-white hover:text-blue-600 focus:ring-white;
}

.btn-outline-light {
  @apply bg-transparent text-white border-white/50 hover:bg-white/10 focus:ring-white;
}

.btn-light {
  @apply bg-white text-blue-600 hover:bg-gray-100 focus:ring-white;
}

.btn-lg {
  @apply px-8 py-3;
  font-size: 1rem;
}

/* ===== CARD STYLES ===== */
.card {
  @apply bg-white rounded-lg shadow-md border border-gray-200;
}

.card-header {
  @apply p-6 border-b border-gray-200;
}

.card-content {
  @apply p-6;
}

.card-title {
  @apply text-xl font-semibold text-gray-900 mb-2;
}

.card-description {
  @apply text-gray-600;
  min-height: 4.5rem;
}

/* ===== BADGE STYLES ===== */
.badge {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
  @apply bg-blue-100 text-blue-800;
}

.badge-success {
  @apply bg-green-100 text-green-800;
}

.badge-warning {
  @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
  @apply bg-red-100 text-red-800;
}

/* ===== COLLAPSIBLE/FAQ STYLES ===== */
.collapsible-trigger {
  @apply cursor-pointer;
}

.collapsible-trigger:hover {
  @apply bg-gray-50;
}

.collapsible-trigger.active svg {
  @apply rotate-180;
}

.collapsible-content {
  @apply transition-all duration-300 ease-in-out;
}

/* ===== CUSTOM ANIMATIONS ===== */
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== GRADIENT BACKGROUNDS ===== */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-blue-50 {
  --tw-gradient-from: #eff6ff;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.to-indigo-100 {
  --tw-gradient-to: #e0e7ff;
}

.from-blue-600 {
  --tw-gradient-from: #2563eb;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0));
}

.to-purple-600 {
  --tw-gradient-to: #9333ea;
}

/* ===== WHATSAPP CHAT STYLES ===== */
#whatsapp-chat {
  z-index: 1000;
}

#whatsapp-expanded {
  animation: slideInUp 0.3s ease-out;
}

/* ===== TABLE STYLES ===== */
.table-responsive {
  @apply overflow-x-auto;
}

.table {
  @apply w-full border-collapse;
}

.table th {
  @apply text-left p-4 font-semibold border-b-2 border-gray-200;
}

.table td {
  @apply p-4 border-b border-gray-200;
}

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

.table tbody tr:hover {
  @apply bg-gray-100;
}

/* ===== FORM STYLES ===== */
.form-input {
  @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.form-input.border-red-500 {
  @apply border-red-500 focus:ring-red-500 focus:border-red-500;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-textarea {
  @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 resize-y;
}

/* ===== UTILITY CLASSES ===== */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

/* ===== TRANSITIONS ===== */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition: transform 0.2s ease;
}

.transition-all {
  transition: all 0.2s ease;
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
.focus-ring:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
  outline: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ===== SVG ICON ALIGNMENT ===== */
svg.mr-2.h-5.w-5 {
  flex-shrink: 0;
}

svg.ml-2.h-5.w-5 {
  flex-shrink: 0;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 768px) {
  .text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .text-6xl {
    font-size: 3rem;
    line-height: 1;
  }

  .card-description {
    min-height: auto;
  }
}

/* ===== TEXT SIZE ADJUSTMENTS ===== */
p.text-gray-600 {
  line-height: 1.6;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.smallpayplug {
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: #777;
}

/* ===== SPECIFIC COMPONENT FIXES ===== */
#comparatif-micro-entreprise .absolute.-top-3 {
  width: 100%;
  text-align: center;
}

/* ===== PRINT STYLES ===== */
@media print {
  .no-print,
  #whatsapp-chat,
  nav,
  footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ===== LOADING STATE ===== */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== SELECTION STYLES ===== */
::selection {
  background-color: #3b82f6;
  color: white;
}

::-moz-selection {
  background-color: #3b82f6;
  color: white;
}
