/* ITC pages: edit this file directly; publishing does not regenerate it. */
html {
    font-family: system-ui, Segoe UI, Roboto, Emoji, Helvetica, Arial, sans-serif
}

body {
    counter-reset: exercice;
}

textarea.texteditor {
    display: block;
    width: 100%;
}

.exercice::before {
    counter-increment: exercice;
    font-variant:small-caps;
    content: "Exercice " counter(exercice) " " attr(data-title);
}

.indication::before {
    content: "Indication " attr(data-title) " ";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.exercice.diff::before {
    content: "Exercice " counter(exercice) " \2605 ";
}

.exercice.diff2::before {
    content: "Exercice " counter(exercice) " \2605 \2605 ";
}

.exercice {
    display: block;
    border-left: 0.5rem solid #6bd6fd;
    background-color: rgba(107,214,253,0.2);
    padding: .25rem .75rem;
    margin: 1rem 0;
}

.proof::before {
    display: inline;
    content: "Démonstration ";
    font-style:italic;
}

.remarque {
  display: inline-block;  /* or display: inline; depending on your needs */
}

.remarque p {
    display: inline;
}

.remarque::before {
    display: inline;
    content: "Remarque ";
    font-style:italic;
}

.propriete::before {
    display: inline;
    content: "Propriété ";
    font-style:bold;
}

.definition::before {
    display: inline;
    content: "Définition ";
    font-style:bold;
}

.definition {
    display: block;
    border-left: 0.5rem solid purple;
    background-color: #FFE9FF;
    padding: .25rem .75rem;
    margin: 1rem 0;
}


.proposition::before {
    display: inline;
    content: "Proposition ";
    font-weight: bold;
}

.theorem::before {
    display: inline;
    content: "Théorème ";
    font-weight: bold;
}

.theorem,.proposition,.propriete {
    display: block;
    border-left: 0.5rem solid red;
    background-color: rgb(255 204 203);
    padding: .25rem .75rem;
    margin: 1rem 0;
}

.post-name-sum {
    margin-left: 5px;
    margin-right: 5px;
    display: inline-block;
    text-align: center;
}

summary {
    font-weight: bold;
    color: #9c9c9c;
    background: #e1e1e1;
    width: 100%;
}

details {
    background: #f2f2f2;
}

.hidden-tests {
    display: none;
}

.common-hidden-tests {
    display: none;
}

.loader {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: inline-block; /* Ensures the span behaves like a block element */
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

.network_fail {
    color: red;
    font-size: 20px;
}

.network_fail:hover::after {
    content: "Échec de la connection au server. Votre soumission n'a pas été enregistrée.";
    position: absolute;
    top: 100%;
    left: 50%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Unchanged-variable cells shaded by LaTeX in the printed worksheet. */
td.itc-cell-shaded, th.itc-cell-shaded {
    background-color: #bfbfbf;
}

/* Reading layout. The original Org document remains usable without JavaScript. */
:root {
    --itc-interface-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --itc-reading-width: 46.5rem;
    --itc-margin-width: 12rem;
    --itc-margin-gap: 2rem;
    --itc-muted: #74747b;
}
body {
    margin: 0;
    padding: 0 1.25rem;
    color: #29292e;
    font-family: var(--itc-interface-font);
    font-size: 16px;
    line-height: 1.6;
}
#content {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--itc-reading-width);
    margin: 0 auto;
    padding: 3rem 0 5rem;
}
#content > .title {
    text-align: left;
    font-size: 2rem;
    line-height: 1.25;
    letter-spacing: -.025em;
    margin: 0 0 2.5rem;
}
h2, h3, h4 { line-height: 1.35; scroll-margin-top: 2rem; }
h2 { margin-top: 2.5rem; }
h3 { margin-top: 2rem; }
p { margin: 10px 0; }
.exercice > ol, .exercice > ul { margin-top: .75rem; }
/* The label is generated by ::before; halve only the gap to its content. */
.exercice > :first-child { margin-top: .375rem; }
h1, h2, h3, h4, h5, h6, #table-of-contents, .exercice::before, summary {
    font-family: var(--itc-interface-font);
}
pre.src { overflow-x: auto; font-size: .82em; line-height: 1.55; padding: 1rem; }
#content img { max-width: 100%; height: auto; }
table { display: block; max-width: 100%; overflow-x: auto; font-size: .9em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .2em 0; }
#table-of-contents {
    margin: 0 0 2.5rem;
    font-size: 13px;
    line-height: 1.55;
    color: var(--itc-muted);
}
#table-of-contents h2 {
    margin: 0 0 1rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}
#table-of-contents ul { list-style: none; margin: 0; padding: 0; }
#table-of-contents ul ul { padding-left: .9rem; margin: .25rem 0 .6rem; }
#table-of-contents li { margin: .35rem 0; }
#table-of-contents a { color: inherit; text-decoration: none; display: block; }
#table-of-contents a:hover, #table-of-contents a:focus-visible { color: #242429; text-decoration: underline; }
#table-of-contents a[aria-current="location"] { color: #242429; font-weight: 600; }
#table-of-contents.itc-toc-ready #text-table-of-contents > ul > li > ul { display: none; }
#table-of-contents.itc-toc-ready #text-table-of-contents > ul > li.is-current > ul { display: block; }
#footnotes { font-size: 13px; line-height: 1.6; color: var(--itc-muted); margin-top: 3rem; }
#footnotes h2 { font-size: 1rem; }
#footnotes .footdef { margin: 1rem 0; scroll-margin-top: 2rem; }
#footnotes a { color: inherit; }
#footnotes .footpara { display: inline; }
#footnotes p.footpara { margin: 0; }
a.footref { color: var(--itc-muted); text-decoration: none; padding: 0 .08em; }
.footdef:target, .footdef:has(:target) { color: #29292e; }
@media screen and (min-width: 1240px) {
    #table-of-contents {
        position: fixed;
        top: 3rem;
        left: max(1.25rem, calc(50% - var(--itc-reading-width) / 2 - var(--itc-margin-gap) - var(--itc-margin-width)));
        width: var(--itc-margin-width);
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
    #footnotes.itc-sidenotes {
        position: absolute;
        top: 0;
        left: calc(100% + var(--itc-margin-gap));
        width: var(--itc-margin-width);
        margin: 0;
    }
    #footnotes.itc-sidenotes h2 { display: none; }
    #footnotes.itc-sidenotes .footdef { position: absolute; width: 100%; margin: 0; }
    #footnotes.itc-sidenotes .footdef > sup { float: left; margin-left: -1em; }
}
@media screen and (max-width: 1239px) {
    #table-of-contents { padding: 1rem 0; border-bottom: 1px solid #ededf0; }
}
@media screen and (max-width: 600px) {
    body { font-size: 16px; padding: 0 1rem; }
    #content { padding-top: 2rem; }
    #content > .title { font-size: 1.65rem; }
}
@media print {
    body { font-size: 11pt; padding: 0; }
    #content { max-width: none; padding: 0; }
    #table-of-contents { display: none; }
    #footnotes.itc-sidenotes, #footnotes.itc-sidenotes .footdef { position: static; width: auto; }
    #footnotes.itc-sidenotes h2 { display: block; }
    #footnotes.itc-sidenotes .footdef > sup { float: none; margin-left: 0; }
}
