/**
 * Walter Finance - Styles Page Membre
 * Couleurs du site: Bleu professionnel #1a4d7f, Vert accent #2ecc71, Gris #f8f9fa
 */

:root {
    --wf-primary: #1a4d7f;
    --wf-secondary: #2ecc71;
    --wf-accent: #3498db;
    --wf-dark: #2c3e50;
    --wf-light: #f8f9fa;
    --wf-gray: #95a5a6;
    --wf-success: #27ae60;
    --wf-warning: #f39c12;
    --wf-danger: #e74c3c;
    --wf-white: #ffffff;
    --wf-border: #dee2e6;
}

/* Layout général */
.woocommerce-account .woocommerce {
    background-color: var(--wf-light);
    min-height: 100vh;
}

/* Navigation latérale */
.woocommerce-MyAccount-navigation {
    background: var(--wf-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
    border-bottom: 1px solid var(--wf-border);
}

.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    color: var(--wf-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: var(--wf-light);
    color: var(--wf-primary);
    padding-left: 28px;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: var(--wf-primary);
    color: var(--wf-white);
    border-left: 4px solid var(--wf-secondary);
}

.woocommerce-MyAccount-navigation ul li.is-active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--wf-secondary);
}

.woocommerce-MyAccount-navigation ul li a i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Contenu principal */
.woocommerce-MyAccount-content {
    background: transparent;
    padding: 0;
}

/* Cards */
.wf-card {
    background: var(--wf-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wf-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.wf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--wf-light);
}

.wf-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--wf-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wf-card-title i {
    font-size: 24px;
    color: var(--wf-secondary);
}

/* Header de bienvenue */
.wf-welcome-header {
    background: linear-gradient(135deg, var(--wf-primary) 0%, var(--wf-accent) 100%);
    color: var(--wf-white);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(26, 77, 127, 0.3);
}

.wf-welcome-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--wf-white);
}

.wf-welcome-header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

/* Statistiques */
.wf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.wf-stat-card {
    background: var(--wf-white);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--wf-primary);
}

.wf-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.wf-stat-card.success {
    border-top-color: var(--wf-success);
}

.wf-stat-card.warning {
    border-top-color: var(--wf-warning);
}

.wf-stat-card.info {
    border-top-color: var(--wf-accent);
}

.wf-stat-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: var(--wf-primary);
}

.wf-stat-card.success .wf-stat-icon {
    color: var(--wf-success);
}

.wf-stat-card.warning .wf-stat-icon {
    color: var(--wf-warning);
}

.wf-stat-card.info .wf-stat-icon {
    color: var(--wf-accent);
}

.wf-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--wf-dark);
    margin: 8px 0;
}

.wf-stat-label {
    font-size: 14px;
    color: var(--wf-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table des factures */
.wf-invoice-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.wf-invoice-table thead {
    background: var(--wf-light);
}

.wf-invoice-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--wf-dark);
    border-bottom: 2px solid var(--wf-border);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wf-invoice-table td {
    padding: 16px;
    border-bottom: 1px solid var(--wf-border);
    color: var(--wf-dark);
}

.wf-invoice-table tbody tr {
    transition: background-color 0.3s ease;
}

.wf-invoice-table tbody tr:hover {
    background-color: var(--wf-light);
}

/* Badges de statut */
.wf-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wf-badge.open {
    background-color: #fff3cd;
    color: #856404;
}

.wf-badge.paid {
    background-color: #d4edda;
    color: #155724;
}

.wf-badge.overdue {
    background-color: #f8d7da;
    color: #721c24;
}

.wf-badge.pending {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Boutons personnalisés */
.wf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.wf-btn-primary {
    background-color: var(--wf-primary);
    color: var(--wf-white);
}

.wf-btn-primary:hover {
    background-color: #153d65;
    color: var(--wf-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 77, 127, 0.3);
}

.wf-btn-success {
    background-color: var(--wf-success);
    color: var(--wf-white);
}

.wf-btn-success:hover {
    background-color: #229954;
    color: var(--wf-white);
}

.wf-btn-danger {
    background-color: var(--wf-danger);
    color: var(--wf-white);
}

.wf-btn-danger:hover {
    background-color: #c0392b;
    color: var(--wf-white);
}

.wf-btn-secondary {
    background-color: var(--wf-light);
    color: var(--wf-dark);
    border: 1px solid var(--wf-border);
}

.wf-btn-secondary:hover {
    background-color: var(--wf-border);
    color: var(--wf-dark);
}

.wf-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Liste de fichiers */
.wf-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wf-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--wf-border);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: var(--wf-white);
}

