html:has(body.pricing-page) {
    background: white;
}

body.pricing-page {
    min-height: 100vh;
    background: rgba(248, 250, 252, 0.6);
    position: relative;
}

body.pricing-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(203, 213, 225, 0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 213, 225, 0.45) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotate(-12deg);
    pointer-events: none;
    z-index: -1;
}

.pricing-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.app-container .pricing-container {
}

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

.pricing-header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    position: relative;
    padding-top:32px
}

.back-arrow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.back-arrow svg {
    width: 20px;
    height: 20px;
}

.back-arrow:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-2px);
}

.back-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--text-main);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast),
        visibility var(--transition-fast);
    pointer-events: none;
}

.back-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--text-main);
}

.back-arrow:hover .back-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.pricing-logo-placeholder {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.pricing-logo-placeholder svg {
    width: 28px;
    height: 28px;
    color: white;
}

.pricing-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.pricing-header .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    position: relative;
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

.pricing-card.featured:hover {
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured::before {
    content: "Le plus populaire";
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pricing-card.featured.user-subscribed::before {
    display: none;
}

.pricing-card.featured.user-subscribed {
    border-color: var(--accent-green);
}

.plan-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.plan-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-main);
}

.current-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.current-plan-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
}

.plan-price-container {
    margin-bottom: 16px;
}

.plan-price {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.02em;
}

.plan-price .currency {
    font-size: 1.75rem;
    font-weight: 600;
    vertical-align: top;
    margin-right: 2px;
    color: var(--text-secondary);
}

.plan-price .period {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 2px;
}

.plan-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 28px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9375rem;
    color: var(--text-main);
    line-height: 1.4;
}

.plan-features li:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.plan-features li::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23059669'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.pricing-card.featured .plan-features li::before {
    background: linear-gradient(135deg, var(--primary-light) 0%, #bfdbfe 100%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231e3a8a'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.plan-button {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.plan-button.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
}

.plan-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.35);
}

.plan-button.primary:active {
    transform: translateY(0);
}

.plan-button.secondary {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.plan-button.secondary:hover {
    background: var(--border-color);
    color: var(--text-main);
}

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

.usage-stats {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 40px;
}

.usage-stats h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.usage-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.usage-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.usage-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-main);
}

.usage-value.warning {
    color: var(--accent-gold);
}

.usage-value.danger {
    color: var(--accent-red);
}

.why-section {
    max-width: 720px;
    margin: 0 auto;
    padding-top: 20px;
}

.why-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.why-block {
    margin-bottom: 40px;
}

.why-block:last-child {
    margin-bottom: 0;
}

.why-block h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    text-align: justify;
}

.why-block p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: justify;
}

.why-block p a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.why-block p a:hover {
    color: var(--primary-hover);
}

@media (max-width: 768px) {
    .pricing-container {
        padding: 40px 20px 60px;
    }

    .pricing-header h1 {
        font-size: 2rem;
    }

    .pricing-header .subtitle {
        font-size: 1rem;
    }

    .pricing-card {
        padding: 28px 24px;
    }

    .plan-price {
        font-size: 2.75rem;
    }

    .plan-price .currency {
        font-size: 1.75rem;
    }

    .why-section-title {
        font-size: 1.5rem;
        margin-bottom: 36px;
    }

    .why-block {
        margin-bottom: 32px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-header {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-cards {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.why-section {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.plan-guarantee {
    text-align: center;
    font-size: 0.8rem;
    color: #16a34a;
    margin-top: 0.75rem;
}
