:root {
    --bg: #0f1220;
    --bg-light: #181c35;
    --text: #eaeaf0;
    --muted: #a0a3c4;
    --accent: #06a1da;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {

    color: var(--text);
    line-height: 1.6;

    background: radial-gradient(
    circle at top center,   /* position fixe du halo */
    #2b2b2b 0%,
    #151515 55%,
    #0a0a0a 100%
  );

  background-attachment: fixed;
}

/* ===== NAVIGATION ===== */
header {
    position: sticky;
    top: 0;
    background: rgba(15, 18, 32, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 3px solid #22254a;
    
    z-index: 10;
}

nav {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav a {
    color: #39B8F8;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: #1f6487;
}

/* ===== NAV BURGER ===== */

.nav-toggle {
    display: none;
    font-size: 1rem;
    background: none;
    border: none;
    color: #39B8F8;
    cursor: pointer;
}

/* ===== SECTIONS ===== */
section {
    max-width: 1100px;
    margin: auto;
    padding: 4rem 2rem;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #39B8F8;
}

p {
    color: white;
    max-width: 750px;
}

iframe {
    width: 652px;
    height: 169px;
}

/* ===== HERO ===== */
.hero {
    padding-top: 5rem;
}

.hero h1 {
    font-size: 2.5rem;
}

/* ===== PROJETS ===== */
.projects-grid {
    display: table-row;
    grid-template-rows: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 20px;
}

.project-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    width: 752px;
    height: 100%;
}

.project-card h3 {
    color: var(--accent);
}

.project-links a {
    margin-right: 1rem;
    color: var(--text);
    text-decoration: underline;
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    border-top: 1px solid #22254a;
}

.skills-list {
list-style: none;
margin-top: 2rem;
display: grid;
gap: 1.5rem;
}

.skills-list li {
background: var(--bg-light);
padding: 1.25rem 1.5rem;
border-radius: 14px;
box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.skills-list strong {
color: var(--accent);
font-weight: 600;
}

.year-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(145, 142, 142, 0.08);
  color: rgb(184, 181, 181);
  width: max-content;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.galleryimg {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.galleryimg:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.section-divider {
  border: 0;
  height: 2px;
  background-color: #1c1c83;
  margin: 3rem 0;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

.link {
    color: #39B8F8;
    margin-left: 5px;
}

.link:hover {
    color: #1f6487;
}


.img-projet-autre {
    width: 25%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.img-projet-autre:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.project-divider {
    border: 0;
    height: 2px;
    background-color: #1c1c83;
    margin: 4px;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}


.enlarged {
  position: fixed;
  top: 50%;
  left: 50%;
  width: auto;
  max-width: 80%;
  max-height: 80%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  box-shadow: 0 0 20px black;
}

.enlarged:hover {
    transform: translate(50%, 50%);
    transform: scale(1.02);
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.contact-links div {
  white-space: nowrap;
  display: flex;
  align-items: center;
}


.icon {
    width: 30px;
    display: flex;
    align-items: center;
    opacity: 1;
}

.icon:hover {
    opacity: 0.5;
}

#download {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
}

.vertical-line {
    border: 0;
    height:100%;
    background-color: #1c1c83;
    width: 3px;
    margin-left: auto;
    margin-right: auto;
}


/* ========================================= */
/* RESPONSIVE DESIGN */
/* ========================================= */

/* ----- TABLETTES ----- */
@media (max-width: 1024px) {

    nav {
        padding: 1rem;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .project-card {
        width: 100%; /* Supprime le 752px fixe */
    }

    .img-projet-autre {
        width: 40%;
    }

    iframe {
        width: 100%;
        height: 100%;
    }
}


/* ----- TELEPHONES ----- */
@media (max-width: 768px) {

    /* NAVIGATION */
    .nav-toggle {
        display: block;
        margin-right: 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(15, 18, 32, 0.95);
        backdrop-filter: blur(8px);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 1rem 0;

        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 500px;
        display: flex;
        border-bottom: 3px solid #22254a;
        border-top: 3px solid #22254a;
    }

    nav {
        position: relative;
    }

    /* HERO */
    .hero h1 {
        font-size: 2rem;
        text-align: center;
    }

    /* SECTIONS */
    section {
        padding: 2.5rem 1rem;
    }

    p {
        max-width: 100%;
    }

    /* PROJETS */
    .projects-grid {
        display: table-row; /* Corrige display: table-row */
        grid-template-columns: 1fr;
    }

    .project-card {
        width: 100%;
        padding: 1.2rem;
    }

    /* IMAGES */
    .img-projet-autre {
        width: 100%;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    /* CONTACT */
    .contact-links {
        gap: 1rem;
    }

    .vertical-line {
        display: none;
    }

    /* BADGE */
    .year-badge {
        font-size: 0.7rem;
    }
}





/* ----- PETITS TELEPHONES ----- */
@media (max-width: 700px) {

    .hero h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    nav {
        padding: 0.4rem;
    }

    nav strong {
        text-size-adjust: 70%;
    }

    nav ul a {
        text-size-adjust: 70%;
    }


    .project-card {
        padding: 1rem;
        border-radius: 12px;
    }
}

/* ----- TRES PETITS TELEPHONES ----- */
@media (max-width: 500px) {

    .hero h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    nav {
        padding: 0.4rem;
    }


    .project-card {
        padding: 1rem;
        border-radius: 12px;
    }
}