/* Page Veille Technologique - Neon Glass Bento Redesign */

/* Constants */
:root {
    --glass-bg-light: rgba(255, 255, 255, 0.85);
    --glass-bg-dark: rgba(20, 20, 30, 0.6);
    --neon-blue: #00bceb;
    --neon-purple: #6c5ce7;
    --card-radius: 24px;
    --grid-gap: 24px;
}

/* Background (Matches Theme Alignment) */
.veille-section {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%),
        url('https://images.unsplash.com/photo-1434030216411-0b793f4b4173?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.veille-section .container {
    position: relative;
    z-index: 5;
    max-width: 1200px;
}

/* Header */
.veille-header {
    text-align: center;
    margin-bottom: 60px;
    color: white;
}

.veille-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.veille-header p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(280px, auto));
    gap: var(--grid-gap);
    margin-bottom: 40px;
}

/* Base Card Style */
.bento-card {
    background: var(--glass-bg-light);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--card-radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
}

/* Dark Mode Card */
body.dark-mode .bento-card {
    background: var(--glass-bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    color: white;
}

/* Hover Effect: Scale & Border Shine */
.bento-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    z-index: 10;
    border-color: var(--neon-purple);
}

body.dark-mode .bento-card:hover {
    box-shadow: 0 20px 50px rgba(108, 92, 231, 0.25);
    border-color: var(--neon-blue);
}

/* Grid Spans */
.hero-card {
    grid-column: span 2;
    grid-row: span 1;
}

.sources-card {
    grid-column: span 1;
    grid-row: span 2;
}

.discovery-stack-card {
    grid-column: span 2;
    grid-row: span 1;
}

/* Card Content: Hero */
.hero-card {
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
}

body.dark-mode .hero-card {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 30, 0.8));
}

.hero-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #2d3436;
}

body.dark-mode .hero-card h2 {
    color: white;
}

.hero-card p {
    color: #636e72;
    font-size: 1.05rem;
}

body.dark-mode .hero-card p {
    color: rgba(255, 255, 255, 0.8);
}

.stats-row {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neon-purple);
}

body.dark-mode .stat-number {
    color: var(--neon-blue);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #b2bec3;
    font-weight: 600;
}

/* Card Content: Domain */
.domain-card {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.domain-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.ai-icon {
    background: linear-gradient(135deg, #ff7675, #fab1a0);
}

.web-icon {
    background: linear-gradient(135deg, #00bceb, #0083b0);
}

.network-icon {
    background: linear-gradient(135deg, #55efc4, #00b894);
}

.domain-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #2d3436;
}

body.dark-mode .domain-card h3 {
    color: white;
}

.domain-card p {
    font-size: 0.95rem;
    color: #636e72;
    margin-bottom: 1rem;
}

body.dark-mode .domain-card p {
    color: rgba(255, 255, 255, 0.7);
}

.domain-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    color: #636e72;
    font-weight: 600;
}

body.dark-mode .tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}


/* Card Content: Sources */
.sources-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
    width: 100%;
}

.source-link-compact {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    color: #2d3436;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

body.dark-mode .source-link-compact {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.source-link-compact:hover {
    background: white;
    transform: translateX(5px);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

body.dark-mode .source-link-compact:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--neon-blue);
    border-color: var(--neon-blue);
}

.source-link-compact i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
    text-align: center;
}

/* Card Content: Discovery Stack */
.discovery-stack-card {
    display: flex;
    flex-direction: column;
}

.stack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stack-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: #2d3436;
}

body.dark-mode .stack-header h3 {
    color: white;
}

.stack-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.discovery-image-compact {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.discovery-image-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.discovery-stack-card:hover .discovery-image-compact img {
    transform: scale(1.1);
}

.discovery-text h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #2d3436;
}

body.dark-mode .discovery-text h4 {
    color: white;
}

.discovery-text p {
    font-size: 0.95rem;
    color: #636e72;
    margin-bottom: 1rem;
}

.read-more-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-purple);
    text-decoration: none;
}

body.dark-mode .read-more-link {
    color: var(--neon-blue);
}

/* Responsive */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .sources-card {
        grid-column: span 2;
        /* Full width on tablet */
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        display: flex;
        /* Fallback to flex stack on mobile */
        flex-direction: column;
    }

    .bento-card {
        width: 100%;
    }

    .stack-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .discovery-image-compact {
        width: 100%;
        height: 180px;
    }
}

/* Visibility Helper */
.reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}