.btn-secondary {
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Round share links: fixed box + centered icon (avoids flex stretch / line-height squashing MDI) */
.blog-share-buttons a {
    line-height: 1;
}

.blog-share-buttons a .mdi {
    line-height: 1;
    display: block;
}

/*
 * Article body: Quill HTML + Tailwind Preflight.
 * ql-editor picks up list/indent/align from quill.core.css; overrides below restore typography.
 */
article.quill-content.ql-editor {
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    max-height: none;
    outline: none;
    overflow: visible;
    padding: 0;
    font-family: inherit;
    font-size: 1.125rem;
    line-height: 1.8;
    white-space: normal;
    text-align: inherit;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    color: #374151;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

/*
 * Long-form typography inspired by Le Monde (serif, ~18px, muted ink).
 * Uses Noto Serif (OFL) + Georgia / Droid Serif fallbacks — not TheAntiqua B (commercial).
 */
article.quill-content.ql-editor.blog-article-prose {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-family: "Noto Serif", Georgia, "Droid Serif", serif;
    color: rgb(56, 63, 78);
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0;
}

article.quill-content.ql-editor.blog-article-prose h1,
article.quill-content.ql-editor.blog-article-prose h2,
article.quill-content.ql-editor.blog-article-prose h3,
article.quill-content.ql-editor.blog-article-prose h4,
article.quill-content.ql-editor.blog-article-prose h5,
article.quill-content.ql-editor.blog-article-prose h6 {
    font-family: "Noto Serif", Georgia, "Droid Serif", serif;
    font-weight: 700;
    color: rgb(31, 36, 48);
    letter-spacing: -0.02em;
}

article.quill-content.ql-editor.blog-article-prose strong,
article.quill-content.ql-editor.blog-article-prose b {
    font-weight: 700;
}

article.quill-content.ql-editor.blog-article-prose pre,
article.quill-content.ql-editor.blog-article-prose code {
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
    font-weight: 400;
}

article.quill-content.ql-editor.blog-article-prose code {
    font-size: 0.92em;
}

article.quill-content.ql-editor.blog-article-prose a {
    color: rgb(52, 78, 140);
}

article.quill-content.ql-editor.blog-article-prose a:hover {
    color: rgb(38, 58, 115);
}

article.quill-content.ql-editor.blog-article-prose:lang(fr),
article.quill-content.ql-editor.blog-article-prose:lang(en) {
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

article.quill-content.ql-editor > * {
    cursor: auto;
}

article.quill-content.ql-editor p,
article.quill-content.ql-editor h1,
article.quill-content.ql-editor h2,
article.quill-content.ql-editor h3,
article.quill-content.ql-editor h4,
article.quill-content.ql-editor h5,
article.quill-content.ql-editor h6 {
    margin-top: 0;
    margin-bottom: 1.125rem;
}

article.quill-content.ql-editor h1,
article.quill-content.ql-editor h2,
article.quill-content.ql-editor h3,
article.quill-content.ql-editor h4,
article.quill-content.ql-editor h5,
article.quill-content.ql-editor h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    letter-spacing: -0.02em;
}

article.quill-content.ql-editor h1 {
    font-size: 2.25rem;
}
article.quill-content.ql-editor h2 {
    font-size: 1.625rem;
    margin-bottom: 0.75rem;
}
article.quill-content.ql-editor * + h2 {
    margin-top: 2.25rem;
}
article.quill-content.ql-editor h3 {
    font-size: 1.3125rem;
    margin-top: 1.75rem;
    margin-bottom: 0.625rem;
}
article.quill-content.ql-editor h3:first-child {
    margin-top: 0;
}
article.quill-content.ql-editor h4 {
    font-size: 1.1875rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
article.quill-content.ql-editor h4:first-child {
    margin-top: 0;
}
article.quill-content.ql-editor h5 {
    font-size: 1.0625rem;
}
article.quill-content.ql-editor h6 {
    font-size: 1rem;
}

article.quill-content.ql-editor > *:first-child {
    margin-top: 0;
}

/*
 * Quill v2 uses <ol> for bullet and ordered lists (li[data-list]).
 * Those <ol> were not covered by our ul / plain-ol rules, so they kept margin:0 from quill.core.css
 * while <p> kept a large margin-bottom — causing a big gap before lists and almost none after.
 */
article.quill-content.ql-editor ol:has(> li[data-list]) {
    list-style-type: none;
    margin: 0 0 1.25rem;
    padding-left: 1.5em;
}

article.quill-content.ql-editor p:has(+ ol),
article.quill-content.ql-editor p:has(+ ul) {
    margin-bottom: 0.5rem;
}

article.quill-content.ql-editor ol + p,
article.quill-content.ql-editor ul + p {
    margin-top: 1.25rem;
}

article.quill-content.ql-editor h2:has(+ ol),
article.quill-content.ql-editor h2:has(+ ul),
article.quill-content.ql-editor h3:has(+ ol),
article.quill-content.ql-editor h3:has(+ ul),
article.quill-content.ql-editor h4:has(+ ol),
article.quill-content.ql-editor h4:has(+ ul) {
    margin-bottom: 0.5rem;
}

article.quill-content.ql-editor ol + h2,
article.quill-content.ql-editor ol + h3,
article.quill-content.ql-editor ul + h2,
article.quill-content.ql-editor ul + h3 {
    margin-top: 1.5rem;
}

article.quill-content.ql-editor li[data-list] {
    line-height: 1.65;
    margin-bottom: 0.4em;
}

article.quill-content.ql-editor li[data-list]:last-child {
    margin-bottom: 0;
}

article.quill-content.ql-editor ul > li,
article.quill-content.ql-editor ol:not(:has(> li[data-list])) > li {
    line-height: 1.65;
    margin-bottom: 0.35em;
}

article.quill-content.ql-editor ul > li:last-child,
article.quill-content.ql-editor ol:not(:has(> li[data-list])) > li:last-child {
    margin-bottom: 0;
}

article.quill-content.ql-editor li > p {
    margin-bottom: 0.5rem;
}

article.quill-content.ql-editor li > p:last-child {
    margin-bottom: 0;
}

article.quill-content.ql-editor strong,
article.quill-content.ql-editor b {
    font-weight: 700;
}

article.quill-content.ql-editor em,
article.quill-content.ql-editor i {
    font-style: italic;
}

article.quill-content.ql-editor u {
    text-decoration: underline;
}

article.quill-content.ql-editor s,
article.quill-content.ql-editor strike {
    text-decoration: line-through;
}

article.quill-content.ql-editor ul {
    list-style-type: disc;
    list-style-position: outside;
    margin: 0 0 1.25rem;
    padding-left: 1.5em;
}

article.quill-content.ql-editor ul ul {
    list-style-type: circle;
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

article.quill-content.ql-editor ul ul ul {
    list-style-type: square;
}

article.quill-content.ql-editor ol:not(:has(li[data-list])) {
    list-style-type: decimal;
    list-style-position: outside;
    margin: 0 0 1.25rem;
    padding-left: 1.5em;
}

article.quill-content.ql-editor ol:not(:has(li[data-list])) ol {
    list-style-type: lower-alpha;
}

article.quill-content.ql-editor pre,
article.quill-content.ql-editor pre.ql-syntax {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.5;
    color: #1f2937;
    background: #f3f4f6;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

article.quill-content.ql-editor code {
    font-size: 0.9em;
    padding: 0.125rem 0.375rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
}

article.quill-content.ql-editor pre code {
    padding: 0;
    background: transparent;
    border-radius: 0;
}

article.quill-content.ql-editor table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    font-size: 0.95em;
}

article.quill-content.ql-editor th,
article.quill-content.ql-editor td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

article.quill-content.ql-editor th {
    background: #f9fafb;
    font-weight: 600;
}

article.quill-content.ql-editor blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
    line-height: 1.75;
    font-size: 1.05em;
}

article.quill-content.ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

article.quill-content.ql-editor a {
    color: #4559c9;
    text-decoration: underline;
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.2em;
}

article.quill-content.ql-editor a:hover {
    color: var(--secondary-color);
}

article.quill-content.ql-editor li[data-list="bullet"]:not(:has(.ql-ui))::before {
    content: "\2022";
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    margin-right: 0.35em;
}

article.quill-content.ql-editor li[data-list="ordered"]:not(:has(.ql-ui)) {
    list-style-type: decimal;
    list-style-position: outside;
}

/* Image Overlay Styles */
.image-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease-out;
}

.overlay-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.overlay-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
}

.overlay-close:hover {
    background: white;
    transform: scale(1.1);
}

.clickable-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .overlay-content {
        max-width: 95%;
        max-height: 95%;
    }

    .overlay-close {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}
