/* Custom styles for figure captions */
figure figcaption {
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
    color: #666;
    /* Optional: make it slightly lighter like standard captions */
}

/* Ensure paragraph inside figcaption inherits styles or is styled directly */
figure figcaption p {
    margin: 0;
    font-style: inherit;
    text-align: inherit;
}

/* Custom Note/Alert Block */
.note {
    background-color: #f0f7fb;
    border-left: 5px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #2c3e50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Add margin below YouTube videos */
.responsive-video.youtube {
    margin-bottom: 2rem;
}

/* Make highlighted lines in code blocks much more prominent */
.highlight span[style*="background-color"] {
    background-color: rgba(255, 235, 59, 0.2) !important;
    /* light yellow overlay */
    box-shadow: inset 4px 0 0 #ffeb3b !important;
    /* solid yellow left border */
}

/* Make numbered list markers bold using CSS counters for better browser compatibility */
.content ol {
    counter-reset: custom-ol-counter;
}

.content ol>li {
    list-style-type: none;
    counter-increment: custom-ol-counter;
}

.content ol>li::before {
    content: counter(custom-ol-counter) ". ";
    font-weight: bold;
}

/* Espacement au-dessus et trait en-dessous pour les H1 et H2 */
article .content h1,
article .content h2 {
    padding-bottom: 0.1em;
    /* Rapproche le trait du texte du titre */
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    /* Trait fin et clair sur toute la largeur */
}

article .content h1 {
    margin-top: 1.5em;
    /* Augmente l'espace avant le h1 */
    margin-bottom: 0.5em !important;
    /* Espace bien plus grand sous le h1, important force la surcharge du thème */
}

/* Retire le soulignement pour le titre principal de l'article */
article .content h1.article-title,
h1.article-title {
    border-bottom: none;
    padding-bottom: 0;
}

article .content h2 {
    margin-top: 1.25em;
    /* Réduit l'espace au dessus des h2 */
    margin-bottom: 0.5em !important;
    /* Espace plus grand sous le h2, important force la surcharge du thème */
}