@font-face {
    font-family: "Schoolbell";
    src: url("Fonts/Schoolbell.ttf") format("truetype");
}

:root {
    --pink: #ff4fd8;
    --home-bg: #ffd6ec;
    --home-text: #98004d;
    --font: "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    min-height: 100%;

    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: var(--font);
}


/* ======================
   BOOT
====================== */

#boot-screen {
    position: fixed;
    inset: 0;

    background: #000;
    color: var(--pink);

    overflow: hidden;

    z-index: 9999;
}

.scanlines {
    position: absolute;
    inset: 0;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.05) 1px,
            transparent 2px,
            transparent 5px
        );
}


/* ======================
   TERMINAL
====================== */

#terminal {
    position: absolute;

    width: 92%;
    height: 80%;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);
}

.boot-line {
    display: grid;

    grid-template-columns:
        2.5fr 1fr 1fr 1fr;

    gap: 30px;

    margin-bottom: 25px;

    opacity: 0;

    font-size:
        clamp(18px, 2vw, 30px);

    letter-spacing: 2px;
}

.boot-text {
    color: var(--pink);

    text-shadow:
        0 0 5px var(--pink),
        0 0 20px var(--pink);
}


/* ======================
   GLITCH DISCRET
====================== */

.glitch-bar {
    position: absolute;

    height: 2px;

    background: var(--pink);

    box-shadow:
        0 0 15px var(--pink);

    opacity: 0.25;
}


/* ======================
   BOUTON BOOT
====================== */

#boot-button {
    position: absolute;

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -50%);

    background: #000;

    border:
        1px solid var(--pink);

    padding:
        15px 50px;

    color: var(--pink);

    font-family:
        var(--font);

    font-size: 20px;

    letter-spacing: 6px;

    cursor: pointer;

    box-shadow:
        0 0 20px var(--pink);

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

#boot-button:hover {
    transform:
        translate(-50%, -50%)
        scale(1.15);

    background: var(--pink);

    color: #000;

    box-shadow:
        0 0 30px var(--pink),
        0 0 60px var(--pink);
}


/* ======================
   HOME - MENU
====================== */

#home .menu {
    display: flex;

    justify-content: center;

    gap: 200px;
}

#home .menu a {
    font-family: "Schoolbell", cursive;

    color: var(--home-text);

    text-decoration: none;

    margin-right: 0;

    font-size: 24px;
}

#home .menu a:hover {
    color: #ff4fa3;
}


/* ======================
   BOUTON ABOUT ME
====================== */

#home .menu .about-button {
    position: relative;

    display: block;

    width: 120px;
    height: 60px;

    margin: 0;

    transition:
        transform 0.2s ease;
}

#home .menu .about-button img {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 170px;
    height: auto;

    transform:
        translate(-50%, -50%);

    display: block;
}

#home .menu .about-button .about-gif {
    opacity: 0;
}


/* Quand la souris passe sur About Me */

#home .menu .about-button:hover {
    transform:
        scale(1.08);
}

#home .menu .about-button:hover .about-gif {
    opacity: 1;
}

#home .menu .about-button:hover img:first-child {
    opacity: 0;
}


/* ======================
   BOUTONS SOCIAUX
====================== */

#home .menu .menu-button {
    position: relative;

    display: block;

    width: 120px;
    height: 60px;

    margin: 0;

    transition:
        transform 0.2s ease;
}


/* Images des boutons sociaux */

#home .menu .menu-button img {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 170px;
    height: auto;

    transform:
        translate(-50%, -50%);

    display: block;
}


/* GIF caché par défaut */

#home .menu .menu-button .button-gif {
    opacity: 0;
}


/* Zoom uniquement au survol */

#home .menu .menu-button:hover {
    transform:
        scale(1.08);
}


/* Afficher le GIF */

#home .menu .menu-button:hover .button-gif {
    opacity: 1;
}


/* Cacher l'icône fixe */

#home .menu .menu-button:hover img:first-child {
    opacity: 0;
}


