/* Enhanced hover effects */
.hover-row {
    transition: all 0.3s ease;
}

.hover-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Column styling based on content type */
.advantage-column {
    position: relative;
    padding: 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-left: 4px solid #10b981;
    border-radius: 8px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.advantage-column:hover {
    background: linear-gradient(135deg, #dcfce7 0%, #ecfdf5 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.25);
}

.disadvantage-column {
    position: relative;
    padding: 16px;
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    border-left: 4px solid #fb923c;
    border-radius: 8px;
    margin: 4px 0;
    transition: all 0.3s ease;
}
.disadvantage-column:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px -2px rgba(251, 146, 60, 0.25);
}

/* Table enhancements */
table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: 100%;
}

table td:first-child,
table th:first-child {
    width: 20%;
}

table td:nth-child(2),
table td:nth-child(3),
table th:nth-child(2),
table th:nth-child(3) {
    width: 40%;
}

thead th {
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

thead th:first-child {
    border-top-left-radius: 16px;
}

thead th:last-child {
    border-top-right-radius: 16px;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* OPTION 1: LAYOUT VERTICAL - ZERO SCROLL HORIZONTAL */

    /* Supprimer scroll horizontal */
    .bg-white.rounded-2xl .overflow-x-auto {
        overflow: visible;
    }

    /* Transformer tableau en layout vertical */
    .bg-white.rounded-2xl table,
    .bg-white.rounded-2xl thead,
    .bg-white.rounded-2xl tbody,
    .bg-white.rounded-2xl tr {
        display: block;
        width: 100%;
    }

    /* Cacher headers */
    .bg-white.rounded-2xl thead {
        display: none;
    }

    /* Chaque ligne = card */
    .bg-white.rounded-2xl tr {
        border: 1px solid #e5e7eb;
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* Chaque cellule = bloc */
    .bg-white.rounded-2xl td {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
        margin: 0;
    }

    /* Centrer spécifiquement les cellules critères */
    .bg-white.rounded-2xl td.px-6.py-6.font-bold.text-center.text-blue-500 {
        text-align: center;
    }

    /* Labels via data-label */
    .bg-white.rounded-2xl td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #2563eb;
        display: block;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        font-size: 0.75rem;
    }

    .advantage-column,
    .disadvantage-column {
        padding: 12px;
        margin: 2px 0;
    }

    .hover-row:hover {
        transform: none;
    }
}

/* Loading animation for dynamic content */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

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

/* Glow effect for important elements */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4),
                0 0 40px rgba(59, 130, 246, 0.2);
}

/* Print styles */
@media print {
    body {
        background: white !important;
    }
    
    .hover-row:hover {
        background: white !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .advantage-column,
    .disadvantage-column {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hover-row:hover {
        transform: none;
    }
    
    .advantage-column:hover,
    .disadvantage-column:hover {
        transform: none;
    }
}

/* Focus styles for better accessibility */
.advantage-column:focus,
.disadvantage-column:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}