/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Linux+Libertine:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* Variables */
:root {
    --content-width: 900px;
    --link-color: #0000CC;
    --link-hover: #000000;
    --toc-background: #f8f9fa;
    --sidebar-width: 350px;
}


.navbar {
    background-color: #FFF;
    flex-direction: column;
    padding-top: 2rem;
}

.navbar-brand {
    display: none;
}

.navbar::before {
    content: "Les Ruches";
    font-family: "Linux Libertine", serif;
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 1.5rem;
}

.navbar::after {
    content: "🐝";
    font-size: 1rem;
    position: absolute;
    top: 1.7rem;
    margin-left: 0.8rem;
    transform: translateX(90px);
}

.navbar > .container-fluid {
    justify-content: center;
}

.navbar-nav-scroll {
    --bs-scroll-height: 100vh;
}

.navbar-nav {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--link-color) !important;
    position: relative;
    transition: color 0.3s;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--link-hover) !important;
    text-decoration: none;
}

.nav-link.active {
    color: #000 !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 1px;
    background-color: #DEDEDE
}

.navbar-nav .nav-item:has(a[href="#"]) {
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
    margin: 0 0.5rem;
}

/* Title */
.navbar-title {
    font-family: "Linux Libertine", serif;
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    margin: 0;
    display: inline-block;
    position: relative;
}

.navbar-title::after {
    content: "🐝";
    font-size: 1.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Base */
body {
    font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
    line-height: 1.6;
    color: #222;
    margin: 0;
    padding: 0;
    background: white;
    max-width: 1400px;
    margin: 0 auto;
}

/* Layout */
.page-columns {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
    gap: 1rem;
    margin: 0 auto;
    max-width: calc(var(--content-width) + var(--sidebar-width) + 1rem);
}

.content {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

#quarto-margin-sidebar {
    padding: 1rem;
}

#quarto-document-content {
    padding: 1rem 2rem;
    min-width: 0;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
    color: #000;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h1, h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.2em;
}

/* Links */
a {
    color: #0000CC;
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* TOC */
#TOC {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.toc-active {
    color: var(--link-hover);
}
#TOC a {
    font-size: 0.7rem;
    color: #0000CC;
}


/* TOC styles */
.sidebar-tools-main, .toc {
    background-color: #000 !important;
}

.toc-content {
    color: #ffc107 !important;
}

.toc a {
    color: #ffc107 !important;
}

.toc a:hover {
    color: #fff !important;
}

/* Tables */
table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 0.5em;
}

th {
    background-color: var(--toc-background);
}

/* Code blocks */
pre {
    background-color: var(--toc-background);
    border: 1px solid var(--border-color);
    padding: 1em;
    overflow-x: auto;
}

/* Blockquotes */
.quote-wrapper {
    position: relative;
    padding-right: 40px; /* Espace pour les boutons */
}

blockquote {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0; /* Reset la marge par défaut */
    background-color: #000;
    padding:3em;
    color: #ffc107 !important;

}

blockquote p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.6;
    font-weight: 500;
}

blockquote a {
    color: #FFF !important;
    font-size: 0.7em;
    padding-top: 2em;
    float: right;
}

.share-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.share-button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #333;
    color: #ffc107  !important;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.2s;
}

.share-button:hover {
    transform: scale(1.1);
}



/* Links Section */
.links-section {
    margin-top: 1rem;
    line-height: 2;
}

.links-section a {
    color: #666;
    text-decoration: none;
}

.links-section a:hover {
    color: #000;
    text-decoration: underline;
}

/* Info Section */
.info-section {
    font-family: 'Arial', monospace;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.info-section p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    font-family: 'Arial', monospace;
}

.info-section hr {
    margin: 0.5rem 0;
    border-color: #ddd;
}

/* Version Info */
.version-info {
    font-size: 0.85em;
    color: #666;
    margin-top: -1em;
    margin-bottom: 2em;
    font-family: 'Arial', monospace;
}

/* Sidebar */
.sidebar {
    background-color: initial;
}

.sidebar-item-container {
    color: initial;
}

.sidebar-item-container a {
    color: initial;
}

.sidebar-item-container a:hover {
    color: initial;
}

/* Footer */
.footer {
    font-size: 0.9rem;

    padding: 1rem;
    margin-bottom: 1rem;
}

.footer-content {
    margin: 0 auto;
    padding: 0 1rem;
}

.footer a {
    color: #0000CC!important;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-nav .nav-item:has(a[href="#"]) {
        display: none;
    }
    
    .page-columns {
        display: grid;
        gap: 0;
        grid-template-columns: 100%;
    }
    
    .content {
        padding: 1rem;
    }
}

@media (max-width: 1200px) {
    .page-columns {
        grid-template-columns: 1fr;
    }
    
    .content {
        width: 95%;
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .content {
        width: 100%;
        padding: 0 5px;
    }
}
