/* ==========================================================================
   Blog Show (Article) Styles - Version complète
   ========================================================================== */

/* Variables */
:root {
    /* Layout & Spacing */
    --header-height: 80px;
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Card & Border Radius */
    --card-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;

    /* Colors */
    --color-primary-600: rgba(112, 28, 245, 0.4);
    --color-bg-dark: #0a0a0f;
    --primary: #701cf5;
    --secondary: #ff0066;
    --dark: #1a1a2e;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --light: #f3f4f6;
    --white: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;

    /* Typography */
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;
    --line-height-tight: 1.1;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 1.75;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;

    /* Transitions */
    --transition-fast: 0.15s;
    --transition-base: 0.25s;
    --transition-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 25px 50px -12px rgba(112, 28, 245, 0.15);
}

/* ==========================================================================
   Container
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Post Hero Section
   ========================================================================== */
.post-hero {
    position: relative;
    padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-12);
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1a1a2e 100%);
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-primary-600) 0%, transparent 60%);
    pointer-events: none;
}

.post-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.02) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

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

/* ==========================================================================
   Post Breadcrumb
   ========================================================================== */
.post-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-6);
    color: rgba(255, 255, 255, 0.6);
}

.post-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast) var(--ease-out);
}

.post-breadcrumb a:hover {
    color: #fff;
}

.post-breadcrumb span:last-child {
    color: #fff;
    font-weight: var(--font-weight-medium);
}

.post-breadcrumb > span:not(:last-child) {
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Post Hero Title
   ========================================================================== */
.post-hero-content h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    color: #fff;
    line-height: var(--line-height-tight);
    margin: 0 0 var(--space-6) 0;
    letter-spacing: var(--letter-spacing-tight);
}

/* ==========================================================================
   Post Hero Meta
   ========================================================================== */
.post-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: var(--space-8);
}

.post-hero-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.post-hero-meta i {
    font-size: 1rem;
    opacity: 0.8;
}

/* ==========================================================================
   Post Tags Hero
   ========================================================================== */
.post-tags-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.post-tag-hero {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    transition: all var(--transition-base) var(--ease-out);
}

.post-tag-hero:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Post Content Section
   ========================================================================== */
.post-content-section {
    padding: var(--space-16) 0;
    background-color: var(--light);
}

/* ==========================================================================
   Post Featured Image
   ========================================================================== */
.post-featured-image {
    margin: 0 auto var(--space-12);
    max-width: 1000px;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   Post Layout (Main + Sidebar)
   ========================================================================== */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-12);
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Post Main Content
   ========================================================================== */
.post-main {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: var(--space-12);
    box-shadow: var(--shadow-sm);
}

.post-content {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-loose);
    color: var(--text-primary);
}

/* Typography dans le contenu */
.post-content h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--dark);
    margin: var(--space-12) 0 var(--space-6) 0;
    line-height: var(--line-height-tight);
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--dark);
    margin: var(--space-10) 0 var(--space-4) 0;
    line-height: var(--line-height-tight);
}

.post-content h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    margin: var(--space-8) 0 var(--space-4) 0;
    line-height: var(--line-height-normal);
}

.post-content p {
    margin: 0 0 var(--space-6) 0;
    color: var(--text-secondary);
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(112, 28, 245, 0.3);
    text-underline-offset: 3px;
    transition: all var(--transition-fast) var(--ease-out);
}

.post-content a:hover {
    color: var(--secondary);
    text-decoration-color: var(--secondary);
}

.post-content ul,
.post-content ol {
    margin: 0 0 var(--space-6) 0;
    padding-left: var(--space-8);
}

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

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

.post-content blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    background: linear-gradient(135deg, rgba(112, 28, 245, 0.05), rgba(255, 0, 102, 0.05));
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius-sm);
    font-style: italic;
    color: var(--dark);
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content code {
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.post-content pre {
    margin: var(--space-6) 0;
    padding: var(--space-6);
    background: var(--color-bg-dark);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: #fff;
    font-size: var(--font-size-sm);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: var(--space-8) 0;
    box-shadow: var(--shadow-md);
}

.post-content hr {
    margin: var(--space-12) 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gray-light), transparent);
}

