/* Global */
:root {
    --main-color: #2a2230;
    --main-color-muted: #6A6270;
    --secondary-color: #67487A;
    --link-color: #52266B;
    --contrast-color: #FBFBD0;
    --contrast-color-muted: #CCCCA9;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}
html {
    font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, sans-serif;
    font-size: 16px;
    line-height: 26px;
}
body {
    color: var(--main-color);
    background-color: var(--contrast-color);
}

@media(min-width: 40rem) {
    html {
        font-size: 18px;
        line-height: 30px;
    }
}

/* Links */
a {
    color: var(--link-color);
}

/* Typography */
h1, h2, h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;

    word-wrap: break-word;
}

h1 {
    margin-bottom: 1.75rem;
}

h1 { font-size: 2rem; line-height: 2.5rem; }
h2 { font-size: 1.4rem; line-height: 2rem; }
h3 { font-size: 1rem; line-height: 1.5rem; }

* + h1,
* + h2,
* + h3 {
    margin-top: 1.5rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}
p:last-child {
    margin-bottom: 0;
}

ul, ol, dl {
    margin-top: 0;
    margin-bottom: 1rem;
}
ul:last-child,
ol:last-child,
dl:last-child {
    margin-bottom: 0;
}
p + ul,
p + ol,
p + dl,
p + table {
    margin-top: -.5rem;
}

/* Images */
img {
    height: auto;
    max-width: 100%;
}
a img {
    border: none;
}

/* Header */
#header {
    max-width: 1200px;
    margin: 2rem auto 3rem;
}

#header .header-top {
    display: flex;
    margin-left: -125px;

    align-items: center;
    justify-content: center;
}

#header .header-logo {
    max-width: 125px;
}

@media (max-width: 800px) {
    #header .header-top {
        margin-left: 0;
    }
    #header .header-logo {
        max-width: 100px;
        margin-bottom: 1rem;
    }
}

@media(max-width: 500px) {
    #header .header-top {
        flex-direction: column;
    }
}

#header .header-title-container {
    text-align: center;
}

#header .header-title {
    margin-bottom: 1rem;
    padding-left: 2rem;
    padding-right: 2rem;

    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: bold;
}
#header .header-title a {
    color: var(--main-color);
    text-decoration: none;
}

#header .header-subtitle {
    padding-left: 2rem;
    padding-right: 2rem;

    color: var(--main-color-muted);
}

#header .header-navigation {
    max-width: 1200px;
    margin: 2rem auto;

    background: var(--secondary-color);
    border-radius: 20px/30px;
    box-shadow: 0 1px 3px var(--main-color);
}

@media (max-width: 1200px) {
    #header .header-navigation {
        border-radius: 0;
    }
}

#header .header-navigation ul {
    display: flex;
    padding-left: 2rem;
    padding-right: 2rem;

    justify-content: space-around;

    list-style: none;
}
#header .header-navigation ul li {
    min-width: 3rem;

    flex-grow: 1;
}
#header .header-navigation ul li + li {
    margin-left: 1rem;
}
#header .header-navigation ul li a {
    display: block;
    padding: .25rem 1rem;

    color: var(--contrast-color);
    text-decoration: none;
    text-align: center;

    border-radius: 1rem;

    transition: background-color .2s ease-out;
    overflow: hidden;
    text-overflow: ellipsis;
}
#header .header-navigation ul li:hover a,
#header .header-navigation ul li.current a {
    background-color: rgba(0, 0, 0, .3);
}
#header .header-navigation ul li.current a {
    font-weight: bold;
}

@media (max-width: 900px) {
    #header .header-navigation .h_home {
        display: none;
    }
}

@media (max-width: 800px) {
    #header .header-navigation .h_diapo {
        display: none;
    }

    #header .header-navigation ul {
        padding-left: .5rem;
        padding-right: .5rem;
    }
    #header .header-navigation ul li + li {
        margin-left: .5rem;
    }
}

@media (max-width: 400px) {
    #header .header-navigation ul {
        padding-bottom: .5rem;

        flex-direction: column;
    }

    #header .header-navigation ul li + li {
        margin-top: .5rem;
        margin-left: 0;
    }
}

/* Main column */
#main {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

#main .post img,
#main .post img {
    display: block;
    margin-left: auto;
    margin-right: auto;

    border-radius: .25rem;
}

#main .post .page-line {
    display: flex;
    margin-top: 2rem;
    margin-bottom: 2rem;

    border-radius: .25rem;
}

@media (max-width: 800px) {
    #main .post .page-line {
        flex-direction: column;
    }
}

