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

/* Focus styles pour accessibilité clavier */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--neon-orange);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

:root {
    --neon-red: #ff4444;
    --neon-orange: #ff6b4a;
    --burgundy-dark: #1f0808;
    --burgundy-medium: #3d1515;
    --burgundy-light: #5a2020;
    --text-primary: #f5f5f5;
    --text-secondary: #d0d0d0;
    --text-muted: #a8a8a8;
    --bg-overlay: rgba(31, 8, 8, 0.90);
    --code-bg: #1a1a1a;
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: #131313;
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 20%, rgba(139, 0, 0, 0.3) 0%, transparent 50%);
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--neon-red);
    border-radius: 50%;
    box-shadow: 0 0 3px var(--neon-red);
    animation: twinkle 3s infinite;
}

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

.glow-wave {
    position: fixed;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at center, rgba(255, 68, 68, 0.08) 0%, transparent 60%);
    animation: rotate-glow 40s linear infinite;
    z-index: 0;
}

@keyframes rotate-glow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animations latérales */
.side-decoration {
    position: fixed;
    top: 0;
    width: 20%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.left-side {
    left: 0;
}

.right-side {
    right: 0;
}

.side-decoration canvas {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.cyber-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    font-family: 'Courier New', monospace;
}

.binary-stream {
    position: absolute;
    top: 10%;
    left: 20%;
    font-size: 0.75rem;
    color: rgba(255, 68, 68, 0.4);
    line-height: 1.4;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
    animation: scroll-binary 15s linear infinite;
    white-space: nowrap;
}

.hex-dump {
    position: absolute;
    top: 45%;
    right: 15%;
    font-size: 0.7rem;
    color: rgba(255, 107, 74, 0.35);
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(255, 107, 74, 0.3);
    animation: fade-pulse 4s ease-in-out infinite;
}

.terminal-lines {
    position: absolute;
    bottom: 20%;
    left: 25%;
    font-size: 0.72rem;
    color: rgba(255, 68, 68, 0.3);
    line-height: 1.6;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.2);
    animation: glitch-text 8s ease-in-out infinite;
}

.right-side .binary-stream {
    left: auto;
    right: 20%;
    animation-delay: -5s;
}

.right-side .hex-dump {
    right: auto;
    left: 15%;
    animation-delay: -2s;
}

.right-side .terminal-lines {
    left: auto;
    right: 25%;
    animation-delay: -4s;
}

@keyframes scroll-binary {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

@keyframes fade-pulse {
    0%, 100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes glitch-text {
    0%, 90%, 100% {
        transform: translate(0);
        opacity: 0.3;
    }
    92% {
        transform: translate(-2px, 1px);
        opacity: 0.5;
    }
    94% {
        transform: translate(2px, -1px);
        opacity: 0.5;
    }
    96% {
        transform: translate(-1px, 1px);
        opacity: 0.5;
    }
}

.content {
    position: relative;
    z-index: 2;
}

header {
    padding: 0.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, rgba(100, 50, 50, 0.95) 0%, rgba(80, 40, 40, 0.95) 15%, rgba(60, 30, 30, 0.95) 30%, rgba(50, 20, 20, 0.90) 50%, rgba(31, 8, 8, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 68, 68, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-red);
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

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

.logo-img {
    height: 70px;
    width: auto;
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 68, 68, 0.6));
    transition: filter 0.3s ease;
}

.logo-header:hover .logo-img {
    filter: brightness(1.4) drop-shadow(0 0 20px rgba(255, 68, 68, 0.9));
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 100px;
}

.header-typewriter {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-orange);
    text-shadow: 0 0 8px rgba(255, 107, 74, 0.5);
    letter-spacing: -0.5px;
}

.header-cursor {
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: var(--neon-red);
    font-size: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 3rem;
}

nav {
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-red), var(--neon-orange));
    transition: width 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--text-primary);
}

nav a:hover::after {
    width: 100%;
}

.hero {
    padding: 3rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--neon-orange);
    margin-bottom: 2.5rem;
    text-shadow: 0 0 8px rgba(255, 107, 74, 0.5);
    letter-spacing: -1px;
}

.cursor {
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: var(--neon-red);
}

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

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

.search-container {
    max-width: 850px;
    margin: 0 auto 2rem;
    position: relative;
    animation: fadeIn 1s ease 0.5s both;
}

.search-wrapper {
    position: relative;
}

.search-results {
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(31, 8, 8, 0.95), rgba(61, 21, 21, 0.85));
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(255, 68, 68, 0.2);
}

.search-results-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 68, 68, 0.2);
}

.search-results-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--neon-orange);
    margin-bottom: 0.3rem;
}

#search-results-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-result-item {
    background: linear-gradient(135deg, rgba(31, 8, 8, 0.6), rgba(61, 21, 21, 0.3));
    border: 1px solid rgba(255, 68, 68, 0.15);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    border-color: var(--neon-red);
    background: linear-gradient(135deg, rgba(31, 8, 8, 0.8), rgba(61, 21, 21, 0.5));
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.2);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.search-result-tags {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.result-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 68, 68, 0.15);
    color: var(--neon-orange);
    border: 1px solid rgba(255, 107, 74, 0.3);
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex-grow: 1;
}

.search-result-item:hover .search-result-title {
    color: var(--neon-orange);
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(31, 8, 8, 0.5);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--neon-red);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--neon-orange);
}

.search-bar {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    background: rgba(31, 8, 8, 0.75);
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.search-bar:focus {
    outline: none;
    border-color: var(--neon-red);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
    background: rgba(31, 8, 8, 0.8);
}

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

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--neon-red);
    pointer-events: none;
    filter: grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(-10deg) saturate(200%) contrast(0.9);
    opacity: 0.85;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto 0;
    animation: fadeIn 1s ease 0.7s both;
}

