/* ============================================================
   Book Potential Analyzer - Styles
   ============================================================ */

/* ============================================================
   COMMUN - Boutons
   ============================================================ */

.bpa-btn {
    display: inline-block;
    padding: 9px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.bpa-btn-primary {
    background: #0073aa;
    color: #fff;
}

.bpa-btn-primary:hover {
    background: #005f8d;
    transform: translateY(-1px);
}

.bpa-btn-secondary {
    background: #6b7280;
    color: #fff;
}

.bpa-btn-secondary:hover { background: #4b5563; }

.bpa-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   COMMUN - Notices
   ============================================================ */

.bpa-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.bpa-notice-error {
    background: #fdecea;
    border: 1px solid #e57373;
    color: #c62828;
}

.bpa-notice-warning {
    background: #fff8e6;
    border-left: 4px solid #cc8800;
    color: #cc8800;
}

.bpa-notice-success {
    background: #e6ffe6;
    border-left: 4px solid #00a32a;
    color: #00a32a;
}

.bpa-notice-info {
    background: #e6f3ff;
    border-left: 4px solid #1a73e8;
    color: #1a73e8;
}

/* ============================================================
   COMMUN - Spinner
   ============================================================ */

.bpa-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #e5e5e5;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: bpa-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes bpa-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   SHORTCODES - Structure commune
   ============================================================ */

.bpa-ks-wrap {
    max-width: 700px;
    margin: 0 auto 30px;
}

.bpa-ks-form-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.bpa-ks-form-box h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #1a1a1a;
}

/* ============================================================
   COMMUN - Champs et inputs
   ============================================================ */

.bpa-ks-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
}

.bpa-ks-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bpa-ks-input-row input[type="text"] {
    flex: 1;
    min-width: 220px;
    padding: 9px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color .2s;
}

.bpa-ks-input-row input[type="text"]:focus {
    border-color: #0073aa;
}

.bpa-ks-hint {
    color: #888;
    font-size: 14px;
    margin-top: 8px;
    font-weight: normal;
}
.bpa-ks-cost-hint {
    color: #0073aa;
    font-size: 14px;
    margin-left: 4px;
    font-weight: normal;
}

/* ============================================================
   COMMUN - Genres / Filtres pills
   ============================================================ */

.bpa-ks-genres {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
}

.bpa-ks-genres-first {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.bpa-ks-genres-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
}

.bpa-ks-genres-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bpa-ks-genre-cb {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}

.bpa-ks-genre-cb:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.bpa-ks-genre-cb input[type="checkbox"],
.bpa-ks-genre-cb input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.bpa-ks-genre-cb:has(input:checked) {
    background: #e8f4fb;
    border-color: #0073aa;
    color: #0073aa;
    font-weight: 600;
}

/* ============================================================
   COMMUN - Tableau DFS / Mots-clés
   ============================================================ */

.bpa-ks-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    padding: 0;
}

.bpa-ks-sub-title {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: #444;
}

.bpa-ks-kw-box {
    margin-top: 20px;
}

.bpa-ks-kw-summary {
    font-size: 13px;
    color: #555;
    margin: 0 0 6px;
}

