/* ===========================================
   Blog Gestionnel - Styles
   =========================================== */

:root {
    --primary: #1a2e4c;
    --primary-light: #2d4a6f;
    --primary-dark: #0f1d30;
    --accent: #e8b923;
    --accent-light: #f5d45a;
    --text: #1a2e4c;
    --text-light: #5a6d82;
    --bg: #f4f6f9;
    --bg-alt: #eaeff5;
    --white: #fff;
    --border: #d4dbe5;
    --success: #22c55e;
    --info: #3b82f6;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 2px 8px rgba(26,46,76,.08);
    --shadow-md: 0 8px 30px rgba(26,46,76,.12);
    --shadow-lg: 0 20px 60px rgba(26,46,76,.18);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.blog-header {
    background: var(--primary);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-text span {
    color: var(--accent);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    margin-left: 0.5rem;
}

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

.nav-links a {
    color: rgba(255,255,255,.8);
    font-weight: 500;
    font-size: .95rem;
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.1);
    border-radius: 50px;
    padding: 0.5rem 1rem;
}

.search-box input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 200px;
    font-size: 0.9rem;
}

.search-box input::placeholder {
    color: rgba(255,255,255,.5);
}

.search-box button {
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    cursor: pointer;
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
}

.blog-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Tabs */
.categories-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.category-tab:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-tab.active {
    border-color: var(--accent);
    background: rgba(232, 185, 35, 0.1);
}

.category-tab i {
    font-size: 1.5rem;
}

.category-tab.admin i {
    color: var(--accent);
}

.category-tab.user i {
    color: var(--info);
}

.category-tab-content h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.category-tab-content span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Main Content */
.blog-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Video Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Video Card */
.video-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-alt);
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-thumbnail .play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-category-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.video-category-badge.administration {
    background: var(--accent);
    color: var(--primary);
}

.video-category-badge.utilisation {
    background: var(--info);
    color: #fff;
}

.video-info {
    padding: 1.25rem;
}

.video-info h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Video Player Page */
.video-player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.video-player-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.video-main {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-player {
    aspect-ratio: 16/9;
    background: #000;
}

.video-player video,
.video-player iframe {
    width: 100%;
    height: 100%;
}

.video-details {
    padding: 1.5rem;
}

.video-details h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.video-description {
    color: var(--text);
    line-height: 1.8;
}

/* Sidebar */
.video-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-section h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.related-video {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.related-video:last-child {
    border-bottom: none;
}

.related-video-thumb {
    width: 120px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-xs);
    overflow: hidden;
    flex-shrink: 0;
}

.related-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-video-info h4 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-info span {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Footer */
.blog-footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.blog-footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.blog-footer a {
    color: var(--accent);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-accent {
    background: var(--accent);
    color: var(--primary);
}

.btn-accent:hover {
    background: var(--accent-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .video-player-wrapper {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
}

@media (max-width: 768px) {
    .categories-tabs {
        flex-direction: column;
        padding: 1rem;
    }
    
    .category-tab {
        width: 100%;
        justify-content: center;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        display: none;
    }
    
    .blog-hero h1 {
        font-size: 1.75rem;
    }
}
