/**
 * Styles pour le dashboard Fidélité - Design La Mémée
 * Couleurs: #142451 (bleu), #F0B9F0 (rose), #F2E2D0 (crème)
 */

/* ========================================
   WRAPPER PRINCIPAL
   ======================================== */
.lp-loyalty-dashboard {
    font-family: inherit;
    color: #142451;
}

.lp-loyalty-dashboard h2 {
    color: #142451;
    font-weight: 700;
    margin: 30px 0 20px;
    font-size: 22px;
}

.lp-loyalty-dashboard h2:first-child {
    margin-top: 0;
}

/* ========================================
   CARTE DU SOLDE
   ======================================== */
.lp-loyalty-dashboard .lp-balance-card {
    background: linear-gradient(135deg, #F2E2D0 0%, #fff 100%);
    border: 2px solid #F0B9F0;
    border-radius: 20px;
    padding: 35px 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(20, 36, 81, 0.1);
    animation: lpFadeInUp 0.5s ease-out;
}

.lp-loyalty-dashboard .lp-balance-card h2 {
    color: #142451;
    font-size: 20px;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
}

.lp-loyalty-dashboard .lp-balance-number {
    font-size: 3em;
    font-weight: 700;
    margin: 10px 0 20px;
    color: #142451;
    line-height: 1;
}

.lp-loyalty-dashboard .lp-balance-card p {
    color: #142451;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.lp-loyalty-dashboard .lp-balance-card strong {
    color: #142451;
    font-weight: 700;
}

/* ========================================
   ENCART "À NOTER"
   ======================================== */
.lp-loyalty-dashboard .lp-notice {
    background: #F2E2D0;
    border: 2px solid #F0B9F0;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    color: #142451;
}

.lp-loyalty-dashboard .lp-notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.lp-loyalty-dashboard .lp-notice strong {
    color: #142451;
}

/* ========================================
   MESSAGES (succès / erreur)
   ======================================== */
.lp-loyalty-dashboard .woocommerce-message,
.lp-loyalty-dashboard .woocommerce-info {
    background: #F2E2D0 !important;
    border: 2px solid #F0B9F0 !important;
    color: #142451 !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
}

.lp-loyalty-dashboard .woocommerce-message::before,
.lp-loyalty-dashboard .woocommerce-info::before {
    color: #142451 !important;
}

.lp-loyalty-dashboard .woocommerce-error {
    background: #fff5f5 !important;
    border: 2px solid #e74c3c !important;
    color: #142451 !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
}

/* ========================================
   FORMULAIRE DE CONVERSION
   ======================================== */
.lp-loyalty-dashboard .lp-redeem-form {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(20, 36, 81, 0.08);
    margin: 20px 0 30px;
}

.lp-loyalty-dashboard .lp-redeem-form p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.lp-loyalty-dashboard .lp-redeem-form label {
    color: #142451;
    font-weight: 600;
    font-size: 15px;
    margin: 0;
}

.lp-loyalty-dashboard .lp-redeem-form select {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border: 2px solid #142451;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    color: #142451;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lp-loyalty-dashboard .lp-redeem-form select:focus {
    outline: none;
    border-color: #F0B9F0;
    box-shadow: 0 0 0 4px rgba(240, 185, 240, 0.2);
}

.lp-loyalty-dashboard .lp-redeem-form button,
.lp-loyalty-dashboard .lp-redeem-form .button {
    background: #142451 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
}

.lp-loyalty-dashboard .lp-redeem-form button:hover,
.lp-loyalty-dashboard .lp-redeem-form .button:hover {
    background: #F0B9F0 !important;
    color: #142451 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(240, 185, 240, 0.4) !important;
}

/* Message "il vous manque N points" */
.lp-loyalty-dashboard .lp-missing-points {
    background: #fff;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 5px 20px rgba(20, 36, 81, 0.08);
    color: #142451;
    font-size: 15px;
    margin: 20px 0 30px;
}

.lp-loyalty-dashboard .lp-missing-points strong {
    color: #142451;
    font-weight: 700;
}

/* ========================================
   HISTORIQUE
   ======================================== */
.lp-loyalty-dashboard table.lp-history {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(20, 36, 81, 0.08);
}

.lp-loyalty-dashboard table.lp-history thead th {
    background: #F2E2D0;
    color: #142451;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lp-loyalty-dashboard table.lp-history td {
    padding: 15px;
    border-bottom: 1px solid rgba(20, 36, 81, 0.08);
    color: #142451;
    font-size: 14px;
}

.lp-loyalty-dashboard table.lp-history tbody tr:last-child td {
    border-bottom: none;
}

.lp-loyalty-dashboard table.lp-history tbody tr:hover td {
    background: rgba(242, 226, 208, 0.3);
}

.lp-loyalty-dashboard .lp-points-pos {
    color: #2e7d32;
    font-weight: 700;
}

.lp-loyalty-dashboard .lp-points-neg {
    color: #c62828;
    font-weight: 700;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes lpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
    .lp-loyalty-dashboard .lp-balance-card {
        padding: 25px 20px;
    }

    .lp-loyalty-dashboard .lp-balance-number {
        font-size: 2.2em;
    }

    .lp-loyalty-dashboard .lp-redeem-form p {
        flex-direction: column;
        align-items: stretch;
    }

    .lp-loyalty-dashboard .lp-redeem-form select,
    .lp-loyalty-dashboard .lp-redeem-form button {
        width: 100%;
        min-width: 0;
    }

    .lp-loyalty-dashboard table.lp-history thead {
        display: none;
    }

    .lp-loyalty-dashboard table.lp-history,
    .lp-loyalty-dashboard table.lp-history tbody,
    .lp-loyalty-dashboard table.lp-history tr,
    .lp-loyalty-dashboard table.lp-history td {
        display: block;
        width: 100%;
    }

    .lp-loyalty-dashboard table.lp-history tr {
        border-bottom: 1px solid rgba(20, 36, 81, 0.1);
        padding: 10px 0;
    }

    .lp-loyalty-dashboard table.lp-history td {
        border: none;
        padding: 6px 15px;
        text-align: left !important;
    }

    .lp-loyalty-dashboard table.lp-history td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #142451;
        display: inline-block;
        width: 80px;
        margin-right: 10px;
        text-transform: uppercase;
        font-size: 12px;
    }
}
