/* ===== Koude — carnet de notes vert ===== */

/* Couleurs */
:root {
    --fond: #FAFAF6;
    --points: #DADBD0;
    --texte: #14281D;
    --texte-2: #33463A;
    --discret: #5B6B60;
    --vert: #17603A;
    --vert-fonce: #0E3F26;
    --fluo: #B9F5A8;
    --tag: #E4F7DD;
    --bordure: #C9CBBE;
    --trait: #E3E4DA;
    --postit: #FFFDE8;
    --code-fond: #14281D;
    --code-texte: #EAF6E4;
}

/* Base */
body {
    margin: 0;
    background-color: var(--fond);
    background-image: radial-gradient(var(--points) 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--texte);
}

a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }

h1, h2, h3 {
    font-family: "Bricolage Grotesque", sans-serif;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.conteneur {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

/* Surligneur vert */
.hl {
    background: linear-gradient(100deg, transparent 2%, var(--fluo) 3%, var(--fluo) 97%, transparent 98%);
    background-size: 100% 46%;
    background-repeat: no-repeat;
    background-position: 0 82%;
    padding: 0 6px;
    margin: 0 -2px;
}

/* Écriture manuscrite */
.manuscrit {
    font-family: Caveat, cursive;
    color: var(--vert);
}

/* ===== En-tête ===== */
.entete {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 32px 0 24px;
    border-bottom: 1.5px dashed var(--bordure);
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
    color: var(--texte);
}

.logo-nom {
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.5px;
}

.logo-badge {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    color: var(--vert);
    border: 1.5px solid var(--vert);
    border-radius: 4px;
    padding: 1px 6px;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 500;
}

.menu a {
    padding: 10px 12px;
    color: var(--texte);
    text-decoration: none;
}

/* ===== Accueil ===== */
.intro { padding: 72px 0 48px; }

.intro-note {
    display: inline-block;
    margin: 0 0 4px;
    font-size: 30px;
    transform: rotate(-2deg);
}

.intro h1 {
    margin: 0;
    font-weight: 800;
    font-size: 64px;
    letter-spacing: -1.5px;
}

.intro p {
    max-width: 620px;
    margin: 24px 0 0;
    font-size: 19px;
    color: var(--texte-2);
}

.section-titre {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 8px;
}

.section-titre h2 { margin: 0; font-size: 30px; }

/* Liste des TIL */
.liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.liste li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--trait);
}

.liste .date {
    width: 120px;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    color: var(--discret);
}

.liste a:not(.tag) {
    flex: 1 1 360px;
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
}

.liste a:not(.tag):hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.tag {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    background: var(--tag);
    color: var(--vert);
    border-radius: 4px;
    padding: 2px 8px;
    text-decoration: none;
}

a.tag:hover {
    background: var(--fluo);
    color: var(--texte);
}

/* Post-it */
.postit {
    background: var(--postit);
    padding: 24px 28px;
    transform: rotate(-0.6deg);
    box-shadow: 0 1px 0 #E8E3B8, 3px 4px 0 rgba(20, 40, 29, 0.06);
}

.postit h2 {
    margin: 0 0 8px;
    font-family: Caveat, cursive;
    font-size: 32px;
    color: var(--vert);
}

/* Bouton avec ombre pleine */
.bouton {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border: 1.5px solid var(--texte);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 4px 4px 0 var(--texte);
    color: var(--texte);
    text-decoration: none;
    font-weight: 600;
}

.bouton-vert { background: var(--fluo); }

/* ===== Article ===== */
.article { padding-top: 56px; font-size: 18px; line-height: 1.7; }

.article h1 {
    margin: 0;
    font-weight: 800;
    font-size: 50px;
    letter-spacing: -1.2px;
}

.article h2 { margin: 48px 0 12px; font-size: 28px; }

.article-infos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 16px 0 32px;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    color: var(--discret);
}

/* Code */
code {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9em;
    background: var(--tag);
    border-radius: 4px;
    padding: 1px 5px;
}

pre {
    padding: 20px;
    background: var(--code-fond);
    color: var(--code-texte);
    border-radius: 10px;
    overflow-x: auto;
    font-size: 15px;
    line-height: 1.6;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== Pied de page ===== */
.pied {
    margin-top: 96px;
    padding-top: 40px;
    border-top: 1.5px dashed var(--bordure);
    font-size: 15px;
    color: var(--texte-2);
}

.pied-colonnes {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 56px;
}

.pied-colonnes nav {
    flex: 1 1 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pied-colonnes nav a { text-decoration: none; }

.pied-colonnes h2 {
    margin: 0 0 6px;
    font-family: Caveat, cursive;
    font-size: 26px;
    color: var(--vert);
}

.pied-bas {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--trait);
    font-size: 14px;
    color: var(--discret);
}

.en-bref {
    margin: 0 0 40px;
    padding: 16px 22px;
    background: var(--postit);
    box-shadow: 3px 4px 0 rgba(20, 40, 29, 0.06);
}

.article .en-bref h2 {
    margin: 0 0 4px;
    font-family: Caveat, cursive;
    font-size: 26px;
    color: var(--vert);
}

.en-bref p {
    margin: 0;
}

pre:has(code[class^="language-"])::before {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--fluo);
}

pre:has(.language-python)::before { content: "python"; }
pre:has(.language-javascript)::before { content: "javascript"; }
pre:has(.language-bash)::before { content: "bash"; }
pre:has(.language-html)::before { content: "html"; }
pre:has(.language-css)::before { content: "css"; }

.admonition {
    margin: 32px 0;
    padding: 16px 20px;
    border: 1.5px dashed var(--texte);
    border-radius: 10px;
}

.admonition-title {
    margin: 0 0 4px;
    font-weight: 600;
}

.admonition p:last-child {
    margin-bottom: 0;
}

.voisines {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 56px;
}

.voisines .bouton {
    flex: 1 1 260px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.voisines .bouton span {
    font-size: 13px;
    font-weight: 400;
}

.voisines .bouton-vert {
    align-items: flex-end;
}
.arbre { padding-top: 56px; }

.arbre h1 {
    margin: 0 0 40px;
    font-size: 56px;
    font-weight: 800;
}

.arbre details {
    padding: 16px 0;
    border-bottom: 1px solid var(--trait);
}

.arbre summary {
    cursor: pointer;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 30px;
    font-weight: 800;
}

.arbre h3 {
    margin: 20px 0 6px 24px;
    font-size: 17px;
}

.arbre ul {
    margin: 0 0 0 24px;
    padding: 0 0 0 20px;
    border-left: 1.5px dashed var(--bordure);
}

.arbre li { padding: 3px 0; }

.arbre li a { text-decoration: none; }
.arbre li a:hover { text-decoration: underline; }