/* Variables */

:root {
    --police-texte: "EBGaramond", serif;
    --police-titre: "Playfair Display", serif;
    --police-meta: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --vert: #487b00;
    --vert-hover: #63aa01;
    --couleur-texte: rgba(0, 0, 0, 0.7);
    --fond-sombre: #0d1a08;
    --texte-sombre: rgb(198, 211, 198);
}

/* Polices */

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Italic.woff2') format('woff2');
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: 'EBGaramond';
    src: url('../fonts/EBGaramond.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: 'EBGaramond';
    src: url('../fonts/EBGaramond-Italic.woff2') format('woff2');
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
}

/* Global */

html, body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
    color: var(--couleur-texte);
}

@media (prefers-color-scheme: dark){
    html, body {
        background-color: var(--fond-sombre);
        color: var(--texte-sombre);
    }
}

img {
    max-width: 100%;
    height: auto;
    width: auto;
}

a {
    text-decoration: none;
    color: var(--couleur-texte);
}

a:hover {
    color: var(--vert);
    text-decoration: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
}

sup {
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.5em;
}

@media (prefers-color-scheme: dark) {
    a {
        color: var(--texte-sombre);
    }

    a:hover {
        color: var(--vert-hover);
    }
}

/* Header */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color:var(--vert);
}

.logo {
    margin:1em;
    width: 2.5vw;
    min-width: 2em;
    fill:var(--vert);
    stroke:var(--vert);
}

.logo:hover {
    fill:var(--vert-hover);
    stroke:var(--vert-hover);
}

.header nav {
    font-family: var(--police-texte);
    font-weight: 700;
    font-size: 1.5em;
    margin:1em;
}

.header nav a {
    color:var(--vert);
}

.header nav a:hover {
    color:var(--vert-hover);
}

@media (prefers-color-scheme: dark) {
    .logo{
        fill:var(--texte-sombre);
        stroke:var(--texte-sombre);
    }

    .logo a:hover {
        fill:var(--vert);
        stroke:var(--ver);
    }
}

/* Footer */

.footer {
    font-family: var(--police-meta);
    font-size: 0.8em;
    text-align: center;
    padding: 1em;
}



/* Page d'accueil */

h1 {
    font-family: var(--police-titre);
    text-align: center;
    font-weight: 900;
    font-size: 2.5em;
    margin: 0.5em auto;
}

