/* ──────────────────────────────────────────────────────────────
   Translate PO Billing — Dashboard Client
   Thiasos Group brand — Burgundy + Black, angular
   Typo : Sora (titres) + Inter (corps / boutons)
   ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap');

/* === Layout === */

.tpo-dashboard {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.6;
}

.tpo-dashboard h1,
.tpo-dashboard h2,
.tpo-dashboard h3,
.tpo-dashboard h4,
.tpo-dashboard h5,
.tpo-dashboard h6,
.tpo-dash-stat-value,
.tpo-auth-container h2 {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === Titre === */

.tpo-dash-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
}

/* === Onglets === */

.tpo-dash-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 24px;
}

.tpo-dash-tabs {
    display: flex;
    gap: 0;
}

.tpo-dash-btn-logout {
    color: #999;
    background: none;
    border: 1px solid #ddd;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tpo-dash-btn-logout:hover {
    color: #dc2626;
    border-color: #dc2626;
}

.tpo-dash-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: #999;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}

.tpo-dash-tab:hover {
    color: #444;
    border-bottom-color: #ccc;
}

.tpo-dash-tab-active {
    color: #792142;
    border-bottom-color: #792142;
}

/* === Notices === */

.tpo-dash-notice {
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.tpo-dash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.tpo-dash-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.tpo-dash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* === En-tête Home === */

.tpo-dash-header {
    margin-bottom: 24px;
}

.tpo-dash-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.tpo-dash-plan-badge {
    font-size: 14px;
    color: #777;
}

.tpo-badge {
    font-size: 10px;
    vertical-align: middle;
    margin-right: 4px;
}

.tpo-badge-active { color: #2e7d32; }
.tpo-badge-cancelled { color: #c62828; }
.tpo-badge-none { color: #999; }

/* === Cartes de stats === */

.tpo-dash-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.tpo-dash-stat-card {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 20px;
}

.tpo-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 12px;
}

.tpo-stat-bar-container {
    height: 6px;
    background: #e5e5e5;
    overflow: hidden;
    margin-bottom: 8px;
}

.tpo-stat-bar {
    height: 100%;
    transition: width 0.5s ease;
}

.tpo-bar-green { background: #2e7d32; }
.tpo-bar-orange { background: #e65100; }
.tpo-bar-red { background: #c62828; }

.tpo-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.tpo-stat-big {
    font-size: 32px;
    font-weight: 800;
    color: #792142;
}

.tpo-stat-sub {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* === Sections === */

.tpo-dash-section {
    margin-bottom: 32px;
}

.tpo-dash-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* === Tableaux === */

.tpo-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tpo-dash-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 700;
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid #e5e5e5;
}

.tpo-dash-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.tpo-dash-table tbody tr:hover {
    background: #f9f9f9;
}

.tpo-cell-filename {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
}

/* === Statuts === */

.tpo-status {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-status-completed, .tpo-status-paid { background: #ecfdf5; color: #065f46; }
.tpo-status-error { background: #fef2f2; color: #991b1b; }
.tpo-status-partial, .tpo-status-open { background: #fffbeb; color: #92400e; }
.tpo-status-void { background: #f4f4f4; color: #999; }

/* === Liens === */

.tpo-dash-link {
    color: #792142;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.tpo-dash-link:hover {
    text-decoration: underline;
}

/* === Boutons === */

.tpo-dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tpo-dash-btn-primary {
    background: #792142;
    color: #fff;
}

.tpo-dash-btn-primary:hover {
    background: #5c1832;
    color: #fff;
}

a.tpo-dash-btn-primary,
a.tpo-dash-btn-primary:hover,
a.tpo-dash-btn-primary:visited {
    color: #fff;
}

.tpo-dash-btn-outline {
    background: transparent;
    color: #792142;
    border: 1px solid #d4a0b3;
}

.tpo-dash-btn-outline:hover {
    background: #fdf2f6;
}

.tpo-dash-btn-danger {
    background: transparent;
    color: #c62828;
    border: 1px solid #fecaca;
}

.tpo-dash-btn-danger:hover {
    background: #fef2f2;
}

.tpo-dash-btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.tpo-dash-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Plan Cards === */

.tpo-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tpo-plan-card-amount-custom {
    font-size: 24px;
    font-weight: 700;
}

.tpo-plan-card-custom {
    background: #faf8f9;
    border-color: #1a1a1a;
}

.tpo-plan-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    padding: 28px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.tpo-plan-card:hover {
    border-color: #792142;
}

.tpo-plan-card-header h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-plan-card-price {
    margin-bottom: 20px;
}

.tpo-plan-card-amount {
    font-size: 36px;
    font-weight: 800;
    color: #792142;
}

.tpo-plan-card-period {
    font-size: 16px;
    color: #999;
}

.tpo-plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.tpo-plan-card-features li {
    padding: 6px 0;
    color: #444;
    font-size: 14px;
}

.tpo-plan-card-annual {
    margin-top: 12px;
    font-size: 13px;
    color: #777;
}

.tpo-checkout-btn-link {
    background: none;
    border: none;
    color: #792142;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
}

/* === Plan actuel === */

.tpo-plan-current {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 20px;
}

.tpo-plan-current-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tpo-plan-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.tpo-plan-price {
    font-size: 16px;
    color: #792142;
    font-weight: 600;
}

.tpo-plan-renewal {
    font-size: 14px;
    color: #777;
}

.tpo-plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* === Bonus packs === */

.tpo-bonus-grid {
    display: flex;
    gap: 16px;
}

.tpo-bonus-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 16px 20px;
    flex: 1;
}

.tpo-bonus-label {
    font-weight: 600;
    color: #444;
}

.tpo-bonus-price {
    font-weight: 700;
    color: #792142;
    margin-left: 12px;
}

/* === Filtres === */

.tpo-dash-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.tpo-dash-select {
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    font-size: 14px;
    color: #444;
    background: #fff;
}

/* === Pagination === */

.tpo-dash-pagination {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    justify-content: center;
}

.tpo-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    text-decoration: none;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.tpo-page-link:hover {
    background: #f4f4f4;
    color: #444;
}

.tpo-page-active {
    background: #792142;
    color: #fff;
}

.tpo-page-active:hover {
    background: #5c1832;
    color: #fff;
}

/* === Divers === */

.tpo-dash-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

.tpo-dash-total {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #999;
}

.tpo-dash-text {
    color: #777;
    margin-bottom: 12px;
}

/* === Modale de confirmation === */

.tpo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tpo-modal {
    background: #fff;
    padding: 32px;
    max-width: 440px;
    width: 90%;
    border: 1px solid #e5e5e5;
}

.tpo-modal h4 {
    font-size: 18px;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-modal p {
    color: #777;
    margin-bottom: 20px;
}

.tpo-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* === Spinner === */

.tpo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e5e5;
    border-top-color: #792142;
    border-radius: 50%;
    animation: tpo-spin 0.6s linear infinite;
}

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

/* === Responsive === */

@media (max-width: 640px) {
    .tpo-dash-stats {
        grid-template-columns: 1fr;
    }

    .tpo-plan-grid {
        grid-template-columns: 1fr;
    }

    .tpo-bonus-grid {
        flex-direction: column;
    }

    .tpo-dash-tabs {
        overflow-x: auto;
    }

    .tpo-plan-actions {
        flex-direction: column;
    }

    .tpo-dash-filters {
        flex-wrap: wrap;
    }
}

/* ──────────────────────────────────────────────────────────────
   Pricing Page ([tpo_pricing])
   ────────────────────────────────────────────────────────────── */

.tpo-pricing-page {
    max-width: 960px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
}

.tpo-pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.tpo-pricing-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-pricing-header p {
    font-size: 16px;
    color: #777;
    margin: 0;
}

/* Toggle mensuel/annuel */

.tpo-pricing-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    background: #f4f4f4;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tpo-toggle-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #777;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-toggle-active {
    background: #fff;
    color: #1a1a1a;
}

.tpo-toggle-badge {
    display: inline-block;
    background: #ecfdf5;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    margin-left: 4px;
}

/* Featured card */

.tpo-plan-card-featured {
    border-color: #792142;
    position: relative;
}

.tpo-plan-card-ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #792142;
    color: #fff;
    padding: 4px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tpo-plan-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-plan-card-billed {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

/* CTA */

.tpo-pricing-cta {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
}

/* Bonus section */

.tpo-pricing-bonus {
    margin-top: 48px;
    text-align: center;
}

.tpo-pricing-bonus h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-pricing-bonus p {
    color: #777;
    margin: 0 0 20px 0;
}

/* 3-column grid for plans */

.tpo-plan-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tpo-plan-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tpo-plan-card-active {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.tpo-dash-section-danger {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #fecaca;
}

/* Enterprise card */

.tpo-plan-card-enterprise {
    background: #faf8f9;
    border-color: #1a1a1a;
}

/* Outline button */

.tpo-dash-btn-outline {
    background: transparent;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.tpo-dash-btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

/* Pricing page headings — Sora */

.tpo-pricing-page h2,
.tpo-pricing-page h3,
.tpo-pricing-page h4 {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Comment ça marche ─────────────────────────────────────── */

.tpo-pricing-how {
    margin-top: 56px;
    text-align: center;
}

.tpo-pricing-how h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tpo-how-step {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 28px 20px;
    text-align: center;
}

.tpo-how-number {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #792142;
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.tpo-how-step h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.tpo-how-step p {
    font-size: 14px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

/* ── Formats supportés ─────────────────────────────────────── */

.tpo-pricing-formats {
    margin-top: 56px;
    text-align: center;
}

.tpo-pricing-formats h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tpo-formats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tpo-format-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 24px 20px;
    text-align: center;
}

.tpo-format-ext {
    font-family: 'Sora', 'SF Mono', Monaco, Consolas, monospace;
    font-size: 24px;
    font-weight: 700;
    color: #792142;
    margin-bottom: 8px;
}

.tpo-format-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.tpo-format-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
}

/* Mobile responsive for new sections */

@media (max-width: 768px) {
    .tpo-plan-grid-3,
    .tpo-plan-grid-4 {
        grid-template-columns: 1fr;
    }

    .tpo-how-grid,
    .tpo-formats-grid {
        grid-template-columns: 1fr;
    }
}
