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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1729 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Clutter Effect Background */
#clutter-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Particle Canvas Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

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

/* Hero Welcome Section - Texte superposé sur les effets */
.hero-welcome {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    pointer-events: none;
    width: 90%;
    max-width: 1000px;
}

.hero-content {
    width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(1, 112, 185, 0.5), 0 0 60px rgba(38, 174, 207, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.feature-item i {
    font-size: 2rem;
    color: #FFD700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.feature-item span {
    font-size: 1rem;
    font-weight: 500;
}

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

/* Carrousel d'images IA */
.ai-carousel-wrapper {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    z-index: 6;
    pointer-events: all;
}

.ai-carousel {
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-top: 2px solid rgba(1, 112, 185, 0.5);
    border-bottom: 2px solid rgba(1, 112, 185, 0.5);
}

.carousel-track {
    display: flex;
    gap: 20px;
    animation: scroll 60s linear infinite;
    will-change: transform;
}

.carousel-item {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.carousel-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 30px rgba(1, 112, 185, 0.6);
    border-color: rgba(1, 112, 185, 0.8);
    z-index: 10;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
}

.carousel-item-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Header principal - Style CNews avec Business Web Agence colors */
.main-header {
    background: rgba(1, 112, 185, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(38, 174, 207, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.header-top {
    padding: 20px 0;
    border-bottom: 3px solid rgba(255,255,255,0.2);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section .logo {
    font-size: 42px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.logo .hub-text {
    color: #FFD700;
    font-weight: 700;
}

.tagline {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-top: 5px;
    font-weight: 300;
    letter-spacing: 1px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,0,0,0.9);
    padding: 12px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255,0,0,0.4);
    animation: pulse 2s infinite;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.live-text {
    color: white;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Bande de breaking news */
.header-breaking {
    background: #d32f2f;
    padding: 12px 0;
    overflow: hidden;
}

.header-breaking .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-label {
    background: white;
    color: #d32f2f;
    padding: 6px 15px;
    font-weight: 800;
    font-size: 14px;
    border-radius: 5px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.breaking-news-ticker {
    color: white;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Navigation par catégories */
.main-nav {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(38, 174, 207, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 138px;
    z-index: 999;
}

.main-nav .container {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(38, 174, 207, 0.4);
    color: #26aecf;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(38, 174, 207, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: linear-gradient(135deg, rgba(1, 112, 185, 0.3), rgba(38, 174, 207, 0.3));
    border-color: #26aecf;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 174, 207, 0.4);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(1, 112, 185, 0.6), rgba(38, 174, 207, 0.6));
    border-color: #26aecf;
    color: white;
    box-shadow: 0 8px 25px rgba(38, 174, 207, 0.5);
}

/* Contenu principal */
.main-content {
    padding: 40px 0;
    min-height: 60vh;
    position: relative;
    z-index: 10;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Fade in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toolbar */
.news-toolbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(38, 174, 207, 0.2);
    padding: 20px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.news-count {
    font-size: 18px;
    font-weight: 600;
    color: #26aecf;
    text-shadow: 0 0 10px rgba(38, 174, 207, 0.5);
}

.news-count span {
    font-size: 28px;
    font-weight: 800;
    color: #0170B9;
    text-shadow: 0 0 20px rgba(1, 112, 185, 0.7);
}

.refresh-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.refresh-btn {
    background: linear-gradient(135deg, #0170B9, #26aecf);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(1,112,185,0.3);
}

/* Grille de news */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

.news-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(38, 174, 207, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.35s ease;
    position: relative;
    z-index: 10;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #0170B9, #26aecf);
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px rgba(38, 174, 207, 0.4);
    border-color: rgba(38, 174, 207, 0.5);
}

.news-card:hover::before {
    transform: scaleX(1);
    box-shadow: 0 0 20px rgba(38, 174, 207, 0.8);
}

.news-card-header {
    padding: 20px;
    border-bottom: 1px solid rgba(38, 174, 207, 0.2);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.news-source {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-source.microsoft {
    background: linear-gradient(135deg, #0078D4, #50E6FF);
    color: white;
}

.news-source.openai {
    background: linear-gradient(135deg, #10A37F, #6DFFB3);
    color: white;
}

.news-source.google {
    background: linear-gradient(135deg, #4285F4, #34A853);
    color: white;
}

.news-source.huggingface {
    background: linear-gradient(135deg, #FFD21E, #FF9D0B);
    color: white;
}

.news-source.techcrunch {
    background: linear-gradient(135deg, #0A8500, #4CAF50);
    color: white;
}

.news-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
}

.news-title {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.news-card-body {
    padding: 0 20px 20px 20px;
}

.news-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-link {
    display: inline-block;
    color: #26aecf;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(38, 174, 207, 0.5);
}

.news-link:hover {
    color: #0170B9;
    transform: translateX(5px);
    text-shadow: 0 0 20px rgba(1, 112, 185, 0.8);
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.loading-indicator.active {
    display: block;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0170B9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.main-footer {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(38, 174, 207, 0.2);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
    position: relative;
    z-index: 10;
}

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

.footer-section h3 {
    color: #FFD700;
    font-size: 24px;
    margin-bottom: 15px;
}

.footer-section h4 {
    color: #26aecf;
    font-size: 18px;
    margin-bottom: 12px;
}

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

.footer-section ul li {
    padding: 5px 0;
    color: rgba(255,255,255,0.8);
}

.footer-links {
    list-style: none;
}

.footer-links li a {
    color: #26aecf;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
    position: relative;
}

.footer-links li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0170B9, #26aecf);
    transition: width 0.3s ease;
}

.footer-links li a:hover {
    color: #0170B9;
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(38, 174, 207, 0.6);
}

.footer-links li a:hover::after {
    width: 100%;
}

.auto-refresh-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    animation: blink 2s infinite;
}

.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);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-section .logo {
        font-size: 28px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-toolbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-top .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