@media (min-width: 800px) {

    h1 {
        font-size: 4vw;
    }


    .articles {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 0.5em;
        margin:5vw 0;
    }

    .articles .item {
        display: inline;
        margin:0;
    }

    .articles .item img {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .articles {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1800px) {
    .articles {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pagination {
    text-align: center;
    font-family: var(--police-meta);
    font-weight: 300;
    margin: 2em;
}

.pagination ul {
    list-style: none;
}

.pagination li {
    display: inline;
    text-align: center;
}

.pagination a {
    color: var(--texte-sombre);
    border-radius: 0.3em;
    margin: 0 0.2em;
    padding: 0.5em;
    background-color: var(--couleur-texte);
}

.pagination a:hover,
.pagination .active a {
    background-color: var(--vert-hover);
    color: var(--couleur-texte);
}

.pagination .disabled {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .pagination a {
        color: var(--couleur-texte);
        background-color:var(--texte-sombre);
    }

    .pagination a:hover,
    .pagination .active a {
        background-color: var(--vert);
    }
}


/* Filtres jeu vidéo */

.filter-jeu-video-wrapper {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto minmax(12em, 1fr) auto;
    align-items: center;
    gap: 1.2em;
    max-width: 850px;
    margin: 3em auto 4em;
    padding: 1em 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.filter-jeu-video-wrapper h2 {
    font-family: var(--police-meta);
    font-size: 0.78em;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.filter-feedback {
    font-family: var(--police-meta);
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1;
    margin: 0;
    text-align: right;
    white-space: nowrap;
    color: var(--vert);
}

.filter-jeu-video-control {
    display: flex;
    align-items: center;
    gap: 0.9em;
}

.filter-jeu-video-control input[type="range"] {
    flex: 1;
    min-width: 10em;
    height: 1.2em;
    margin: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.filter-jeu-video-control input[type="range"]::-webkit-slider-runnable-track {
    height: 0.28em;
    border-radius: 999px;
    background: rgba(72, 123, 0, 0.22);
}

.filter-jeu-video-control input[type="range"]::-webkit-slider-thumb {
    width: 1em;
    height: 1em;
    margin-top: -0.36em;
    appearance: none;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--vert);
    box-shadow: 0 0 0 1px rgba(72, 123, 0, 0.55);
}

.filter-jeu-video-control input[type="range"]::-moz-range-track {
    height: 0.28em;
    border-radius: 999px;
    background: rgba(72, 123, 0, 0.22);
}

.filter-jeu-video-control input[type="range"]::-moz-range-thumb {
    width: 0.8em;
    height: 0.8em;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--vert);
    box-shadow: 0 0 0 1px rgba(72, 123, 0, 0.55);
}

.filter-jeu-video-control output {
    min-width: 4em;
    font-family: var(--police-meta);
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1;
    text-align: left;
}

.articles .item[hidden] {
    display: none !important;
}

@media (prefers-color-scheme: dark) {
    .filter-jeu-video-wrapper {
        border-color: rgba(198, 211, 198, 0.2);
    }

    .filter-feedback {
        color: var(--vert-hover);
    }

    .filter-jeu-video-control input[type="range"]::-webkit-slider-runnable-track {
        background: rgba(198, 211, 198, 0.24);
    }

    .filter-jeu-video-control input[type="range"]::-webkit-slider-thumb {
        border-color: var(--fond-sombre);
        background: var(--vert-hover);
        box-shadow: 0 0 0 1px rgba(99, 170, 1, 0.65);
    }

    .filter-jeu-video-control input[type="range"]::-moz-range-track {
        background: rgba(198, 211, 198, 0.24);
    }

    .filter-jeu-video-control input[type="range"]::-moz-range-thumb {
        border-color: var(--fond-sombre);
        background: var(--vert-hover);
        box-shadow: 0 0 0 1px rgba(99, 170, 1, 0.65);
    }
}

@media (max-width: 700px) {
    .filter-jeu-video-wrapper {
        grid-template-columns: auto minmax(8em, 1fr) auto;
        gap: 0.6em;
        margin: 1.5em 1em 1.75em;
        padding: 0.9em 0;
    }

    .filter-jeu-video-wrapper h2 {
        font-size: 0.68em;
        letter-spacing: 0.05em;
    }

    .filter-feedback {
        align-self: center;
        font-size: 0.72em;
        text-align: right;
    }

    .filter-jeu-video-control {
        gap: 0.45em;
        min-width: 0;
    }

    .filter-jeu-video-control input[type="range"] {
        min-width: 0;
        width: 100%;
    }

    .filter-jeu-video-control output {
        min-width: 3.3em;
        font-size: 0.78em;
        text-align: left;
    }
}

/* Articles */

#single .article h2,
#single .article h3 { 
    text-align: center;
    margin: 1.5em auto 1em auto;
}

#single .article h2:not(:first-child) {
    padding-top: 0.5em;
    border-top: 0.1em solid var(--vert);
}

#single .content,
#single-photo .content {
    margin: 0 auto;
    max-width: 850px;
    padding: 0 0.5em;
    font-size: 1.5em;
	line-height: 1.4em;
}

#single-photo .content {
    padding: 0;
}

#single-photo .content p {
    padding: 0 0.5em;
}

#single .title,
#single-photo .title {
    text-align: center;
    font-family: var(--police-titre);
    margin: 0.5em auto;
    font-weight: 600;
    font-size: 1.6em;
    line-height: 1.2em;
    font-variant-ligatures: common-ligatures discretionary-ligatures;
    hyphens: auto;
}

#single .title em,
#single-photo .title em {
    font-weight: 900;
}

#single .image {
    text-align: center;
}

.meta-top {
    text-align: right;
    font-family: var(--police-meta);
    line-height: 1.3em;
    font-size: 0.7em;
    margin: 0.5em;
}

.meta-top .date {
    font-weight: 300;
}

.meta-top .section {
    font-weight: 600;
}

.meta-top .section a {
    text-decoration: none !important;
}

#single .article,
#single-photo .article {
    clear: both;
    font-family: var(--police-texte);
    font-weight: 400;
}

#single .article blockquote {
    font-style: italic;
    margin: auto 1em auto 1.5em;
    font-size: 1.05em;
    line-height: 1.3em;
    border-left: 0.06em solid var(--vert);
    padding-left: 0.5em;
}

#single .article blockquote em,
#single .article em em {
    font-style: normal;
}

#single a,
#single-photo a {
    text-decoration: underline;
    color: var(--couleur-texte);
}

#single a:hover,
#single-photo a:hover {
    color: var(--vert);
    text-decoration: none;
}

#single .saison {
    text-align: center;
    margin: auto;
    width: fit-content;
    padding: 0.3em;
    cursor: pointer;
    border-radius: 0.3em;
    font-family: var(--police-meta);
    font-weight: 600;
    font-size: 1.2em;
}

#single .saison:hover {
    background-color: var(--vert-hover);
}

#single .saison a {
    color: var(--vert);
    text-decoration: none;
}

#single .saison:hover a {
    color: var(--texte);
}

.footnotes{
    font-size: 0.9em;
    line-height: 1.3em;
}

