﻿/* ========== STYLES EXCLUSIFS POUR LA PAGE RAP-FIN-PAR-CREAN ========== */
/* Ces styles ne s'appliqueront QUE sur la page /rap-fin-par-crean */

/* Dégradés de couleur premium spécifiques à cette page */
.rapfin-bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.rapfin-bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
}

.rapfin-bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

.rapfin-bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

/* Cartes modernes avec effets (spécifiques à cette page) */
.rapfin-card {
    border-radius: 12px !important;
    border: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

    .rapfin-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
    }

    .rapfin-card .card-header {
        border-radius: 12px 12px 0 0 !important;
        padding: 1.25rem 1.5rem !important;
    }

/* En-tête de page spécifique */
.rapfin-page-header {
    margin-bottom: 2.5rem;
}

    .rapfin-page-header h2 {
        font-weight: 700;
        color: #2d3748;
        position: relative;
        display: inline-block;
    }

        .rapfin-page-header h2::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 2px;
        }

/* ========== FILTRE PAR PÉRIODE ÉLÉGANT ========== */
.rapfin-filter-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(13, 110, 253, 0.15) !important;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.rapfin-filter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

    .rapfin-filter-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    }

.rapfin-filter-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.rapfin-filter-badge .badge {
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .rapfin-filter-badge .badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

/* Date range container */
.rapfin-date-range-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.rapfin-date-input-wrapper {
    position: relative;
}

.rapfin-date-label {
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(13, 110, 253, 0.1);
}

.rapfin-date-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rapfin-input-group-elegant {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

    .rapfin-input-group-elegant:focus-within {
        border-color: #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

    .rapfin-input-group-elegant .input-group-text {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
    }

.rapfin-date-picker {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    background: #f8f9fa;
}

    .rapfin-date-picker:focus {
        box-shadow: none;
        background: white;
    }

    .rapfin-date-picker::-webkit-calendar-picker-indicator {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="%23667eea" class="bi bi-calendar3" viewBox="0 0 16 16"><path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/><path d="M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/></svg>');
        cursor: pointer;
        padding: 0;
        margin: 0;
        width: 24px;
        height: 24px;
    }

.rapfin-date-preview {
    animation: rapfin-slideIn 0.3s ease-out;
}

@keyframes rapfin-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flèche entre les dates */
.rapfin-date-range-arrow {
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .rapfin-date-range-arrow::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(102, 126, 234, 0.2);
        animation: rapfin-pulseArrow 2s infinite;
    }

@keyframes rapfin-pulseArrow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Boutons d'action */
.rapfin-filter-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
}

.rapfin-period-summary {
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 250px;
}

.rapfin-filter-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border-width: 2px;
}

    .rapfin-filter-actions .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.rapfin-filter-actions .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

    .rapfin-filter-actions .btn-outline-danger:hover {
        background: #dc3545;
        color: white;
    }

/* Guide d'utilisation */
.rapfin-filter-guide .alert {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px dashed rgba(13, 110, 253, 0.2);
    border-radius: 15px;
}

.rapfin-guide-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== SÉLECTION CRÉANCIER ÉLÉGANTE ========== */
.rapfin-creancier-select-wrapper {
    position: relative;
}

    .rapfin-creancier-select-wrapper .input-group-text {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        font-size: 1.1rem;
    }

.rapfin-creancier-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background: linear-gradient(45deg, #f8f9fa, #ffffff);
}

    .rapfin-creancier-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        outline: none;
    }

    .rapfin-creancier-select option {
        padding: 12px;
        font-size: 0.95rem;
    }

/* Aperçu créancier élégant */
.rapfin-creancier-preview {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

    .rapfin-creancier-preview::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #28a745, #20c997);
    }

.rapfin-creancier-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rapfin-preview-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.rapfin-info-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

    .rapfin-info-item:last-child {
        border-bottom: none;
    }

.rapfin-info-icon {
    width: 32px;
    height: 32px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #667eea;
}

