/* ==================================================================
   FICHES TAB - REFONTE GRAPHIQUE MODERNE 2025
   Design ultra-moderne avec glassmorphism et animations fluides
   ================================================================== */

:root {
    --fiches-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --fiches-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --fiches-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --fiches-glow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --fiches-glass-bg: rgba(255, 255, 255, 0.05);
    --fiches-glass-border: rgba(255, 255, 255, 0.18);
}

/* Container principal des fiches */
.fiche-purchase-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

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

/* En-tête de section avec titre et stats - REFONTE */
.fiches-section-header {
    background: var(--fiches-glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--fiches-glass-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--fiches-glow);
    animation: slideInFromTop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fiches-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #667eea 100%
    );
    background-size: 300% 100%;
    animation: shimmer 4s linear infinite;
}

.fiches-section-header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.fiches-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.fiches-title-section h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    letter-spacing: -0.5px;
}

.fiches-title-section h1 i {
    background: var(--fiches-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 36px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.fiches-title-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

.fiches-stats-mini {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--fiches-glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--fiches-glass-border);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.stat-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--fiches-gradient-1);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-badge:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.stat-badge:hover::before {
    opacity: 0.1;
}

.stat-badge i {
    font-size: 28px;
    margin-bottom: 12px;
    background: var(--fiches-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.stat-badge .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.stat-badge .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Carte de sélection de base - REFONTE ULTRA MODERNE */
.base-selection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.base-card {
    background: var(--fiches-glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 2px solid var(--fiches-glass-border);
    border-radius: 24px;
    padding: 32px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: cardSlideIn 0.6s ease-out backwards;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.base-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--fiches-gradient-1);
    opacity: 0;
    transition: all 0.5s ease;
    transform: scaleX(0);
    transform-origin: left;
}

.base-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.base-card:hover {
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4),
                0 0 0 1px rgba(102, 126, 234, 0.2) inset;
}

.base-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.base-card:hover::after {
    width: 400px;
    height: 400px;
}

.base-card.selected {
    border-color: rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, 
                rgba(102, 126, 234, 0.15) 0%, 
                rgba(118, 75, 162, 0.15) 100%);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.5),
                0 0 0 2px rgba(102, 126, 234, 0.3) inset;
    transform: scale(1.03);
}

.base-card.selected::before {
    opacity: 1;
    transform: scaleX(1);
    animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.base-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.base-card-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.3px;
}

.base-card-title i {
    font-size: 32px;
    background: var(--fiches-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.base-price-badge {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.base-price-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.base-card:hover .base-price-badge::before {
    left: 100%;
}

.base-price-badge.free {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.25) 100%);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.base-price-badge.paid {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.25) 100%);
    color: #f59e0b;
    border: 2px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.base-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.base-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.base-stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.base-stat-item i {
    background: var(--fiches-gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 18px;
}

.base-stat-item strong {
    color: #ffffff;
    font-weight: 700;
}

.base-card-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Formulaire d'achat unifié - REFONTE PREMIUM */
.fiche-purchase-form-unified {
    background: var(--fiches-glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--fiches-glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--fiches-glow);
    animation: formFadeIn 0.8s ease-out 0.2s backwards;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.unified-form-header {
    background: linear-gradient(135deg, 
                rgba(102, 126, 234, 0.2) 0%, 
                rgba(118, 75, 162, 0.2) 100%);
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: nowrap;
    position: relative;
    overflow: hidden;
}

.unified-form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.1), 
                transparent);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.header-left .header-text {
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.header-left .header-text span {
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.database-select {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px 20px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 250px;
    position: relative;
    z-index: 1;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.database-select option {
    background: #1a1b26;
    color: #ffffff;
    padding: 12px;
    font-weight: 600;
}

.database-select option:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.database-select:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.database-select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.8);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    transform: scale(1.02);
}

/* Grille de filtres - REFONTE MODERNE */
.unified-filters-grid {
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    align-items: start;
    position: relative;
}

.filter-inline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: filterFadeIn 0.5s ease-out backwards;
}

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

.filter-inline:nth-child(1) { animation-delay: 0.1s; }
.filter-inline:nth-child(2) { animation-delay: 0.2s; }
.filter-inline:nth-child(3) { animation-delay: 0.3s; }
.filter-inline:nth-child(4) { animation-delay: 0.4s; }
.filter-inline:nth-child(5) { animation-delay: 0.5s; }

.filter-inline label {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-inline label i {
    background: var(--fiches-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 16px;
}

.form-input-inline,
.filter-inline select {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-inline select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23ffffff' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.filter-inline select option {
    background: #1a1b26;
    color: #ffffff;
    padding: 12px;
    font-weight: 600;
}

.filter-inline select option:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.form-input-inline:hover,
.filter-inline select:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input-inline:focus,
.filter-inline select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2),
                0 8px 24px rgba(102, 126, 234, 0.3);
    transform: translateY(-4px) scale(1.02);
}

.form-input-inline::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* Bouton d'action principal - REFONTE PREMIUM */
.action-button-container-unified {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.action-btn-unified {
    width: 100%;
    padding: 20px 40px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    animation: btnFadeIn 0.8s ease-out 0.6s backwards;
}

@keyframes btnFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.action-btn-unified::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                transparent);
    transition: left 0.6s ease;
    pointer-events: none; /* Permet aux clics de passer à travers */
}

