/* GLOBAL */
* {
    box-sizing: border-box;
    pointer-events: auto;
}

/* Remplace ton bloc actuel par celui-ci */
html, body {
    min-height: 100%; /* Utilisez min-height au lieu de height */
    overflow-x: hidden;
    /* Supprime height: 100% qui bloque le scroll */
}

body {
    margin: 0;
    padding: 0;
    padding-top: 70px;
    font-family: Arial, sans-serif;
    background-color: #0f172a;
    color: white;
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 15px 40px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99999;
}

/* LOGO / TITRE */
nav h1 {
    font-size: 18px;
    color: white;
    margin: 0;
    cursor: pointer;
}

/* MENU CENTRÉ */
/*nav div {
    display: flex;
    gap: 25px;
    margin: auto;
}*/

/* liens */
/*nav a {
    text-decoration: none;
    color: #94a3b8;
    transition: 0.3s;
    font-size: 14px;
    position: relative;
}*/

/* MENU CENTRÉ */
.nav-links {
    display: flex;
    gap: 25px;
    margin: auto;
}

/* Liens de navigation */
.nav-links a {
    text-decoration: none;
    color: #94a3b8;
    transition: 0.3s;
    font-size: 14px;
    position: relative;
    padding-bottom: 5px; /* Évite que la barre ne colle trop au texte */
}

.nav-links a:hover, 
.nav-links a.active {
    color: white;
}

/* La petite ligne bleue en dessous */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: #38bdf8;
    transition: 0.3s ease-in-out;
}

/* Animation au survol et maintien sur l'élément actif */
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/*nav a:hover {
    color: white;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: #38bdf8;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}*/

/* SECTIONS */
section {
    padding: 100px 20px;
    max-width: 1100px;
    margin: auto;
    position: relative;
    z-index: 1;
}

section {
    /* La valeur 80px correspond à la hauteur de ta nav + un peu de marge */
    scroll-margin-top: 80px; 
}

/* éviter que la navbar cache le haut */
#home {
    margin-top: 80px;
}

/* TITRES */
h2 {
    font-size: 48px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

h3 {
    font-size: 28px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

p {
    color: #94a3b8;
}

/* PROJETS */
#projects>div {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

#projects>div>div {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    width: 250px;
    transition: 0.3s;
    cursor: pointer;
}

#projects>div>div:hover {
    transform: translateY(-5px) scale(1.03);
}

/* TABLEAU */
table {
    border-collapse: collapse;
    margin: 20px auto;
    width: 100%;
    max-width: 500px;
}

th, td {
    border: 1px solid #1e293b;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #1e293b;
}

/* ANIMATION */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    min-height: calc(100vh - 70px); /* Ajuste selon la taille de la nav */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* NOM / PRENOM */
.hero h1 {
    font-size: 80px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
}

/* SOUS TITRE */
.hero h3 {
    margin-top: 10px;
    font-size: 22px;
    color: #94a3b8;
}

/* DESCRIPTION */
.hero p {
    margin-top: 20px;
    max-width: 700px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* TIMELINE */
.timeline-section {
    padding: 120px 20px;
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 80px auto;
}

/* ligne centrale */
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(148, 163, 184, 0.3);
    transform: translateX(-50%);
}

/* item */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

/* carte */
.content {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    display: inline-block;
    text-align: left;
    transition: 0.3s ease;
}

.content:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.08);
}

.timeline-item.right .content {
    border-left: 2px solid rgba(56, 189, 248, 0.3);
}

/* point parfaitement aligné */
.dot {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 10px #38bdf8;
}

.timeline-item.right .dot {
    left: 0%;
}

.formation-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* logo lycée */
.formation-header img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    display: block;
    transition: 0.2s ease;
}

.formation-header img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
}

.content hr {
    border: none;
    height: 1px;
    width: 80%;
    margin: 15px auto;
    background: rgba(148, 163, 184, 0.2);
}

/* TECH BADGES */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tech-badges span {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #cbd5e1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    transition: 0.2s;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s forwards;
}

/* délai automatique pour effet cascade */
.tech-badges span:nth-child(1) { animation-delay: 0.1s; }
.tech-badges span:nth-child(2) { animation-delay: 0.2s; }
.tech-badges span:nth-child(3) { animation-delay: 0.3s; }
.tech-badges span:nth-child(4) { animation-delay: 0.4s; }
.tech-badges span:nth-child(5) { animation-delay: 0.5s; }
.tech-badges span:nth-child(6) { animation-delay: 0.6s; }
.tech-badges span:nth-child(7) { animation-delay: 0.7s; }
.tech-badges span:nth-child(8) { animation-delay: 0.8s; }
.tech-badges span:nth-child(9) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.tech-badges span:hover {
    transform: scale(1.05);
    background: rgba(56, 189, 248, 0.2);
}

/* VEILLE */
.veille-section {
    padding: 120px 20px;
    max-width: 1000px;
    margin: auto;
}

.veille-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.veille-card {
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: 0.3s ease;
    overflow: hidden;
}

.veille-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.08);
}

.veille-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #cbd5e1;
}

.veille-card h3 {
    margin-bottom: 15px;
}

.intro {
    color: #cbd5e1;
    margin-bottom: 15px;
}

/* GRID VEILLE */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.box {
    background: rgba(15, 23, 42, 0.5);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: 0.3s ease;
    max-width: 100%;
}

.box:hover {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.08);
}

.box.full {
    margin-top: 15px;
    width: 100%;
}

.box h4 {
    margin-bottom: 10px;
}

/* TAGS */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

/* TOOLS GRID */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    transition: 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

.tool-card img {
    width: 45px;
    height: 45px;
    margin-bottom: 8px;
    object-fit: contain;
    filter: brightness(0.9);
}

.tool-card span {
    color: #cbd5e1;
    font-size: 13px;
    text-align: center;
}

/* HERO BUTTONS */
.hero-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    min-width: 140px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: 0.25s ease;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.hero-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.15);
    color: white;
}

.hero-btn.static {
    cursor: default;
    opacity: 0.8;
}

.hero-btn.static:hover {
    transform: none;
    box-shadow: none;
}

/* MISC */
img {
    max-width: 100%;
    display: block;
}

#app {
    position: relative;
    z-index: 1;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Animation plus fluide */
    will-change: opacity, transform; /* Aide le navigateur à optimiser */
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}