/**
 * ActusWord.com - Styles principaux
 * Design moderne, responsive et optimisé pour la performance
 */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Design Moderne */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80px;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 30px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Navigation moderne */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-item.active .nav-link,
.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-link:hover::before,
.nav-item.active .nav-link::before,
.nav-link.active::before {
    width: 70%;
}

.nav-icon {
    font-size: 18px;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-item.has-mega-menu:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Mega Menu Moderne */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    min-width: 600px;
    max-width: 800px;
    opacity: 0;
    visibility: hidden;
    margin-top: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.nav-item.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 10px;
}

.mega-menu-content {
    padding: 30px;
}

.mega-menu-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.mega-menu-header h3 {
    font-size: 22px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mega-menu-header p {
    color: var(--text-light);
    font-size: 14px;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mega-menu-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.mega-item-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.mega-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-item-content strong {
    color: var(--text-color);
    font-size: 15px;
}

.mega-item-content small {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-toggle,
.mobile-menu-toggle {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 12px;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Barre de recherche moderne */
.search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-bar form {
    flex: 1;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 4px 4px 4px 20px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-icon {
    color: var(--text-light);
    margin-right: 12px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-color);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.search-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-close {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-close:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: rotate(90deg);
}

/* Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 40px;
    border-radius: 12px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero .lead {
    font-size: 20px;
    opacity: 0.95;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.article-card {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.article-title {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-title a {
    color: var(--text-color);
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 15px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Article Full Page */
.article-page {
    max-width: 800px;
    margin: 40px auto;
}

.article-full {
    background: var(--bg-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.article-header h1 {
    font-size: 36px;
    line-height: 1.2;
    margin: 20px 0;
}

.article-chapeau {
    font-size: 20px;
    color: var(--text-light);
    margin: 20px 0;
    font-weight: 500;
}

.article-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.article-featured-image {
    margin: 30px 0;
}

.article-featured-image img {
    width: 100%;
    border-radius: 8px;
}

.article-featured-image figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    margin: 30px 0;
}

.article-body h2 {
    font-size: 28px;
    margin: 30px 0 15px;
}

.article-body h3 {
    font-size: 24px;
    margin: 25px 0 12px;
}

.article-body p {
    margin: 15px 0;
}

.article-body ul,
.article-body ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-body li {
    margin: 8px 0;
}

.article-body img {
    margin: 20px 0;
    border-radius: 8px;
}

.article-tags {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.article-tags .tag {
    display: inline-block;
    background: white;
    padding: 6px 12px;
    margin: 4px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

/* Related Articles */
.related-articles {
    margin: 60px 0;
}

.related-articles h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.article-card-small {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-card-small img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.article-card-small .article-content {
    padding: 15px;
}

.article-card-small h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 20px 0;
    font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    margin-right: 8px;
    color: var(--text-light);
}

.breadcrumb-item.active {
    color: var(--text-light);
}

/* Pagination */
.pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 8px;
}

.page-item {
    border-radius: 6px;
}

.page-link {
    display: block;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Category Page */
.category-header {
    text-align: center;
    margin: 40px 0;
}

.category-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.category-description {
    font-size: 18px;
    color: var(--text-light);
}

.subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
}

.subcategory-link {
    padding: 10px 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.subcategory-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.site-footer {
    background: var(--text-color);
    color: white;
    margin-top: 80px;
    padding: 60px 0 30px;
}

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

.footer-column h3,
.footer-column h4 {
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin: 10px 0;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-column a:hover {
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
}

.newsletter-form button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.powered-by {
    margin-top: 10px;
}

.powered-by a {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .mega-menu {
        min-width: 500px;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: auto;
        min-height: 70px;
    }
    
    .header-top {
        padding: 12px 0;
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 0 0 auto;
    }
    
    .logo img {
        height: 40px;
        max-width: 150px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 80px 0 20px;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        width: 100%;
        padding: 16px 20px;
        border-radius: 0;
        justify-content: space-between;
    }
    
    .nav-link::before {
        display: none;
    }
    
    .nav-link:hover {
        background: var(--bg-light);
        padding-left: 30px;
    }
    
    .mega-menu {
        position: static;
        transform: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        opacity: 1;
        visibility: visible;
        margin: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-item.has-mega-menu.expanded .mega-menu {
        max-height: 1000px;
    }
    
    .mega-menu-content {
        padding: 10px 20px 20px;
        background: var(--bg-light);
    }
    
    .mega-menu-header {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .mega-menu-header h3 {
        font-size: 18px;
    }
    
    .mega-menu-header p {
        font-size: 13px;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .mega-menu-item {
        padding: 12px;
    }
    
    .dropdown-arrow {
        transition: transform 0.3s ease;
    }
    
    .nav-item.has-mega-menu.expanded .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .search-bar-content {
        flex-direction: column;
        padding: 20px;
    }
    
    .search-close {
        align-self: flex-end;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-full {
        padding: 20px;
    }
    
    .article-header h1 {
        font-size: 28px;
    }
    
    .article-body {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .site-header {
        min-height: 60px;
    }
    
    .logo img {
        height: 35px;
        max-width: 120px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .search-toggle,
    .mobile-menu-toggle {
        padding: 8px;
        width: 40px;
        height: 40px;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 26px;
    }
    
    .hero .lead {
        font-size: 16px;
    }
}

/* Utilitaires */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
