/* LearnPlus - Styles personnalisés */

/* Variables */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --accent-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
}

/* Général */
body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f8f9fa;
    padding-bottom: 60px;
}

a {
    transition: all 0.3s ease;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
}

/* Formations */
.formation-card {
    height: 100%;
}

.formation-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.formation-price {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.formation-level {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Tableaux de bord */
.dashboard-stat {
    padding: 20px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-stat.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.dashboard-stat.success {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.dashboard-stat.warning {
    background: linear-gradient(135deg, var(--accent-color), #e67e22);
}

.dashboard-stat.danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
}

.dashboard-stat .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

.dashboard-stat .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Leçons */
.lesson-content {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.module-list .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.module-list .list-group-item:hover {
    border-left-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.module-list .list-group-item.active {
    border-left-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

/* Quiz */
.quiz-timer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--dark-color);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.quiz-timer .timer-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.quiz-timer.warning {
    background-color: var(--danger-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Certificats */
.certificate {
    background-color: #fff;
    border: 15px solid var(--primary-dark);
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.certificate:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--accent-color);
    margin: 10px;
    pointer-events: none;
}

.certificate-title {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.recipient-name {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

/* Avis */
.rating {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    font-size: 1.5em;
    justify-content: space-around;
    padding: 0 .2em;
    text-align: center;
    width: 5em;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #ccc;
    cursor: pointer;
    margin: 0 5px;
}

.star-rating :checked ~ label {
    color: #f90;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #fc0;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .dashboard-stat .stat-value {
        font-size: 2rem;
    }
    
    .certificate {
        padding: 20px;
    }
    
    .certificate-title {
        font-size: 1.8rem;
    }
    
    .recipient-name {
        font-size: 1.5rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

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