.montante-container { 
    max-width:960px; 
    margin:0 auto; 
    font-family:'Segoe UI',Arial,sans-serif; 
    background:#f8fafc; 
    padding:25px 12px 30px; 
}

.montante-header { 
    background:linear-gradient(105deg,#6a82fb 0%, #fc5c7d 100%); 
    color:#fff; 
    border-radius:18px; 
    padding:40px 25px 30px 25px; 
    text-align:center; 
    margin-bottom:32px;
}

.montante-header h2 { 
    font-size:2.4em; 
    font-weight:800; 
    margin-bottom:8px;
}

.montante-header p { 
    font-size:1.15em; 
    color:#f4edf8;
}

.montante-stats { 
    display:flex; 
    gap:18px; 
    margin-bottom:30px; 
    flex-wrap:wrap; 
    justify-content:center;
}

.stat-card { 
    background:#fff; 
    border-radius:15px; 
    flex:1 1 250px; 
    min-width:180px; 
    padding:30px 20px; 
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    box-shadow:0 5px 25px rgba(120,130,180,0.08);
}

.stat-card .stat-icon {
    font-size:2.1em; 
    margin-bottom:8px;
}

.stat-card .stat-value { 
    font-size:2em; 
    font-weight:700; 
    margin-bottom:2px;
}

.stat-label { 
    font-size:0.97em; 
    color:#888; 
    font-weight:500;
}

.montante-form-section, .montante-historic-section { 
    background:#fff; 
    border-radius:15px; 
    padding:35px 28px; 
    margin-bottom:35px; 
    box-shadow:0 4px 18px rgba(98,102,234,0.07);
}

.montante-form-section h3, .montante-historic-section h3 {
    font-size:1.45em; 
    margin-bottom:25px;
}

.form-group { 
    margin-bottom:22px; 
}

.form-group label { 
    font-weight:600; 
    color:#25406b; 
    margin-bottom:8px; 
    display:block;
}

.form-group small { 
    color:#9eabbf; 
    font-size:0.96em;
}

.form-row { 
    display:flex; 
    gap:18px; 
    flex-wrap:wrap;
}

.form-row .form-group { 
    flex:1 1 200px;
}

.form-group input[type="number"], .form-group input[type="text"] { 
    width:100%; 
    padding:13px 16px; 
    border:2px solid #e3e6ec; 
    border-radius:8px; 
    font-size:1em; 
    background:#f3f6fb;
    box-sizing:border-box;
}

.form-group input:focus {
    border-color:#6a82fb;
    outline:none;
    background:#fff;
}

.calculation-result { 
    margin:32px 0 20px 0;
}

.result-card { 
    background:linear-gradient(100deg,#6a82fb 0%, #fc5c7d 100%); 
    color:#fff; 
    border-radius:13px; 
    padding:28px 16px 18px; 
    text-align:center;
}

.result-header h4 {
    margin:0 0 18px 0;
}

.mise-calculee { 
    font-size:2.35em; 
    font-weight:900;
}

.gain-details {
    display:flex; 
    justify-content:space-between; 
    flex-wrap:wrap; 
    gap:20px; 
    font-size:1.11em;
}

.gain-potentiel,.benefice-net{
    flex:1 1 110px;
}

.form-actions {
    margin-top:22px; 
    display:flex; 
    gap:18px;
}

.btn-primary {
    background:linear-gradient(90deg,#6a82fb 0%, #fc5c7d 100%); 
    color:#fff; 
    padding:12px 30px; 
    border:none;
    border-radius:8px;
    font-size:1.08em; 
    cursor:pointer;
    transition:all 0.3s ease;
}

.btn-primary:hover {
    opacity:0.9; 
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(106,130,251,0.3);
}

.btn-primary:active {
    transform:translateY(0);
}

.historic-table { 
    width:100%; 
    border-collapse:collapse; 
    background:#fafbff; 
    box-shadow:0 1px 8px rgba(120,130,180,0.07);
}

.historic-table th, .historic-table td { 
    padding:13px 10px; 
    border-bottom:1.5px solid #eaebf2; 
    text-align:left;
}

.historic-table th {
    background:linear-gradient(98deg, #6a82fb 20%, #fc5c7d 85%); 
    color:#fff;
}

.historic-table tbody tr:hover {
    background:#f8f9ff;
}

/* Nouveaux styles pour les boutons de résultat */
.btn-result {
    padding:6px 12px;
    border:none;
    border-radius:4px;
    cursor:pointer;
    font-size:13px;
    font-weight:500;
    transition:all 0.3s ease;
    margin:2px;
}

.btn-win {
    background:#27ae60;
    color:#fff;
}

.btn-win:hover {
    background:#219a52;
    transform:translateY(-1px);
}

.btn-lose {
    background:#e74c3c;
    color:#fff;
}

.btn-lose:hover {
    background:#c0392b;
    transform:translateY(-1px);
}

.btn-result:disabled {
    opacity:0.5;
    cursor:not-allowed;
    transform:none !important;
}

.btn-delete-bet { 
    background:#95a5a6; 
    color:#fff; 
    border:none; 
    padding:6px 12px; 
    border-radius:4px; 
    cursor:pointer; 
    font-size:13px;
    transition:background 0.3s ease;
}

.btn-delete-bet:hover { 
    background:#7f8c8d; 
}

.btn-delete-bet:disabled { 
    background:#bdc3c7; 
    cursor:not-allowed; 
}

.status-en_attente { 
    color:#e7b142; 
    font-weight:700;
    background:#fff8e1;
    padding:4px 8px;
    border-radius:4px;
    font-size:0.9em;
}

.status-gagne { 
    color:#27ad71; 
    font-weight:700;
    background:#e8f5e8;
    padding:4px 8px;
    border-radius:4px;
    font-size:0.9em;
}

.status-perdu { 
    color:#e74c3c; 
    font-weight:700;
    background:#fdeaea;
    padding:4px 8px;
    border-radius:4px;
    font-size:0.9em;
}

.loading-container { 
    text-align:center; 
    padding:40px 20px;
}

.loading-spinner {
    display:inline-block;
    width:32px;
    height:32px;
    border:4px solid rgba(120,120,234,0.19);
    border-radius:50%;
    border-top-color:#6a82fb;
    animation:spin .9s linear infinite;
}

@keyframes spin {
    to{transform:rotate(360deg);}
}

/* Messages d'erreur et de succès */
.alert {
    padding:12px 16px;
    border-radius:6px;
    margin:10px 0;
    font-size:0.95em;
}

.alert-success {
    background:#d4edda;
    border:1px solid #c3e6cb;
    color:#155724;
}

.alert-error {
    background:#f8d7da;
    border:1px solid #f5c6cb;
    color:#721c24;
}

/* FORÇAGE ABSOLU du champ pertes totales en mode édition */
#pertes-totales {
    background-color: #f3f6fb !important;
    color: #000 !important;
    cursor: text !important;
    pointer-events: auto !important;
}

#pertes-totales[readonly] {
    background-color: #f3f6fb !important;
    color: #000 !important;
    cursor: text !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Surcharge tous les styles possibles */
input#pertes-totales:read-only,
input#pertes-totales[readonly],
input#pertes-totales:disabled {
    background-color: #f3f6fb !important;
    color: #000 !important;
    cursor: text !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Responsive */
@media (max-width:940px){
    .montante-stats{
        flex-direction:column;
        gap:10px;
    }
    .form-row{
        flex-direction:column;
        gap:10px;
    }
}

@media (max-width:600px){
    .montante-header,.montante-form-section,.montante-historic-section{
        padding:20px 15px;
    }
    .montante-header h2{
        font-size:1.8em;
    }
    .mise-calculee{
        font-size:1.8em;
    }
    .stat-card{
        padding:20px 15px;
    }
    .form-group input{
        font-size:1em;
        padding:10px 12px;
    }
    .form-actions{
        gap:10px;
    }
    .historic-table th,.historic-table td{
        padding:8px 6px;
        font-size:0.9em;
    }
    .btn-result, .btn-delete-bet {
        padding:4px 8px;
        font-size:11px;
    }
}
