

/* Exercice 3 */
body {
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: #0002;
    padding: 12p;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;

}

li a {
    color: #0009;
}

.cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 23px;
}


.card {
    word-break: break-all;
    border: #0002 solid 1px;
    margin-top: 33px;
    padding: 40px;
}

.card p {
    text-align: center;

}

.card a {
    text-decoration: none;
}

footer.ex-3 {
    position: absolute;
    bottom: 0;
    border: #000 solid 1px;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 30px;
    padding: 30px;

}

.links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.subscription {
    display: flex;
    flex-direction: column;
}

/* @media(max-width:577px){ */
.logo+.links ul {
    flex-direction: column;
}

/* } */


/* -------------------------------Exercice 4------------------- */


.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    padding: 30px;
}

.card-ex4 {
    border: 1px solid #1B1B1B;
    height: 300px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --------Q-2----- */
.page-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(10, 1fr);
    grid-template-areas:
        "header header header header"
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "sidebar main main main "
        "footer footer footer footer "
        "footer footer footer footer "
    ;
}

.page-layout * {
    border: #0000001b solid 1px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header {
    grid-area: header;
    background-color: #bdbbbb;
}

.sidebar {
    background-color: #eee;
    grid-area: sidebar;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main {
    background-color: #afe0ff;
    grid-area: main;
}

.footer {
    grid-area: footer;
    background-color: #ffe6e6;
}



/* -----------Exercice 5------------- */

@media(max-width:450px) {
    .page-layout {
        grid-template-areas:
            "header header header"
            "header header header"
            "sidebar sidebar sidebar  "
            "sidebar sidebar sidebar  "
            "sidebar sidebar sidebar  "
            "main main main "
            "main main main "
            "main main main "
            "main main main "
            "main main main "
            "main main main "
            "main main main "
            "main main main "
            "footer footer footer  "
            "footer footer footer  "
        ;
    }
}


/* Exercice 6 : Variables CSS et thèmes (20 min) */

:root {
    --primary-color: #18191B;
    --border-color: #18191b0d;
    --bg-section: #1D1E26;
    --text-color: #fff;
    --button-color: #000;
    --link-color: #99C3FF;
}

.light {
    --primary-color: #FFFFFF;
    --border-color: #0000001a;
    --bg-section: #F4F5F9;
    --text-color: #18191B;
    --button-color: #E2E8F0;
    --link-color: #0056D2;
}


.button {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.button button {
    padding: 20px 30px;
    border-radius: 4px;
    border: 1px solid #333;
    background-color: #fff;
    font-size: 15px;
    transition: ease-in-out all .3s;
    animation-name: anim;
    animation-duration: 3s;
    /* animation-iteration-count: infinite; */
    animation-direction: alternate;
}

.button button:hover {
    scale: 1.1;
}

.button button:active {
    scale: 1;
}

@keyframes anim {
    0% {
        transform: translateX(0%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    75% {
        opacity: 1;
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0%);
        opacity: 0.5s;
    }

}



/* ----------Exercice 8 ------- */

/* 
    1. #header a
    2. 200px
    3. justify-content: center ET align-items: center
    4.  1 fraction de l'espace disponible
    5. max-width dans les media queries et min-width dans les media queries

*/