/* ===== MENSAFLOW PRODESIGN01 - CSS PRINCIPAL ===== */

/* Variables CSS globales */
:root {
    /* Couleurs principales Mensaflow */
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --accent-blue: #60a5fa;
    --dark-blue: #1e3a8a;
    --navy-blue: #1e293b;

    /* Backgrounds sombres */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-overlay: rgba(15, 23, 42, 0.9);

    /* Textes */
    --text-primary: #ffffff;
    --text-secondary: #444;
    --text-muted: #94a3b8;
    --text-accent: #60a5fa;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);

    /* Effets */
    --shadow-primary: 0 10px 30px rgba(30, 64, 175, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;

    /* Tailles */
    --navbar-height: 80px;
    --container-max: 1400px;
}

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

body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
}

/* Container principal */
.container,
.container-fluid {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* NAVBAR MODERNE */
.navbar-mensaflow {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    box-shadow: var(--shadow-card);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    padding: 0;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.navbar-nav a:hover {
    color: var(--text-primary);
    background: rgba(96, 165, 250, 0.1);
}

/* HERO SECTIONS */
.hero-section {
    background: var(--gradient-hero);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* CARTES PRINCIPALES */
.card-mensaflow {
    background: var(--bg-card);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-mensaflow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-mensaflow:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
    border-color: var(--accent-blue);
}

.card-mensaflow:hover::before {
    transform: scaleX(1);
}

/* SECTIONS PRINCIPALES */
.section-mensaflow {
    padding: 4rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* GRILLES RESPONSIVES */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* BOUTONS */
.btn-mensaflow {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-mensaflow:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
}

/* TYPOGRAPHIE */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
color: #444;
font-size: 1.2rem;
}
a {
    color: var(--text-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-primary);
}

/* BLOG STYLING */
.blog-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.blog-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(96, 165, 250, 0.1);
    transition: all 0.3s ease;
}

.blog-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

.blog-title {
    color: var(--accent-blue);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
}

.blog-meta {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* POST STYLING */
.post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.post-title {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.post-meta {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.post-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--border-radius);
    line-height: 1.8;
}

.post-content h2 {
    color: var(--accent-blue);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(96, 165, 250, 0.2);
}

.post-content h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
}

.post-content code {
    background: var(--bg-primary);
    color: var(--accent-blue);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.post-content pre {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    border-left: 4px solid var(--accent-blue);
}

/* FOOTER */
.footer-mensaflow {
    background: var(--bg-primary);
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    :root {
        --navbar-height: 70px;
    }

    .navbar-nav {
        display: none; /* Simplified mobile version */
    }

    .hero-section {
        padding: 4rem 0 2rem;
    }

    .section-mensaflow {
        padding: 2rem 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-mensaflow {
        padding: 1.5rem;
    }

    .post-content {
        padding: 2rem 1.5rem;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* OVERRIDES BLUDIT */
.navbar.navbar-light.bg-light.sticky-top {
    display: none !important;
}

/* Form styling */
.form-control {
    background: var(--bg-card) !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius) !important;
}

.form-control:focus {
    background: var(--bg-card) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25) !important;
}

/* Badge styling */
.badge {
    background: var(--gradient-primary) !important;
    color: var(--text-primary) !important;
}