.wf-file-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--wf-primary);
}

.wf-file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.wf-file-icon {
    font-size: 32px;
    color: var(--wf-primary);
    width: 40px;
    text-align: center;
}

.wf-file-icon.pdf {
    color: #e74c3c;
}

.wf-file-icon.doc {
    color: #3498db;
}

.wf-file-icon.xls {
    color: #27ae60;
}

.wf-file-icon.img {
    color: #9b59b6;
}

.wf-file-details h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--wf-dark);
}

.wf-file-meta {
    font-size: 13px;
    color: var(--wf-gray);
}

.wf-file-actions {
    display: flex;
    gap: 8px;
}

/* Upload zone */
.wf-upload-zone {
    border: 2px dashed var(--wf-border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--wf-light);
}

.wf-upload-zone:hover,
.wf-upload-zone.dragover {
    border-color: var(--wf-primary);
    background: rgba(26, 77, 127, 0.05);
}

.wf-upload-icon {
    font-size: 48px;
    color: var(--wf-primary);
    margin-bottom: 16px;
}

.wf-upload-text {
    font-size: 16px;
    color: var(--wf-dark);
    margin-bottom: 8px;
}

.wf-upload-hint {
    font-size: 14px;
    color: var(--wf-gray);
}

/* Alertes personnalisées */
.wf-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wf-alert i {
    font-size: 20px;
}

.wf-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.wf-alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.wf-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.wf-alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Timeline des commandes */
.wf-order-timeline {
    position: relative;
    padding-left: 40px;
}

.wf-order-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--wf-border);
}

.wf-order-item {
    position: relative;
    padding-bottom: 24px;
}

.wf-order-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--wf-primary);
    border: 3px solid var(--wf-white);
    box-shadow: 0 0 0 2px var(--wf-border);
}

.wf-order-item:last-child {
    padding-bottom: 0;
}

/* Filtres */
.wf-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wf-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--wf-border);
    border-radius: 20px;
    background: var(--wf-white);
    color: var(--wf-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.wf-filter-btn:hover {
    border-color: var(--wf-primary);
    color: var(--wf-primary);
}

.wf-filter-btn.active {
    background: var(--wf-primary);
    color: var(--wf-white);
    border-color: var(--wf-primary);
}

/* Recherche */
.wf-search-box {
    position: relative;
    margin-bottom: 20px;
}

.wf-search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--wf-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wf-search-box input:focus {
    outline: none;
    border-color: var(--wf-primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 127, 0.1);
}

.wf-search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wf-gray);
}

/* Pagination */
.wf-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.wf-pagination a,
.wf-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--wf-border);
    border-radius: 8px;
    color: var(--wf-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.wf-pagination a:hover {
    border-color: var(--wf-primary);
    background: var(--wf-primary);
    color: var(--wf-white);
}

.wf-pagination .current {
    background: var(--wf-primary);
    color: var(--wf-white);
    border-color: var(--wf-primary);
}

/* Loading spinner */
.wf-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--wf-white);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .wf-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .wf-welcome-header h1 {
        font-size: 24px;
    }
    
    .wf-invoice-table {
        font-size: 14px;
    }
    
    .wf-invoice-table th,
    .wf-invoice-table td {
        padding: 12px 8px;
    }
    
    .wf-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .wf-file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .woocommerce-MyAccount-navigation {
        position: static;
        margin-bottom: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wf-card,
.wf-stat-card,
.wf-file-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --wf-light: #2c3e50;
        --wf-white: #34495e;
        --wf-dark: #ecf0f1;
        --wf-border: #4a5f7f;
    }
}

/* Print styles */
@media print {
    .woocommerce-MyAccount-navigation,
    .wf-btn,
    .wf-file-actions {
        display: none;
    }
    
    .wf-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
