/**
 * CSS partagé pour les cartes de plans d'abonnement
 * Utilisé par: /saas/, /saas/subscription/, /saas/become-provider/
 */

/* Grille des plans - Centrage automatique */
#plans-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

#plans-grid > div {
    flex: 1 1 auto;
    min-width: 300px;
    max-width: 100%;
}

@media (min-width: 768px) {
    #plans-grid > div {
        flex: 1 1 calc(50% - 0.75rem);
        max-width: calc(50% - 0.75rem);
    }
}

@media (min-width: 1200px) {
    #plans-grid > div {
        flex: 1 1 calc(33.333% - 1rem);
        max-width: calc(33.333% - 1rem);
    }
}

/* Plan Card Ultra-Moderne */
.plan-card {
    background: white;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 80px 80px 0;
    border-color: transparent transparent transparent transparent;
    z-index: 1;
}

.plan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 80px 80px 0 0;
    border-color: transparent transparent transparent transparent;
    z-index: 1;
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
    border-width: 2px;
}

.plan-card.featured {
    border: 3px solid #667eea;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
}

.plan-card.featured:hover {
    border-color: #5568d3;
    border-width: 3px;
}

.plan-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

/* Badge Populaire */
.popular-badge {
    position: absolute;
    top: 8px;
    right: -32px;
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 100%);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255,107,107,0.5);
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Badge Promotion - Plus gros et rouge vif */
.promotion-badge {
    position: absolute;
    top: 8px;
    left: -32px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fbbf24;
    padding: 5px 40px;
    transform: rotate(-45deg);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
    z-index: 11;
    border: 2px solid #fbbf24;
}

.promotion-badge i {
    font-size: 1rem;
    margin-right: 4px;
    animation: pulse-promo 2s infinite;
}

@keyframes pulse-promo {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Header du plan */
.plan-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 1.25rem 1rem;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.plan-header h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.plan-header .description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Types de commerce - Badges */
.commerce-types {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.commerce-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.commerce-badge i {
    font-size: 1rem;
}

.commerce-badge.disabled {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Prix Section */
.pricing-section {
    background: #f8f9fa;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.price-display {
    text-align: center;
}

.price-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}

/* Style spécial pour les plans gratuits */
.price-main.free-plan {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1.5rem;
    opacity: 0.6;
}

.price-period {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.promo-duration-note {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #b91c1c;
    font-weight: 700;
    text-transform: none;
}

.promo-duration-note small {
    color: inherit;
    font-weight: inherit;
}

.promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.4rem;
}

.trial-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.trial-badge i {
    margin-right: 0.25rem;
}

/* Section Engagement */
.engagement-section {
    background: #fff9e6;
    padding: 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.engagement-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
}

.engagement-badge.required {
    background: linear-gradient(135deg, #ffb3ba 0%, #ff8a8a 100%);
    color: #8b0000;
    box-shadow: 0 2px 12px rgba(255, 138, 138, 0.4);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.engagement-badge i {
    font-size: 1.2rem;
}

/* Animation heartbeat pour engagement obligatoire */
@keyframes heartbeat {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 12px rgba(255, 138, 138, 0.4);
    }
    14% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(255, 138, 138, 0.6);
    }
    28% {
        transform: scale(1);
        box-shadow: 0 2px 12px rgba(255, 138, 138, 0.4);
    }
    42% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(255, 138, 138, 0.6);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 2px 12px rgba(255, 138, 138, 0.4);
    }
}

.commitment-options {
    margin-top: 0.5rem;
}

.commitment-options .section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.commitment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.commitment-option {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.commitment-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.commitment-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.commitment-duration {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
}

.commitment-discount {
    display: inline-block;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.commitment-pricing {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.commitment-pricing .old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1.2rem;
    opacity: 0.7;
}

.commitment-pricing .new-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #667eea;
}

.commitment-pricing .savings {
    color: #11998e;
    font-weight: 600;
    font-size: 0.95rem;
    background: #e6fff9;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
}

/* Format compact pour les options d'engagement */
.commitment-pricing.compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.commitment-option-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
}

.commitment-option-compact .commitment-duration {
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
}

.commitment-option-compact .commitment-duration i {
    font-size: 0.9rem;
    margin-right: 0.2rem;
}

.commitment-option-compact .discount-badge {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.commitment-option-compact .old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.8rem;
    opacity: 0.7;
}

.commitment-option-compact .new-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
}

.commitment-option-compact .savings {
    color: #11998e;
    font-weight: 600;
    font-size: 0.75rem;
    background: #e6fff9;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    white-space: nowrap;
}

/* Features Premium */
.premium-features {
    padding: 0.85rem 1.25rem;
    background: white;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.feature-item i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.feature-item.enabled {
    color: #28a745;
    font-weight: 700;
}

.feature-item.enabled i {
    color: #28a745;
}

.feature-item.disabled {
    color: #dc3545;
    text-decoration: line-through;
}

.feature-item.disabled i {
    color: #dc3545;
}

/* Section Condensée avec Accordéon */
.condensed-section {
    border-top: 1px solid #e9ecef;
}

/* Section Simple (sans accordéon) */
.simple-section {
    border-top: 1px solid #e9ecef;
    padding: 0.85rem 1.25rem;
}

.section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.3;
}

.section-title i {
    font-size: 1.1rem;
    color: #667eea;
}

.section-content-plain {
    font-size: 0.85rem;
    line-height: 1.4;
}

.section-header {
    padding: 0.65rem 1.25rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.section-header:hover {
    background: #e9ecef;
}

.section-header i {
    transition: transform 0.3s;
    font-size: 1.1rem;
}

.section-header.collapsed i {
    transform: rotate(-90deg);
}

.section-content {
    padding: 0.85rem 1.25rem;
    font-size: 0.85rem;
    line-height: 1.4;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.section-content.show {
    max-height: 1000px;
}

/* Grid de limites */
.limits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.limit-item {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.limit-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.limit-value {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.limit-value.unlimited {
    color: #00d4aa;
}

/* Commission Badge */
.commission-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.65rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
}

/* Add-ons, Frais et Commissions */
.addon-item, .fee-item, .commission-item {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.addon-name, .fee-name, .commission-name {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
}

.addon-price, .fee-amount, .commission-value {
    color: #667eea;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Bouton CTA */
.plan-cta {
    margin-top: auto;
    padding: 1.25rem 1.25rem 1.5rem;
    border-top: 1px solid #e9ecef;
}

.btn-plan-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
}

.btn-plan-select.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-plan-select.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .limits-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-header h3 {
        font-size: 1.5rem;
    }
    
    .price-main {
        font-size: 2rem;
    }
}