.welcome-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neon-orange);
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: -1.5rem;
    letter-spacing: -0.5px;
}

.hero-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-align: justify;
}

.hero-text p {
    margin-bottom: 0.8rem;
}

.hero-text strong {
    color: #ffffff;
    font-weight: 600;
}

.paragraph-with-icon {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.paragraph-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
    filter: grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(-10deg) saturate(200%) contrast(0.9);
    opacity: 0.85;
}

.presentation-card {
    background: linear-gradient(135deg, rgba(31, 8, 8, 0.85), rgba(61, 21, 21, 0.6));
    border: 1px solid rgba(255, 68, 68, 0.25);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(255, 68, 68, 0.15);
    position: relative;
    overflow: hidden;
}

.presentation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.05), transparent);
    animation: shimmer 4s infinite;
}

.disclaimer {
    background: linear-gradient(135deg, rgba(61, 21, 21, 0.6), rgba(90, 32, 32, 0.4));
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-left: 4px solid var(--neon-red);
    padding: 1.25rem;
    margin: 1.5rem 0 0;
    border-radius: 12px;
    text-align: justify;
    position: relative;
    overflow: hidden;
}

.disclaimer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.08), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    to { left: 100%; }
}

.disclaimer strong {
    color: var(--neon-red);
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.warning-emoji {
    filter: none !important;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    display: inline-block;
}

.disclaimer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

.articles-section {
    max-width: 1300px;
    margin: 2rem auto 5rem;
    padding: 0 2rem;
    animation: fadeIn 1s ease 0.9s both;
}

.section-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--neon-orange);
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(255, 107, 74, 0.4);
    letter-spacing: -1px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
    justify-content: center;
}

.article-card {
    background: linear-gradient(135deg, rgba(31, 8, 8, 0.85), rgba(61, 21, 21, 0.6));
    border: 1px solid rgba(255, 68, 68, 0.25);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.08), transparent);
    transition: left 0.5s ease;
}

.article-card:hover::before {
    left: 100%;
}

.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--neon-red);
    box-shadow: 0 20px 60px rgba(255, 68, 68, 0.25);
}

.article-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 68, 68, 0.15);
    color: var(--neon-orange);
    border: 1px solid rgba(255, 107, 74, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.article-card:hover .article-tag {
    background: rgba(255, 107, 74, 0.25);
    box-shadow: 0 0 10px rgba(255, 107, 74, 0.3);
}

.skill-level {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid;
    display: inline-block;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.skill-level-débutant,
.skill-level-debutant {
    background: rgba(76, 175, 80, 0.2);
    color: #66bb6a;
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.skill-level-intermédiaire,
.skill-level-intermediaire {
    background: rgba(255, 152, 0, 0.2);
    color: #ffa726;
    border-color: rgba(255, 152, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.2);
}

.skill-level-confirmé,
.skill-level-confirme {
    background: rgba(255, 87, 34, 0.2);
    color: #ff7043;
    border-color: rgba(255, 87, 34, 0.5);
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.2);
}

.skill-level-expert {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.5);
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.2);
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: var(--neon-orange);
    text-shadow: 0 0 5px rgba(255, 107, 74, 0.3);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.75rem;
    text-align: justify;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 68, 68, 0.15);
}

.article-date, .article-read-time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.read-more {
    color: var(--neon-red);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    transition: all 0.3s ease;
}

.article-card:hover .read-more {
    gap: 1rem;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

footer {
    margin-top: 6rem;
    padding: 2rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 68, 68, 0.15);
    background: var(--bg-overlay);
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .hero-text {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header-center {
        order: 2;
        margin-left: 0;
    }

    .nav-right {
        order: 3;
    }

    .header-typewriter {
        font-size: 1.5rem;
    }

    .header-cursor {
        font-size: 1.5rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 1.5rem 1.5rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .welcome-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

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

    nav {
        gap: 1.5rem;
    }

    .paragraph-with-icon {
        gap: 1rem;
    }

    .paragraph-icon {
        font-size: 2rem;
    }

    /* Masquer les animations latérales sur mobile */
    .side-decoration {
        display: none;
    }

    .logo-img {
        height: 35px;
    }

    .back-to-top {
        bottom: 2rem !important;
        right: 2rem !important;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .search-container {
        margin: 0 auto 2rem;
    }

    .search-bar {
        padding: 1rem 3rem 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .search-icon {
        right: 1.25rem;
        font-size: 1.25rem;
    }

    .search-results {
        padding: 1rem;
        max-height: 300px;
    }

    .search-result-item {
        padding: 1rem;
    }

    .search-result-title {
        font-size: 1rem;
    }

    .disclaimer {
        padding: 1.5rem;
        margin: 2rem 0 1rem;
    }

    .disclaimer strong {
        font-size: 1rem;
    }

    .disclaimer p {
        font-size: 0.95rem;
    }

    .presentation-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .welcome-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .logo-img {
        height: 30px;
    }

    header {
        padding: 0.75rem 1rem;
    }

    .header-typewriter {
        font-size: 1.25rem;
    }

    .header-cursor {
        font-size: 1.25rem;
    }

    nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .search-bar {
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .article-card {
        padding: 1.25rem;
    }

    .article-title {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .presentation-card {
        padding: 1.5rem;
    }
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed !important;
    bottom: 3rem !important;
    right: 3rem !important;
    top: auto !important;
    left: auto !important;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--neon-red), var(--neon-orange));
    border: 2px solid var(--neon-orange);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9999 !important;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
}

.back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 68, 68, 0.6);
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-red));
}

.back-to-top span {
    display: block;
    line-height: 1;
    font-weight: bold;
}
