:root {
    /* Mode clair (par défaut) */
    --border-color: #DDD;
    --dark-font-color: #111;
    --light-dark-font-color: #555;
    --gray-font-color: #A9A9A9;
    --light-gray-bg: #F8F8F8;
    --bg-color: #FFF;
    --grid-line-color: #f6f6f6;
    --shadow-color: white;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    :root {
        --border-color: #444;
        --dark-font-color: #F0F0F0;
        --light-dark-font-color: #CCC;
        --gray-font-color: #888;
        --light-gray-bg: #222;
        --bg-color: #121212;
        --grid-line-color: #1e1e1e;
        --shadow-color: #121212;
    }
}

.dark-mode {
    --border-color: #444;
    --dark-font-color: #F0F0F0;
    --light-dark-font-color: #CCC;
    --gray-font-color: #888;
    --light-gray-bg: #222;
    --bg-color: #121212;
    --grid-line-color: #1e1e1e;
    --shadow-color: #121212;
}

.light-mode {
    --border-color: #DDD;
    --dark-font-color: #111;
    --light-dark-font-color: #555;
    --gray-font-color: #A9A9A9;
    --light-gray-bg: #F8F8F8;
    --bg-color: #FFF;
    --grid-line-color: #f6f6f6;
    --shadow-color: white;
}

@font-face {
  font-family: Satoshi;
  src: url("/fonts/Satoshi.ttf");
}

@font-face {
  font-family: Inter;
  src: url("/fonts/Inter.ttf");
}

body {
    font-synthesis: none !important;
    margin: 0;
    min-height: 100vh;
    font-family: Inter, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    color: var(--dark-font-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

::selection {
    background-color: #00F4;
}

main {
    flex: 1;
}

footer {
    background-color: var(--light-gray-bg);
    color: var(--light-dark-font-color);
}

footer .content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
}

footer .content > * {
    width: 200px;
    margin: 0;
}

.footer-list {
    margin: 0;
}

.footer-a {
    text-decoration-color: #0000;
    text-decoration: underline;
    color: var(--light-dark-font-color);
    transition: text-decoration-color .2s;
}

.footer-a:hover {
    text-decoration-color: var(--light-dark-font-color);
}

#themeSelector {
    cursor: pointer;
}

hr {
    margin: 0;
    height: 0;
    width: 100%;
    border: 0;
    border-top: 1px dashed var(--border-color);
}

.topbar {
    width: 100%;
}

.topbar-container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background-size: 20px 20px;
    background-image: linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
    box-shadow: inset 0 -1rem 2rem var(--shadow-color);
}

.topbar-right {
    display: flex;
}

.topbar-item {
    margin: 1rem 1.5rem;
    font-size: 1rem;
    text-decoration: none;
    color: var(--light-dark-font-color);
}

.is-active {
    color: var(--dark-font-color);
}

