/* ===== VARIABLES ===== */
:root {
    /* Core variables */
    --mon-20-px: 20px;
    --mon-background-jaune: #fcc900;
    --mon-border-jaune: 4px;

    /* Layout dimensions */
    --header-height: 110px;
    --header-height-mobile: 200px;

    /* Font families */
    --ma-police-entete: "Outfit";
    --ma-police-logo-svg: "Cutive Mono";
    --ma-police-nav: "Atkinson_Hyperlegible_Mono";
    --ma-police-corps: "Outfit";
    --ma-police-dates-roles: "Atkinson_Hyperlegible_Mono";

    /* Theme colors - Light mode (default) */
    --couleur-texte: #000;
    --couleur-fond: #fff;
    --mon-background-color: transparent;
    --couleur-arriere-plan-nav: #f3f3f3;
    --couleur-puce: #000;
    --couleur-puce-hover: #000000;
    --couleur-footer-texte: #707070;
    --couleur-footer-fond: #111111;
    --couleur-lien: inherit;
}

/* Dark theme variables */
[data-theme="dark"] {
    --couleur-texte: #f0f0f0;
    --couleur-fond: #222222;
    --mon-background-color: rgba(50, 50, 50, 0.7);
    --couleur-arriere-plan-nav: #333;
    --couleur-puce: #cccccc;
    --couleur-puce-hover: var(--mon-background-jaune);
    --couleur-footer-texte: #707070;
    --couleur-footer-fond: #111111;
    --couleur-lien: #6699ff;
}

/* ===== FONT DECLARATIONS ===== */
@font-face {
    font-family: 'Cutive Mono';
    src: url("../fonts/Cutive_Mono/CutiveMono-Regular.ttf");
}

@font-face {
    font-weight: 300;
    font-family: 'Outfit';
    src: url("../fonts/Outfit/Outfit-VariableFont_wght.ttf");
}

@font-face {
    font-family: 'Asap';
    src: url("../fonts/Asap/Asap-VariableFont_wdth\,wght.ttf");
}

@font-face {
    font-family: 'Atkinson_Hyperlegible_Mono';
    src: url("../fonts/Atkinson_Hyperlegible_Mono/AtkinsonHyperlegibleMono-VariableFont_wght.ttf");
}

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

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

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

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

/* ===== BASE ELEMENTS ===== */
body {
    font-family: var(--ma-police-corps);
    margin: 0;
    padding: 0;
    color: var(--couleur-texte);
    background-color: var(--couleur-fond);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--couleur-lien);
}

svg {
    stroke: var(--mon-background-color);
    fill: var(--couleur-texte);
    font-family: var(--ma-police-logo-svg);
}

h1#pageTitle {
    font-size: 28px;
    font-weight: bold;
    font-family: var(--ma-police-entete);
    color: var(--couleur-texte);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    padding-bottom: 2.5px;
    margin-right: 39px;
    margin-left: -1px;
    line-height: 1.2;
    height: auto;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    max-width: 100%;
    transition: color 0.3s;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 24px;
    margin-bottom: 42px;
    font-family: var(--ma-police-dates-roles);
}

h3 {
    font-size: 18px;
    font-weight: bolder;
    margin-top: 60px;
    font-family: var(--ma-police-dates-roles);
}

ul {
    padding-left: 20px;
}

/* ===== LAYOUT COMPONENTS ===== */
/* Header */
header {
    padding: 0px 5px 6px var(--mon-20-px);
    background-color: var(--mon-background-color);
    width: 100%;
    box-sizing: border-box;
    border-bottom: var(--mon-border-jaune) solid var(--mon-background-jaune);
    position: fixed;
    backdrop-filter: blur(6px) brightness(80%);
    z-index: 1000;
    height: var(--header-height);
    min-height: var(--header-height);
    transition: height 0.3s ease-in-out;
}

.header-content {
    display: flex;
    justify-content: end;
    align-items: flex-end;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    flex-grow: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#headerLogo {
    width: 220px;
    height: 74px;
    margin-right: 40px;
    margin-left: -7px;
    margin-top: 8px;
    align-self: center;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1 0 auto;
    max-width: 1200px;
    margin-inline: 0 auto;
    margin-block-start: 100px;
    margin-block-end: auto;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    margin-top: calc(var(--header-height) + 0px);
}

/* Navigation */
nav {
    flex: 0 0 200px;
    padding: var(--mon-20-px);
    background-color: var(--couleur-arriere-plan-nav);
    font-family: var(--ma-police-nav);
}

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

nav ul li {
    margin-bottom: 1rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--couleur-texte);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0px;
    position: relative;
    padding-right: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-weight: normal;
}

nav ul li a:hover,
nav ul li a.active,
nav ul li a.clicked {
    font-weight: bolder;
    letter-spacing: 0.2px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    padding-left: 20px;
    padding-top: 10px;
}

.dropdown-content.show {
    display: block;
}

.dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Content Area */
#content {
    flex: 1;
    padding: var(--mon-20-px);
    max-width: 1000px;
    margin: 0;
    position: relative;
    border-right: 2px solid var(--couleur-arriere-plan-nav);
    box-sizing: border-box;
}

/* Content Lists */
#content ul,
#content ol {
    list-style: none;
    padding-left: 1.5em;
    margin-left: -1.8em;
    margin-bottom: -12px;
    list-style-position: outside;
}

#content ul li,
#content ol li {
    display: grid;
    grid-template-columns: 0.5em auto;
    column-gap: 0.5em;
    margin-bottom: 4px;
    padding-left: 1em;
}

#content ul li::before {
    /* content: "▪"; */
    content: "▫";
    grid-column: 1;
    text-align: left;
    font-size: 1.1em;
    line-height: 1.5;
    vertical-align: bottom;
    color: var(--couleur-puce);
    transition: color 0.0s ease;
}

#content ol li::before {
    content: counter(list-counter) ".";
    counter-increment: list-counter;
    grid-column: 1;
    text-align: right;
    font-size: 1.1em;
    line-height: 1;
    color: var(--couleur-puce);
    transition: color 0.0s ease;
}

#content ul li:hover::before,
#content ol li:hover::before {
    transition: color 0.0s ease;
    content: "▪";
    /* content: "▫"; */
    color: var(--couleur-puce-hover);
}

/* Footer */
footer {
    border-top: var(--mon-border-jaune) solid var(--mon-background-jaune);
    text-align: center;
    font-size: 12px;
    background-color: var(--couleur-footer-fond);
    color: var(--couleur-footer-texte);
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

#footerCitation {
    color: var(--couleur-footer-fond);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

#themeToggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
}

#themeToggle .theme-icon {
    display: block;
    transition: transform 0.3s ease-in-out;
}

#themeToggle .light {
    display: none;
}

#themeToggle .dark {
    display: block;
}

[data-theme="dark"] #themeToggle .light {
    display: block;
}

[data-theme="dark"] #themeToggle .dark {
    display: none;
}

/* Theme Icons */
.theme-icon {
    color: #444;
    font-size: 1.2rem;
    top: 1.7px;
    position: relative;
}

.theme-icon.light {
    color: var(--mon-background-jaune);
}

.theme-icon.dark {
    top: 1px;
}

[data-theme="dark"] .theme-icon.light {
    color: var(--mon-background-jaune);
}

[data-theme="dark"] .theme-icon.dark {
    color: #a0b9d1;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
    margin-right: 10px;
}

#languageToggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    font-family: var(--ma-police-entete);
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    color: var(--couleur-texte);
    transition: color 0.3s;
}

#languageToggle .lang-icon {
    display: block;
    transition: transform 0.3s ease-in-out;
    color: var(--couleur-texte);
    width: 2ch;
    text-align: center;
}

#languageToggle .en {
    display: block;
}

#languageToggle .fr {
    display: none;
}

[data-lang="en"] #languageToggle .en {
    display: none;
}

[data-lang="en"] #languageToggle .fr {
    display: block;
}

/* Language Selector (if needed) */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#languageSelector {
    padding: 0px 24px 5px 0px;
    border: none;
    background-color: transparent;
    color: var(--couleur-texte);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    font-family: var(--ma-police-entete);
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    text-align-last: center;
    transition: color 0.3s;
}

#languageSelector::-ms-expand {
    display: none;
}

#languageSelector:focus {
    outline: none;
    box-shadow: none;
}

#languageSelector option {
    background-color: var(--couleur-fond);
    color: var(--couleur-texte);
    text-align: center;
}

.select-wrapper::after {
    content: "\\25BC";
    position: absolute;
    top: -2px;
    bottom: 0px;
    right: 5px;
    pointer-events: none;
    font-size: smaller;
    margin-left: auto;
    padding-right: 5px;
    color: var(--couleur-texte);
    transition: color 0.3s;
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 900px) {
    header {
        height: var(--header-height-mobile);
        min-height: var(--header-height-mobile);
    }

    .main-container {
        margin-top: calc(var(--header-height-mobile) + 0px);
    }
}

@media screen and (max-width: 768px) {
    .main-container {
        flex-direction: column;
        margin-block-start: 200px;
        margin-right: auto;
        margin-left: auto;
    }

    nav {
        flex: 0 0 auto;
        padding: 10px 20px 0px 20px;
    }

    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    nav ul li {
        margin-bottom: 0.5rem;
        width: 48%;
    }

    .select-wrapper::after {
        top: 0.5px;
    }

    #content {
        max-width: 100%;
        border-right: none;
    }

    #content ul,
    #content ol {
        padding-left: 1.2em;
        margin-left: -1.4em;
    }

    #content ul li,
    #content ol li {
        padding-left: 1.2em;
        text-indent: 0em;
        grid-template-columns: 0.5em auto;
        column-gap: 0.7em;
        margin-bottom: 6px;
    }

    #content ul li::before,
    #content ol li::before {
        width: -1.2em;
        font-size: 1.1em;
        line-height: 1.4;
        vertical-align: middle;
    }
}