/*
Theme Name: Novandex
Theme URI: https://novandex.com
Author: Yorick MAPET
Author URI: https://novandex.com
Description: Thème WordPress premium dark tech pour Novandex — ingénierie, innovation, systèmes. Design élégant et moderne avec mode sombre intégré.
Version: 1.0.0
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: novandex
Tags: dark, portfolio, blog, one-column, custom-menu, featured-images, translation-ready
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
*/

/* ==========================================================================
   NOVANDEX WORDPRESS THEME — Premium Dark Tech
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2236;
    --bg-card: #151d2e;
    --bg-card-hover: #1c2640;

    --accent: #5B7BFF;
    --accent-light: #8BA3FF;
    --accent-dark: #3D5BD6;
    --accent-secondary: #B794F6;
    --accent-glow: rgba(91, 123, 255, 0.15);

    --text-primary: #e8edf5;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(148, 163, 184, 0.1);
    --border-accent: rgba(91, 123, 255, 0.3);

    --font-display: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-width: 1200px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-glow: 0 0 30px rgba(91, 123, 255, 0.1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
p { color: var(--text-secondary); margin-bottom: 1rem; }

/* ---------- Layout ---------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section { padding: 6rem 0; position: relative; }
.section-alt { background: var(--bg-secondary); }

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 2px;
}

.section-header p {
    max-width: 600px;
    margin: 1rem auto 0;
    font-size: 1.1rem;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand .brand-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.navbar-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navbar-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 2px;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width var(--transition-fast);
}

.navbar-links a:hover,
.navbar-links a.active,
.navbar-links .current-menu-item a,
.navbar-links .current_page_item a {
    color: var(--text-primary);
}

.navbar-links a:hover::after,
.navbar-links a.active::after,
.navbar-links .current-menu-item a::after,
.navbar-links .current_page_item a::after {
    width: 100%;
}

/* Mobile menu */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.navbar-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(91, 123, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(183, 148, 246, 0.04) 0%, transparent 60%);
    z-index: 0;
}

.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 1; }
.scroll-indicator span {
    display: block; width: 20px; height: 32px;
    border: 2px solid var(--text-muted);
    border-radius: 10px;
    position: relative;
}
.scroll-indicator span::before {
    content: '';
    position: absolute; top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 6px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; top: 6px; }
    50% { opacity: 0.3; top: 16px; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(91, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(91, 123, 255, 0.4);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-image-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.card-body h3 a { color: var(--text-primary); }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Tags ---------- */
.tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tags-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

/* ---------- Grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

/* ---------- Timeline (Posts) ---------- */
.timeline { position: relative; max-width: 700px; margin: 0 auto; }

.timeline::before {
    content: '';
    position: absolute;
    left: 20px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-secondary), transparent);
}

.timeline-item { position: relative; padding-left: 60px; margin-bottom: 2.5rem; }

.timeline-dot {
    position: absolute; left: 12px; top: 6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent);
    box-shadow: 0 0 15px rgba(91, 123, 255, 0.3);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.timeline-content:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ---------- Video embed ---------- */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.video-container iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ---------- Article Content ---------- */
.article-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.9;
}

.article-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.6rem; }
.article-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.3rem; }
.article-content p { margin-bottom: 1.2rem; color: var(--text-secondary); }
.article-content a { text-decoration: underline; text-underline-offset: 3px; }
.article-content img { border-radius: 8px; margin: 2rem 0; }

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-content pre {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.article-content code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ---------- Page Header ---------- */
.page-header {
    padding: 8rem 0 3rem;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(91, 123, 255, 0.04), transparent);
}

.page-header h1 { position: relative; margin-bottom: 1rem; }
.page-header p { position: relative; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ---------- CTA ---------- */
.cta-section {
    text-align: center;
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%);
}

.cta-section h2, .cta-section p, .cta-section .btn { position: relative; z-index: 1; }
.cta-section p { max-width: 500px; margin: 0 auto 2rem; }

/* ---------- Pagination ---------- */
.pagination-wrapper { display: flex; justify-content: center; margin-top: 3rem; }
.pagination-wrapper .nav-links { display: flex; gap: 0.5rem; }

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.pagination-wrapper .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination-wrapper .page-numbers.current { background: var(--accent); color: white; border-color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

.footer p { font-size: 0.9rem; color: var(--text-muted); }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- WordPress specifics ---------- */
.wp-block-image img { border-radius: 8px; }
.wp-block-quote { border-left: 3px solid var(--accent); padding-left: 1.5rem; }

.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(-50vw + 50%); }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: 8px; }

/* Comments */
.comment-list { list-style: none; padding: 0; }

.comment {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.comment-author { color: var(--text-primary); font-weight: 600; }
.comment-body p { margin-bottom: 0; }

#respond {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

#respond input:focus,
#respond textarea:focus {
    border-color: var(--accent);
}

#respond textarea { min-height: 150px; resize: vertical; }

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .navbar-links {
        display: none;
        position: fixed; inset: 0;
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 999;
    }
    .navbar-links.active { display: flex; }
    .navbar-links a { font-size: 1.3rem; }
    .navbar-toggle { display: flex; z-index: 1001; }
    .navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .navbar-toggle.active span:nth-child(2) { opacity: 0; }
    .navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); letter-spacing: -1px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .container { padding: 0 1.2rem; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .card-image, .card-image-placeholder { height: 180px; }
    .gallery { grid-template-columns: 1fr; }
}
