html, body {
    padding: 0; margin: 0;
    color: var(--secondary-color);

    width: 100%; overflow-x: hidden;
}

* {
    box-sizing: border-box;
    font-family: 'Main-Font';

    transition: .75s;
}

@font-face {
    font-family: 'Main-Font';
    src: url(font/Montserrat.ttf);
}

section, main {
    width: stretch; min-height: 100dvh;
    padding: 7.5%;
}

.hidden {
    opacity: 0; transform: translateY(50%);
    transition: .75s;
}

.show {
    opacity: 1 !important;
    transform: unset !important;
}

/* Glitch */
.glitch {
  position: relative;
  text-transform: uppercase;
  
  text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
               -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
               0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.glitch::before {
  animation: glitch-haut 1s infinite linear alternate-reverse;
  filter: hue-rotate(90deg); 
}

.glitch::after {
  animation: glitch-bas 1.5s infinite linear alternate-reverse;
}
@keyframes glitch-haut {
  0% {
    clip-path: inset(0 0 50% 0); 
    transform: translate(-5px, -2px);
  }
  20% {
    clip-path: inset(0 0 50% 0);
    transform: translate(5px, 2px);
  }
  40% {
    clip-path: inset(0 0 70% 0); 
    transform: translate(-2px, 1px);
  }
  60% {
    clip-path: inset(0 0 40% 0);
    transform: translate(0);
  }
  100% {
    clip-path: inset(0 0 50% 0);
    transform: translate(3px, -1px);
  }
}
@keyframes glitch-bas {
  0% {
    clip-path: inset(50% 0 0 0); 
    transform: translate(5px, 2px);
  }
  30% {
    clip-path: inset(50% 0 0 0);
    transform: translate(-5px, -2px);
  }
  50% {
    clip-path: inset(30% 0 0 0); 
    transform: translate(2px, -3px);
  }
  70% {
    clip-path: inset(60% 0 0 0);
    transform: translate(0);
  }
  100% {
    clip-path: inset(50% 0 0 0);
    transform: translate(-3px, 1px);
  }
}

.divGlitch {
  animation: glitchDiv 1.2s infinite steps(2, end);
}
@keyframes glitchDiv {
  0% {
    transform: translate(-2px, -1px);
    filter: blur(1px) contrast(1.05) saturate(1.1) hue-rotate(10deg);
    opacity: 0.98;
  }
  20% {
    transform: translate(2px, 1px);
    filter: blur(0.6px) contrast(1.1) saturate(1.05) hue-rotate(4deg);
  }
  40% {
    transform: translate(-1px, 0);
    filter: blur(0.8px) contrast(1.03) hue-rotate(0deg);
  }
  60% {
    transform: translate(0);
    filter: blur(0.2px) contrast(1.05) hue-rotate(2deg);
    opacity: 1;
  }
  80% {
    transform: translate(1px, -1px);
    filter: blur(0.9px) contrast(1.08) hue-rotate(6deg);
  }
  100% {
    transform: translate(0, 2px);
    filter: blur(0.7px) contrast(1.04) hue-rotate(1deg);
  }
}
.liquidGlass {
    background: linear-gradient(314deg,rgba(255, 250, 232, 0.466) 0%, rgba(0, 183, 255, 0.144) 48%, rgba(255, 219, 185, 0.164) 100%); border: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px) brightness(0.8);  box-shadow: 0 0 5dvh #77beca31;

    font-weight: bold;
}

:root {
    --main-color : #020202FF;
    --secondary-color : #F2F0EF;
    --light-color: #F69955;
    --dark-color: rgb(15, 14, 71);
    --hud-color: white;
    --filter-color : linear-gradient(103deg,rgba(15, 14, 71, 0.15) 0%, rgba(255, 106, 0, 0.15) 100%);

    /* Fonts */
        --title-font-size : 6rem; --text-font-size : 1.8rem;

        --title-font-weight : 1000;
    /*  */

    /* Images */
        --logo-width: 5dvh; --icons-width: 3.5dvh;
    
    /* Border-radius */
    --main-border-radius : 30px;
    --secondary-border-radius : 15px;
}

p, h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

a {
    text-decoration: none;
}

/* header & Footer */

header {
    width: stretch; max-width: 100dvw;
    padding: 5% 7.5%;

    position: fixed; top: 0; left: 0;
    display: flex; justify-content: space-between;

    z-index: 3;
}
header a {
    color: var(--secondary-color);
}
header > div, nav {
    display: flex; justify-content: center; align-items: center; gap: 1.5dvh; color: var(--hud-color); font-weight: bold;
}

header > div:first-of-type > a > img {
    width: var(--logo-width);
}

header > div:last-of-type img {
    width: var(--icons-width); height: var(--icons-width);
}

header > div:last-of-type a {
    height: fit-content;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%; outline: 2px solid var(--hud-color);
}

header a:hover {
    transform: translateY(-7%);
}

.alert{
    position: fixed;
    right: 0; bottom: 0;
    width: 20dvw; height: 30dvh; margin: 2%; padding: 1%;
    border-radius: var(--main-border-radius);
    background-color: rgb(from var(--light-color) r g b / 50%);
    outline: var(--secondary-color) 2px solid;
    z-index: 999;
    animation: alertPulse .7s ease-in-out infinite alternate;
}
.alert p{
    max-width: 100%;
    max-height: 100%;
}
@keyframes alertPulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}
/* Filter Content */
.filterContent {
    width: stretch; height: 100dvh; min-height: 100dvh;
    position: fixed; top: 0; left: 0;
    padding: 7.5%;

    background: var(--filter-color); pointer-events: none;
    z-index: 2; 
}

