@import url('https://fonts.googleapis.com/css2?family=Caveat+Brush&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Modern+Antiqua&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Modern Antiqua", serif;
}

:root {
    --primary: #020617;
    --secondary: #0c1d27;
    --accent: #0d5a69;
    --text: #f8fafc;
}

html, body {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    background-color: #041821;
    background-image: url(/img/background.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

.grabbed{
    cursor: grabbing;
}

.global-container {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.global-card {
    position: relative;
    width: 100%;
    max-width: 510px;
    height: 330px;
    background: var(--secondary);
    border-radius: 20px;
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.global-card:active{
    cursor: grabbing;
}

.global-card.flipped {
    animation: turn 1s forwards;
}

.global-card.unflipped{
    animation: turnback 1s forwards;
}

@keyframes turn {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(200deg); }
    100% { transform: rotateY(180deg); }
}

@keyframes turnback {
    0% { transform: rotateY(180deg); }
    50% { transform: rotateY(380deg); }
    100% { transform: rotateY(360deg); }
}

.global-card .front::before,
.global-card .back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: -1;
}

.btn-music {
    position: absolute;
    top: 0;
    left: -100px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px;
    border-radius: 20px;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
    transition: .3s;
    z-index: 9999;
    animation: song 2s forwards;
}

.btn-language {
    position: absolute;
    top: 0px;
    left: -100px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px;
    border-radius: 20px;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
    transition: .3s;
    z-index: 9999;
    animation: language 2s forwards;
}

.btn-language,
.btn-music {
    cursor: pointer;
}

.btn-music:hover,
.btn-language:hover {
    height: 55px;
    width: 55px;
}

@keyframes language {
    0% {left: -70px;}
    100% {left: 70px;}
}

@keyframes song {
    0% {left: -140px;}
    100% {left: 0px;}
}

.language-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-container .notification {
    position: absolute;
    top: -100px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 200px;
    height: 50px;

    background: #11252d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 14px;

    border-radius: 20px;
    animation: show 3s forwards;
}

@keyframes show {
    0% {top: -100px;}
    25% {top: 20px;}
    75% {top: 20px;}
    100% {top: -100px;}
}

.txt-end {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 20px;
    color: rgba(255, 255, 255, 0.1);
}

/* Front */

.global-card .front {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 20px;
    backface-visibility: hidden;
    transform: rotateY(0deg);
}

.me {
    display: flex;
    align-items: center;
    gap: 30px;
}

.me .name {
    color: var(--text);
    font-size: 1.5rem;
}

.me .about {
    color: var(--accent);
    font-size: 14px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.me img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-user-drag: none;
}

.tools {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.tools .section-1,
.tools .section-2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 90%;
    gap: 10px;
}

.tools section {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 5px;
    cursor: pointer;
    transition: .3s;
}

.tools section img {
    height: 60px;
    width: 60px;
}

.tools section i,
.tools section p {
    color: var(--text);
    text-align: center;
}

/* Section */

/* 1-1 */

.tools .section-1 .section-1-1 {
    background: rgba(0, 242, 254, 0.1);
}

.tools .section-1 .section-1-1:hover {
    background: rgba(0, 242, 254, 0.3);
}

/* 1-2 */

.tools .section-1 .section-1-2 {
    background: rgba(79, 172, 254, 0.1);
}

.tools .section-1 .section-1-2:hover {
    background: rgba(79, 172, 254, 0.3);
}

/* 1-3 */

.tools .section-1 .section-1-3 {
    background: rgba(0, 198, 255, 0.1);
}

.tools .section-1 .section-1-3:hover {
    background: rgba(0, 198, 255, 0.3);
}

/* 2-1 */

.tools .section-2 .section-2-1 {
    background: rgba(0, 114, 255, 0.1);
}

.tools .section-2 .section-2-1:hover {
    background: rgba(0, 114, 255, 0.3);
}

/* 2-2 */

.tools .section-2 .section-2-2 {
    background: rgba(8, 81, 156, 0.1);
}

.tools .section-2 .section-2-2:hover {
    background: rgba(8, 81, 156, 0.3);
}

/* 2-3 */

.tools .section-2 .section-2-3 {
    background: rgba(46, 99, 130, 0.1);
}

.tools .section-2 .section-2-3:hover {
    background: rgba(46, 99, 130, 0.5);
}

.cv a {
    position: absolute;
    bottom: 0;
    left: 0;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: .3s;
    margin: 20px;
}

.cv a:hover {
    color: var(--accent);
}

.turn-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 20px;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--accent);
    transition: .3s;
    cursor: pointer;
    animation: here 2s infinite ease-in-out;
}

