/**
 * Forfait Taxonomy Styles
 */

/* Taxonomy Filters */
.forfait-taxonomy-filters {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.forfait-taxonomy-filters h4 {
    margin: 0 0 15px 0;
    color: #1e3a8a;
    font-size: 1.1rem;
}

.taxonomy-filter-group {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.taxonomy-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.taxonomy-filter {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    min-width: 150px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.taxonomy-filter:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Forfait Taxonomies Display */
.forfait-taxonomies {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.forfait-taxonomy-group {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.taxonomy-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.85rem;
    min-width: 80px;
    flex-shrink: 0;
}

.taxonomy-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.taxonomy-term {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Category terms - Blue theme */
.forfait_category-term {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.forfait_category-term:hover {
    background: #bfdbfe;
    color: #1e3a8a;
    text-decoration: none;
}

/* Tag terms - Green theme */
.forfait_tag-term {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.forfait_tag-term:hover {
    background: #a7f3d0;
    color: #047857;
    text-decoration: none;
}

/* Feature terms - Purple theme */
.forfait_feature-term {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #c084fc;
}

.forfait_feature-term:hover {
    background: #e9d5ff;
    color: #581c87;
    text-decoration: none;
}

/* Audience terms - Orange theme */
.forfait_audience-term {
    background: #fed7aa;
    color: #9a3412;
    border-color: #fdba74;
}

.forfait_audience-term:hover {
    background: #fdba74;
    color: #7c2d12;
    text-decoration: none;
}

/* Forfaits Container */
.forfaits-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.forfaits-grid {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.forfaits-grid.layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.forfaits-grid.layout-list {
    grid-template-columns: 1fr;
}

.forfait-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.forfait-card:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.forfait-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 5px 40px;
    font-size: 11px;
    font-weight: 600;
    transform: rotate(45deg);
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forfait-title {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 1.4rem;
    font-weight: 700;
}

.forfait-price {
    margin-bottom: 20px;
    text-align: center;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    display: block;
    line-height: 1;
}

.price-duration {
    font-size: 0.9rem;
    color: #6b7280;
    display: block;
    margin-top: 5px;
}

.forfait-description {
    margin-bottom: 20px;
    color: #6b7280;
    line-height: 1.6;
}

.forfait-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.forfait-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    position: relative;
    padding-left: 25px;
}

.forfait-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
}

.forfait-features li:last-child {
    border-bottom: none;
}

.no-forfaits {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forfait-taxonomy-filters {
        padding: 15px;
    }
    
    .taxonomy-filter-group {
        display: block;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .taxonomy-filter {
        width: 100%;
        min-width: auto;
    }
    
    .forfaits-container {
        padding: 15px;
    }
    
    .forfaits-grid.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .forfait-card {
        padding: 20px;
    }
    
    .forfait-title {
        font-size: 1.2rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .taxonomy-label {
        min-width: 70px;
        font-size: 0.8rem;
    }
    
    .taxonomy-terms {
        gap: 4px;
    }
    
    .taxonomy-term {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .forfait-taxonomy-filters h4 {
        font-size: 1rem;
    }
    
    .forfait-card {
        padding: 15px;
    }
    
    .forfait-title {
        font-size: 1.1rem;
    }
    
    .price-amount {
        font-size: 1.8rem;
    }
    
    .forfait-badge {
        font-size: 10px;
        padding: 4px 35px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .forfait-taxonomy-filters {
        background: #1f2937;
        border-color: #374151;
    }
    
    .forfait-taxonomy-filters h4 {
        color: #f9fafb;
    }
    
    .taxonomy-filter-group label {
        color: #d1d5db;
    }
    
    .taxonomy-filter {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .taxonomy-filter:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }
    
    .forfait-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .forfait-card:hover {
        border-color: #3b82f6;
    }
    
    .forfait-title {
        color: #f9fafb;
    }
    
    .price-amount {
        color: #f9fafb;
    }
    
    .forfait-description {
        color: #9ca3af;
    }
    
    .forfait-features li {
        color: #d1d5db;
        border-color: #374151;
    }
    
    .taxonomy-label {
        color: #9ca3af;
    }
    
    /* Adjust term colors for dark mode */
    .forfait_category-term {
        background: #1e3a8a;
        color: #dbeafe;
        border-color: #3b82f6;
    }
    
    .forfait_tag-term {
        background: #065f46;
        color: #d1fae5;
        border-color: #10b981;
    }
    
    .forfait_feature-term {
        background: #6b21a8;
        color: #f3e8ff;
        border-color: #9333ea;
    }
    
    .forfait_audience-term {
        background: #9a3412;
        color: #fed7aa;
        border-color: #ea580c;
    }
}

/* Print Styles */
@media print {
    .forfait-taxonomy-filters {
        display: none;
    }
    
    .forfaits-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .forfait-card {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 15px;
    }
    
    .forfait-badge {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Animation for taxonomy terms */
.taxonomy-term {
    animation: fadeInUp 0.3s ease-out;
}

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

/* Loading state */
.taxonomy-filter.loading {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="none" stroke="%23933ea" stroke-width="2"><animate attributeName="stroke-dasharray" values="1 150;50 150;1 150" dur="1s" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* Focus states for accessibility */
.taxonomy-filter:focus-visible,
.taxonomy-term:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .taxonomy-term {
        border-width: 2px;
    }
    
    .forfait-card {
        border-width: 3px;
    }
    
    .taxonomy-filter {
        border-width: 2px;
    }
}