/* ======================
   HOME
====================== */

#home {
    min-height: 100vh;

    /*
     * Permet à la page de grandir
     * avec son contenu.
     */
    min-height: 100vh;

    padding: 80px;

    position: relative;

    /*
     * IMPORTANT :
     * hidden empêchait le scroll.
     */
    overflow: visible;

    color: var(--home-text);

    background-color: #111b37;
}


/* ======================
   PLANETARIUM
====================== */

#planetarium {
    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100vh;

    z-index: 0;

    overflow: hidden;

    background: #111b37;

    pointer-events: none;
}


/* Toutes les couches */

#planetarium .layer {
    position: absolute;

    /*
     * On agrandit légèrement la zone pour
     * éviter de voir les bords pendant le mouvement.
     */

    top: -20%;
    left: -20%;

    width: 140%;
    height: 140%;

    background-repeat: repeat;

    /*
     * Les textures originales font 1200x800.
     */

    background-size: 1200px 800px;

    background-position: 0 0;

    pointer-events: none;
}


/* ======================
   FOND BLEU
====================== */

#planetarium .layer-base {
    background-image:
        url("assets/planetarium_blue_base.png");

    z-index: 0;

    animation:
        planetarium-base
        180s
        linear
        infinite;
}


/* ======================
   STARFIELD 1
====================== */

#planetarium .layer-1 {
    background-image:
        url("assets/planetarium_starfield_1.png");

    z-index: 1;

    mix-blend-mode: screen;

    animation:
        planetarium-stars-1
        100s
        linear
        infinite;
}


/* ======================
   STARFIELD 2
====================== */

#planetarium .layer-2 {
    background-image:
        url("assets/planetarium_starfield_2.png");

    z-index: 2;

    mix-blend-mode: screen;

    animation:
        planetarium-stars-2
        85s
        linear
        infinite;
}


/* ======================
   STARFIELD 3
====================== */

#planetarium .layer-3 {
    background-image:
        url("assets/planetarium_starfield_3.png");

    z-index: 3;

    mix-blend-mode: screen;

    animation:
        planetarium-stars-3
        85s
        linear
        infinite;
}


/* ======================
   STARFIELD 4
====================== */

#planetarium .layer-4 {
    background-image:
        url("assets/planetarium_starfield_4.png");

    z-index: 4;

    mix-blend-mode: screen;

    animation:
        planetarium-stars-4
        70s
        linear
        infinite;
}


/* ======================
   STARFIELD 5
====================== */

#planetarium .layer-5 {
    background-image:
        url("assets/planetarium_starfield_5.png");

    z-index: 5;

    mix-blend-mode: screen;

    animation:
        planetarium-stars-5
        55s
        linear
        infinite;
}


/* ======================
   ANIMATIONS
====================== */

@keyframes planetarium-base {

    from {
        background-position:
            0px 0px;
    }

    to {
        background-position:
            -800px 800px;
    }
}


@keyframes planetarium-stars-1 {

    from {
        background-position:
            0px 0px;
    }

    to {
        background-position:
            -600px 600px;
    }
}


@keyframes planetarium-stars-2 {

    from {
        background-position:
            0px 0px;
    }

    to {
        background-position:
            -700px 700px;
    }
}


@keyframes planetarium-stars-3 {

    from {
        background-position:
            0px 0px;
    }

    to {
        background-position:
            -700px 700px;
    }
}


@keyframes planetarium-stars-4 {

    from {
        background-position:
            0px 0px;
    }

    to {
        background-position:
            -800px 800px;
    }
}


@keyframes planetarium-stars-5 {

    from {
        background-position:
            0px 0px;
    }

    to {
        background-position:
            -900px 900px;
    }
}


/* ======================
   CONTENU AU-DESSUS
====================== */

#home > *:not(#planetarium) {
    position: relative;

    z-index: 10;
}


/* ======================
   TEXTE HOME
====================== */

