/*
* LAYOUT
*/

body{
    background-color: #DDDDDD;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    max-width: 1066px;
    margin: 0 auto;
}

header{
    margin: 0 auto;
    text-align: center;
    padding: 15px 0;

    background-image: linear-gradient(to bottom,#f0f0f0,
    #f0f0f0 95%,
    #e2e2e2);
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

main{
    margin: 5px 0;
    display: flex;
    flex-flow: row nowrap;
    justify-content: stretch;
    align-items: stretch;
}

section {
    max-width: 856px;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-items: stretch;
}

article {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: center;
    width: calc(856px / 2 - 22px);
    margin: 5px;
    padding: 10px 5px;

    /* background-color: #f0f0f0; */
    background-image: linear-gradient(to bottom, #ffffffff,
    #f0f0f0 5%,
    #f0f0f0 95%,
    #e2e2e2);
    border: 1px solid black;
    border-radius: 10px;
}


nav#menu{
    flex-shrink: 0;
    width: 173px;
    margin: 5px 10px 5px 5px;
    padding: 10% 10px;

    background-image: linear-gradient(to bottom, #ffffffff,
    #f0f0f0 5%,
    #f0f0f0 95%,
    #e2e2e2);
    border: 1px solid black;
    border-radius: 10px;
}

footer{
    padding: 15px 0;
    text-align: center;
    margin-bottom: 2px;

    background-image: linear-gradient(to bottom, #ffffffff,
    #f0f0f0 5%,
    #f0f0f0 95%,
    #e2e2e2);
    border: 1px solid black;
    border-radius: 10px;
}

/*
* ELEMENTS
*/

section.hide {
    display: none;
}

a, a:hover, a:visited {
    background-color: #FAFAFA;
    margin: 5px 5px 5px;
    display: inline-block;
    text-decoration: none;
    color: inherit;
    padding: 5px 15px;
    border: 1px solid #555555;
    border-radius: 10px;
}

a:hover {
    background-color: #EEEEEE;
    box-shadow: inset 0 0 5px 1px rgba(0, 0, 0, 0.199);
}

nav ul {
    list-style: none;
    margin: 0 auto;
    padding: 0 0;
}

nav ul li{
    cursor: pointer;
    color: #EEEEEE;
    text-transform: uppercase;
    margin: 1.5rem 0;
    text-align: center;
    padding: 10px 5px;
    background-image: linear-gradient(to right, 
    rgba(50, 50, 50, 0), 
    rgba(50, 50, 50, 0.7) 10%,
    rgba(50, 50, 50, 0.9) 13%,
    rgba(50, 50, 50, 1) 20%, 
    rgba(50, 50, 50, 1) 80%, 
    rgba(50, 50, 50, 0.9) 87%,
    rgba(50, 50, 50, 0.7) 90%,
    rgba(50, 50, 50, 0));

    border-top: 1px solid #e6f2fa;
    border-bottom: 1px solid #e6f2fa;

    box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.726);
}

nav ul li:hover{
    background-image: linear-gradient(to right, 
    rgba(100, 100, 100, 0), 
    rgba(100, 100, 100, 0.7) 10%,
    rgba(100, 100, 100, 0.9) 13%,
    rgba(100, 100, 100, 1) 20%, 
    rgba(100, 100, 100, 1) 80%, 
    rgba(100, 100, 100, 0.9) 87%,
    rgba(100, 100, 100, 0.7) 90%,
    rgba(100, 100, 100, 0));

    box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.7);
}

article img{
    margin: 10px;
    border: 1px solid rgba(0, 0, 0, 0.699);
}

.pa5 {
    padding: 5px;
}

/*
* Ajustement tablets, phones et petits écrans (640 - 1066)
*/

@media (min-width: 640px) and (max-width: 1065.98px) {
    /* Le menu reste à gauche, les articles passe en 1 colonne qui occupe le reste */
    article {
        flex-grow: 2;
        width: auto;
    }
}

/*
* Très petits formats (<640), juste pour rester propre
*/

@media (max-width: 639.98px) {
    /* Le menu passe en haut et d'un format colonne à un format ligne, 
       les articles sont en 1 colonne en-dessous */ 
    main{
        flex-flow: column nowrap;
    }

    nav#menu{
        flex-shrink: 1;
        width: auto;
        padding: 2px 5px;

        display: flex;
        flex-flow: row wrap;
    }

    nav#menu p{
        width: 33%;
        margin: 2px auto;
        text-align: center;
    }

    nav ul{
        display: flex;
        flex-flow: row nowrap;
        align-items: center;
        justify-content: space-between;

        width: 100%;
    }

    nav ul li{
        width: 28%;
        margin: 10px auto 5px;
    }

    article {
        flex-grow: 2;
        width: auto;
    }
}