.backgroundImage {
    position: fixed;
    inset: 0;
    width: 100%; min-height: 100vh;
    background: url(../assets/images/bg/galaxyBackground.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    filter: hue-rotate(290deg) saturate(0.9) brightness(0.75);
}

/* Hero */

#heroSection {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 2.5dvh;
    color: var(--hud-color); width: 100dvw;
}

#heroSection h1 {
    width: max-content;
    max-width: 100%;
    font-size: var(--title-font-size); line-height: 80%; font-weight: var(--title-font-weight);
}
b {
    color: var(--light-color);
}

#heroSection p {
    width: 40%;
    font-size: var(--text-font-size);
}

#heroSection p:last-of-type {
    width: 50%;
}

/* About */
#aboutSection > h2{
    font-size: var(--title-font-size); font-weight: var(--title-font-weight);
}
#aboutSection > div{
    height: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    font-size: 1.2rem;
}
#aboutSection > div > p{
    width: 60%;
    padding: 2.5%;
    margin: 2%;
    border-radius: var(--secondary-border-radius);
}

#aboutSection > div > p:last-of-type{
    align-self: flex-end;
    text-align: right;
}

/* Footer */

footer{
    width: 100%;
    padding: 3.5%;
}

footer > div {
    display: flex; 
    padding: 5%;
        border-radius: var(--secondary-border-radius);
}
footer > div > div{
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start; gap: 1.5dvh;
}
footer > div > div > div{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start; gap: .5dvh;
}

/* Page galerie */
.galerieContainer{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2%;
    width: 100%;
}
.galerieItems{
    flex: 0 1 calc(50% - 2%);
    padding: 2%;
    border-radius: var(--main-border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 0 3% 0;
}
.galerieItems img{
    width: 100%;
    border-radius: var(--main-border-radius);
}

.skeleton {
    display: none;
    width: 100px; height: 100px;
    
    background : var(--dark-color);
    animation: pulse 1.5s infinite ease-in-out;
    border-radius: var(--secondary-border-radius);
}   

.galerieItems.loading .skeleton {
    display: block;
}
.galerieItems.loading img {
    display: none;
}

@keyframes pulse {
    0% { background-color: var(--dark-color); }
    50% { background-color: #1e2124; }
    100% { background-color: var(--dark-color); }
}

/* Journal */
.journalContainer {
    height: unset !important;
    padding: 2%;
    display: flex; color: var(--secondary-color); justify-content: center; align-items: center; gap: 5%;
}

.journalItems {
    max-height: 65px; width: stretch;
    padding: 1.5%; margin-bottom: 1.5%;
    border-radius: var(--secondary-border-radius);

    transition: .75s; overflow:clip; 

    font-size: 1.15rem; 
    z-index: 5;
}

.journalItems > .journalTitle {
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    height: max-content;
}

.journalItems > .journalContent {
    padding: 1.5%; margin: 2%;
}
.journalTitle > div:last-of-type{
    display: flex;
    flex-direction: row;
    width: 30%;
}
.journalTitle > div:last-of-type > span{
    padding: 2% 3%;     text-align: center;
    width: stretch;
}
.resolu{
    color: rgb(0, 178, 0); background-color: rgba(0, 78, 9, 0.641);
    outline: green 2px solid;
    border-radius: var(--secondary-border-radius);
}
.enCours{
    color: var(--light-color); background-color: rgba(121, 87, 13, 0.641);
    outline: #f88838 2px solid;
    border-radius: var(--secondary-border-radius);
}

@media (max-width: 475px) {
    section, main {
        padding: 5% 5% 8%;
    }

    header {
        padding: 3% 5%;
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 1.5rem;
    }

    header > div, nav {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }

    header > div:first-of-type {
        justify-content: space-between;
    }

    header > div:last-of-type img {
        width: 3dvh; height: 3dvh;
    }

    #heroSection h1,
    #heroSection p,
    #heroSection p:last-of-type {
        width: 100%;
    }

    #aboutSection {
        display: flex; flex-direction: column;gap: 1.5dvh
    }

    #aboutSection p {
        width: unset !important;
        padding: 10% !important; text-align: justify !important;
    }
    footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
        padding: 4%;
        gap: 2rem;
        padding: 3%;
    }

    footer > div {
        width: 100%;
        align-items: flex-start;
    }

    .galerieContainer {
        gap: 3%;
    }

    .galerieItems {
        flex: 0 1 100%;
        padding: 4%;
    }

    .journalContainer {
        flex-direction: column; align-items: stretch;
        height: stretch !important;
        gap: 2rem;
        padding: 2%;
    }

    .journalItems {
        padding: 7.5%; max-height: unset;
        display: flex; flex-direction: column;
    }

    .journalItems > .journalTitle {
        flex-direction: column; align-items: flex-start; justify-content: flex-start;
        padding: 2%;
    }

    .journalTitle > div:last-of-type {
        width: stretch;
    }


    .journalItems > .journalContent {
        padding: unset;
    }

    :root {
        --title-font-size: 3.5rem;
        --text-font-size: 1.4rem;
    }

    main {
        padding: 25% 5%;
    }

    header > div:last-of-type img, header > div:last-of-type a {
     display: none;
    }
    .journalArrow{
        display: none;
    }
    .alert{
        width: 90dvw;
        right: 3dvw;
        height: 22dvh;
        background-color: var(--light-color);
    }
}