/* ========================================
   FEUILLE DE STYLE ADDIITONNELLE : VEILLE TECHNOLOGIQUE
   Cette feuille vient en complément de style.css
   Style Premium Glassmorphism & Animations
   ======================================== */

/* 1. Hero Section spécifique à la veille */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    width: 100%;
    overflow: hidden;
}

/* Glow animated background specific to veille */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.08) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: drift 15s ease-in-out infinite alternate;
}

@keyframes drift {
    0% {
        transform: translateY(0) translateX(0);
    }

    100% {
        transform: translateY(-30px) translateX(20px);
    }
}

.hero-content {
    z-index: 1;
}

.hero-content .subtitle {
    max-width: 700px;
    margin: 1rem auto 2rem;
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.6;
}

/* 2. Glassmorphism Panels (Contexte & Methodo) */
.glass-panel {
    background: linear-gradient(145deg, rgba(26, 25, 33, 0.6) 0%, rgba(18, 17, 24, 0.8) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-panel:hover::before {
    opacity: 1;
}

.glass-panel p.description {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.glass-panel p.description strong {
    color: var(--text);
    font-weight: 600;
}

/* ===================== AXES / GRID ===================== */
.axes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.axis-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.axis-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.axis-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    right: 15px;
}

.axis-item h3 {
    font-size: 1.1rem;
    color: var(--text);
    position: relative;
    z-index: 1;
}

/* ===================== TIMELINE (HORIZONTAL) ===================== */
.timeline-wrapper {
    position: relative;
    width: 100%;
    margin-top: 2rem;
}

.timeline-container {
    position: relative;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    min-height: 550px;
}

.timeline-scroll-content {
    display: flex;
    position: relative;
    padding: 2rem 50vw;
    /* Permet de centrer chaque item, y compris le 1er et dernier */
    gap: 4rem;
    align-items: center;
    min-width: max-content;
}

.timeline-container::-webkit-scrollbar {
    display: none;
}

.timeline-container.active-drag {
    cursor: grabbing;
    user-select: none;
}

.timeline-line {
    position: absolute;
    left: calc(50vw + 160px);
    /* Centre du premier dot */
    right: calc(50vw + 160px);
    /* Centre du dernier dot */
    top: 50%;
    height: 4px;
    background: var(--primary);
    z-index: 0;
    transform: translateY(-50%);
    opacity: 0.3;
}

/* Flèche de direction au bout de la ligne */
.timeline-line::after {
    content: '›';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
    opacity: 0.8;
}

.timeline-item {
    position: relative;
    flex: 0 0 320px;
    height: 600px;
    /* Augmenté pour éviter tout chevauchement */
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem;
    scroll-snap-align: center;
    transition: transform 0.4s var(--transition);
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-top: 3rem;
    /* Espace de sécurité en haut */
}

.timeline-item:nth-child(even) .timeline-content {
    margin-bottom: 3rem;
    /* Espace de sécurité en bas */
}

.timeline-item:hover {
    transform: scale(1.02);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--bg);
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow);
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 25px var(--primary);
}

/* Indicateurs Début / Fin */
.timeline-item[data-is-start="true"] .timeline-dot {
    border-color: #10b981;
    /* Vert pour le début */
}

.timeline-item[data-is-start="true"]::after {
    content: 'DÉBUT';
    position: absolute;
    top: calc(50% + 20px);
    font-size: 0.65rem;
    font-weight: 900;
    color: #10b981;
    letter-spacing: 2px;
}

.timeline-item[data-is-end="true"] .timeline-dot {
    border-color: #f59e0b;
    /* Orange pour la fin */
}

.timeline-item[data-is-end="true"]::after {
    content: 'Dans l\'attente de news';
    position: absolute;
    top: calc(50% + 20px);
    font-size: 0.65rem;
    font-weight: 900;
    color: #f59e0b;
    letter-spacing: 2px;
}

