/**
 * CSS pour l'icône de contenu gratuit Tutor LMS
 * Signale le contenu gratuit aux utilisateurs
 */

/* Style pour les badges dans les titres de sections */
.tutor-free-section-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #00c853, #4caf50);
    color: white !important;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
    animation: pulse 2s infinite;
}

.tutor-free-section-badge .tutor-icon-badge-star {
    color: white !important;
    font-size: 14px;
    margin-right: 6px;
}

.tutor-free-section-badge .tutor-free-text {
    color: white !important;
    font-weight: 700;
}

/* Animation pulse pour attirer l'attention */
@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(0, 200, 83, 0.5);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
    }
}

/* Responsive pour les titres de sections */
@media (max-width: 768px) {
    .tutor-free-section-badge {
        font-size: 9px;
        padding: 3px 8px;
        margin-left: 8px;
    }
    
    .tutor-free-section-badge .tutor-icon-badge-star {
        font-size: 12px;
        margin-right: 4px;
    }
}

@media (max-width: 480px) {
    .tutor-free-section-badge {
        font-size: 8px;
        padding: 2px 6px;
        margin-left: 6px;
        border-radius: 15px;
    }
    
    .tutor-free-section-badge .tutor-icon-badge-star {
        font-size: 10px;
        margin-right: 3px;
    }
}

.tutor-free-content-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(0, 200, 83, 0.15));
    border: 1px solid #00c853;
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 4px rgba(0, 200, 83, 0.2);
    position: relative;
    overflow: hidden;
}

.tutor-free-content-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tutor-free-content-badge:hover::before {
    left: 100%;
}

.tutor-free-content-badge .tutor-icon-badge-star {
    font-size: 14px;
    color: #00c853 !important;
    margin-right: 4px;
    animation: bounce 2s infinite;
}

.tutor-free-content-badge span {
    color: #00c853 !important;
    font-weight: 700;
}

/* Animation de bounce pour l'icône */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Animation au survol */
.tutor-free-content-badge:hover {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.15), rgba(0, 200, 83, 0.25));
    transform: scale(1.05);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 200, 83, 0.3);
}

/* Style pour l'item de cours avec contenu gratuit */
.tutor-course-content-list-item:has(.tutor-free-content-badge) {
    background: linear-gradient(90deg, rgba(0, 200, 83, 0.03), transparent);
    border-left: 3px solid #00c853;
    padding-left: 8px;
    margin-left: -8px;
    border-radius: 4px;
}

/* Version alternative avec icône étoile */
.tutor-free-content-badge .tutor-icon-star {
    font-size: 14px;
    color: #ffd700 !important;
    margin-right: 4px;
}

/* Badge alternatif avec couleur dorée */
.tutor-free-content-badge.tutor-free-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.2));
    border: 1px solid #ffd700;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.2);
}

.tutor-free-content-badge.tutor-free-gold span {
    color: #ffd700 !important;
}

.tutor-free-content-badge.tutor-free-gold:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.3));
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

/* Style pour la liste/grille des cours */
.tutor-free-course-loop-badge {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tutor-free-course-loop-badge .tutor-free-content-badge {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.9), rgba(0, 200, 83, 1));
    color: white !important;
    border: none;
    box-shadow: 0 3px 6px rgba(0, 200, 83, 0.3);
    font-size: 11px;
    padding: 4px 12px;
}

.tutor-free-course-loop-badge .tutor-free-content-badge span {
    color: white !important;
}

.tutor-free-course-loop-badge .tutor-free-content-badge .tutor-icon-badge-star {
    color: white !important;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .tutor-free-content-badge {
        font-size: 9px;
        padding: 2px 8px;
        border-radius: 12px;
    }
    
    .tutor-free-content-badge .tutor-icon-badge-star,
    .tutor-free-content-badge .tutor-icon-star {
        font-size: 12px;
        margin-right: 3px;
    }
}

@media (max-width: 480px) {
    .tutor-free-content-badge {
        font-size: 8px;
        padding: 1px 6px;
    }
    
    .tutor-free-content-badge .tutor-icon-badge-star,
    .tutor-free-content-badge .tutor-icon-star {
        font-size: 10px;
        margin-right: 2px;
    }
}

/* Accessibilité */
.tutor-free-content-badge:focus {
    outline: 2px solid #00c853;
    outline-offset: 2px;
}

/* Animation d'apparition */
.tutor-free-content-badge {
    animation: fadeInUp 0.5s ease-out;
}

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