@font-face {
    font-family: 'CascadiaCode-Regular';
    src: url(SRC/TYPO/Cascadia_Code/CascadiaCode-Regular.ttf);
}
@font-face {
    font-family: 'Rubik-SemiBold';
    src: url(SRC/TYPO/Rubik/Rubik-SemiBold.ttf);
}
@font-face {
    font-family: 'Rubik-ExtraBold';
    src: url(SRC/TYPO/Rubik/Rubik-ExtraBold.ttf);
}

/* ==== base ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    
    font-family: 'CascadiaCode-Regular';
    background-color: #F5F2E8;
    color: #4638c2;
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-family: 'Rubik-SemiBold';
}

a {
    text-decoration: none;
}

/* ==== header ==== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    
    width: 100%;
    padding: 1rem;
    
    background-color: rgba(245, 242, 232, 0.95);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    
    font-size: 1.5rem;
}

.navbar a {
    font-family: 'CascadiaCode-Regular';
    color: #858AE3;
    text-decoration: none;
}

.navbar a:hover {
    opacity: 0.7;
}

/* ==== section 3d plein écran ==== */
.hero-3d {
    position: relative;
    overflow: hidden;
    
    width: 100%;
    height: 100vh;
    
    font-size: 2rem;
}

#canvas3d {
    position: absolute;
    top: 0;
    left: 0;
    
    width: 100%;
    height: 100%;
    
    display: block;
}

.hero-content {
    position: absolute;
    bottom: 6rem;
    left: 5%;
    
    text-align: left;
    color: #858AE3;
    
    pointer-events: none;
}

.hero-content h1 {
    font-size: 7.5rem;
    letter-spacing: 5px;
    margin-bottom: 10px;
    
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    letter-spacing: 3px;
    
    animation: fadeInUp 1s ease 0.3s backwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    right: 3%;
    
    text-align: center;
    color: #858AE3;
    
    animation: bounce 2s infinite;
}

.scroll-arrow {
    font-size: 8rem;
    
    animation: arrowBounce 1.5s infinite;
}

/* ==== animations ==== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* ==== section projets ==== */
.projets {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    
    width: 100%;
    max-width: 1600px;
    padding: 2rem;
}

.projet-grand {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: 3rem;
    
    grid-column: 1 / 3;
    padding: 1.5rem;
    
    border-top: 3px solid #613DC1;
}

.projet-petit {
    display: grid;
    justify-content: center;
    gap: 2rem;
    
    padding: 1.5rem;
    
    border-top: 3px solid #613DC1;
}

.projet-image {
    width: 100%;
    height: 100%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    overflow: hidden;
}

.projet-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    
    object-fit: contain;
    
    transition: transform 0.3s ease;
}


.projet-texte h1 {
    font-family: 'Rubik-ExtraBold';
    font-size: 3rem;
    color: #5c47d3;
    
    margin-bottom: 0.5rem;
    
}

.projet-texte h1:hover {
    color: #7b68ee;
}

.categorie {
    font-size: 1.1rem;
    font-style: italic;
    color: #5c47d3;
    
    margin-bottom: 0.5rem;
}

.description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #858AE3;
}

/* ==== footer ==== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    width: 100%;
    padding: 2rem;
    
    font-size: 1rem;
    color: #858AE3;
    
    border-top: 1px solid #613DC1;
}

.footer a {
    color: #858AE3;
    
    transition: opacity 0.3s;
}

.footer a:hover {
    opacity: 0.7;
}

/* ==== responsive ==== */

/* Grands écrans */
@media (max-width: 1400px) {
    .hero-content h1 {
        font-size: 6rem;
        letter-spacing: 12px;
    }
    
    .projet-texte h1 {
        font-size: 2.5rem;
    }
    
    .projet-image img {
        max-height: 450px;
    }
}

/* Écrans moyens / Tablettes landscape */
@media (max-width: 1200px) {
    .projets {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .projet-grand {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 5rem;
        letter-spacing: 10px;
    }
    
    .scroll-arrow {
        font-size: 6rem;
    }
    
    .projet-texte h1 {
        font-size: 2.2rem;
    }
    
    .projet-image img {
        max-height: 400px;
    }
}

/* Tablettes portrait */
@media (max-width: 900px) {
    
    .hero-content {
        bottom: 4rem;
        left: 3%;
    }
    
    .hero-content h1 {
        font-size: 4rem;
        letter-spacing: 8px;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    
    .scroll-indicator {
        bottom: 2rem;
        right: 5%;
    }
    
    .scroll-arrow {
        font-size: 5rem;
    }
    
    .projets {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .projet-grand {
        grid-column: 1;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .projet-petit {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .projet-texte h1 {
        font-size: 2rem;
    }
    
    .categorie {
        font-size: 1rem;
    }
    
    .description {
        font-size: 0.85rem;
    }
    
    .projet-image img {
        max-height: 350px;
    }
}

/* Mobiles */
@media (max-width: 600px) {
    
    .hero-content {
        bottom: 3rem;
        left: 5%;
    }
    
    .hero-content h1 {
        font-size: 3rem;
        letter-spacing: 5px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .scroll-arrow {
        font-size: 4rem;
    }
    
    .projets {
        padding: 1rem;
        gap: 1rem;
    }
    
    .projet-grand,
    .projet-petit {
        padding: 1rem;
        gap: 1rem;
    }
    
    .projet-texte h1 {
        font-size: 1.5rem;
    }
    
    .categorie {
        font-size: 0.9rem;
    }
    
    .description {
        font-size: 0.8rem;
    }
    
    .projet-image img {
        max-height: 250px;
    }
    
    .footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 1rem;
        text-align: center;
        font-size: 0.9rem;
    }
}

/* Petits mobiles */
@media (max-width: 400px) {
    
    .hero-content h1 {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .scroll-arrow {
        font-size: 3rem;
    }
    
    .projet-texte h1 {
        font-size: 1.3rem;
    }
    
    .categorie {
        font-size: 0.85rem;
    }
    
    .description {
        font-size: 0.75rem;
    }
    
    .projet-image img {
        max-height: 200px;
    }
    
    .footer {
        font-size: 0.8rem;
    }
}

/* Très petits écrans */
@media (max-width: 320px) {
    .hero-content h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .projet-texte h1 {
        font-size: 1.2rem;
    }
    
    .projet-image img {
        max-height: 180px;
    }
}