/* ============================= */
/*  Historique des opérations    */
/* ============================= */

.history-card {
    position: relative;
    margin-top: 18px;
}

/* Petit effet décoratif sous le titre */
.history-card h2 {
    position: relative;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.history-card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #6b8bff, #ff6ec7);
    border-radius: 999px;
}

/* Texte quand il n'y a pas d'opérations */
.history-card .no-ops {
    text-align: center;
    padding: 10px 5px;
    font-size: 0.9rem;
    color: #9aa4c8;
    font-style: italic;
}

/* Conteneur avec scroll si beaucoup de lignes */
.ops-table-wrapper {
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid rgba(120, 130, 255, 0.35);
    background: radial-gradient(circle at top left,
                rgba(80, 120, 255, 0.15),
                transparent 55%),
                rgba(8, 10, 25, 0.95);

    max-height: 260px;
    overflow-y: auto;   /* scroll vertical */
    overflow-x: hidden;
}

.ops-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(10, 12, 35, 0.98);
}


/* Table de l'historique */
.ops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.ops-table thead th {
    background: rgba(10, 12, 35, 0.98);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ab4ff;
    border-bottom: 1px solid rgba(120, 130, 255, 0.5);
}

.ops-table tbody tr:nth-child(even) {
    background: rgba(18, 20, 45, 0.85);
}

.ops-table tbody tr:nth-child(odd) {
    background: rgba(10, 12, 30, 0.85);
}

.ops-table tbody tr:hover {
    background: rgba(120, 130, 255, 0.18);
}

.ops-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(40, 45, 80, 0.8);
}

/* Colonnes + / − / ↔ (les classes sont déjà posées en PHP) */
.ops-table td.plus {
    color: #4CAF50;
    font-weight: 600;
}

.ops-table td.moins {
    color: #F44336;
    font-weight: 600;
}

.ops-table td.trans {
    color: #2196F3;
    font-weight: 600;
}

/* Formulaire de reset */
.history-reset-form {
    margin-top: 12px;
    text-align: right;
}

/* Bouton “Supprimer l’historique” style cyberpunk/danger */
.history-reset-btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 91, 118, 0.8);
    background: radial-gradient(circle at top,
                rgba(255, 120, 150, 0.25),
                rgba(40, 8, 20, 0.95));
    color: #ffd8df;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    box-shadow:
        0 0 8px rgba(255, 99, 132, 0.45),
        0 0 18px rgba(255, 40, 90, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.history-reset-btn:hover {
    transform: translateY(-1px);
    background: radial-gradient(circle at top,
                rgba(255, 140, 170, 0.4),
                rgba(60, 12, 30, 0.98));
    box-shadow:
        0 0 10px rgba(255, 120, 150, 0.7),
        0 0 24px rgba(255, 60, 115, 0.6);
}

.history-reset-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 0 6px rgba(255, 90, 130, 0.5),
        0 0 14px rgba(255, 40, 90, 0.4);
}

/* Petit ajustement responsive */
@media (max-width: 480px) {
    .ops-table thead th,
    .ops-table td {
        padding: 6px 7px;
    }
}
