.container-lessons{
    width: 100%;
    /*max-width: 1200px;*/
    margin: 0 auto;
    padding: 2em;
    background: rgba(255, 255, 255, 0.95);
    background-color: transparent;
    /* box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); */
}

.card-lesson h2{
    color: #2c3e50;
    margin-bottom: 1em;
    text-align: center;
    font-weight: 600;
    font-size: 1.4em;
}

.cards-lessons{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    flex-wrap: wrap;
    justify-content: center;
}

.card-lesson{
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 2em 1.5em;
    border-radius: 16px;
    flex: 1 1 calc(33% - 2em);
    min-width: 300px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 300px; /* Hauteur fixe pour uniformiser */
}

.card-lesson::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.card-lesson:hover{
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    background: linear-gradient(145deg, #eed9c1, #f8f9fa);
}

.card-lesson:nth-child(2)::before {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.card-lesson:nth-child(3)::before {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}
.card-lesson:nth-child(4)::before {
    background: linear-gradient(90deg, #e2f107, #dd4aeb);
}

.card-lesson p{
    margin-bottom: 1.5em;
    color: #555;
    font-size: 1.1em;
    line-height: 1.6;
    flex-grow: 1; /* Permet au paragraphe de prendre l'espace disponible */
}

.btn {
    display: block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%; /* Largeur 100% */
    margin-top: auto; /* Pousse le bouton vers le bas */
}

.card-lesson:nth-child(2) .btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.card-lesson:nth-child(3) .btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}
.card-lesson:nth-child(4) .btn {
    background: linear-gradient(90deg, #e2f107, #dd4aeb);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

footer{
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    text-align: center;
    padding: 1.5em 0;
    position: relative;
    width: 100%;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    header{
    padding: 0;
   }
.nav{
    padding: 10px 20px;
}
.logo p{
    display: none;
}
.nav h1{
    font-size: 1.6em;
}
main{
    padding: 1em 0em;
}
    /* .cards-lessons {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }
    
    /* .card-lesson {
        flex: 1 1 100%;
        max-width: 400px;
        height: auto;  Hauteur automatique sur mobile 
        min-height: 300px;
    } */
     
    h1 {
        font-size: 2em;
    }
    
    .container-lessons {
        padding: 0.5em;
        width: 95%;

    }
}

/* Animation d'entrÃ©e */

.card-lesson {
    animation: fadeInUp 0.6s ease forwards;
}


.card-lesson:nth-child(2) {
    animation-delay: 0.1s;
}

.card-lesson:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}