/* ========== BOUTONS D'ACTION PRÉMIUM ========== */
.rapfin-btn-export {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

    .rapfin-btn-export::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: 0.5s;
    }

    .rapfin-btn-export:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
    }

        .rapfin-btn-export:hover::before {
            left: 100%;
        }

    .rapfin-btn-export:active {
        transform: translateY(-2px);
    }

    .rapfin-btn-export:disabled {
        background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
        transform: none;
        box-shadow: none;
        opacity: 0.7;
        cursor: not-allowed;
    }

        .rapfin-btn-export:disabled:hover {
            transform: none;
            box-shadow: none;
        }

    .rapfin-btn-export .spinner-border {
        width: 20px;
        height: 20px;
        border-width: 2px;
        vertical-align: middle;
        margin-right: 10px;
    }

/* ========== FEATURES LIST ÉLÉGANTE ========== */
.rapfin-features-list {
    margin-top: 20px;
}

.rapfin-feature-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

    .rapfin-feature-item:hover {
        transform: translateX(10px);
        border-color: rgba(102, 126, 234, 0.2);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

.rapfin-feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #667eea;
    font-size: 1.2rem;
}

/* ========== ALERTES ÉLÉGANTES ========== */
.rapfin-alert-elegant {
    border-radius: 12px;
    border: none;
    padding: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

    .rapfin-alert-elegant::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 6px;
        height: 100%;
    }

.rapfin-alert-info-elegant {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(102, 126, 234, 0.08) 100%);
    border: 1px solid rgba(13, 110, 253, 0.15);
}

    .rapfin-alert-info-elegant::before {
        background: linear-gradient(180deg, #667eea, #764ba2);
    }

.rapfin-alert-warning-elegant {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(224, 168, 0, 0.08) 100%);
    border: 1px solid rgba(255, 193, 7, 0.15);
}

    .rapfin-alert-warning-elegant::before {
        background: linear-gradient(180deg, #ffc107, #e0a800);
    }

.rapfin-alert-success-elegant {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08) 0%, rgba(32, 201, 151, 0.08) 100%);
    border: 1px solid rgba(40, 167, 69, 0.15);
}

    .rapfin-alert-success-elegant::before {
        background: linear-gradient(180deg, #28a745, #20c997);
    }

.rapfin-alert-danger-elegant {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08) 0%, rgba(200, 35, 51, 0.08) 100%);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

    .rapfin-alert-danger-elegant::before {
        background: linear-gradient(180deg, #dc3545, #c82333);
    }

/* ========== BADGES ÉLÉGANTS ========== */
.rapfin-badge-elegant {
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.rapfin-badge-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.rapfin-badge-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.rapfin-badge-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.rapfin-badge-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
    color: white;
}

/* ========== LOADING STATES ========== */
.rapfin-loading-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rapfin-loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: rapfin-spin 1s ease-in-out infinite;
}

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

/* ========== ANIMATIONS GLOBALES ========== */
@keyframes rapfin-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rapfin-animate-fade-in-up {
    animation: rapfin-fadeInUp 0.6s ease-out forwards;
}

@keyframes rapfin-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.rapfin-pulse {
    animation: rapfin-pulse 2s infinite;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 992px) {
    .rapfin-date-range-arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }

    .rapfin-filter-actions {
        flex-direction: column;
        text-align: center;
    }

    .rapfin-period-summary {
        min-width: auto;
        margin-bottom: 15px;
    }

    .rapfin-preview-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rapfin-card-header h5 {
        font-size: 1.1rem;
    }

    .rapfin-btn-export {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .rapfin-feature-icon {
        width: 40px;
        height: 40px;
    }

    .rapfin-filter-icon-wrapper {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .rapfin-filter-card {
        border-radius: 20px !important;
    }

    .rapfin-date-range-container {
        padding: 15px;
    }

    .rapfin-filter-header h5 {
        font-size: 1.1rem;
    }

    .rapfin-date-icon {
        width: 30px;
        height: 30px;
    }

    .rapfin-btn-export {
        width: 100%;
        margin-bottom: 10px;
    }
}