#home h1 {
    font-size: 55px;

    text-shadow:
        0 0 15px rgba(152, 0, 77, 0.4);
}

#home p {
    font-size: 20px;
}

#home a {
    color: var(--home-text);

    margin-right: 30px;

    text-decoration: none;
}

#home a:hover {
    color: #ff4fa3;
}


/* ======================
   FLASH CRT CENTRE
====================== */

.power-on::before {
    content: "";

    position: fixed;

    top: 50%;
    left: 50%;

    width: 0;
    height: 0;

    transform:
        translate(-50%, -50%);

    background: white;

    border-radius: 50%;

    z-index: 9999;

    animation:
        crtOpen 1.2s ease-out forwards;

    pointer-events: none;
}

.power-on #home {
    animation:
        homeAppear 1.5s ease forwards;
}


/* ======================
   ANIMATION CRT
====================== */

@keyframes crtOpen {

    0% {
        width: 0;
        height: 0;

        opacity: 1;
    }

    30% {
        width: 100px;
        height: 5px;

        border-radius: 0;

        box-shadow:
            0 0 40px white,
            0 0 80px var(--pink);
    }

    70% {
        width: 100vw;
        height: 100vh;

        border-radius: 0;
    }

    100% {
        width: 120vw;
        height: 120vh;

        opacity: 0;
    }
}


/* ======================
   APPARITION HOME
====================== */

@keyframes homeAppear {

    from {
        opacity: 0;

        filter:
            brightness(0);
    }

    to {
        opacity: 1;

        filter:
            brightness(1);
    }
}


/* ======================
   LATEST ART
====================== */

.latest-art {
    position: absolute;

    /*
     * Position sous le titre,
     * vers la gauche.
     */

    top: 510px;
    left: -30px;

    width: 430px;
    height: auto;

    display: block;

    cursor: pointer;

    z-index: 20;

    transform-origin: center center;

    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}


/* ======================
   CADRE
====================== */

.latest-art-frame {
    display: block;

    width: 100%;
    height: auto;
}


/* ======================
   ILLUSTRATION
====================== */

.latest-art-preview {
    position: absolute;

    top: 54%;
    left: 50%;

    width: 72%;
    height: 64%;

    transform:
        translate(-50%, -50%);

    display: flex;

    justify-content: center;
    align-items: center;

    overflow: hidden;

    border-radius: 24px;
}


.latest-art-preview img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 18px;

    opacity: 0.96;

    filter:
        saturate(0.96)
        contrast(0.98);
}


/* ======================
   SURVOL
====================== */

.latest-art:hover {
    transform: scale(1.08);

    filter:
        drop-shadow(
            0 0 12px
            rgba(255, 255, 255, 0.35)
        );
}


/* ======================
   MOBILE
====================== */

@media (max-width: 700px) {

    #home {
        padding: 40px 20px;

        /*
         * Permet aussi le scroll sur mobile.
         */
        overflow: visible;
    }

    #home .menu {
        gap: 50px;
    }

    .boot-line {
        grid-template-columns:
            1fr;

        gap: 10px;
    }

    #home h1 {
        font-size: 40px;
    }

    .latest-art {
        position: relative;

        top: auto;
        left: auto;

        width: 90%;

        max-width: 520px;

        margin: 60px auto 20px;
    }
}


/* ======================
   REDUCED MOTION
====================== */

@media (prefers-reduced-motion: reduce) {

    #planetarium .layer {
        animation-play-state:
            paused;
    }
}
/* ======================
   BOUTON DIARY
====================== */

#home .diary-button {
    position: absolute;

    /*
     * Sous la ligne des boutons
     */
    top: 120px;

    /*
     * Vers la droite
     */
    right: 50px;

    width: 260px;
    height: 160px;

    display: block;

    z-index: 100;

    transition:
        transform 0.25s ease;
}

#home .diary-button img {
    display: block;

    width: 100%;
    height: auto;
}


/* ======================
   SURVOL DIARY
====================== */

#home .diary-button:hover {
    transform: scale(1.1);
}