/* Styles pour la page des abonnements Stripe */

.current-subscription-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.current-subscription-card h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 20px;
}

.current-subscription-card .dashicons {
    color: #4ade80;
    margin-right: 8px;
}

.subscription-details {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.subscription-plan-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    flex-direction: column;
}

.subscription-plan-name {
    margin: 0;
    font-size: 22px;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.subscription-price-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-direction: column;
}

.price-main {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    white-space: nowrap;
}

.billing-cycle {
    font-size: 11px;
    opacity: 0.8;
    margin: 0;
    white-space: nowrap;
}

.subscription-features-compact {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 200px;
}

.subscription-features {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
}

.feature-item .dashicons {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.subscription-status {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 180px;
}

/* Statut principal - claire et visible */
.status-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
}

.status-primary .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.status-text {
    color: inherit;
}

/* Statut actif */
.status-active {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
}

.status-active .dashicons {
    color: white;
}

/* Statut se termine (annulé) */
.status-ending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-ending .dashicons {
    color: white;
}

/* Autres statuts problématiques */
.status-past_due,
.status-incomplete,
.status-unpaid {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-past_due .dashicons,
.status-incomplete .dashicons,
.status-unpaid .dashicons {
    color: white;
}

/* Période d'essai */
.status-trialing {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.status-trialing .dashicons {
    color: white;
}

/* Informations secondaires */
.status-secondary {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-left: 30px;
}

.subscription-actions {
    margin: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.subscription-actions .button {
    justify-content: center;
    text-align: center;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 160px;
    font-size: 13px;
    white-space: nowrap;
}

.subscription-plans {
    margin: 40px 0;
}

.subscription-plans h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
}

/* Bannière offre de lancement */
.launch-offer-banner {
    background: linear-gradient(135deg, var(--main-color, #cd2753), var(--secondary-color, #222e5a));
    border-radius: 8px;
    padding: 15px 20px;
    margin: 0 0 25px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(205, 39, 83, 0.2);
    color: var(--third-color, white);
    font-size: 16px;
    line-height: 1.5;
}

.launch-offer-banner strong {
    font-size: 20px;
    font-weight: 900;
    color: var(--third-color, white);
    padding: 0 5px;
    letter-spacing: 0.5px;
}

/* Responsive pour la bannière */
@media (max-width: 768px) {
    .launch-offer-banner {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .launch-offer-banner strong {
        font-size: 18px;
    }
}

/* Toggle de facturation - Version discrète */
.billing-toggle-container {
    margin: 15px 0 25px;
    padding: 0;
}

.billing-toggle-wrapper {
    text-align: center;
}

.billing-toggle {
    display: inline-flex;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #e9ecef;
}

.billing-toggle input[type="radio"] {
    display: none;
}

.billing-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.billing-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.billing-toggle input[type="radio"]:checked + .billing-option {
    background: #6c757d;
    color: white;
}

.billing-option-text {
    font-weight: 500;
    font-size: 14px;
    color: #495057;
}

.billing-toggle input[type="radio"]:checked + .billing-option .billing-option-text {
    color: white;
}

/* Badge économie dans le toggle */
.savings-badge-toggle {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.billing-toggle input[type="radio"]:checked + .billing-option .savings-badge-toggle {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Texte explicatif sous le toggle */
.billing-features-notice {
    text-align: center;
    margin: 20px auto;
    padding: 15px 25px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    max-width: 700px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* Animation pour le basculement des prix */
.price-option {
    transition: all 0.3s ease;
    opacity: 1;
}

.price-option.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Masquer les prix par défaut selon la sélection - géré par JavaScript */
.price-option[data-billing="monthly"] {
    display: flex; /* Par défaut, afficher les prix mensuels */
}

.price-option[data-billing="yearly"] {
    display: none; /* Par défaut, masquer les prix annuels */
}

/* Classes d'état pour JavaScript */
.billing-cycle-monthly .price-option[data-billing="monthly"] {
    display: block;
}

.billing-cycle-monthly .price-option[data-billing="yearly"] {
    display: none;
}

.billing-cycle-yearly .price-option[data-billing="monthly"] {
    display: none;
}

.billing-cycle-yearly .price-option[data-billing="yearly"] {
    display: block;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    gap: 20px;
    margin: 30px 0;
    justify-content: center;
}

/* Responsive pour la grille de produits */
@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
}

.plan-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 15px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.plan-card.current-plan {
    border-color: #4ade80;
    background: #f0fdf4;
}

.current-plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #4ade80;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.plan-header h3 {
    font-size: 20px;
    /* margin-top: 0; */
    margin-bottom: 4px;
    color: #1f2937;
    text-align: center;
    line-height: 1.3;
}

.plan-description {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

.plan-pricing {
    text-align: center;
    margin: 8px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.price-option {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.keywords-limit {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #f0f4ff;
    border-radius: 6px;
    display: inline-block;
    line-height: 1.4;
}

.price-amount {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    line-height: 1.2;
}

/* Comparaison de prix (prix normal vs prix réduit) */
.price-comparison {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.original-price {
    font-size: 18px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
    opacity: 0.8;
}

.discounted-price {
    font-size: 32px;
    font-weight: 900;
    color: var(--main-color, #cd2753);
    line-height: 1.2;
}

.price-billing {
    color: #6b7280;
    margin-bottom: 10px;
    font-size: 12px;
}

.subscribe-form,
.current-plan-indicator {
    margin-top: auto;
}

.subscribe-form .button {
    width: 100%;
    padding: 12px 8px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.plan-features h4 {
    margin-bottom: 15px;
    color: #1f2937;
}

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

.features-list li {
    display: flex;
    align-items: center;
    margin: 0 0 10px 0;
    color: #374151;
}

.features-list .dashicons {
    color: #4ade80;
    margin-right: 10px;
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.subscription-info-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
}

.subscription-info-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #1f2937;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-item {
    text-align: center;
}

.info-item .dashicons {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 15px;
}

.info-item h4 {
    margin-bottom: 10px;
    color: #1f2937;
}

.info-item p {
    color: #6b7280;
    line-height: 1.5;
}

.no-plans-message {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.current-plan-indicator {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #c3e6cb;
    display: flex;
    justify-content: center;
    align-items: center;
}

.current-plan-indicator .dashicons {
    margin-right: 5px;
    color: #28a745;
}

/* Responsive */
@media (max-width: 768px) {

    /* .current-subscription-card {
        text-align: center;
    } */

    .subscription-details {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: left;
        flex-direction: column;
    }

    .subscription-plan-info {
        align-items: center;
        flex-direction: row;
    }

    .subscription-price-compact {
        align-items: center;
        text-align: left;
        flex-direction: row;
    }

    .subscription-features-compact {
        flex-direction: column;
        gap: 10px;
    }

    .subscription-status {
        align-items: center;
        width: 100%;
        min-width: auto;
    }

    .subscription-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .subscription-actions .button {
        width: 100%;
        min-width: auto;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .status-primary {
        width: 100%;
    }

    .form-manage-subscription {
        width: 100%;
    }
}

/* ========================================
   PRODUITS PRIVILÉGIÉS (BETA_ONLY)
   ======================================== */

/* Carte produit privilégié - Fond discret beige/crème */
.plan-card-beta {
    background: linear-gradient(135deg, #fefbf3 0%, #fef8e7 100%);
    border: 2px solid #f3e8d3;
    position: relative;
}

/* Bordure animée subtile */
.plan-card-beta::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f5d99f, #e6c896, #f5d99f);
    background-size: 200% 200%;
    border-radius: 12px;
    z-index: -1;
    animation: subtleGradient 4s ease infinite;
    opacity: 0.5;
}

@keyframes subtleGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Badge étoile uniquement - discret */
.privilege-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    z-index: 10;
    width: 32px;
    height: 32px;
    overflow: hidden;
}

.privilege-badge .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    position: relative;
    z-index: 2;
}

/* Effet de brillance traversante */
.privilege-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 60%,
        transparent 100%
    );
    animation: shineEffect 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes shineEffect {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Animation au survol légère */
.plan-card-beta:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.15);
    border-color: #e6c896;
}

/* Prix pour les produits privilégiés (sans comparaison) */
.price-privilege {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.privilege-price {
    font-size: 36px;
    font-weight: 900;
    color: #92400e;
    line-height: 1.2;
}

/* Ajustement du titre pour les produits privilégiés */
.plan-card-beta .plan-name {
    color: #78350f;
    font-weight: 700;
}

/* Ajustement de la limite de mots-clés */
.plan-card-beta .keywords-limit {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Responsive pour les produits privilégiés */
@media (max-width: 768px) {
    .privilege-badge {
        width: 28px;
        height: 28px;
        padding: 6px;
    }
    
    .privilege-badge .dashicons {
        width: 16px;
        height: 16px;
        font-size: 16px;
    }
    
    .privilege-price {
        font-size: 28px;
    }
}