#main .post .page-block {
    flex-grow: 1;
    flex-basis: 100%;

    border: 1px solid transparent;
    border-radius: .25rem;

    transition: border .2s ease-in-out;
}
#main .post .page-block + .page-block {
    margin-left: 3rem;
}

@media (max-width: 800px) {
    #main .post .page-block + .page-block {
        margin-top: 3rem;
        margin-left: 0;
    }
}

#main .post .page-block .container p,
#main .post .page-block .container ul,
#main .post .page-block .container ol,
#main .post .page-block .container h1,
#main .post .page-block .container h2,
#main .post .page-block .container h3 {
    max-width: 38rem;
}

#main .post iframe.osm-map {
    width: 100%;
    height: 350px;

    border: .25rem solid var(--secondary-color);
    border-radius: .25rem;
}

#main .post .page-block .fa-stack.fa-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

/* Footer */
#footer {
    margin-top: 5rem;
    padding-top: 3rem;
    padding-bottom: 3rem;

    color: var(--contrast-color);
    font-size: .9rem;

    background: var(--secondary-color);
    border-top: .25rem solid var(--main-color);
    border-bottom: 4rem solid var(--main-color);

    clear: both;
}
#footer a {
    color: var(--contrast-color);
}

#footer .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
#footer .container + .container {
    margin-top: 2rem;
}
#footer .container.container-row {
    display: flex;
    justify-content: space-between;
}

@media (max-width: 900px) {
    #footer .container.container-row {
        flex-direction: column;
        align-items: center;
    }
}

#footer .footer-item {
    width: 33%;
}
#footer .footer-item + .footer-item {
    margin-left: 2rem;
}
#footer .footer-item.logo {
    max-width: 200px;
    padding: 1rem;
}

@media (max-width: 900px) {
    #footer .footer-item {
        width: 300px;
    }

    #footer .footer-item + .footer-item {
        margin-top: 4rem;
        margin-left: 0;
    }
}

#footer .footer-item .footer-item-title {
    margin-bottom: 1rem;

    font-weight: bold;
    text-transform: uppercase;
}

#footer .footer-item.links ul {
    padding-left: 1rem;
}
#footer .footer-item.follow ul {
    padding-left: 0rem;

    list-style: none;
}
#footer .footer-item.news .date {
    font-size: .8rem;
}

#footer .container.bottom {
    padding-left: 0;

    text-align: center;
    list-style: none;
}
#footer .container.bottom li {
    display: inline-block;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Button up to the sky */
#up-to-the-sky {
    position: absolute;
    top: 0;
    right: 0;

    height: 100vh;
    width: 1px;
}

#up-to-the-sky button {
    position: fixed;
    bottom: 0;
    right: 0;

    height: 4rem;
    padding: 1em;

    opacity: 1;
    visibility: visible;

    transition: all .3s ease-in-out;

    color: var(--contrast-color);
    font-size: 1.2rem;
    font-family: inherit;

    background-color: var(--main-color);
    border: none;
}
#up-to-the-sky button:hover,
#up-to-the-sky button:focus {
    background-color: var(--secondary-color);
}
#up-to-the-sky.intersecting button {
    opacity: 0;
    visibility: hidden;
}

@media(min-width: 40rem) {
    #up-to-the-sky button {
        right: 0;
        left: auto;
    }
}

/* Gallery (index page) */
.galleries {
    display: flex;

    flex-wrap: wrap;
    justify-content: space-between;
}

.galleries .gallery {
    width: 30%;
    margin-bottom: 3rem;
    padding-bottom: 1rem;

    color: var(--contrast-color);

    background-color: var(--main-color);
    border-radius: .25rem;
}

@media (max-width: 900px) {
    .galleries {
        flex-direction: column;
    }

    .galleries .gallery {
        width: auto;
        max-width: 450px;
    }
}

.galleries .gallery img {
    border: .25rem solid transparent;
    border-radius: .25rem .25rem 0 0;

    transition: border-color .3s ease-out;
}
.galleries .gallery a:hover img {
    border-color: var(--secondary-color);
}

.galleries .gallery .gallery-top {
    display: flex;
    padding-left: 1rem;
    padding-right: 1rem;

    align-items: baseline;
}
.galleries .gallery h2 {
    margin-top: 1rem;

    flex-grow: 1;

    font-size: 1.2rem;
    line-height: 1.5rem;
}
.galleries .gallery h2 a {
    color: var(--contrast-color);
    text-decoration: none;
}
.galleries .gallery .nbPhotos {
    font-size: .9rem;
    color: var(--contrast-color-muted);
}
.galleries .gallery p {
    padding-left: 1rem;
    padding-right: 1rem;
}
