* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    overflow-x: hidden; 
}

/* ===== VARIABLES DE COULEURS ===== */
:root {
    --primary-bg: #E8AABE;
    --purple: #CA3C66;
    --dark-purple: #4f122b;
    --white: #dfced6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    color: var(--dark-purple);
    max-height: 100%;
    padding: 0 30px;    
}

main {
    flex: 1;
    transform: translateX(calc(100% + 30px));
    transition: all 0.5s ease;
    width: 100%;
}

/* ===== NAVBAR ET FOOTER===== */
nav {
    position: sticky;
    top: 10px;
    z-index: 9999;
}

#header {    
    transform: translateY(-100px);
}

footer {
    transform: translateY(100px);
}

nav, footer {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin: 10px;
    transition: all 0.5s ease;
}

nav, footer, table {
    width: fit-content;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.5);

    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,  /* reflet haut intérieur */
        0 -2px 0 rgba(0, 0, 0, 0.05) inset,       /* ombre bas intérieur */
        0 8px 20px rgba(0, 0, 0, 0.15),            /* ombre portée */
        0 2px 4px rgba(0, 0, 0, 0.1);              /* ombre proche */
}

.nav-btn, table a {  
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--purple);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px var(--purple);
}

.nav-btn:hover, .active, table a:hover {
    background-color: var(--dark-purple);
    color: var(--primary-bg);
    box-shadow: 0 6px 20px var(--dark-purple);
}

.nav-btn:hover, table a:hover {
    transform: translateY(-2px);
}

h1 {
    font-size: 2.5rem;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
}

.experience {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
}

.search {
    font-size: 1.2rem;
    line-height: 1.6;
}

/* ===== TABLE STYLING ===== */
table {
    margin: auto;
    border-collapse: separate;
    border-spacing: 10px;
}

/* PREMIÈRE COLONNE - Images carrées */
table td:first-child, div.logos div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

table td:first-child img, div.logos img  {
    width: 35px;
    height: 35px;
}

/* DEUXIÈME COLONNE - Texte */
table td:nth-child(2) {
    background-color: var(--primary-bg);
    color: var(--purple); 
    padding: 10px 25px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 6px 20px var(--primary-bg);
}

/* TROISIÈME COLONNE - Boutons */
table a {
    display: flex; 
    height: 50px;
    align-items: center;
    justify-content: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    column-gap: 30px;
}

.color-box {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--dark-purple);
    padding: 30px;
    margin-top: 30px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,  /* reflet haut intérieur */
        0 -2px 0 rgba(0, 0, 0, 0.05) inset,       /* ombre bas intérieur */
        0 8px 20px rgba(0, 0, 0, 0.15),            /* ombre portée */
        0 2px 4px rgba(0, 0, 0, 0.1);              /* ombre proche */
}

.color-box.active {
    border: solid 2px var(--dark-purple);
}

.color-box.active h2 {
    color: var(--dark-purple);
}

.color-box div:has(img), .color-box div:has(canvas) {
    margin-top: auto;
}

.color-box h2, h1, span {
    color: var(--purple);
    transition: all 0.3s ease;
}

ul {
    list-style-position: inside;
}

.italique {
    font-style: italic;
}

h1.centrage {
    text-align: center;
    margin-bottom: 20px;    
}

div.logos {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

img.fullwidth {
    width: 50px !important;
    height: 50px !important;
    border-radius: 10px;
}

.grid-container-projects {    
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
    padding: 30px; 
    transition: all 0.7s ease; 
    max-width: 100%;
    border-radius: 60px;
    background-color: rgba(255, 255, 255, 0.3);

    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,  /* reflet haut intérieur */
        0 -2px 0 rgba(0, 0, 0, 0.05) inset,       /* ombre bas intérieur */
        0 8px 20px rgba(0, 0, 0, 0.15),            /* ombre portée */
        0 2px 4px rgba(0, 0, 0, 0.1);              /* ombre proche */
}

.grid-container-projects .color-box { 
    transition: all 0.3s ease;   
}

.img-projet {
    display: block;
    width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

.btn-github {
    margin-top: 20px;
    margin-right: 10px;
}

.grid-container-projects a {    
    text-decoration: none;

    margin: 0;
}

.grid-container-projects a:hover {  
    transform: translateY(-4px);
}

.grid-container-projects a:hover h2 {
    color: var(--dark-purple);  
}

.grid-container-projects img {
    display: block;
    width: 100%;
    border-radius: 10px;
}

.controls {
    z-index: 900;
}

p {
    text-align: justify;
}

#projet-layout {
    display: flex;
    gap: 30px;
    align-items: start;
}

#container-projet-details {
    display: none;
    transform: translateX(calc(100% + 30px));
    transition: all 0.7s ease;
}

#projet-details {
    border-radius: 60px;
    flex: 1;
    transition: all 0.5s ease;
    margin: 0;
}

#btn-close {
    position: static;
    width: 35px;
    height: 35px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.3);
    color: black;   
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all ease 0.3s;
    margin-left: calc(100% - 65px);
    margin-bottom: 5px;
    margin-top: 2px;
    font-weight: 500;

    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,  /* reflet haut intérieur */
        0 -2px 0 rgba(0, 0, 0, 0.05) inset,       /* ombre bas intérieur */
        0 8px 20px rgba(0, 0, 0, 0.15),            /* ombre portée */
        0 2px 4px rgba(0, 0, 0, 0.1);              /* ombre proche */
}

#btn-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    font-weight: 700;
    color: var(--dark-purple);
}

#bg-canvas {    
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9999;
    pointer-events: none;
    opacity: 0;
}

img.logo {
    width: 50px;
    height: 50px;
}

img.etablissement {
    height: 80px;
    width: auto;
    background: white;
    padding: 6px 10px;
    border-radius: 10px;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,  /* reflet haut intérieur */
        0 -2px 0 rgba(0, 0, 0, 0.05) inset,       /* ombre bas intérieur */
        0 8px 20px rgba(0, 0, 0, 0.15),            /* ombre portée */
        0 2px 4px rgba(0, 0, 0, 0.1);              /* ombre proche */
}