.timeline-content {
    background: rgba(22, 21, 27, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    position: relative;
    width: 100%;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Connecteur vertical */
.timeline-content::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 80px;
    /* Allongé pour correspondre à la nouvelle hauteur */
    background: linear-gradient(to top, var(--primary), transparent);
    transform: translateX(-50%);
    opacity: 0.2;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    top: 100%;
}

.timeline-item:nth-child(even) .timeline-content::before {
    bottom: 100%;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-date {
    display: inline-block;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    letter-spacing: 0.05em;
}

.timeline-content h4 {
    color: var(--text);
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
    font-family: 'Space Grotesk', sans-serif;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Flèches de navigation */
.timeline-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(167, 139, 250, 0.05);
    /* Très transparent */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
}

.timeline-nav-btn:hover {
    background: var(--primary);
    color: white;
    opacity: 1;
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-50%) scale(1.1);
}

.timeline-nav-btn.prev {
    left: 20px;
}

.timeline-nav-btn.next {
    right: 20px;
}

/* Animations de sautillement pour les flèches */
@keyframes bounce-left {

    0%,
    100% {
        transform: translateY(-50%) translateX(0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-50%) translateX(-25px) scale(1.2);
        opacity: 1;
    }
}

@keyframes bounce-right {

    0%,
    100% {
        transform: translateY(-50%) translateX(0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-50%) translateX(25px) scale(1.2);
        opacity: 1;
    }
}

.timeline-nav-btn.prev.bounce {
    animation: bounce-left 2s infinite ease-in-out;
}

.timeline-nav-btn.next.bounce {
    animation: bounce-right 2s infinite ease-in-out;
}

@media (max-width: 768px) {
    .timeline-nav-btn {
        display: none;
    }

    /* On cache sur mobile, le swipe suffit */
}

/* ===================== GLOSSAIRE ===================== */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.glossary-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 16px;
    transition: var(--transition);
}

.glossary-card:hover {
    background: rgba(167, 139, 250, 0.03);
    border-color: var(--border-hover);
}

.glossary-card h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.glossary-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================== FILTER / SECTION HEADER ===================== */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.filter-btn:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* ===================== RSS ===================== */
.rss-container {
    padding: 2rem;
    border-radius: 24px;
}

.rss-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.live-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.rss-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rss-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: var(--transition);
}

.rss-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
    transform: translateX(5px);
}

.rss-date {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-family: monospace;
    flex-shrink: 0;
}

.rss-item p {
    font-size: 0.95rem;
    color: var(--text);
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rss-item svg {
    color: var(--text-faint);
    transition: var(--transition);
}

.rss-item:hover svg {
    color: var(--primary);
}

@media (max-width: 768px) {
    .section-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
        overflow-x: auto;
    }

    .rss-item {
        gap: 1rem;
    }
}

/* Loading state for RSS */
.loading-rss {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.5rem;
    color: var(--text-muted);
    justify-content: center;
}

.loading-rss .status-dot.pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-small 1.5s infinite ease-in-out;
}

@keyframes pulse-small {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* 4. Cartes des Articles (Veille Card) */
.veille-card {
    background: linear-gradient(145deg, rgba(26, 25, 33, 0.7) 0%, rgba(18, 17, 24, 0.9) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: default;
}

.veille-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.1);
}

.veille-card .project-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.veille-card .project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(18, 17, 24, 1) 100%);
}

.veille-card .project-content {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.veille-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.veille-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Premium Tags */
.veille-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.veille-tags .tag {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--primary);
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s;
}

.veille-card:hover .veille-tags .tag {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

/* Boutique-style Button */
.btn-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.veille-card:hover .btn-details {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-details:focus-visible {
    outline: none;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Modale Premium */
.modal-body {
    background: linear-gradient(145deg, rgba(26, 25, 33, 0.95) 0%, rgba(18, 17, 24, 0.98) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* 5. Contact Wrapper */
.contact-wrapper {
    text-align: center;
    color: var(--text-muted);
}

.contact-wrapper p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 900px) {
    .hero {
        min-height: 60vh;
        padding: 1.25rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .axes-list {
        grid-template-columns: 1fr;
    }

    .glass-panel {
        padding: 1.5rem;
    }
}