.turn-btn:hover {
    color: var(--text);
}

/* back */

.global-card .back {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 20px;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    z-index: 9999;
}

.back-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 20px;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--accent);
    transition: .3s;
    cursor: pointer;
    animation: here 1.5s infinite ease-in-out;
}

.back-btn:hover {
    color: var(--text);
}

@keyframes here {
    0%{padding-bottom: 20px;}
    20%{padding-bottom: 30px;}
    50%{padding-bottom: 20px;}
    100%{padding-bottom: 20px;}
}

.back .title-reseaux {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.back .title-contact {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.reseaux {
    display: flex;
    align-items: center;
    height: 10%;
    gap: 20px;
    margin-bottom: 50px;
}

.reseaux a {
    font-size: 2rem;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: .3s;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);

    display: flex;
    align-items: center;
    justify-content: center;
}

.reseaux a:hover {
    color: var(--text);
}

.reseaux .github {
    background: rgba(0, 242, 254, 0.1);
}

.reseaux .github:hover {
    background: rgba(0, 242, 254, 0.3);
}

.reseaux .discord {
    background: rgba(79, 172, 254, 0.1);
}

.reseaux .discord:hover {
    background: rgba(79, 172, 254, 0.3);
}

.reseaux .linkedin {
    background: rgba(0, 198, 255, 0.1);
}

.reseaux .linkedin:hover {
    background: rgba(0, 198, 255, 0.3);
}

.reseaux .instagram {
    background: rgba(0, 114, 255, 0.1);
}

.reseaux .instagram:hover {
    background: rgba(0, 114, 255, 0.3);
}


.contact {
    display: flex;
    flex-direction: column;
}

.contact p {
    color: var(--text);
    transition: .3s;
    font-size: 16px;
    display: flex;
    gap: 20px;
}

.contact p:hover {
    color: var(--accent);
}

.contact p i {
    color: var(--text);
}

/* Bulle */

.aquarium {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -999;
}

.bulle {
    position: absolute;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.5);
    animation: wave 20s infinite ease-in-out;
    z-index: -999;
    border-radius: 50% 40% 60% 50%;
}

@keyframes wave {
    0% {transform: translate(0px, 0);}
    25% {transform: translate(-15px, -27.5vh);}
    50% {transform: translate(15px, -55vh);}
    75% {transform: translate(-5px, -82.5vh);}
    100% {transform: translate(0px, -110vh);}
}

.bombe{
    position: absolute;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.5);
    animation: bombe 3s forwards ease-in-out;
    z-index: -999;
    border-radius: 50% 40% 60% 50%;
}

@keyframes bombe {
    0% {transform: translateY(50vh);}
    100% {transform: translateY(-110vh);}
}

/* Poissons */

.fish-1a,
.fish-1b,
.fish-1c {
    position: absolute;
    width: 20px;
    height: 10px;
    background: url(/img/fish.png);
    background-position: center;
    background-size: cover;
    border-radius: 50%;
    filter: blur(1px);
    left: -10%;
}

.fish-1a {
    top: 65%;
    animation: fishes-one 18s 0s infinite ease-in-out;
}

.fish-1b {
    top: 70%;
    animation: fishes-one 18s 1.2s infinite ease-in-out;
}