.section {
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.section > .section-middle {
    margin: 0 auto;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.content {
    padding: 1rem 1.5rem;
    text-wrap: wrap;
}

.content pre {
    text-wrap: wrap;
}

.hero {
    text-align: center;
    font-family: Satoshi, sans-serif;
}

h1.hero {
    font-size: 4rem;
}

p.hero {
    font-size: 1.3rem;
    color: var(--gray-font-color);
}

h1.section-title {
    font-family: Satoshi, sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
}

.filler {
    position: absolute;
    z-index: -1;
    width: 100vw;
    height: 100vh;
}

.filler-middle {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    margin: 0 auto;
    height: 100vh;
}

.inline-presentation > * {
    flex: 1 1 auto;
    text-align: center;
}

.inline-presentation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.inline-presentation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em;
    background-size: 20px 20px;
    background-image: linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
    border-right: 1px dashed var(--border-color);
    transition: filter .3s;
}

.inline-presentation-card:last-child {
    border-right: none;
}

.inline-presentation-card:hover {
    filter: saturate(1.1);
}

.inline-presentation-card div {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inline-presentation-card div img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.search-bar {
    display: flex;
}

.search-bar input{
    display: inline;
    border: none;
    box-shadow: none;
    font-family: Inter, SF Pro, Segoe UI, Roboto, Oxygen, Ubuntu, Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    width: 100%;
    background-color: transparent;
    color: var(--dark-font-color);
}

.search-bar input::placeholder {
    color: var(--gray-font-color);
}

.search-bar input:focus {
    outline: none;
}

.search-bar svg {
    display: inline;
    padding-right: 1rem;
    width: 1.2rem;
    fill: var(--light-dark-font-color);
}

.grid-presentation {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--border-color);
    gap: 1px;
}

.grid-presentation-item {
    flex: 1 1 auto;
    min-width: 250px;
    background-color: var(--bg-color);
    text-decoration: none;
    padding: 1em;
}

.grid-presentation-item a {
    font-family: Inter, SF Pro, Segoe UI, Roboto, Oxygen, Ubuntu, Helvetica Neue, Helvetica, Arial, sans-serif;
    text-overflow: ellipsis;
    color: var(--dark-font-color);
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

.github {
    height: 1.2rem;
}

@media (prefers-color-scheme: dark) {
    .grid-presentation-item a .github {
        filter: brightness(0) invert(1);
    }
}
.dark-mode .github {
        filter: brightness(0) invert(1);
}

.grid-presentation-item h2 {
    font-family: Inter, SF Pro, Segoe UI, Roboto, Oxygen, Ubuntu, Helvetica Neue, Helvetica, Arial, sans-serif;
    text-overflow: ellipsis;
    color: var(--light-dark-font-color);
    font-weight: normal;
    font-size: 1rem;
    margin-top: 5px;
}

.grid-presentation-item p {
    font-size: 0.8rem;
    color: var(--light-dark-font-color);
}

.grid-presentation-item p b {
    font-weight: 400;
    padding: 2px 7px;
    border-radius: 1em;
    margin-right: 5px;
    background-color: var(--light-gray-bg);
    color: var(--light-dark-font-color);
}

.grid-presentation-item time {
    font-size: 0.8rem;
    color: var(--gray-font-color);
}

section.form-full-container {
    width: 100%;
    height: 100vh;
    align-content: center;
}

form.form-full {
    border: var(--border-color) solid 1px;
    margin: 0 auto;
    width: 300px;
}

form.form-full h1 {
    font-family: Satoshi, sans-serif;
    text-align: center;
    margin: 0;
    padding: 1rem 0;
    border-bottom: var(--border-color) solid 1px;
}

form.form-full label {
    font-family: Satoshi, sans-serif;
    padding: 1rem .2rem .2rem .2rem;
    display: block;
    /*color: var(--gray-font-color);*/
}

form.form-full input {
    box-sizing: border-box;
    background-color: var(--bg-color);
    color: var(--dark-font-color);
    font-size: 1rem;
    border: 0;
    border-bottom: var(--border-color) dashed 1px;
    border-top: var(--border-color) dashed 1px;
    padding: 1rem;
    width: 100%;
}

form.form-full button {
    border: 0;
    border-top: var(--border-color) solid 1px;
    color: var(--dark-font-color);
    font-size: 1rem;
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--bg-color);
    cursor: pointer;
}

form.form-full input:focus {
    outline: none;
}

pre:has(> code) {
    border-radius: 1rem;
}

/* Toggle du dark mode */
.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
}

article header {
    padding: 3rem 0;
}

article header h1 {
    font-size: 2.4rem;
    margin: 0;
}

article header h2 {
    margin-top: 0;
    color: var(--light-dark-font-color);
    font-weight: 500;
}

article header time {
    color: var(--gray-font-color);
}

article header p b {
    font-weight: 400;
    padding: 2px 7px;
    border-radius: 1em;
    margin-right: 5px;
    background-color: var(--light-gray-bg);
    color: var(--light-dark-font-color);
}

article header a {
    margin-right: 1rem;
    font-size: 1rem;
    text-decoration: none;
    color: var(--dark-font-color);
    background-color: var(--light-gray-bg);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: var(--light-gray-bg) 0 2px 1px;
    transition: box-shadow 1s;
}

article header a:hover {
    box-shadow: var(--gray-font-color) 0 2px 1px;
}

article header a img, article .github {
    height: .8rem;
}

article h1 {
    font-size: 2rem;
}

@media only screen and (min-width: 1300px) {
    /* large */
    .topbar-container {
        width: 1200px;
    }

    section .section-middle {
        width: 1200px;
    }

    .filler .filler-middle {
        width: 1200px;
    }

    article {
        margin: 0 auto;
        width: 900px;
    }

    .grid-presentation-item {
        min-width: 500px;
    }
}

@media only screen and (max-width: 1300px) and (min-width: 769px){
    /* medium */
    .topbar-container {
        width: calc(100vw - 100px);
    }

    h1.hero {
        font-size: 3rem;
    }

    section .section-middle {
        width: calc(100vw - 100px);
    }

    .filler .filler-middle {
        width: calc(100vw - 100px);
    }

    article {
        margin: 0 auto;
        width: 80%;
    }
}
@media only screen and (max-width: 768px) {
    /* small */
    .topbar-container {
        width: 100%;
    }

    section > .section-middle {
        width: 100%;
    }

    .filler .filler-middle {
        width: 100%;
    }

    h1.hero {
        font-size: 2rem;
    }

    article {
        margin: 0 2rem;
    }

    body, html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .content {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    /* Autres éléments qui pourraient causer le débordement */
    .grid-presentation,
    .inline-presentation,
    .topbar,
    footer .content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}