body {
    font-size: calc(15px + 0.390625vw);
    display: grid;
    grid-template-columns: auto minmax(auto,100ch) auto;
    text-align: justify;
    line-height: 1.5;
    counter-reset: question exercice section subsection;
    margin: 0;
}

header {
    text-align: center;
}

h2 {
    counter-set: subsection 0;
}

h2::before {
    counter-increment: section;
    content: counter(section) ". ";
}

h3::before {
    counter-increment: subsection;
    content: counter(section) ". " counter(subsection) ". ";
}

body * {
    grid-column: 2;
}


.exercice {    
    background: #eee;
    border-radius: 10px;
    padding: 2ch;
    margin: 2ch;
}

.exercice::before {
    counter-increment: exercice;
    counter-reset: question;
    display: block;
    font-weight: bold;
    content: "Exercice " counter(exercice) ".";
}

.exercice figure {
    margin: auto;
    text-align: center;
}
.exercice figcaption {
    font-size: 0.7em;
}

.question::before {
    counter-increment: question;
    display: inline-block;
    font-weight: bold;
    content: "Question " counter(question) ". ";
    margin-right: 2ch;
}


table {
    border-collapse: collapse;
    background: #ffe;
    margin: 20px auto;

}

td, th {
    border: 1px solid black;
    padding: 10px;
}

td select {
    width: 100%;
    background: white;
    font-size: inherit;
    border: 1px solid black;
}

ul,p {
    margin: 0.7ch 1ch;
}

.proposition {
    color: darkred;
    font-weight: bold;
    font-family: mono;
}

.row {
    display: flex;
    flex-wrap: wrap;
    justify-items: space-between;
    margin: auto;
}

.def {
    font-weight: bold;
    font-style: italic;
    color: darkgreen;
}

.enigme {
    background: #ffd;
    font-style: italic;
}

.graph polygon {
    fill: none;
}

.correction {
    background: rgba(0,255,0,0.1)
}

.conseil:before {
    content: "👍 Conseil";
    font-weight: bold;

}
.conseil {
    border-radius: 10px;
    background: rgba(0,255,0,0.1);
    margin: 2ch;
    padding: 2ch;

}

.asavoir:before {
    content: "💡 Bon à savoir";
    font-weight: bold;
}
.asavoir {
    background: rgba(0,0,255,0.1);
    margin: 2ch;
    border-radius: 10px;
    padding: 2ch;
}


.sequent {

    width: max-content;
    margin: 10px auto;
    background: rgba(100,100,100,0.1);
    font-style: italic;
}

.premisses {
    display: flex;
    flex-wrap: nowrap;
    border-bottom: 1px solid black;
    align-items: flex-start;
    margin: 0 1ch;

    min-height: 1ch;
    align-items: flex-end;
}

.sequent {
    font-size: 0.8rem;
}

 .premisses > *,  .conclusion > * {
    padding: 0 20px;
    width: fit-content;
}

span.math {
    word-break: break-all;
}


.err {
    color: red;
    font-weight: bold;
}
pre.sourceCode.python:before, pre.text:before {
    display: block;
    font-size: 0.5em;
    text-align: right;
    padding: 0;
    font-weight: bold;
}

pre.sourceCode.python, pre.text {
    background: #fff;
    border: 2px solid black;
    padding: 0 1ch 1ch 1ch;
    overflow: auto;
}


pre.terminal {
    background: #222;
    color: white;
    border: 2px solid black;
    padding: 0 1ch 1ch 1ch;
    overflow: auto;
}

code.sourceCode.python span:hover {
    background: #ddd;
}

div.sourceCode {
    overflow: initial;
}

.objectifs {
    border: 1px solid black;
    border-radius: 1ch;
}
.objectifs:before {
    content: "Objectifs";
    font-weight: bold;
    border-bottom: 1px solid black;
    display: block;
    padding: 1ch;
}