.action-btn-unified.gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: gradientMove 3s ease infinite, btnFadeIn 0.8s ease-out 0.6s backwards;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.action-btn-unified.gradient:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.7),
                0 0 80px rgba(102, 126, 234, 0.4),
                0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

.action-btn-unified.gradient:hover::before {
    left: 100%;
}

.action-btn-unified.gradient:active {
    transform: translateY(-2px) scale(1);
}

.action-btn-unified i {
    font-size: 24px;
    animation: iconSpin 2s ease-in-out infinite;
    pointer-events: none; /* Permet aux clics de passer à travers l'icône */
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

/* Section informative - REFONTE PREMIUM */
.fiches-info-section {
    background: var(--fiches-glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--fiches-glass-border);
    border-radius: 20px;
    padding: 28px 32px;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
    animation: infoSlideIn 0.8s ease-out 0.4s backwards;
}

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

.fiches-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--fiches-gradient-3);
}

.fiches-info-section h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.fiches-info-section h3 i {
    background: var(--fiches-gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(8px);
    border-color: rgba(102, 126, 234, 0.3);
}

.info-item i {
    background: var(--fiches-gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-item-content strong {
    color: #ffffff;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.info-item-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
}

/* Optimisation pour grand écran - tout sur une ligne */
@media (min-width: 1200px) {
    .unified-filters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .action-button-container-unified {
        grid-column: span 4;
    }
}

@media (min-width: 1400px) {
    .unified-filters-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .action-button-container-unified {
        grid-column: span 5;
    }
}

/* Responsive Design - OPTIMISÉ MOBILE */
@media (max-width: 768px) {
    .fiche-purchase-container {
        padding: 16px;
    }

    .fiches-section-header {
        padding: 24px 20px;
        margin-bottom: 24px;
        border-radius: 20px;
    }

    .fiches-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .fiches-title-section h1 {
        font-size: 24px;
        gap: 12px;
    }

    .fiches-title-section h1 i {
        font-size: 28px;
    }

    .fiches-title-section p {
        font-size: 14px;
    }
    
    .fiches-stats-mini {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .stat-badge {
        flex: 1;
        min-width: auto;
        padding: 12px 16px;
    }

    .stat-badge i {
        font-size: 22px;
    }

    .stat-badge .stat-value {
        font-size: 20px;
    }

    .stat-badge .stat-label {
        font-size: 10px;
    }
    
    .base-selection-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .base-card {
        padding: 24px;
    }

    .base-card-title {
        font-size: 20px;
    }

    .base-card-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .unified-filters-grid {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 20px;
    }
    
    .database-select {
        width: 100%;
        min-width: auto;
    }
    
    .unified-form-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
    }

    .action-btn-unified {
        padding: 16px 32px;
        font-size: 14px;
        letter-spacing: 1px;
    }

    .action-btn-unified i {
        font-size: 20px;
    }

    .fiches-info-section {
        padding: 24px 20px;
        margin-top: 24px;
    }

    .fiches-info-section h3 {
        font-size: 18px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-item {
        padding: 14px;
    }

    .loading-spinner {
        padding: 60px 20px;
    }

    .loading-spinner i {
        font-size: 48px;
    }

    .empty-state {
        padding: 60px 20px;
    }

    .empty-state i {
        font-size: 72px;
    }

    .empty-state h3 {
        font-size: 22px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .unified-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .base-selection-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tranche d'âge - Style spécial REFONTE */
.filter-age-group .age-inputs-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.filter-age-group .age-input {
    flex: 1;
    min-width: 0;
}

.filter-age-group .age-separator {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 800;
    font-size: 20px;
    background: var(--fiches-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Effet de particules subtil pour le fond */
.fiche-purchase-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(240, 147, 251, 0.03) 0%, transparent 50%);
    z-index: -1;
}

/* Select dropdown style - REFONTE */
.form-select-inline {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23ffffff' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.form-select-inline option {
    background: #1a1b26;
    color: #ffffff;
    padding: 12px;
    font-weight: 600;
}

.form-select-inline option:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.form-select-inline:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-select-inline:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px) scale(1.02);
}

/* Ajout d'un effet de brillance sur les cards */
.base-card,
.fiche-purchase-form-unified,
.fiches-section-header,
.fiches-info-section {
    position: relative;
}

.base-card::after,
.fiche-purchase-form-unified::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    pointer-events: none;
}

/* Effet de scan lumineux au hover */
.base-card:hover::after {
    animation: scanLight 2s ease-in-out;
}

@keyframes scanLight {
    0% { top: -50%; }
    100% { top: 150%; }
}

/* Amélioration des transitions pour performance */
.base-card,
.stat-badge,
.action-btn-unified,
.filter-inline input,
.filter-inline select,
.database-select {
    will-change: transform;
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    :root {
        --fiches-glass-bg: rgba(255, 255, 255, 0.03);
        --fiches-glass-border: rgba(255, 255, 255, 0.12);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* No filters message - REFONTE */
.no-filters-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 500;
}

.no-filters-message i {
    font-size: 72px;
    background: var(--fiches-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    display: block;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Loading state - REFONTE MODERNE */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner i {
    font-size: 64px;
    background: var(--fiches-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
}

@keyframes spin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    to { transform: rotate(360deg) scale(1); }
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 600;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Animation pour le chargement */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.4),
                    0 0 60px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 0 0 60px rgba(102, 126, 234, 0.7),
                    0 0 120px rgba(102, 126, 234, 0.4);
    }
}

.base-card.loading {
    animation: pulse-glow 2s ease-in-out infinite;
    border-color: rgba(102, 126, 234, 0.6);
}

/* Success/Error states - REFONTE */
.action-btn-unified.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    background-size: 200% 200%;
    animation: gradientMove 2s ease infinite, successPulse 0.6s ease;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.6),
                0 0 80px rgba(16, 185, 129, 0.4);
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.action-btn-unified.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    background-size: 200% 200%;
    animation: gradientMove 2s ease infinite, errorShake 0.5s ease;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.6),
                0 0 80px rgba(239, 68, 68, 0.4);
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.action-btn-unified:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(50%);
    box-shadow: none;
}

.action-btn-unified:disabled:hover {
    transform: none !important;
    box-shadow: none;
}

/* Tooltip pour les filtres */
.filter-inline[title] {
    position: relative;
}

/* Empty state - REFONTE */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
    background: var(--fiches-glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--fiches-glass-border);
}

.empty-state i {
    font-size: 96px;
    background: var(--fiches-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    opacity: 0.8;
    animation: floatIcon 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
}

