/* Modern Cybersecurity Theme - Matrix Style */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Share+Tech+Mono&display=swap');

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1f2937;
    --text-primary: #00ff41;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #00ff41;
    --accent-hover: #00cc33;
    --accent-glow: rgba(0, 255, 65, 0.3);
    --border: #30363d;
    --border-accent: #00aa2e;
    --code-bg: #0d1520;
    --quote-bg: #0a0e14;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fira Code', 'Share Tech Mono', 'Courier New', monospace;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0a0e14 100%);
    font-size: 16px;
    letter-spacing: 0.3px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header and Navigation */
header {
    background: var(--bg-secondary);
    border-bottom: 3px solid var(--accent);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header h1 {
    margin: 0;
    padding: 1rem 0;
}

header h1 a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--accent-glow);
    transition: all 0.3s ease;
    display: inline-block;
}

header h1 a:hover {
    color: #ffffff;
    text-shadow: 0 0 30px var(--accent), 0 0 40px var(--accent);
    transform: scale(1.02);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    margin-top: 1rem;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0;
    padding: 0;
}

nav ul li a {
    display: block;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--border);
    border-right: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav ul li:last-child a {
    border-right: 1px solid var(--border);
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    transition: left 0.5s ease;
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 300px);
}

/* Hero Section */
.hero {
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.15);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent), transparent, var(--accent));
    border-radius: 12px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--accent-glow);
    font-weight: 600;
}

