/**
 * Primtee - Gestionnaire de Points Collaborateurs
 */

/* Container principal */
.primtee-points-manager {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.primtee-points-manager h1 {
    margin: 0 0 20px;
    font-size: 28px;
    font-weight: 600;
    color: #1a202c;
}

/* Barre de recherche */
.primtee-points-search {
    margin-bottom: 20px;
}

#primtee-points-search {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#primtee-points-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Tableau */
.primtee-points-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.primtee-points-table th,
.primtee-points-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
}

.primtee-points-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primtee-points-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.primtee-points-table tbody tr:hover {
    background: #f8fafc;
}

.primtee-points-table tbody tr:last-child {
    border-bottom: none;
}

/* Avatar */
.primtee-avatar {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

/* Solde */
.primtee-points-balance {
    font-weight: 700;
    font-size: 16px;
    color: #667eea;
    text-align: right;
}

/* Boutons d'action */
.primtee-points-actions {
    display: flex;
    gap: 8px;
}

.primtee-points-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
    transition: all 0.2s;
}

.primtee-points-btn-add {
    border-color: #48bb78;
    color: #48bb78;
}

.primtee-points-btn-add:hover {
    background: #48bb78;
    color: #fff;
}

.primtee-points-btn-remove {
    border-color: #f56565;
    color: #f56565;
}

.primtee-points-btn-remove:hover {
    background: #f56565;
    color: #fff;
}

/* Overlay */
.primtee-points-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(4px);
}

/* Popup */
.primtee-points-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.primtee-points-popup-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 28px;
    max-width: 420px;
    width: 92%;
    position: relative;
}

.primtee-points-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.primtee-points-popup-close:hover {
    color: #1a202c;
}

.primtee-points-popup h2 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    padding-right: 30px;
}

/* Formulaire popup */
.primtee-points-form-row {
    margin-bottom: 18px;
}

.primtee-points-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.primtee-points-form-row input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.primtee-points-form-row input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.primtee-points-form-actions {
    margin-top: 24px;
}

.primtee-points-btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.primtee-points-btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.primtee-points-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
#primtee-points-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

#primtee-points-message.success {
    display: block;
    background: #c6f6d5;
    color: #276749;
}

#primtee-points-message.error {
    display: block;
    background: #fed7d7;
    color: #c53030;
}

/* Erreur d'accès */
.primtee-points-error {
    padding: 20px;
    background: #fed7d7;
    color: #c53030;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .primtee-points-manager {
        padding: 12px;
    }

    .primtee-points-manager h1 {
        font-size: 22px;
    }

    .primtee-points-table {
        font-size: 14px;
    }

    .primtee-points-table th,
    .primtee-points-table td {
        padding: 10px 8px;
    }

    /* Masquer certaines colonnes sur mobile */
    .primtee-points-table th:nth-child(1),
    .primtee-points-table td:nth-child(1),
    .primtee-points-table th:nth-child(4),
    .primtee-points-table td:nth-child(4) {
        display: none;
    }

    .primtee-points-popup-content {
        padding: 20px;
    }
}

/* ========================================
 * CAGNOTTE CHECKOUT & COMPTE
 * ======================================== */

/* Bandeau wallet footer */
.primtee-wallet-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
}

.primtee-wallet-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.primtee-wallet-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.primtee-wallet-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.primtee-wallet-cta {
    margin-left: auto;
}

.primtee-wallet-cta a {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
}

/* Checkout wallet box */
.primtee-checkout-wallet {
    margin: 16px 0;
    padding: 16px;
    border: 2px solid #667eea;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.primtee-checkout-wallet-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.primtee-checkout-wallet-title .dashicons {
    color: #667eea;
    font-size: 20px;
}

.primtee-checkout-wallet-text {
    margin: 0 0 12px;
    color: #555;
}

.primtee-checkout-wallet-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.primtee-checkout-wallet-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Mon Compte wallet */
.primtee-account-wallet {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid #667eea;
}

.primtee-account-wallet .dashicons {
    color: #667eea;
    font-size: 24px;
}

.primtee-account-wallet-cta {
    margin-left: auto;
}

/* Shortcode points display */
.primtee-points {
    font-weight: 600;
    color: #667eea;
}

/* Responsive checkout */
@media (max-width: 768px) {
    .primtee-wallet-container {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .primtee-wallet-cta {
        margin-left: 0;
        width: 100%;
    }

    .primtee-account-wallet {
        flex-direction: column;
        text-align: center;
    }

    .primtee-account-wallet-cta {
        margin-left: 0;
        margin-top: 10px;
    }
}