.footnotes hr{
    width: 40%;
    margin: 2em 0 0 0;
}

@media (prefers-color-scheme: dark) {
    #single .content h2:not(:first-child) {
        border-top: 0.1em solid var(--texte-sombre);
    }

    #single .article, 
    #single a,
    #single-photo a {
        color: var(--texte-sombre);
    }

    #single a:hover,
    #single-photo a:hover {
        color: var(--vert-hover);
    }

    #single .article blockquote {
        border-left-color: var(--vert-hover);
    }
    
    #single .saison:hover {
        background-color: var(--vert);
    }
    
    #single .saison a {
        color: var(--vert-hover);
    }
    
    #single .saison:hover a {
        color: var(--texte-sombre);
    }
}

@media (min-width: 900px) {

    #single {
        display: flex;
        justify-content: center;
        flex-direction: row-reverse;
        align-content: center;
        align-items: flex-start;
    }
    
    #single .image {
        position:sticky;
        top:0;
        max-width: 40%;
        margin: 0 auto;
    }

    #single .image img {
        max-height: calc(100vh - 5em);
    }

    #single .title,
    #single-photo .title {
        margin: 1vw auto;
        font-size: 3.5vw;
        hyphens: none;
    }

    #single .content {
        width: 60%;
        margin: 0 auto;
        font-size: 1.6em;
    }

}

/* Métadonnées */
.meta,
.meta-photos {
    display: inline;
    list-style: none;
    font-family: var(--police-meta);
    font-size: 0.9em;
    line-height: 1.3em;
}

.meta-photos {
    font-family: var(--police-meta);
    text-align: right;
    font-size: 0.7em;
    color: var(--vert);
    display: block;
    padding: 0;
    margin: 0 0.5em 1em 0;
}

#single-photo .meta h3{
    padding: 0 0.5em;
}

@media (prefers-color-scheme: dark){
    .meta-photos {
        color: var(--vert-hover);
    }
}

.meta p,
.meta ul {
    padding: 0;
    margin:0;
}

.meta li {
    display: inline;
}

.meta li:not(:last-child):not(:first-child):after {
    content: ", ";
}

.meta li:first-child:after {
    content: " ";
}

@media (min-width: 1000px) {
    .meta .col {
        columns: 2;
    }

    .meta-photos {
        font-size: 0.9em;
        margin: 0 0 1em 0;
    }

    #single-photo .meta h3{
        padding: 0;
    }
}

/* Recherche */

#search-input {
    font-family: var(--police-texte);
    font-size: 1.5em;
    width: 100%;
    text-align: center;
    margin:1em auto;
    font-weight: 600;
    border-color: var(--vert);
    border-style:solid;
    padding: 0.1em;
}

input:focus::placeholder {
    color: transparent;
}

#search-results {
    text-align: center;
    list-style: none;
    font-family: var(--police-titre);
    font-weight: 500;
    margin: 0 1em;
    padding: 0;
}

#search-results li {
    margin: 0.5em 0;
}

#search-results em {
    font-weight: 900;
}

#search-results a {
    text-decoration: none;
}

@media (max-width: 900px) {
    #search-input {
        font-size: 1em;
        margin:0.5em auto;
    }
}

/* Archives */

#single .archives {
    list-style: none;
    padding: 0;
}

#single .compteur{
    font-family: var(--police-meta);
    font-size: 0.7em;
    font-weight: 300;
}

#single .archives.sections {
    text-align: center;
}

#single .archives.sections .catemoji {
    padding-right: 0.3em;
}

#single .archives.calendrier li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    padding-bottom: 0.5em;
    line-height: 1em;
}

#single .archives.calendrier a {
    padding-left: 1.5em;
    text-indent:-1.5em;
}

#single .archives.calendrier .catemoji {
    padding-right: 0.2em;
}

#single .archives.calendrier a:hover~.date {
    color: var(--vert-hover);
}

#single .archives.calendrier .date {
    font-family: var(--police-meta);
    font-size: 0.6em;
    font-weight: 300;
    display: none;
}

#single .archives.calendrier .date.court {
    display: block;
    padding-left: 1em;
}

#single .archives li a {
    text-decoration: none;
}

@media (min-width: 900px) {
    #single .archives.sections {
        columns: 2;
    }

    #single .archives.calendrier li {
        padding-left: 1em;
    }

    #single .archives.calendrier .date {
        display: block;
        padding-left: 1em;
    }
   
    #single .archives.calendrier .date.court {
        display: none;
    }
}

@media (prefers-color-scheme: dark){
    #single .archives.calendrier a:hover~.date {
        color: var(--vert);
    }
}

/* Menu */

#single .menu {
    font-weight: 700;
    font-family: var(--police-titre);
    font-size: 1.5em;
    text-align: center;
}

#single .menu a {
    text-decoration: none;
}