.fish-1c {
    top: 75%;
    animation: fishes-one 18s 2.5s infinite ease-in-out;
}

.fish-1a .tail,
.fish-1b .tail,
.fish-1c .tail {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: url(/img/fish.png);
    background-position: center;
    background-size: cover;
    left: -13px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.fish-2a,
.fish-2b,
.fish-2c {
    position: absolute;
    width: 20px;
    height: 10px;
    background: url(/img/fish.png);
    background-position: center;
    background-size: cover;
    border-radius: 50%;
    filter: blur(1px);
    left: 110%;
}

.fish-2a {
    top: 25%;
    animation: fishes-two 22s 4s infinite ease-in-out;
}

.fish-2b {
    top: 20%;
    animation: fishes-two 22s 5.5s infinite ease-in-out;
}

.fish-2c {
    top: 30%;
    animation: fishes-two 22s 6.8s infinite ease-in-out;
}

.fish-2a .tail,
.fish-2b .tail,
.fish-2c .tail {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: url(/img/fish.png);
    background-position: center;
    background-size: cover;
    right: -13px;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.fish-3 {
    position: absolute;
    width: 25px; 
    height: 12px;
    background: url(/img/fish.png);
    background-position: center;
    background-size: cover;
    border-radius: 50%;
    filter: blur(1.2px);
    left: -10%;
    top: 110%;
    animation: fishes-three 25s 5s infinite ease-in-out;
}

.fish-3 .tail {
    position: absolute;
    width: 12px;
    height: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: url(/img/fish.png);
    background-position: center;
    background-size: cover;
    left: -15px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@keyframes fishes-one {
    0% {left: -10%; transform: translateY(0px);}
    10% {transform: translateY(-15px);}
    20% {transform: translateY(10px);}
    30% {transform: translateY(-5px);}
    40% {left: 110%; transform: translateY(0px);}
    100% {left: 110%; transform: translateY(0px);}
}

@keyframes fishes-two {
    0% {left: 110%; transform: translateY(0px);}
    10% {transform: translateY(12px);}
    20% {transform: translateY(-10px);}
    30% {transform: translateY(8px);}
    40% {left: -10%; transform: translateY(0px);}
    100% {left: -10%; transform: translateY(0px);}
}

@keyframes fishes-three {
    0% {left: -10%; top: 110%; transform: rotate(0deg) translateY(0px);}
    5% {transform: rotate(-35deg) translateY(-10px);}
    15% {transform: rotate(-35deg) translateY(15px);}
    25% {transform: rotate(-35deg) translateY(-8px);}
    35% {transform: rotate(-35deg) translateY(12px);}
    45% {left: 110%; top: -10%; transform: rotate(-35deg) translateY(0px);}
    100% {left: 110%; top: -10%; transform: rotate(-35deg) translateY(0px);}
}

/* phone */

@media (max-width : 768px) {
    .global-card {
        width: 95vw;
    }

    .tools section p {
        font-size: 0.9rem;
    }

    .btn-language {
        position: absolute;
        top: 55px;
        left: -140px;
        animation: phone 2s forwards;
        width: 45px;
        height: 45px;
        margin: 15px;
        border-radius: 15px;
        font-size: 0.9rem;
    }

    .txt-end {
        font-size: 12px;
    }

    .btn-music {
        width: 45px;
        height: 45px;
        margin: 15px;
        border-radius: 15px;
        font-size: 0.9rem;
    }

    .btn-language:hover,
    .btn-music:hover{
        height: 45px;
        width: 45px;
    }

    .language-container .notification {
        width: 150px;
        height: 40px;
        border-radius: 15px;
        animation: show-phone 3s forwards;
    }
}

@keyframes phone {
    0% {left: -140px;}
    100% {left: 0px;}
}

@keyframes show-phone {
    0% {top: -100px;}
    25% {top: 16px;}
    75% {top: 16px;}
    100% {top: -100px;}
}