@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* 
############# 
## General ## 
############# 
*/

* {
    cursor: none;
    /* scroll-behavior désactivé pour utiliser le smooth scrolling JS plus performant */

    --main-color: #F1B4BB;
    --second-color: #FDF0F0;
    --main-color-bg: #101b38;
    --second-color-bg: #1F4172;
}


body {
    /* scroll-behavior désactivé pour utiliser le smooth scrolling JS plus performant */
    background: var(--main-color-bg);
    margin: 0;
    padding: 0;
    color: var(--main-color);
    display: flex;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    flex-direction: column;
    overflow-x: hidden;
}
a {
    color: var(--main-color);
    text-decoration: none;
}

::-webkit-scrollbar {
    width: 0px;
}

section {
    min-height: 100vh;
    background-color: #101b3875;
}

.home {
    background: linear-gradient(180deg, #1f427200 50%, #101b3875 100%);
}



section .reveal {
    opacity: 0;
    transform: translateY(-60px);
    transition: 0.5s ease-in-out;
}

section .reveal.active {
    opacity: 1;
    transform: translateY(0%);
    
}
h1 {
    font-size: 3rem;
    margin: 0;
    padding: 0;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.5px;
}

h1 span {
    color: rgba(0, 0, 0, 0);
    -webkit-text-stroke: 2px var(--main-color);
}


/* 
###########
## TITLE ##
###########
*/
.home .container h1 {
    margin-top: 8rem;
    position: relative;
    font-size: 8rem;
    margin-bottom: 0;
    letter-spacing: -4px;
    min-width:0;
    color: rgba(0, 0, 0, 0);
}

.home .container h1::before {
    text-wrap: nowrap;
    white-space: nowrap;
    content: "HEY! I'M TIDIC";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    min-width:0;
    height: 100%;
    color: rgba(0, 0, 0, 0);
    -webkit-text-stroke: 2px var(--main-color);

    animation: animate 3s ease forwards;
    overflow: hidden;
}
.home .container h1::after {
    text-wrap: nowrap;
    white-space: nowrap;
    content: "HEY! I'M";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    min-width:0;
    color: var(--main-color);
    -webkit-text-stroke: 0px;
    animation: animate 2s ease-in-out forwards;
    overflow: hidden;
}

@keyframes animate {
    to {
        width: 100%;
        height: 100%;
    }
}

/* Description */

.home .container .title_desc_container {
    overflow: hidden;
}

.home .container .title_desc {
    display: block;
    margin-top: 0;
    color: var(--second-color);
    opacity: 0;
    text-transform: uppercase;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;

    overflow: hidden;
    transform: translateY(-150%);
    animation: slideReveal 2s ease forwards;
}

@keyframes slideReveal {
    100% {
        transform: translateY(0%);
        opacity: 0.5;
    }
}
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    flex-direction: column;
    margin-top: 15rem;

}

.home .container outline {
    color: rgba(0, 0, 0, 0);
    -webkit-text-stroke: 2px var(--second-color);
}

/* 
############ 
## Cursor ## 
############ 
*/
.cursor-dot {
    width: 10px;
    height: 10px;
    background-color: var(--second-color);
    z-index: 999999;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--second-color);
    transition: 0.3s ease;
    z-index: 999998;
}

.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 999999;
}

/* 
########## 
## Card ## 
########## 
*/

.card {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 3rem 2rem;
    padding: 2rem;
    border-radius: 2rem;
    background: linear-gradient(135deg, #101b3850 0%, #1f417250 50%, #101b3850 100%);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(241, 180, 187, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(241, 180, 187, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 50%;    backdrop-filter: blur(15px);
    font-family: 'Inter', sans-serif;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(241, 180, 187, 0.1), transparent);
    transition: left 0.8s ease;
}

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

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(241, 180, 187, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(241, 180, 187, 0.2);
}

.text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
    text-align: left;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* Styles pour la grille de projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    margin: 2rem 0;
}

