

/* VARIABLES */

:root { /* THEME CLAIR par défaut */
    color-scheme: light dark;
    --FondZ: #fefeff;
    --TraitZ: #000;
    --FondY: #f6f6f9;
    --TraitY: #334;
    --FondX: #f0f0f3;
    --TraitX: #334;
    --FondA: #09c;
    --TraitA: #fff;
    --FondB: #a83ea4;
    --TraitB: #fff;
    --FondC: #bfbfcf;
    --TraitC: #112;
    --Rouge: #b00020;
    --Orange: #c60;
    --Vert: #66cc33;
    --Police1: "Courier New", Courier, monospace;
    --Police2: "Georgia, serif";
}
[data-theme="dark"] { /* THEME SOMBRE demandé */
    --FondZ: #112;
    --TraitZ: #ccc;
    --FondY: #223;
    --TraitY: #eee;
    --FondX: #334;
    --TraitX: #fff;
    --FondA: #09c;
    --TraitA: #fff;
    --FondB: #a83ea4;
    --TraitB: #fff;
    --FondC: #bfbfcf;
    --TraitC: #112;
}

@media (prefers-color-scheme: dark) {
    :root { /* THEME SOMBRE par défaut */
        --FondZ: #112;
        --TraitZ: #ccc;
        --FondY: #223;
        --TraitY: #eee;
        --FondX: #334;
        --TraitX: #fff;
        --FondA: #09c;
        --TraitA: #fff;
        --FondB: #a83ea4;
        --TraitB: #fff;
        --FondC: #bfbfcf;
        --TraitC: #112;
    }
    [data-theme="light"] { /* THEME CLAIR demandé */
        --FondZ: #fefeff;
        --TraitZ: #000;
        --FondY: #f6f6f9;
        --TraitY: #334;
        --FondX: #f0f0f3;
        --TraitX: #334;
        --FondA: #09c;
        --TraitA: #fff;
        --FondB: #a83ea4;
        --TraitB: #fff;
        --FondC: #bfbfcf;
        --TraitC: #112;
        --Rouge: #b00020;
        --Orange: #c60;
        --Vert: #66cc33;
        --Police1: "Courier New", Courier, monospace;
        --Police2: "Georgia, serif";
    }
}


/* STRUCTURE DE BASE */
html {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}
body {
    background: var(--FondZ);
    color: var(--TraitZ);
    height: 100vh;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
body > header {
    flex: 0 0 auto;
}
main {
    flex: 1 1 auto;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
body > footer {
    flex: 0 0 auto;
}

/* SÉLECTEURS DE BASE */
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
h1 {
    font-family: serif;
}
p,
li,
details {
    font-size: var(--TailleNormal);
}
img {
    max-width: 100%;
}
button {
    margin: 1rem;
}

.aucentre {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.enligne {
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.enligne label {
    flex: 1 1 auto;
}
.credit {
    font-size: var(--TaillePetit);
}

/* FORMULAIRES */
form {
    margin: auto;
    display: flex;
    flex-direction: column;
}
fieldset {
    border: 0;
}
label {
    font-size: var(--TaillePetit);
}
input,
textarea,
select,
.saisie {
    font-size: calc(var(--TailleNormal) * 1.5vw);
    border: 0;
    background: inherit;
    color: var(--Texte1);
}
input {
    line-height: calc(var(--TailleNormal) * 1.5vw);
}
input[type=submit] {
    font-size: var(--TailleNormal);
}
textarea {
    resize: vertical;
    min-height: calc(var(--TailleNormal) * 3vw);
    font-family: inherit;
}
option {
    background: var(--FondZ);
    color: var(--TraitZ);
}

.fchamp {
    flex: 1 1 auto;
    margin: 0.3rem 0;
    padding: 1.2rem 0.9rem;
    border-bottom: 1px solid var(--TraitY);
    border-left: 1px solid var(--FondY);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    color: var(--TraitY);
}
.fchamp:focus-within > label {
    color: var(--TraitZ);
}
.fchamp:focus-within > input,
.fchamp:focus-within > textarea,
.fchamp:focus-within > select,
.fchamp:focus-within > .saisie {
    background: var(--FondY);
    color: var(--TraitZ);
}
.fsaisie {
    flex: 1 1 auto;
    margin: 0 1%;
    padding: 0.5rem 1%;
    border: 0;
    border-radius: 0.5rem;
    background: var(--FondY);
    color: var(--TraitY);
    width: 96%;
    font-size: calc(var(--TailleNormal) * 1.2vw);
    line-height: calc(var(--TailleNormal) * 1.2vw);
}
.fsubmit,
.bouton,
button {
    flex: 0 0 auto;
    margin: 1rem;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    min-width: 60px;
    background: var(--FondY);
    color: var(--TraitY);
    font-size: calc(var(--TailleNormal) * 1.2vw);
    line-height: calc(var(--TailleNormal) * 1.2vw);
}
.haute {
    min-height: 200px;
}

.ico {
    flex: 0 0 auto;
    margin: 10px;
    padding: 4px;
    background: var(--FondY);
    fill: var(--TraitY);
    width: 44px;
    height: 44px;
}
.ico > svg {
    width: 40px;
    height: 40px;
}
