
/* Variables CSS */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --dark: #2d3748;
    --light: #f7fafc;
    --white: #ffffff;
    --gray: #718096;
    --border: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

/* Styles des cartes */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header i {
    font-size: 1.2rem;
}

.card-body {
    padding: 1.5rem;
}

/* Styles des alertes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert i {
    font-size: 1.2rem;
}

/* Styles du formulaire */
.sell-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-with-max {
    position: relative;
}

.max-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.max-button:hover {
    background: var(--secondary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.estimated-value {
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

/* Styles du tableau des cryptomonnaies */
.market-table {
    overflow-x: auto;
}

.market-table table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.market-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.market-table tr:last-child td {
    border-bottom: none;
}

.market-table tr:hover td {
    background-color: var(--light);
}

/* Colorisation des variations */
.market-table .positive {
    color: var(--success);
    font-weight: bold;
}

.market-table .negative {
    color: var(--danger);
    font-weight: bold;
}

/* Styles pour les soldes */
.balance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.balance-item:hover {
    background: #e6f7ff;
    transform: translateX(5px);
}

.balance-label {
    font-weight: 600;
    color: var(--gray);
}

.balance-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .card-header {
        font-size: 1.1rem;
        padding: 0.8rem 1.2rem;
    }
    
    .card-body {
        padding: 1.2rem;
    }
    
    .market-table {
        font-size: 0.9rem;
    }
    
    .market-table th,
    .market-table td {
        padding: 0.6rem 0.8rem;
    }
    
    .balance-item {
        padding: 0.8rem;
    }
    
    .balance-value {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .card-header {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .market-table {
        font-size: 0.8rem;
    }
    
    .market-table th,
    .market-table td {
        padding: 0.5rem 0.6rem;
    }
    
    .balance-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .balance-value {
        font-size: 1.1rem;
    }
}

