/* Variables CSS identiques à la page d'accueil */ 
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4d94;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fb;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header et navigation (identique à la page d'accueil) */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Section principale */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: 80vh;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    color: var(--dark-color);
}

.sidebar-menu a:hover {
    background-color: #f0f2f5;
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background-color: #eef2ff;
    color: var(--primary-color);
    font-weight: 500;
}

/* Contenu principal */
.content-area {
    min-height: 80vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.balance-display {
    font-size: 1rem;
    color: var(--gray-color);
}

.balance-display strong {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Cartes statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.balance-card .stat-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.transaction-card .stat-icon {
    background: linear-gradient(135deg, var(--accent-color), #ff6b9d);
}

.revenue-card .stat-icon {
    background: linear-gradient(135deg, var(--success-color), #34d058);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Carte virtuelle */
.virtual-card-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.virtual-card-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.card-container {
    perspective: 1000px;
}

.virtual-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 240px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 15px 35px rgba(106, 17, 203, 0.3);
    overflow: hidden;
    transition: var(--transition);
}

.virtual-card:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-logo {
    font-size: 1.3rem;
    font-weight: 700;
}

.card-type {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.card-chip {
    margin-bottom: 1.5rem;
}

.chip {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #f5d547, #fbb034);
    border-radius: 6px;
    position: relative;
}

.chip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 18px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.card-number-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-number {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.toggle-visibility-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.toggle-visibility-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card-holder-info,
.card-balance-info,
.card-expiry {
    display: flex;
    flex-direction: column;
}

.card-details .label {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-details .value,
.balance-amount {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Actions rapides */
.quick-actions-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.quick-actions-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: white;
    border: 2px solid #e0e7ff;
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.recharge-action .action-icon {
    background: linear-gradient(135deg, var(--success-color), #34d058);
}

.withdraw-action .action-icon {
    background: linear-gradient(135deg, var(--warning-color), #ffb300);
}

.history-action .action-icon {
    background: linear-gradient(135deg, var(--gray-color), #868e96);
}

.action-btn span {
    font-weight: 600;
    color: var(--dark-color);
}

/* Historique */
.history-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.history-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    color: var(--dark-color);
    cursor: pointer;
    font-size: 0.9rem;
}

.export-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.export-btn:hover {
    background: var(--secondary-color);
}

.transactions-container {
    margin-top: 1.5rem;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.no-transactions {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-color);
}

.no-transactions-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-transactions p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.no-transactions span {
    font-size: 0.9rem;
}

.transaction-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
}

.transaction-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.transaction-item.deposit {
    border-left-color: var(--success-color);
}

.transaction-item.withdrawal {
    border-left-color: var(--danger-color);
}

.transaction-info {
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.transaction-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-color);
    align-items: center;
}

.method-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.method-badge.online {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.method-badge.simulated {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.2rem;
}

.transaction-item.deposit .transaction-amount {
    color: var(--success-color);
}

.transaction-item.withdrawal .transaction-amount {
    color: var(--danger-color);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e7ff;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: #f0f2f5;
    color: var(--dark-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-description {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e7ff;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input-wrapper input {
    padding-right: 4rem;
}

.currency {
    position: absolute;
    right: 1rem;
    color: var(--gray-color);
    font-weight: 500;
    pointer-events: none;
}

.balance-info {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-top: 0.5rem;
}

.balance-info span {
    color: var(--success-color);
    font-weight: 600;
}

/* Payment Methods */
.payment-methods {
    margin: 1.5rem 0;
}

.payment-methods h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.payment-grid {
    display: grid;
    gap: 1rem;
}

.payment-method-btn {
    background: white;
    border: 2px solid #e0e7ff;
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.payment-method-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.payment-method-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    flex-shrink: 0;
}

.payment-info {
    text-align: left;
    flex: 1;
}

.payment-name {
    font-weight: 600;
    color: var(--dark-color);
    display: block;
    margin-bottom: 0.25rem;
}

.payment-desc {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Messages */
.message {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.message.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.message.warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.hidden {
    display: none !important;
}

.note {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 1rem;
    font-style: italic;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    max-width: 350px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: #ddd;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        z-index: 99;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    /* Liens de navigation sur mobile */
    .nav-links a {
        color: var(--dark-color);
        padding: 1rem;
        border-radius: var(--border-radius);
    }

    .nav-links a:hover {
        background-color: #f0f2f5;
    }

    .nav-links a.active {
        background-color: #eef2ff;
        color: var(--primary-color);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .virtual-card {
        height: 200px;
        padding: 1rem;
    }
    
    .card-number {
        font-size: 0.9rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .user-info span {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .filter-select,
    .export-btn {
        width: 100%;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .transaction-amount {
        align-self: flex-end;
    }
    
    .card-details {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .card-expiry {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 1rem 0.5rem;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .action-btn span {
        font-size: 0.85rem;
    }
    
    .virtual-card {
        height: 180px;
    }
    
    .modal-container {
        max-width: 95%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-card,
.virtual-card-section,
.quick-actions-section,
.history-section {
    animation: slideUp 0.5s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(106, 17, 203, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

/* Selection de texte */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Focus states pour accessibilité */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* États désactivés */
button:disabled,
input:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.align-center {
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* Badge styles supplémentaires */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.badge.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.badge.danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.badge.info {
    background-color: rgba(37, 117, 252, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(37, 117, 252, 0.2);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.status-indicator.pending {
    background-color: var(--warning-color);
    box-shadow: 0 0 10px var(--warning-color);
}

.status-indicator.inactive {
    background-color: var(--gray-color);
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--dark-color);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* Print styles */
@media print {
    header,
    .sidebar,
    footer,
    .quick-actions-section,
    .modal-overlay,
    .notification {
        display: none !important;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        width: 100%;
    }
    
    .transaction-item {
        page-break-inside: avoid;
    }
}

/* Préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mode sombre (préparation) */
@media (prefers-color-scheme: dark) {
    /* Décommenter pour activer le mode sombre automatique
    :root {
        --light-color: #1a1a1a;
        --dark-color: #f8f9fa;
        --gray-color: #adb5bd;
    }
    
    body {
        background-color: #0d1117;
        color: #f8f9fa;
    }
    
    .stat-card,
    .virtual-card-section,
    .quick-actions-section,
    .history-section,
    .modal-container,
    .sidebar {
        background-color: #161b22;
        color: #f8f9fa;
    }
    
    .transaction-item {
        background-color: #0d1117;
    }
    */
}

/* Support pour les écrans haute résolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .virtual-card {
        box-shadow: 0 20px 40px rgba(106, 17, 203, 0.4);
    }
}

/* Amélioration pour les écrans tactiles */
@media (hover: none) and (pointer: coarse) {
    .action-btn,
    .payment-method-btn,
    .stat-card {
        min-height: 48px;
    }
    
    button,
    a,
    input,
    select {
        min-height: 44px;
    }
}

/* Support pour les appareils avec encoche (iPhone X+) */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    header {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}

/* Optimisations de performance */
.virtual-card,
.modal-overlay,
.notification {
    will-change: transform;
}

.stat-card,
.action-btn,
.transaction-item {
    will-change: transform, box-shadow;
}

/* Corrections pour iOS Safari */
@supports (-webkit-touch-callout: none) {
    .form-control,
    .filter-select {
        font-size: 16px;
    }
}

/* Message informatif sur les transactions */
.transactions-info-message {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(106, 17, 203, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.transactions-info-message i {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .transactions-info-message {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    .transactions-info-message i {
        font-size: 1rem;
    }
}

.clean-btn {
    padding: 0.6rem 1rem;
    background: var(--warning-color);
    color: #333;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.clean-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.clean-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* Fin du fichier CSS */