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

:root {
    --comic-cream: #f4efe7;
    --ink-black: #0a0a0a;
    --paper-white: #fafafa;
    --accent-red: #e63946;
}

body {
    font-family: 'Courier Prime', monospace;
    background: var(--ink-black);
    color: var(--ink-black);
    overflow-x: hidden;
    position: relative;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.7;
    filter: blur(0.4px);
}

.comic-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--comic-cream);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.comic-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.comic-grid {
    position: relative;
    width: 95vw;
    max-width: 1600px;
    height: 90vh;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-button {
    position: absolute;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    background: var(--paper-white);
    color: var(--ink-black);
    border: 3px solid var(--ink-black);
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    z-index: 15;
    text-transform: uppercase;
    box-shadow: 3px 3px 0px var(--ink-black);
    transition: all 0.3s ease;
}

.panel-button:hover {
    background: var(--accent-red);
    color: var(--paper-white);
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0px var(--ink-black);
}

#btn-1 {
    bottom: 3%;
    left: 16%;
}

#btn-2 {
    top: 32%;
    right: 9%;
}

#btn-3 {
    bottom: 3%;
    left: 42%;
}

#btn-4 {
    bottom: 3%;
    right: 19%;
}

.content-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--comic-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transform: perspective(1200px) rotateY(-90deg);
    transform-origin: left center;
    transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 20;
    overflow-y: auto;
}

.content-section.active {
    opacity: 1;
    pointer-events: all;
    transform: perspective(1200px) rotateY(0deg);
}

#section-about {
    background-image: url("../Assets/about.webp");
    background-size: cover;
    background-position: center;
}

#section-stack {
    background-image: url("../Assets/stack.webp");
    background-size: cover;
    background-position: center;
}

#section-expertise {
    background-image: url("../Assets/expertise.webp");
    background-size: cover;
    background-position: center;
}

#section-contact {
    background-image: url("../Assets/contact.webp");
    background-size: cover;
    background-position: center;
}

.section-inner {
    max-width: 900px;
    width: 100%;
    background: rgba(250, 250, 250, 0.96);
    padding: clamp(1.5rem, 5vw, 4rem);
    border: 4px solid var(--ink-black);
    box-shadow: 12px 12px 0px rgba(10, 10, 10, 0.15);
    position: relative;
    margin: 2rem 0;
}

.panel-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: var(--accent-red);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
}

h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-red);
}

p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.stack-item {
    background: var(--ink-black);
    color: var(--paper-white);
    padding: 1.2rem;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    border: 3px solid var(--ink-black);
}

.stack-item:hover {
    background: var(--paper-white);
    color: var(--ink-black);
    box-shadow: 5px 5px 0px var(--accent-red);
    transform: translate(-2px, -2px);
}

.contact-box {
    background: var(--ink-black);
    color: var(--paper-white);
    padding: 3rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-box h3 {
    color: var(--paper-white);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--paper-white);
    background: var(--ink-black);
    text-decoration: none;
    padding: 1rem 3rem;
    border: 2px solid var(--paper-white);
    transition: 0.3s;
    min-width: 150px;
}

.contact-link:hover {
    background: var(--paper-white);
    color: var(--ink-black);
    box-shadow: 5px 5px 0px var(--accent-red);
}

.particle-toggle-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.toggle-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--ink-black);
    font-weight: 400;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 10, 0.1);
    border: 2px solid var(--ink-black);
    transition: .4s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--ink-black);
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-red);
}

input:checked+.slider::before {
    transform: translateX(20px);
    background-color: var(--paper-white);
}

.back-btn {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 100;
    font-family: 'Bebas Neue', sans-serif;
    padding: 0.8rem 2rem;
    background: var(--ink-black);
    color: var(--paper-white);
    border: 2px solid var(--paper-white);
    cursor: pointer;
}

@media (max-width: 767px) {
    .content-section {
        justify-content: flex-start;
        padding-top: 5rem;
    }

    .comic-container {
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url("../Assets/accueil.webp") !important;
        background-size: cover !important;
        background-position: 22% top !important;
    }

    .comic-grid {
        background-image: none !important;
        height: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
        padding: 2rem;
        margin-top: 25vh;
    }

    .particle-toggle-container {
        background: none !important;
        border: none !important;
        padding: 0 !important;
    }

    .panel-button {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 300px;
        margin: 0 auto !important;
        font-size: 1.6rem !important;
        padding: 1.2rem !important;
        text-align: center;
        background: rgba(250, 250, 250, 0.95);
        box-shadow: 6px 6px 0px var(--ink-black);
    }

    .section-inner {
        margin-top: 1rem;
        margin-bottom: 2rem;
        padding: 1.5rem;
        width: 95%;
    }

    .social-links {
        flex-direction: column;
        width: 100%;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
    }

    .back-btn {
        top: 1rem;
        left: 1rem;
        width: auto;
        font-size: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .comic-grid {
        width: 98vw;
        height: 60vh;
    }
}