.hero h2::before {
    content: "▶ ";
    color: var(--accent);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Posts List */
.posts-list h2,
.blog-page h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    padding: 0.8rem 1.5rem;
    background: var(--bg-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.posts-list h2::before,
.blog-page h2::before {
    content: "// ";
    color: var(--text-secondary);
    font-weight: normal;
}

.post-preview {
    background: var(--bg-secondary);
    padding: 1.8rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.post-preview:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(0, 255, 65, 0.2);
}

.post-preview h3 {
    margin-bottom: 0.8rem;
}

.post-preview h3::before {
    content: "◆ ";
    color: var(--accent);
    font-size: 0.9em;
}

.post-preview h3 a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-preview h3 a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px var(--accent-glow);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta::before {
    content: "📅";
    font-size: 1rem;
}

.post-meta time {
    font-style: italic;
}

.post-excerpt {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.read-more::after {
    content: "→";
    transition: transform 0.3s ease;
}

.read-more:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* Single Post */
.post {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-accent);
    padding-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.1);
}

.post-title {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 0 20px var(--accent-glow);
}

.post-title::before {
    content: "# ";
    color: var(--text-secondary);
    font-weight: normal;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-content h2 {
    font-size: 1.7rem;
    color: var(--accent);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.post-content h2::before {
    content: "## ";
    color: var(--text-muted);
    font-weight: normal;
}

.post-content h3 {
    font-size: 1.4rem;
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h3::before {
    content: "### ";
    color: var(--text-muted);
    font-weight: normal;
}

.post-content p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.post-content li::marker {
    color: var(--accent);
}

.post-content code {
    background-color: var(--code-bg);
    color: var(--accent);
    padding: 3px 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 500;
}

.post-content pre {
    background-color: #000000;
    color: var(--text-secondary);
    padding: 1.5rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.2);
    position: relative;
}

.post-content pre::before {
    content: '[ CODE ]';
    position: absolute;
    top: -1px;
    left: -1px;
    padding: 0.3rem 0.8rem;
    background: var(--accent);
    color: #000000;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px 0 6px 0;
    letter-spacing: 1px;
}

.post-content pre code {
    background-color: transparent !important;
    padding: 0 !important;
    color: inherit !important;
    border: none !important;
    font-size: 0.95em;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin-left: 0;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    background: var(--quote-bg);
    padding: 1.2rem 1.2rem 1.2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.post-content blockquote::before {
    content: "💬 ";
    font-style: normal;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 255, 65, 0.2);
}

.post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.post-tags strong {
    color: var(--accent);
    font-size: 1.1rem;
}

.tag {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-size: 0.85rem;
    margin-right: 0.8rem;
    margin-top: 0.8rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tag:hover {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
    transform: translateY(-2px);
}

.tag::before {
    content: "#";
    margin-right: 0.2rem;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    flex-wrap: wrap;
}

.post-navigation a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent);
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.post-navigation a:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.post-navigation .prev::before {
    content: "←";
}

.post-navigation .next {
    margin-left: auto;
}

.post-navigation .next::after {
    content: "→";
}

/* Buttons */
.button,
.view-all a {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--accent);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.button:hover,
.view-all a:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.view-all {
    text-align: center;
    margin-top: 3rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 3px solid var(--accent);
    box-shadow: 0 -4px 20px rgba(0, 255, 65, 0.1);
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Link Styles */
a {
    color: var(--accent);
    transition: all 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-preview,
.hero,
.post {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    header h1 a {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .hero {
        padding: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post {
        padding: 1.5rem;
    }
    
    .post-content h2 {
        font-size: 1.4rem;
    }
    
    .post-content h3 {
        font-size: 1.2rem;
    }
    
    nav ul {
        gap: 0;
        justify-content: center;
    }
    
    nav ul li a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-navigation .next {
        margin-left: 0;
    }
    
    .posts-list h2,
    .blog-page h2 {
        font-size: 1.4rem;
    }
    
    .post-preview h3 a {
        font-size: 1.2rem;
    }
}

/* Syntax Highlighting - Rouge Theme (High Contrast Matrix Style) */
.highlight {
    background: #000000 !important;
    border-radius: 8px;
    padding: 0;
    overflow-x: auto;
    border: 2px solid var(--accent);
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.2);
}

.highlight pre {
    margin: 0;
    padding: 1.5rem;
    background: transparent !important;
}

.highlight code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #ffffff !important;
}

/* Token colors - HIGH CONTRAST */
.highlight .c { color: #888888; font-style: italic; }  /* Comment */
.highlight .err { color: #ff3333; font-weight: bold; }  /* Error */
.highlight .k { color: #00ff00; font-weight: bold; }  /* Keyword - VERT FLUO */
.highlight .o { color: #00ffff; }  /* Operator - CYAN */

.highlight .cm { color: #888888; font-style: italic; }  /* Comment.Multiline */
.highlight .cp { color: #ff00ff; font-weight: bold; }  /* Comment.Preproc - MAGENTA */
.highlight .c1 { color: #888888; font-style: italic; }  /* Comment.Single */
.highlight .cs { color: #888888; font-style: italic; }  /* Comment.Special */

.highlight .gd { color: #ff3333; }  /* Generic.Deleted */
.highlight .ge { font-style: italic; }  /* Generic.Emph */
.highlight .gr { color: #ff3333; }  /* Generic.Error */
.highlight .gh { color: #00ff00; font-weight: bold; }  /* Generic.Heading */
.highlight .gi { color: #00ff00; }  /* Generic.Inserted */
.highlight .go { color: #aaaaaa; }  /* Generic.Output */
.highlight .gp { color: #00ff00; font-weight: bold; }  /* Generic.Prompt */
.highlight .gs { font-weight: bold; }  /* Generic.Strong */
.highlight .gu { color: #00ffff; font-weight: bold; }  /* Generic.Subheading */
.highlight .gt { color: #ff3333; }  /* Generic.Traceback */

.highlight .kc { color: #ffff00; font-weight: bold; }  /* Keyword.Constant - JAUNE */
.highlight .kd { color: #00ff00; font-weight: bold; }  /* Keyword.Declaration */
.highlight .kn { color: #00ffff; font-weight: bold; }  /* Keyword.Namespace */
.highlight .kp { color: #00ff00; font-weight: bold; }  /* Keyword.Pseudo */
.highlight .kr { color: #00ff00; font-weight: bold; }  /* Keyword.Reserved */
.highlight .kt { color: #ffff00; font-weight: bold; }  /* Keyword.Type */

.highlight .m { color: #ff9900; }  /* Literal.Number - ORANGE */
.highlight .s { color: #00ccff; }  /* Literal.String - BLEU CLAIR */

.highlight .na { color: #00ffff; }  /* Name.Attribute */
.highlight .nb { color: #ffaa00; }  /* Name.Builtin */
.highlight .nc { color: #ffff00; font-weight: bold; }  /* Name.Class */
.highlight .no { color: #ffaa00; }  /* Name.Constant */
.highlight .nd { color: #00ffff; }  /* Name.Decorator */
.highlight .ni { color: #ffaa00; }  /* Name.Entity */
.highlight .ne { color: #ffaa00; font-weight: bold; }  /* Name.Exception */
.highlight .nf { color: #00ff00; font-weight: bold; }  /* Name.Function - VERT */
.highlight .nl { color: #00ffff; }  /* Name.Label */
.highlight .nn { color: #ffaa00; }  /* Name.Namespace */
.highlight .nt { color: #00ff00; }  /* Name.Tag */
.highlight .nv { color: #00ccff; }  /* Name.Variable */

.highlight .ow { color: #00ffff; font-weight: bold; }  /* Operator.Word */
.highlight .w { color: #555555; }  /* Text.Whitespace */

.highlight .mf { color: #ff9900; }  /* Literal.Number.Float */
.highlight .mh { color: #ff9900; }  /* Literal.Number.Hex */
.highlight .mi { color: #ff9900; }  /* Literal.Number.Integer */
.highlight .mo { color: #ff9900; }  /* Literal.Number.Oct */

.highlight .sb { color: #00ccff; }  /* Literal.String.Backtick */
.highlight .sc { color: #00ccff; }  /* Literal.String.Char */
.highlight .sd { color: #888888; font-style: italic; }  /* Literal.String.Doc */
.highlight .s2 { color: #00ccff; }  /* Literal.String.Double */
.highlight .se { color: #ff9900; }  /* Literal.String.Escape */
.highlight .sh { color: #00ccff; }  /* Literal.String.Heredoc */
.highlight .si { color: #00ccff; }  /* Literal.String.Interpol */
.highlight .sx { color: #00ccff; }  /* Literal.String.Other */
.highlight .sr { color: #00ccff; }  /* Literal.String.Regex */
.highlight .s1 { color: #00ccff; }  /* Literal.String.Single */
.highlight .ss { color: #00ccff; }  /* Literal.String.Symbol */

.highlight .bp { color: #ffaa00; }  /* Name.Builtin.Pseudo */
.highlight .vc { color: #00ccff; }  /* Name.Variable.Class */
.highlight .vg { color: #00ccff; }  /* Name.Variable.Global */
.highlight .vi { color: #00ccff; }  /* Name.Variable.Instance */
.highlight .il { color: #ff9900; }  /* Literal.Number.Integer.Long */

/* Assembly specific - HIGH CONTRAST */
.highlight .n { color: #ffffff; }  /* Name (registers, labels) - BLANC */
.highlight .p { color: #cccccc; }  /* Punctuation */

/* Instructions ASM */
.highlight .ni { color: #00ff00; font-weight: bold; }  /* Instructions */

/* Line numbers */
.highlight .lineno {
    color: #666666;
    background: #111111;
    border-right: 2px solid var(--accent);
    padding: 0 0.8rem;
    margin-right: 0.8rem;
    user-select: none;
    display: inline-block;
    text-align: right;
    min-width: 2.5rem;
}

/* Surcharge pour être sûr que ça marche */
div.highlight pre,
figure.highlight pre,
.post-content .highlight pre {
    background: #000000 !important;
}

div.highlight,
figure.highlight,
.post-content .highlight {
    background: #000000 !important;
    border: 2px solid var(--accent) !important;
}
