/*
Theme Name: Kapflow Blog V2 - Addictive
Theme URI: https://kapflow.shop
Author: Kapflow Team
Author URI: https://kapflow.shop
Description: Thème WordPress ultra-captivant pour le blog Kapflow. Animations fluides, effets visuels addictifs, design moderne.
Version: 2.0.0
License: GPL v2 or later
Text Domain: kapflow-blog
Tags: blog, modern, responsive, blue, purple, gradient, animated
*/

/* ========================================
   VARIABLES & BASE STYLES
   ======================================== */
:root {
    --primary-blue: #3B82F6;
    --primary-purple: #8B5CF6;
    --gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-purple);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   READING PROGRESS BAR
   ======================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient);
    z-index: 10000;
    transition: width 0.2s ease;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200%;
    }

    100% {
        background-position: 200%;
    }
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    animation: pulse 3s infinite;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-gray);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    width: 100%;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--primary-blue);
}

.header-cta {
    background: var(--gradient);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.header-cta::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient);
    border-radius: 10px;
    opacity: 0.5;
    filter: blur(8px);
    z-index: -1;
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    color: white !important;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    background: var(--gradient);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s linear infinite;
    pointer-events: none;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

/* ========================================
   ARTICLES / POSTS avec effets addictifs
   ======================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

/* Effet de glow au hover */
.post-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: var(--radius-lg);
    z-index: -1;
    filter: blur(15px);
}

.post-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.post-card:hover::before {
    opacity: 0.4;
}

/* Effet shimmer au hover */
.post-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.post-card:hover::after {
    left: 100%;
    opacity: 1;
}

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1) rotate(2deg);
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    background: var(--gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    animation: pulse 3s infinite;
}

.post-category::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient);
    border-radius: 20px;
    opacity: 0.5;
    filter: blur(6px);
    z-index: -1;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-dark);
    background: linear-gradient(to right, var(--primary-blue), var(--primary-purple));
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.4s ease;
}

.post-title a:hover {
    background-size: 100% 2px;
    color: var(--primary-blue);
}

.post-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Premier article plus grand */
.post-card:first-child {
    grid-column: span 2;
}

.post-card:first-child .post-thumbnail {
    aspect-ratio: 21/9;
}

.post-card:first-child .post-title {
    font-size: 1.75rem;
}

/* ========================================
   SINGLE POST
   ======================================== */
.single-post-header {
    background: var(--gradient);
    padding: 4rem 2rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.single-post-header::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s linear infinite;
}

.single-post-header .post-category {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.single-post-header .post-title {
    font-size: 2.5rem;
    color: white;
    max-width: 800px;
    margin: 1rem auto;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.single-post-content {
    background: var(--bg-white);
    max-width: 800px;
    margin: -2rem auto 3rem;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    position: relative;
    padding-left: 1rem;
}

.single-post-content h2::before,
.single-post-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 1.5rem;
    background: var(--gradient);
    border-radius: 2px;
}

.single-post-content p {
    margin-bottom: 1.5rem;
}

.single-post-content img {
    border-radius: var(--radius);
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.single-post-content img:hover {
    transform: scale(1.02);
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary-blue);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-gray);
    background: rgba(59, 130, 246, 0.05);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

/* ========================================
   STICKY FLOATING SHARE BUTTONS
   ======================================== */
.floating-share {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.floating-share a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: float 3s infinite ease-in-out;
}

.floating-share a:nth-child(2) {
    animation-delay: 0.5s;
}

.floating-share a:nth-child(3) {
    animation-delay: 1s;
}

.floating-share a:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.3s ease;
}

.widget li:hover {
    padding-left: 0.5rem;
}

.newsletter-widget {
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.newsletter-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.newsletter-widget .widget-title {
    color: white;
    -webkit-text-fill-color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.newsletter-widget input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.newsletter-widget input[type="email"]:focus {
    transform: scale(1.02);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-widget button {
    width: 100%;
    background: white;
    color: var(--primary-blue);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-widget button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
    position: relative;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.footer-section li:hover {
    transform: translateX(4px);
}

.footer-section a {
    color: var(--text-light);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-light);
}

/* ========================================
   LOAD MORE BUTTON
   ======================================== */
.pagination .page-numbers {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .content-area {
        grid-template-columns: 1fr;
    }

    .floating-share {
        display: none;
    }

    .post-card:first-child {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .main-navigation ul {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .single-post-header .post-title {
        font-size: 1.75rem;
    }

    .single-post-content {
        padding: 1.5rem;
        margin: -1rem 1rem 2rem;
    }
}