.bpa-ks-table-wrap {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.bpa-ks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bpa-ks-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    padding: 9px 8px;
    font-weight: 600;
    font-size: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.bpa-ks-th-num  { text-align: right !important; min-width: 80px; }
.bpa-ks-th-icon { text-align: center !important; width: 30px; }
.bpa-ks-th-kw   { min-width: 180px; }

.bpa-ks-kw-row {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}

.bpa-ks-kw-row:hover { background: #fafafa; }
.bpa-ks-kw-row td    { padding: 7px 8px; }

.bpa-ks-num   { text-align: right; }
.bpa-ks-muted { color: #9ca3af; }
.bpa-ks-gg    { color: #2563eb; font-weight: 600; }

.bpa-ks-kw-link {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.bpa-ks-kw-link:hover { text-decoration: underline; }
.bpa-ks-kw-link.active { color: #7c3aed; font-weight: 700; }

/* Score colonne */
.bpa-ks-score {
    font-weight: 700;
    color: #374151;
}

.bpa-ks-score-commercial {
    color: #b45309;
}

.bpa-ks-commercial-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 4px;
}

/* ============================================================
   COMMUN - Stats (3 colonnes)
   ============================================================ */

.bpa-ks-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.bpa-ks-stat {
    background: #f5f7fa;
    border-radius: 6px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bpa-ks-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bpa-ks-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
}

.bpa-ks-stat-value.bpa-ks-ca    { color: #8e44ad; }
.bpa-ks-stat-value.bpa-ks-sales { color: #27ae60; }

/* ============================================================
   COMMUN - Cartes livres
   ============================================================ */

.bpa-ks-book-box {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.bpa-ks-book-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bpa-ks-book-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.bpa-ks-book-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.bpa-ks-book-rank {
    min-width: 26px;
    height: 26px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bpa-ks-book-rank-fallback {
    background: #9ca3af;
}

.bpa-ks-book-cover-link {
    flex-shrink: 0;
    display: block;
}

.bpa-ks-book-cover {
    width: 52px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    display: block;
}

.bpa-ks-book-thumb {
    width: 60px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    vertical-align: top;
    margin-right: 12px;
}

.bpa-ks-book-title {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

.bpa-ks-book-title:hover { text-decoration: underline; }

.bpa-ks-book-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bpa-ks-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bpa-ks-meta-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.bpa-ks-meta-value {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

.bpa-ks-bsr   { color: #e67e22; }
.bpa-ks-sales { color: #27ae60; }
.bpa-ks-ca    { color: #8e44ad; }

/* ============================================================
   COMMUN - Catégories dans les cartes livres
   ============================================================ */

.bpa-ks-book-cats {
    border-top: 1px solid #ececec;
    padding-top: 10px;
}

.bpa-ks-cat-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bpa-ks-cat-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.bpa-ks-cat-list li:last-child { border-bottom: none; }

.bpa-ks-cat-name {
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

.bpa-ks-cat-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bpa-ks-cat-bsr {
    background: #eaf4fb;
    color: #0073aa;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
}

.bpa-ks-cat-info {
    background: #f0f0f0;
    color: #666;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 11px;
}

/* ============================================================
   COMMUN - Loading / Error
   ============================================================ */

.bpa-ks-loading {
    padding: 16px;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.bpa-ks-error {
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 14px;
}

/* ============================================================
   COMMUN - Voir quand même
   ============================================================ */

.bpa-ks-voir-quand-meme {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

.bpa-ks-voir-quand-meme select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
}

/* ============================================================
   [bpa_easy_categories] - Spécifique
   ============================================================ */

.bpa-ec-th-sort {
    cursor: pointer;
    user-select: none;
}

.bpa-ec-th-sort:hover { background: #e2e8f0; }

/* bpa-ec-format et bpa-ec-genre sont des inputs dans .bpa-ks-genre-cb,
   pas besoin de style propre */

/* ============================================================
   [bpa_kdp_keywords] - Spécifique
   ============================================================ */

.bpa-kdp-results-box {
    margin-top: 24px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
}

.bpa-kdp-term-cb {
    cursor: pointer;
    accent-color: #0073aa;
}

/* ============================================================
   ADMIN - Statistiques communes
   ============================================================ */

.bpa-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.bpa-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
}

.bpa-stat-card.alt1  { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.bpa-stat-card.alt2  { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.bpa-stat-card.green { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); }
.bpa-stat-card.orange{ background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.bpa-stat-card.blue  { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.bpa-stat-label {
    font-size: 13px;
    opacity: 0.9;
}

.bpa-stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-top: 5px;
}

/* ============================================================
   ADMIN - Tables génériques
   ============================================================ */

.bpa-pricing-table,
.bpa-users-table,
.bpa-tx-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
}

.bpa-pricing-table th,
.bpa-users-table th,
.bpa-tx-table th {
    background: #f6f7f7;
    text-align: left;
    padding: 12px;
    font-weight: 600;
    border-bottom: 2px solid #c3c4c7;
}

.bpa-pricing-table td,
.bpa-users-table td {
    padding: 12px;
    border-bottom: 1px solid #dcdcde;
}

.bpa-tx-table td {
    padding: 10px;
    border-bottom: 1px solid #dcdcde;
    font-size: 13px;
}

.bpa-pricing-table tr:hover,
.bpa-users-table tr:hover,
.bpa-tx-table tr:hover { background: #f6f7f7; }

.bpa-pricing-table tr.inactive { opacity: 0.5; }
.bpa-users-table tr.selected   { background: #e6f3ff; }

.bpa-service-key {
    font-family: monospace;
    color: #d63638;
    background: #f6f7f7;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.bpa-cost-input { width: 120px; padding: 6px; }

.tx-credit { color: #00a32a; }
.tx-debit  { color: #d63638; }

.balance-positive { color: #00a32a; font-weight: 600; }
.balance-zero     { color: #8c8f94; }

/* ============================================================
   ADMIN - Formulaires
   ============================================================ */

.bpa-add-form,
.bpa-action-panel {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #c3c4c7;
}

.bpa-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.bpa-action-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================================
   ADMIN - Balance / Recharge
   ============================================================ */

.bpa-balance-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.bpa-balance-label { font-size: 16px; opacity: 0.9; }
.bpa-balance-value { font-size: 48px; font-weight: bold; margin-top: 10px; }

.bpa-balance-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.bpa-balance-ok     { background: #e6ffe6; color: #00a32a; border: 1px solid #00a32a; }
.bpa-balance-medium { background: #fff8e6; color: #cc8800; border: 1px solid #cc8800; }
.bpa-balance-low    { background: #ffe6e6; color: #d63638; border: 1px solid #d63638; }
.bpa-balance-icon   { font-size: 16px; }

.bpa-amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.bpa-amount-card {
    background: white;
    border: 3px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.bpa-amount-card:hover  { border-color: #2271b1; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.bpa-amount-card.selected { border-color: #2271b1; background: #e6f3ff; }
.bpa-amount-value { font-size: 32px; font-weight: bold; color: #2271b1; }
.bpa-amount-label { font-size: 13px; color: #646970; margin-top: 5px; }

.bpa-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.bpa-payment-btn {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: 2px solid #ddd;
    background: white;
    transition: all 0.3s;
}

.bpa-payment-btn:hover   { border-color: #2271b1; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.bpa-payment-btn.disabled{ opacity: 0.5; cursor: not-allowed; }
.bpa-payment-icon  { font-size: 48px; margin-bottom: 10px; }
.bpa-payment-name  { font-size: 18px; font-weight: 600; color: #1d2327; }
.bpa-payment-note  { font-size: 12px; color: #646970; margin-top: 5px; }

.bpa-info-box {
    background: #e6f3ff;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.bpa-warning-box {
    background: #fff8e6;
    border-left: 4px solid #cc8800;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 600px) {
    .bpa-ks-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .bpa-ks-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .bpa-btn {
        width: 100%;
        text-align: center;
    }

    .bpa-action-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .bpa-ks-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   COMMUN - Nouveaux éléments standardisés
   ============================================================ */

/* Champ filtres inline (bestsellers) */
.bpa-ks-field-filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Inputs compacts */
.bpa-ks-input-sm {
    width: 90px;
    margin-left: 6px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Selects compacts */
.bpa-ks-select-sm {
    margin-left: 6px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

/* Label inline flex */
.bpa-ks-label-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

/* Bouton avec margin-top */
.bpa-btn-mt  { margin-top: 12px; }
/* Bouton poussé à droite */
.bpa-btn-ml-auto { margin-left: auto; }

/* Input-row avec margin-top */
.bpa-ks-input-row-mt { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e0e0e0; }

/* ============================================================
   COMMUN - Details / Accordéons
   ============================================================ */

.bpa-details {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.bpa-details-success { border-color: #d4edda; margin-bottom: 12px; }
.bpa-details-danger  { border-color: #f5c6cb; margin-bottom: 20px; }

.bpa-details-summary {
    padding: 10px 14px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bpa-details-summary-success { background: #f0faf3; color: #1a7340; }
.bpa-details-summary-danger  { background: #fff5f5; color: #c0392b; }

.bpa-details-arrow { color: #aaa; font-size: 11px; }

.bpa-details-body {
    padding: 12px 14px;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    background: #fff;
}

/* ============================================================
   BESTSELLERS - Tableau tendances mots-clés
   ============================================================ */

.bpa-trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.bpa-trend-row { border-bottom: 1px solid #f0f0f0; }

.bpa-trend-td-kw  { padding: 4px 6px; font-weight: 500; }

.bpa-trend-td-val {
    padding: 4px 6px;
    text-align: right;
    white-space: nowrap;
}

.bpa-trend-td-val-up   { color: #1a7340; }
.bpa-trend-td-val-down { color: #c0392b; }

/* ============================================================
   BESTSELLERS - Badges status / tendance
   ============================================================ */

.bpa-bs-status-entrant { color: #1a7340; font-size: 11px; font-weight: 600; }
.bpa-bs-status-sortant { color: #c0392b; font-size: 11px; font-weight: 600; }
.bpa-bs-status-stable  { color: #2563eb; font-size: 11px; font-weight: 600; }
.bpa-bs-trend-icon     { font-size: 12px; }

/* ============================================================
   BESTSELLERS - Carte livre
   ============================================================ */

.bpa-ks-book-content {
    flex: 1;
    min-width: 0;
}

.bpa-ks-book-submeta {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.bpa-ks-book-badges {
    margin-left: 8px;
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.bpa-ks-cat-link {
    color: #b8860b;
    font-weight: 600;
    cursor: pointer;
    font-size: 11px;
}

/* ============================================================
   EASY-CATEGORIES - Spécifique
   ============================================================ */

.bpa-ec-title { margin-bottom: 20px; }

/* ============================================================
   KDP-KEYWORDS - Spécifique
   ============================================================ */

.bpa-kdp-login-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: #991b1b;
    margin-bottom: 12px;
}

.bpa-kdp-login-link { color: #991b1b; font-weight: 600; }

.bpa-kdp-intro { color: #555; font-size: 14px; margin: 0 0 16px; }

.bpa-kdp-results-box--step1 {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.bpa-kdp-results-box--step2 { margin-top: 24px; }

.bpa-kdp-bsr-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.bpa-kdp-bsr-price { font-size: 13px; font-weight: 400; }

.bpa-kdp-royalty-box {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #854d0e;
    margin-bottom: 12px;
}

.bpa-kdp-actions-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bpa-kdp-count-label { font-size: 13px; color: #555; }

.bpa-kdp-manual-box {
    margin-top: 16px;
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.bpa-kdp-manual-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.bpa-kdp-manual-hint { font-weight: 400; color: #6b7280; }

.bpa-kdp-manual-row { display: flex; gap: 8px; }

.bpa-kdp-submit-row { text-align: right; margin-top: 14px; }

.bpa-kdp-phrases-list { display: flex; flex-direction: column; gap: 10px; }

.bpa-kdp-phrase-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
}

.bpa-kdp-phrase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.bpa-kdp-phrase-num {
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.bpa-kdp-bar-row { display: flex; align-items: center; gap: 8px; }

.bpa-kdp-bar-bg {
    flex: 1;
    background: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.bpa-kdp-footer-row { margin-top: 16px; text-align: center; }

/* Badges tendance couleurs */
.bpa-bs-trend-stagne { color: #888; }

/* Cellule checkbox tableau */
.bpa-ks-th-cb { width: 32px; }
.bpa-td-center { text-align: center; }

/* KDP inputs phrase */
.bpa-kdp-manual-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.bpa-kdp-phrase-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    cursor: text;
}

.bpa-kdp-char-hint {
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}

.bpa-kdp-intro-sm { margin: 0 0 12px; }

.bpa-btn-nowrap { white-space: nowrap; }

.bpa-btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   WIDGET SOLDE (barre en haut des shortcodes)
   ============================================================ */

.bpa-balance-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bpa-balance-topup {
    font-size: 12px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #0073aa;
    border-radius: 12px;
    transition: all 0.15s;
}

.bpa-balance-topup:hover {
    background: #0073aa;
    color: #fff;
}
