﻿
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Plans modal spécifique */
.plans-modal {
    max-width: 1100px;
}

/* En-tête de modal */


/* Corps de modal */

/* Conteneur des plans */
.plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

/* Cartes de plans */
.plan-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    animation: planCardFadeIn 0.5s ease-out both;
}

    .plan-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .plan-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .plan-card:nth-child(3) {
        animation-delay: 0.3s;
    }

@keyframes planCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(29, 78, 216, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover {
    border-color: #3b82f6;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15), 0 8px 16px rgba(59, 130, 246, 0.1);
}

    .plan-card:hover::before {
        opacity: 1;
    }

.plan-card.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.2), 0 6px 12px rgba(59, 130, 246, 0.15);
}

    .plan-card.selected::before {
        opacity: 1;
    }

/* En-tête de plan */
.plan-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

    .plan-header h4 {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 12px;
        color: #1e293b;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* Prix du plan */
.plan-price {
    font-size: 40px;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

    .plan-price span {
        font-size: 16px;
        font-weight: 500;
        color: #64748b;
        text-shadow: none;
    }

/* Badge pour plans populaires */
.plan-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0 14px 0 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    z-index: 2;
}

/* Fonctionnalités du plan */
.plan-features {
    flex: 1;
    position: relative;
    z-index: 1;
}

    .plan-features ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .plan-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
        font-size: 15px;
        color: #374151;
        padding: 10px 0;
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
        transition: all 0.2s ease;
        font-weight: 500;
    }

        .plan-features li:last-child {
            border-bottom: none;
        }

        .plan-features li:hover {
            color: #1e293b;
            transform: translateX(4px);
            background: rgba(59, 130, 246, 0.02);
            border-radius: 6px;
            padding-left: 8px;
        }

        .plan-features li svg {
            color: #10b981;
            flex-shrink: 0;
            background: #ecfdf5;
            border-radius: 50%;
            padding: 2px;
            width: 20px;
            height: 20px;
        }

/* Overlay de sélection */


.plan-card.selected .check-overlay {
    opacity: 1;
    transform: scale(1);
}

.check-overlay svg {
    width: 22px;
    height: 22px;
}

/* Pied de modal */
 

/* Design responsive */
@media (max-width: 1024px) {
    .plans-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .plan-card {
        min-height: 400px;
        padding: 24px;
    }



    .plan-header h4 {
        font-size: 22px;
    }

    .plan-price {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
   
    .plans-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plan-card {
        min-height: auto;
        padding: 20px;
    }



    .plan-header h4 {
        font-size: 20px;
    }

    .plan-price {
        font-size: 28px;
    }

    .plan-features li {
        font-size: 14px;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
   

    .plan-card {
        padding: 16px;
    }

    


    .plan-header h4 {
        font-size: 18px;
    }

    .plan-price {
        font-size: 24px;
    }

    .plan-badge {
        padding: 6px 16px;
        font-size: 10px;
    }

    .check-overlay {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }

        .check-overlay svg {
            width: 18px;
            height: 18px;
        }


}

/* États de focus pour l'accessibilité */
.plan-card:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}




/* Support pour réduction des animations */
@media (prefers-reduced-motion: reduce) {
    .plan-card,
    .check-overlay,
    .plan-features li
    {
        animation: none;
        transition: none;
    }


}

/* Mode haute contraste */
@media (prefers-contrast: high) {



    .plan-card {
        border: 2px solid #000;
        background: #fff !important;
    }

        .plan-card.selected {
            background: #000 !important;
            color: #fff !important;
        }

            .plan-card.selected h4,
            .plan-card.selected .plan-price,
            .plan-card.selected .plan-features li {
                color: #fff !important;
            }




}