.project-card {
    background: linear-gradient(135deg, #1f417250 0%, #101b3850 50%, #2a4f8550 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(241, 180, 187, 0.15);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(241, 180, 187, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(241, 180, 187, 0.08), transparent);
    transition: left 0.8s ease;
}

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

.project-card:hover {
    transform: translateY(-10px) scale(1.03);
    background: linear-gradient(135deg, #1f417260 0%, #101b3860 50%, #2a4f8560 100%);
    border-color: rgba(241, 180, 187, 0.25);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(241, 180, 187, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-card h2 {
    margin: 0;
    color: var(--main-color);
    font-size: 1.6rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.3px;
    text-align: center;
}

.project-card p {
    margin: 0;
    color: var(--second-color);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.project-link {
    color: var(--second-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    text-align: center;
    padding: 0.8rem 1.5rem;
    background: rgba(241, 180, 187, 0.1);
    border-radius: 0.8rem;
    border: 1px solid rgba(241, 180, 187, 0.2);
    display: inline-block;
    margin-top: auto;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.project-link:hover {
    color: var(--main-color);
    background: rgba(241, 180, 187, 0.15);
    border-color: rgba(241, 180, 187, 0.3);
    transform: translateY(-2px);
}

.project-link:hover::after {
    width: 60%;
}

/* Ajustement du container pour les projets */
#projects .container {
    align-items: center;
}

/* Styles pour la grille de contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 700px;
    margin: 2rem 0;
}

.contact-card {
    background: linear-gradient(135deg, #101b3850 0%, #2a4f8550 50%, #1f417250 100%);
    border-radius: 1.2rem;
    padding: 1.5rem;
    border: 1px solid rgba(241, 180, 187, 0.15);
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(241, 180, 187, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(241, 180, 187, 0.08), transparent);
    transition: left 0.8s ease;
}

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

.contact-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, #101b3860 0%, #2a4f8560 50%, #1f417260 100%);
    border-color: rgba(241, 180, 187, 0.25);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(241, 180, 187, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 0.2rem;
    animation: pulse 2s infinite ease-in-out;
}

.contact-card h2 {
    margin: 0;
    color: var(--main-color);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.3px;
}

.contact-link {
    color: var(--second-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    background: rgba(241, 180, 187, 0.1);
    border-radius: 0.6rem;
    border: 1px solid rgba(241, 180, 187, 0.2);
    display: inline-block;
    word-break: break-all;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.contact-link:hover {
    color: var(--main-color);
    background: rgba(241, 180, 187, 0.15);
    border-color: rgba(241, 180, 187, 0.3);
    transform: translateY(-2px);
}

.contact-link:hover::after {
    width: 60%;
}

.contact-username {
    color: var(--second-color);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    background: rgba(241, 180, 187, 0.1);
    border-radius: 0.6rem;
    border: 1px solid rgba(241, 180, 187, 0.2);
    display: inline-block;
}

/* Ajustement du container pour les contacts */
#contact .container {
    align-items: center;
}

/* Animation pour les icônes */
@keyframes pulse {
    0%, 100% { 
        opacity: 0.8; 
        transform: scale(1); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05); 
    }
}

/* 
########## 
## NAVB ## 
########## 
*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    transition: 0.3s ease;

    /* backdrop-filter: blur(5px); */
}

.navbar .nav-links {
    margin-right: 5%;
}

.scroll_active {
    /* padding: 10px; */
    background: #101b386b;
    backdrop-filter: blur(15px);
    border-radius: 500px;
    margin-top: 2rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);



}

.navbar .logo {
    color: var(--main-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-left: 2rem;
    font-family: 'Space Grotesk', sans-serif;
}

.navbar li {
    list-style: none;
    display: inline-block;
    margin-left: 3rem;
    margin-right: 3rem;
    font-weight: 700;
    padding: 0;
    transition: 1s ease;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.5px;

}
.navbar a {
    transition: 1s ease;
}
.navbar li:hover {
    color: #f1b4bb77;
    transform: translate(-5px, -5px);
}




/* 
###########
## Arrow ## 
###########
*/
.arrow {
    opacity: 0;
    border: solid var(--main-color);
    width: 50px;
    height: 50px;
    border-radius: 40%;

    justify-content: center;
    align-items: center;
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 2rem;

    background-color: var(--main-color);
    z-index: 10;
    transition: 0.3s ease;

    color: var(--main-color-bg);
    font-size: 2rem;

    transform: translateY(-50%);

}

.arrow.scroll_active {
    opacity: 1;
    animation: arrow 1s ease-in-out infinite;
    transform: translateX(0%);
}

/* 
#########################
## Système Parallax Spatial ##
#########################
*/

.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* 
============= 
Couches de Background 
============= 
*/

.bg-layer {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 120vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.bg-layer-1 {
    background-image: url(../res/img/background.png);
    z-index: 1;
    /* opacity: 0.9; */
    filter: brightness(0.8) contrast(1.1);
}

.bg-layer-2 {
    background-image: url(../res/img/background2.png);
    z-index: 2;
    /* opacity: 0.7; */
    /* filter: brightness(0.9) contrast(1.05) blur(1px); */
}

.bg-layer-3 {
    background-image: url(../res/img/background3.png);
    z-index: 3;
    /* opacity: 0.5; */
    /* filter: brightness(1) contrast(1) blur(2px); */
}

/* 
============= 
Couches d'Étoiles 
============= 
*/

.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.stars-layer-1 {
    z-index: 4;
    opacity: 0.6;
}

.stars-layer-2 {
    z-index: 5;
    opacity: 0.8;
}

.stars-layer-3 {
    z-index: 6;
    opacity: 1;
}

.star {
    position: absolute;
    background: var(--second-color);
    border-radius: 50%;
    animation: twinkle 3.5s infinite ease-in-out;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Animations optimisées pour les performances */
@keyframes twinkle {
    0%, 100% { 
        opacity: 0.5;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% { 
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1.1);
    }
}

.star.pink {
    background: var(--main-color);
    animation: twinkle-pink 4.5s infinite ease-in-out;
}

@keyframes twinkle-pink {
    0%, 100% { 
        opacity: 0.4;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: translate3d(0, 0, 0) scale(1.15);
    }
}

.star.blue {
    background: #8ec5ff;
    animation: twinkle-blue 5.5s infinite ease-in-out;
}

@keyframes twinkle-blue {
    0%, 100% { 
        opacity: 0.3;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: translate3d(0, 0, 0) scale(1.2);
    }
}

/* 
============= 
Ajustements Z-Index 
============= 
*/

section {
    position: relative;
    z-index: 10;
}

.navbar {
    z-index: 100;
}

.arrow {
    z-index: 100;
}

.cursor-dot, .cursor-outline {
    z-index: 1000;
}

/* 
============= 
Optimisations Performance 
============= 
*/

.bg-layer-1::before,
.bg-layer-2::before,
.bg-layer-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .parallax-container {
        display: none;
    }
    
    body {
        background: var(--main-color-bg) url(../res/img/background.png) center/cover fixed;
    }
    
    .star {
        animation: none;
    }
}

/* Styles responsive pour les cartes de projets */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .project-card h2 {
        font-size: 1.4rem;
    }
      .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        margin: 1.5rem 0;
    }
    
    .contact-card {
        padding: 1.2rem;
    }
    
    .contact-icon {
        font-size: 1.8rem;
    }
    
    .card {
        margin: 2rem 1rem;
        padding: 1.5rem;
        width: auto;
    }
}
