/* Styles généraux pour les posts */
.post_container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    color: #333;
    line-height: 1.7;
}

.post_container h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #0c0039;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.post_container > div {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Styles pour le contenu markdown dans les posts */
.post_container div p {
    margin: 1.25rem 0;
    font-size: 1.1rem;
    color: #333;
}

.post_container div a {
    color: #3a7bd5;
    text-decoration: none;
    transition: color 0.2s;
}

.post_container div a:hover {
    color: #00d2ff;
    text-decoration: underline;
}

.post_container div img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Amélioration des tableaux dans les posts */
.post_container div table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post_container div th,
.post_container div td {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.post_container div th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #0c0039;
}

.post_container div tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Styles pour les blocs de code */
.post_container div pre {
    background-color: #282c34;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.post_container div code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    background-color: transparent;
    color: #abb2bf;
    padding: 0;
}

/* Styles pour les blocs de citation */
.post_container div blockquote {
    border-left: 4px solid #3a7bd5;
    background-color: #f5f7fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #555;
    font-style: italic;
}

/* Styles pour les listes */
.post_container div ul,
.post_container div ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post_container div li {
    margin-bottom: 0.5rem;
}

/* Styles pour les en-têtes dans le contenu */
.post_container div h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: #0c0039;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
}

.post_container div h3 {
    font-size: 1.5rem;
    margin: 1.8rem 0 0.8rem;
    color: #0c0039;
}

.post_container div h4 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.7rem;
}

/* Section commentaires */
.comments {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .post_container {
        padding: 0 1rem;
    }
    
    .post_container h1 {
        font-size: 2rem;
    }
    
    .post_container > div {
        padding: 1.5rem;
    }
    
    .post_container div p {
        font-size: 1rem;
    }
    
    .post_container div pre {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
}

/* Container principal */
.summary_container {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 90;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

/* Style de la scrollbar */
.summary_container::-webkit-scrollbar {
    width: 6px;
}

.summary_container::-webkit-scrollbar-track {
    background: transparent;
}

.summary_container::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 3px;
}

/* Titre du sommaire */
.summary_container::before {
    content: "Sommaire";
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: #0c0039;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Liens du sommaire */
.summary_container a {
    display: block;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

/* Effet hover et focus */
.summary_container a:hover,
.summary_container a:focus {
    color: #0c0039;
    background-color: #f5f5f7;
    border-left-color: #8be9fd;
}

/* Lien actif (correspondant à la section visible) */
.summary_container a.active {
    color: #0c0039;
    font-weight: 500;
    background-color: #ebf8ff;
    border-left-color: #3a7bd5;
}

/* Indentation pour les sous-sections */
.summary_container a.level-2 {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.summary_container a.level-3 {
    padding-left: 2.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Responsive - Cache le sommaire sur petits écrans */
@media (max-width: 1024px) {
    .summary_container {
        display: none;
    }
    
    .post_container {
        margin-left: 0;
    }
}

/* Animation douce pour le scroll */
html {
    scroll-behavior: smooth;
}

/* Styles spécifiques pour la syntax highlighting avec Prism */
.post_container div code[class*="language-"],
.post_container div pre[class*="language-"] {
    text-shadow: none;
    background: #282c34;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #5c6370;
}

.token.punctuation {
    color: #abb2bf;
}

.token.selector,
.token.tag {
    color: #e06c75;
}

.token.property,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.attr-name,
.token.deleted {
    color: #d19a66;
}

.token.string,
.token.char,
.token.attr-value,
.token.builtin,
.token.inserted {
    color: #98c379;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #56b6c2;
}

.token.atrule,
.token.keyword {
    color: #c678dd;
}

.token.function,
.token.class-name {
    color: #61afef;
}

.token.regex,
.token.important,
.token.variable {
    color: #c678dd;
}