:root {
	--pico-font-size: 125%;
    --pico-border-radius: 24px !important;
    --header-space: 250px;
}

body {
    position: absolute;
    top: 0;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}
body.transparent-bg {
    background-color: transparent !important;
}
#page-header, #page-footer {
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
    background-color: rgba(5, 46, 97, 0.12);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
@media (prefers-color-scheme: dark) {
    #page-header, #page-footer {
        background-color: #181c2588;
    }
}

/* header */

#page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    text-align: center;

    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}
#page-header.scrolled {
    padding: 0.66rem;
}
#page-header .title {
    position: relative;
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
#page-header .title img#logo {
    width: 500px;
    max-width: 70%;
    transition: width 0.3s ease;
    margin-bottom: 10px;
}
#page-header.scrolled .title img#logo {
    width: 150px !important;
}
#page-header .subtitle p {
    font-size: 1.1em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: black;
}
#page-header .subtitle p img {
    height: 50px;
}
#page-header.scrolled .subtitle {
    display: none;
}
@media (prefers-color-scheme: dark) {
    #page-header .title {
        filter: invert(1);
    }
}

/* language-selector */

#language-selector {
    position: absolute;
    right: 5%;
    z-index: 10;
    display: inline-flex;
    align-items: center;
}
@media (max-width: 767px) {
    #page-header {
        display: unset;
    }
    #page-header #language-selector {
        position: unset;
    }
}
#language-selector label {
    font-size: 2.2rem;
    margin-bottom: 0 !important;
}
#language-selector select {
    margin-bottom: 0 !important;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* footer */

#page-footer a {
    color: black;
}
@media (prefers-color-scheme: dark) {
    #page-footer a {
        filter: invert(1);
    }
}
@media (max-width: 767px) {
    #page-footer > nav, #page-footer > nav > ul {
        display: block;
    }
    #page-footer > nav ul li {
        padding: 0.5rem;
    }
}

/* body */

main {
    transition: opacity 0.5s ease, visibility 0.5s ease;
    margin-top: var(--header-space);
}
@media (min-width: 1536px) {
    .container {
        max-width: 1200px;
    }
}

/* main menu */

main > nav {
    backdrop-filter: blur(8px);
    background-color: rgba(5, 46, 97, 0.12);
    border-radius: calc(var(--pico-border-radius) + 12px);
    padding: 0 30px;
}
main nav a {
    color: black;
}
main nav span {
    font-size: 1.2rem;
}
@media (max-width: 767px) {
    main > nav, main > nav ul, main > nav ul li {
        display: block;
    }
    main > nav ul li {
        padding: 0.5rem;
    }
}
@media (prefers-color-scheme: dark) {
    main > nav {
        background-color: #181c2588;
        box-shadow: 0 0 0 12px rgba(5, 46, 97, 0.12), 0 0 15px 12px rgba(255, 255, 255, 0.1);
        margin: 0 12px;
    }
    main nav a {
        filter: invert(1);
    }
}

/* Content */

h2 {
    text-decoration: underline;
}
.center {
    text-align: center;
}
.center img, img.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
img.h600 {
    max-height: 600px;
}
img.h400 {
    max-height: 400px;
}
@media (prefers-color-scheme: dark) {
    img.no-dark {
        border-radius: var(--pico-border-radius);
        background: white;
        padding: 0.5rem;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.33);
    }
}

article {
    margin: 50px 15px;
    box-shadow:
        0 0 0 12px rgba(5, 46, 97, 0.12), /* Bord "solide" semi-transparent */
        0 0 15px 12px rgba(255, 255, 255, 0.1); /* Flou étendu autour du bord */
}

/* callout */

blockquote {
    border-inline-start-width: 4px;
    border-inline-start-style: solid;
    border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
    padding: 0 var(--pico-spacing) 0 var(--pico-spacing);
    margin-bottom: var(--pico-spacing);
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote.callout-info {
    background-color: var(--pico-form-element-background-color);
    border-inline-start-color: #0172ad; /* Bleuted info */
}
blockquote.callout-info::before {
    content: "ℹ️ Info";
    display: block;
    font-weight: bold;
    color: #0172ad;
    margin-top: calc(var(--pico-spacing) * 0.25);
    margin-bottom: calc(var(--pico-spacing) * 0.25);
}

blockquote.callout-warning {
    background-color: var(--pico-form-element-background-color);
    border-inline-start-color: #e65100; /* Orange warning */
}
blockquote.callout-warning::before {
    content: "⚠️ Attention";
    display: block;
    font-weight: bold;
    color: #e65100;
    margin-top: calc(var(--pico-spacing) * 0.25);
    margin-bottom: calc(var(--pico-spacing) * 0.25);
}

/* External link */

.external-link {
    background-image: url(/assets/img/external_link.svg);
    background-position: center right;
    background-repeat: no-repeat;
    background-size: 0.857em;
    padding-right: 1em;
}
.icon-link {
    text-decoration: none;
}


/* Smartphone effect*/

.phone {
    position: relative;
    border-radius: calc(var(--pico-border-radius) + 12px);
    box-shadow:
        0 0 0 4px #000,
        0 8px 16px rgba(0, 0, 0, 0.3);
    background: #222;
    padding: 2.5%;
    margin: 1.25rem;
}

@media screen and (max-width: 800px) {
    .hidding {
        display: none;
        margin: 0px !important;
        background: white !important;
        box-shadow: 0 0 0 0 white !important;
    }
}

/* Background info overlay */

#background-info-overlay {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 25rem;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 1000;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-align: right;

    /* Flexbox pour aligner les éléments horizontalement */
    display: flex;
    align-items: center;
    gap: 1rem; /* Espace entre le texte et le drapeau */
}

#background-info-overlay .text-content {
    flex: 1;
    line-height: 1.5;
    font-size: 0.8em;
}

#background-info-overlay .flags {
    font-size: 3em;
    line-height: 0;
    flex-shrink: 0;
}

#background-info-overlay .title {
    margin: 0;
    font-weight: bold;
}

#background-info-overlay .author a {
    color: white;
    text-decoration: underline;
}