.post-content table {
    width: 100%;
    margin: var(--space-8) 0;
    border-collapse: collapse;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.post-content th {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-4);
    text-align: left;
    font-weight: var(--font-weight-semibold);
}

.post-content td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--light);
    color: var(--text-secondary);
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   Post Sidebar
   ========================================================================== */
.post-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.post-sidebar-widget {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.post-sidebar-widget h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--dark);
    margin: 0 0 var(--space-6) 0;
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--light);
}

/* ==========================================================================
   Post Share Buttons
   ========================================================================== */
.post-share {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.share-button {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all var(--transition-base) var(--ease-out);
    border: 2px solid transparent;
}

.share-button i {
    font-size: var(--font-size-lg);
}

.share-button.facebook {
    background: #1877f2;
    color: var(--white);
}

.share-button.facebook:hover {
    background: #0c63d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.share-button.twitter {
    background: #1da1f2;
    color: var(--white);
}

.share-button.twitter:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.share-button.linkedin {
    background: #0077b5;
    color: var(--white);
}

.share-button.linkedin:hover {
    background: #005f8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

/* ==========================================================================
   Post Tags Sidebar
   ========================================================================== */
.post-tags-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.post-tag-sidebar {
    padding: 6px 12px;
    background: var(--light);
    border-radius: 50px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--gray);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    transition: all var(--transition-base) var(--ease-out);
    border: 1px solid transparent;
}

.post-tag-sidebar:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(112, 28, 245, 0.1);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 28px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base) var(--ease-out);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(112, 28, 245, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(112, 28, 245, 0.4);
}

.btn i {
    font-size: var(--font-size-lg);
}

/* ==========================================================================
   Font Awesome Icons (Fallback si non chargé)
   ========================================================================== */
.fa,
.far,
.fas,
.fab {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* ==========================================================================
   Accessibilité (Focus States)
   ========================================================================== */
.post-breadcrumb a:focus-visible,
.post-tag-hero:focus-visible,
.post-tag-sidebar:focus-visible,
.share-button:focus-visible,
.btn:focus-visible,
.post-content a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1140px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .post-hero-content h1 {
        font-size: var(--font-size-3xl);
    }
}

/* Tablette Landscape */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr 280px;
        gap: var(--space-8);
    }
}

/* Tablette Portrait */
@media (max-width: 968px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-6);
    }

    .post-hero {
        padding: calc(var(--header-height) + 3rem) 0 3rem;
    }

    .post-hero-content h1 {
        font-size: var(--font-size-2xl);
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .post-hero-meta {
        gap: var(--space-4);
        font-size: 0.8rem;
    }

    .post-content {
        font-size: var(--font-size-base);
    }

    .post-content h2 {
        font-size: var(--font-size-2xl);
    }

    .post-content h3 {
        font-size: var(--font-size-xl);
    }
}

/* Mobile Medium */
@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }

    .post-content-section {
        padding: var(--space-10) 0;
    }

    .post-main {
        padding: var(--space-6);
    }

    .post-sidebar-widget {
        padding: var(--space-6);
    }

    .post-hero {
        padding: calc(var(--header-height) + 2rem) 0 2rem;
    }

    .post-hero-content h1 {
        font-size: var(--font-size-xl);
    }

    .post-breadcrumb {
        flex-wrap: wrap;
        font-size: 0.75rem;
    }

    .post-hero-meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .post-tags-hero {
        gap: var(--space-2);
    }

    .post-tag-hero {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .post-featured-image {
        margin-bottom: var(--space-8);
        border-radius: var(--border-radius-md);
    }
}

/* Mobile Small */
@media (max-width: 375px) {
    .post-hero-content h1 {
        font-size: var(--font-size-lg);
    }

    .post-main {
        padding: var(--space-4);
    }

    .post-content h2 {
        font-size: var(--font-size-xl);
    }

    .post-content h3 {
        font-size: var(--font-size-lg);
    }

    .post-content pre {
        padding: var(--space-4);
        font-size: 0.75rem;
    }
}